@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/dx-component-builder-sdk",
3
- "version": "0.24.4",
3
+ "version": "0.25.5",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
package/src/constants.js CHANGED
@@ -442,14 +442,6 @@ export const COMPONENT_SCHEMA = {
442
442
  name: 'Error Boundary',
443
443
  value: 'ErrorBoundary'
444
444
  },
445
- {
446
- name: 'Flow Container',
447
- value: 'Containers/FlowContainer'
448
- },
449
- {
450
- name: 'Modal View Container',
451
- value: 'Containers/ModalViewContainer'
452
- },
453
445
  {
454
446
  name: 'Multi Step',
455
447
  value: 'MultiStep'
@@ -458,10 +450,6 @@ export const COMPONENT_SCHEMA = {
458
450
  name: 'Nav Bar',
459
451
  value: 'NavBar'
460
452
  },
461
- {
462
- name: 'Simple View',
463
- value: 'Containers/SimpleView'
464
- },
465
453
  {
466
454
  name: 'Stages',
467
455
  value: 'Stages'
@@ -477,10 +465,6 @@ export const COMPONENT_SCHEMA = {
477
465
  {
478
466
  name: 'View',
479
467
  value: 'View'
480
- },
481
- {
482
- name: 'View',
483
- value: 'Containers/ViewContainer'
484
468
  }
485
469
  ],
486
470
  template: [
@@ -898,10 +882,6 @@ export const COMPONENT_SCHEMA = {
898
882
  name: 'Preview View Container',
899
883
  value: 'Containers/PreviewViewContainer'
900
884
  },
901
- {
902
- name: 'Reference',
903
- value: 'Reference'
904
- },
905
885
  {
906
886
  name: 'Region',
907
887
  value: 'Region'
@@ -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 {{COMPONENT_CLASS_NAME}}Component 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;
@@ -18,6 +18,16 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
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;
@@ -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<{{COMPONENT_CLASS_NAME}}Component> = {
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 {{! pick new delimiters for mustache }}{{=<% %>=}}{<%={{ }}=%> {{COMPONENT_CLASS_NAME}}Component {{=<% %>=}}}<%={{ }}=%>{{! revert delimiters for mustache }} from './{{COMPONENT_CLASS_NAME_KEBAB}}.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<{{COMPONENT_CLASS_NAME}}Component> = {
27
9
  title: '{{COMPONENT_CLASS_NAME}}',
28
10
  component: {{COMPONENT_CLASS_NAME}}Component,
29
11
  excludeStories: /.*Data$/,
30
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
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: {{COMPONENT_CLASS_NAME}}Component) => {
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;
@@ -159,7 +159,6 @@ export class {{COMPONENT_CLASS_NAME}}Component 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 {{COMPONENT_CLASS_NAME}}Component 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 {{COMPONENT_CLASS_NAME}}Component 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
  }
@@ -118,7 +118,7 @@ export class {{COMPONENT_CLASS_NAME}}Component 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
@@ -25,6 +25,7 @@ interface {{COMPONENT_CLASS_NAME}}Props extends PConnFieldProps {
25
25
  selector: 'app-{{COMPONENT_CLASS_NAME_KEBAB}}',
26
26
  templateUrl: './{{COMPONENT_CLASS_NAME_KEBAB}}.component.html',
27
27
  styleUrls: ['./{{COMPONENT_CLASS_NAME_KEBAB}}.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 {{COMPONENT_CLASS_NAME}}Component 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 {{COMPONENT_CLASS_NAME}}Component 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 {{COMPONENT_CLASS_NAME}}Component 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
  }
@@ -107,8 +107,6 @@ export class {{COMPONENT_CLASS_NAME}}Component 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;
@@ -2,11 +2,10 @@
2
2
  {{! pick new delimiters for mustache }}
3
3
  {{=<% %>=}}
4
4
  <div *ngIf="!NO_HEADER_TEMPLATES.includes(template) && showLabel">
5
- <div class="template-title-container">{{label}}</div>
5
+ <div class="template-title-container">{{ label }}</div>
6
6
  </div>
7
- <div *ngIf="instructions" class='psdk-default-form-instruction-text'>
8
- <div key="instructions" id="instruction-text" [innerHTML]="instructions">
9
- </div>
7
+ <div *ngIf="instructions" class="psdk-default-form-instruction-text">
8
+ <div key="instructions" id="instruction-text" [innerHTML]="instructions"></div>
10
9
  </div>
11
10
  <div [className]="divClass$">
12
11
  <div *ngFor="let kid of arChildren$" [ngClass]="{ 'grid-column': kid.getPConnect().getComponentName() === 'View' }">
@@ -51,7 +51,6 @@ export class {{COMPONENT_CLASS_NAME}}Component 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>
@@ -28,7 +28,7 @@ export class {{COMPONENT_CLASS_NAME}}Component 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 {{COMPONENT_CLASS_NAME}}Component 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,47 +4,48 @@ import { configProps, historyData } from './mock';
4
4
 
5
5
  import {{! pick new delimiters for mustache }}{{=<% %>=}}{<%={{ }}=%> {{COMPONENT_CLASS_NAME}}Component {{=<% %>=}}}<%={{ }}=%>{{! revert delimiters for mustache }} from './{{COMPONENT_CLASS_NAME_KEBAB}}.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<{{COMPONENT_CLASS_NAME}}Component> = {
26
8
  title: '{{COMPONENT_CLASS_NAME}}',
27
9
  component: {{COMPONENT_CLASS_NAME}}Component,
28
10
  excludeStories: /.*Data$/,
29
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
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: {{COMPONENT_CLASS_NAME}}Component) => {
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;
@@ -4,37 +4,38 @@ import { configProps, worklistData } from './mock';
4
4
 
5
5
  import {{! pick new delimiters for mustache }}{{=<% %>=}}{<%={{ }}=%> {{COMPONENT_CLASS_NAME}}Component {{=<% %>=}}}<%={{ }}=%>{{! revert delimiters for mustache }} from './{{COMPONENT_CLASS_NAME_KEBAB}}.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<{{COMPONENT_CLASS_NAME}}Component> = {
19
8
  title: '{{COMPONENT_CLASS_NAME}}',
20
9
  component: {{COMPONENT_CLASS_NAME}}Component,
21
10
  excludeStories: /.*Data$/,
22
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
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: {{COMPONENT_CLASS_NAME}}Component) => {
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;
@@ -20,6 +20,4 @@
20
20
  </dl>
21
21
  </div>
22
22
  </div>
23
-
24
-
25
23
  <%={{ }}=%> {{! revert delimiters for mustache }}
@@ -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: {
@@ -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;