@pega/custom-dx-components 24.1.10 → 24.1.12
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 +1 -1
- package/package.json +1 -1
- 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/create/templates/Constellation/Field/Boolean/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/demo.stories.tsx.mustache +14 -15
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/index.tsx.mustache +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 -0
- 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 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.tsx.mustache +21 -23
- 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/demo.stories.tsx.mustache +14 -17
- 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/Field/Icon-Button-URL/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/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/create-nonce.ts.mustache +6 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/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 +21 -3
- package/src/tasks/init/helper.js +5 -5
- package/src/tasks/init/template/package.json.mustache +4 -4
- package/src/tasks/list/helper.js +4 -1
- package/src/tasks/promote-webpack/webpack.config.js +26 -0
- package/src/tasks/publish/helper.js +46 -45
- package/src/tasks/publish/index.js +8 -2
- package/src/tasks/rename/index.js +10 -2
- package/src/tasks/revert-webpack/index.js +1 -5
- package/src/util.js +6 -6
- 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/createAll/Constellation/Pega_DXIL_MyBoolean/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.tsx +1 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +21 -23
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +14 -15
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/index.tsx +1 -0
- 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 +1 -0
- 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 -0
- 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/demo.stories.tsx +14 -17
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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/Launchpad/Pega_DXIL_MyBoolean/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.tsx +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/create-nonce.ts +6 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/index.tsx +1 -0
- 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 +1 -0
- 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 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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
|
@@ -4,6 +4,7 @@ import { Fragment } from 'react';
|
|
|
4
4
|
import { DateTimeDisplay, Card, CardHeader, CardContent, Flex, 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 Operator from './Operator';
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
URLDisplay
|
|
11
11
|
} from '@pega/cosmos-react-core';
|
|
12
12
|
import type { PConnFieldProps } from './PConnProps';
|
|
13
|
+
import './create-nonce';
|
|
13
14
|
|
|
14
15
|
// IMPORTANT
|
|
15
16
|
// To use Icons, need to individually import the icon file form @pega/cosmos-react-core (see path below)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
2
|
import { Table, Text, withConfiguration } from '@pega/cosmos-react-core';
|
|
3
3
|
import type { PConnFieldProps } from './PConnProps';
|
|
4
|
+
import './create-nonce';
|
|
4
5
|
|
|
5
6
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
6
7
|
|
|
@@ -2,6 +2,7 @@ import { useEffect, useState } from 'react';
|
|
|
2
2
|
import { withConfiguration, Table } from '@pega/cosmos-react-core';
|
|
3
3
|
import { AppAnnouncement as PegaAppAnnouncement } from '@pega/cosmos-react-work';
|
|
4
4
|
import type { PConnFieldProps } from './PConnProps';
|
|
5
|
+
import './create-nonce';
|
|
5
6
|
|
|
6
7
|
import Styled{{COMPONENT_CLASS_NAME}}Wrapper from './styles';
|
|
7
8
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fragment } from 'react';
|
|
2
2
|
import { DateTimeDisplay, Card, CardHeader, CardContent, Flex, 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 Operator from './Operator';
|
|
@@ -140,9 +140,27 @@ export const deleteServerComponents = async (sourceOfComponents, answers) => {
|
|
|
140
140
|
({library, organization} = lpAnswers);
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
let spinner;
|
|
144
|
+
let data;
|
|
145
|
+
try {
|
|
146
|
+
spinner = ora('Fetching components from server').start();
|
|
147
|
+
data = await getComponentsFromServer(library, organization);
|
|
148
|
+
spinner.stop();
|
|
149
|
+
} catch (error) {
|
|
150
|
+
spinner.stop();
|
|
151
|
+
if (error.indexOf('ECONNREFUSED') >= 0) {
|
|
152
|
+
console.log(
|
|
153
|
+
`\n${chalk.bold.red(
|
|
154
|
+
'Error occurred in authentication. Please regenerate using authenticate'
|
|
155
|
+
)}`
|
|
156
|
+
);
|
|
157
|
+
} else {
|
|
158
|
+
console.log(`${chalk.bold.red(error)}`);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// spinner.stop();
|
|
162
|
+
process.exit(1);
|
|
163
|
+
}
|
|
146
164
|
|
|
147
165
|
|
|
148
166
|
let serverComponents;
|
package/src/tasks/init/helper.js
CHANGED
|
@@ -48,11 +48,11 @@ export const getInitProjectQuestions = () => {
|
|
|
48
48
|
message: 'Description',
|
|
49
49
|
default: ''
|
|
50
50
|
},
|
|
51
|
-
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
51
|
+
// {
|
|
52
|
+
// name: 'gitRepositoryUrl',
|
|
53
|
+
// message: 'Git repository url (optional)',
|
|
54
|
+
// default: ''
|
|
55
|
+
// },
|
|
56
56
|
{
|
|
57
57
|
name: 'author',
|
|
58
58
|
message: 'Author',
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"license": "Enter License",
|
|
52
52
|
"sideEffects": false,
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@pega/cosmos-react-condition-builder": "^6.0.
|
|
55
|
-
"@pega/cosmos-react-core": "^6.0.
|
|
56
|
-
"@pega/cosmos-react-work": "^6.0.
|
|
54
|
+
"@pega/cosmos-react-condition-builder": "^6.0.10",
|
|
55
|
+
"@pega/cosmos-react-core": "^6.0.10",
|
|
56
|
+
"@pega/cosmos-react-work": "^6.0.10",
|
|
57
57
|
"dayjs": "^1.11.10",
|
|
58
58
|
"lodash.get": "^4.4.2",
|
|
59
59
|
"polished": "^4.2.2",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@pega/configs": "^0.6.0",
|
|
72
|
-
"@pega/custom-dx-components": "24.1.
|
|
72
|
+
"@pega/custom-dx-components": "24.1.12",
|
|
73
73
|
"@pega/pcore-pconnect-typedefs": "~3.0.0",
|
|
74
74
|
"@storybook/addon-actions": "^7.6.7",
|
|
75
75
|
"@storybook/addon-essentials": "^7.6.7",
|
package/src/tasks/list/helper.js
CHANGED
|
@@ -102,7 +102,10 @@ async function fetchComponentsFromInfinity(apiUrl, headers) {
|
|
|
102
102
|
})
|
|
103
103
|
.then((response) => {
|
|
104
104
|
status = response.status;
|
|
105
|
-
if (status ===
|
|
105
|
+
if (status === 401) {
|
|
106
|
+
throw new Error('Error occurred in authentication. Please regenerate using authenticate');
|
|
107
|
+
}
|
|
108
|
+
else if (status === 404){
|
|
106
109
|
throw new Error('404: Server resource not found');
|
|
107
110
|
}
|
|
108
111
|
else if (status === 405){
|
|
@@ -345,6 +345,7 @@ module.exports = (
|
|
|
345
345
|
resourceRegExp: /^\.\/locale$/,
|
|
346
346
|
contextRegExp: /moment$/
|
|
347
347
|
}),
|
|
348
|
+
/* cosmos 4.x and below */
|
|
348
349
|
/* Ignore cosmos icons */
|
|
349
350
|
new webpack.IgnorePlugin({
|
|
350
351
|
resourceRegExp: /^\.\/icons$/,
|
|
@@ -357,6 +358,31 @@ module.exports = (
|
|
|
357
358
|
contextRegExp: /@pega\\cosmos-react-core\\lib\\components\\Icon$/
|
|
358
359
|
}),
|
|
359
360
|
|
|
361
|
+
/* Ignore cosmos streamline-icons */
|
|
362
|
+
new webpack.IgnorePlugin({
|
|
363
|
+
resourceRegExp: /^\.\/streamline-icons$/,
|
|
364
|
+
contextRegExp: /@pega\/cosmos-react-core\/lib\/components\/Icon$/
|
|
365
|
+
}),
|
|
366
|
+
|
|
367
|
+
/* Ignore cosmos streamline-icons - windows */
|
|
368
|
+
new webpack.IgnorePlugin({
|
|
369
|
+
resourceRegExp: /^\.\/streamline-icons$/,
|
|
370
|
+
contextRegExp: /@pega\\cosmos-react-core\\lib\\components\\Icon$/
|
|
371
|
+
}),
|
|
372
|
+
|
|
373
|
+
/* cosmos 6.x and above */
|
|
374
|
+
/* Ignore cosmos icons */
|
|
375
|
+
new webpack.IgnorePlugin({
|
|
376
|
+
resourceRegExp: /^\.\/.*\/.*\.icon$/,
|
|
377
|
+
contextRegExp: /@pega\/cosmos-react-core\/lib\/components\/Icon$/
|
|
378
|
+
}),
|
|
379
|
+
|
|
380
|
+
/* Ignore cosmos icons - windows */
|
|
381
|
+
new webpack.IgnorePlugin({
|
|
382
|
+
resourceRegExp: /^\.\/.*\/.*\.icon$/,
|
|
383
|
+
contextRegExp: /@pega\\cosmos-react-core\\lib\\components\\Icon$/
|
|
384
|
+
}),
|
|
385
|
+
|
|
360
386
|
new webpack.optimize.LimitChunkCountPlugin({
|
|
361
387
|
maxChunks: 1
|
|
362
388
|
}),
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
TOKEN_PATH
|
|
20
20
|
} from '../../constants.js';
|
|
21
21
|
|
|
22
|
-
export const getPublishComponentQuestions = async
|
|
22
|
+
export const getPublishComponentQuestions = async componentKey => {
|
|
23
23
|
const components = await getComponents();
|
|
24
24
|
|
|
25
25
|
if (components.length === 0) {
|
|
@@ -34,7 +34,9 @@ export const getPublishComponentQuestions = async () => {
|
|
|
34
34
|
name: 'componentKey',
|
|
35
35
|
type: 'rawlist',
|
|
36
36
|
message: 'Select component to publish',
|
|
37
|
-
choices: components
|
|
37
|
+
choices: components,
|
|
38
|
+
default: componentKey,
|
|
39
|
+
when: () => !componentKey
|
|
38
40
|
},
|
|
39
41
|
{
|
|
40
42
|
name: 'rulesetName',
|
|
@@ -157,59 +159,58 @@ export const publishComponentToServer = async (data, doFetch) => {
|
|
|
157
159
|
// refresh_token: refreshToken
|
|
158
160
|
} = JSON.parse(OauthData);
|
|
159
161
|
let status = 500;
|
|
160
|
-
const headers = {
|
|
161
|
-
Authorization: `${tokenType} ${accessToken}`
|
|
162
|
-
};
|
|
162
|
+
const headers = {};
|
|
163
163
|
|
|
164
164
|
if (isLaunchpad) {
|
|
165
165
|
headers.cookie = `Pega-AAT=${accessToken}`;
|
|
166
166
|
headers['Content-Type'] = 'application/json';
|
|
167
|
+
} else {
|
|
168
|
+
headers.Authorization = `${tokenType} ${accessToken}`;
|
|
167
169
|
}
|
|
168
170
|
|
|
169
|
-
fetch(url, {
|
|
171
|
+
const response = await fetch(url, {
|
|
170
172
|
method: 'POST',
|
|
171
173
|
agent: getHttpsAgent(defaultPegaConfig),
|
|
172
174
|
headers,
|
|
173
175
|
body: JSON.stringify(apiBody)
|
|
174
|
-
})
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
});
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
status = response.status;
|
|
179
|
+
if (!response.ok) {
|
|
180
|
+
if (status === 401) {
|
|
181
|
+
throw new Error(
|
|
182
|
+
'Error occurred in authentication. Please regenerate using authenticate'
|
|
183
|
+
);
|
|
184
|
+
// console.log(accessTokenUri, refreshToken);
|
|
185
|
+
/* TODO - Handle refresh_token */
|
|
186
|
+
} else if (status === 404) {
|
|
187
|
+
throw new Error('404: Server resource not found');
|
|
188
|
+
} else if (status === 405) {
|
|
189
|
+
throw new Error('405: Server method not allowed');
|
|
190
|
+
} else if (status === 408) {
|
|
191
|
+
throw new Error('408: Server timed out');
|
|
192
|
+
} else if (response.status === 403) {
|
|
193
|
+
throw new Error('Error forbidden: User does not have privileges to Publish.');
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
try {
|
|
198
|
+
const respData = isLaunchpad ? await response.text() : await response.json();
|
|
199
|
+
console.log(chalk.bold.green(`Success : ${isLaunchpad ? respData : respData.message}`));
|
|
200
|
+
|
|
201
|
+
if (status === 500) {
|
|
202
|
+
status = 999;
|
|
203
|
+
throw new Error(respData.message);
|
|
204
|
+
}
|
|
205
|
+
} catch (err) {
|
|
206
|
+
if (status === 500) {
|
|
207
|
+
throw new Error(
|
|
208
|
+
`Error occurred in authentication. Please regenerate using authenticate`
|
|
209
|
+
);
|
|
210
|
+
} else if (status === 999) {
|
|
211
|
+
throw new Error(err);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
213
214
|
} else {
|
|
214
215
|
throw new Error(`Error occurred in authentication. Please regenerate using authenticate`);
|
|
215
216
|
}
|
|
@@ -31,9 +31,15 @@ export default async options => {
|
|
|
31
31
|
|
|
32
32
|
content = { componentKey, rulesetName, rulesetVersion, devBuild };
|
|
33
33
|
} else {
|
|
34
|
-
|
|
34
|
+
// VS Code pluggin would send in the component
|
|
35
|
+
let paramComponentKey;
|
|
36
|
+
if (options.params.length == 4) {
|
|
37
|
+
paramComponentKey = options.params[3];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const questions = await getPublishComponentQuestions(paramComponentKey);
|
|
35
41
|
const answers = await inquirer.prompt(questions);
|
|
36
|
-
({ componentKey, sourceMap, devBuild } = answers);
|
|
42
|
+
({ componentKey = paramComponentKey, sourceMap, devBuild } = answers);
|
|
37
43
|
|
|
38
44
|
content = {
|
|
39
45
|
...answers
|
|
@@ -225,13 +225,21 @@ export default async options => {
|
|
|
225
225
|
|
|
226
226
|
}
|
|
227
227
|
else {
|
|
228
|
+
|
|
229
|
+
// VS Code pluggin would send in the component
|
|
230
|
+
let paramComponentKey;
|
|
231
|
+
if (options.params.length == 4) {
|
|
232
|
+
paramComponentKey = options.params[3];
|
|
233
|
+
}
|
|
234
|
+
|
|
228
235
|
const questions = [
|
|
229
236
|
{
|
|
230
237
|
name: 'componentKey',
|
|
231
238
|
type: 'rawlist',
|
|
232
239
|
pageSize: 15,
|
|
233
240
|
message: 'Select component to rename',
|
|
234
|
-
choices: localComponents
|
|
241
|
+
choices: localComponents,
|
|
242
|
+
when: () => !paramComponentKey
|
|
235
243
|
},
|
|
236
244
|
{
|
|
237
245
|
name: 'componentName',
|
|
@@ -312,7 +320,7 @@ export default async options => {
|
|
|
312
320
|
|
|
313
321
|
await inquirer.prompt(questions).then(async answers => {
|
|
314
322
|
const {
|
|
315
|
-
componentKey,
|
|
323
|
+
componentKey = paramComponentKey,
|
|
316
324
|
componentName,
|
|
317
325
|
componentLabel,
|
|
318
326
|
organization,
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import path, { join } from 'path';
|
|
4
|
-
import { URL, fileURLToPath } from 'url';
|
|
5
4
|
|
|
6
5
|
import chalk from 'chalk';
|
|
7
|
-
import { up } from 'inquirer/lib/utils/readline.js';
|
|
8
6
|
|
|
9
7
|
import {
|
|
10
|
-
convertIntoPascalCase,
|
|
11
8
|
showVersion,
|
|
12
9
|
updateUseWebPackPromotion
|
|
13
10
|
} from '../../util.js';
|
|
14
11
|
import {
|
|
15
|
-
WEBPACK_CONFIG_JS_FILENAME
|
|
16
|
-
BUILDER_INDEX_FILE_PATH
|
|
12
|
+
WEBPACK_CONFIG_JS_FILENAME
|
|
17
13
|
} from '../../constants.js';
|
|
18
14
|
|
|
19
15
|
|
package/src/util.js
CHANGED
|
@@ -9,7 +9,7 @@ import chalk from 'chalk';
|
|
|
9
9
|
import mustache from 'mustache';
|
|
10
10
|
import pascalCase from 'pascalcase';
|
|
11
11
|
import fetch from 'node-fetch';
|
|
12
|
-
import checkGit from 'check-git';
|
|
12
|
+
// import checkGit from 'check-git';
|
|
13
13
|
|
|
14
14
|
import * as currentPath from './currentPath.cjs';
|
|
15
15
|
import {
|
|
@@ -368,12 +368,12 @@ export const showVersion = () => {
|
|
|
368
368
|
process.exit(1);
|
|
369
369
|
}
|
|
370
370
|
|
|
371
|
-
const hasGit = checkGit(process.cwd());
|
|
371
|
+
// const hasGit = checkGit(process.cwd());
|
|
372
372
|
|
|
373
|
-
if (!hasGit) {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
}
|
|
373
|
+
// if (!hasGit) {
|
|
374
|
+
// console.log(chalk.redBright('DX Component Builder - Git needs to be installed.'));
|
|
375
|
+
// process.exit(1);
|
|
376
|
+
// }
|
|
377
377
|
};
|
|
378
378
|
|
|
379
379
|
export const getOOTBComponents = async () => {
|
package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx
CHANGED
|
@@ -20,36 +20,34 @@ if (!window.PCore) {
|
|
|
20
20
|
window.PCore = {};
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
export const BasePegaDxilMyCaseWidget: Story = args => {
|
|
24
|
+
window.PCore.getConstants = () => {
|
|
25
|
+
return {
|
|
26
|
+
CASE_INFO: {
|
|
27
|
+
CASE_INFO_ID: 'caseInfo.ID'
|
|
28
|
+
}
|
|
29
|
+
};
|
|
28
30
|
};
|
|
29
|
-
};
|
|
30
31
|
|
|
31
|
-
window.PCore.getLocaleUtils = () => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
window.PCore.getLocaleUtils = () => {
|
|
33
|
+
return {
|
|
34
|
+
getLocaleValue: value => {
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
36
38
|
};
|
|
37
|
-
};
|
|
38
39
|
|
|
39
|
-
window.PCore.getDataApiUtils = () => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
window.PCore.getDataApiUtils = () => {
|
|
41
|
+
return {
|
|
42
|
+
getData: () => {
|
|
43
|
+
return new Promise(resolve => {
|
|
44
|
+
resolve(historyData);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
46
48
|
};
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export const BasePegaDxilMyCaseWidget: Story = args => {
|
|
50
49
|
|
|
51
50
|
const props = {
|
|
52
|
-
|
|
53
51
|
getPConnect: () => {
|
|
54
52
|
return {
|
|
55
53
|
getValue: value => {
|
|
@@ -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";
|
|
@@ -2,6 +2,7 @@ import { useState, useEffect, useRef } from 'react';
|
|
|
2
2
|
import { NumberInput, NumberDisplay, CurrencyDisplay, FieldValueList, Text, withConfiguration } from '@pega/cosmos-react-core';
|
|
3
3
|
|
|
4
4
|
import type { PConnFieldProps } from './PConnProps';
|
|
5
|
+
import './create-nonce';
|
|
5
6
|
|
|
6
7
|
// includes in bundle
|
|
7
8
|
import StyledPegaDxilMyDecimalWrapper from './styles';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fragment, Children, ReactElement } from 'react';
|
|
2
2
|
import { Grid, Flex, FieldGroup, withConfiguration, GridContainerProps } from '@pega/cosmos-react-core';
|
|
3
3
|
import type { PConnFieldProps } from './PConnProps';
|
|
4
|
+
import './create-nonce';
|
|
4
5
|
import DetailsRender from './DetailsRender';
|
|
5
6
|
import HighlightRender from './HighlightRender';
|
|
6
7
|
|
|
@@ -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';
|