commons-assessment 12.0.0

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 (100) hide show
  1. package/README.md +191 -0
  2. package/bundles/commons-assessment.umd.js +3968 -0
  3. package/bundles/commons-assessment.umd.js.map +1 -0
  4. package/commons-assessment.d.ts +5 -0
  5. package/esm2015/commons-assessment.js +5 -0
  6. package/esm2015/lib/commons-assessment.module.js +28 -0
  7. package/esm2015/lib/configuration.js +4 -0
  8. package/esm2015/lib/modules/assessment-maker/assessment-maker.component.js +409 -0
  9. package/esm2015/lib/modules/assessment-maker/assessment-maker.module.js +52 -0
  10. package/esm2015/lib/modules/assessment-maker/components/add-edit-section-introduction/add-edit-section-introduction.component.js +55 -0
  11. package/esm2015/lib/modules/assessment-maker/components/assessment-builder/assessment-builder.component.js +551 -0
  12. package/esm2015/lib/modules/assessment-maker/components/question-details/question-details.component.js +75 -0
  13. package/esm2015/lib/modules/assessment-maker/services/assessment-builder.service.js +150 -0
  14. package/esm2015/lib/modules/assessment-maker/services/assessment-maker.service.js +55 -0
  15. package/esm2015/lib/modules/assessment-taker/assessment-taker.component.js +618 -0
  16. package/esm2015/lib/modules/assessment-taker/assessment-taker.module.js +70 -0
  17. package/esm2015/lib/modules/assessment-taker/components/question-type-editor/question-type-editor.component.js +70 -0
  18. package/esm2015/lib/modules/assessment-taker/components/question-type-file-upload/question-type-file-upload.component.js +153 -0
  19. package/esm2015/lib/modules/assessment-taker/components/question-type-long/question-type-long.component.js +74 -0
  20. package/esm2015/lib/modules/assessment-taker/components/question-type-multiselect/question-type-multiselect.component.js +105 -0
  21. package/esm2015/lib/modules/assessment-taker/components/question-type-number/question-type-number.component.js +47 -0
  22. package/esm2015/lib/modules/assessment-taker/components/question-type-objective/question-type-objective.component.js +91 -0
  23. package/esm2015/lib/modules/assessment-taker/components/question-type-preference/question-type-preference.component.js +105 -0
  24. package/esm2015/lib/modules/assessment-taker/components/question-type-short/question-type-short.component.js +98 -0
  25. package/esm2015/lib/modules/assessment-taker/components/section-instructions/section-instructions.component.js +61 -0
  26. package/esm2015/lib/modules/assessment-taker/services/assessment-taker.service.js +58 -0
  27. package/esm2015/lib/modules/assessment-taker/services/response-builder.service.js +202 -0
  28. package/esm2015/lib/shared/components/text-editor/text-editor.component.js +119 -0
  29. package/esm2015/lib/shared/controllers.js +21 -0
  30. package/esm2015/lib/shared/interfaces/assessment.interface.js +2 -0
  31. package/esm2015/lib/shared/interfaces/question-paper.interface.js +2 -0
  32. package/esm2015/lib/shared/interfaces/question.interface.js +2 -0
  33. package/esm2015/lib/shared/material-modules.js +74 -0
  34. package/esm2015/lib/shared/pipes/order-by.pipe.js +25 -0
  35. package/esm2015/lib/shared/shared.module.js +48 -0
  36. package/esm2015/lib/shared/utils.js +16 -0
  37. package/esm2015/public-api.js +13 -0
  38. package/fesm2015/commons-assessment.js +3278 -0
  39. package/fesm2015/commons-assessment.js.map +1 -0
  40. package/lib/commons-assessment.module.d.ts +10 -0
  41. package/lib/configuration.d.ts +5 -0
  42. package/lib/modules/assessment-maker/assessment-maker.component.d.ts +64 -0
  43. package/lib/modules/assessment-maker/assessment-maker.module.d.ts +14 -0
  44. package/lib/modules/assessment-maker/components/add-edit-section-introduction/add-edit-section-introduction.component.d.ts +24 -0
  45. package/lib/modules/assessment-maker/components/assessment-builder/assessment-builder.component.d.ts +70 -0
  46. package/lib/modules/assessment-maker/components/question-details/question-details.component.d.ts +36 -0
  47. package/lib/modules/assessment-maker/services/assessment-builder.service.d.ts +43 -0
  48. package/lib/modules/assessment-maker/services/assessment-maker.service.d.ts +22 -0
  49. package/lib/modules/assessment-taker/assessment-taker.component.d.ts +81 -0
  50. package/lib/modules/assessment-taker/assessment-taker.module.d.ts +20 -0
  51. package/lib/modules/assessment-taker/components/question-type-editor/question-type-editor.component.d.ts +22 -0
  52. package/lib/modules/assessment-taker/components/question-type-file-upload/question-type-file-upload.component.d.ts +38 -0
  53. package/lib/modules/assessment-taker/components/question-type-long/question-type-long.component.d.ts +23 -0
  54. package/lib/modules/assessment-taker/components/question-type-multiselect/question-type-multiselect.component.d.ts +25 -0
  55. package/lib/modules/assessment-taker/components/question-type-number/question-type-number.component.d.ts +13 -0
  56. package/lib/modules/assessment-taker/components/question-type-objective/question-type-objective.component.d.ts +23 -0
  57. package/lib/modules/assessment-taker/components/question-type-preference/question-type-preference.component.d.ts +25 -0
  58. package/lib/modules/assessment-taker/components/question-type-short/question-type-short.component.d.ts +25 -0
  59. package/lib/modules/assessment-taker/components/section-instructions/section-instructions.component.d.ts +24 -0
  60. package/lib/modules/assessment-taker/services/assessment-taker.service.d.ts +20 -0
  61. package/lib/modules/assessment-taker/services/response-builder.service.d.ts +16 -0
  62. package/lib/shared/components/text-editor/text-editor.component.d.ts +24 -0
  63. package/lib/shared/controllers.d.ts +19 -0
  64. package/lib/shared/interfaces/assessment.interface.d.ts +133 -0
  65. package/lib/shared/interfaces/question-paper.interface.d.ts +73 -0
  66. package/lib/shared/interfaces/question.interface.d.ts +82 -0
  67. package/lib/shared/material-modules.d.ts +18 -0
  68. package/lib/shared/pipes/order-by.pipe.d.ts +7 -0
  69. package/lib/shared/shared.module.d.ts +12 -0
  70. package/lib/shared/utils.d.ts +2 -0
  71. package/package.json +22 -0
  72. package/public-api.d.ts +9 -0
  73. package/src/lib/assets/images/action-dots.svg +5 -0
  74. package/src/lib/assets/images/add-section.svg +4 -0
  75. package/src/lib/assets/images/arrow-down-black.svg +3 -0
  76. package/src/lib/assets/images/arrow-ramp-left.svg +3 -0
  77. package/src/lib/assets/images/close.svg +3 -0
  78. package/src/lib/assets/images/copy.svg +3 -0
  79. package/src/lib/assets/images/delete.svg +1 -0
  80. package/src/lib/assets/images/drag-drop.svg +8 -0
  81. package/src/lib/assets/images/file.svg +5 -0
  82. package/src/lib/assets/images/go-back.svg +3 -0
  83. package/src/lib/assets/images/info.svg +3 -0
  84. package/src/lib/assets/images/jpeg.svg +5 -0
  85. package/src/lib/assets/images/jpg.svg +5 -0
  86. package/src/lib/assets/images/keyboard.svg +3 -0
  87. package/src/lib/assets/images/no-questions.svg +14 -0
  88. package/src/lib/assets/images/pdf.svg +5 -0
  89. package/src/lib/assets/images/pencil.svg +3 -0
  90. package/src/lib/assets/images/plus-primary.svg +3 -0
  91. package/src/lib/assets/images/png.svg +5 -0
  92. package/src/lib/assets/images/svg.svg +5 -0
  93. package/src/lib/assets/json/imageConfig.json +22 -0
  94. package/src/lib/assets/json/labelConfig.json +96 -0
  95. package/src/lib/assets/json/question-builder-rules.json +97 -0
  96. package/src/lib/assets/json/questionTypes.json +50 -0
  97. package/src/lib/assets/theme/_theme.global.scss +63 -0
  98. package/src/lib/assets/theme/_theme.scss +568 -0
  99. package/src/lib/assets/theme/styles.global.scss +191 -0
  100. package/src/lib/assets/theme/styles.scss +63 -0
