@colijnit/sharedcomponents 254.1.3 → 254.1.5

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 (37) hide show
  1. package/bundles/colijnit-sharedcomponents.umd.js +909 -125
  2. package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
  3. package/colijnit-sharedcomponents.d.ts +45 -45
  4. package/colijnit-sharedcomponents.metadata.json +1 -1
  5. package/esm2015/colijnit-sharedcomponents.js +46 -46
  6. package/esm2015/lib/components/role-email-selector/role-email-selector.component.js +112 -0
  7. package/esm2015/lib/components/role-email-selector/role-email-selector.module.js +29 -0
  8. package/esm2015/lib/components/task-creator/task-creator.component.js +330 -0
  9. package/esm2015/lib/components/task-creator/task-creator.module.js +37 -0
  10. package/esm2015/lib/enum/icon.enum.js +2 -1
  11. package/esm2015/lib/model/icon-svg.js +2 -1
  12. package/esm2015/lib/service/shared-connector.service.js +117 -3
  13. package/esm2015/lib/service/shared.service.js +69 -4
  14. package/esm2015/public-api.js +5 -1
  15. package/fesm2015/colijnit-sharedcomponents.js +662 -9
  16. package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
  17. package/index.html +2 -2
  18. package/lib/components/role-email-selector/role-email-selector.component.d.ts +29 -0
  19. package/lib/components/role-email-selector/role-email-selector.module.d.ts +2 -0
  20. package/lib/components/role-email-selector/style/_layout.scss +40 -0
  21. package/lib/components/role-email-selector/style/_material-definition.scss +15 -0
  22. package/lib/components/role-email-selector/style/_theme.scss +4 -0
  23. package/lib/components/role-email-selector/style/material.scss +4 -0
  24. package/lib/components/task-creator/style/_layout.scss +18 -0
  25. package/lib/components/task-creator/style/_material-definition.scss +0 -0
  26. package/lib/components/task-creator/style/_theme.scss +4 -0
  27. package/lib/components/task-creator/style/material.scss +4 -0
  28. package/lib/components/task-creator/task-creator.component.d.ts +68 -0
  29. package/lib/components/task-creator/task-creator.module.d.ts +2 -0
  30. package/lib/enum/icon.enum.d.ts +1 -0
  31. package/lib/service/shared-connector.service.d.ts +16 -1
  32. package/lib/service/shared.service.d.ts +17 -1
  33. package/main.9761831eb5f539b50eb2.js +1 -0
  34. package/package.json +3 -3
  35. package/public-api.d.ts +4 -0
  36. package/{styles.051675db76590b099897.css → styles.ccda7309f28016f3304b.css} +1 -1
  37. package/main.b62bfdc80736ecda90e4.js +0 -1
@@ -1,6 +1,6 @@
1
1
  import { __awaiter, __decorate } from 'tslib';
2
2
  import * as i0 from '@angular/core';
3
- import { EventEmitter, Component, ViewEncapsulation, ViewChild, ElementRef, Input, Output, HostBinding, NgModule, Injectable, ChangeDetectorRef, ViewChildren, HostListener, Pipe, Renderer2, Inject, LOCALE_ID, NgZone, Directive, ViewContainerRef, ComponentFactoryResolver, forwardRef, ContentChild } from '@angular/core';
3
+ import { EventEmitter, Component, ViewEncapsulation, ViewChild, ElementRef, Input, Output, HostBinding, NgModule, Injectable, ChangeDetectorRef, Inject, LOCALE_ID, ViewChildren, HostListener, Pipe, Renderer2, NgZone, Directive, ViewContainerRef, ComponentFactoryResolver, forwardRef, ContentChild } from '@angular/core';
4
4
  import { trigger, state, style, transition, animate } from '@angular/animations';
5
5
  import { PDFDocument } from 'pdf-lib';
6
6
  import * as PDFJS from 'pdfjs-dist/legacy/build/pdf';
@@ -32,6 +32,11 @@ import { CoDomainValue } from '@colijnit/mainapi/build/model/co-domain-value.bo'
32
32
  import { RoleEmailaddress } from '@colijnit/mainapi/build/model/role-email-address';
33
33
  import { Activity } from '@colijnit/mainapi/build/model/activity.bo';
34
34
  import { WorkflowProcessInfoPerStatus } from '@colijnit/mainapi/build/model/workflow-process-info-per-status';
35
+ import { RelationSmallObject } from '@colijnit/mainapi/build/model/relation-small-object.bo';
36
+ import { Report } from '@colijnit/mainapi/build/model/report.bo';
37
+ import { Work } from '@colijnit/mainapi/build/model/work.bo';
38
+ import { Remark } from '@colijnit/mainapi/build/model/remark.bo';
39
+ import { Task } from '@colijnit/mainapi/build/model/task.bo';
35
40
  import { PrintStockStickers } from '@colijnit/sharedapi/build/model/print-stock-stickers';
36
41
  import { ArticleExtended } from '@colijnit/articleapi/build/model/article-extended.bo';
37
42
  import { ArticleStock as ArticleStock$1 } from '@colijnit/articleapi/build/model/article-stock';
@@ -39,13 +44,15 @@ import { ArticleExtendedRequest } from '@colijnit/articleapi/build/model/article
39
44
  import * as i1 from '@angular/platform-browser';
40
45
  import { DomSanitizer } from '@angular/platform-browser';
41
46
  import { ArticleStockManagement } from '@colijnit/articleapi/build/model/article-stock-management';
42
- import { IconModule, InputCheckboxModule, CoDialogModule, ButtonModule, ListOfValuesModule, OverlayService, ClickoutsideModule, OverlayModule, InputRadioButtonModule, SimpleGridModule, ImageModule, InputTextModule, InputNumberPickerModule, CoDialogWizardModule, InputTextareaModule, PopupModule, InputDatePickerModule, ResponsiveTextModule, InputSearchModule, PromptService, FormComponent, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, CoOrientation, CoreComponentsTranslationModule, TemplateWrapperModule, FormModule, ScreenConfigurationModule, FormMasterService, IconCacheService as IconCacheService$1, CoreDialogService, InputDateRangePickerModule, CollapsibleModule, ColorSequenceService } from '@colijnit/corecomponents_v12';
47
+ import { IconModule, InputCheckboxModule, CoDialogModule, ButtonModule, ListOfValuesModule, OverlayService, ClickoutsideModule, OverlayModule, InputRadioButtonModule, SimpleGridModule, ImageModule, InputTextModule, InputNumberPickerModule, CoDialogWizardModule, InputTextareaModule, PopupModule, InputDatePickerModule, ResponsiveTextModule, InputSearchModule, PromptService, FormComponent, SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, CoOrientation, CoreComponentsTranslationModule, TemplateWrapperModule, FormModule, ScreenConfigurationModule, FormMasterService, IconCacheService as IconCacheService$1, CoreDialogService, InputDateRangePickerModule, CollapsibleModule, ColorSequenceService, ListOfIconsModule } from '@colijnit/corecomponents_v12';
43
48
  import { ArticleTransaction as ArticleTransaction$1 } from '@colijnit/articleapi/build/model/article-transaction';
44
49
  import { PrintPriceStickers } from '@colijnit/sharedapi/build/model/print-price-stickers.bo';
50
+ import { SelectReportTemplatesRequest } from '@colijnit/mainapi/build/model/select-report-templates-request';
51
+ import { SendMethodType } from '@colijnit/mainapi/build/enum/send-method-type.enum';
52
+ import { EmailJob } from '@colijnit/mainapi/build/model/email-job';
45
53
  import { ReportingDocumentEmailSignDocBaseRequest } from '@colijnit/mainapi/build/model/reporting-document-email-sign-doc-base-request';
46
54
  import { ReportingDocumentPdfBaseRequest } from '@colijnit/mainapi/build/model/reporting-document-pdf-base-request';
47
55
  import { ReportingDocumentPrintSignDocBaseRequest } from '@colijnit/mainapi/build/model/reporting-document-print-sign-doc-base-request';
48
- import { SendMethodType } from '@colijnit/mainapi/build/enum/send-method-type.enum';
49
56
  import { GetStockHistoryRequest } from '@colijnit/articleapi/build/model/get-stock-history-request';
50
57
  import { Chart, DoughnutController, ArcElement } from 'chart.js';
51
58
  import * as moment from 'moment';
@@ -68,7 +75,6 @@ import { ActivityListViewModel } from '@colijnit/mainapi/build/model/activity-li
68
75
  import { ActivityViewModel } from '@colijnit/mainapi/build/model/activity-view-model';
