@acorex-platform/module-assessment-management-client 0.0.38 → 0.0.48

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 (77) hide show
  1. package/fesm2022/{acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-BcpbQ8TJ.mjs → acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-CZtfv53E.mjs} +787 -91
  2. package/fesm2022/acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-CZtfv53E.mjs.map +1 -0
  3. package/fesm2022/{acorex-platform-module-assessment-management-client-assessment-voice.commands-DEcHphg8.mjs → acorex-platform-module-assessment-management-client-assessment-voice.commands-DvD4E7zS.mjs} +2 -2
  4. package/fesm2022/{acorex-platform-module-assessment-management-client-assessment-voice.commands-DEcHphg8.mjs.map → acorex-platform-module-assessment-management-client-assessment-voice.commands-DvD4E7zS.mjs.map} +1 -1
  5. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-assessment-case.mjs +20 -0
  6. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-assessment-case.mjs.map +1 -1
  7. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-assessment-session.mjs +20 -0
  8. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-assessment-session.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-question-bank-item.mjs +20 -0
  10. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-question-bank-item.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-questionnaire.mjs +243 -212
  12. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-questionnaire.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-template.mjs +774 -0
  14. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entities-template.mjs.map +1 -0
  15. package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-acorex-platform-module-assessment-management-client-contracts-entity-catalog-B8PJe3IJ.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-acorex-platform-module-assessment-management-client-contracts-entity-catalog-Pa8mdKRV.mjs} +12 -5
  16. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-acorex-platform-module-assessment-management-client-contracts-entity-catalog-Pa8mdKRV.mjs.map +1 -0
  17. package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-case.entity-DcRzvfKO.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-case.entity-DJeaqilT.mjs} +16 -2
  18. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-case.entity-DJeaqilT.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-pre-post.properties-DX_nB0QM.mjs +229 -0
  20. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-pre-post.properties-DX_nB0QM.mjs.map +1 -0
  21. package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-session.entity-Y0FU8X-e.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-session.entity-BSP4UQ47.mjs} +16 -2
  22. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-session.entity-BSP4UQ47.mjs.map +1 -0
  23. package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-question-bank-item.entity-CT913OrX.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-question-bank-item.entity-CVgepxbX.mjs} +16 -2
  24. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-question-bank-item.entity-CVgepxbX.mjs.map +1 -0
  25. package/fesm2022/{acorex-platform-module-assessment-management-client-contracts-entity-catalog-questionnaire.entity-C4hxiPTX.mjs → acorex-platform-module-assessment-management-client-contracts-entity-catalog-questionnaire.entity-8Dqdbm6i.mjs} +18 -217
  26. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-questionnaire.entity-8Dqdbm6i.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-template.entity-BTDJAnF1.mjs +493 -0
  28. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-template.entity-BTDJAnF1.mjs.map +1 -0
  29. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog.mjs +1 -1
  30. package/fesm2022/acorex-platform-module-assessment-management-client-contracts.mjs +105 -13
  31. package/fesm2022/acorex-platform-module-assessment-management-client-contracts.mjs.map +1 -1
  32. package/fesm2022/acorex-platform-module-assessment-management-client-create-form-template.command-DLC7aazI.mjs +44 -0
  33. package/fesm2022/acorex-platform-module-assessment-management-client-create-form-template.command-DLC7aazI.mjs.map +1 -0
  34. package/fesm2022/acorex-platform-module-assessment-management-client-design-form-template.command-Cgc9Inlz.mjs +97 -0
  35. package/fesm2022/acorex-platform-module-assessment-management-client-design-form-template.command-Cgc9Inlz.mjs.map +1 -0
  36. package/fesm2022/acorex-platform-module-assessment-management-client-designer.page-COXTLIgc.mjs +45 -0
  37. package/fesm2022/acorex-platform-module-assessment-management-client-designer.page-COXTLIgc.mjs.map +1 -0
  38. package/fesm2022/{acorex-platform-module-assessment-management-client-fill-assessment-session.command-lHYKxCXo.mjs → acorex-platform-module-assessment-management-client-fill-assessment-session.command-Dp6gSQWO.mjs} +2 -2
  39. package/fesm2022/{acorex-platform-module-assessment-management-client-fill-assessment-session.command-lHYKxCXo.mjs.map → acorex-platform-module-assessment-management-client-fill-assessment-session.command-Dp6gSQWO.mjs.map} +1 -1
  40. package/fesm2022/acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-B94T15Vb.mjs +238 -0
  41. package/fesm2022/acorex-platform-module-assessment-management-client-form-template-viewer-popup.component-B94T15Vb.mjs.map +1 -0
  42. package/fesm2022/acorex-platform-module-assessment-management-client-form-template-viewer.service-DpEeqw34.mjs +93 -0
  43. package/fesm2022/acorex-platform-module-assessment-management-client-form-template-viewer.service-DpEeqw34.mjs.map +1 -0
  44. package/fesm2022/acorex-platform-module-assessment-management-client-local-entities.mjs +1 -0
  45. package/fesm2022/acorex-platform-module-assessment-management-client-local-entities.mjs.map +1 -1
  46. package/fesm2022/acorex-platform-module-assessment-management-client-open-form-template.command-5E3IK-OG.mjs +55 -0
  47. package/fesm2022/acorex-platform-module-assessment-management-client-open-form-template.command-5E3IK-OG.mjs.map +1 -0
  48. package/fesm2022/acorex-platform-module-assessment-management-client-preview-form-template.command-COIcfqBQ.mjs +90 -0
  49. package/fesm2022/acorex-platform-module-assessment-management-client-preview-form-template.command-COIcfqBQ.mjs.map +1 -0
  50. package/fesm2022/{acorex-platform-module-assessment-management-client-preview-question.command-Db64SCn6.mjs → acorex-platform-module-assessment-management-client-preview-question.command-ZTIjmXdy.mjs} +2 -2
  51. package/fesm2022/{acorex-platform-module-assessment-management-client-preview-question.command-Db64SCn6.mjs.map → acorex-platform-module-assessment-management-client-preview-question.command-ZTIjmXdy.mjs.map} +1 -1
  52. package/fesm2022/{acorex-platform-module-assessment-management-client-preview-questionnaire.command-yOfBbOMK.mjs → acorex-platform-module-assessment-management-client-preview-questionnaire.command-CyiaPtLs.mjs} +2 -2
  53. package/fesm2022/{acorex-platform-module-assessment-management-client-preview-questionnaire.command-yOfBbOMK.mjs.map → acorex-platform-module-assessment-management-client-preview-questionnaire.command-CyiaPtLs.mjs.map} +1 -1
  54. package/fesm2022/{acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-B9iRaSSF.mjs → acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-CRRrPiJ9.mjs} +2 -2
  55. package/fesm2022/{acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-B9iRaSSF.mjs.map → acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-CRRrPiJ9.mjs.map} +1 -1
  56. package/fesm2022/{acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-B4JMc6ew.mjs → acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-Cn3kk7b6.mjs} +5 -3
  57. package/fesm2022/acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-Cn3kk7b6.mjs.map +1 -0
  58. package/fesm2022/{acorex-platform-module-assessment-management-client-review-assessment-session.command-si6-7hpg.mjs → acorex-platform-module-assessment-management-client-review-assessment-session.command-Cf6SKE8F.mjs} +2 -2
  59. package/fesm2022/{acorex-platform-module-assessment-management-client-review-assessment-session.command-si6-7hpg.mjs.map → acorex-platform-module-assessment-management-client-review-assessment-session.command-Cf6SKE8F.mjs.map} +1 -1
  60. package/fesm2022/acorex-platform-module-assessment-management-client-template-picker.component-RFv42PnE.mjs +260 -0
  61. package/fesm2022/acorex-platform-module-assessment-management-client-template-picker.component-RFv42PnE.mjs.map +1 -0
  62. package/fesm2022/acorex-platform-module-assessment-management-client-template-widget-edit.component-D3XNxDqe.mjs +107 -0
  63. package/fesm2022/acorex-platform-module-assessment-management-client-template-widget-edit.component-D3XNxDqe.mjs.map +1 -0
  64. package/fesm2022/{acorex-platform-module-assessment-management-client-view-session-answers.command-BUMtj_L6.mjs → acorex-platform-module-assessment-management-client-view-session-answers.command-DlnnmAlD.mjs} +2 -2
  65. package/fesm2022/{acorex-platform-module-assessment-management-client-view-session-answers.command-BUMtj_L6.mjs.map → acorex-platform-module-assessment-management-client-view-session-answers.command-DlnnmAlD.mjs.map} +1 -1
  66. package/fesm2022/acorex-platform-module-assessment-management-client.mjs +1 -1
  67. package/package.json +7 -3
  68. package/types/acorex-platform-module-assessment-management-client-contracts-entities-template.d.ts +5 -0
  69. package/types/acorex-platform-module-assessment-management-client-contracts.d.ts +139 -13
  70. package/types/acorex-platform-module-assessment-management-client.d.ts +3 -2
  71. package/fesm2022/acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-BcpbQ8TJ.mjs.map +0 -1
  72. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-acorex-platform-module-assessment-management-client-contracts-entity-catalog-B8PJe3IJ.mjs.map +0 -1
  73. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-case.entity-DcRzvfKO.mjs.map +0 -1
  74. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-assessment-session.entity-Y0FU8X-e.mjs.map +0 -1
  75. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-question-bank-item.entity-CT913OrX.mjs.map +0 -1
  76. package/fesm2022/acorex-platform-module-assessment-management-client-contracts-entity-catalog-questionnaire.entity-C4hxiPTX.mjs.map +0 -1
  77. package/fesm2022/acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-B4JMc6ew.mjs.map +0 -1