@@ -0,0 +1,191 @@
1
+ // =============================================================================
2
+ // GLOBAL stylesheet for commons-assessment library
3
+ //
4
+ // PURPOSE:
5
+ // 1. Override Angular Material component styles at the global scope.
6
+ // Material styles are injected globally, so overrides MUST also be
7
+ // global – they cannot live inside a component-scoped stylesheet.
8
+ //
9
+ // USAGE (consuming app's angular.json):
10
+ // "styles": [
11
+ // "node_modules/commons-assessment/src/lib/assets/theme/styles.global.css",
12
+ // "src/styles.scss"
13
+ // ]
14
+ // =============================================================================
15
+
16
+ // ---------------------------------------------------------------------------
17
+ // 1. Global Angular Material Overrides
18
+ //
19
+ // These selectors must be at the document root because Material renders its
20
+ // panels, dialogs, and menus in the CDK overlay container (appended to
21
+ // <body>), which is always outside the library component host element.
22
+ // ---------------------------------------------------------------------------
23
+
24
+ .assessment-dialog {
25
+ overflow: auto;
26
+
27
+ .mat-dialog-container {
28
+ padding: 0;
29
+ }
30
+
31
+ @extend .assessment-custom-scrollbar-thumb;
32
+ }
33
+
34
+ .assessment-dialog-slider-animation {
35
+ animation: slideInRight 0.3s ease-out forwards;
36
+ }
37
+
38
+ @keyframes slideInRight {
39
+ from {
40
+ transform: translateX(100%);
41
+ opacity: 0;
42
+ }
43
+
44
+ to {
45
+ transform: translateX(0);
46
+ opacity: 1;
47
+ }
48
+ }
49
+
50
+ .assessment-custom-scrollbar-thumb {
51
+ ::-webkit-scrollbar {
52
+ width: 0.4rem !important;
53
+ height: 0.4rem !important;
54
+ }
55
+
56
+ ::-webkit-scrollbar-track {
57
+ box-shadow: inset 0 0 6px var(--assessment-grey-four) !important;
58
+ border-radius: inherit !important;
59
+ }
60
+
61
+ ::-webkit-scrollbar-thumb {
62
+ background-color: var(--assessment-grey-six) !important;
63
+ border-radius: inherit !important;
64
+ }
65
+ }
66
+
67
+ .assessment-custom-angular-editor-white {
68
+ angular-editor {
69
+ .angular-editor {
70
+ gap: 0 !important;
71
+ }
72
+
73
+ .angular-editor-textarea {
74
+ outline: none !important;
75
+ background-color: var(--assessment-white) !important;
76
+ border-bottom-left-radius: 0.375rem !important;
77
+ border-bottom-right-radius: 0.375rem !important;
78
+ }
79
+
80
+ .angular-editor-toolbar {
81
+ background-color: var(--assessment-grey-one) !important;
82
+ border-bottom: 0 !important;
83
+ border-top-left-radius: 0.375rem;
84
+ border-top-right-radius: 0.375rem;
85
+ }
86
+
87
+ .angular-editor-button {
88
+ background-color: transparent !important;
89
+ border: 0 !important;
90
+ width: 1.8rem;
91
+ }
92
+
93
+ .angular-editor-toolbar-set {
94
+ .active {
95
+ background-color: var(--assessment-grey-four) !important;
96
+ border: 0.5px solid var(--assessment-grey-three) !important;
97
+ }
98
+ }
99
+ }
100
+
101
+ .ng-submitted {
102
+ angular-editor {
103
+ &.ng-invalid {
104
+ .angular-editor-textarea {
105
+ border-color: var(--assessment-danger) !important;
106
+ }
107
+ }
108
+ }
109
+ }
110
+ }
111
+
112
+ .assessment-panel {
113
+ .mat-expansion-panel-body {
114
+ padding: 0;
115
+ }
116
+ }
117
+
118
+ .assessment-spinner-primary circle {
119
+ stroke: var(--assessment-primary-one) !important;
120
+ }
121
+
122
+ .assessment-spinner-white circle {
123
+ stroke: var(--assessment-white) !important;
124
+ }
125
+
126
+ .assessment-mat-select {
127
+ .mat-select-trigger {
128
+ padding: var(--assessment-input-padding);
129
+ }
130
+ }
131
+
132
+ .assessment-tooltip {
133
+ font-family: var(--assessment-font-family);
134
+ font-weight: 500;
135
+ font-size: 0.8rem;
136
+ }
137
+
138
+ .assessment-mat-custom-tabs {
139
+
140
+ .mat-ink-bar {
141
+ background-color: var(--assessment-primary-one) !important;
142
+ height: 0.2rem;
143
+ }
144
+
145
+ .mat-tab-label.mat-focus-indicator.mat-tab-label.ng-star-inserted {
146
+ color: var(--assessment-grey-ten);
147
+ opacity: 1;
148
+ }
149
+
150
+ .mat-tab-label.mat-tab-label-active {
151
+ color: var(--assessment-primary-one) !important;
152
+ opacity: 1;
153
+ }
154
+ }
155
+
156
+ .assessment-radio-buttons {
157
+ .mat-radio-button {
158
+
159
+ &.mat-accent {
160
+ .mat-radio-inner-circle {
161
+ background-color: var(--assessment-primary-one) !important;
162
+ }
163
+
164
+ &.mat-radio-checked .mat-radio-outer-circle {
165
+ border-color: var(--assessment-primary-one) !important;
166
+ }
167
+ }
168
+ }
169
+ }
170
+
171
+ .assessment-checkboxes {
172
+
173
+ .mat-checkbox,
174
+ .mat-mdc-checkbox {
175
+
176
+ &.mat-accent {
177
+
178
+ &.mat-checkbox-checked .mat-checkbox-background,
179
+ &.mat-checkbox-indeterminate .mat-checkbox-background {
180
+ background-color: var(--assessment-primary-one) !important;
181
+ border-color: var(--assessment-primary-one) !important;
182
+ }
183
+ }
184
+ }
185
+ }
186
+
187
+ .assessment-marks-dropdown {
188
+ .mat-form-field-wrapper {
189
+ padding-bottom: 0;
190
+ }
191
+ }
@@ -0,0 +1,63 @@
1
+ // =============================================================================
2
+ // COMPONENT-SCOPED stylesheet for commons-assessment library
3
+ //
4
+ // This file is referenced via @use inside component.scss
5
+ // and therefore processed under Angular's view encapsulation.
6
+ //
7
+ // RULES HERE: only styles that target elements that live *inside* this
8
+ // library's own component templates. Do NOT put:
9
+ // - CSS custom property (:root) declarations → styles.global.scss
10
+ // - Angular Material overrides → styles.global.scss
11
+ // - @keyframes / panelClass dialog styles → styles.global.scss
12
+ // =============================================================================
13
+
14
+ @import './theme.scss';
15
+
16
+
17
+ .assessment-zoom-animation {
18
+ transition: transform 0.2s ease;
19
+ transform: translateZ(0);
20
+ text-rendering: optimizeLegibility;
21
+
22
+ &:hover {
23
+ transform: scale(1.03);
24
+ }
25
+
26
+ &:active {
27
+ transform: scale(1);
28
+ }
29
+
30
+ &:disabled {
31
+ transform: none !important;
32
+ }
33
+ }
34
+
35
+ .change-direction {
36
+ transform: rotate(180deg);
37
+ transition: 0.3s ease-out;
38
+ }
39
+
40
+ .change-direction-reverse {
41
+ transform: rotate(0deg);
42
+ transition: 0.3s ease-out;
43
+ }
44
+
45
+ .outline-0 {
46
+ outline: none;
47
+ }
48
+
49
+ .cursor-grab {
50
+ cursor: grab;
51
+ }
52
+
53
+ .cursor-pointer {
54
+ cursor: pointer;
55
+ }
56
+
57
+ .action-icon {
58
+ width: 1.2rem;
59
+ }
60
+
61
+ .mat-menu-item {
62
+ height: inherit;
63
+ }