@sparkle-learning/core 0.0.53 → 0.0.55

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.
Files changed (177) hide show
  1. package/dist/cjs/{PrivateRoute-074c584e.js → PrivateRoute-f97245ce.js} +18 -30
  2. package/dist/cjs/{feed.service-b4f09441.js → appdata.service-c8d71e05.js} +4 -56
  3. package/dist/cjs/{assets.service-0c759d51.js → assets.service-bfa75092.js} +1 -1
  4. package/dist/cjs/assignment.service-690fb59c.js +19 -0
  5. package/dist/cjs/{environment-config.service-0e02b049.js → environment-config.service-c8ff1f3d.js} +0 -1
  6. package/dist/cjs/{facilitator.service-9e990274.js → facilitator.service-ff0e1659.js} +1 -1
  7. package/dist/cjs/feed.service-8eca4de6.js +57 -0
  8. package/dist/cjs/header-mobile-collapse_61.cjs.entry.js +76 -87
  9. package/dist/cjs/{httpService-7211d93b.js → httpService-d2e7bf8f.js} +13 -11
  10. package/dist/cjs/index.cjs.js +5 -4
  11. package/dist/cjs/{ion-action-sheet_4.cjs.entry.js → ion-action-sheet_7.cjs.entry.js} +728 -0
  12. package/dist/cjs/loader.cjs.js +1 -1
  13. package/dist/cjs/media.service-8a1b9bc5.js +40 -0
  14. package/dist/cjs/{signalR.service-5672eebc.js → signalR.service-bd6b42f9.js} +18 -20
  15. package/dist/cjs/sparkle-animation-player.cjs.entry.js +1 -1
  16. package/dist/cjs/sparkle-assignment.cjs.entry.js +110 -0
  17. package/dist/cjs/sparkle-character-intro.cjs.entry.js +2 -2
  18. package/dist/cjs/sparkle-core.cjs.js +1 -1
  19. package/dist/cjs/sparkle-discussion-questions_2.cjs.entry.js +20 -11
  20. package/dist/cjs/sparkle-discussion.cjs.entry.js +6 -4
  21. package/dist/cjs/sparkle-facilitator-notes-form.cjs.entry.js +5 -3
  22. package/dist/cjs/sparkle-feed-post.cjs.entry.js +116 -0
  23. package/dist/cjs/sparkle-feedback.cjs.entry.js +5 -3
  24. package/dist/cjs/sparkle-file-upload.cjs.entry.js +53 -0
  25. package/dist/cjs/sparkle-goal-form.cjs.entry.js +11 -8
  26. package/dist/cjs/sparkle-input.cjs.entry.js +56 -0
  27. package/dist/cjs/sparkle-quiz-container.cjs.entry.js +1 -1
  28. package/dist/cjs/sparkle-quiz-old.cjs.entry.js +120 -0
  29. package/dist/cjs/sparkle-quiz.cjs.entry.js +31 -48
  30. package/dist/cjs/{student.service-2e58f237.js → student.service-7e5385be.js} +1 -1
  31. package/dist/cjs/token.service-7a41953d.js +97 -0
  32. package/dist/cjs/{util-d383acb8.js → util-47e320b2.js} +2 -2
  33. package/dist/collection/PrivateRoute.js +2 -2
  34. package/dist/collection/collection-manifest.json +5 -2
  35. package/dist/collection/components/layout/facilitator/facilitator-page.js +2 -3
  36. package/dist/collection/components/layout/page/page.css +4 -0
  37. package/dist/collection/components/layout/page/page.js +39 -26
  38. package/dist/collection/components/sparkle-assignment/sparkle-assignment.css +30 -0
  39. package/dist/collection/components/sparkle-assignment/sparkle-assignment.js +159 -0
  40. package/dist/collection/components/sparkle-character-intro/sparkle-character-intro.css +8 -1
  41. package/dist/collection/components/sparkle-character-intro/sparkle-character-intro.js +10 -6
  42. package/dist/collection/components/sparkle-course-root/sparkle-course-root.js +13 -2
  43. package/dist/collection/components/sparkle-discussion/sparkle-discussion-questions/sparkle-discussion-questions.js +4 -2
  44. package/dist/collection/components/sparkle-discussion/sparkle-discussion-results/sparkle-discussion-results.js +15 -9
  45. package/dist/collection/components/sparkle-discussion/sparkle-discussion.css +5 -0
  46. package/dist/collection/components/sparkle-discussion/sparkle-discussion.js +5 -3
  47. package/dist/collection/components/sparkle-feed-post/sparkle-feed-post.js +54 -75
  48. package/dist/collection/components/sparkle-file-upload/sparkle-file-upload.css +0 -0
  49. package/dist/collection/components/sparkle-file-upload/sparkle-file-upload.js +105 -0
  50. package/dist/collection/components/sparkle-input/sparkle-input.css +0 -0
  51. package/dist/collection/components/sparkle-input/sparkle-input.js +212 -0
  52. package/dist/collection/components/sparkle-login/sparkle-login.js +2 -1
  53. package/dist/collection/components/sparkle-quiz/{sparkle-quiz/sparkle-quiz.css → sparkle-quiz-old/sparkle-quiz-old.css} +1 -1
  54. package/dist/collection/components/sparkle-quiz/{sparkle-quiz/sparkle-quiz.js → sparkle-quiz-old/sparkle-quiz-old.js} +4 -4
  55. package/dist/collection/components/sparkle-quiz/{sparkle-quiz-v1.js → sparkle-quiz.js} +23 -25
  56. package/dist/collection/components/sparkle-quiz-container/sparkle-quiz-container.js +1 -1
  57. package/dist/collection/components/sparkle-root/sparkle-root.js +12 -10
  58. package/dist/collection/services/assignment.service.js +14 -0
  59. package/dist/collection/services/auth/auth.service.js +15 -14
  60. package/dist/collection/services/environment/environment-config.js +1 -1
  61. package/dist/collection/services/environment/environment-config.service.js +0 -1
  62. package/dist/collection/services/httpService.js +12 -10
  63. package/dist/collection/services/signalR.service.js +17 -19
  64. package/dist/collection/services/token.service.js +79 -0
  65. package/dist/collection/util.js +5 -2
  66. package/dist/esm/{PrivateRoute-c5441f35.js → PrivateRoute-90ac95b8.js} +17 -29
  67. package/dist/esm/{feed.service-8fbe4ce3.js → appdata.service-2e84e167.js} +5 -55
  68. package/dist/esm/{assets.service-66e848b8.js → assets.service-def1d63c.js} +1 -1
  69. package/dist/esm/assignment.service-8d31f141.js +17 -0
  70. package/dist/esm/{environment-config.service-2b5d692b.js → environment-config.service-b191f276.js} +0 -1
  71. package/dist/esm/{facilitator.service-b0292f7f.js → facilitator.service-18c47bdf.js} +1 -1
  72. package/dist/esm/feed.service-b4f3cae4.js +54 -0
  73. package/dist/esm/header-mobile-collapse_61.entry.js +71 -82
  74. package/dist/esm/{httpService-7b75b095.js → httpService-7986aeed.js} +14 -12
  75. package/dist/esm/index.js +6 -5
  76. package/dist/esm/{ion-action-sheet_4.entry.js → ion-action-sheet_7.entry.js} +729 -4
  77. package/dist/esm/ion-loading.entry.js +1 -1
  78. package/dist/esm/ion-menu.entry.js +1 -1
  79. package/dist/esm/ion-modal.entry.js +1 -1
  80. package/dist/esm/ion-picker.entry.js +1 -1
  81. package/dist/esm/ion-toast.entry.js +1 -1
  82. package/dist/esm/loader.js +1 -1
  83. package/dist/esm/media.service-6e90bc41.js +37 -0
  84. package/dist/esm/{overlays-3b4dca92.js → overlays-4233a39d.js} +1 -1
  85. package/dist/esm/{signalR.service-9d5b9f36.js → signalR.service-c33fba50.js} +18 -20
  86. package/dist/esm/sparkle-animation-player.entry.js +1 -1
  87. package/dist/esm/sparkle-assignment.entry.js +106 -0
  88. package/dist/esm/sparkle-character-intro.entry.js +3 -3
  89. package/dist/esm/sparkle-core.js +1 -1
  90. package/dist/esm/sparkle-discussion-questions_2.entry.js +20 -11
  91. package/dist/esm/sparkle-discussion.entry.js +6 -4
  92. package/dist/esm/sparkle-facilitator-notes-form.entry.js +6 -4
  93. package/dist/esm/sparkle-feed-post.entry.js +112 -0
  94. package/dist/esm/sparkle-feedback.entry.js +6 -4
  95. package/dist/esm/sparkle-file-upload.entry.js +49 -0
  96. package/dist/esm/sparkle-goal-form.entry.js +9 -6
  97. package/dist/esm/sparkle-input.entry.js +52 -0
  98. package/dist/esm/sparkle-quiz-container.entry.js +1 -1
  99. package/dist/esm/sparkle-quiz-old.entry.js +116 -0
  100. package/dist/esm/sparkle-quiz.entry.js +31 -48
  101. package/dist/esm/{student.service-0746418b.js → student.service-08af124f.js} +1 -1
  102. package/dist/esm/token.service-71a5d33f.js +94 -0
  103. package/dist/esm/{util-6ef753e9.js → util-57cc8006.js} +2 -2
  104. package/dist/sparkle-core/index.esm.js +1 -1
  105. package/dist/sparkle-core/p-08420531.entry.js +1 -0
  106. package/dist/sparkle-core/p-08cca80d.entry.js +1 -0
  107. package/dist/sparkle-core/p-0e8e539f.entry.js +1 -0
  108. package/dist/sparkle-core/p-13ec39db.entry.js +1 -0
  109. package/dist/sparkle-core/p-1adc98f6.js +1 -0
  110. package/dist/sparkle-core/p-38c842d5.entry.js +1 -0
  111. package/dist/sparkle-core/{p-fbccd30c.js → p-39a31e43.js} +1 -1
  112. package/dist/sparkle-core/{p-0a5d7c4f.entry.js → p-3daf2915.entry.js} +26 -26
  113. package/dist/sparkle-core/{p-9a443f51.js → p-408176ba.js} +1 -1
  114. package/dist/sparkle-core/p-42ed7d5f.entry.js +1 -0
  115. package/dist/sparkle-core/p-4b4a8703.js +1 -0
  116. package/dist/sparkle-core/p-4d1cfcbe.entry.js +1 -0
  117. package/dist/sparkle-core/p-4fba3e4c.js +1 -0
  118. package/dist/sparkle-core/{p-54dd894f.entry.js → p-6bde0192.entry.js} +1 -1
  119. package/dist/sparkle-core/{p-6faa194c.entry.js → p-6d2f4093.entry.js} +1 -1
  120. package/dist/sparkle-core/{p-162bff1a.entry.js → p-72053ae0.entry.js} +1 -1
  121. package/dist/sparkle-core/p-7dae0f0e.js +1 -0
  122. package/dist/sparkle-core/{p-18cdd458.entry.js → p-85d4cd5c.entry.js} +1 -1
  123. package/dist/sparkle-core/p-973fe404.entry.js +22 -0
  124. package/dist/sparkle-core/{p-ff0e0d4e.entry.js → p-98daeddb.entry.js} +1 -1
  125. package/dist/sparkle-core/p-b06e2bef.js +1 -0
  126. package/dist/sparkle-core/{p-e863bf1d.entry.js → p-b6fec622.entry.js} +1 -1
  127. package/dist/sparkle-core/p-b8d71ff4.js +1 -0
  128. package/dist/sparkle-core/p-bd90903e.js +1 -0
  129. package/dist/sparkle-core/{p-a49ab4e8.entry.js → p-c64a34cd.entry.js} +1 -1
  130. package/dist/sparkle-core/{p-5efc6566.js → p-c9f753a4.js} +1 -1
  131. package/dist/sparkle-core/p-da391f3f.js +1 -0
  132. package/dist/sparkle-core/p-e0cad1bb.js +1 -0
  133. package/dist/sparkle-core/{p-ce4b22f7.entry.js → p-f196c124.entry.js} +1 -1
  134. package/dist/sparkle-core/p-f47fe1fe.entry.js +1 -0
  135. package/dist/sparkle-core/p-f714f77a.entry.js +1 -0
  136. package/dist/sparkle-core/p-f891c79a.entry.js +1 -0
  137. package/dist/sparkle-core/{p-377b04c2.entry.js → p-ff080f82.entry.js} +1 -1
  138. package/dist/sparkle-core/{p-2ff67662.js → p-ff7a8a71.js} +1 -1
  139. package/dist/sparkle-core/sparkle-core.esm.js +1 -1
  140. package/dist/types/components/layout/page/page.d.ts +2 -0
  141. package/dist/types/components/sparkle-assignment/sparkle-assignment.d.ts +16 -0
  142. package/dist/types/components/sparkle-course-root/sparkle-course-root.d.ts +1 -0
  143. package/dist/types/components/sparkle-feed-post/sparkle-feed-post.d.ts +4 -3
  144. package/dist/types/components/sparkle-file-upload/sparkle-file-upload.d.ts +15 -0
  145. package/dist/types/components/sparkle-input/sparkle-input.d.ts +23 -0
  146. package/dist/types/components/sparkle-quiz/{sparkle-quiz/sparkle-quiz.d.ts → sparkle-quiz-old/sparkle-quiz-old.d.ts} +1 -1
  147. package/dist/types/components/sparkle-quiz/{sparkle-quiz-v1.d.ts → sparkle-quiz.d.ts} +1 -1
  148. package/dist/types/components.d.ts +111 -36
  149. package/dist/types/models/class.model.d.ts +4 -0
  150. package/dist/types/services/assignment.service.d.ts +8 -0
  151. package/dist/types/services/auth/auth.service.d.ts +1 -1
  152. package/dist/types/services/environment/environment-config.d.ts +3 -0
  153. package/dist/types/services/token.service.d.ts +13 -0
  154. package/dist/types/util.d.ts +1 -0
  155. package/package.json +1 -1
  156. package/dist/cjs/ion-select_3.cjs.entry.js +0 -618
  157. package/dist/cjs/ion-textarea.cjs.entry.js +0 -248
  158. package/dist/cjs/sparkle-quiz-v1.cjs.entry.js +0 -105
  159. package/dist/esm/ion-select_3.entry.js +0 -612
  160. package/dist/esm/ion-textarea.entry.js +0 -244
  161. package/dist/esm/sparkle-quiz-v1.entry.js +0 -101
  162. package/dist/sparkle-core/p-0f1c5899.entry.js +0 -18
  163. package/dist/sparkle-core/p-1d4c7c11.js +0 -1
  164. package/dist/sparkle-core/p-30767c1c.entry.js +0 -1
  165. package/dist/sparkle-core/p-3265ed87.entry.js +0 -1
  166. package/dist/sparkle-core/p-370609ba.entry.js +0 -1
  167. package/dist/sparkle-core/p-44334ef3.entry.js +0 -4
  168. package/dist/sparkle-core/p-462bffba.js +0 -1
  169. package/dist/sparkle-core/p-4c9f994f.js +0 -1
  170. package/dist/sparkle-core/p-58e4bbe5.entry.js +0 -1
  171. package/dist/sparkle-core/p-600cf6a3.js +0 -1
  172. package/dist/sparkle-core/p-641bfc92.entry.js +0 -1
  173. package/dist/sparkle-core/p-80d6b0e6.entry.js +0 -1
  174. package/dist/sparkle-core/p-af3cc111.entry.js +0 -1
  175. package/dist/sparkle-core/p-b226f54d.js +0 -1
  176. /package/dist/collection/components/sparkle-quiz/{sparkle-quiz-v1.css → sparkle-quiz.css} +0 -0
  177. /package/dist/sparkle-core/{p-935e7cfc.js → p-8b56f734.js} +0 -0
