@pega/dx-component-builder-sdk 0.242.16 → 0.242.17

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 (32) hide show
  1. package/package.json +1 -1
  2. package/src/tasks/create/templates/SDK-Angular/field/Boolean/demo.stories.tsx.mustache +1 -1
  3. package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.spec.ts.mustache +1 -1
  4. package/src/tasks/create/templates/SDK-Angular/field/Date/demo.stories.tsx.mustache +1 -11
  5. package/src/tasks/create/templates/SDK-Angular/field/DateTime/demo.stories.tsx.mustache +1 -12
  6. package/src/tasks/create/templates/SDK-Angular/field/Decimal/decimal.component.spec.ts.mustache +1 -1
  7. package/src/tasks/create/templates/SDK-Angular/field/Decimal/demo.stories.tsx.mustache +1 -1
  8. package/src/tasks/create/templates/SDK-Angular/field/Decimal-Currency/demo.stories.tsx.mustache +1 -15
  9. package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/decimal-percentage.component.spec.ts.mustache +1 -1
  10. package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/demo.stories.tsx.mustache +1 -1
  11. package/src/tasks/create/templates/SDK-Angular/field/Icon-Button-URL/demo.stories.tsx.mustache +10 -21
  12. package/src/tasks/create/templates/SDK-Angular/field/Integer/demo.stories.tsx.mustache +1 -1
  13. package/src/tasks/create/templates/SDK-Angular/field/Picklist/demo.stories.tsx.mustache +1 -1
  14. package/src/tasks/create/templates/SDK-Angular/field/Picklist-Autocomplete/demo.stories.tsx.mustache +1 -1
  15. package/src/tasks/create/templates/SDK-Angular/field/Picklist-RadioButtons/demo.stories.tsx.mustache +1 -1
  16. package/src/tasks/create/templates/SDK-Angular/field/Text/demo.stories.tsx.mustache +1 -1
  17. package/src/tasks/create/templates/SDK-Angular/field/Text-Email/demo.stories.tsx.mustache +1 -1
  18. package/src/tasks/create/templates/SDK-Angular/field/Text-Input/demo.stories.tsx.mustache +1 -1
  19. package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/demo.stories.tsx.mustache +1 -1
  20. package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/demo.stories.tsx.mustache +1 -1
  21. package/src/tasks/create/templates/SDK-Angular/field/Text-URL/demo.stories.tsx.mustache +1 -1
  22. package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/demo.stories.tsx.mustache +1 -1
  23. package/src/tasks/create/templates/SDK-Angular/template/DETAILS/demo.stories.tsx.mustache +1 -1
  24. package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/demo.stories.tsx.mustache +1 -1
  25. package/src/tasks/create/templates/SDK-Angular/template/FORM/demo.stories.tsx.mustache +9 -17
  26. package/src/tasks/create/templates/SDK-Angular/template/FORM/mock.ts.mustache +19 -1
  27. package/src/tasks/create/templates/SDK-Angular/template/FORM-region/demo.stories.tsx.mustache +7 -16
  28. package/src/tasks/create/templates/SDK-Angular/template/FORM-region/mock.ts.mustache +19 -1
  29. package/src/tasks/create/templates/SDK-Angular/template/PAGE/demo.stories.tsx.mustache +35 -47
  30. package/src/tasks/create/templates/SDK-Angular/widget/CASE/demo.stories.tsx.mustache +7 -17
  31. package/src/tasks/create/templates/SDK-Angular/widget/PAGE/demo.stories.tsx.mustache +7 -10
  32. package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/demo.stories.tsx.mustache +9 -17
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/dx-component-builder-sdk",
3
- "version": "0.242.16",
3
+ "version": "0.242.17",
4
4
  "description": "Utility for building custom UI components",
5
5
  "bin": "./bin/index.js",