69
76
  import { PersonalActivityTabEnum } from '@colijnit/mainapi/build/enum/personal-activity-tab.enum';
70
77
  import { ActivitySortType } from '@colijnit/mainapi/build/enum/activity-sort-type.enum';
71
- import { Task } from '@colijnit/mainapi/build/model/task.bo';
72
78
  import { TableName as TableName$1 } from '@colijnit/mainapi/build/enum/table-name.enum';
73
79
  import { TagCategory } from '@colijnit/mainapi/build/enum/tab-category.enum';
74
80
  import { ValidationResult } from '@colijnit/ioneconnector/build/model/validation-result';
@@ -76,6 +82,9 @@ import { DomainName } from '@colijnit/mainapi/build/enum/domain-name.enum';
76
82
  import { PriorityType } from '@colijnit/mainapi/build/enum/priority-type.enum';
77
83
  import { RelationRequest } from '@colijnit/relationapi/build/model/relation-request';
78
84
  import { Period } from '@colijnit/mainapi/build/enum/period.enum';
85
+ import { activityEmailRequestData } from '@colijnit/mainapi/build/model/activity-email-request-data';
86
+ import { ReportType } from '@colijnit/mainapi/build/enum/report-type.enum';
87
+ import { StringUtils as StringUtils$1 } from '@colijnit/ioneconnector/build/utils/string-utils';
79
88
 
80
89
  class DocsignComponent {
81
90
  constructor() {
@@ -793,6 +802,71 @@ class SharedConnectorService {
793
802
  });
794
803
  });
795
804
  }