@@ -1,248 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-51e8292e.js');
6
- const ionicGlobal = require('./ionic-global-2cde9d3a.js');
7
- const helpers = require('./helpers-c2496722.js');
8
- const theme = require('./theme-b0b295c1.js');
9
-
10
- const textareaIosCss = ".sc-ion-textarea-ios-h{--background:initial;--color:initial;--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:0.5;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--border-radius:0;display:block;position:relative;flex:1;width:100%;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);white-space:pre-wrap;z-index:2;box-sizing:border-box}.ion-color.sc-ion-textarea-ios-h{background:initial}.ion-color.sc-ion-textarea-ios-h{color:var(--ion-color-base)}ion-item.sc-ion-textarea-ios-h,ion-item .sc-ion-textarea-ios-h{align-self:baseline}ion-item.sc-ion-textarea-ios-h:not(.item-label),ion-item:not(.item-label) .sc-ion-textarea-ios-h{--padding-start:0}.textarea-wrapper.sc-ion-textarea-ios{display:grid;min-width:inherit;max-width:inherit;min-height:inherit;max-height:inherit}.textarea-wrapper.sc-ion-textarea-ios::after{white-space:pre-wrap;content:attr(data-replicated-value) \" \";visibility:hidden}.native-textarea.sc-ion-textarea-ios,.textarea-wrapper.sc-ion-textarea-ios::after{padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;grid-area:1/1/2/2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.native-textarea.sc-ion-textarea-ios,.textarea-wrapper.sc-ion-textarea-ios::after{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.native-textarea.sc-ion-textarea-ios{border-radius:var(--border-radius);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;box-sizing:border-box;resize:none;appearance:none;overflow:hidden}.native-textarea.sc-ion-textarea-ios::placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea[disabled].sc-ion-textarea-ios{opacity:0.4}.cloned-input.sc-ion-textarea-ios{left:0;top:0;position:absolute;pointer-events:none}[dir=rtl].sc-ion-textarea-ios .cloned-input.sc-ion-textarea-ios,[dir=rtl].sc-ion-textarea-ios-h .cloned-input.sc-ion-textarea-ios,[dir=rtl] .sc-ion-textarea-ios-h .cloned-input.sc-ion-textarea-ios{left:unset;right:unset;right:0}[auto-grow].sc-ion-textarea-ios-h .cloned-input.sc-ion-textarea-ios{height:100%}.item-label-floating.item-has-placeholder.sc-ion-textarea-ios-h:not(.item-has-value),.item-label-floating.item-has-placeholder:not(.item-has-value) .sc-ion-textarea-ios-h{opacity:0}.item-label-floating.item-has-placeholder.sc-ion-textarea-ios-h:not(.item-has-value).item-has-focus,.item-label-floating.item-has-placeholder:not(.item-has-value).item-has-focus .sc-ion-textarea-ios-h{transition:opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:1}.sc-ion-textarea-ios-h{--padding-top:10px;--padding-end:10px;--padding-bottom:10px;--padding-start:0;font-size:inherit}.item-label-stacked.sc-ion-textarea-ios-h,.item-label-stacked .sc-ion-textarea-ios-h,.item-label-floating.sc-ion-textarea-ios-h,.item-label-floating .sc-ion-textarea-ios-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0px}";
11
-
12
- const textareaMdCss = ".sc-ion-textarea-md-h{--background:initial;--color:initial;--placeholder-color:initial;--placeholder-font-style:initial;--placeholder-font-weight:initial;--placeholder-opacity:0.5;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--border-radius:0;display:block;position:relative;flex:1;width:100%;background:var(--background);color:var(--color);font-family:var(--ion-font-family, inherit);white-space:pre-wrap;z-index:2;box-sizing:border-box}.ion-color.sc-ion-textarea-md-h{background:initial}.ion-color.sc-ion-textarea-md-h{color:var(--ion-color-base)}ion-item.sc-ion-textarea-md-h,ion-item .sc-ion-textarea-md-h{align-self:baseline}ion-item.sc-ion-textarea-md-h:not(.item-label),ion-item:not(.item-label) .sc-ion-textarea-md-h{--padding-start:0}.textarea-wrapper.sc-ion-textarea-md{display:grid;min-width:inherit;max-width:inherit;min-height:inherit;max-height:inherit}.textarea-wrapper.sc-ion-textarea-md::after{white-space:pre-wrap;content:attr(data-replicated-value) \" \";visibility:hidden}.native-textarea.sc-ion-textarea-md,.textarea-wrapper.sc-ion-textarea-md::after{padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;grid-area:1/1/2/2}@supports (margin-inline-start: 0) or (-webkit-margin-start: 0){.native-textarea.sc-ion-textarea-md,.textarea-wrapper.sc-ion-textarea-md::after{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.native-textarea.sc-ion-textarea-md{border-radius:var(--border-radius);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;display:block;width:100%;max-width:100%;max-height:100%;border:0;outline:none;background:transparent;box-sizing:border-box;resize:none;appearance:none;overflow:hidden}.native-textarea.sc-ion-textarea-md::placeholder{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;color:var(--placeholder-color);font-family:inherit;font-style:var(--placeholder-font-style);font-weight:var(--placeholder-font-weight);opacity:var(--placeholder-opacity)}.native-textarea[disabled].sc-ion-textarea-md{opacity:0.4}.cloned-input.sc-ion-textarea-md{left:0;top:0;position:absolute;pointer-events:none}[dir=rtl].sc-ion-textarea-md .cloned-input.sc-ion-textarea-md,[dir=rtl].sc-ion-textarea-md-h .cloned-input.sc-ion-textarea-md,[dir=rtl] .sc-ion-textarea-md-h .cloned-input.sc-ion-textarea-md{left:unset;right:unset;right:0}[auto-grow].sc-ion-textarea-md-h .cloned-input.sc-ion-textarea-md{height:100%}.item-label-floating.item-has-placeholder.sc-ion-textarea-md-h:not(.item-has-value),.item-label-floating.item-has-placeholder:not(.item-has-value) .sc-ion-textarea-md-h{opacity:0}.item-label-floating.item-has-placeholder.sc-ion-textarea-md-h:not(.item-has-value).item-has-focus,.item-label-floating.item-has-placeholder:not(.item-has-value).item-has-focus .sc-ion-textarea-md-h{transition:opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1);opacity:1}.sc-ion-textarea-md-h{--padding-top:10px;--padding-end:0;--padding-bottom:11px;--padding-start:8px;margin-left:0;margin-right:0;margin-top:8px;margin-bottom:0;font-size:inherit}.item-label-stacked.sc-ion-textarea-md-h,.item-label-stacked .sc-ion-textarea-md-h,.item-label-floating.sc-ion-textarea-md-h,.item-label-floating .sc-ion-textarea-md-h{--padding-top:8px;--padding-bottom:8px;--padding-start:0}";
13
-
14
- const Textarea = class {
15
- constructor(hostRef) {
16
- index.registerInstance(this, hostRef);
17
- this.ionChange = index.createEvent(this, "ionChange", 7);
18
- this.ionInput = index.createEvent(this, "ionInput", 7);
19
- this.ionStyle = index.createEvent(this, "ionStyle", 7);
20
- this.ionBlur = index.createEvent(this, "ionBlur", 7);
21
- this.ionFocus = index.createEvent(this, "ionFocus", 7);
22
- this.inputId = `ion-textarea-${textareaIds++}`;
23
- this.didBlurAfterEdit = false;
24
- this.inheritedAttributes = {};
25
- /**
26
- * This is required for a WebKit bug which requires us to
27
- * blur and focus an input to properly focus the input in
28
- * an item with delegatesFocus. It will no longer be needed
29
- * with iOS 14.
30
- *
31
- * @internal
32
- */
33
- this.fireFocusEvents = true;
34
- this.hasFocus = false;
35
- /**
36
- * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
37
- * Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
38
- */
39
- this.autocapitalize = 'none';
40
- /**
41
- * This Boolean attribute lets you specify that a form control should have input focus when the page loads.
42
- */
43
- this.autofocus = false;
44
- /**
45
- * If `true`, the value will be cleared after focus upon edit. Defaults to `true` when `type` is `"password"`, `false` for all other types.
46
- */
47
- this.clearOnEdit = false;
48
- /**
49
- * Set the amount of time, in milliseconds, to wait to trigger the `ionChange` event after each keystroke. This also impacts form bindings such as `ngModel` or `v-model`.
50
- */
51
- this.debounce = 0;
52
- /**
53
- * If `true`, the user cannot interact with the textarea.
54
- */
55
- this.disabled = false;
56
- /**
57
- * The name of the control, which is submitted with the form data.
58
- */
59
- this.name = this.inputId;
60
- /**
61
- * If `true`, the user cannot modify the value.
62
- */
63
- this.readonly = false;
64
- /**
65
- * If `true`, the user must fill in a value before submitting a form.
66
- */
67
- this.required = false;
68
- /**
69
- * If `true`, the element will have its spelling and grammar checked.
70
- */
71
- this.spellcheck = false;
72
- /**
73
- * If `true`, the textarea container will grow and shrink based
74
- * on the contents of the textarea.
75
- */
76
- this.autoGrow = false;
77
- /**
78
- * The value of the textarea.
79
- */
80
- this.value = '';
81
- this.onInput = (ev) => {
82
- if (this.nativeInput) {
83
- this.value = this.nativeInput.value;
84
- }
85
- this.emitStyle();
86
- this.ionInput.emit(ev);
87
- };
88
- this.onFocus = (ev) => {
89
- this.hasFocus = true;
90
- this.focusChange();
91
- if (this.fireFocusEvents) {
92
- this.ionFocus.emit(ev);
93
- }
94
- };
95
- this.onBlur = (ev) => {
96
- this.hasFocus = false;
97
- this.focusChange();
98
- if (this.fireFocusEvents) {
99
- this.ionBlur.emit(ev);
100
- }
101
- };
102
- this.onKeyDown = () => {
103
- this.checkClearOnEdit();
104
- };
105
- }
106
- debounceChanged() {
107
- this.ionChange = helpers.debounceEvent(this.ionChange, this.debounce);
108
- }
109
- disabledChanged() {
110
- this.emitStyle();
111
- }
112
- /**
113
- * Update the native input element when the value changes
114
- */
115
- valueChanged() {
116
- const nativeInput = this.nativeInput;
117
- const value = this.getValue();
118
- if (nativeInput && nativeInput.value !== value) {
119
- nativeInput.value = value;
120
- }
121
- this.runAutoGrow();
122
- this.emitStyle();
123
- this.ionChange.emit({ value });
124
- }
125
- connectedCallback() {
126
- this.emitStyle();
127
- this.debounceChanged();
128
- {
129
- document.dispatchEvent(new CustomEvent('ionInputDidLoad', {
130
- detail: this.el,
131
- }));
132
- }
133
- }
134
- disconnectedCallback() {
135
- {
136
- document.dispatchEvent(new CustomEvent('ionInputDidUnload', {
137
- detail: this.el,
138
- }));
139
- }
140
- }
141
- componentWillLoad() {
142
- this.inheritedAttributes = Object.assign(Object.assign({}, helpers.inheritAriaAttributes(this.el)), helpers.inheritAttributes(this.el, ['title']));
143
- }
144
- componentDidLoad() {
145
- this.runAutoGrow();
146
- }
147
- /**
148
- * Sets focus on the native `textarea` in `ion-textarea`. Use this method instead of the global
149
- * `textarea.focus()`.
150
- */
151
- async setFocus() {
152
- if (this.nativeInput) {
153
- this.nativeInput.focus();
154
- }
155
- }
156
- /**
157
- * Sets blur on the native `textarea` in `ion-textarea`. Use this method instead of the global
158
- * `textarea.blur()`.
159
- * @internal
160
- */
161
- async setBlur() {
162
- if (this.nativeInput) {
163
- this.nativeInput.blur();
164
- }
165
- }
166
- /**
167
- * Returns the native `<textarea>` element used under the hood.
168
- */
169
- getInputElement() {
170
- return Promise.resolve(this.nativeInput);
171
- }
172
- emitStyle() {
173
- this.ionStyle.emit({
174
- interactive: true,
175
- textarea: true,
176
- input: true,
177
- 'interactive-disabled': this.disabled,
178
- 'has-placeholder': this.placeholder !== undefined,
179
- 'has-value': this.hasValue(),
180
- 'has-focus': this.hasFocus,
181
- });
182
- }
183
- runAutoGrow() {
184
- if (this.nativeInput && this.autoGrow) {
185
- index.writeTask(() => {
186
- var _a;
187
- if (this.textareaWrapper) {
188
- // Replicated value is an attribute to be used in the stylesheet
189
- // to set the inner contents of a pseudo element.
190
- this.textareaWrapper.dataset.replicatedValue = (_a = this.value) !== null && _a !== void 0 ? _a : '';
191
- }
192
- });
193
- }
194
- }
195
- /**
196
- * Check if we need to clear the text input if clearOnEdit is enabled
197
- */
198
- checkClearOnEdit() {
199
- if (!this.clearOnEdit) {
200
- return;
201
- }
202
- // Did the input value change after it was blurred and edited?
203
- if (this.didBlurAfterEdit && this.hasValue()) {
204
- // Clear the input
205
- this.value = '';
206
- }
207
- // Reset the flag
208
- this.didBlurAfterEdit = false;
209
- }
210
- focusChange() {
211
- // If clearOnEdit is enabled and the input blurred but has a value, set a flag
212
- if (this.clearOnEdit && !this.hasFocus && this.hasValue()) {
213
- this.didBlurAfterEdit = true;
214
- }
215
- this.emitStyle();
216
- }
217
- hasValue() {
218
- return this.getValue() !== '';
219
- }
220
- getValue() {
221
- return this.value || '';
222
- }
223
- render() {
224
- const mode = ionicGlobal.getIonMode(this);
225
- const value = this.getValue();
226
- const labelId = this.inputId + '-lbl';
227
- const label = helpers.findItemLabel(this.el);
228
- if (label) {
229
- label.id = labelId;
230
- }
231
- return (index.h(index.Host, { "aria-disabled": this.disabled ? 'true' : null, class: theme.createColorClasses(this.color, {
232
- [mode]: true,
233
- }) }, index.h("div", { class: "textarea-wrapper", ref: (el) => (this.textareaWrapper = el) }, index.h("textarea", Object.assign({ class: "native-textarea", "aria-labelledby": label ? labelId : null, ref: (el) => (this.nativeInput = el), autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, disabled: this.disabled, maxLength: this.maxlength, minLength: this.minlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown }, this.inheritedAttributes), value))));
234
- }
235
- get el() { return index.getElement(this); }
236
- static get watchers() { return {
237
- "debounce": ["debounceChanged"],
238
- "disabled": ["disabledChanged"],
239
- "value": ["valueChanged"]
240
- }; }
241
- };
242
- let textareaIds = 0;
243
- Textarea.style = {
244
- ios: textareaIosCss,
245
- md: textareaMdCss
246
- };
247
-
248
- exports.ion_textarea = Textarea;
@@ -1,105 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-51e8292e.js');
6
- const assets_service = require('./assets.service-0c759d51.js');
7
- const environmentConfig_service = require('./environment-config.service-0e02b049.js');
8
-
9
- const sparkleQuizV1Css = "sparkle-quiz-v1{display:block;font-family:var(--font-family);--sparkle-quiz-question-container-padding:10px 0px;--sparkle-quiz-question-container-margin:0px;--sparkle-quiz-question-text-padding:10px 0px;--sparkle-quiz-option-border:2px solid var(--line-rule-color);--sparkle-quiz-selected-option-border:2px solid var(--text-color--dark);--sparkle-quiz-option-border-radius:4px;--sparkle-quiz-option-padding:5px 10px;--sparkle-quiz-option-width:100%;--sparkle-quiz-error-bg-color:#fbaeae;--sparkle-quiz-success-bg-color:#fbaeae;padding:var(--sparkle-quiz-question-container-padding);margin:var(--sparkle-quiz-question-container-margin)}.question-text{padding:var(--sparkle-quiz-question-text-padding)}.option{padding:5px 0px}.number{padding:0px 14px;border:1px solid #ebebeb;border-radius:4px;margin-right:10px;font-size:14px;width:14px;display:inline-flex;justify-content:center}.feedback-container{padding:10px;border-radius:4px}.incorrect .feedback-container{background-color:var(--sparkle-quiz-error-bg-color, #fbaeae)}.correct .feedback-container{background-color:var(--sparkle-quiz-success-bg-color, #fbaeae)}";
10
-
11
- const SparkleQuizV1 = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- this.quizAnswerChanged = index.createEvent(this, "quizAnswerChanged", 7);
15
- }
16
- async loadQuestion() {
17
- if (this.quizData) {
18
- this.question = this.quizData[+this.questionId];
19
- }
20
- }
21
- async componentWillLoad() {
22
- }
23
- async componentDidLoad() {
24
- const config = environmentConfig_service.EnvironmentConfigService.getInstance().get('sparkle');
25
- this.quizData = await assets_service.AssetsService.getInstance().loadJsonFile(config.quizPath);
26
- await this.loadQuestion();
27
- this.quizAnswerChanged.emit({
28
- question: null,
29
- answer: "1"
30
- });
31
- }
32
- quizInputChangeHandler(event) {
33
- this.quizAnswerChanged.emit({
34
- question: event.detail.question,
35
- answer: event.detail.value
36
- });
37
- }
38
- quizFeedbackChangeHandler(event) {
39
- this.quizAnswerChanged.emit({
40
- question: event.detail.question,
41
- answer: event.detail.value
42
- });
43
- }
44
- quizSelectChangeHandler(event) {
45
- this.quizAnswerChanged.emit({
46
- question: event.detail.question,
47
- answer: event.detail.value
48
- });
49
- }
50
- quizOpinionChangeHandler(event) {
51
- this.quizAnswerChanged.emit({
52
- question: event.detail.question,
53
- answer: event.detail.value
54
- });
55
- }
56
- getQuestionFeedback() {
57
- if (this.question.questionType == "MULTIPLE-CHOICE") {
58
- const feedbacks = this.question.options.filter(x => x.correct == true).map(x => x.feedback);
59
- return feedbacks.length > 0 && feedbacks.map(feedback => index.h("small", null, feedback));
60
- }
61
- else if (this.question.questionType == "FEEDBACK" || this.question.questionType == "TEXT") {
62
- return this.question.feedback && index.h("small", null, " ", this.question.feedback);
63
- }
64
- }
65
- showAnswerStatus() {
66
- return index.h("div", null, this.correct ? index.h("strong", null, "Good job!") : index.h("strong", null, "Incorrect answer, please try again."));
67
- }
68
- renderQuestion() {
69
- if (this.question.questionType == "MULTIPLE-CHOICE") {
70
- return index.h("sparkle-quiz-select", { question: this.question, allowMultiple: true });
71
- }
72
- else if (this.question.questionType == "FEEDBACK") {
73
- return index.h("sparkle-quiz-feedback", { question: this.question });
74
- }
75
- else if (this.question.questionType == "TEXT") {
76
- return index.h("sparkle-quiz-input", { question: this.question });
77
- }
78
- else if (this.question.questionType == "OPINION") {
79
- return index.h("sparkle-quiz-opinion", { question: this.question });
80
- }
81
- else if (this.question.questionType == "POLL") {
82
- return index.h("sparkle-quiz-poll", { question: this.question });
83
- }
84
- }
85
- render() {
86
- if (this.question) {
87
- let classes = {
88
- 'correct': this.submitted && this.correct,
89
- 'incorrect': this.submitted && !this.correct
90
- };
91
- return index.h("div", { class: classes }, this.renderQuestion(), this.submitted && this.showInstantResult && index.h("div", { class: "feedback-container" }, [this.showAnswerStatus(),
92
- this.getQuestionFeedback()]));
93
- }
94
- else {
95
- return index.h("p", null, "No question found.");
96
- }
97
- }
98
- get el() { return index.getElement(this); }
99
- static get watchers() { return {
100
- "questionId": ["loadQuestion"]
101
- }; }
102
- };
103
- SparkleQuizV1.style = sparkleQuizV1Css;
104
-
105
- exports.sparkle_quiz_v1 = SparkleQuizV1;