@pega/custom-dx-components 0.23.49 → 0.23.50
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/package.json +1 -1
- package/src/cli.js +9 -3
- package/src/constants.js +5 -0
- package/src/tasks/build-all/helper.js +1 -1
- package/src/tasks/build-comp/helper.js +4 -2
- package/src/tasks/build-comp/index.js +8 -2
- package/src/tasks/build-jest-assets/index.js +171 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +3 -1
- package/src/tasks/create/templates/Constellation/Field/Date/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Integer/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Input/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Field/Text-URL/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +2 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Template/FORM-region/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Widget/CASE/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/index.tsx.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +1 -0
- package/src/tasks/delete/helper.js +75 -50
- package/src/tasks/index.js +1 -0
- package/src/tasks/init/helper.js +5 -5
- package/src/tasks/init/template/package.json.mustache +5 -4
- package/src/tasks/list/helper.js +5 -2
- package/src/tasks/publish/helper.js +53 -45
- package/src/tasks/publish/index.js +8 -2
- package/src/tasks/publish-all/helper.js +6 -0
- package/src/tasks/rename/index.js +9 -2
- package/src/tasks/revert-webpack/index.js +8 -26
- package/src/util.js +51 -72
- package/tests/assets/components/create/Pega_DXIL_MyTestText/create-nonce.ts +6 -0
- package/tests/assets/components/create/Pega_DXIL_MyTestText/index.tsx +1 -0
- package/tests/assets/components/create/_components.md +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.tsx +3 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/index.tsx +1 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.tsx +2 -1
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/_components.md +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.tsx +3 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/index.tsx +1 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.tsx +2 -1
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.tsx +1 -0
- package/tests/assets/components/createAll/Launchpad/_components.md +1 -0
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -18,7 +18,8 @@ import {
|
|
|
18
18
|
promoteWebPack,
|
|
19
19
|
updateComponent,
|
|
20
20
|
validate,
|
|
21
|
-
upgrade
|
|
21
|
+
upgrade,
|
|
22
|
+
buildJestAssets
|
|
22
23
|
} from './tasks/index.js';
|
|
23
24
|
|
|
24
25
|
const TASKS = {
|
|
@@ -36,9 +37,10 @@ const TASKS = {
|
|
|
36
37
|
VALIDATE_SCHEMA: 'validateSchema',
|
|
37
38
|
UPDATE: 'update',
|
|
38
39
|
DELETE: 'delete',
|
|
39
|
-
DELETE_ALL:
|
|
40
|
+
DELETE_ALL: 'deleteAll',
|
|
40
41
|
AUTHENTICATE: 'authenticate',
|
|
41
|
-
UPGRADE: 'upgrade'
|
|
42
|
+
UPGRADE: 'upgrade',
|
|
43
|
+
BUILD_JEST_ASSETS: 'buildJestAssets'
|
|
42
44
|
};
|
|
43
45
|
|
|
44
46
|
const parseArgumentsIntoOptions = rawArgs => {
|
|
@@ -132,6 +134,10 @@ export default async (args = []) => {
|
|
|
132
134
|
upgrade(options);
|
|
133
135
|
break;
|
|
134
136
|
}
|
|
137
|
+
case TASKS.BUILD_JEST_ASSETS: {
|
|
138
|
+
buildJestAssets(options);
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
135
141
|
default: {
|
|
136
142
|
console.log(chalk.red(`No task matched with ${task}`));
|
|
137
143
|
break;
|
package/src/constants.js
CHANGED
|
@@ -39,6 +39,11 @@ export const BUILDER_DIR_FILE_PATH = '../bundle/builder';
|
|
|
39
39
|
|
|
40
40
|
export const CATEGORY_CONSTELLATION = 'constellation';
|
|
41
41
|
|
|
42
|
+
export const JEST_ASSETS_PATH = 'node_modules/@pega/custom-dx-components/tests/assets/components/';
|
|
43
|
+
export const JEST_CREATE_PATH = 'create/';
|
|
44
|
+
export const JEST_CREATE_ALL_CONSTELLATION_PATH = 'createAll/Constellation/';
|
|
45
|
+
export const JEST_CREATE_ALL_LAUNCHPAD_PATH = 'createAll/Launchpad';
|
|
46
|
+
|
|
42
47
|
export const AUTHENTICATE_DEFAULTS = {
|
|
43
48
|
serverType: 'infinity',
|
|
44
49
|
server: 'https://localhost:1080/prweb',
|
|
@@ -8,7 +8,7 @@ import chalk from 'chalk';
|
|
|
8
8
|
import { constructCompleteUrl, getComponentDirectoryPath, getComponents, getPegaServerConfig, getHttpsAgent } from '../../util.js';
|
|
9
9
|
import { PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT, TOKEN_PATH } from '../../constants.js';
|
|
10
10
|
|
|
11
|
-
export const getPublishComponentQuestions = async () => {
|
|
11
|
+
export const getPublishComponentQuestions = async (componentKey) => {
|
|
12
12
|
const components = await getComponents();
|
|
13
13
|
|
|
14
14
|
if (components.length === 0) {
|
|
@@ -23,7 +23,9 @@ export const getPublishComponentQuestions = async () => {
|
|
|
23
23
|
name: 'componentKey',
|
|
24
24
|
type: 'rawlist',
|
|
25
25
|
message: 'Select component to build',
|
|
26
|
-
choices: components
|
|
26
|
+
choices: components,
|
|
27
|
+
default: componentKey,
|
|
28
|
+
when: () => !componentKey
|
|
27
29
|
},
|
|
28
30
|
{
|
|
29
31
|
name: 'sourceMap',
|
|
@@ -29,9 +29,15 @@ export default async options => {
|
|
|
29
29
|
content = { componentKey, sourceMap, devBuild};
|
|
30
30
|
}
|
|
31
31
|
else {
|
|
32
|
-
|
|
32
|
+
// VS Code pluggin would send in the component
|
|
33
|
+
let paramComponentKey;
|
|
34
|
+
if (options.params.length == 4) {
|
|
35
|
+
paramComponentKey = options.params[3];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const questions = await getPublishComponentQuestions(paramComponentKey);
|
|
33
39
|
const answers = await inquirer.prompt(questions);
|
|
34
|
-
({ componentKey, sourceMap, devBuild } = answers);
|
|
40
|
+
({ componentKey = paramComponentKey, sourceMap, devBuild } = answers);
|
|
35
41
|
|
|
36
42
|
content = {
|
|
37
43
|
...answers
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { join } from 'path';
|
|
4
|
+
import inquirer from 'inquirer';
|
|
5
|
+
import { Listr } from 'listr2';
|
|
6
|
+
import chalk from 'chalk';
|
|
7
|
+
|
|
8
|
+
import { showVersion, getServerType, setServerType, getSubComponents, deleteLocalComponent, checkPathAccess, getComponents } from '../../util.js';
|
|
9
|
+
import createAll from '../create-all/index.js';
|
|
10
|
+
import create from '../create/index.js';
|
|
11
|
+
|
|
12
|
+
import { JEST_ASSETS_PATH, JEST_CREATE_PATH, JEST_CREATE_ALL_CONSTELLATION_PATH, JEST_CREATE_ALL_LAUNCHPAD_PATH, TASKS_CONFIG_JSON_FILENAME, COMPONENTS_DIRECTORY_PATH } from '../../constants.js';
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
const getBuildAssetsQuestions = async () => {
|
|
16
|
+
const message = "\n**IMPORTANT** Building Jest Assets will remove any local components in your components directory!\n";
|
|
17
|
+
console.log(`${chalk.green.bold(message)}`);
|
|
18
|
+
|
|
19
|
+
return [
|
|
20
|
+
{
|
|
21
|
+
name: 'buildAssets',
|
|
22
|
+
type: 'confirm',
|
|
23
|
+
message: 'Generate Jest Assets ?',
|
|
24
|
+
default: false
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const deleteTestComponent = async(path, componentKey) => {
|
|
30
|
+
const directory = join(path, componentKey);
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
fs.rmSync(directory, { recursive: true });
|
|
34
|
+
console.log(`${chalk.red.bold(componentKey)} is deleted from assets`);
|
|
35
|
+
} catch (err) {
|
|
36
|
+
console.log('no file');
|
|
37
|
+
throw new Error(`No such file ${componentKey}`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const copyAssets = async(destinationPath) => {
|
|
42
|
+
const currentDirectory = process.cwd();
|
|
43
|
+
const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
44
|
+
|
|
45
|
+
await checkPathAccess(pegaConfigJsonPath);
|
|
46
|
+
|
|
47
|
+
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
48
|
+
data = JSON.parse(data);
|
|
49
|
+
|
|
50
|
+
if (!data[COMPONENTS_DIRECTORY_PATH]) {
|
|
51
|
+
console.error(
|
|
52
|
+
`${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
|
|
53
|
+
);
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const srcDir = join(currentDirectory, data[COMPONENTS_DIRECTORY_PATH]);
|
|
58
|
+
|
|
59
|
+
fs.cpSync(srcDir, destinationPath, { recursive: true});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const deleteAssets = async() => {
|
|
63
|
+
const currentDirectory = process.cwd();
|
|
64
|
+
const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
65
|
+
|
|
66
|
+
await checkPathAccess(pegaConfigJsonPath);
|
|
67
|
+
|
|
68
|
+
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
69
|
+
data = JSON.parse(data);
|
|
70
|
+
|
|
71
|
+
if (!data[COMPONENTS_DIRECTORY_PATH]) {
|
|
72
|
+
console.error(
|
|
73
|
+
`${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
|
|
74
|
+
);
|
|
75
|
+
process.exit(1);
|
|
76
|
+
}
|
|
77
|
+
const localComponents = await getComponents();
|
|
78
|
+
|
|
79
|
+
for (const index in localComponents) {
|
|
80
|
+
const componentToDelete = localComponents[index];
|
|
81
|
+
// console.log(chalk.bold.green("Deleting: " + componentToDelete));
|
|
82
|
+
// eslint-disable-next-line no-await-in-loop
|
|
83
|
+
const directory = join(currentDirectory, data[COMPONENTS_DIRECTORY_PATH], componentToDelete);
|
|
84
|
+
|
|
85
|
+
try {
|
|
86
|
+
fs.rmSync(directory, { recursive: true });
|
|
87
|
+
console.log(`${chalk.red.bold(componentToDelete)} is deleted from Local`);
|
|
88
|
+
} catch (err) {
|
|
89
|
+
console.log('no file');
|
|
90
|
+
throw new Error(`No such file ${componentToDelete}`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const createJestAssets = async(isLaunchPad = false) => {
|
|
96
|
+
|
|
97
|
+
// initially delete local assets
|
|
98
|
+
await deleteAssets();
|
|
99
|
+
|
|
100
|
+
// const framework = await getFramework();
|
|
101
|
+
let args = [ '','', '', 'My', '0.0.1', 'DXIL', '', 'Pega'];
|
|
102
|
+
let myOptions = {};
|
|
103
|
+
myOptions["params"] = args;
|
|
104
|
+
|
|
105
|
+
await createAll(myOptions);
|
|
106
|
+
|
|
107
|
+
const jestCreateAllPath = isLaunchPad ? JEST_CREATE_ALL_LAUNCHPAD_PATH : JEST_CREATE_ALL_CONSTELLATION_PATH;
|
|
108
|
+
|
|
109
|
+
// goto Constellation
|
|
110
|
+
// get current test assets and delete them
|
|
111
|
+
let createAllPath = path.join(path.resolve(), JEST_ASSETS_PATH, jestCreateAllPath);
|
|
112
|
+
const fileList = await getSubComponents(createAllPath, '');
|
|
113
|
+
|
|
114
|
+
for (const index in fileList) {
|
|
115
|
+
const componentToDelete = fileList[index];
|
|
116
|
+
// console.log(chalk.bold.green("Deleting: " + componentToDelete));
|
|
117
|
+
// eslint-disable-next-line no-await-in-loop
|
|
118
|
+
await deleteTestComponent(createAllPath, componentToDelete);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
await copyAssets(createAllPath);
|
|
122
|
+
await deleteAssets();
|
|
123
|
+
|
|
124
|
+
args = [ '','', '', 'Field', 'Text', 'MyTestText', 'My Test Text', '0.0.1','DXIL', '', 'My Test Text Description', 'Pega'];
|
|
125
|
+
myOptions = {};
|
|
126
|
+
myOptions["params"] = args;
|
|
127
|
+
|
|
128
|
+
await create(myOptions);
|
|
129
|
+
|
|
130
|
+
let createPath = path.join(path.resolve(), JEST_ASSETS_PATH, JEST_CREATE_PATH);
|
|
131
|
+
const myFileList = await getSubComponents(createPath, '');
|
|
132
|
+
|
|
133
|
+
for (const index in myFileList) {
|
|
134
|
+
const componentToDelete = myFileList[index];
|
|
135
|
+
// console.log(chalk.bold.green("Deleting: " + componentToDelete));
|
|
136
|
+
// eslint-disable-next-line no-await-in-loop
|
|
137
|
+
await deleteTestComponent(createPath, componentToDelete);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
await copyAssets(createPath);
|
|
141
|
+
await deleteAssets();
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
export default async options => {
|
|
146
|
+
showVersion();
|
|
147
|
+
|
|
148
|
+
const questions = await getBuildAssetsQuestions();
|
|
149
|
+
const answers = await inquirer.prompt(questions);
|
|
150
|
+
const { buildAssets } = answers;
|
|
151
|
+
|
|
152
|
+
if (buildAssets) {
|
|
153
|
+
// get current server type
|
|
154
|
+
const savedServerType = await getServerType();
|
|
155
|
+
|
|
156
|
+
// Constellation
|
|
157
|
+
await setServerType("infinity");
|
|
158
|
+
await createJestAssets(false);
|
|
159
|
+
|
|
160
|
+
//Launchpad
|
|
161
|
+
await setServerType("launchpad");
|
|
162
|
+
await createJestAssets(true);
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
// restore serverType
|
|
166
|
+
await setServerType(savedServerType);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
};
|
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
} from "@pega/cosmos-react-core";
|
|
8
8
|
|
|
9
9
|
import type { PConnFieldProps } from './PConnProps';
|
|
10
|
+
import './create-nonce';
|
|
11
|
+
|
|
10
12
|
|
|
11
13
|
// includes in bundle
|
|
12
14
|
import handleEvent from "./event-utils";
|
|
@@ -104,7 +106,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
104
106
|
}
|
|
105
107
|
|
|
106
108
|
if (displayMode === 'DISPLAY_ONLY') {
|
|
107
|
-
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComponent </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
109
|
+
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComponent} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
108
110
|
}
|
|
109
111
|
|
|
110
112
|
if (displayMode === "LABELS_LEFT") {
|
|
@@ -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 Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
8
9
|
|
|
@@ -175,7 +176,7 @@ function {{COMPONENT_CLASS_NAME}} (props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
175
176
|
);
|
|
176
177
|
switch(displayMode){
|
|
177
178
|
case 'DISPLAY_ONLY': {
|
|
178
|
-
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
179
|
+
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
179
180
|
}
|
|
180
181
|
case "LABELS_LEFT" : {
|
|
181
182
|
return (
|
|
@@ -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";
|
|
@@ -181,7 +182,7 @@ function {{COMPONENT_CLASS_NAME}} (props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
181
182
|
);
|
|
182
183
|
switch (displayMode) {
|
|
183
184
|
case 'DISPLAY_ONLY': {
|
|
184
|
-
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
185
|
+
return ( <Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
185
186
|
}
|
|
186
187
|
case 'LABELS_LEFT': {
|
|
187
188
|
return (
|
|
@@ -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 Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
@@ -161,7 +162,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
161
162
|
|
|
162
163
|
switch (displayMode) {
|
|
163
164
|
case 'DISPLAY_ONLY': {
|
|
164
|
-
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
165
|
+
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
165
166
|
}
|
|
166
167
|
case 'LABELS_LEFT': {
|
|
167
168
|
return (
|
|
@@ -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';
|
|
@@ -192,7 +193,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
192
193
|
|
|
193
194
|
switch (displayMode) {
|
|
194
195
|
case 'DISPLAY_ONLY': {
|
|
195
|
-
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>) ;
|
|
196
|
+
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>) ;
|
|
196
197
|
}
|
|
197
198
|
case 'LABELS_LEFT': {
|
|
198
199
|
return (
|
package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
import type { PConnFieldProps } from './PConnProps';
|
|
13
|
+
import './create-nonce';
|
|
13
14
|
|
|
14
15
|
// includes in bundle
|
|
15
16
|
import handleEvent from './event-utils';
|
|
@@ -168,7 +169,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
168
169
|
|
|
169
170
|
return displayMode === 'DISPLAY_ONLY' ? (
|
|
170
171
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
171
|
-
displayComp
|
|
172
|
+
{displayComp}
|
|
172
173
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
173
174
|
) : (
|
|
174
175
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
@@ -3,6 +3,7 @@ import { NumberInput, NumberDisplay, Slider, FieldValueList, CurrencyDisplay, Te
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
import type { PConnFieldProps } from './PConnProps';
|
|
6
|
+
import './create-nonce';
|
|
6
7
|
|
|
7
8
|
// includes in bundle
|
|
8
9
|
import handleEvent from "./event-utils";
|
|
@@ -187,7 +188,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
187
188
|
|
|
188
189
|
switch (displayMode) {
|
|
189
190
|
case 'DISPLAY_ONLY': {
|
|
190
|
-
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
191
|
+
return (<Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>);
|
|
191
192
|
}
|
|
192
193
|
case 'LABELS_LEFT': {
|
|
193
194
|
return (
|
|
@@ -4,6 +4,7 @@ import { useState, useEffect, useRef } from 'react';
|
|
|
4
4
|
import { Select, Option, FieldValueList, Text, withConfiguration } from '@pega/cosmos-react-core';
|
|
5
5
|
|
|
6
6
|
import type { PConnFieldProps } from './PConnProps';
|
|
7
|
+
import './create-nonce';
|
|
7
8
|
|
|
8
9
|
// includes in bundle
|
|
9
10
|
import handleEvent from "./event-utils";
|
|
@@ -256,7 +257,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
256
257
|
|
|
257
258
|
return displayMode === 'DISPLAY_ONLY' ? (
|
|
258
259
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
259
|
-
displayComp
|
|
260
|
+
{displayComp}
|
|
260
261
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
261
262
|
) : (
|
|
262
263
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache
CHANGED
|
@@ -4,6 +4,7 @@ import { useEffect, useRef, useState, useMemo, type MutableRefObject, type SetSt
|
|
|
4
4
|
import { ComboBox, menuHelpers, debounce, throttle, Button, Icon, withConfiguration, type MenuGroupProps, type MenuItemProps } from '@pega/cosmos-react-core';
|
|
5
5
|
import get from 'lodash.get';
|
|
6
6
|
import type { PConnFieldProps } from './PConnProps';
|
|
7
|
+
import './create-nonce';
|
|
7
8
|
|
|
8
9
|
// includes in bundle
|
|
9
10
|
import handleEvent from "./event-utils";
|
package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { RadioButton, RadioButtonGroup, withConfiguration } from '@pega/cosmos-react-core';
|
|
4
4
|
import type { PConnFieldProps } from './PConnProps';
|
|
5
|
+
import './create-nonce';
|
|
5
6
|
|
|
6
7
|
// includes in bundle
|
|
7
8
|
import { formatExists, textFormatter } from './textformat-utils';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useState, useEffect, useRef } from 'react';
|
|
2
2
|
import { Input, EmailDisplay, FieldValueList, Text, URLDisplay, PhoneDisplay, 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 { suggestionsHandler } from './suggestions-handler';
|
|
@@ -128,7 +129,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
128
129
|
}
|
|
129
130
|
return displayMode === 'DISPLAY_ONLY' ? (
|
|
130
131
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
131
|
-
displayComp
|
|
132
|
+
{displayComp}
|
|
132
133
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
133
134
|
) : (
|
|
134
135
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useEffect, useState, useRef } from 'react';
|
|
2
2
|
import { Input, FieldValueList, Text, EmailDisplay, PhoneDisplay, URLDisplay, withConfiguration } from '@pega/cosmos-react-core';
|
|
3
3
|
import type { PConnFieldProps } from './PConnProps';
|
|
4
|
+
import './create-nonce';
|
|
4
5
|
|
|
5
6
|
// include in bundle
|
|
6
7
|
import handleEvent from "./event-utils";
|
|
@@ -143,7 +144,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
143
144
|
displayComp = textFormatter(formatter, value);
|
|
144
145
|
}
|
|
145
146
|
return displayMode === 'DISPLAY_ONLY' ? (
|
|
146
|
-
<Styled{{COMPONENT_CLASS_NAME}}Wrapper> displayComp </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
147
|
+
<Styled{{COMPONENT_CLASS_NAME}}Wrapper> {displayComp} </Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
147
148
|
) : (
|
|
148
149
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
149
150
|
<FieldValueList
|
|
@@ -2,6 +2,7 @@ import { useState, useEffect, useRef } from 'react';
|
|
|
2
2
|
import { TextArea as CosmosTextArea, FieldValueList, ParagraphDisplay, Text, EmailDisplay, PhoneDisplay, URLDisplay, 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 { suggestionsHandler } from './suggestions-handler';
|
|
@@ -126,7 +127,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
126
127
|
}
|
|
127
128
|
return displayMode === 'DISPLAY_ONLY' ? (
|
|
128
129
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
129
|
-
displayComp
|
|
130
|
+
{displayComp}
|
|
130
131
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
131
132
|
) : (
|
|
132
133
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
withConfiguration
|
|
11
11
|
} from '@pega/cosmos-react-core';
|
|
12
12
|
import type { PConnFieldProps } from './PConnProps';
|
|
13
|
+
import './create-nonce';
|
|
13
14
|
|
|
14
15
|
// includes in bundle
|
|
15
16
|
import handleEvent from "./event-utils";
|
|
@@ -164,7 +165,7 @@ function {{COMPONENT_CLASS_NAME}}(props: {{COMPONENT_CLASS_NAME}}Props) {
|
|
|
164
165
|
}
|
|
165
166
|
return displayMode === 'DISPLAY_ONLY' ? (
|
|
166
167
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
167
|
-
displayComp
|
|
168
|
+
{displayComp}
|
|
168
169
|
</Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
169
170
|
) : (
|
|
170
171
|
<Styled{{COMPONENT_CLASS_NAME}}Wrapper>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useState, useEffect, useRef} from "react";
|
|
2
2
|
import { Input, FieldValueList, 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 {formatExists,textFormatter, urlFormatter} from "./text-url";
|