@sparkle-learning/core 0.0.54 → 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 (104) hide show
  1. package/dist/cjs/{PrivateRoute-e2047db2.js → PrivateRoute-f97245ce.js} +2 -2
  2. package/dist/cjs/{appdata.service-d28cf2d6.js → appdata.service-c8d71e05.js} +1 -1
  3. package/dist/cjs/assignment.service-690fb59c.js +19 -0
  4. package/dist/cjs/{facilitator.service-0b9f6ac7.js → facilitator.service-ff0e1659.js} +1 -1
  5. package/dist/cjs/{feed.service-6df9382f.js → feed.service-8eca4de6.js} +1 -1
  6. package/dist/cjs/header-mobile-collapse_61.cjs.entry.js +9 -9
  7. package/dist/cjs/{httpService-d8a5b474.js → httpService-d2e7bf8f.js} +1 -1
  8. package/dist/cjs/index.cjs.js +3 -3
  9. package/dist/cjs/{ion-action-sheet_4.cjs.entry.js → ion-action-sheet_7.cjs.entry.js} +728 -0
  10. package/dist/cjs/loader.cjs.js +1 -1
  11. package/dist/cjs/{media.service-2bc73d37.js → media.service-8a1b9bc5.js} +1 -1
  12. package/dist/cjs/{signalR.service-0d5da1d3.js → signalR.service-bd6b42f9.js} +1 -1
  13. package/dist/cjs/sparkle-assignment.cjs.entry.js +90 -5
  14. package/dist/cjs/sparkle-core.cjs.js +1 -1
  15. package/dist/cjs/sparkle-discussion-questions_2.cjs.entry.js +2 -2
  16. package/dist/cjs/sparkle-facilitator-notes-form.cjs.entry.js +3 -3
  17. package/dist/cjs/sparkle-feed-post.cjs.entry.js +116 -0
  18. package/dist/cjs/sparkle-feedback.cjs.entry.js +3 -3
  19. package/dist/cjs/sparkle-file-upload.cjs.entry.js +53 -0
  20. package/dist/cjs/sparkle-goal-form.cjs.entry.js +4 -4
  21. package/dist/cjs/sparkle-input.cjs.entry.js +56 -0
  22. package/dist/cjs/{student.service-d8ec2551.js → student.service-7e5385be.js} +1 -1
  23. package/dist/cjs/{token.service-bfb0089b.js → token.service-7a41953d.js} +11 -0
  24. package/dist/collection/collection-manifest.json +2 -0
  25. package/dist/collection/components/sparkle-assignment/sparkle-assignment.css +27 -0
  26. package/dist/collection/components/sparkle-assignment/sparkle-assignment.js +141 -7
  27. package/dist/collection/components/sparkle-feed-post/sparkle-feed-post.js +2 -10
  28. package/dist/collection/components/sparkle-file-upload/sparkle-file-upload.css +0 -0
  29. package/dist/collection/components/sparkle-file-upload/sparkle-file-upload.js +105 -0
  30. package/dist/collection/components/sparkle-input/sparkle-input.css +0 -0
  31. package/dist/collection/components/sparkle-input/sparkle-input.js +212 -0
  32. package/dist/collection/services/token.service.js +11 -0
  33. package/dist/esm/{PrivateRoute-c6e80d5d.js → PrivateRoute-90ac95b8.js} +2 -2
  34. package/dist/esm/{appdata.service-d1058e00.js → appdata.service-2e84e167.js} +1 -1
  35. package/dist/esm/assignment.service-8d31f141.js +17 -0
  36. package/dist/esm/{facilitator.service-53e05a01.js → facilitator.service-18c47bdf.js} +1 -1
  37. package/dist/esm/{feed.service-8385ad7a.js → feed.service-b4f3cae4.js} +1 -1
  38. package/dist/esm/header-mobile-collapse_61.entry.js +10 -10
  39. package/dist/esm/{httpService-db476835.js → httpService-7986aeed.js} +2 -2
  40. package/dist/esm/index.js +4 -4
  41. package/dist/esm/{ion-action-sheet_4.entry.js → ion-action-sheet_7.entry.js} +729 -4
  42. package/dist/esm/ion-loading.entry.js +1 -1
  43. package/dist/esm/ion-menu.entry.js +1 -1
  44. package/dist/esm/ion-modal.entry.js +1 -1
  45. package/dist/esm/ion-picker.entry.js +1 -1
  46. package/dist/esm/ion-toast.entry.js +1 -1
  47. package/dist/esm/loader.js +1 -1
  48. package/dist/esm/{media.service-b68cbfff.js → media.service-6e90bc41.js} +1 -1
  49. package/dist/esm/{overlays-3b4dca92.js → overlays-4233a39d.js} +1 -1
  50. package/dist/esm/{signalR.service-4a2d5a92.js → signalR.service-c33fba50.js} +1 -1
  51. package/dist/esm/sparkle-assignment.entry.js +91 -6
  52. package/dist/esm/sparkle-core.js +1 -1
  53. package/dist/esm/sparkle-discussion-questions_2.entry.js +2 -2
  54. package/dist/esm/sparkle-facilitator-notes-form.entry.js +4 -4
  55. package/dist/esm/sparkle-feed-post.entry.js +112 -0
  56. package/dist/esm/sparkle-feedback.entry.js +4 -4
  57. package/dist/esm/sparkle-file-upload.entry.js +49 -0
  58. package/dist/esm/sparkle-goal-form.entry.js +5 -5
  59. package/dist/esm/sparkle-input.entry.js +52 -0
  60. package/dist/esm/{student.service-6457aaa0.js → student.service-08af124f.js} +1 -1
  61. package/dist/esm/{token.service-20f1a256.js → token.service-71a5d33f.js} +11 -0
  62. package/dist/sparkle-core/index.esm.js +1 -1
  63. package/dist/sparkle-core/p-08420531.entry.js +1 -0
  64. package/dist/sparkle-core/p-08cca80d.entry.js +1 -0
  65. package/dist/sparkle-core/p-0e8e539f.entry.js +1 -0
  66. package/dist/sparkle-core/{p-11ac00b0.js → p-1adc98f6.js} +1 -1
  67. package/dist/sparkle-core/{p-71720d6e.entry.js → p-38c842d5.entry.js} +1 -1
  68. package/dist/sparkle-core/{p-38f707fb.js → p-39a31e43.js} +1 -1
  69. package/dist/sparkle-core/{p-6a1fc0af.entry.js → p-3daf2915.entry.js} +1 -1
  70. package/dist/sparkle-core/{p-dcff298d.entry.js → p-42ed7d5f.entry.js} +1 -1
  71. package/dist/sparkle-core/{p-6fab3a4b.js → p-4b4a8703.js} +1 -1
  72. package/dist/sparkle-core/{p-98f7780c.entry.js → p-4d1cfcbe.entry.js} +1 -1
  73. package/dist/sparkle-core/p-4fba3e4c.js +1 -0
  74. package/dist/sparkle-core/{p-54dd894f.entry.js → p-6bde0192.entry.js} +1 -1
  75. package/dist/sparkle-core/{p-6faa194c.entry.js → p-6d2f4093.entry.js} +1 -1
  76. package/dist/sparkle-core/{p-ed9de327.js → p-7dae0f0e.js} +1 -1
  77. package/dist/sparkle-core/p-973fe404.entry.js +22 -0
  78. package/dist/sparkle-core/{p-967a2ed7.js → p-b06e2bef.js} +1 -1
  79. package/dist/sparkle-core/{p-e863bf1d.entry.js → p-b6fec622.entry.js} +1 -1
  80. package/dist/sparkle-core/{p-630a4fa0.js → p-b8d71ff4.js} +1 -1
  81. package/dist/sparkle-core/{p-17b6b07e.js → p-c9f753a4.js} +1 -1
  82. package/dist/sparkle-core/{p-d51f30ca.js → p-da391f3f.js} +1 -1
  83. package/dist/sparkle-core/{p-38fa5987.js → p-e0cad1bb.js} +1 -1
  84. package/dist/sparkle-core/{p-ce4b22f7.entry.js → p-f196c124.entry.js} +1 -1
  85. package/dist/sparkle-core/p-f47fe1fe.entry.js +1 -0
  86. package/dist/sparkle-core/{p-e50c8b04.entry.js → p-f714f77a.entry.js} +1 -1
  87. package/dist/sparkle-core/{p-377b04c2.entry.js → p-ff080f82.entry.js} +1 -1
  88. package/dist/sparkle-core/{p-2ff67662.js → p-ff7a8a71.js} +1 -1
  89. package/dist/sparkle-core/sparkle-core.esm.js +1 -1
  90. package/dist/types/components/sparkle-assignment/sparkle-assignment.d.ts +11 -1
  91. package/dist/types/components/sparkle-feed-post/sparkle-feed-post.d.ts +1 -1
  92. package/dist/types/components/sparkle-file-upload/sparkle-file-upload.d.ts +15 -0
  93. package/dist/types/components/sparkle-input/sparkle-input.d.ts +23 -0
  94. package/dist/types/components.d.ts +62 -0
  95. package/dist/types/services/token.service.d.ts +1 -0
  96. package/package.json +1 -1
  97. package/dist/cjs/ion-select_3.cjs.entry.js +0 -627
  98. package/dist/cjs/ion-textarea.cjs.entry.js +0 -248
  99. package/dist/esm/ion-select_3.entry.js +0 -621
  100. package/dist/esm/ion-textarea.entry.js +0 -244
  101. package/dist/sparkle-core/p-0f1c5899.entry.js +0 -18
  102. package/dist/sparkle-core/p-33a7151d.entry.js +0 -1
  103. package/dist/sparkle-core/p-641bfc92.entry.js +0 -1
  104. package/dist/sparkle-core/p-ca907214.entry.js +0 -4
