@pega/custom-dx-components 0.242.40 → 0.242.42
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.
- package/README.md +3 -1
- package/package.json +1 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +4 -3
- package/src/tasks/create-lib/helper.js +19 -1
- package/src/tasks/create-lib/index.js +7 -1
- package/src/tasks/init/template/README.md +4 -2
- package/src/tasks/init/template/package.json.mustache +4 -4
- package/src/tasks/init/template/tsconfig.json +6 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +4 -3
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +4 -3
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +4 -3
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This project provides you with an environment to extend Constellation by giving
|
|
|
8
8
|
|
|
9
9
|
Ensure you have access to the following in your system:
|
|
10
10
|
|
|
11
|
-
- Pega Infinity Server version 24 or later
|
|
11
|
+
- Pega Infinity Server version 24.2 or later
|
|
12
12
|
|
|
13
13
|
- Git version 2.30 or later
|
|
14
14
|
|
|
@@ -16,6 +16,8 @@ Ensure you have access to the following in your system:
|
|
|
16
16
|
|
|
17
17
|
- System npm version 8, 10 (9 is not supported)
|
|
18
18
|
|
|
19
|
+
- Recommended (node 20, npm 10)
|
|
20
|
+
|
|
19
21
|
## Latest Documentation
|
|
20
22
|
|
|
21
23
|
Find the latest documentation on using **DX Component Builder** [here](https://docs.pega.com/bundle/constellation-dx-components/page/constellation-dx-components/custom-components/whats-new-constellation-dx-component-builder.html)
|
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ import {{COMPONENT_CLASS_NAME}} from './index';
|
|
|
6
6
|
import { pyReviewRaw, pyReviewResolved, regionChildrenResolved, operatorDetails, configProps } from './mock';
|
|
7
7
|
import StatusWorkRenderer from './StatusWork';
|
|
8
8
|
import Operator from './Operator';
|
|
9
|
+
import type C11nEnv from '@pega/pcore-pconnect-typedefs/interpreter/c11n-env';
|
|
9
10
|
|
|
10
11
|
const meta: Meta<typeof {{COMPONENT_CLASS_NAME}}> = {
|
|
11
12
|
title: '{{COMPONENT_CLASS_NAME}}',
|
|
@@ -74,7 +75,7 @@ const renderField = (resolvedProps: any) => {
|
|
|
74
75
|
value={value}
|
|
75
76
|
variant='datetime'
|
|
76
77
|
format='long'
|
|
77
|
-
clockFormat={
|
|
78
|
+
clockFormat={undefined}
|
|
78
79
|
key={key}
|
|
79
80
|
/>
|
|
80
81
|
);
|
|
@@ -141,7 +142,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
|
|
|
141
142
|
getInheritedProps: () => {
|
|
142
143
|
return pyReviewRaw.config.inheritedProps;
|
|
143
144
|
},
|
|
144
|
-
createComponent: config => {
|
|
145
|
+
createComponent: (config: { config: { value: any; }; }) => {
|
|
145
146
|
// eslint-disable-next-line default-case
|
|
146
147
|
switch (config.config.value) {
|
|
147
148
|
case '@P .pyStatusWork':
|
|
@@ -184,7 +185,7 @@ export const Base{{COMPONENT_CLASS_NAME}}: Story = (args: any) => {
|
|
|
184
185
|
getRawMetadata: () => pyReviewRaw.children[0].children[index],
|
|
185
186
|
getConfigProps: () => {},
|
|
186
187
|
resolveConfigProps: () => regionChildrenResolved[index],
|
|
187
|
-
getComponent: config =>
|
|
188
|
+
getComponent: (config: any) =>
|
|
188
189
|
props.getPConnect().createComponent(pyReviewRaw.children[0].children[index])
|
|
189
190
|
})
|
|
190
191
|
};
|
|
@@ -6,9 +6,27 @@ import {
|
|
|
6
6
|
validateSemver,
|
|
7
7
|
getLibraryArchiveDirectories,
|
|
8
8
|
addDebugLog,
|
|
9
|
-
getConfigDefaults
|
|
9
|
+
getConfigDefaults,
|
|
10
|
+
getComponents,
|
|
11
|
+
updateConfigVersion
|
|
10
12
|
} from '../../util.js';
|
|
11
13
|
|
|
14
|
+
|
|
15
|
+
export const updateAllComponentsConfig = async( newVersion ) => {
|
|
16
|
+
addDebugLog("updateAllComponentsConfig", `newVersion: ${newVersion}`, "");
|
|
17
|
+
const componentList = await getComponents();
|
|
18
|
+
const orgLib = getConfigDefaults();
|
|
19
|
+
// const currentOrgLib = `${orgLib.organization}_${orgLib.library}`;
|
|
20
|
+
const currentOrgLib = orgLib.currentOrgLib;
|
|
21
|
+
|
|
22
|
+
for (const index in componentList) {
|
|
23
|
+
const componentKey = componentList[index];
|
|
24
|
+
await updateConfigVersion(componentKey, newVersion, currentOrgLib);
|
|
25
|
+
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
|
|
12
30
|
export const getOkToProceedQuestion = async () => {
|
|
13
31
|
addDebugLog("getCreateLibComponentQuestions", "", "");
|
|
14
32
|
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
cleanUpTemp
|
|
19
19
|
} from '../../util.js';
|
|
20
20
|
|
|
21
|
-
import { getCreateLibComponentQuestions, getOkToProceedQuestion } from './helper.js';
|
|
21
|
+
import { getCreateLibComponentQuestions, getOkToProceedQuestion, updateAllComponentsConfig } from './helper.js';
|
|
22
22
|
import { showCurrentStatus } from '../show-status/index.js';
|
|
23
23
|
|
|
24
24
|
export default async options => {
|
|
@@ -97,6 +97,12 @@ addDebugLog("createLibrary", "", "+");
|
|
|
97
97
|
await updateComponentDefaultLibrary(libraryName);
|
|
98
98
|
await zipVersionAndArchive(newOrgLib, version);
|
|
99
99
|
|
|
100
|
+
// if didn't have an archive, in case you currently have components there
|
|
101
|
+
// update the config jsons
|
|
102
|
+
if (!hasArch) {
|
|
103
|
+
await updateAllComponentsConfig(version);
|
|
104
|
+
}
|
|
105
|
+
|
|
100
106
|
console.log(`${chalk.bold.green(`\nLibrary ${newOrgLib}/${version} has been created!\n`)}`);
|
|
101
107
|
|
|
102
108
|
await forceDefaultsUpdate();
|
|
@@ -8,7 +8,7 @@ This project provides you with an environment to extend Constellation by giving
|
|
|
8
8
|
|
|
9
9
|
Ensure you have access to the following in your system:
|
|
10
10
|
|
|
11
|
-
- Pega Infinity Server version
|
|
11
|
+
- Pega Infinity Server version 24.2 or later
|
|
12
12
|
|
|
13
13
|
- Git version 2.30 or later
|
|
14
14
|
|
|
@@ -16,6 +16,8 @@ Ensure you have access to the following in your system:
|
|
|
16
16
|
|
|
17
17
|
- System npm version 8, 10 (9 is not supported)
|
|
18
18
|
|
|
19
|
+
- Recommended (node 20, npm 10)
|
|
20
|
+
|
|
19
21
|
## Latest Documentation
|
|
20
22
|
|
|
21
|
-
Find the latest documentation on using **DX Component Builder** [here](https://docs.pega.com/bundle/constellation-dx-components/page/constellation-dx-components/custom-components/whats-new-constellation-dx-
|
|
23
|
+
Find the latest documentation on using **DX Component Builder** [here](https://docs.pega.com/bundle/constellation-dx-components/page/constellation-dx-components/custom-components/whats-new-constellation-dx-component-builder.html)
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"author": "",
|
|
76
76
|
"license": "Enter License",
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@pega/cosmos-react-condition-builder": "7.0.
|
|
79
|
-
"@pega/cosmos-react-core": "7.0.
|
|
80
|
-
"@pega/cosmos-react-work": "7.0.
|
|
78
|
+
"@pega/cosmos-react-condition-builder": "~7.0.6",
|
|
79
|
+
"@pega/cosmos-react-core": "~7.0.6",
|
|
80
|
+
"@pega/cosmos-react-work": "~7.0.6",
|
|
81
81
|
"@pega/eslint-config": "^0.10.2",
|
|
82
82
|
"@pega/tsconfig": "^0.10.2",
|
|
83
83
|
"babel-loader": "^9.1.3",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@pega/configs": "^0.6.0",
|
|
103
|
-
"@pega/custom-dx-components": "0.242.
|
|
103
|
+
"@pega/custom-dx-components": "0.242.42",
|
|
104
104
|
"@pega/pcore-pconnect-typedefs": "~3.0.0",
|
|
105
105
|
"@storybook/addon-actions": "^7.6.7",
|
|
106
106
|
"@storybook/addon-essentials": "^7.6.19",
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
"compilerOptions": {
|
|
5
5
|
"noEmit": true,
|
|
6
6
|
"allowJs": true,
|
|
7
|
-
"importsNotUsedAsValues": "remove"
|
|
7
|
+
"importsNotUsedAsValues": "remove",
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"baseUrl": "./",
|
|
10
|
+
"paths": {
|
|
11
|
+
"@pega/pcore-pconnect-typedefs/*": ["node_modules/@pega/pcore-pconnect-typedefs/*"]
|
|
12
|
+
}
|
|
8
13
|
}
|
|
9
14
|
}
|
package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import PegaDxilMyDetails from './index';
|
|
|
6
6
|
import { pyReviewRaw, pyReviewResolved, regionChildrenResolved, operatorDetails, configProps } from './mock';
|
|
7
7
|
import StatusWorkRenderer from './StatusWork';
|
|
8
8
|
import Operator from './Operator';
|
|
9
|
+
import type C11nEnv from '@pega/pcore-pconnect-typedefs/interpreter/c11n-env';
|
|
9
10
|
|
|
10
11
|
const meta: Meta<typeof PegaDxilMyDetails> = {
|
|
11
12
|
title: 'PegaDxilMyDetails',
|
|
@@ -74,7 +75,7 @@ const renderField = (resolvedProps: any) => {
|
|
|
74
75
|
value={value}
|
|
75
76
|
variant='datetime'
|
|
76
77
|
format='long'
|
|
77
|
-
clockFormat={
|
|
78
|
+
clockFormat={undefined}
|
|
78
79
|
key={key}
|
|
79
80
|
/>
|
|
80
81
|
);
|
|
@@ -141,7 +142,7 @@ export const BasePegaDxilMyDetails: Story = (args: any) => {
|
|
|
141
142
|
getInheritedProps: () => {
|
|
142
143
|
return pyReviewRaw.config.inheritedProps;
|
|
143
144
|
},
|
|
144
|
-
createComponent: config => {
|
|
145
|
+
createComponent: (config: { config: { value: any; }; }) => {
|
|
145
146
|
// eslint-disable-next-line default-case
|
|
146
147
|
switch (config.config.value) {
|
|
147
148
|
case '@P .pyStatusWork':
|
|
@@ -184,7 +185,7 @@ export const BasePegaDxilMyDetails: Story = (args: any) => {
|
|
|
184
185
|
getRawMetadata: () => pyReviewRaw.children[0].children[index],
|
|
185
186
|
getConfigProps: () => {},
|
|
186
187
|
resolveConfigProps: () => regionChildrenResolved[index],
|
|
187
|
-
getComponent: config =>
|
|
188
|
+
getComponent: (config: any) =>
|
|
188
189
|
props.getPConnect().createComponent(pyReviewRaw.children[0].children[index])
|
|
189
190
|
})
|
|
190
191
|
};
|
|
@@ -6,6 +6,7 @@ import PegaDxilMyDetails from './index';
|
|
|
6
6
|
import { pyReviewRaw, pyReviewResolved, regionChildrenResolved, operatorDetails, configProps } from './mock';
|
|
7
7
|
import StatusWorkRenderer from './StatusWork';
|
|
8
8
|
import Operator from './Operator';
|
|
9
|
+
import type C11nEnv from '@pega/pcore-pconnect-typedefs/interpreter/c11n-env';
|
|
9
10
|
|
|
10
11
|
const meta: Meta<typeof PegaDxilMyDetails> = {
|
|
11
12
|
title: 'PegaDxilMyDetails',
|
|
@@ -74,7 +75,7 @@ const renderField = (resolvedProps: any) => {
|
|
|
74
75
|
value={value}
|
|
75
76
|
variant='datetime'
|
|
76
77
|
format='long'
|
|
77
|
-
clockFormat={
|
|
78
|
+
clockFormat={undefined}
|
|
78
79
|
key={key}
|
|
79
80
|
/>
|
|
80
81
|
);
|
|
@@ -141,7 +142,7 @@ export const BasePegaDxilMyDetails: Story = (args: any) => {
|
|
|
141
142
|
getInheritedProps: () => {
|
|
142
143
|
return pyReviewRaw.config.inheritedProps;
|
|
143
144
|
},
|
|
144
|
-
createComponent: config => {
|
|
145
|
+
createComponent: (config: { config: { value: any; }; }) => {
|
|
145
146
|
// eslint-disable-next-line default-case
|
|
146
147
|
switch (config.config.value) {
|
|
147
148
|
case '@P .pyStatusWork':
|
|
@@ -184,7 +185,7 @@ export const BasePegaDxilMyDetails: Story = (args: any) => {
|
|
|
184
185
|
getRawMetadata: () => pyReviewRaw.children[0].children[index],
|
|
185
186
|
getConfigProps: () => {},
|
|
186
187
|
resolveConfigProps: () => regionChildrenResolved[index],
|
|
187
|
-
getComponent: config =>
|
|
188
|
+
getComponent: (config: any) =>
|
|
188
189
|
props.getPConnect().createComponent(pyReviewRaw.children[0].children[index])
|
|
189
190
|
})
|
|
190
191
|
};
|
package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx
CHANGED
|
@@ -6,6 +6,7 @@ import PegaDxilMyDetails from './index';
|
|
|
6
6
|
import { pyReviewRaw, pyReviewResolved, regionChildrenResolved, operatorDetails, configProps } from './mock';
|
|
7
7
|
import StatusWorkRenderer from './StatusWork';
|
|
8
8
|
import Operator from './Operator';
|
|
9
|
+
import type C11nEnv from '@pega/pcore-pconnect-typedefs/interpreter/c11n-env';
|
|
9
10
|
|
|
10
11
|
const meta: Meta<typeof PegaDxilMyDetails> = {
|
|
11
12
|
title: 'PegaDxilMyDetails',
|
|
@@ -74,7 +75,7 @@ const renderField = (resolvedProps: any) => {
|
|
|
74
75
|
value={value}
|
|
75
76
|
variant='datetime'
|
|
76
77
|
format='long'
|
|
77
|
-
clockFormat={
|
|
78
|
+
clockFormat={undefined}
|
|
78
79
|
key={key}
|
|
79
80
|
/>
|
|
80
81
|
);
|
|
@@ -141,7 +142,7 @@ export const BasePegaDxilMyDetails: Story = (args: any) => {
|
|
|
141
142
|
getInheritedProps: () => {
|
|
142
143
|
return pyReviewRaw.config.inheritedProps;
|
|
143
144
|
},
|
|
144
|
-
createComponent: config => {
|
|
145
|
+
createComponent: (config: { config: { value: any; }; }) => {
|
|
145
146
|
// eslint-disable-next-line default-case
|
|
146
147
|
switch (config.config.value) {
|
|
147
148
|
case '@P .pyStatusWork':
|
|
@@ -184,7 +185,7 @@ export const BasePegaDxilMyDetails: Story = (args: any) => {
|
|
|
184
185
|
getRawMetadata: () => pyReviewRaw.children[0].children[index],
|
|
185
186
|
getConfigProps: () => {},
|
|
186
187
|
resolveConfigProps: () => regionChildrenResolved[index],
|
|
187
|
-
getComponent: config =>
|
|
188
|
+
getComponent: (config: any) =>
|
|
188
189
|
props.getPConnect().createComponent(pyReviewRaw.children[0].children[index])
|
|
189
190
|
})
|
|
190
191
|
};
|