@pega/dx-component-builder-sdk 0.24.4 → 0.24.6

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 (140) hide show
  1. package/package.json +1 -1
  2. package/src/constants.js +0 -20
  3. package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.scss.mustache +14 -1
  4. package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.ts.mustache +5 -6
  5. package/src/tasks/create/templates/SDK-Angular/field/Boolean/demo.stories.tsx.mustache +10 -0
  6. package/src/tasks/create/templates/SDK-Angular/field/DateTime/date-time.component.html.mustache +2 -2
  7. package/src/tasks/create/templates/SDK-Angular/field/DateTime/date-time.component.scss.mustache +0 -1
  8. package/src/tasks/create/templates/SDK-Angular/field/DateTime/date-time.component.ts.mustache +8 -0
  9. package/src/tasks/create/templates/SDK-Angular/field/Decimal/demo.stories.tsx.mustache +3 -0
  10. package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/demo.stories.tsx.mustache +42 -41
  11. package/src/tasks/create/templates/SDK-Angular/field/Picklist/picklist.component.ts.mustache +0 -3
  12. package/src/tasks/create/templates/SDK-Angular/field/Picklist-Autocomplete/picklist-autocomplete.component.ts.mustache +1 -1
  13. package/src/tasks/create/templates/SDK-Angular/field/Picklist-RadioButtons/picklist-radio-buttons.component.ts.mustache +1 -3
  14. package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/text-paragraph.component.ts.mustache +0 -2
  15. package/src/tasks/create/templates/SDK-Angular/template/FORM/form.component.html.mustache +3 -4
  16. package/src/tasks/create/templates/SDK-Angular/template/FORM/form.component.ts.mustache +0 -1
  17. package/src/tasks/create/templates/SDK-Angular/template/FORM-region/form.component.html.mustache +1 -1
  18. package/src/tasks/create/templates/SDK-Angular/widget/CASE/case.component.ts.mustache +5 -5
  19. package/src/tasks/create/templates/SDK-Angular/widget/CASE/demo.stories.tsx.mustache +35 -34
  20. package/src/tasks/create/templates/SDK-Angular/widget/PAGE/demo.stories.tsx.mustache +27 -26
  21. package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/page-case.component.html.mustache +0 -2
  22. package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/material-case-summary/material-case-summary.component.html +6 -6
  23. package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/operator/operator.component.ts +4 -1
  24. package/tests/assets/sdk-a/components/create/override-sdk/field/check-box/check-box.component.ts +5 -6
  25. package/tests/assets/sdk-a/components/create/override-sdk/field/date-time/date-time.component.html +2 -2
  26. package/tests/assets/sdk-a/components/create/override-sdk/field/date-time/date-time.component.ts +9 -0
  27. package/tests/assets/sdk-a/components/create/override-sdk/field/rich-text/config-ext.json +11 -0
  28. package/tests/assets/sdk-a/components/create/override-sdk/infra/assignment/assignment.component.ts +7 -32
  29. package/tests/assets/sdk-a/components/create/override-sdk/infra/flow-container/flow-container.component.html +7 -3
  30. package/tests/assets/sdk-a/components/create/override-sdk/infra/flow-container/flow-container.component.ts +15 -8
  31. package/tests/assets/sdk-a/components/create/override-sdk/infra/modal-view-container/modal-view-container.component.ts +40 -7
  32. package/tests/assets/sdk-a/components/create/override-sdk/infra/view/view.component.ts +1 -1
  33. package/tests/assets/sdk-a/components/create/override-sdk/template/banner-page/config-ext.json +10 -0
  34. package/tests/assets/sdk-a/components/create/override-sdk/template/inline-dashboard-page/config-ext.json +10 -0
  35. package/tests/assets/sdk-a/components/create/override-sdk/template/list-view/list-view.component.ts +1 -1
  36. package/tests/assets/sdk-a/components/create/override-sdk/template/simple-table-manual/simple-table-manual.component.ts +1 -3
  37. package/tests/assets/sdk-a/components/create/override-sdk/widget/quick-create/config-ext.json +10 -0
  38. package/tests/assets/sdk-a/components/create/override-sdk/widget/todo/todo.component.html +2 -1
  39. package/tests/assets/sdk-a/components/create/override-sdk/widget/todo/todo.component.ts +1 -1
  40. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-boolean/demo.stories.tsx +10 -0
  41. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-boolean/pega-dxil-my-boolean.component.scss +14 -1
  42. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-boolean/pega-dxil-my-boolean.component.ts +5 -6
  43. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-date-time/pega-dxil-my-date-time.component.html +2 -2
  44. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-date-time/pega-dxil-my-date-time.component.scss +0 -1
  45. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-date-time/pega-dxil-my-date-time.component.ts +8 -0
  46. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-decimal/demo.stories.tsx +3 -0
  47. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-icon-button-url/demo.stories.tsx +42 -41
  48. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-paragraph/pega-dxil-my-paragraph.component.ts +0 -2
  49. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-picklist/pega-dxil-my-picklist.component.ts +0 -3
  50. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-radiobuttons/pega-dxil-my-radiobuttons.component.ts +1 -3
  51. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-searchbox/pega-dxil-my-searchbox.component.ts +1 -1
  52. package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/pega-dxil-my-form.component.html +3 -4
  53. package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/pega-dxil-my-form.component.ts +0 -1
  54. package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-two-column-form/pega-dxil-my-two-column-form.component.html +1 -1
  55. package/tests/assets/sdk-a/components/createAll/custom-sdk/widget/pega-dxil-my-case-widget/demo.stories.tsx +35 -34
  56. package/tests/assets/sdk-a/components/createAll/custom-sdk/widget/pega-dxil-my-case-widget/pega-dxil-my-case-widget.component.ts +5 -5
  57. package/tests/assets/sdk-a/components/createAll/custom-sdk/widget/pega-dxil-my-page-case-widget/pega-dxil-my-page-case-widget.component.html +0 -2
  58. package/tests/assets/sdk-a/components/createAll/custom-sdk/widget/pega-dxil-my-page-widget/demo.stories.tsx +27 -26
  59. package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/material-case-summary/material-case-summary.component.html +6 -6
  60. package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/operator/operator.component.ts +4 -1
  61. package/tests/assets/sdk-a/components/createAll/override-sdk/field/check-box/check-box.component.ts +5 -6
  62. package/tests/assets/sdk-a/components/createAll/override-sdk/field/date-time/date-time.component.html +2 -2
  63. package/tests/assets/sdk-a/components/createAll/override-sdk/field/date-time/date-time.component.ts +9 -0
  64. package/tests/assets/sdk-a/components/createAll/override-sdk/field/rich-text/config-ext.json +11 -0
  65. package/tests/assets/sdk-a/components/createAll/override-sdk/infra/assignment/assignment.component.ts +7 -32
  66. package/tests/assets/sdk-a/components/createAll/override-sdk/infra/flow-container/flow-container.component.html +7 -3
  67. package/tests/assets/sdk-a/components/createAll/override-sdk/infra/flow-container/flow-container.component.ts +15 -8
  68. package/tests/assets/sdk-a/components/createAll/override-sdk/infra/modal-view-container/modal-view-container.component.ts +40 -7
  69. package/tests/assets/sdk-a/components/createAll/override-sdk/infra/view/view.component.ts +1 -1
  70. package/tests/assets/sdk-a/components/createAll/override-sdk/template/banner-page/config-ext.json +10 -0
  71. package/tests/assets/sdk-a/components/createAll/override-sdk/template/inline-dashboard-page/config-ext.json +10 -0
  72. package/tests/assets/sdk-a/components/createAll/override-sdk/template/list-view/list-view.component.ts +1 -1
  73. package/tests/assets/sdk-a/components/createAll/override-sdk/template/simple-table-manual/simple-table-manual.component.ts +1 -3
  74. package/tests/assets/sdk-a/components/createAll/override-sdk/widget/quick-create/config-ext.json +10 -0
  75. package/tests/assets/sdk-a/components/createAll/override-sdk/widget/todo/todo.component.html +2 -1
  76. package/tests/assets/sdk-a/components/createAll/override-sdk/widget/todo/todo.component.ts +1 -1
  77. package/tests/assets/sdk-r/components/create/custom-constellation/field/Pega_DXIL_MyTestText/create-nonce.ts +5 -0
  78. package/tests/assets/sdk-r/components/create/custom-constellation/field/Pega_DXIL_MyTestText/index.tsx +1 -0
  79. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/create-nonce.ts +5 -0
  80. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/index.tsx +1 -0
  81. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/create-nonce.ts +5 -0
  82. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/index.tsx +1 -0
  83. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/create-nonce.ts +5 -0
  84. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/index.tsx +1 -0
  85. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/create-nonce.ts +5 -0
  86. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/index.tsx +1 -0
  87. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/create-nonce.ts +5 -0
  88. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/index.tsx +1 -0
  89. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/create-nonce.ts +5 -0
  90. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/index.tsx +1 -0
  91. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/create-nonce.ts +5 -0
  92. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +15 -10
  93. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/index.tsx +1 -0
  94. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/create-nonce.ts +5 -0
  95. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/index.tsx +1 -0
  96. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/create-nonce.ts +5 -0
  97. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/index.tsx +1 -0
  98. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/create-nonce.ts +5 -0
  99. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/index.tsx +1 -0
  100. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPhone/create-nonce.ts +5 -0
  101. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPhone/index.tsx +1 -0
  102. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/create-nonce.ts +5 -0
  103. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/index.tsx +1 -0
  104. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/create-nonce.ts +5 -0
  105. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/index.tsx +1 -0
  106. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/create-nonce.ts +5 -0
  107. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/index.tsx +1 -0
  108. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyText/create-nonce.ts +5 -0
  109. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyText/index.tsx +1 -0
  110. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/create-nonce.ts +5 -0
  111. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/index.tsx +1 -0
  112. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/create-nonce.ts +5 -0
  113. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/index.tsx +1 -0
  114. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/create-nonce.ts +5 -0
  115. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/index.tsx +1 -0
  116. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/create-nonce.ts +5 -0
  117. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/index.tsx +1 -0
  118. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/create-nonce.ts +5 -0
  119. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/index.tsx +1 -0
  120. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/create-nonce.ts +5 -0
  121. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/index.tsx +1 -0
  122. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +5 -0
  123. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +1 -0
  124. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +5 -0
  125. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/index.tsx +1 -0
  126. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/create-nonce.ts +5 -0
  127. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/demo.stories.tsx +22 -22
  128. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/index.tsx +1 -0
  129. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +5 -0
  130. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +1 -0
  131. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/create-nonce.ts +5 -0
  132. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/demo.stories.tsx +15 -17
  133. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/index.tsx +1 -0
  134. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/config.json +166 -0
  135. package/tests/assets/sdk-a/components/create/override-sdk/infra/reference/reference.component.html +0 -1
  136. package/tests/assets/sdk-a/components/create/override-sdk/infra/reference/reference.component.scss +0 -0
  137. package/tests/assets/sdk-a/components/create/override-sdk/infra/reference/reference.component.ts +0 -165
  138. package/tests/assets/sdk-a/components/createAll/override-sdk/infra/reference/reference.component.html +0 -1
  139. package/tests/assets/sdk-a/components/createAll/override-sdk/infra/reference/reference.component.scss +0 -0
  140. package/tests/assets/sdk-a/components/createAll/override-sdk/infra/reference/reference.component.ts +0 -165
