@pega/dx-component-builder-sdk 0.24.4 → 0.25.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 (112) 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.scss.mustache +0 -1
  7. package/src/tasks/create/templates/SDK-Angular/field/Decimal/demo.stories.tsx.mustache +3 -0
  8. package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/demo.stories.tsx.mustache +42 -41
  9. package/src/tasks/create/templates/SDK-Angular/field/Picklist/picklist.component.ts.mustache +0 -3
  10. package/src/tasks/create/templates/SDK-Angular/field/Picklist-Autocomplete/picklist-autocomplete.component.ts.mustache +1 -1
  11. package/src/tasks/create/templates/SDK-Angular/field/Picklist-RadioButtons/picklist-radio-buttons.component.ts.mustache +1 -3
  12. package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/text-paragraph.component.ts.mustache +0 -2
  13. package/src/tasks/create/templates/SDK-Angular/template/FORM/form.component.html.mustache +3 -4
  14. package/src/tasks/create/templates/SDK-Angular/template/FORM/form.component.ts.mustache +0 -1
  15. package/src/tasks/create/templates/SDK-Angular/template/FORM-region/form.component.html.mustache +1 -1
  16. package/src/tasks/create/templates/SDK-Angular/widget/CASE/case.component.ts.mustache +5 -5
  17. package/src/tasks/create/templates/SDK-Angular/widget/CASE/demo.stories.tsx.mustache +35 -34
  18. package/src/tasks/create/templates/SDK-Angular/widget/PAGE/demo.stories.tsx.mustache +27 -26
  19. package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/page-case.component.html.mustache +0 -2
  20. package/tests/assets/sdk-a/components/create/override-sdk/designSystemExtension/material-case-summary/material-case-summary.component.html +6 -6
  21. package/tests/assets/sdk-a/components/create/override-sdk/field/check-box/check-box.component.ts +5 -6
  22. package/tests/assets/sdk-a/components/create/override-sdk/infra/flow-container/flow-container.component.html +0 -1
  23. package/tests/assets/sdk-a/components/create/override-sdk/infra/view/view.component.ts +1 -1
  24. package/tests/assets/sdk-a/components/create/override-sdk/template/list-view/list-view.component.ts +1 -1
  25. package/tests/assets/sdk-a/components/create/override-sdk/template/simple-table-manual/simple-table-manual.component.ts +1 -3
  26. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-boolean/demo.stories.tsx +10 -0
  27. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-boolean/pega-dxil-my-boolean.component.scss +14 -1
  28. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-boolean/pega-dxil-my-boolean.component.ts +5 -6
  29. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-date-time/pega-dxil-my-date-time.component.scss +0 -1
  30. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-decimal/demo.stories.tsx +3 -0
  31. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-icon-button-url/demo.stories.tsx +42 -41
  32. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-paragraph/pega-dxil-my-paragraph.component.ts +0 -2
  33. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-picklist/pega-dxil-my-picklist.component.ts +0 -3
  34. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-radiobuttons/pega-dxil-my-radiobuttons.component.ts +1 -3
  35. package/tests/assets/sdk-a/components/createAll/custom-sdk/field/pega-dxil-my-searchbox/pega-dxil-my-searchbox.component.ts +1 -1
  36. package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/pega-dxil-my-form.component.html +3 -4
  37. package/tests/assets/sdk-a/components/createAll/custom-sdk/template/pega-dxil-my-form/pega-dxil-my-form.component.ts +0 -1
  38. 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
  39. package/tests/assets/sdk-a/components/createAll/custom-sdk/widget/pega-dxil-my-case-widget/demo.stories.tsx +35 -34
  40. package/tests/assets/sdk-a/components/createAll/custom-sdk/widget/pega-dxil-my-case-widget/pega-dxil-my-case-widget.component.ts +5 -5
  41. 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
  42. package/tests/assets/sdk-a/components/createAll/custom-sdk/widget/pega-dxil-my-page-widget/demo.stories.tsx +27 -26
  43. package/tests/assets/sdk-a/components/createAll/override-sdk/designSystemExtension/material-case-summary/material-case-summary.component.html +6 -6
  44. package/tests/assets/sdk-a/components/createAll/override-sdk/field/check-box/check-box.component.ts +5 -6
  45. package/tests/assets/sdk-a/components/createAll/override-sdk/infra/flow-container/flow-container.component.html +0 -1
  46. package/tests/assets/sdk-a/components/createAll/override-sdk/infra/view/view.component.ts +1 -1
  47. package/tests/assets/sdk-a/components/createAll/override-sdk/template/list-view/list-view.component.ts +1 -1
  48. package/tests/assets/sdk-a/components/createAll/override-sdk/template/simple-table-manual/simple-table-manual.component.ts +1 -3
  49. package/tests/assets/sdk-r/components/create/custom-constellation/field/Pega_DXIL_MyTestText/create-nonce.ts +5 -0
  50. package/tests/assets/sdk-r/components/create/custom-constellation/field/Pega_DXIL_MyTestText/index.tsx +1 -0
  51. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/create-nonce.ts +5 -0
  52. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyBoolean/index.tsx +1 -0
  53. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/create-nonce.ts +5 -0
  54. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyCurrency/index.tsx +1 -0
  55. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/create-nonce.ts +5 -0
  56. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDate/index.tsx +1 -0
  57. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/create-nonce.ts +5 -0
  58. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDateTime/index.tsx +1 -0
  59. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/create-nonce.ts +5 -0
  60. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyDecimal/index.tsx +1 -0
  61. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/create-nonce.ts +5 -0
  62. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyEmail/index.tsx +1 -0
  63. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/create-nonce.ts +5 -0
  64. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +15 -10
  65. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyIconButtonURL/index.tsx +1 -0
  66. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/create-nonce.ts +5 -0
  67. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyInteger/index.tsx +1 -0
  68. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/create-nonce.ts +5 -0
  69. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyParagraph/index.tsx +1 -0
  70. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/create-nonce.ts +5 -0
  71. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPercentage/index.tsx +1 -0
  72. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPhone/create-nonce.ts +5 -0
  73. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPhone/index.tsx +1 -0
  74. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/create-nonce.ts +5 -0
  75. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyPicklist/index.tsx +1 -0
  76. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/create-nonce.ts +5 -0
  77. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyRadiobuttons/index.tsx +1 -0
  78. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/create-nonce.ts +5 -0
  79. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MySearchbox/index.tsx +1 -0
  80. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyText/create-nonce.ts +5 -0
  81. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyText/index.tsx +1 -0
  82. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/create-nonce.ts +5 -0
  83. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTextInput/index.tsx +1 -0
  84. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/create-nonce.ts +5 -0
  85. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyTimeOfDay/index.tsx +1 -0
  86. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/create-nonce.ts +5 -0
  87. package/tests/assets/sdk-r/components/createAll/custom-constellation/field/Pega_DXIL_MyURL/index.tsx +1 -0
  88. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/create-nonce.ts +5 -0
  89. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyDetails/index.tsx +1 -0
  90. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/create-nonce.ts +5 -0
  91. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyForm/index.tsx +1 -0
  92. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/create-nonce.ts +5 -0
  93. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyPage/index.tsx +1 -0
  94. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +5 -0
  95. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnDetails/index.tsx +1 -0
  96. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +5 -0
  97. package/tests/assets/sdk-r/components/createAll/custom-constellation/template/Pega_DXIL_MyTwoColumnForm/index.tsx +1 -0
  98. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/create-nonce.ts +5 -0
  99. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/demo.stories.tsx +22 -22
  100. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyCaseWidget/index.tsx +1 -0
  101. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +5 -0
  102. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageCaseWidget/index.tsx +1 -0
  103. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/create-nonce.ts +5 -0
  104. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/demo.stories.tsx +15 -17
  105. package/tests/assets/sdk-r/components/createAll/custom-constellation/widget/Pega_DXIL_MyPageWidget/index.tsx +1 -0
  106. package/tests/assets/sdk-r/components/createAll/custom-sdk/field/Pega_DXIL_MyCurrency/config.json +166 -0
  107. package/tests/assets/sdk-a/components/create/override-sdk/infra/reference/reference.component.html +0 -1
  108. package/tests/assets/sdk-a/components/create/override-sdk/infra/reference/reference.component.scss +0 -0
  109. package/tests/assets/sdk-a/components/create/override-sdk/infra/reference/reference.component.ts +0 -165
  110. package/tests/assets/sdk-a/components/createAll/override-sdk/infra/reference/reference.component.html +0 -1
  111. package/tests/assets/sdk-a/components/createAll/override-sdk/infra/reference/reference.component.scss +0 -0
  112. package/tests/assets/sdk-a/components/createAll/override-sdk/infra/reference/reference.component.ts +0 -165