@@ -1,15 +1,104 @@
1
- import { Component, Element, State, Host, h } from '@stencil/core';
1
+ import { Component, Element, Prop, State, Event, Host, h, Listen } from '@stencil/core';
2
+ import { AssignmentService } from '../../services/assignment.service';
3
+ import { TokenService } from '../../services/token.service';
2
4
  export class SparkleAssignment {
3
5
  constructor() {
4
6
  this.submitted = true;
7
+ this.assignmentLoading = false;
8
+ this.onSubmit = async (event) => {
9
+ event.preventDefault();
10
+ debugger;
11
+ const formElements = event.currentTarget.querySelectorAll('sparkle-input,sparkle-file-upload');
12
+ const formData = Array.from(formElements).reduce((acc, formElement) => {
13
+ const { name, type, value } = formElement;
14
+ //const name = formElement.getAttribute('name');
15
+ let checked = false;
16
+ if (formElement.querySelector('ion-item')) {
17
+ checked = formElement.querySelector('ion-item').classList.contains('item-checkbox-checked');
18
+ }
19
+ if (name) {
20
+ if (type === 'checkbox') {
21
+ acc[name] = checked;
22
+ }
23
+ else {
24
+ acc[name] = value;
25
+ }
26
+ }
27
+ return acc;
28
+ }, {});
29
+ const requiredFields = Array.from(formElements).filter((formElement) => formElement.required);
30
+ const requiredFieldsFilledIn = requiredFields.every((formElement) => formElement.value !== '');
31
+ if (requiredFieldsFilledIn) {
32
+ this.formSubmitted.emit(formData);
33
+ //call api
34
+ }
35
+ else {
36
+ alert('Please fill in all required fields');
37
+ }
38
+ this.assignmentLoading = true;
39
+ this.errorMessage = '';
40
+ this.successMessage = '';
41
+ var assignmentModel = {
42
+ AssignmentData: JSON.stringify(formData),
43
+ AssignmentName: this.name,
44
+ };
45
+ console.log(assignmentModel);
46
+ try {
47
+ const result = await AssignmentService.getInstance().createAssignment(assignmentModel);
48
+ if (result.Succeeded) {
49
+ this.assignmentLoading = false;
50
+ this.successMessage = 'Assignment submitted Successfully.';
51
+ this.resetForm();
52
+ //reset all inputs
53
+ }
54
+ else {
55
+ this.assignmentLoading = false;
56
+ this.errorMessage = 'There is an error while posting to feed.';
57
+ }
58
+ }
59
+ catch (ex) {
60
+ this.assignmentLoading = false;
61
+ }
62
+ };
5
63
  }
6
- async onSubmit(e) {
7
- e.preventDefault();
8
- this.submitted = true;
9
- let isFormValid = true;
64
+ fileUploaded(e) {
65
+ console.log('fileUploaded', e);
66
+ }
67
+ resetForm() {
68
+ const form = this.el.querySelector('form');
69
+ if (form) {
70
+ form.reset();
71
+ }
72
+ }
73
+ renderUserInfo() {
74
+ let authUser = TokenService.getInstance().getAuthUserSync();
75
+ if (authUser && authUser.JWToken) {
76
+ return (h("ion-avatar", { class: "header-avatar", slot: "end" }, authUser.PhotoUrl ? h("img", { src: authUser.PhotoUrl }) : h("img", { src: "/assets/img/user.png" })));
77
+ }
78
+ else {
79
+ return (h("ion-button", { slot: "end", href: "/login" }, "Login to Post"));
80
+ }
81
+ }
82
+ isAuthenticated() {
83
+ return TokenService.getInstance().isAuthenticated();
10
84
  }
11
85
  render() {
12
- return h(Host, null, "Assignment");
86
+ const userInfo = this.renderUserInfo();
87
+ return (h(Host, null,
88
+ h("ion-card", null,
89
+ h("ion-item", { class: "header ion-justify-content-between", lines: "full" },
90
+ h("ion-label", null, this.name),
91
+ userInfo),
92
+ h("ion-card-content", null,
93
+ h("form", { onSubmit: this.onSubmit },
94
+ h("slot", null),
95
+ h("div", { class: "assignment-footer-container" },
96
+ h("div", { class: "assignment-footer" },
97
+ h("div", null,
98
+ h("div", { class: "error" }, this.errorMessage),
99
+ h("div", { class: "success" }, this.successMessage)),
100
+ h("div", null, this.assignmentLoading ? h("ion-spinner", { color: "primary" }) : ''),
101
+ h("ion-button", { type: "submit", slot: "end", size: "default", disabled: this.assignmentLoading || !this.isAuthenticated() }, "Submit"))))))));
13
102
  }
14
103
  static get is() { return "sparkle-assignment"; }
15
104
  static get originalStyleUrls() { return {
@@ -18,8 +107,53 @@ export class SparkleAssignment {
18
107
  static get styleUrls() { return {
19
108
  "$": ["sparkle-assignment.css"]
20
109
  }; }
110
+ static get properties() { return {
111
+ "name": {
112
+ "type": "string",
113
+ "mutable": true,
114
+ "complexType": {
115
+ "original": "string",
116
+ "resolved": "string",
117
+ "references": {}
118
+ },
119
+ "required": false,
120
+ "optional": false,
121
+ "docs": {
122
+ "tags": [],
123
+ "text": ""
124
+ },
125
+ "attribute": "name",
126
+ "reflect": false
127
+ }
128
+ }; }
21
129
  static get states() { return {
22
- "submitted": {}
130
+ "submitted": {},
131
+ "assignmentLoading": {},
132
+ "errorMessage": {},
133
+ "successMessage": {}
23
134
  }; }
135
+ static get events() { return [{
136
+ "method": "formSubmitted",
137
+ "name": "formSubmitted",
138
+ "bubbles": true,
139
+ "cancelable": true,
140
+ "composed": true,
141
+ "docs": {
142
+ "tags": [],
143
+ "text": ""
144
+ },
145
+ "complexType": {
146
+ "original": "any",
147
+ "resolved": "any",
148
+ "references": {}
149
+ }
150
+ }]; }
24
151
  static get elementRef() { return "el"; }
152
+ static get listeners() { return [{
153
+ "name": "fileUploaded",
154
+ "method": "fileUploaded",
155
+ "target": undefined,
156
+ "capture": false,
157
+ "passive": false
158
+ }]; }
25
159
  }
@@ -18,15 +18,7 @@ export class SparkleFeedPost {
18
18
  this.postText = text;
19
19
  }
20
20
  isAuthenticated() {
21
- try {
22
- let token = TokenService.getInstance().getTokenSync();
23
- if (!!token) {
24
- return true;
25
- }
26
- }
27
- catch (_a) {
28
- return false;
29
- }
21
+ return TokenService.getInstance().isAuthenticated();
30
22
  }
31
23
  async submitPost() {
32
24
  this.postLoading = true;
@@ -82,7 +74,7 @@ export class SparkleFeedPost {
82
74
  }
83
75
  }
84
76
  selectFile() {
85
- var fileInput = document.getElementById('fileInput');
77
+ var fileInput = this.el.querySelector('#fileInput');
86
78
  fileInput.click();
87
79
  }
88
80
  renderUserInfo() {
@@ -0,0 +1,105 @@
1
+ import { Component, Element, Event, State, Prop, h, Host } from '@stencil/core';
2
+ import { MediaService } from '../../services/media.service';
3
+ export class SparkleFileUpload {
4
+ constructor() {
5
+ this.uploadImageLoading = false;
6
+ }
7
+ componentDidLoad() { }
8
+ async uploadImage(evt) {
9
+ this.uploadImageLoading = true;
10
+ var files = evt.target.files;
11
+ let result = await MediaService.getInstance().uploadImage(files);
12
+ if (result.Succeeded) {
13
+ console.log(result);
14
+ this.uploadImageLoading = false;
15
+ this.uploadedImage = result.Data.length > 0 ? result.Data[0].FullImageUrl : '';
16
+ this.value = this.uploadedImage;
17
+ this.fileUploaded.emit(this.uploadedImage);
18
+ }
19
+ else {
20
+ this.uploadImageLoading = false;
21
+ this.errorMessage = 'There is an error while uploading an image.';
22
+ }
23
+ }
24
+ selectFile() {
25
+ var fileInput = this.el.shadowRoot.querySelector('#fileInput');
26
+ fileInput.click();
27
+ }
28
+ render() {
29
+ return (h(Host, null,
30
+ this.uploadedImage ? (h("ion-item", { class: "ion-padding", lines: "none" },
31
+ h("img", { class: "uploaded-image", src: this.uploadedImage }))) : (''),
32
+ h("ion-item", { lines: "none" },
33
+ h("input", { type: "file", id: "fileInput", onChange: evt => this.uploadImage(evt), style: { display: 'none' }, accept: "image/*,application/pdf,application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint,text/plain" }),
34
+ this.uploadImageLoading ? h("ion-spinner", { color: "primary" }) : '',
35
+ h("ion-button", { slot: "start", onClick: evt => this.selectFile() },
36
+ h("ion-icon", { name: "add" }),
37
+ "Upload Image"))));
38
+ }
39
+ static get is() { return "sparkle-file-upload"; }
40
+ static get encapsulation() { return "shadow"; }
41
+ static get originalStyleUrls() { return {
42
+ "$": ["sparkle-file-upload.scss"]
43
+ }; }
44
+ static get styleUrls() { return {
45
+ "$": ["sparkle-file-upload.css"]
46
+ }; }
47
+ static get properties() { return {
48
+ "value": {
49
+ "type": "string",
50
+ "mutable": true,
51
+ "complexType": {
52
+ "original": "string",
53
+ "resolved": "string",
54
+ "references": {}
55
+ },
56
+ "required": false,
57
+ "optional": false,
58
+ "docs": {
59
+ "tags": [],
60
+ "text": ""
61
+ },
62
+ "attribute": "value",
63
+ "reflect": false
64
+ },
65
+ "name": {
66
+ "type": "string",
67
+ "mutable": true,
68
+ "complexType": {
69
+ "original": "string",
70
+ "resolved": "string",
71
+ "references": {}
72
+ },
73
+ "required": false,
74
+ "optional": false,
75
+ "docs": {
76
+ "tags": [],
77
+ "text": ""
78
+ },
79
+ "attribute": "name",
80
+ "reflect": false
81
+ }
82
+ }; }
83
+ static get states() { return {
84
+ "errorMessage": {},
85
+ "uploadedImage": {},
86
+ "uploadImageLoading": {}
87
+ }; }
88
+ static get events() { return [{
89
+ "method": "fileUploaded",
90
+ "name": "fileUploaded",
91
+ "bubbles": true,
92
+ "cancelable": true,
93
+ "composed": true,
94
+ "docs": {
95
+ "tags": [],
96
+ "text": ""
97
+ },
98
+ "complexType": {
99
+ "original": "any",
100
+ "resolved": "any",
101
+ "references": {}
102
+ }
103
+ }]; }
104
+ static get elementRef() { return "el"; }
105
+ }
@@ -0,0 +1,212 @@
1
+ import { Component, h, Event, Prop, Watch } from '@stencil/core';
2
+ export class SparkleInput {
3
+ arrayDataWatcher(newValue) {
4
+ if (typeof newValue === 'string') {
5
+ this._options = JSON.parse(newValue);
6
+ }
7
+ else {
8
+ this._options = newValue;
9
+ }
10
+ }
11
+ componentWillLoad() {
12
+ if (this.type == 'select') {
13
+ this.arrayDataWatcher(this.options);
14
+ }
15
+ }
16
+ handleChange(event) {
17
+ const value = this.type === 'checkbox' ? event.target.checked : event.target.value;
18
+ this.value = value;
19
+ this.valueChanged.emit(value);
20
+ if (this.type === 'checkbox') {
21
+ this.checkedChanged.emit(value);
22
+ }
23
+ }
24
+ render() {
25
+ switch (this.type) {
26
+ case 'text' || 'email' || 'number' || 'tel' || 'url':
27
+ return (h("div", null,
28
+ h("ion-item", null,
29
+ h("ion-label", null, this.label),
30
+ h("ion-input", { type: this.type, value: this.value, placeholder: this.placeholder, onInput: (event) => this.handleChange(event), required: true }))));
31
+ case 'textarea':
32
+ return (h("div", null,
33
+ h("ion-item", null,
34
+ h("ion-label", null, this.label),
35
+ h("ion-textarea", { value: this.value, placeholder: this.placeholder, onInput: (event) => this.handleChange(event), required: true }))));
36
+ case 'checkbox':
37
+ return (h("div", null,
38
+ h("ion-item", null,
39
+ h("ion-checkbox", { slot: "start", checked: this.checked, onChange: (event) => this.handleChange(event) }),
40
+ h("ion-label", null, this.label))));
41
+ case 'select':
42
+ return (h("div", null,
43
+ h("ion-item", null,
44
+ h("ion-select", { value: this.value, placeholder: this.label, onIonChange: event => this.handleChange(event) }, this._options.map(option => (h("ion-select-option", { key: option.value, value: option.value }, option.label)))))));
45
+ default:
46
+ return null;
47
+ }
48
+ }
49
+ static get is() { return "sparkle-input"; }
50
+ static get originalStyleUrls() { return {
51
+ "$": ["sparkle-input.scss"]
52
+ }; }
53
+ static get styleUrls() { return {
54
+ "$": ["sparkle-input.css"]
55
+ }; }
56
+ static get properties() { return {
57
+ "type": {
58
+ "type": "string",
59
+ "mutable": false,
60
+ "complexType": {
61
+ "original": "'text' | 'textarea' | 'checkbox' | 'select'",
62
+ "resolved": "\"checkbox\" | \"select\" | \"text\" | \"textarea\"",
63
+ "references": {}
64
+ },
65
+ "required": false,
66
+ "optional": false,
67
+ "docs": {
68
+ "tags": [],
69
+ "text": ""
70
+ },
71
+ "attribute": "type",
72
+ "reflect": false
73
+ },
74
+ "value": {
75
+ "type": "any",
76
+ "mutable": true,
77
+ "complexType": {
78
+ "original": "string | boolean",
79
+ "resolved": "boolean | string",
80
+ "references": {}
81
+ },
82
+ "required": false,
83
+ "optional": false,
84
+ "docs": {
85
+ "tags": [],
86
+ "text": ""
87
+ },
88
+ "attribute": "value",
89
+ "reflect": false
90
+ },
91
+ "label": {
92
+ "type": "string",
93
+ "mutable": false,
94
+ "complexType": {
95
+ "original": "string",
96
+ "resolved": "string",
97
+ "references": {}
98
+ },
99
+ "required": false,
100
+ "optional": false,
101
+ "docs": {
102
+ "tags": [],
103
+ "text": ""
104
+ },
105
+ "attribute": "label",
106
+ "reflect": false
107
+ },
108
+ "name": {
109
+ "type": "string",
110
+ "mutable": false,
111
+ "complexType": {
112
+ "original": "string",
113
+ "resolved": "string",
114
+ "references": {}
115
+ },
116
+ "required": false,
117
+ "optional": false,
118
+ "docs": {
119
+ "tags": [],
120
+ "text": ""
121
+ },
122
+ "attribute": "name",
123
+ "reflect": false
124
+ },
125
+ "placeholder": {
126
+ "type": "string",
127
+ "mutable": false,
128
+ "complexType": {
129
+ "original": "string",
130
+ "resolved": "string",
131
+ "references": {}
132
+ },
133
+ "required": false,
134
+ "optional": false,
135
+ "docs": {
136
+ "tags": [],
137
+ "text": ""
138
+ },
139
+ "attribute": "placeholder",
140
+ "reflect": false
141
+ },
142
+ "checked": {
143
+ "type": "boolean",
144
+ "mutable": false,
145
+ "complexType": {
146
+ "original": "boolean",
147
+ "resolved": "boolean",
148
+ "references": {}
149
+ },
150
+ "required": false,
151
+ "optional": false,
152
+ "docs": {
153
+ "tags": [],
154
+ "text": ""
155
+ },
156
+ "attribute": "checked",
157
+ "reflect": false
158
+ },
159
+ "options": {
160
+ "type": "string",
161
+ "mutable": false,
162
+ "complexType": {
163
+ "original": "{ value: string; label: string }[] | string",
164
+ "resolved": "string | { value: string; label: string; }[]",
165
+ "references": {}
166
+ },
167
+ "required": false,
168
+ "optional": false,
169
+ "docs": {
170
+ "tags": [],
171
+ "text": ""
172
+ },
173
+ "attribute": "options",
174
+ "reflect": false
175
+ }
176
+ }; }
177
+ static get events() { return [{
178
+ "method": "valueChanged",
179
+ "name": "valueChanged",
180
+ "bubbles": true,
181
+ "cancelable": true,
182
+ "composed": true,
183
+ "docs": {
184
+ "tags": [],
185
+ "text": ""
186
+ },
187
+ "complexType": {
188
+ "original": "string | boolean",
189
+ "resolved": "boolean | string",
190
+ "references": {}
191
+ }
192
+ }, {
193
+ "method": "checkedChanged",
194
+ "name": "checkedChanged",
195
+ "bubbles": true,
196
+ "cancelable": true,
197
+ "composed": true,
198
+ "docs": {
199
+ "tags": [],
200
+ "text": ""
201
+ },
202
+ "complexType": {
203
+ "original": "boolean",
204
+ "resolved": "boolean",
205
+ "references": {}
206
+ }
207
+ }]; }
208
+ static get watchers() { return [{
209
+ "propName": "options",
210
+ "methodName": "arrayDataWatcher"
211
+ }]; }
212
+ }
@@ -44,6 +44,17 @@ export class TokenService {
44
44
  }
45
45
  return null;
46
46
  }
47
+ isAuthenticated() {
48
+ try {
49
+ let token = this.getTokenSync();
50
+ if (!!token) {
51
+ return true;
52
+ }
53
+ }
54
+ catch (_a) {
55
+ return false;
56
+ }
57
+ }
47
58
  async getTokenExpiry() {
48
59
  let authUser = await get(AppConsts.AUTH_USER_LOCALSTORAGE);
49
60
  if (!authUser) {
@@ -1,7 +1,7 @@
1
1
  import { c as getAssetPath, h } from './index-c04b9ed5.js';
2
2
  import { r as remove, g as get } from './localstorage.service-4bf408c8.js';
3
- import { H as HttpService } from './httpService-db476835.js';
4
- import { T as TokenService, A as AppConsts } from './token.service-20f1a256.js';
3
+ import { H as HttpService } from './httpService-7986aeed.js';
4
+ import { T as TokenService, A as AppConsts } from './token.service-71a5d33f.js';
5
5
  import { A as AuthStore } from './auth.store-dba2c2da.js';
6
6
 
7
7
  //import * as abpTypings from '../lib/abp';
@@ -1,4 +1,4 @@
1
- import { H as HttpService } from './httpService-db476835.js';
1
+ import { H as HttpService } from './httpService-7986aeed.js';
2
2
  import { d as createStore } from './auth.store-dba2c2da.js';
3
3
  import { S as SparkleGlobal } from './util-57cc8006.js';
4
4
 
@@ -0,0 +1,17 @@
1
+ import { H as HttpService } from './httpService-7986aeed.js';
2
+
3
+ class AssignmentService {
4
+ constructor() { }
5
+ static getInstance() {
6
+ if (!AssignmentService.instance) {
7
+ AssignmentService.instance = new AssignmentService();
8
+ }
9
+ return AssignmentService.instance;
10
+ }
11
+ async createAssignment(payload) {
12
+ let result = await HttpService.http.post(`api/v1/Assignment/Create`, payload);
13
+ return result;
14
+ }
15
+ }
16
+
17
+ export { AssignmentService as A };
@@ -1,4 +1,4 @@
1
- import { H as HttpService } from './httpService-db476835.js';
1
+ import { H as HttpService } from './httpService-7986aeed.js';
2
2
  import { d as createStore } from './auth.store-dba2c2da.js';
3
3
 
4
4
  const { state, onChange } = createStore({
@@ -1,4 +1,4 @@
1
- import { H as HttpService } from './httpService-db476835.js';
1
+ import { H as HttpService } from './httpService-7986aeed.js';
2
2
  import { d as createStore } from './auth.store-dba2c2da.js';
3
3
 
4
4
  const { state, reset } = createStore({
@@ -9,22 +9,22 @@ import { f as findClosestIonContent, d as disableContentScrollY, r as resetConte
9
9
  import { i as isRTL } from './dir-03012648.js';
10
10
  import { S as SPINNERS } from './spinner-configs-a37e628a.js';
11
11
  import { A as ActiveRouter } from './active-router-fc9e4e06.js';
12
- import { i as initSetupConfig, A as AuthService, P as PrivateRoute, s as setupConfig } from './PrivateRoute-c6e80d5d.js';
12
+ import { i as initSetupConfig, A as AuthService, P as PrivateRoute, s as setupConfig } from './PrivateRoute-90ac95b8.js';
13
13
  import { A as AssetsService } from './assets.service-def1d63c.js';
14
14
  import { A as AuthStore, c as createCommonjsModule, g as getDefaultExportFromCjs, b as commonjsGlobal, T as TocStore } from './auth.store-dba2c2da.js';
15
- import { u as userStore, S as StudentService } from './student.service-6457aaa0.js';
15
+ import { u as userStore, S as StudentService } from './student.service-08af124f.js';
16
16
  import { E as EnvironmentConfigService } from './environment-config.service-b191f276.js';
17
17
  import { s as sample, S as SparkleGlobal$1, d as date, M as MyHealthTemplate, a as MyHealthTemplateJSON, b as MyMoodTemplate, c as MyMoodTemplateJSON } from './util-57cc8006.js';
18
- import { F as FacilitatorService, f as facilitatorStore } from './facilitator.service-53e05a01.js';
18
+ import { F as FacilitatorService, f as facilitatorStore } from './facilitator.service-18c47bdf.js';
19
19
  import { m as menuController } from './index-cded2d87.js';
20
- import { m as modalController, a as alertController, t as toastController } from './overlays-3b4dca92.js';
21
- import { S as SignalRService, s as signalRStore } from './signalR.service-4a2d5a92.js';
22
- import { H as HttpService } from './httpService-db476835.js';
23
- import { A as AppDataService, g as goalStore } from './appdata.service-d1058e00.js';
24
- import { F as FeedService, f as feedStore } from './feed.service-8385ad7a.js';
25
- import { M as MediaService, m as mediaStore } from './media.service-b68cbfff.js';
20
+ import { m as modalController, a as alertController, t as toastController } from './overlays-4233a39d.js';
21
+ import { S as SignalRService, s as signalRStore } from './signalR.service-c33fba50.js';
22
+ import { H as HttpService } from './httpService-7986aeed.js';
23
+ import { A as AppDataService, g as goalStore } from './appdata.service-2e84e167.js';
24
+ import { F as FeedService, f as feedStore } from './feed.service-b4f3cae4.js';
25
+ import { M as MediaService, m as mediaStore } from './media.service-6e90bc41.js';
26
26
  import { g as get$1 } from './localstorage.service-4bf408c8.js';
27
- import { A as AppConsts } from './token.service-20f1a256.js';
27
+ import { A as AppConsts } from './token.service-71a5d33f.js';
28
28
  import './hardware-back-button-fa04d6e9.js';
29
29
  import './animation-12377cb3.js';
30
30
 
@@ -1,7 +1,7 @@
1
1
  import { a as axios_1, u as utils, f as formats, s as sideChannel, T as TocStore } from './auth.store-dba2c2da.js';
2
- import { t as toastController } from './overlays-3b4dca92.js';
2
+ import { t as toastController } from './overlays-4233a39d.js';
3
3
  import { E as EnvironmentConfigService } from './environment-config.service-b191f276.js';
4
- import { T as TokenService } from './token.service-20f1a256.js';
4
+ import { T as TokenService } from './token.service-71a5d33f.js';
5
5
 
6
6
  var axios = axios_1;
7
7
 
package/dist/esm/index.js CHANGED
@@ -1,12 +1,12 @@
1
- export { A as AuthService, P as PrivateRoute, i as initSetupEnvironmentConfig, s as setupEnvironmentConfig } from './PrivateRoute-c6e80d5d.js';
1
+ export { A as AuthService, P as PrivateRoute, i as initSetupEnvironmentConfig, s as setupEnvironmentConfig } from './PrivateRoute-90ac95b8.js';
2
2
  export { E as EnvironmentConfigService } from './environment-config.service-b191f276.js';
3
3
  export { A as AssetsService } from './assets.service-def1d63c.js';
4
4
  export { A as AuthStore } from './auth.store-dba2c2da.js';
5
5
  import './index-c04b9ed5.js';
6
6
  import './localstorage.service-4bf408c8.js';
7
- import './httpService-db476835.js';
8
- import './overlays-3b4dca92.js';
7
+ import './httpService-7986aeed.js';
8
+ import './overlays-4233a39d.js';
9
9
  import './ionic-global-4903e23e.js';
10
10
  import './hardware-back-button-fa04d6e9.js';
11
11
  import './helpers-bf0e23d6.js';
12
- import './token.service-20f1a256.js';
12
+ import './token.service-71a5d33f.js';