6
6
  "scripts": {
@@ -9,7 +9,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
9
9
  title: '{{COMPONENT_CLASS_NAME}}',
10
10
  component: {{COMPONENT_CLASS_NAME}}Component,
11
11
  excludeStories: /.*Data$/,
12
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
12
+ render: (args) => ({
13
13
  props: {
14
14
  ...args,
15
15
  pConn$: {
@@ -4,7 +4,7 @@ import { {{COMPONENT_CLASS_NAME}}Component } from './{{COMPONENT_CLASS_NAME_KEBA
4
4
 
5
5
  describe('{{COMPONENT_CLASS_NAME}}Component', () => {
6
6
  let component: {{COMPONENT_CLASS_NAME}}Component;
7
- let fixture: ComponentFixture<DateComponent>;
7
+ let fixture: ComponentFixture<{{COMPONENT_CLASS_NAME}}Component>;
8
8
 
9
9
  beforeEach(waitForAsync(() => {
10
10
  TestBed.configureTestingModule({
@@ -4,22 +4,12 @@ import { FormBuilder } from '@angular/forms';
4
4
  import { configProps, 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
- window.PCore = {
8
- ...window.PCore,
9
- getLocaleUtils: (): any => {
10
- return {
11
- getLocaleValue: value => {
12
- return value;
13
- }
14
- };
15
- }
16
- };
17
7
 
18
8
  const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
19
9
  title: '{{COMPONENT_CLASS_NAME}}',
20
10
  component: {{COMPONENT_CLASS_NAME}}Component,
21
11
  excludeStories: /.*Data$/,
22
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
12
+ render: (args) => ({
23
13
  props: {
24
14
  ...args,
25
15
  pConn$: {
@@ -5,22 +5,11 @@ import { configProps, 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
- getLocaleUtils: (): any => {
11
- return {
12
- getLocaleValue: val => {
13
- return val;
14
- }
15
- };
16
- }
17
- };
18
-
19
8
  const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
20
9
  title: '{{COMPONENT_CLASS_NAME}}',
21
10
  component: {{COMPONENT_CLASS_NAME}}Component,
22
11
  excludeStories: /.*Data$/,
23
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
12
+ render: (args) => ({
24
13
  props: {
25
14
  ...args,
26
15
  pConn$: {
@@ -4,7 +4,7 @@ import { {{COMPONENT_CLASS_NAME}}Component } from './{{COMPONENT_CLASS_NAME_KEBA
4
4
 
5
5
  describe('{{COMPONENT_CLASS_NAME}}Component', () => {
6
6
  let component: {{COMPONENT_CLASS_NAME}}Component;
7
- let fixture: ComponentFixture<DecimalComponent>;
7
+ let fixture: ComponentFixture<{{COMPONENT_CLASS_NAME}}Component>;
8
8
 
9
9
  beforeEach(waitForAsync(() => {
10
10
  TestBed.configureTestingModule({
@@ -9,7 +9,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
9
9
  title: '{{COMPONENT_CLASS_NAME}}',
10
10
  component: {{COMPONENT_CLASS_NAME}}Component,
11
11
  excludeStories: /.*Data$/,
12
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
12
+ render: (args) => ({
13
13
  props: {
14
14
  ...args,
15
15
  pConn$: {
@@ -5,25 +5,11 @@ import { configProps, 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
- getEnvironmentInfo: (): any => {
11
- return {
12
- getUseLocale: () => {
13
- return 'en-GB';
14
- },
15
- getLocale: () => {
16
- return 'en-GB';
17
- }
18
- };
19
- }
20
- };
21
-
22
8
  const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
23
9
  title: '{{COMPONENT_CLASS_NAME}}',
24
10
  component: {{COMPONENT_CLASS_NAME}}Component,
25
11
  excludeStories: /.*Data$/,
26
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
12
+ render: (args) => ({
27
13
  props: {
28
14
  ...args,
29
15
  pConn$: {
@@ -3,7 +3,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
3
3
  import { {{COMPONENT_CLASS_NAME}}Component } from './{{COMPONENT_CLASS_NAME_KEBAB}}.component';
4
4
 
5
5
  describe('{{COMPONENT_CLASS_NAME}}Component', () => {
6
- let component: {{COMPONENT_CLASS_NAME}}omponent;
6
+ let component: {{COMPONENT_CLASS_NAME}}Component;
7
7
  let fixture: ComponentFixture<{{COMPONENT_CLASS_NAME}}Component>;
8
8
 
9
9
  beforeEach(async () => {
@@ -9,7 +9,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
9
9
  title: '{{COMPONENT_CLASS_NAME}}',
10
10
  component: {{COMPONENT_CLASS_NAME}}Component,
11
11
  excludeStories: /.*Data$/,
12
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
12
+ render: (args) => ({
13
13
  props: {
14
14
  ...args,
15
15
  pConn$: {
@@ -5,29 +5,19 @@ 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.getDataApiUtils = (): any => {
9
+ return {
10
+ getData: () => {
11
+ return Promise.resolve(stateListData);
12
+ }
13
+ };
14
+ };
15
+
8
16
  const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
9
17
  title: '{{COMPONENT_CLASS_NAME}}',
10
18
  component: {{COMPONENT_CLASS_NAME}}Component,
11
19
  excludeStories: /.*Data$/,
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 {
20
+ render: (args) => ({
31
21
  props: {
32
22
  ...args,
33
23
  pConn$: {
@@ -50,8 +40,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
50
40
  } as any,
51
41
  formGroup$: new FormBuilder().group({})
52
42
  }
53
- };
54
- }
43
+ })
55
44
  };
56
45
 
57
46
  export default meta;
@@ -9,7 +9,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
9
9
  title: '{{COMPONENT_CLASS_NAME}}',
10
10
  component: {{COMPONENT_CLASS_NAME}}Component,
11
11
  excludeStories: /.*Data$/,
12
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
12
+ render: (args) => ({
13
13
  props: {
14
14
  ...args,
15
15
  pConn$: {
@@ -19,7 +19,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
19
19
  ],
20
20
  component: {{COMPONENT_CLASS_NAME}}Component,
21
21
  excludeStories: /.*Data$/,
22
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
22
+ render: (args) => ({
23
23
  props: {
24
24
  ...args,
25
25
  pConn$: {
@@ -19,7 +19,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
19
19
  ],
20
20
  component: {{COMPONENT_CLASS_NAME}}Component,
21
21
  excludeStories: /.*Data$/,
22
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
22
+ render: (args) => ({
23
23
  props: {
24
24
  ...args,
25
25
  pConn$: {
@@ -8,7 +8,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
8
8
  title: '{{COMPONENT_CLASS_NAME}}',
9
9
  component: {{COMPONENT_CLASS_NAME}}Component,
10
10
  excludeStories: /.*Data$/,
11
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
11
+ render: (args) => ({
12
12
  props: {
13
13
  ...args,
14
14
  pConn$: {
@@ -9,7 +9,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
9
9
  title: '{{COMPONENT_CLASS_NAME}}',
10
10
  component: {{COMPONENT_CLASS_NAME}}Component,
11
11
  excludeStories: /.*Data$/,
12
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
12
+ render: (args) => ({
13
13
  props: {
14
14
  ...args,
15
15
  pConn$: {
@@ -9,7 +9,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
9
9
  title: '{{COMPONENT_CLASS_NAME}}',
10
10
  component: {{COMPONENT_CLASS_NAME}}Component,
11
11
  excludeStories: /.*Data$/,
12
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
12
+ render: (args) => ({
13
13
  props: {
14
14
  ...args,
15
15
  pConn$: {
@@ -9,7 +9,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
9
9
  title: '{{COMPONENT_CLASS_NAME}}',
10
10
  component: {{COMPONENT_CLASS_NAME}}Component,
11
11
  excludeStories: /.*Data$/,
12
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
12
+ render: (args) => ({
13
13
  props: {
14
14
  ...args,
15
15
  pConn$: {
@@ -9,7 +9,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
9
9
  title: '{{COMPONENT_CLASS_NAME}}',
10
10
  component: {{COMPONENT_CLASS_NAME}}Component,
11
11
  excludeStories: /.*Data$/,
12
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
12
+ render: (args) => ({
13
13
  props: {
14
14
  ...args,
15
15
  pConn$: {
@@ -9,7 +9,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
9
9
  title: '{{COMPONENT_CLASS_NAME}}',
10
10
  component: {{COMPONENT_CLASS_NAME}}Component,
11
11
  excludeStories: /.*Data$/,
12
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
12
+ render: (args) => ({
13
13
  props: {
14
14
  ...args,
15
15
  pConn$: {
@@ -9,7 +9,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
9
9
  title: '{{COMPONENT_CLASS_NAME}}',
10
10
  component: {{COMPONENT_CLASS_NAME}}Component,
11
11
  excludeStories: /.*Data$/,
12
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
12
+ render: (args) => ({
13
13
  props: {
14
14
  ...args,
15
15
  pConn$: {
@@ -9,7 +9,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
9
9
  title: '{{COMPONENT_CLASS_NAME}}',
10
10
  component: {{COMPONENT_CLASS_NAME}}Component,
11
11
  excludeStories: /.*Data$/,
12
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
12
+ render: (args) => ({
13
13
  props: {
14
14
  ...args,
15
15
  pConn$: {
@@ -8,7 +8,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
8
8
  title: '{{COMPONENT_CLASS_NAME}}',
9
9
  component: {{COMPONENT_CLASS_NAME}}Component,
10
10
  excludeStories: /.*Data$/,
11
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
11
+ render: (args) => ({
12
12
  props: {
13
13
  ...args,
14
14
  pConn$: {
@@ -8,7 +8,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
8
8
  title: '{{COMPONENT_CLASS_NAME}}',
9
9
  component: {{COMPONENT_CLASS_NAME}}Component,
10
10
  excludeStories: /.*Data$/,
11
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
11
+ render: (args) => ({
12
12
  props: {
13
13
  ...args,
14
14
  pConn$: {
@@ -10,21 +10,12 @@ class MockingDatapageService {
10
10
  getDataPageData = () => Promise.resolve({});
11
11
  }
12
12
 
13
- window.PCore = {
14
- ...window.PCore,
15
- getConstants: (): any => {
16
- return {
17
- CASE_INFO: {
18
- INSTRUCTIONS: 'caseInfo.assignments[0].instructions'
19
- }
20
- };
21
- },
22
- setBehaviorOverride: () => {},
23
- getStore: () => {
24
- return {
25
- subscribe: () => {}
26
- };
27
- }
13
+ window.PCore.getContextTreeManager = (): any => {
14
+ return {
15
+ removeContextTreeNode: () => {
16
+ /* nothing */
17
+ }
18
+ };
28
19
  };
29
20
 
30
21
  const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
@@ -36,7 +27,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
36
27
  ],
37
28
  component: {{COMPONENT_CLASS_NAME}}Component,
38
29
  excludeStories: /.*Data$/,
39
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
30
+ render: (args) => ({
40
31
  props: {
41
32
  ...args,
42
33
  pConn$: {
@@ -83,7 +74,8 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
83
74
  getInheritedProps: (): any => {
84
75
  /* nothing */
85
76
  },
86
- getContextName: () => ''
77
+ getContextName: () => '',
78
+ clearErrorMessages: () => {/* nothing */}
87
79
  } as any,
88
80
  formGroup$: new FormBuilder().group({})
89
81
  }
@@ -44,6 +44,9 @@ export const children = [
44
44
  label: 'First Name',
45
45
  hasSuggestions: false
46
46
  };
47
+ },
48
+ clearErrorMessages: () => {
49
+ /* nothing */
47
50
  }
48
51
  };
49
52
  }
@@ -93,6 +96,9 @@ export const children = [
93
96
  label: 'Middle Name',
94
97
  hasSuggestions: false
95
98
  };
99
+ },
100
+ clearErrorMessages: () => {
101
+ /* nothing */
96
102
  }
97
103
  };
98
104
  }
@@ -142,6 +148,9 @@ export const children = [
142
148
  label: 'Last Name',
143
149
  hasSuggestions: false
144
150
  };
151
+ },
152
+ clearErrorMessages: () => {
153
+ /* nothing */
145
154
  }
146
155
  };
147
156
  }
@@ -191,6 +200,9 @@ export const children = [
191
200
  label: 'Email',
192
201
  hasSuggestions: false
193
202
  };
203
+ },
204
+ clearErrorMessages: () => {
205
+ /* nothing */
194
206
  }
195
207
  };
196
208
  }
@@ -240,6 +252,9 @@ export const children = [
240
252
  label: 'Phone Number',
241
253
  hasSuggestions: false
242
254
  };
255
+ },
256
+ clearErrorMessages: () => {
257
+ /* nothing */
243
258
  }
244
259
  };
245
260
  }
@@ -346,7 +361,10 @@ export const children = [
346
361
  getContextName: () => {
347
362
  return 'app/primary_1/workarea_9';
348
363
  },
349
- getDataObject: () => {}
364
+ getDataObject: () => {},
365
+ clearErrorMessages: () => {
366
+ /* nothing */
367
+ }
350
368
  };
351
369
  }
352
370
  }
@@ -10,21 +10,12 @@ class MockingDatapageService {
10
10
  getDataPageData = () => Promise.resolve({});
11
11
  }
12
12
 
13
- window.PCore = {
14
- ...window.PCore,
15
- getConstants: (): any => {
16
- return {
17
- CASE_INFO: {
18
- INSTRUCTIONS: 'caseInfo.assignments[0].instructions'
19
- }
20
- };
21
- },
22
- setBehaviorOverride: () => {},
23
- getStore: () => {
24
- return {
25
- subscribe: () => {}
26
- };
27
- }
13
+ window.PCore.getContextTreeManager = (): any => {
14
+ return {
15
+ removeContextTreeNode: () => {
16
+ /* nothing */
17
+ }
18
+ };
28
19
  };
29
20
 
30
21
  const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
@@ -36,7 +27,7 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
36
27
  ],
37
28
  component: {{COMPONENT_CLASS_NAME}}Component,
38
29
  excludeStories: /.*Data$/,
39
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
30
+ render: (args) => ({
40
31
  props: {
41
32
  ...args,
42
33
  pConn$: {
@@ -44,6 +44,9 @@ export const child1 = [
44
44
  label: 'First Name',
45
45
  hasSuggestions: false
46
46
  };
47
+ },
48
+ clearErrorMessages: () => {
49
+ /* nothing */
47
50
  }
48
51
  };
49
52
  }
@@ -93,6 +96,9 @@ export const child1 = [
93
96
  label: 'Middle Name',
94
97
  hasSuggestions: false
95
98
  };
99
+ },
100
+ clearErrorMessages: () => {
101
+ /* nothing */
96
102
  }
97
103
  };
98
104
  }
@@ -142,6 +148,9 @@ export const child1 = [
142
148
  label: 'Last Name',
143
149
  hasSuggestions: false
144
150
  };
151
+ },
152
+ clearErrorMessages: () => {
153
+ /* nothing */
145
154
  }
146
155
  };
147
156
  }
@@ -194,6 +203,9 @@ export const child2 = [
194
203
  label: 'Email',
195
204
  hasSuggestions: false
196
205
  };
206
+ },
207
+ clearErrorMessages: () => {
208
+ /* nothing */
197
209
  }
198
210
  };
199
211
  }
@@ -243,6 +255,9 @@ export const child2 = [
243
255
  label: 'Phone Number',
244
256
  hasSuggestions: false
245
257
  };
258
+ },
259
+ clearErrorMessages: () => {
260
+ /* nothing */
246
261
  }
247
262
  };
248
263
  }
@@ -349,7 +364,10 @@ export const child2 = [
349
364
  getContextName: () => {
350
365
  return 'app/primary_1/workarea_9';
351
366
  },
352
- getDataObject: () => {}
367
+ getDataObject: () => {},
368
+ clearErrorMessages: () => {
369
+ /* nothing */
370
+ }
353
371
  };
354
372
  }
355
373
  }
@@ -7,54 +7,42 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
7
7
  title: '{{COMPONENT_CLASS_NAME}}',
8
8
  component: {{COMPONENT_CLASS_NAME}}Component,
9
9
  excludeStories: /.*Data$/,
10
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => {
11
- window.PCore = {
12
- ...window.PCore,
13
- getContextTreeManager: (): any => {
14
- return {
15
- removeContextTreeNode: () => {
16
- /* nothing */
17
- }
18
- };
19
- }
20
- };
21
- return {
22
- props: {
23
- ...args,
24
- pConn$: {
25
- getChildren: () => {
26
- return [
27
- {
28
- getPConnect: () => {
29
- return {
30
- getComponentName: () => {
31
- return 'Region';
32
- },
33
- getChildren: () => {
34
- return children;
35
- }
36
- };
37
- }
10
+ render: (args) => ({
11
+ props: {
12
+ ...args,
13
+ pConn$: {
14
+ getChildren: () => {
15
+ return [
16
+ {
17
+ getPConnect: () => {
18
+ return {
19
+ getComponentName: () => {
20
+ return 'Region';
21
+ },
22
+ getChildren: () => {
23
+ return children;
24
+ }
25
+ };
38
26
  }
39
- ];
40
- },
41
- getConfigProps: () => {
42
- return {
43
- title: 'Announcements',
44
- operator: ''
45
- };
46
- },
47
- resolveConfigProps: () => {
48
- return {
49
- title: 'Announcements',
50
- operator: ''
51
- };
52
- },
53
- getContextName: () => ''
54
- } as any
55
- }
56
- };
57
- }
27
+ }
28
+ ];
29
+ },
30
+ getConfigProps: () => {
31
+ return {
32
+ title: 'Announcements',
33
+ operator: ''
34
+ };
35
+ },
36
+ resolveConfigProps: () => {
37
+ return {
38
+ title: 'Announcements',
39
+ operator: ''
40
+ };
41
+ },
42
+ getContextName: () => ''
43
+ } as any
44
+ }
45
+ })
58
46
  };
59
47
 
60
48
  export default meta;
@@ -8,23 +8,13 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
8
8
  title: '{{COMPONENT_CLASS_NAME}}',
9
9
  component: {{COMPONENT_CLASS_NAME}}Component,
10
10
  excludeStories: /.*Data$/,
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;
20
- },
21
- getDataApiUtils: () => {
22
- return {
23
- getData: () => {
24
- return Promise.resolve(historyData);
25
- }
26
- } as any;
27
- }
11
+ render: (args) => {
12
+ window.PCore.getDataApiUtils = (): any => {
13
+ return {
14
+ getData: () => {
15
+ return Promise.resolve(historyData);
16
+ }
17
+ };
28
18
  };
29
19
  return {
30
20
  props: {
@@ -8,16 +8,13 @@ const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
8
8
  title: '{{COMPONENT_CLASS_NAME}}',
9
9
  component: {{COMPONENT_CLASS_NAME}}Component,
10
10
  excludeStories: /.*Data$/,
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
- }
11
+ render: (args) => {
12
+ window.PCore.getDataApiUtils = (): any => {
13
+ return {
14
+ getData: () => {
15
+ return Promise.resolve(worklistData);
16
+ }
17
+ };
21
18
  };
22
19
  return {
23
20
  props: {
@@ -4,29 +4,21 @@ import { configProps, operatorDetails } 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
- getUserApi: () => {
10
- return {
11
- getOperatorDetails: () => {
12
- return Promise.resolve(operatorDetails);
13
- }
14
- };
15
- },
16
- getLocaleUtils: () => {
17
- return {
18
- getLocaleValue: val => {
19
- return val;
20
- }
21
- } as any;
22
- }
7
+ window.PCore.getUserApi = (): any => {
8
+ return {
9
+ getOperatorDetails: () => {
10
+ return new Promise(resolve => {
11
+ resolve(operatorDetails);
12
+ });
13
+ }
14
+ };
23
15
  };
24
16
 
25
17
  const meta: Meta<{{COMPONENT_CLASS_NAME}}Component> = {
26
18
  title: '{{COMPONENT_CLASS_NAME}}',
27
19
  component: {{COMPONENT_CLASS_NAME}}Component,
28
20
  excludeStories: /.*Data$/,
29
- render: (args: {{COMPONENT_CLASS_NAME}}Component) => ({
21
+ render: (args) => ({
30
22
  props: {
31
23
  ...args,
32
24
  pConn$: {