@@ -0,0 +1,774 @@
1
+ import { AXPWidgetsList } from '@acorex-platform/framework-shared/core';
2
+ import { AXPEntityCommandScope, createAllQueryView, createQueryView, entityMasterCrudActions, entityMasterRecordActions } from '@acorex-platform/framework-shared/entity';
3
+
4
+ const QUESTIONNAIRE_PRE_TITLE = '@assessment-management:questionnaires.entities.questionnaire.groups.pre-questionnaire';
5
+ const QUESTIONNAIRE_POST_TITLE = '@assessment-management:questionnaires.entities.questionnaire.groups.post-questionnaire';
6
+ /** Pre and post sections shared by questionnaires and form templates. */
7
+ function assessmentPrePostProperties(options) {
8
+ const preTitle = options?.preTitleKey ?? QUESTIONNAIRE_PRE_TITLE;
9
+ const postTitle = options?.postTitleKey ?? QUESTIONNAIRE_POST_TITLE;
10
+ return [
11
+ {
12
+ name: 'pre',
13
+ title: preTitle,
14
+ groupId: 'pre-questionnaire',
15
+ options: {
16
+ sort: { enabled: false },
17
+ filter: { advance: { enabled: false }, inline: { enabled: false } },
18
+ },
19
+ schema: {
20
+ dataType: 'object',
21
+ nullable: true,
22
+ defaultValue: { enabled: false },
23
+ interface: {
24
+ type: AXPWidgetsList.Layouts.GridLayout,
25
+ mode: 'edit',
26
+ options: {
27
+ grid: {
28
+ default: {
29
+ columns: 12,
30
+ gap: '1rem',
31
+ },
32
+ },
33
+ },
34
+ children: [
35
+ {
36
+ type: AXPWidgetsList.Layouts.GridItemLayout,
37
+ mode: 'edit',
38
+ options: { colSpan: 12 },
39
+ children: [
40
+ {
41
+ type: AXPWidgetsList.Layouts.FormField,
42
+ mode: 'edit',
43
+ options: {
44
+ label: '@assessment-management:questionnaires.entities.questionnaire.fields.pre-enabled.title',
45
+ showLabel: true,
46
+ },
47
+ children: [
48
+ {
49
+ type: AXPWidgetsList.Editors.ToggleSwitch,
50
+ path: 'pre.enabled',
51
+ mode: 'edit',
52
+ options: {
53
+ description: '@assessment-management:questionnaires.entities.questionnaire.fields.pre-enabled.description',
54
+ },
55
+ },
56
+ ],
57
+ },
58
+ ],
59
+ },
60
+ {
61
+ type: AXPWidgetsList.Layouts.GridItemLayout,
62
+ mode: 'edit',
63
+ options: {
64
+ colSpan: 12,
65
+ visible: `{{ context.eval('pre.enabled') === true }}`,
66
+ },
67
+ children: [
68
+ {
69
+ type: AXPWidgetsList.Layouts.FormField,
70
+ mode: 'edit',
71
+ options: {
72
+ label: '@assessment-management:questionnaires.entities.questionnaire.fields.pre-content.title',
73
+ showLabel: true,
74
+ },
75
+ children: [
76
+ {
77
+ type: AXPWidgetsList.Editors.RichText,
78
+ path: 'pre.content',
79
+ mode: 'edit',
80
+ options: {
81
+ placeholder: '@assessment-management:questionnaires.entities.questionnaire.fields.pre-content.placeholder',
82
+ },
83
+ },
84
+ ],
85
+ },
86
+ ],
87
+ },
88
+ ],
89
+ },
90
+ },
91
+ },
92
+ {
93
+ name: 'post',
94
+ title: postTitle,
95
+ groupId: 'post-questionnaire',
96
+ options: {
97
+ sort: { enabled: false },
98
+ filter: { advance: { enabled: false }, inline: { enabled: false } },
99
+ },
100
+ schema: {
101
+ dataType: 'object',
102
+ nullable: true,
103
+ defaultValue: { reviewEnabled: false, summaryEnabled: false, showOutcomeResults: false },
104
+ interface: {
105
+ type: AXPWidgetsList.Layouts.GridLayout,
106
+ mode: 'edit',
107
+ options: {
108
+ grid: {
109
+ default: {
110
+ columns: 12,
111
+ gap: '1rem',
112
+ },
113
+ },
114
+ },
115
+ children: [
116
+ {
117
+ type: AXPWidgetsList.Layouts.GridItemLayout,
118
+ mode: 'edit',
119
+ options: { colSpan: 4 },
120
+ children: [
121
+ {
122
+ type: AXPWidgetsList.Layouts.FormField,
123
+ mode: 'edit',
124
+ options: {
125
+ label: '@assessment-management:questionnaires.entities.questionnaire.fields.post-review-enabled.title',
126
+ showLabel: true,
127
+ },
128
+ children: [
129
+ {
130
+ type: AXPWidgetsList.Editors.ToggleSwitch,
131
+ path: 'post.reviewEnabled',
132
+ mode: 'edit',
133
+ options: {
134
+ description: '@assessment-management:questionnaires.entities.questionnaire.fields.post-review-enabled.description',
135
+ },
136
+ },
137
+ ],
138
+ },
139
+ ],
140
+ },
141
+ {
142
+ type: AXPWidgetsList.Layouts.GridItemLayout,
143
+ mode: 'edit',
144
+ options: { colSpan: 4 },
145
+ children: [
146
+ {
147
+ type: AXPWidgetsList.Layouts.FormField,
148
+ mode: 'edit',
149
+ options: {
150
+ label: '@assessment-management:questionnaires.entities.questionnaire.fields.post-summary-enabled.title',
151
+ showLabel: true,
152
+ },
153
+ children: [
154
+ {
155
+ type: AXPWidgetsList.Editors.ToggleSwitch,
156
+ path: 'post.summaryEnabled',
157
+ mode: 'edit',
158
+ options: {
159
+ description: '@assessment-management:questionnaires.entities.questionnaire.fields.post-summary-enabled.description',
160
+ },
161
+ },
162
+ ],
163
+ },
164
+ ],
165
+ },
166
+ {
167
+ type: AXPWidgetsList.Layouts.GridItemLayout,
168
+ mode: 'edit',
169
+ options: { colSpan: 4 },
170
+ children: [
171
+ {
172
+ type: AXPWidgetsList.Layouts.FormField,
173
+ mode: 'edit',
174
+ options: {
175
+ label: '@assessment-management:questionnaires.entities.questionnaire.fields.post-show-outcome-results.title',
176
+ showLabel: true,
177
+ },
178
+ children: [
179
+ {
180
+ type: AXPWidgetsList.Editors.ToggleSwitch,
181
+ path: 'post.showOutcomeResults',
182
+ mode: 'edit',
183
+ options: {
184
+ description: '@assessment-management:questionnaires.entities.questionnaire.fields.post-show-outcome-results.description',
185
+ },
186
+ },
187
+ ],
188
+ },
189
+ ],
190
+ },
191
+ {
192
+ type: AXPWidgetsList.Layouts.GridItemLayout,
193
+ mode: 'edit',
194
+ options: {
195
+ colSpan: 12,
196
+ visible: `{{ context.eval('post.summaryEnabled') === true }}`,
197
+ },
198
+ children: [
199
+ {
200
+ type: AXPWidgetsList.Layouts.FormField,
201
+ mode: 'edit',
202
+ options: {
203
+ label: '@assessment-management:questionnaires.entities.questionnaire.fields.post-summary-content.title',
204
+ showLabel: true,
205
+ },
206
+ children: [
207
+ {
208
+ type: AXPWidgetsList.Editors.RichText,
209
+ path: 'post.summaryContent',
210
+ mode: 'edit',
211
+ options: {
212
+ placeholder: '@assessment-management:questionnaires.entities.questionnaire.fields.post-summary-content.placeholder',
213
+ },
214
+ },
215
+ ],
216
+ },
217
+ ],
218
+ },
219
+ ],
220
+ },
221
+ },
222
+ },
223
+ ];
224
+ }
225
+
226
+ /** Component key for the questionnaire Outcomes page tab. Register via AXP_PAGE_COMPONENT_PROVIDER. */
227
+ const QUESTIONNAIRE_OUTCOMES_PAGE_COMPONENT_KEY = 'questionnaire-outcomes-page';
228
+
229
+ //#region ---- Root Configuration ----
230
+ const config = { i18n: 'assessment-management', module: 'AssessmentManagement' };
231
+ const RootConfig = {
232
+ config,
233
+ module: {
234
+ module: 'assessment-management',
235
+ route: 'assessment-management',
236
+ name: 'AssessmentManagement',
237
+ title: '@assessment-management:module.title',
238
+ icon: 'fa-light fa-clipboard-list-check',
239
+ },
240
+ entities: {
241
+ questionBankItem: {
242
+ name: 'QuestionBankItem',
243
+ title: '@assessment-management:question-bank.entities.question-bank-item.title',
244
+ titlePlural: '@assessment-management:question-bank.entities.question-bank-item.plural',
245
+ icon: 'fa-light fa-question-circle',
246
+ },
247
+ questionnaire: {
248
+ name: 'Questionnaire',
249
+ title: '@assessment-management:questionnaires.entities.questionnaire.title',
250
+ titlePlural: '@assessment-management:questionnaires.entities.questionnaire.plural',
251
+ icon: 'fa-light fa-clipboard-list',
252
+ },
253
+ assessmentCase: {
254
+ name: 'AssessmentCase',
255
+ title: '@assessment-management:cases.entities.assessment-case.title',
256
+ titlePlural: '@assessment-management:cases.entities.assessment-case.plural',
257
+ icon: 'fa-light fa-briefcase',
258
+ },
259
+ assessmentSession: {
260
+ name: 'AssessmentSession',
261
+ title: '@assessment-management:sessions.entities.assessment-session.title',
262
+ titlePlural: '@assessment-management:sessions.entities.assessment-session.plural',
263
+ icon: 'fa-light fa-clipboard-check',
264
+ },
265
+ template: {
266
+ name: 'Template',
267
+ title: '@form-template-management:templates.entities.template.title',
268
+ source: `${config.module}.Template`,
269
+ icon: 'fa-light fa-file-code',
270
+ },
271
+ },
272
+ queries: {
273
+ dashboard: {
274
+ overdueAssessmentsKpi: `${config.module}:Dashboard:OverdueAssessmentsKpi`,
275
+ pendingAssessmentsKpi: `${config.module}:Dashboard:PendingAssessmentsKpi`,
276
+ myAssessmentsKpi: `${config.module}:Dashboard:MyAssessmentsKpi`,
277
+ assessmentsWeekLine: `${config.module}:Dashboard:AssessmentsWeekLine`,
278
+ },
279
+ },
280
+ };
281
+ //#endregion
282
+
283
+ const AXMFormTemplateTypes = {
284
+ Form: {
285
+ id: 10,
286
+ title: '@form-template-management:templates.entities.template.fields.type.options.form',
287
+ },
288
+ Widget: {
289
+ id: 20,
290
+ title: '@form-template-management:templates.entities.template.fields.type.options.widget',
291
+ },
292
+ Report: {
293
+ id: 30,
294
+ title: '@form-template-management:templates.entities.template.fields.type.options.report',
295
+ },
296
+ };
297
+
298
+ async function factoryTemplate() {
299
+ const i18n = 'form-template-management';
300
+ const previewAction = {
301
+ title: `@${i18n}:templates.entities.template.actions.preview.title`,
302
+ command: {
303
+ name: `${RootConfig.module.name}.${RootConfig.entities.template.name}:Preview`,
304
+ options: {
305
+ templateId: '{{ context.eval("id") }}',
306
+ templateTitle: '{{ context.eval("title", { pipes: ["translate"] }) }}',
307
+ },
308
+ },
309
+ priority: 'primary',
310
+ type: 'action',
311
+ icon: 'fa-light fa-eye',
312
+ scope: AXPEntityCommandScope.Individual,
313
+ };
314
+ const entityDef = {
315
+ plugins: [
316
+ { name: 'identifier', options: { field: 'code', rule: 'form-template' } },
317
+ { name: 'history' },
318
+ { name: 'lock' },
319
+ { name: 'compare' },
320
+ // { name: 'comments' },
321
+ { name: 'category' },
322
+ { name: 'clone' },
323
+ { name: 'archive' },
324
+ ],
325
+ module: RootConfig.module.name,
326
+ name: RootConfig.entities.template.name,
327
+ title: RootConfig.entities.template.title,
328
+ icon: RootConfig.entities.template.icon,
329
+ searchTags: [
330
+ 'form-template',
331
+ 'template',
332
+ 'templates',
333
+ 'form-designer',
334
+ 'widget',
335
+ 'dynamic-form',
336
+ 'layout-design',
337
+ 'form-builder',
338
+ 'قالب',
339
+ 'قالب‌ها',
340
+ 'قالب فرم',
341
+ 'مدیریت قالب فرم',
342
+ 'طراح فرم',
343
+ ],
344
+ formats: {
345
+ individual: '@form-template-management:templates.entities.template.title',
346
+ plural: '@form-template-management:templates.terms.templates',
347
+ searchResult: {
348
+ title: '{{ title }}',
349
+ description: RootConfig.module.title,
350
+ },
351
+ },
352
+ relatedEntities: [],
353
+ pages: [
354
+ {
355
+ componentKey: QUESTIONNAIRE_OUTCOMES_PAGE_COMPONENT_KEY,
356
+ field: 'outcomes',
357
+ title: '@assessment-management:questionnaires.entities.questionnaire.fields.outcomes.title',
358
+ icon: 'fa-light fa-calculator',
359
+ layout: { order: 2, position: 'after' },
360
+ appearOn: { create: true, update: true },
361
+ options: {
362
+ entity: RootConfig.entities.template.source,
363
+ },
364
+ },
365
+ ],
366
+ groups: [
367
+ {
368
+ id: 'basic-info',
369
+ title: '@general:terms.interface.basic-info',
370
+ },
371
+ {
372
+ id: 'template-content',
373
+ title: `@${i18n}:designer.terms.designer`,
374
+ },
375
+ {
376
+ id: 'pre-questionnaire',
377
+ title: `@${i18n}:templates.entities.template.groups.pre-form`,
378
+ },
379
+ {
380
+ id: 'post-questionnaire',
381
+ title: `@${i18n}:templates.entities.template.groups.post-form`,
382
+ },
383
+ ],
384
+ properties: [
385
+ {
386
+ name: 'code',
387
+ title: `@general:terms.common.code`,
388
+ groupId: 'basic-info',
389
+ options: {
390
+ filter: {
391
+ inline: { enabled: true },
392
+ advance: { enabled: true }
393
+ },
394
+ sort: {
395
+ enabled: true,
396
+ },
397
+ },
398
+ schema: {
399
+ dataType: 'string',
400
+ interface: {
401
+ type: AXPWidgetsList.Editors.TextBox,
402
+ },
403
+ },
404
+ validations: [
405
+ {
406
+ rule: 'required',
407
+ },
408
+ ],
409
+ },
410
+ {
411
+ name: 'title',
412
+ title: '@general:terms.common.title',
413
+ groupId: 'basic-info',
414
+ options: {
415
+ filter: {
416
+ inline: { enabled: true },
417
+ advance: { enabled: true }
418
+ },
419
+ sort: {
420
+ enabled: true,
421
+ },
422
+ },
423
+ schema: {
424
+ dataType: 'string',
425
+ interface: {
426
+ type: AXPWidgetsList.Editors.TextBox,
427
+ },
428
+ },
429
+ validations: [
430
+ {
431
+ rule: 'required',
432
+ },
433
+ {
434
+ rule: 'minLength',
435
+ options: {
436
+ value: 3,
437
+ },
438
+ },
439
+ {
440
+ rule: 'maxLength',
441
+ options: {
442
+ value: 50,
443
+ },
444
+ },
445
+ ],
446
+ },
447
+ {
448
+ name: 'type',
449
+ title: '@general:terms.common.type',
450
+ groupId: 'basic-info',
451
+ options: {
452
+ filter: {
453
+ inline: { enabled: true },
454
+ advance: { enabled: true }
455
+ },
456
+ sort: {
457
+ enabled: true,
458
+ },
459
+ },
460
+ schema: {
461
+ dataType: 'string',
462
+ defaultValue: AXMFormTemplateTypes.Form,
463
+ interface: {
464
+ type: AXPWidgetsList.Editors.SelectBox,
465
+ options: {
466
+ valueField: 'id',
467
+ textField: 'title',
468
+ dataSource: [AXMFormTemplateTypes.Form, AXMFormTemplateTypes.Widget],
469
+ multiple: false,
470
+ },
471
+ },
472
+ },
473
+ validations: [
474
+ {
475
+ rule: 'required',
476
+ },
477
+ ],
478
+ },
479
+ {
480
+ name: 'template',
481
+ title: `@${i18n}:templates.entities.template.fields.template.title`,
482
+ groupId: 'template-content',
483
+ schema: {
484
+ dataType: 'string',
485
+ interface: {
486
+ type: AXPWidgetsList.Templates.Designer,
487
+ },
488
+ },
489
+ },
490
+ ...assessmentPrePostProperties({
491
+ preTitleKey: `@${i18n}:templates.entities.template.groups.pre-form`,
492
+ postTitleKey: `@${i18n}:templates.entities.template.groups.post-form`,
493
+ }),
494
+ ],
495
+ columns: [
496
+ { name: 'code' },
497
+ { name: 'title' },
498
+ { name: 'type' },
499
+ ],
500
+ interfaces: {
501
+ master: {
502
+ create: {
503
+ sections: [
504
+ {
505
+ id: 'basic-info',
506
+ },
507
+ {
508
+ id: 'template-content',
509
+ layout: {
510
+ label: {
511
+ visible: true,
512
+ },
513
+ },
514
+ },
515
+ { id: 'pre-questionnaire' },
516
+ { id: 'post-questionnaire' },
517
+ ],
518
+ properties: [
519
+ {
520
+ name: 'code',
521
+ layout: {
522
+ positions: {
523
+ lg: {
524
+ colSpan: 6,
525
+ order: 1,
526
+ },
527
+ },
528
+ },
529
+ },
530
+ {
531
+ name: 'title',
532
+ layout: {
533
+ positions: {
534
+ lg: {
535
+ colSpan: 6,
536
+ order: 2,
537
+ },
538
+ },
539
+ },
540
+ },
541
+ {
542
+ name: 'type',
543
+ layout: {
544
+ positions: {
545
+ lg: {
546
+ colSpan: 6,
547
+ order: 3,
548
+ },
549
+ },
550
+ },
551
+ },
552
+ {
553
+ name: 'template',
554
+ layout: {
555
+ label: {
556
+ visible: false,
557
+ },
558
+ positions: {
559
+ lg: {
560
+ colSpan: 12,
561
+ order: 4,
562
+ },
563
+ },
564
+ },
565
+ },
566
+ { name: 'pre', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 5 } } } },
567
+ { name: 'post', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 6 } } } },
568
+ ],
569
+ },
570
+ update: {
571
+ sections: [
572
+ {
573
+ id: 'basic-info',
574
+ },
575
+ {
576
+ id: 'template-content',
577
+ layout: {
578
+ label: {
579
+ visible: true,
580
+ },
581
+ },
582
+ },
583
+ { id: 'pre-questionnaire' },
584
+ { id: 'post-questionnaire' },
585
+ ],
586
+ properties: [
587
+ {
588
+ name: 'code',
589
+ layout: {
590
+ positions: {
591
+ lg: {
592
+ colSpan: 6,
593
+ order: 1,
594
+ },
595
+ },
596
+ },
597
+ },
598
+ {
599
+ name: 'title',
600
+ layout: {
601
+ positions: {
602
+ lg: {
603
+ colSpan: 6,
604
+ order: 2,
605
+ },
606
+ },
607
+ },
608
+ },
609
+ {
610
+ name: 'type',
611
+ layout: {
612
+ positions: {
613
+ lg: {
614
+ colSpan: 6,
615
+ order: 3,
616
+ },
617
+ },
618
+ },
619
+ },
620
+ {
621
+ name: 'template',
622
+ layout: {
623
+ label: {
624
+ visible: false,
625
+ },
626
+ positions: {
627
+ lg: {
628
+ colSpan: 12,
629
+ order: 4,
630
+ },
631
+ },
632
+ },
633
+ },
634
+ { name: 'pre', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 5 } } } },
635
+ { name: 'post', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 6 } } } },
636
+ ],
637
+ },
638
+ single: {
639
+ title: '{{title}}',
640
+ sections: [
641
+ {
642
+ id: 'basic-info',
643
+ layout: {
644
+ positions: {
645
+ lg: {
646
+ colSpan: 12,
647
+ },
648
+ },
649
+ },
650
+ },
651
+ {
652
+ id: 'template-content',
653
+ layout: {
654
+ label: {
655
+ visible: false,
656
+ },
657
+ positions: {
658
+ lg: {
659
+ colSpan: 12,
660
+ },
661
+ },
662
+ },
663
+ },
664
+ { id: 'pre-questionnaire', layout: { positions: { lg: { colSpan: 12 } } } },
665
+ { id: 'post-questionnaire', layout: { positions: { lg: { colSpan: 12 } } } },
666
+ ],
667
+ properties: [
668
+ {
669
+ name: 'code',
670
+ layout: {
671
+ positions: {
672
+ lg: {
673
+ colSpan: 6,
674
+ order: 1,
675
+ },
676
+ },
677
+ },
678
+ },
679
+ {
680
+ name: 'title',
681
+ layout: {
682
+ positions: {
683
+ lg: {
684
+ colSpan: 6,
685
+ order: 2,
686
+ },
687
+ },
688
+ },
689
+ },
690
+ {
691
+ name: 'type',
692
+ layout: {
693
+ positions: {
694
+ lg: {
695
+ colSpan: 6,
696
+ order: 3,
697
+ },
698
+ },
699
+ },
700
+ },
701
+ {
702
+ name: 'template',
703
+ layout: {
704
+ label: {
705
+ visible: false,
706
+ },
707
+ positions: {
708
+ lg: {
709
+ colSpan: 12,
710
+ order: 4,
711
+ },
712
+ },
713
+ },
714
+ },
715
+ { name: 'pre', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 5 } } } },
716
+ { name: 'post', layout: { label: { visible: false }, positions: { lg: { colSpan: 12, order: 6 } } } },
717
+ ],
718
+ actions: [
719
+ ...entityMasterRecordActions(),
720
+ previewAction,
721
+ ],
722
+ },
723
+ list: {
724
+ actions: [
725
+ ...entityMasterCrudActions(),
726
+ {
727
+ title: '@general:actions.configuration.design.title',
728
+ command: 'design-form-template',
729
+ priority: 'primary',
730
+ type: 'design',
731
+ scope: AXPEntityCommandScope.Individual,
732
+ },
733
+ previewAction,
734
+ ],
735
+ views: [
736
+ createAllQueryView({ sorts: [{ name: 'title', dir: 'asc' }] }),
737
+ createQueryView('forms', `@${i18n}:templates.menus.forms.title`, true, {
738
+ conditions: [
739
+ {
740
+ name: 'type.id',
741
+ operator: {
742
+ type: 'equal',
743
+ },
744
+ value: 10,
745
+ hidden: true,
746
+ },
747
+ ],
748
+ }),
749
+ createQueryView('widgets', `@${i18n}:templates.menus.widgets.title`, true, {
750
+ conditions: [
751
+ {
752
+ name: 'type.id',
753
+ operator: {
754
+ type: 'equal',
755
+ },
756
+ value: 20,
757
+ hidden: true,
758
+ },
759
+ ],
760
+ }),
761
+ ],
762
+ },
763
+ },
764
+ },
765
+ };
766
+ return entityDef;
767
+ }
768
+
769
+ /**
770
+ * Generated bundle index. Do not edit.
771
+ */
772
+
773
+ export { factoryTemplate };
774
+ //# sourceMappingURL=acorex-platform-module-assessment-management-client-contracts-entities-template.mjs.map