@@ -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;
@@ -78,4 +78,3 @@
78
78
  background: var(--mat-datepicker-calendar-header-divider-color);
79
79
  }
80
80
  }
81
-
@@ -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
  }
@@ -25,6 +25,7 @@ interface PegaDxilMyRadiobuttonsProps extends PConnFieldProps {
25
25
  selector: 'app-pega-dxil-my-radiobuttons',
26
26
  templateUrl: './pega-dxil-my-radiobuttons.component.html',
27
27
  styleUrls: ['./pega-dxil-my-radiobuttons.component.scss'],
28
+ providers: [Utils],
28
29
  standalone: true,
29
30
  imports: [CommonModule, ReactiveFormsModule, MatFormFieldModule, MatInputModule, MatRadioModule, forwardRef(() => ComponentMapperComponent)]
30
31
  })
@@ -165,7 +166,6 @@ export class PegaDxilMyRadiobuttonsComponent implements OnInit, OnDestroy {
165
166
 
166
167
  this.componentReference = (this.pConn$.getStateProps() as any).value;
167
168
 
168
- // @ts-ignore - parameter “contextName” for getDataObject method should be optional
169
169
  this.options$ = this.utils.getOptionList(this.configProps$, this.pConn$.getDataObject());
170
170
 
171
171
  const propName = (this.pConn$.getStateProps() as any).value;
@@ -185,7 +185,6 @@ export class PegaDxilMyRadiobuttonsComponent implements OnInit, OnDestroy {
185
185
  this.localizedValue = this.pConn$.getLocalizedValue(
186
186
  this.value$,
187
187
  this.localePath,
188
- // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
189
188
  this.pConn$.getLocaleRuleNameFromKeys(this.localeClass, this.localeContext, this.localeName)
190
189
  );
191
190
  // trigger display of error message with field control
@@ -216,7 +215,6 @@ export class PegaDxilMyRadiobuttonsComponent implements OnInit, OnDestroy {
216
215
  return this.pConn$.getLocalizedValue(
217
216
  opt.value,
218
217
  this.localePath,
219
- // @ts-ignore - Property 'getLocaleRuleNameFromKeys' is private and only accessible within class 'C11nEnv'
220
218
  this.pConn$.getLocaleRuleNameFromKeys(this.localeClass, this.localeContext, this.localeName)
221
219
  );
222
220
  }
@@ -118,7 +118,7 @@ export class PegaDxilMySearchboxComponent implements OnInit, OnDestroy {
118
118
 
119
119
  private _filter(value: string): string[] {
120
120
  const filterVal = (value || this.filterValue).toLowerCase();
121
- return this.options$?.filter(option => option.value.toLowerCase().includes(filterVal));
121
+ return this.options$?.filter(option => option.value?.toLowerCase().includes(filterVal));
122
122
  }
123
123
 
124
124
  // Callback passed when subscribing to store change
@@ -1,10 +1,9 @@
1
1
  <!-- When adding a component here, add the same component in 'region' template as well -->
2
2
  <div *ngIf="!NO_HEADER_TEMPLATES.includes(template) && showLabel">
3
- <div class="template-title-container">{{label}}</div>
3
+ <div class="template-title-container">{{ label }}</div>
4
4
  </div>
5
- <div *ngIf="instructions" class='psdk-default-form-instruction-text'>
6
- <div key="instructions" id="instruction-text" [innerHTML]="instructions">
7
- </div>
5
+ <div *ngIf="instructions" class="psdk-default-form-instruction-text">
6
+ <div key="instructions" id="instruction-text" [innerHTML]="instructions"></div>
8
7
  </div>
9
8
  <div [className]="divClass$">
10
9
  <div *ngFor="let kid of arChildren$" [ngClass]="{ 'grid-column': kid.getPConnect().getComponentName() === 'View' }">
@@ -51,7 +51,6 @@ export class PegaDxilMyFormComponent implements OnInit {
51
51
  this.label = propToUse?.label;
52
52
  const kids = this.pConn$.getChildren() as any[];
53
53
  this.instructions = this.templateUtils.getInstructions(this.pConn$, configProps?.instructions);
54
- console.log(`instructions${this.instructions}`);
55
54
 
56
55
  const numCols = configProps.NumCols ? configProps.NumCols : '1';
57
56
  switch (numCols) {
@@ -13,4 +13,4 @@
13
13
  <component-mapper name="Region" [props]="{ pConn$: kid.getPConnect(), formGroup$ }"></component-mapper>
14
14
  </div>
15
15
  </div>
16
- </div>
16
+ </div>
@@ -4,47 +4,48 @@ import { configProps, historyData } from './mock';
4
4
 
5
5
  import { PegaDxilMyCaseWidgetComponent } from './pega-dxil-my-case-widget.component';
6
6
 
7
- window.PCore = {
8
- ...window.PCore,
9
- getConstants: () => {
10
- return {
11
- CASE_INFO: {
12
- CASE_INFO_ID: 'caseInfo.ID'
13
- }
14
- } as any;
15
- },
16
- getDataApiUtils: () => {
17
- return {
18
- getData: () => {
19
- return Promise.resolve(historyData);
20
- }
21
- } as any;
22
- }
23
- };
24
-
25
7
  const meta: Meta<PegaDxilMyCaseWidgetComponent> = {
26
8
  title: 'PegaDxilMyCaseWidget',
27
9
  component: PegaDxilMyCaseWidgetComponent,
28
10
  excludeStories: /.*Data$/,
29
- render: (args: PegaDxilMyCaseWidgetComponent) => ({
30
- props: {
31
- ...args,
32
- pConn$: {
33
- getConfigProps: () => {
34
- return configProps;
35
- },
36
- getValue: (value) => {
37
- return value;
38
- },
39
- getContextName: () => {
40
- return 'app/primary_1';
11
+ render: (args: PegaDxilMyCaseWidgetComponent) => {
12
+ window.PCore = {
13
+ ...window.PCore,
14
+ getConstants: () => {
15
+ return {
16
+ CASE_INFO: {
17
+ CASE_INFO_ID: 'caseInfo.ID'
18
+ }
19
+ } as any;
41
20
  },
42
- getLocalizedValue: (value) => {
43
- return value;
21
+ getDataApiUtils: () => {
22
+ return {
23
+ getData: () => {
24
+ return Promise.resolve(historyData);
25
+ }
26
+ } as any;
27
+ }
28
+ };
29
+ return {
30
+ props: {
31
+ ...args,
32
+ pConn$: {
33
+ getConfigProps: () => {
34
+ return configProps;
35
+ },
36
+ getValue: (value) => {
37
+ return value;
38
+ },
39
+ getContextName: () => {
40
+ return 'app/primary_1';
41
+ },
42
+ getLocalizedValue: (value) => {
43
+ return value;
44
+ }
45
+ } as any
44
46
  }
45
- } as any
46
47
  }
47
- })
48
+ }
48
49
  };
49
50
 
50
51
  export default meta;
@@ -28,7 +28,7 @@ export class PegaDxilMyCaseWidgetComponent implements OnInit {
28
28
 
29
29
  ngOnInit(): void {
30
30
  this.configProps$ = this.pConn$.getConfigProps();
31
- // @ts-ignore - second parameter pageReference for getValue method should be optional
31
+
32
32
  const caseID = this.pConn$.getValue(PCore.getConstants().CASE_INFO.CASE_INFO_ID);
33
33
  const dataViewName = 'D_pyWorkHistory';
34
34
  const context = this.pConn$.getContextName();
@@ -36,16 +36,16 @@ export class PegaDxilMyCaseWidgetComponent implements OnInit {
36
36
  this.waitingForData = true;
37
37
 
38
38
  const caseHistoryData = PCore.getDataApiUtils().getData(
39
- dataViewName,
40
- { dataViewParameters: [{ CaseInstanceKey: caseID }] } as any,
41
- context
39
+ dataViewName,
40
+ { dataViewParameters: [{ CaseInstanceKey: caseID }] } as any,
41
+ context
42
42
  ) as Promise<any>;
43
43
 
44
44
  caseHistoryData.then((historyJSON: any) => {
45
45
  this.fields$ = [
46
46
  { label: this.pConn$.getLocalizedValue('Date', '', ''), type: 'DateTime', fieldName: 'pxTimeCreated' },
47
47
  { label: this.pConn$.getLocalizedValue('Description', '', ''), type: 'TextInput', fieldName: 'pyMessageKey' },
48
- { label: this.pConn$.getLocalizedValue('User', '', ''), type: 'TextInput', fieldName: 'pyPerformer' }
48
+ { label: this.pConn$.getLocalizedValue('Performed by', '', ''), type: 'TextInput', fieldName: 'pyPerformer' }
49
49
  ];
50
50
 
51
51
  const tableDataResults = this.updateData(historyJSON.data.data, this.fields$);
@@ -4,37 +4,38 @@ import { configProps, worklistData } from './mock';
4
4
 
5
5
  import { PegaDxilMyPageWidgetComponent } from './pega-dxil-my-page-widget.component';
6
6
 
7
- window.PCore = {
8
- ...window.PCore,
9
- getDataApiUtils: () => {
10
- return {
11
- getData: () => {
12
- return Promise.resolve(worklistData);
13
- }
14
- } as any;
15
- }
16
- };
17
-
18
7
  const meta: Meta<PegaDxilMyPageWidgetComponent> = {
19
8
  title: 'PegaDxilMyPageWidget',
20
9
  component: PegaDxilMyPageWidgetComponent,
21
10
  excludeStories: /.*Data$/,
22
- render: (args: PegaDxilMyPageWidgetComponent) => ({
23
- props: {
24
- ...args,
25
- pConn$: {
26
- getContextName: () => {
27
- return 'app/primary_1';
28
- },
29
- getLocalizedValue: value => {
30
- return value;
31
- },
32
- getConfigProps: () => {
33
- return configProps;
34
- }
35
- } as any
11
+ render: (args: PegaDxilMyPageWidgetComponent) => {
12
+ window.PCore = {
13
+ ...window.PCore,
14
+ getDataApiUtils: () => {
15
+ return {
16
+ getData: () => {
17
+ return Promise.resolve(worklistData);
18
+ }
19
+ } as any;
20
+ }
21
+ };
22
+ return {
23
+ props: {
24
+ ...args,
25
+ pConn$: {
26
+ getContextName: () => {
27
+ return 'app/primary_1';
28
+ },
29
+ getLocalizedValue: value => {
30
+ return value;
31
+ },
32
+ getConfigProps: () => {
33
+ return configProps;
34
+ }
35
+ } as any
36
+ }
36
37
  }
37
- })
38
+ }
38
39
  };
39
40
 
40
41
  export default meta;
@@ -2,7 +2,7 @@
2
2
  <dl class="psdk-case-summary-fields-primary">
3
3
  <div *ngFor="let field of primaryFieldsWithStatus$" class="psdk-csf-primary-field">
4
4
  <dt class="psdk-csf-primary-field-header">
5
- {{ field.config.label }}
5
+ {{ field.config?.label }}
6
6
  </dt>
7
7
  <dd *ngIf="field.config.value === ''; else hasValue" class="psdk-csf-primary-field-data">
8
8
  <ng-container [ngSwitch]="field.type.toLowerCase()">
@@ -28,10 +28,10 @@
28
28
  <dl *ngFor="let field of secondaryFields$" class="psdk-case-summary-fields-secondary">
29
29
  <div
30
30
  *ngIf="
31
- field.config?.label?.toLowerCase() == 'create operator' ||
32
- field.displayLabel.toLowerCase() == 'create operator' ||
33
- field.config?.label?.toLowerCase() == 'update operator' ||
34
- field.displayLabel.toLowerCase() == 'update operator';
31
+ field?.config?.label?.toLowerCase() == 'create operator' ||
32
+ field?.displayLabel?.toLowerCase() == 'create operator' ||
33
+ field?.config?.label?.toLowerCase() == 'update operator' ||
34
+ field?.displayLabel?.toLowerCase() == 'update operator';
35
35
  else hasSecondaryValue
36
36
  "
37
37
  >
@@ -40,7 +40,7 @@
40
40
  <ng-template #hasSecondaryValue>
41
41
  <div class="psdk-csf-secondary-field">
42
42
  <dt class="psdk-csf-secondary-field-header">
43
- {{ field.config.displayLabel || field.config.label }}
43
+ {{ field.config?.displayLabel || field.config?.label }}
44
44
  </dt>
45
45
  <dd class="psdk-csf-secondary-field-data">
46
46
  <div [ngSwitch]="field.type">
@@ -193,15 +193,14 @@ export class CheckBoxComponent 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;
@@ -17,7 +17,6 @@
17
17
  headerText$: todo_headerText$,
18
18
  type$: 'TODO',
19
19
  context$: todo_context$,
20
- itemKey$: itemKey$,
21
20
  isConfirm: true
22
21
  }"
23
22
  ></component-mapper>
@@ -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
 
@@ -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,5 @@
1
+ // @ts-ignore
2
+ if (window?.__webpack_nonce__) {
3
+ // @ts-ignore
4
+ __webpack_nonce__ = window.__webpack_nonce__;
5
+ }
@@ -9,6 +9,7 @@ import {
9
9
  } from '@pega/cosmos-react-core';
10
10
 
11
11
  import type { PConnFieldProps } from './PConnProps';
12
+ import './create-nonce';
12
13
 
13
14
  import StyledPegaDxilMyTestTextWrapper from './styles';
14
15
 
@@ -0,0 +1,5 @@
1
+ // @ts-ignore
2
+ if (window?.__webpack_nonce__) {
3
+ // @ts-ignore
4
+ __webpack_nonce__ = window.__webpack_nonce__;
5
+ }
@@ -8,6 +8,7 @@ import {
8
8
  } from "@pega/cosmos-react-core";
9
9
 
10
10
  import type { PConnFieldProps } from './PConnProps';
11
+ import './create-nonce';
11
12
 
12
13
  // includes in bundle
13
14
  import handleEvent from "./event-utils";
@@ -0,0 +1,5 @@
1
+ // @ts-ignore
2
+ if (window?.__webpack_nonce__) {
3
+ // @ts-ignore
4
+ __webpack_nonce__ = window.__webpack_nonce__;
5
+ }
@@ -12,6 +12,7 @@ import {
12
12
 
13
13
 
14
14
  import type { PConnFieldProps } from './PConnProps';
15
+ import './create-nonce';
15
16
 
16
17
  // includes in bundle
17
18
  import handleEvent from './event-utils';
@@ -0,0 +1,5 @@
1
+ // @ts-ignore
2
+ if (window?.__webpack_nonce__) {
3
+ // @ts-ignore
4
+ __webpack_nonce__ = window.__webpack_nonce__;
5
+ }
@@ -3,6 +3,7 @@ import { DateInput, FieldValueList, DateTimeDisplay, Text, withConfiguration } f
3
3
  import FormattedText from "./FormattedText";
4
4
 
5
5
  import type { PConnFieldProps } from './PConnProps';
6
+ import './create-nonce';
6
7
 
7
8
  import StyledPegaDxilMyDateWrapper from './styles';
8
9
 
@@ -0,0 +1,5 @@
1
+ // @ts-ignore
2
+ if (window?.__webpack_nonce__) {
3
+ // @ts-ignore
4
+ __webpack_nonce__ = window.__webpack_nonce__;
5
+ }
@@ -1,6 +1,7 @@
1
1
  import { useEffect, useState } from 'react';
2
2
  import { DateTimeInput, FieldValueList, DateTimeDisplay, Text, withConfiguration } from "@pega/cosmos-react-core";
3
3
  import type { PConnFieldProps } from './PConnProps';
4
+ import './create-nonce';
4
5
 
5
6
  // includes in bundle
6
7
  import DateTimeFormatter from "./date-time";
@@ -0,0 +1,5 @@
1
+ // @ts-ignore
2
+ if (window?.__webpack_nonce__) {
3
+ // @ts-ignore
4
+ __webpack_nonce__ = window.__webpack_nonce__;
5
+ }
@@ -2,6 +2,7 @@ import { useState, useEffect, useRef } from 'react';
2
2
  import { NumberInput, NumberDisplay, CurrencyDisplay, FieldValueList, Text, withConfiguration } from '@pega/cosmos-react-core';
3
3
 
4
4
  import type { PConnFieldProps } from './PConnProps';
5
+ import './create-nonce';
5
6
 
6
7
  // includes in bundle
7
8
  import StyledPegaDxilMyDecimalWrapper from './styles';