@@ -168,6 +168,15 @@ export class DateTimeComponent implements OnInit, OnDestroy {
168
168
  }
169
169
  }
170
170
 
171
+ fieldOnDateChange(event: any) {
172
+ // this comes from the date pop up
173
+ if (typeof event.value === 'object') {
174
+ // convert date to pega "date" format
175
+ event.value = event.value?.toISOString();
176
+ }
177
+ this.angularPConnectData.actions?.onChange(this, { value: event.value });
178
+ }
179
+
171
180
  fieldOnBlur(event: any) {
172
181
  if (typeof event.value === 'object') {
173
182
  // convert date to pega "date" format
@@ -0,0 +1,11 @@
1
+ {
2
+ "componentKey": "RichText",
3
+ "name": "RichText",
4
+ "label": "Rich text editor",
5
+ "description": "Text (paragraph)",
6
+ "type": "Field",
7
+ "subtype": "Text-Paragraph",
8
+ "icon": "images/pz-text-area-active.svg",
9
+ "properties": [],
10
+ "defaultConfig": {}
11
+ }
@@ -38,7 +38,6 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
38
38
  newPConn$: any;
39
39
  containerName$: string;
40
40
 
41
- bIsRefComponent = false;
42
41
  bInitialized = false;
43
42
 
44
43
  templateName$: string;
@@ -129,45 +128,19 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
129
128
  }
130
129
 
131
130
  updateChanges() {
132
- this.bIsRefComponent = this.checkIfRefComponent(this.pConn$);
133
-
134
- this.ngZone.run(() => {
135
- // pConn$ may be a 'reference' component, so normalize it
136
- // this.pConn$ = ReferenceComponent.normalizePConn(this.pConn$);
137
- this.newPConn$ = ReferenceComponent.normalizePConn(this.pConn$);
138
-
139
- // If 'reference' so we need to get the children of the normalized pConn
140
- if (this.bIsRefComponent) {
141
- // this.arChildren$ = ReferenceComponent.normalizePConnArray(this.pConn$.getChildren());
142
- this.arChildren$ = ReferenceComponent.normalizePConnArray(this.newPConn$.getChildren());
143
- }
144
- });
145
-
146
- this.createButtons();
147
- }
131
+ // pConn$ may be a 'reference' component, so normalize it
132
+ this.newPConn$ = ReferenceComponent.normalizePConn(this.pConn$);
148
133
 
149
- checkIfRefComponent(thePConn: any): boolean {
150
- let bReturn = false;
151
- if (thePConn && thePConn.getComponentName() == 'reference') {
152
- bReturn = true;
134
+ if (this.arChildren$) {
135
+ this.createButtons();
153
136
  }
154
-
155
- return bReturn;
156
137
  }
157
138
 
158
139
  initComponent() {
159
- this.bIsRefComponent = this.checkIfRefComponent(this.pConn$);
160
-
161
140
  // pConn$ may be a 'reference' component, so normalize it
162
141
  // this.pConn$ = ReferenceComponent.normalizePConn(this.pConn$);
163
142
  this.newPConn$ = ReferenceComponent.normalizePConn(this.pConn$);
164
143
 
165
- // If 'reference' so we need to get the children of the normalized pConn
166
- if (this.bIsRefComponent) {
167
- // this.arChildren$ = ReferenceComponent.normalizePConnArray(this.pConn$.getChildren());
168
- this.arChildren$ = ReferenceComponent.normalizePConnArray(this.newPConn$.getChildren());
169
- }
170
-
171
144
  // prevent re-intializing with flowContainer update unless an action is taken
172
145
  this.bReInit = false;
173
146
  this.bHasNavigation$ = false;
@@ -210,7 +183,9 @@ export class AssignmentComponent implements OnInit, OnDestroy, OnChanges {
210
183
  this.approveCase = actionsAPI.approveCase?.bind(actionsAPI);
211
184
  this.rejectCase = actionsAPI.rejectCase?.bind(actionsAPI);
212
185
 
213
- this.createButtons();
186
+ if (this.arChildren$) {
187
+ this.createButtons();
188
+ }
214
189
  }
215
190
 
216
191
  createButtons() {
@@ -8,22 +8,26 @@
8
8
  </div>
9
9
  <div *ngIf="todo_showTodo$">
10
10
  <component-mapper
11
+ *ngIf="pConnectOfActiveContainerItem"
11
12
  name="Todo"
12
13
  [props]="{
13
- pConn$: todo_pConn$,
14
+ pConn$: pConnectOfActiveContainerItem,
14
15
  caseInfoID$: todo_caseInfoID$,
15
16
  datasource$: todo_datasource$,
16
17
  showTodoList$: todo_showTodoList$,
17
18
  headerText$: todo_headerText$,
18
19
  type$: 'TODO',
19
20
  context$: todo_context$,
20
- itemKey$: itemKey$,
21
21
  isConfirm: true
22
22
  }"
23
23
  ></component-mapper>
24
24
  </div>
25
25
  <div *ngIf="!todo_showTodo$">
26
- <component-mapper name="Assignment" [props]="{ pConn$, formGroup$, arChildren$, itemKey$ }"></component-mapper>
26
+ <component-mapper
27
+ *ngIf="pConnectOfActiveContainerItem"
28
+ name="Assignment"
29
+ [props]="{ pConn$: pConnectOfActiveContainerItem, formGroup$, arChildren$, itemKey$ }"
30
+ ></component-mapper>
27
31
  </div>
28
32
  </div>
29
33
  <div *ngIf="bHasCaseMessages$">
@@ -1,14 +1,14 @@
1
- import { Component, OnInit, Input, ChangeDetectorRef, NgZone, forwardRef, OnDestroy } from '@angular/core';
1
+ import { Component, OnInit, Input, ChangeDetectorRef, NgZone, forwardRef, OnDestroy, Injector } from '@angular/core';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import { FormBuilder, FormGroup } from '@angular/forms';
4
4
  import { MatCardModule } from '@angular/material/card';
5
5
  import { publicConstants } from '@pega/pcore-pconnect-typedefs/constants';
6
- import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-components';
7
6
  import { ProgressSpinnerService } from '@pega/angular-sdk-components';
8
7
  import { ReferenceComponent } from '@pega/angular-sdk-components';
9
8
  import { Utils } from '@pega/angular-sdk-components';
10
9
  import { getToDoAssignments, showBanner } from './helpers';
11
10
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
11
+ import { FlowContainerBaseComponent } from '@pega/angular-sdk-components';
12
12
 
13
13
  /**
14
14
  * WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
@@ -32,11 +32,9 @@ interface FlowContainerProps {
32
32
  standalone: true,
33
33
  imports: [CommonModule, MatCardModule, forwardRef(() => ComponentMapperComponent)]
34
34
  })
35
- export class FlowContainerComponent implements OnInit, OnDestroy {
35
+ export class FlowContainerComponent extends FlowContainerBaseComponent implements OnInit, OnDestroy {
36
36
  @Input() pConn$: typeof PConnect;
37
37
 
38
- // For interaction with AngularPConnect
39
- angularPConnectData: AngularPConnectData = {};
40
38
  pCoreConstants: typeof publicConstants;
41
39
  configProps$: FlowContainerProps;
42
40
 
@@ -72,14 +70,17 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
72
70
  banners: any[];
73
71
  // itemKey: string = ""; // JA - this is what Nebula/Constellation uses to pass to finishAssignment, navigateToStep
74
72
 
73
+ pConnectOfActiveContainerItem;
74
+
75
75
  constructor(
76
- private angularPConnect: AngularPConnectService,
76
+ injector: Injector,
77
77
  private cdRef: ChangeDetectorRef,
78
78
  private psService: ProgressSpinnerService,
79
79
  private fb: FormBuilder,
80
80
  private ngZone: NgZone,
81
81
  private utils: Utils
82
82
  ) {
83
+ super(injector);
83
84
  // create the formGroup
84
85
  this.formGroup$ = this.fb.group({ hideRequired: false });
85
86
  }
@@ -148,10 +149,14 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
148
149
  // Should always check the bridge to see if the component should update itself (re-render)
149
150
  const bUpdateSelf = this.angularPConnect.shouldComponentUpdate(this);
150
151
 
152
+ const pConn = this.pConnectOfActiveContainerItem || this.pConn$;
153
+ const caseViewModeFromProps = this.angularPConnect.getComponentProp(this, 'caseViewMode');
154
+ const caseViewModeFromRedux = pConn.getValue('context_data.caseViewMode', '');
155
+
151
156
  // ONLY call updateSelf when the component should update
152
157
  // AND removing the "gate" that was put there since shouldComponentUpdate
153
158
  // should be the real "gate"
154
- if (bUpdateSelf) {
159
+ if (bUpdateSelf || caseViewModeFromProps !== caseViewModeFromRedux) {
155
160
  // don't want to redraw the flow container when there are page messages, because
156
161
  // the redraw causes us to loose the errors on the elements
157
162
  const completeProps = this.angularPConnect.getCurrentCompleteProps(this) as FlowContainerProps;
@@ -369,7 +374,9 @@ export class FlowContainerComponent implements OnInit, OnDestroy {
369
374
  // const { getPConnect } = this.arChildren$[0].getPConnect();
370
375
  const localPConn = this.arChildren$[0].getPConnect();
371
376
 
372
- const caseViewMode = this.pConn$.getValue('context_data.caseViewMode');
377
+ this.pConnectOfActiveContainerItem = this.getPConnectOfActiveContainerItem(this.pConn$) || this.pConn$;
378
+
379
+ const caseViewMode = this.pConnectOfActiveContainerItem.getValue('context_data.caseViewMode');
373
380
  this.bShowBanner = showBanner(this.pConn$);
374
381
 
375
382
  if (caseViewMode && caseViewMode == 'review') {
@@ -6,6 +6,7 @@ import { AngularPConnectData, AngularPConnectService } from '@pega/angular-sdk-c
6
6
  import { ProgressSpinnerService } from '@pega/angular-sdk-components';
7
7
  import { ComponentMapperComponent } from '@pega/angular-sdk-components';
8
8
  import { getBanners } from '@pega/angular-sdk-components';
9
+ import { ReferenceComponent } from '@pega/angular-sdk-components';
9
10
 
10
11
  /**
11
12
  * WARNING: It is not expected that this file should be modified. It is part of infrastructure code that works with
@@ -200,7 +201,7 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
200
201
  }
201
202
 
202
203
  createView(routingInfo, currentItem, latestItem, key) {
203
- const configObject = this.getConfigObject(currentItem, this.pConn$);
204
+ const configObject = this.getConfigObject(currentItem, null, false);
204
205
  const newComp = configObject?.getPConnect();
205
206
  // const newCompName = newComp.getComponentName();
206
207
  const caseInfo = newComp && newComp.getDataObject() && newComp.getDataObject().caseInfo ? newComp.getDataObject().caseInfo : null;
@@ -247,8 +248,17 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
247
248
  ID,
248
249
  `${theNewCaseInfo?.getClassName()}!CASE!${theNewCaseInfo.getName()}`.toUpperCase()
249
250
  );
250
- // // update children with new view's children
251
- this.arChildren$ = newComp.getChildren() as any[];
251
+
252
+ const bIsRefComponent = this.checkIfRefComponent(newComp);
253
+
254
+ if (bIsRefComponent) {
255
+ const newPConn = ReferenceComponent.normalizePConn(newComp);
256
+ this.arChildren$ = ReferenceComponent.normalizePConnArray(newPConn.getChildren());
257
+ } else {
258
+ // update children with new view's children
259
+ this.arChildren$ = newComp.getChildren();
260
+ }
261
+
252
262
  this.bShowModal$ = true;
253
263
 
254
264
  // for when non modal
@@ -279,16 +289,30 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
279
289
  });
280
290
  }
281
291
 
282
- getConfigObject(item, pConnect) {
292
+ getConfigObject(item, pConnect, isReverseCoexistence = false) {
293
+ let config;
294
+ if (isReverseCoexistence) {
295
+ config = {
296
+ options: {
297
+ pageReference: pConnect?.getPageReference(),
298
+ hasForm: true,
299
+ containerName: pConnect?.getContainerName() || PCore.getConstants().MODAL
300
+ }
301
+ };
302
+ return PCore.createPConnect(config);
303
+ }
283
304
  if (item) {
284
- const { context, view } = item;
285
- const config = {
305
+ const { context, view, isBulkAction } = item;
306
+ const target = PCore.getContainerUtils().getTargetFromContainerItemID(context);
307
+ config = {
286
308
  meta: view,
287
309
  options: {
288
310
  context,
289
311
  pageReference: view.config.context || pConnect.getPageReference(),
290
312
  hasForm: true,
291
- containerName: pConnect?.getContainerName() || PCore.getConstants().MODAL
313
+ ...(isBulkAction && { isBulkAction }),
314
+ containerName: pConnect?.getContainerName() || PCore.getConstants().MODAL,
315
+ target
292
316
  }
293
317
  };
294
318
  return PCore.createPConnect(config);
@@ -296,6 +320,15 @@ export class ModalViewContainerComponent implements OnInit, OnDestroy {
296
320
  return null;
297
321
  }
298
322
 
323
+ checkIfRefComponent(thePConn: any): boolean {
324
+ let bReturn = false;
325
+ if (thePConn && thePConn.getComponentName() == 'reference') {
326
+ bReturn = true;
327
+ }
328
+
329
+ return bReturn;
330
+ }
331
+
299
332
  onAlertState(bData: boolean) {
300
333
  this.bAlertState = bData;
301
334
  this.bShowCancelAlert$ = false;
@@ -159,7 +159,7 @@ export class ViewComponent implements OnInit, OnDestroy, OnChanges {
159
159
  * The resolution lies in transferring this responsibility to the Reference component, eliminating the need for this code when Reference
160
160
  * component is able to handle it.
161
161
  */
162
- if (this.pConn$.getPageReference().length > 'caseInfo.content'.length) {
162
+ if (!this.configProps$.visibility && this.pConn$.getPageReference().length > 'caseInfo.content'.length) {
163
163
  this.visibility$ = evaluateVisibility(this.pConn$);
164
164
  }
165
165
 
@@ -0,0 +1,10 @@
1
+ {
2
+ "componentKey": "BannerPage",
3
+ "name": "BannerPage",
4
+ "label": "Banner",
5
+ "description": "Banner Page Template",
6
+ "type": "Template",
7
+ "subtype": "PAGE",
8
+ "icon": "BannerPage.svg",
9
+ "properties": []
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "componentKey": "InlineDashboardPage",
3
+ "name": "InlineDashboardPage",
4
+ "label": "Inline Dashboard",
5
+ "description": "Inline Dashboard Page Template",
6
+ "type": "Template",
7
+ "subtype": "PAGE",
8
+ "icon": "InlineDashboardPage.svg",
9
+ "properties": []
10
+ }
@@ -172,7 +172,7 @@ export class ListViewComponent implements OnInit, OnDestroy {
172
172
  /** If compositeKeys is defined, use dynamic value, else fallback to pyID or pyGUID. */
173
173
  this.compositeKeys = this.configProps$?.compositeKeys;
174
174
  this.rowID = this.compositeKeys && this.compositeKeys?.length === 1 ? this.compositeKeys[0] : defRowID;
175
- this.bShowSearch$ = this.utils.getBooleanValue(this.configProps$.globalSearch ? this.configProps$.globalSearch : this.payload.globalSearch);
175
+ this.bShowSearch$ = this.utils.getBooleanValue(this.configProps$?.globalSearch ? this.configProps$.globalSearch : this.payload?.globalSearch);
176
176
  this.bColumnReorder$ = this.utils.getBooleanValue(this.configProps$.reorderFields);
177
177
  this.bGrouping$ = this.utils.getBooleanValue(this.configProps$.grouping);
178
178
  this.showDynamicFields = this.configProps$?.showDynamicFields;
@@ -960,9 +960,7 @@ export class SimpleTableManualComponent implements OnInit, OnDestroy {
960
960
  this.rawFields?.forEach(item => {
961
961
  const referenceListData = getReferenceList(this.pConn$);
962
962
  const isDatapage = referenceListData.startsWith('D_');
963
- const pageReferenceValue = isDatapage
964
- ? `${referenceListData}[${index}]`
965
- : `${this.pConn$.getPageReference()}${referenceListData.substring(referenceListData.lastIndexOf('.'))}[${index}]`;
963
+ const pageReferenceValue = isDatapage ? `${referenceListData}[${index}]` : `${this.pConn$.getPageReference()}${referenceListData}[${index}]`;
966
964
  const config = {
967
965
  meta: item,
968
966
  options: {
@@ -0,0 +1,10 @@
1
+ {
2
+ "componentKey": "QuickCreate",
3
+ "name": "QuickCreate",
4
+ "label": "Quick create",
5
+ "description": "Quick create widget",
6
+ "type": "Widget",
7
+ "subtype": "PAGE",
8
+ "properties": [],
9
+ "defaultConfig": {}
10
+ }
@@ -16,9 +16,10 @@
16
16
  <div class="psdk-todo-assignment-data">
17
17
  <div class="psdk-todo-assignment-task">
18
18
  {{ localizedVal('Task in', localeCategory) }}
19
- <button class="psdk-todo-id" style="cursor: pointer" (click)="clickGo(assignment)">
19
+ <button class="psdk-todo-id" style="cursor: pointer" (click)="clickGo(assignment)" *ngIf="!isConfirm || canPerform; else readOnlyText">
20
20
  {{ assignment.name }} {{ getID(assignment) }}
21
21
  </button>
22
+ <ng-template #readOnlyText> {{ assignment.name }} {{ getID(assignment) }} </ng-template>
22
23
  <span *ngIf="assignment.status != undefined">
23
24
  &bull; <span class="psdk-todo-assignment-status">{{ assignment?.status }}</span>
24
25
  </span>
@@ -231,7 +231,7 @@ export class TodoComponent implements OnInit, OnDestroy, OnChanges {
231
231
  const sTarget = this.pConn$.getContainerName();
232
232
  const sTargetContainerName = sTarget;
233
233
 
234
- const options: any = { containerName: sTargetContainerName };
234
+ const options: any = { containerName: sTargetContainerName, channelName: '' };
235
235
 
236
236
  if (classname === null || classname === '') {
237
237
  classname = this.pConn$.getCaseInfo().getClassName();
@@ -18,6 +18,16 @@ const meta: Meta<PegaDxilMyBooleanComponent> = {
18
18
  resolveConfigProps: props => props,
19
19
  getConfigProps: () => {
20
20
  return configProps;
21
+ },
22
+ getActionsApi: () => {
23
+ return {
24
+ updateFieldValue: () => {
25
+ /* nothing */
26
+ },
27
+ triggerFieldChange: () => {
28
+ /* nothing */
29
+ }
30
+ };
21
31
  },
22
32
  getStateProps: () => {
23
33
  return stateProps;
@@ -8,10 +8,10 @@
8
8
  top: 0rem;
9
9
  margin-top: 0.625rem;
10
10
  font-size: 0.875rem;
11
- display: block;
12
11
  transform: translateY(-1.28125em) scale(0.75) perspective(100px) translateZ(0.001px);
13
12
  -ms-transform: translateY(-1.28125em) scale(0.75);
14
13
  width: 133.33333%;
14
+ color: rgba(0, 0, 0, 0.6);
15
15
  }
16
16
 
17
17
  .psdk-data-readonly {
@@ -22,3 +22,16 @@
22
22
  ::ng-deep .mat-mdc-form-field-infix {
23
23
  width: auto;
24
24
  }
25
+
26
+ p {
27
+ font-size: 0.75rem;
28
+ color: rgba(0, 0, 0, 0.58);
29
+ }
30
+
31
+ mat-checkbox {
32
+ margin-left: -11px;
33
+ }
34
+
35
+ .mat-mdc-option {
36
+ margin-left: -16px;
37
+ }
@@ -193,15 +193,14 @@ export class PegaDxilMyBooleanComponent implements OnInit, OnDestroy {
193
193
  this.bDisabled$ = this.utils.getBooleanValue(this.configProps$.disabled);
194
194
  }
195
195
 
196
- if (this.bDisabled$) {
197
- this.fieldControl.disable();
198
- } else {
199
- this.fieldControl.enable();
200
- }
201
-
202
196
  if (this.configProps$.readOnly != null) {
203
197
  this.bReadonly$ = this.utils.getBooleanValue(this.configProps$.readOnly);
198
+ }
199
+
200
+ if (this.bDisabled$ || this.bReadonly$) {
204
201
  this.fieldControl.disable();
202
+ } else {
203
+ this.fieldControl.enable();
205
204
  }
206
205
 
207
206
  this.componentReference = (this.pConn$.getStateProps() as any).value;
@@ -13,11 +13,11 @@
13
13
  [placeholder]="placeholder"
14
14
  [formControl]="fieldControl"
15
15
  (blur)="fieldOnBlur($event)"
16
- (dateTimeChange)="fieldOnBlur($event)"
16
+ (dateTimeChange)="fieldOnDateChange($event)"
17
17
  [value]="value$"
18
18
  [required]="bRequired$"
19
19
  />
20
- <mat-datepicker-toggle matSuffix [for]="$any(dtPicker)" [owlDateTimeTrigger]="dtPicker"></mat-datepicker-toggle>
20
+ <mat-datepicker-toggle matSuffix [owlDateTimeTrigger]="dtPicker"></mat-datepicker-toggle>
21
21
  <owl-date-time #dtPicker></owl-date-time>
22
22
  <mat-error *ngIf="fieldControl?.invalid">{{ getErrorMessage() }}</mat-error>
23
23
  </mat-form-field>
@@ -78,4 +78,3 @@
78
78
  background: var(--mat-datepicker-calendar-header-divider-color);
79
79
  }
80
80
  }
81
-
@@ -168,6 +168,14 @@ export class PegaDxilMyDateTimeComponent implements OnInit, OnDestroy {
168
168
  }
169
169
  }
170
170
 
171
+ fieldOnDateChange(event: any) {
172
+ if (typeof event.value === 'object') {
173
+ // convert date to pega "date" format
174
+ event.value = event.value?.toISOString();
175
+ }
176
+ this.angularPConnectData.actions?.onChange(this, { value: event.value });
177
+ }
178
+
171
179
  fieldOnBlur(event: any) {
172
180
  if (typeof event.value === 'object') {
173
181
  // convert date to pega "date" format
@@ -20,6 +20,9 @@ const meta: Meta<PegaDxilMyDecimalComponent> = {
20
20
  getStateProps: () => {
21
21
  return stateProps;
22
22
  },
23
+ getComponentName: () => {
24
+ return 'Currency';
25
+ },
23
26
  getActionsApi: () => {
24
27
  return {
25
28
  updateFieldValue: () => {
@@ -5,52 +5,53 @@ import { configProps, stateListData, stateProps } from './mock';
5
5
 
6
6
  import { PegaDxilMyIconButtonUrlComponent } from './pega-dxil-my-icon-button-url.component';
7
7
 
8
- window.PCore = {
9
- ...window.PCore,
10
- getConstants: () => {
11
- return {
12
- CASE_INFO: {
13
- CASE_INFO_ID: 'caseInfo.ID'
14
- }
15
- } as any;
16
- },
17
- getDataApiUtils: () => {
18
- return {
19
- getData: () => {
20
- return Promise.resolve(stateListData);
21
- }
22
- } as any;
23
- }
24
- };
25
-
26
8
  const meta: Meta<PegaDxilMyIconButtonUrlComponent> = {
27
9
  title: 'PegaDxilMyIconButtonUrl',
28
10
  component: PegaDxilMyIconButtonUrlComponent,
29
11
  excludeStories: /.*Data$/,
30
- render: (args: PegaDxilMyIconButtonUrlComponent) => ({
31
- props: {
32
- ...args,
33
- pConn$: {
34
- resolveConfigProps: props => props,
35
- getConfigProps: () => {
36
- return configProps;
37
- },
38
- getValue: value => {
39
- return value;
40
- },
41
- getContextName: () => {
42
- return 'app/primary_1';
43
- },
44
- getStateProps: () => {
45
- return stateProps;
46
- },
47
- getLocalizedValue: value => {
48
- return value;
49
- }
50
- } as any,
51
- formGroup$: new FormBuilder().group({})
12
+ render: (args: PegaDxilMyIconButtonUrlComponent) => {
13
+ window.PCore = {
14
+ ...window.PCore,
15
+ getConstants: () => {
16
+ return {
17
+ CASE_INFO: {
18
+ CASE_INFO_ID: 'caseInfo.ID'
19
+ }
20
+ } as any;
21
+ },
22
+ getDataApiUtils: () => {
23
+ return {
24
+ getData: () => {
25
+ return Promise.resolve(stateListData);
26
+ }
27
+ } as any;
28
+ }
29
+ };
30
+ return {
31
+ props: {
32
+ ...args,
33
+ pConn$: {
34
+ resolveConfigProps: props => props,
35
+ getConfigProps: () => {
36
+ return configProps;
37
+ },
38
+ getValue: value => {
39
+ return value;
40
+ },
41
+ getContextName: () => {
42
+ return 'app/primary_1';
43
+ },
44
+ getStateProps: () => {
45
+ return stateProps;
46
+ },
47
+ getLocalizedValue: value => {
48
+ return value;
49
+ }
50
+ } as any,
51
+ formGroup$: new FormBuilder().group({})
52
+ }
52
53
  }
53
- })
54
+ }
54
55
  };
55
56
 
56
57
  export default meta;
@@ -107,8 +107,6 @@ export class PegaDxilMyParagraphComponent implements OnInit, OnDestroy {
107
107
  if (this.configProps$.value != undefined) {
108
108
  this.value$ = this.configProps$.value;
109
109
  }
110
- // @ts-ignore - Property 'getFieldMetadata' is private and only accessible within class 'C11nEnv'.
111
- // @ts-ignore - Property 'getRawConfigProps' is private and only accessible within class 'C11nEnv'
112
110
  this.nMaxLength$ = this.pConn$.getFieldMetadata(this.pConn$.getRawConfigProps()?.value)?.maxLength || 100;
113
111
  this.testId = this.configProps$.testId;
114
112
  this.displayMode$ = this.configProps$.displayMode;
@@ -159,7 +159,6 @@ export class PegaDxilMyPicklistComponent implements OnInit, OnDestroy {
159
159
 
160
160
  this.componentReference = (this.pConn$.getStateProps() as any).value;
161
161
 
162
- // @ts-ignore - parameter “contextName” for getDataObject method should be optional
163
162
  const optionsList = [...this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject())];
164
163
  optionsList?.unshift({ key: 'Select', value: this.pConn$.getLocalizedValue('Select...', '', '') });
165
164
  this.options$ = optionsList;
@@ -184,7 +183,6 @@ export class PegaDxilMyPicklistComponent implements OnInit, OnDestroy {
184
183
  this.localizedValue = this.pConn$.getLocalizedValue(
185
184
  this.value$,
186
185
  this.localePath,
187
- // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'.
188
186
  this.pConn$.getLocaleRuleNameFromKeys(this.localeClass, this.localeContext, this.localeName)
189
187
  );
190
188
  // trigger display of error message with field control
@@ -223,7 +221,6 @@ export class PegaDxilMyPicklistComponent implements OnInit, OnDestroy {
223
221
  return this.pConn$.getLocalizedValue(
224
222
  opt.value,
225
223
  this.localePath,
226
- // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'.
227
224
  this.pConn$.getLocaleRuleNameFromKeys(this.localeClass, this.localeContext, this.localeName)
228
225
  );
229
226
  }