805
+ getRelationSmallObject(relationId) {
806
+ return __awaiter(this, void 0, void 0, function* () {
807
+ return new Promise((resolve, reject) => {
808
+ return this.relationConnector.getRelationSmallObject(relationId).then((result) => {
809
+ if (result && result.validationResult && result.validationResult.success) {
810
+ resolve(this._boFactory.makeWithRawBackendData(RelationSmallObject, result.resultObject));
811
+ }
812
+ else {
813
+ reject(result.validationMessagesAsString);
814
+ }
815
+ });
816
+ });
817
+ });
818
+ }
819
+ insertActivity(activity) {
820
+ return __awaiter(this, void 0, void 0, function* () {
821
+ return new Promise((resolve, reject) => {
822
+ return this.mainConnector.insertActivity(activity).then((result) => __awaiter(this, void 0, void 0, function* () {
823
+ resolve(result.validationResult);
824
+ }));
825
+ });
826
+ });
827
+ }
828
+ insertWork(activity) {
829
+ return __awaiter(this, void 0, void 0, function* () {
830
+ return new Promise((resolve, reject) => {
831
+ return this.mainConnector.insertActivity(activity).then((result) => __awaiter(this, void 0, void 0, function* () {
832
+ if (result && result.validationResult && result.validationResult.success) {
833
+ resolve(this._boFactory.makeWithRawBackendData(Work, result.resultObject));
834
+ }
835
+ else {
836
+ reject(result.validationMessagesAsString);
837
+ }
838
+ }));
839
+ });
840
+ });
841
+ }
842
+ insertRemark(activity) {
843
+ return __awaiter(this, void 0, void 0, function* () {
844
+ return new Promise((resolve, reject) => {
845
+ return this.mainConnector.insertActivity(activity).then((result) => __awaiter(this, void 0, void 0, function* () {
846
+ if (result && result.validationResult && result.validationResult.success) {
847
+ resolve(this._boFactory.makeWithRawBackendData(Remark, result.resultObject));
848
+ }
849
+ else {
850
+ reject(result.validationMessagesAsString);
851
+ }
852
+ }));
853
+ });
854
+ });
855
+ }
856
+ insertTask(activity) {
857
+ return __awaiter(this, void 0, void 0, function* () {
858
+ return new Promise((resolve, reject) => {
859
+ return this.mainConnector.insertActivity(activity).then((result) => __awaiter(this, void 0, void 0, function* () {
860
+ if (result && result.validationResult && result.validationResult.success) {
861
+ resolve(this._boFactory.makeWithRawBackendData(Task, result.resultObject));
862
+ }
863
+ else {
864
+ reject(result.validationMessagesAsString);
865
+ }
866
+ }));
867
+ });
868
+ });
869
+ }
796
870
  updateActivity(activity) {
797
871
  return __awaiter(this, void 0, void 0, function* () {
798
872
  return new Promise((resolve, reject) => {
@@ -1216,10 +1290,10 @@ class SharedConnectorService {
1216
1290
  });
1217
1291
  });
1218
1292
  }
1219
- getRoleEmailAddressesByWorkflowCategoryAndKey(worlflowCategory, key) {
1293
+ getRoleEmailAddressesByWorkflowCategoryAndKey(workflowCategory, key) {
1220
1294
  return __awaiter(this, void 0, void 0, function* () {
1221
1295
  return new Promise((resolve, reject) => {
1222
- return this.mainConnector.getRoleEmailAddressesByWorkflowCategoryAndKey(worlflowCategory, key).then((result) => {
1296
+ return this.mainConnector.getRoleEmailAddressesByWorkflowCategoryAndKey(workflowCategory, key).then((result) => {
1223
1297
  if (result.validationResult && result.validationResult.success) {
1224
1298
  if (result.resultObject) {
1225
1299
  resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(RoleEmailaddress, result.resultObject));
@@ -1232,6 +1306,50 @@ class SharedConnectorService {
1232
1306
  });
1233
1307
  });
1234
1308
  }
1309
+ getEmailSenderByWorkflowCategoryAndKey(worlflowCategory, key) {
1310
+ return __awaiter(this, void 0, void 0, function* () {
1311
+ return new Promise((resolve, reject) => {
1312
+ return this.mainConnector.getEmailSenderByWorkflowCategoryAndKey(worlflowCategory, key).then((result) => {
1313
+ if (result.validationResult && result.validationResult.success) {
1314
+ resolve(result.resultObject);
1315
+ }
1316
+ else {
1317
+ reject(result.validationMessagesAsString);
1318
+ }
1319
+ });
1320
+ });
1321
+ });
1322
+ }
1323
+ getReportTemplates(reportTemplatesRequest) {
1324
+ return __awaiter(this, void 0, void 0, function* () {
1325
+ return new Promise((resolve, reject) => {
1326
+ return this.mainConnector.getReportTemplates(reportTemplatesRequest).then((result) => {
1327
+ if (result.validationResult && result.validationResult.success) {
1328
+ if (result.resultObjects) {
1329
+ resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(Report, result.resultObjects));
1330
+ }
1331
+ }
1332
+ else {
1333
+ reject(result.validationMessagesAsString);
1334
+ }
1335
+ });
1336
+ });
1337
+ });
1338
+ }
1339
+ emailReport(emailJob) {
1340
+ return __awaiter(this, void 0, void 0, function* () {
1341
+ return new Promise((resolve, reject) => {
1342
+ return this.mainConnector.emailReport(emailJob).then((result) => {
1343
+ if (result.validationResult && result.validationResult.success) {
1344
+ resolve(result.resultObject);
1345
+ }
1346
+ else {
1347
+ reject(result.validationMessagesAsString);
1348
+ }
1349
+ });
1350
+ });
1351
+ });
1352
+ }
1235
1353
  getWorkflowProcessInfoPerStatus(worlflowCategory) {
1236
1354
  return __awaiter(this, void 0, void 0, function* () {
1237
1355
  return new Promise((resolve, reject) => {
@@ -1477,6 +1595,7 @@ var Icon;
1477
1595
  Icon["MessageSmsSolid"] = "message_sms_solid";
1478
1596
  Icon["Notification"] = "notification";
1479
1597
  Icon["PaperclipRegular"] = "paperclip_regular";
1598
+ Icon["PaperPlaneTopSolid"] = "paper_plane_top_solid";
1480
1599
  Icon["Pdf"] = "pdf";
1481
1600
  Icon["PersonDiggingRegular"] = "person_digging_regular";
1482
1601
  Icon["PinRoundOpen"] = "pin_round_open";
@@ -1537,6 +1656,7 @@ const IconSvg = {
1537
1656
  "message_sms_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M0 64C0 28.7 28.7 0 64 0H448c35.3 0 64 28.7 64 64V352c0 35.3-28.7 64-64 64H309.3L185.6 508.8c-4.8 3.6-11.3 4.2-16.8 1.5s-8.8-8.2-8.8-14.3V416H64c-35.3 0-64-28.7-64-64V64zm202.9 80.8C196.4 147 192 153.1 192 160v96c0 8.8 7.2 16 16 16s16-7.2 16-16V208l19.2 25.6c3 4 7.8 6.4 12.8 6.4s9.8-2.4 12.8-6.4L288 208v48c0 8.8 7.2 16 16 16s16-7.2 16-16V160c0-6.9-4.4-13-10.9-15.2s-13.7 .1-17.9 5.6L256 197.3l-35.2-46.9c-4.1-5.5-11.3-7.8-17.9-5.6zm173.1 38c0-1.1 .2-1.6 .4-1.9c.3-.4 .9-1.2 2.4-2c3.1-1.8 8-3 12.9-2.9c6.1 .1 12.9 1.4 20.1 3.4c8.5 2.3 17.3-2.8 19.6-11.3s-2.8-17.3-11.3-19.6c-8.2-2.2-17.9-4.3-27.9-4.4c-9.3-.1-20.4 1.9-29.7 7.4c-9.9 5.9-18.6 16.4-18.5 31.6c.1 14.7 8.8 24 17.7 29.4c7.6 4.6 17.1 7.4 24.3 9.6l1.2 .4c8.5 2.6 14.2 4.5 18 6.9c2.7 1.7 2.7 2.4 2.7 3.1l0 .2c0 1.6-.3 2.3-.6 2.7c-.3 .5-.9 1.2-2.1 2c-2.8 1.7-7.5 2.9-12.8 2.8c-7-.2-13.5-2.4-22.6-5.5l0 0 0 0c-1.5-.5-3.2-1.1-4.9-1.6c-8.4-2.8-17.4 1.7-20.2 10.1s1.7 17.4 10.1 20.2c1.2 .4 2.6 .9 4 1.4l0 0 0 0c8.8 3 20.4 7 32.6 7.4c9.8 .3 21.2-1.6 30.7-7.6c10.2-6.4 18-17.3 17.8-32.3c-.2-14.7-8.5-24.2-17.6-29.9c-8-5-17.9-8-25.2-10.2l-.6-.2c-8.6-2.6-14.4-4.4-18.2-6.8c-1.6-1-2.1-1.6-2.2-1.7c0-.1 0-.2 0-.4zm-272 0c0-1.1 .2-1.6 .4-1.9c.3-.4 .9-1.2 2.4-2c3.1-1.8 8-3 12.9-2.9c6.6 .1 16.7 1.6 23.3 3.4c8.5 2.3 17.3-2.8 19.6-11.3s-2.8-17.3-11.3-19.6c-8.8-2.4-21.6-4.3-31.1-4.4c-9.3-.1-20.4 1.9-29.7 7.4C80.6 157.3 72 167.8 72 183c.1 14.7 8.8 24 17.7 29.4c7.6 4.6 17.1 7.4 24.3 9.6l0 0 1.2 .4c8.5 2.6 14.2 4.5 18 6.9c2.7 1.7 2.7 2.4 2.7 3.1l0 .2c0 1.6-.3 2.3-.6 2.7c-.3 .5-.9 1.2-2.1 2c-2.8 1.7-7.5 2.9-12.8 2.8c-7.2-.2-14.2-2.6-23.7-5.8l0 0 0 0c-1.3-.4-2.7-.9-4.1-1.4c-8.4-2.8-17.4 1.7-20.2 10.1s1.7 17.4 10.1 20.2c1.1 .4 2.4 .8 3.6 1.2l0 0 0 0c9 3.1 20.9 7.2 33.2 7.6c9.8 .3 21.2-1.6 30.7-7.6c10.2-6.4 18-17.3 17.8-32.3c-.2-14.7-8.5-24.2-17.6-29.9c-8-5-17.9-8-25.2-10.2l-.6-.2c-8.6-2.6-14.4-4.4-18.3-6.8c-1.6-1-2.1-1.6-2.2-1.7c0-.1 0-.2 0-.4z\"/></svg>",
1538
1657
  "notification": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 30 30\"><g ><path d=\"M15,1.1C6.72,1.1,0,6,0,12.06c0,2.12,.84,4.09,2.27,5.77h-.16c.16,.1,.28,.22,.43,.32,.4,.44,.86,.85,1.35,1.24,3.07,3.75,.06,8.71-3.25,9.84,5.79-1.34,9.31-3.89,10.9-6.53,1.11,.19,2.27,.31,3.46,.31,8.28,0,15-4.91,15-10.96S23.28,1.1,15,1.1Zm1.38,17.07h-2.82v-7.06h2.82v7.06Zm-.34-9.59c-.28,.28-.61,.41-1,.41s-.72-.14-1-.41c-.28-.28-.41-.61-.41-1s.14-.72,.41-1c.27-.28,.61-.41,1-.41s.72,.14,1,.41c.28,.28,.41,.61,.41,1s-.14,.72-.41,1Z\" fill=\"#484f60\"/></g></svg>",
1539
1658
  "paperclip_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><path d=\"M375 73c-26-26-68.1-26-94.1 0L89 265C45.3 308.6 45.3 379.4 89 423s114.4 43.6 158.1 0L399 271c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L281 457c-62.4 62.4-163.5 62.4-225.9 0S-7.4 293.4 55 231L247 39C291.7-5.7 364.2-5.7 409 39s44.7 117.2 0 161.9L225.2 384.7c-31.6 31.6-83.6 28.7-111.5-6.2c-23.8-29.8-21.5-72.8 5.5-99.8L271 127c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L153.2 312.7c-9.7 9.7-10.6 25.1-2 35.8c10 12.5 28.7 13.6 40 2.2L375 167c26-26 26-68.1 0-94.1z\"/></svg>",
1659
+ "paper_plane_top_solid": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M49.9 27.8C15.1 12.7-19.2 50.1-1.2 83.5L68.1 212.2c4.4 8.3 12.6 13.8 21.9 15c0 0 0 0 0 0l176 22c3.4 .4 6 3.3 6 6.7s-2.6 6.3-6 6.7l-176 22s0 0 0 0c-9.3 1.2-17.5 6.8-21.9 15L-1.2 428.5c-18 33.4 16.3 70.8 51.1 55.7L491.8 292.7c32.1-13.9 32.1-59.5 0-73.4L49.9 27.8z\"/></svg>",
1540
1660
  "pdf": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.42,40.17H13.88c-2.16,0-2.72-.56-2.72-2.72V12.88c0-2.15.56-2.71,2.72-2.71h11.6l8.66,8.88v3.43H32.8V19.6l-7.88-8.09h-11c-1.38,0-1.38,0-1.38,1.37V37.45c0,1.37,0,1.37,1.38,1.37H31.42c1.38,0,1.38,0,1.38-1.37V35h1.34v2.43C34.14,39.61,33.58,40.17,31.42,40.17Z\" fill=\"#484f60\"/><path d=\"M27.83,26.63v4.24h1a3.57,3.57,0,0,0,.78-.06,1.22,1.22,0,0,0,.52-.26,1.44,1.44,0,0,0,.34-.62,4.13,4.13,0,0,0,.13-1.18,3.79,3.79,0,0,0-.13-1.14,1.51,1.51,0,0,0-.37-.62,1.14,1.14,0,0,0-.6-.3,5.93,5.93,0,0,0-1.06-.06Z\" fill=\"#484f60\"/><path d=\"M21.86,26.63v1.82h.71a3.57,3.57,0,0,0,1-.1A.88.88,0,0,0,24,28a.84.84,0,0,0,.14-.5.8.8,0,0,0-.2-.57.88.88,0,0,0-.52-.29,6.36,6.36,0,0,0-.93,0Z\" fill=\"#484f60\"/><path d=\"M19.14,24.27v9h19.7v-9Zm6.12,4.24a1.68,1.68,0,0,1-.54.63,1.9,1.9,0,0,1-.67.3,6.57,6.57,0,0,1-1.34.1h-.85V32H20.57V25.54h2.07a7.75,7.75,0,0,1,1.54.1,1.73,1.73,0,0,1,.93.63,2,2,0,0,1,.37,1.25A2,2,0,0,1,25.26,28.51Zm6.45,1.66A2.91,2.91,0,0,1,31,31.31a2.28,2.28,0,0,1-.91.51A4,4,0,0,1,29,32H26.54V25.54H28.9a4.21,4.21,0,0,1,1.22.13,2.08,2.08,0,0,1,1,.59,2.79,2.79,0,0,1,.61,1,4.76,4.76,0,0,1,.21,1.52A4.19,4.19,0,0,1,31.71,30.17Zm5.7-3.54h-3.1v1.52H37v1.08H34.31V32H33V25.54h4.39Z\" fill=\"#484f60\"/><path d=\"M25.2,10.84v6.44c0,1.78.27,2,2,2h6.23Z\" fill=\"#484f60\"/></svg>",
1541
1661
  "person_digging_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><path d=\"M208 64a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM440.8 288c8.2 .3 15.7 4.7 19.8 11.8l104 176c4.4 7.4 4.5 16.6 .2 24.1s-12.2 12.1-20.8 12.1H288c-7.7 0-15-3.7-19.5-10s-5.7-14.3-3.3-21.6l16-48c3.3-9.8 12.4-16.4 22.8-16.4h35.4l20.3-29.5L22.8 246.2c-12.2-5.1-18-19.1-12.9-31.4s19.1-18 31.4-12.9L61 210.1l19.8-36.2C96.2 145.6 125.8 128 158 128h3.8c52.3 0 98.5 33.8 114.4 83.6l32.3 101.6 79 32.9 32.8-47.7c4.6-6.8 12.4-10.7 20.6-10.4zm-190.4 1l-20-62.8c-9.5-29.9-37.3-50.2-68.6-50.2H158c-14.6 0-28.1 8-35.1 20.8l-17.3 31.8L250.4 289zm188.1 67.6l-66.7 97L364.6 464H501.9L438.5 356.6zM81.4 301.1l128 54.4c8.9 3.8 14.6 12.5 14.6 22.1V488c0 13.3-10.7 24-24 24s-24-10.7-24-24V393.5L87.5 355.9 47 494.7c-3.7 12.7-17 20-29.8 16.3S-2.7 494 1 481.3L49 316.5l7.6-25.9 24.9 10.6z\"/></svg>",
1542
1662
  "pin_round_open": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 51 51\"><path d=\"M683.16,390.18a7.07,7.07,0,0,1-3.09-.77c-2.53-1.25-3.94-3.58-3.14-5.19a3.07,3.07,0,0,1,2.94-1.43h.1l-1,1.74v.2a2.48,2.48,0,0,0,.78,1.82,5.23,5.23,0,0,0,3.44,1.51,2,2,0,0,0,1.8-.84l.06-.09.52-1.48a3,3,0,0,1,.57,3.09,3.07,3.07,0,0,1-2.94,1.43Z\" transform=\"translate(-657.5 -358.97)\" fill=\"#4d5065\"/><path d=\"M683.15,386.94a4.06,4.06,0,0,1-2.62-1.16,1.5,1.5,0,0,1-.47-.92l2.32-4a5.24,5.24,0,0,0,3.13,1.45L684,386.63a1,1,0,0,1-.84.31Z\" transform=\"translate(-657.5 -358.97)\" fill=\"#4d5065\"/><path d=\"M686.75,381.45a5.78,5.78,0,0,1-2.52-.63c-2.06-1-3.21-2.9-2.57-4.21a2.48,2.48,0,0,1,2.37-1.15,5.78,5.78,0,0,1,2.53.63,5.5,5.5,0,0,1,2.32,2.05,2.26,2.26,0,0,1,.24,2.15,2.48,2.48,0,0,1-2.37,1.15Z\" transform=\"translate(-657.5 -358.97)\" fill=\"#4d5065\"/><path d=\"M679.42,390l-.89,1.92-.13,1.55,1-1.16.81-1.92-.54-.24Z\" transform=\"translate(-657.5 -358.97)\" fill=\"#4d5065\"/><path d=\"M683,399.47a15,15,0,1,1,15-15A15,15,0,0,1,683,399.47Zm0-29a14,14,0,1,0,14,14A14,14,0,0,0,683,370.44Z\" transform=\"translate(-657.5 -358.97)\" fill=\"#4d5065\"/></svg>",
@@ -2497,7 +2617,8 @@ StockTransferComponent.propDecorators = {
2497
2617
  };
2498
2618
 
2499
2619
  class SharedService {
2500
- constructor(options, connector) {
2620
+ constructor(locale, options, connector) {
2621
+ this.locale = locale;
2501
2622
  this.options = options;
2502
2623
  this.connector = connector;
2503
2624
  }
@@ -2552,6 +2673,31 @@ class SharedService {
2552
2673
  return yield this.connector.getComponentActivitiesWithoutRelationFiltering(table, key);
2553
2674
  });
2554
2675
  }
2676
+ getRelationSmallObject(relationId) {
2677
+ return __awaiter(this, void 0, void 0, function* () {
2678
+ return yield this.connector.getRelationSmallObject(relationId);
2679
+ });
2680
+ }
2681
+ insertActivity(activity) {
2682
+ return __awaiter(this, void 0, void 0, function* () {
2683
+ return yield this.connector.insertActivity(activity);
2684
+ });
2685
+ }
2686
+ insertWork(activity) {
2687
+ return __awaiter(this, void 0, void 0, function* () {
2688
+ return yield this.connector.insertWork(activity);
2689
+ });
2690
+ }
2691
+ insertRemark(activity) {
2692
+ return __awaiter(this, void 0, void 0, function* () {
2693
+ return yield this.connector.insertRemark(activity);
2694
+ });
2695
+ }
2696
+ insertTask(activity) {
2697
+ return __awaiter(this, void 0, void 0, function* () {
2698
+ return yield this.connector.insertTask(activity);
2699
+ });
2700
+ }
2555
2701
  updateActivity(activity) {
2556
2702
  return __awaiter(this, void 0, void 0, function* () {
2557
2703
  return yield this.connector.updateActivity(activity);
@@ -2605,6 +2751,40 @@ class SharedService {
2605
2751
  return yield this.connector.getRoleEmailAddressesByWorkflowCategoryAndKey(workflowCategory, key);
2606
2752
  });
2607
2753
  }
2754
+ getEmailSenderByWorkflowCategoryAndKey(workflowCategory, key) {
2755
+ return __awaiter(this, void 0, void 0, function* () {
2756
+ return yield this.connector.getEmailSenderByWorkflowCategoryAndKey(workflowCategory, key);
2757
+ });
2758
+ }
2759
+ getDefaultEmailReportTemplatesForBranch(branchNr, reportType) {
2760
+ return __awaiter(this, void 0, void 0, function* () {
2761
+ let reportTemplatesRequest = new SelectReportTemplatesRequest();
2762
+ reportTemplatesRequest.branchNr = branchNr;
2763
+ reportTemplatesRequest.documentCode = reportType;
2764
+ reportTemplatesRequest.sendMethod = SendMethodType.Email;
2765
+ return yield this.connector.getReportTemplates(reportTemplatesRequest);
2766
+ });
2767
+ }
2768
+ emailViaTemplate(template, emailTo, emailBcc, reply, subject = "", message = "", attachments = [], parameters = {}) {
2769
+ return __awaiter(this, void 0, void 0, function* () {
2770
+ const subjectAddition = subject.trim();
2771
+ const emailJob = this._createEmailJob(template, emailTo, emailBcc, reply, subjectAddition, message, attachments, parameters);
2772
+ return this.connector.emailReport(emailJob);
2773
+ });
2774
+ }
2775
+ _createEmailJob(report, emailTo, emailBcc, reply, subject, message, attachments, parameters = {}) {
2776
+ const emailJob = new EmailJob();
2777
+ emailJob.emailTo = emailTo;
2778
+ emailJob.emailBcc = emailBcc;
2779
+ emailJob.reply = reply;
2780
+ emailJob.subject = subject;
2781
+ emailJob.message = message;
2782
+ emailJob.attachments = attachments;
2783
+ emailJob.reportId = report.reportId;
2784
+ emailJob.parameterValues = parameters;
2785
+ emailJob.locale = this.locale;
2786
+ return emailJob;
2787
+ }
2608
2788
  getWorkflowProcessInfoPerStatus(workflowCategory) {
2609
2789
  return __awaiter(this, void 0, void 0, function* () {
2610
2790
  return yield this.connector.getWorkflowProcessInfoPerStatus(workflowCategory);
@@ -2630,13 +2810,14 @@ class SharedService {
2630
2810
  });
2631
2811
  }
2632
2812
  }
2633
- SharedService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SharedService_Factory() { return new SharedService(i0.ɵɵinject(OptionsService), i0.ɵɵinject(SharedConnectorService)); }, token: SharedService, providedIn: "root" });
2813
+ SharedService.ɵprov = i0.ɵɵdefineInjectable({ factory: function SharedService_Factory() { return new SharedService(i0.ɵɵinject(i0.LOCALE_ID), i0.ɵɵinject(OptionsService), i0.ɵɵinject(SharedConnectorService)); }, token: SharedService, providedIn: "root" });
2634
2814
  SharedService.decorators = [
2635
2815
  { type: Injectable, args: [{
2636
2816
  providedIn: "root"
2637
2817
  },] }
2638
2818
  ];
2639
2819
  SharedService.ctorParameters = () => [
2820
+ { type: LanguageCode, decorators: [{ type: Inject, args: [LOCALE_ID,] }] },
2640
2821
  { type: OptionsService },
2641
2822
  { type: SharedConnectorService }
2642
2823
  ];
@@ -14754,6 +14935,478 @@ WorkflowInfoTilesModule.decorators = [
14754
14935
  },] }
14755
14936
  ];
14756
14937
 
14938
+ class TaskCreatorComponent {
14939
+ constructor(iconService, dictionaryService, sharedService) {
14940
+ this.iconService = iconService;
14941
+ this.dictionaryService = dictionaryService;
14942
+ this.sharedService = sharedService;
14943
+ this.icons = Icon;
14944
+ this.table = TableName$1.Transactions;
14945
+ this.activityCreated = new EventEmitter();
14946
+ this.optionCollection = [
14947
+ { icon: this.iconService.getIcon(this.icons.CommentRegular), label: this.dictionaryService.get('REMARK', true) },
14948
+ { icon: this.iconService.getIcon(this.icons.PersonDiggingRegular), label: this.dictionaryService.get('WORK', true) },
14949
+ { icon: this.iconService.getIcon(this.icons.Task), label: this.dictionaryService.get('TASK', true) },
14950
+ ];
14951
+ this.showFilesDialog = false;
14952
+ this.documents = [];
14953
+ this.showEmailDialog = false;
14954
+ this.senderAddress = '';
14955
+ this.emailAddresses = [];
14956
+ this.bccEmailAddresses = [];
14957
+ this.emailRequest = null;
14958
+ this.remarkText = "";
14959
+ this.workDescription = "";
14960
+ this.taskName = "";
14961
+ this.taskDescription = "";
14962
+ }
14963
+ showClass() {
14964
+ return true;
14965
+ }
14966
+ ngOnInit() {
14967
+ return __awaiter(this, void 0, void 0, function* () {
14968
+ this.chosenActivityType = this.optionCollection[0];
14969
+ this.senderAddress = yield this.sharedService.getEmailSenderByWorkflowCategoryAndKey('SERVICE_ORDER', this.remarkAndWorkKey);
14970
+ });
14971
+ }
14972
+ itemSelected(item) {
14973
+ this.chosenActivityType = item;
14974
+ }
14975
+ createRemarkClicked() {
14976
+ return __awaiter(this, void 0, void 0, function* () {
14977
+ this.createForm.submit();
14978
+ if (this.createForm.isValid()) {
14979
+ let remark = this.createRemark();
14980
+ let activity = new Activity();
14981
+ activity.activityType = ActivityType.Remark;
14982
+ activity.remark = remark;
14983
+ this.createdRemark = yield this.sharedService.insertRemark(activity);
14984
+ if (this.createdRemark) {
14985
+ this.handleAfterCreation();
14986
+ }
14987
+ }
14988
+ });
14989
+ }
14990
+ createWorkClicked() {
14991
+ return __awaiter(this, void 0, void 0, function* () {
14992
+ this.createForm.submit();
14993
+ if (this.createForm.isValid()) {
14994
+ let work = this.createWork();
14995
+ let activity = new Activity();
14996
+ activity.activityType = ActivityType.Work;
14997
+ activity.work = work;
14998
+ this.createdWork = yield this.sharedService.insertWork(activity);
14999
+ if (this.createdWork) {
15000
+ this.activityCreated.emit();
15001
+ yield this.sendEmailIfNeccesary();
15002
+ this.clearFields();
15003
+ }
15004
+ }
15005
+ });
15006
+ }
15007
+ createTaskClicked() {
15008
+ return __awaiter(this, void 0, void 0, function* () {
15009
+ this.createForm.submit();
15010
+ if (this.createForm.isValid()) {
15011
+ const task = this.createTask();
15012
+ let activity = new Activity();
15013
+ activity.activityType = ActivityType.Task;
15014
+ activity.task = task;
15015
+ this.createdTask = yield this.sharedService.insertTask(activity);
15016
+ if (this.createdTask) {
15017
+ this.activityCreated.emit();
15018
+ yield this.sendEmailIfNeccesary();
15019
+ this.clearFields();
15020
+ }
15021
+ }
15022
+ });
15023
+ }
15024
+ addedDocument(docs) {
15025
+ return __awaiter(this, void 0, void 0, function* () {
15026
+ this.documents = this.documents.concat(docs);
15027
+ });
15028
+ }
15029
+ deletedDocument(doc) {
15030
+ return __awaiter(this, void 0, void 0, function* () {
15031
+ ArrayUtils.RemoveElement(doc, this.documents);
15032
+ });
15033
+ }
15034
+ emailDialogClosed() {
15035
+ if (this.emailAddresses.length >= 0) {
15036
+ this.emailRequest = new activityEmailRequestData;
15037
+ this.emailRequest.table = this.table;
15038
+ this.emailRequest.key = this.remarkAndWorkKey;
15039
+ this.emailRequest.senderAddress = this.senderAddress;
15040
+ this.emailRequest.sendAddresses = this.emailAddresses;
15041
+ this.emailRequest.ccAddresses = this.bccEmailAddresses;
15042
+ }
15043
+ else {
15044
+ this.emailRequest = null;
15045
+ }
15046
+ this.showEmailDialog = false;
15047
+ }
15048
+ createRemark() {
15049
+ let remark = new Remark();
15050
+ remark.author = this.author;
15051
+ remark.author.image = undefined;
15052
+ remark.documents = this.documents;
15053
+ remark.remark = this.remarkText;
15054
+ remark.dateTime = new Date();
15055
+ remark.table = this.table;
15056
+ remark.key = this.remarkAndWorkKey;
15057
+ remark.read = false;
15058
+ remark.current = true;
15059
+ return remark;
15060
+ }
15061
+ createWork() {
15062
+ let work = new Work();
15063
+ work.executive = this.author;
15064
+ work.executive.image = undefined;
15065
+ work.documents = this.documents;
15066
+ work.workedTime = 0;
15067
+ work.workDescription = this.workDescription;
15068
+ work.dateTime = new Date();
15069
+ work.table = this.table;
15070
+ work.key = this.remarkAndWorkKey;
15071
+ return work;
15072
+ }
15073
+ createTask() {
15074
+ let task = new Task();
15075
+ task.executive = this.author;
15076
+ task.executive.image = undefined;
15077
+ task.reporter = this.author;
15078
+ task.reporter.image = undefined;
15079
+ task.documents = this.documents;
15080
+ task.name = this.taskName;
15081
+ task.description = this.taskDescription;
15082
+ task.creationDateTime = new Date();
15083
+ task.dateDefinate = false;
15084
+ task.needsPlanning = true;
15085
+ task.priority = 0;
15086
+ task.workflowCategory = this.workflowCategoryType;
15087
+ task.reference = this.taskKey;
15088
+ task.emailAddresses = this.emailAddresses;
15089
+ return task;
15090
+ }
15091
+ handleAfterCreation() {
15092
+ return __awaiter(this, void 0, void 0, function* () {
15093
+ this.activityCreated.emit();
15094
+ yield this.sendEmailIfNeccesary();
15095
+ this.clearFields();
15096
+ });
15097
+ }
15098
+ clearFields() {
15099
+ this.remarkText = "";
15100
+ this.workDescription = "";
15101
+ this.taskName = "";
15102
+ this.taskDescription = "";
15103
+ this.senderAddress = "";
15104
+ this.emailAddresses = [];
15105
+ this.bccEmailAddresses = [];
15106
+ this.emailRequest = null;
15107
+ this.createdWork = undefined;
15108
+ this.createdRemark = undefined;
15109
+ this.createdTask = undefined;
15110
+ }
15111
+ sendEmailIfNeccesary() {
15112
+ return __awaiter(this, void 0, void 0, function* () {
15113
+ if (this.emailAddresses.length > 0) {
15114
+ let templates = yield this.sharedService.getDefaultEmailReportTemplatesForBranch(this.branchNo, this.findReportType());
15115
+ if (templates.length != 0) {
15116
+ let template = this.findDefault(templates);
15117
+ if (template) {
15118
+ this.startEmailing(template);
15119
+ }
15120
+ }
15121
+ }
15122
+ });
15123
+ }
15124
+ startEmailing(template) {
15125
+ return __awaiter(this, void 0, void 0, function* () {
15126
+ yield this.sharedService.emailViaTemplate(template, this.createEmailAddressString(this.emailAddresses), this.createEmailAddressString(this.bccEmailAddresses), this.senderAddress, this.createEmailSubject(), "", this.createAttachmentsStringArray(), this.createEmailParams());
15127
+ });
15128
+ }
15129
+ findReportType() {
15130
+ if (this.chosenActivityType === this.optionCollection[0]) {
15131
+ return ReportType.RemarkMessage;
15132
+ }
15133
+ else if (this.chosenActivityType === this.optionCollection[1]) {
15134
+ return ReportType.WorkMessage;
15135
+ }
15136
+ else {
15137
+ return ReportType.TaskMessage;
15138
+ }
15139
+ }
15140
+ findDefault(reportList) {
15141
+ let defaultTemplate = null;
15142
+ reportList.forEach(r => {
15143
+ if (r.isDefault) {
15144
+ defaultTemplate = r;
15145
+ }
15146
+ });
15147
+ return defaultTemplate;
15148
+ }
15149
+ createEmailParams() {
15150
+ if (this.createdRemark) {
15151
+ return { opmerking_id: this.createdRemark.remarkId + "" };
15152
+ }
15153
+ else if (this.createdWork) {
15154
+ return { werkzh_id: this.createdWork.workId + "" };
15155
+ }
15156
+ else if (this.createdTask) {
15157
+ return { taak_id: this.createdTask.taskId + "" };
15158
+ }
15159
+ }
15160
+ createEmailSubject() {
15161
+ let subject = "- ";
15162
+ if (this.createdRemark) {
15163
+ subject += this.dictionaryService.get("REMARK") + " " + this.createdRemark.remarkId;
15164
+ }
15165
+ else if (this.createdWork) {
15166
+ subject += this.dictionaryService.get("WORK") + " " + this.createdWork.workId;
15167
+ }
15168
+ else if (this.createdTask) {
15169
+ subject += (this.createdTask.workflowCategory ? this.createdTask.workflowCategory : this.dictionaryService.get("TASK")) + " " +
15170
+ (this.createdTask.workflowCategory ? this.createdTask.reference : this.createdTask.taskId);
15171
+ }
15172
+ return subject;
15173
+ }
15174
+ createEmailAddressString(addresses) {
15175
+ if (addresses.length === 0) {
15176
+ return '';
15177
+ }
15178
+ else {
15179
+ return addresses.join(';');
15180
+ }
15181
+ }
15182
+ createAttachmentsStringArray() {
15183
+ if (this.documents.length === 0) {
15184
+ return [];
15185
+ }
15186
+ else {
15187
+ let attachments = [];
15188
+ this.documents.forEach(d => {
15189
+ attachments.push(d.documentBody);
15190
+ });
15191
+ return attachments;
15192
+ }
15193
+ }
15194
+ }
15195
+ TaskCreatorComponent.decorators = [
15196
+ { type: Component, args: [{
15197
+ selector: "co-task-creator",
15198
+ template: `
15199
+ <co-form #createForm class="input-fields">
15200
+ <co-list-of-icons [collection]="optionCollection" (itemSelected)="itemSelected($event)"></co-list-of-icons>
15201
+ <co-input-text *ngIf="chosenActivityType === optionCollection[0]" [required]="chosenActivityType === optionCollection[0]"
15202
+ [placeholder]="'REMARK' | localize" [(model)]="remarkText"
15203
+ [rightIconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
15204
+ (rightIconClick)="createRemarkClicked()"></co-input-text>
15205
+ <co-input-text *ngIf="chosenActivityType === optionCollection[1]" [required]="chosenActivityType === optionCollection[1]"
15206
+ [placeholder]="'DESCRIPTION' | localize" [(model)]="workDescription"
15207
+ [rightIconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
15208
+ (rightIconClick)="createWorkClicked()"></co-input-text>
15209
+ <div class="task-input-fields" *ngIf="chosenActivityType === optionCollection[2]">
15210
+ <co-input-text [(model)]="taskName" [placeholder]="'NAME' | localize" [required]="chosenActivityType === optionCollection[2]"
15211
+ [rightIconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
15212
+ (rightIconClick)="createTaskClicked()"></co-input-text>
15213
+ <co-input-text [(model)]="taskDescription" [placeholder]="'DESCRIPTION' | localize" [required]="chosenActivityType === optionCollection[2]"></co-input-text>
15214
+ </div>
15215
+ </co-form>
15216
+ <div class="extras-buttons">
15217
+ <co-button [iconData]="iconService.getIcon(icons.Email)" (click)="showEmailDialog = true"></co-button>
15218
+ <co-button [iconData]="iconService.getIcon(icons.PaperclipRegular)" (click)="showFilesDialog = true"
15219
+ [label]="documents.length === 0 ? '' : documents.length.toString()" ></co-button>
15220
+ </div>
15221
+
15222
+ <co-dialog *ngIf="showFilesDialog" (closeClick)="showFilesDialog = false">
15223
+ <co-files-upload (documentsAdded)="addedDocument($event)" (documentDeleted)="deletedDocument"
15224
+ [documents]="documents" [useWithoutSettingProps]="true"></co-files-upload>
15225
+ </co-dialog>
15226
+ <co-dialog *ngIf="showEmailDialog" (closeClick)="emailDialogClosed()">
15227
+ <co-role-email-selector [(model)]="emailAddresses" [key]="remarkAndWorkKey" [workflowCategoryType]="workflowCategoryType"></co-role-email-selector>
15228
+ <co-role-email-selector [(model)]="bccEmailAddresses" [key]="remarkAndWorkKey" [workflowCategoryType]="workflowCategoryType"></co-role-email-selector>
15229
+ <co-input-text [readonly]="false" [label]="'SENDER' | localize" [model]="senderAddress"></co-input-text>-->
15230
+ </co-dialog>
15231
+
15232
+ `
15233
+ },] }
15234
+ ];
15235
+ TaskCreatorComponent.ctorParameters = () => [
15236
+ { type: IconCacheService },
15237
+ { type: DictionaryService },
15238
+ { type: SharedService }
15239
+ ];
15240
+ TaskCreatorComponent.propDecorators = {
15241
+ createForm: [{ type: ViewChild, args: [FormComponent,] }],
15242
+ author: [{ type: Input }],
15243
+ branchNo: [{ type: Input }],
15244
+ table: [{ type: Input }],
15245
+ remarkAndWorkKey: [{ type: Input }],
15246
+ taskKey: [{ type: Input }],
15247
+ workflowCategoryType: [{ type: Input }],
15248
+ activityCreated: [{ type: Output }],
15249
+ showClass: [{ type: HostBinding, args: ["class.co-task-creator",] }]
15250
+ };
15251
+
15252
+ class RoleEmailSelectorComponent {
15253
+ constructor(iconService, sharedService) {
15254
+ this.iconService = iconService;
15255
+ this.sharedService = sharedService;
15256
+ this.icons = Icon;
15257
+ this.modelChange = new EventEmitter();
15258
+ this.emailAddressesAvailable = [];
15259
+ this._model = [];
15260
+ }
15261
+ set model(value) {
15262
+ this._model = value;
15263
+ }
15264
+ get model() {
15265
+ return this._model;
15266
+ }
15267
+ set key(value) {
15268
+ this._key = value;
15269
+ this.fetchRoleEmailAddresses();
15270
+ }
15271
+ ;
15272
+ get key() {
15273
+ return this._key;
15274
+ }
15275
+ ;
15276
+ set workflowCategoryType(value) {
15277
+ this._workflowCategoryType = value;
15278
+ this.fetchRoleEmailAddresses();
15279
+ }
15280
+ ;
15281
+ get workflowCategoryType() {
15282
+ return this._workflowCategoryType;
15283
+ }
15284
+ ;
15285
+ showClass() {
15286
+ return true;
15287
+ }
15288
+ ngOnInit() {
15289
+ return __awaiter(this, void 0, void 0, function* () {
15290
+ this.fetchRoleEmailAddresses();
15291
+ });
15292
+ }
15293
+ fetchRoleEmailAddresses() {
15294
+ return __awaiter(this, void 0, void 0, function* () {
15295
+ if (this.workflowCategoryType !== undefined && this.key !== undefined) {
15296
+ this.emailAddressesAvailable = yield this.sharedService.getRoleEmailAddressesByWorkflowCategoryAndKey(this._workflowCategoryType, this._key);
15297
+ }
15298
+ });
15299
+ }
15300
+ roleChosen(role) {
15301
+ if (!role) {
15302
+ return;
15303
+ }
15304
+ const len = role.emailAddresses.length;
15305
+ for (let i = 0; i < len; i++) {
15306
+ if (this.model.indexOf(role.emailAddresses[i]) === -1 && StringUtils$1.IsValidEmail(role.emailAddresses[i])) {
15307
+ this.model.push(role.emailAddresses[i]);
15308
+ this.modelChange.emit(this.model);
15309
+ }
15310
+ }
15311
+ }
15312
+ addEmail(email) {
15313
+ if (this.model.indexOf(email) === -1 && StringUtils$1.IsValidEmail(email)) {
15314
+ this.model.push(email);
15315
+ this.modelChange.emit(this.model);
15316
+ }
15317
+ }
15318
+ removeOptionFromModel(email) {
15319
+ if (this.model.indexOf(email) > -1) {
15320
+ this.model.splice(email.indexOf(email), 1);
15321
+ }
15322
+ }
15323
+ }
15324
+ RoleEmailSelectorComponent.decorators = [
15325
+ { type: Component, args: [{
15326
+ selector: "co-role-email-selector",
15327
+ template: `
15328
+ <co-list-of-values [multiselect]="false" [label]="'RECIPIENTS' | localize"
15329
+ [collection]="emailAddressesAvailable" [displayField]="'role'"
15330
+ (modelChange)="roleChosen($event)">
15331
+ </co-list-of-values>
15332
+ <co-input-text #inp [placeholder]="'EXTRA_EMAIL_ADDRESSES' | localize"
15333
+ [rightIconData]="iconService.getIcon(icons.PaperPlaneTopSolid)"
15334
+ (rightIconClick)="addEmail(inp.model)"></co-input-text>
15335
+
15336
+ <div class="chips-wrapper">
15337
+ <div class="chips" *ngFor="let email of model">
15338
+ <span class="chips-description" [textContent]="email"></span>
15339
+ <co-icon class="remove-chip-icon" [iconData]="iconService.getIcon(icons.CrossSkinny)" (click)="removeOptionFromModel(email)"></co-icon>
15340
+ </div>
15341
+ </div>
15342
+
15343
+ `
15344
+ },] }
15345
+ ];
15346
+ RoleEmailSelectorComponent.ctorParameters = () => [
15347
+ { type: IconCacheService },
15348
+ { type: SharedService }
15349
+ ];
15350
+ RoleEmailSelectorComponent.propDecorators = {
15351
+ model: [{ type: Input }],
15352
+ key: [{ type: Input }],
15353
+ workflowCategoryType: [{ type: Input }],
15354
+ modelChange: [{ type: Output }],
15355
+ showClass: [{ type: HostBinding, args: ["class.co-role-email-selector",] }]
15356
+ };
15357
+
15358
+ class RoleEmailSelectorModule {
15359
+ }
15360
+ RoleEmailSelectorModule.decorators = [
15361
+ { type: NgModule, args: [{
15362
+ imports: [
15363
+ ListOfValuesModule,
15364
+ InputTextModule,
15365
+ LocalizationModule,
15366
+ IconModule,
15367
+ CommonModule,
15368
+ ],
15369
+ declarations: [
15370
+ RoleEmailSelectorComponent
15371
+ ],
15372
+ exports: [
15373
+ RoleEmailSelectorComponent
15374
+ ],
15375
+ providers: [
15376
+ BusinessObjectFactory
15377
+ ]
15378
+ },] }
15379
+ ];
15380
+
15381
+ class TaskCreatorModule {
15382
+ }
15383
+ TaskCreatorModule.decorators = [
15384
+ { type: NgModule, args: [{
15385
+ imports: [
15386
+ ListOfValuesModule,
15387
+ InputTextModule,
15388
+ ButtonModule,
15389
+ CommonModule,
15390
+ CoDialogModule,
15391
+ FilesUploadModule,
15392
+ LocalizationModule,
15393
+ ListOfIconsModule,
15394
+ FormModule,
15395
+ IconModule,
15396
+ RoleEmailSelectorModule
15397
+ ],
15398
+ declarations: [
15399
+ TaskCreatorComponent
15400
+ ],
15401
+ exports: [
15402
+ TaskCreatorComponent
15403
+ ],
15404
+ providers: [
15405
+ BusinessObjectFactory
15406
+ ]
15407
+ },] }
15408
+ ];
15409
+
14757
15410
  /*
14758
15411
  * Public API Surface of sharedcomponents
14759
15412
  */
@@ -14762,5 +15415,5 @@ WorkflowInfoTilesModule.decorators = [
14762
15415
  * Generated bundle index. Do not edit.
14763
15416
  */
14764
15417
 
14765
- export { ActivityListComponent, ActivityListModule, AgendaEvent, AgendaEventPerDay, CalendarView, CoLinearGaugeComponent, CoLinearGaugeModule, ComponentActivityListComponent, ComponentActivityListModule, DatePlanningComponent, DatePlanningModule, DocsignComponent, DocsignModule, FilesUploadComponent, FilesUploadModule, KeyPadComponent, KeyPadModule, LayoutSwitcherComponent, LayoutSwitcherModule, SendMethodDialogComponent, SendMethodDialogModule, SharedService, SimpleTagsComponent, SimpleTagsFormComponent, SimpleTagsFormModule, SimpleTagsModule, StatusbarComponent, StatusbarModule, StockComponent, StockModule, Translation, WorkflowInfoTilesComponent, WorkflowInfoTilesModule, sendMethodsWithIcon, SignatureComponent as ɵa, SignaturesComponent as ɵb, LocalizationModule as ɵba, LocalizePipe as ɵbb, StockInformationComponent as ɵbc, StockInformationGridComponent as ɵbd, StockTransferComponent as ɵbe, StockChangeAmountComponent as ɵbf, StockTabComponent as ɵbg, OrderTabComponent as ɵbh, StockTabsComponent as ɵbi, StockHistoryTabsComponent as ɵbj, OrderStockTabComponent as ɵbk, StockLocationComponent as ɵbl, StockHistoryComponent as ɵbm, OrderSupplyStockHistoryComponent as ɵbn, OrderCommissionStockHistoryComponent as ɵbo, OrderStockHistoryComponent as ɵbp, AllocationStockHistoryComponent as ɵbq, StockPrognoseComponent as ɵbr, StockLocationPopupComponent as ɵbs, SendMethod as ɵbt, Icon as ɵbu, CalendarAllYearsComponent as ɵbv, CalendarAllMonthsComponent as ɵbw, CalendarHeaderComponent as ɵbx, CalendarComponent as ɵby, CalendarViewComponent as ɵbz, StockService as ɵc, LanguageCode as ɵca, AgendaHeaderComponent as ɵcb, AgendaViewComponent as ɵcc, AgendaMonthViewComponent as ɵcd, AgendaBaseViewComponent as ɵce, AgendaDayViewComponent as ɵcf, AgendaWeekViewComponent as ɵcg, AgendaWeekSelectViewComponent as ɵch, AgendaHourViewComponent as ɵci, AgendaHourCellComponent as ɵcj, AgendaHourViewLabelsComponent as ɵck, AgendaHalfHourCellComponent as ɵcl, AgendaEventsComponent as ɵcm, AgendaEventComponent as ɵcn, ViewSelectComponent as ɵco, AgendaSelectEventComponent as ɵcp, MASTER_PIPES as ɵcq, ArrayNumberPipe as ɵcr, UCfirstPipe as ɵcs, FileTypeImagePipe as ɵct, BaseFileUploadComponent as ɵcu, InputBoolean as ɵcv, ImageDisplayModule as ɵcw, ImageDisplayComponent as ɵcx, FileUploadModule as ɵcy, TileRenderModule as ɵcz, SharedConnectorService as ɵd, TileRenderComponent as ɵda, FileUploadComponent as ɵdb, FileUploadPopupModule as ɵdc, MultiplePropertyTogglerModule as ɵdd, MultiplePropertyTogglerComponent as ɵde, FileUploadPopupComponent as ɵdf, AppFileDropzoneModule as ɵdg, AppFileDropzoneComponent as ɵdh, DragDropContainerComponent as ɵdi, DragDropService as ɵdj, BaseActivityListComponent as ɵdk, PersonalActivityOverviewComponent as ɵdl, BaseActivityOverviewComponent as ɵdm, TaskModifierComponent as ɵdn, ModifyTaskFormComponent as ɵdo, PersonalActivityOverviewModule as ɵdp, ComponentActivityOverviewModule as ɵdq, TaskModifyerModule as ɵdr, ModifyTaskFormModule as ɵds, TaskDetailsModule as ɵdt, TaskDetailsComponent as ɵdu, BaseActivitySummaryComponent as ɵdv, ExecutiveSummaryBlockModule as ɵdw, ActivitySummaryBlockModule as ɵdx, ActivitySummaryBlockComponent as ɵdy, ExecutiveSummaryBlockComponent as ɵdz, OptionsService as ɵe, StatusSummaryBlockModule as ɵea, StatusSummaryBlockComponent as ɵeb, CreationSummaryBlockModule as ɵec, CreationSummaryBlockComponent as ɵed, NotificationSummaryBlockModule as ɵee, NotificationSummaryBlockComponent as ɵef, ComponentActivityOverviewComponent as ɵeg, ActivityListHeaderModule as ɵeh, WorkflowNotificationToggleModule as ɵei, DirectivesModule as ɵej, AbsoluteOverlayTemplateDirective as ɵek, AppAbsoluteOverlayOutletService as ɵel, AlignWithDirective as ɵem, ClickOutsideDirective as ɵen, WorkflowNotificationToggleComponent as ɵeo, WorkflowNotificationTogglePopupComponent as ɵep, PeriodFilterModule as ɵeq, PeriodFilterComponent as ɵer, PeriodFilterPopupComponent as ɵes, ActivityListHeaderComponent as ɵet, WorkflowInfoTileModule as ɵeu, WorkflowInfoTileComponent as ɵev, DictionaryService as ɵf, LocalizeService as ɵg, IconCacheService as ɵh, SendMethodService as ɵi, SendMethodEmailModule as ɵj, LayoutSelectionModule as ɵk, LayoutSelectionComponent as ɵl, SignatureButtonModule as ɵm, SignatureButtonComponent as ɵn, SendMethodEmailComponent as ɵo, SendMethodPrinterModule as ɵp, PrinterSelectionModule as ɵq, PrinterSelectionComponent as ɵr, SendMethodPrinterComponent as ɵs, SendMethodPdfModule as ɵt, SendMethodPdfComponent as ɵu, TabBarModule as ɵv, TabBarComponent as ɵw, StatusbarPopupComponent as ɵx, StockStatusbarModule as ɵy, StockStatusbarComponent as ɵz };
15418
+ export { ActivityListComponent, ActivityListModule, AgendaEvent, AgendaEventPerDay, CalendarView, CoLinearGaugeComponent, CoLinearGaugeModule, ComponentActivityListComponent, ComponentActivityListModule, DatePlanningComponent, DatePlanningModule, DocsignComponent, DocsignModule, FilesUploadComponent, FilesUploadModule, KeyPadComponent, KeyPadModule, LayoutSwitcherComponent, LayoutSwitcherModule, RoleEmailSelectorComponent, RoleEmailSelectorModule, SendMethodDialogComponent, SendMethodDialogModule, SharedService, SimpleTagsComponent, SimpleTagsFormComponent, SimpleTagsFormModule, SimpleTagsModule, StatusbarComponent, StatusbarModule, StockComponent, StockModule, TaskCreatorComponent, TaskCreatorModule, Translation, WorkflowInfoTilesComponent, WorkflowInfoTilesModule, sendMethodsWithIcon, SignatureComponent as ɵa, SignaturesComponent as ɵb, StockStatusbarComponent as ɵba, LocalizationModule as ɵbb, LocalizePipe as ɵbc, StockInformationComponent as ɵbd, StockInformationGridComponent as ɵbe, StockTransferComponent as ɵbf, StockChangeAmountComponent as ɵbg, StockTabComponent as ɵbh, OrderTabComponent as ɵbi, StockTabsComponent as ɵbj, StockHistoryTabsComponent as ɵbk, OrderStockTabComponent as ɵbl, StockLocationComponent as ɵbm, StockHistoryComponent as ɵbn, OrderSupplyStockHistoryComponent as ɵbo, OrderCommissionStockHistoryComponent as ɵbp, OrderStockHistoryComponent as ɵbq, AllocationStockHistoryComponent as ɵbr, StockPrognoseComponent as ɵbs, StockLocationPopupComponent as ɵbt, SendMethod as ɵbu, Icon as ɵbv, CalendarAllYearsComponent as ɵbw, CalendarAllMonthsComponent as ɵbx, CalendarHeaderComponent as ɵby, CalendarComponent as ɵbz, StockService as ɵc, CalendarViewComponent as ɵca, AgendaHeaderComponent as ɵcb, AgendaViewComponent as ɵcc, AgendaMonthViewComponent as ɵcd, AgendaBaseViewComponent as ɵce, AgendaDayViewComponent as ɵcf, AgendaWeekViewComponent as ɵcg, AgendaWeekSelectViewComponent as ɵch, AgendaHourViewComponent as ɵci, AgendaHourCellComponent as ɵcj, AgendaHourViewLabelsComponent as ɵck, AgendaHalfHourCellComponent as ɵcl, AgendaEventsComponent as ɵcm, AgendaEventComponent as ɵcn, ViewSelectComponent as ɵco, AgendaSelectEventComponent as ɵcp, MASTER_PIPES as ɵcq, ArrayNumberPipe as ɵcr, UCfirstPipe as ɵcs, FileTypeImagePipe as ɵct, BaseFileUploadComponent as ɵcu, InputBoolean as ɵcv, ImageDisplayModule as ɵcw, ImageDisplayComponent as ɵcx, FileUploadModule as ɵcy, TileRenderModule as ɵcz, SharedConnectorService as ɵd, TileRenderComponent as ɵda, FileUploadComponent as ɵdb, FileUploadPopupModule as ɵdc, MultiplePropertyTogglerModule as ɵdd, MultiplePropertyTogglerComponent as ɵde, FileUploadPopupComponent as ɵdf, AppFileDropzoneModule as ɵdg, AppFileDropzoneComponent as ɵdh, DragDropContainerComponent as ɵdi, DragDropService as ɵdj, BaseActivityListComponent as ɵdk, PersonalActivityOverviewComponent as ɵdl, BaseActivityOverviewComponent as ɵdm, TaskModifierComponent as ɵdn, ModifyTaskFormComponent as ɵdo, PersonalActivityOverviewModule as ɵdp, ComponentActivityOverviewModule as ɵdq, TaskModifyerModule as ɵdr, ModifyTaskFormModule as ɵds, TaskDetailsModule as ɵdt, TaskDetailsComponent as ɵdu, BaseActivitySummaryComponent as ɵdv, ExecutiveSummaryBlockModule as ɵdw, ActivitySummaryBlockModule as ɵdx, ActivitySummaryBlockComponent as ɵdy, ExecutiveSummaryBlockComponent as ɵdz, OptionsService as ɵe, StatusSummaryBlockModule as ɵea, StatusSummaryBlockComponent as ɵeb, CreationSummaryBlockModule as ɵec, CreationSummaryBlockComponent as ɵed, NotificationSummaryBlockModule as ɵee, NotificationSummaryBlockComponent as ɵef, ComponentActivityOverviewComponent as ɵeg, ActivityListHeaderModule as ɵeh, WorkflowNotificationToggleModule as ɵei, DirectivesModule as ɵej, AbsoluteOverlayTemplateDirective as ɵek, AppAbsoluteOverlayOutletService as ɵel, AlignWithDirective as ɵem, ClickOutsideDirective as ɵen, WorkflowNotificationToggleComponent as ɵeo, WorkflowNotificationTogglePopupComponent as ɵep, PeriodFilterModule as ɵeq, PeriodFilterComponent as ɵer, PeriodFilterPopupComponent as ɵes, ActivityListHeaderComponent as ɵet, WorkflowInfoTileModule as ɵeu, WorkflowInfoTileComponent as ɵev, DictionaryService as ɵf, LocalizeService as ɵg, IconCacheService as ɵh, LanguageCode as ɵi, SendMethodService as ɵj, SendMethodEmailModule as ɵk, LayoutSelectionModule as ɵl, LayoutSelectionComponent as ɵm, SignatureButtonModule as ɵn, SignatureButtonComponent as ɵo, SendMethodEmailComponent as ɵp, SendMethodPrinterModule as ɵq, PrinterSelectionModule as ɵr, PrinterSelectionComponent as ɵs, SendMethodPrinterComponent as ɵt, SendMethodPdfModule as ɵu, SendMethodPdfComponent as ɵv, TabBarModule as ɵw, TabBarComponent as ɵx, StatusbarPopupComponent as ɵy, StockStatusbarModule as ɵz };
14766
15419
  //# sourceMappingURL=colijnit-sharedcomponents.js.map