@pega/custom-dx-components 0.25.44 → 0.25.46
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 +2 -2
- package/src/tasks/build-jest-assets/index.js +4 -4
- package/src/tasks/create/index.js +19 -33
- package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Text/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +0 -1
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/config.json.mustache +0 -1
- package/src/tasks/create/templates/Launchpad/Widget/CASE/config.json.mustache +0 -1
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/config.json.mustache +0 -1
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/config.json.mustache +0 -1
- package/src/tasks/create-all/index.js +22 -35
- package/src/tasks/delete-pub/helper.js +5 -5
- package/src/tasks/delete-pub/index.js +21 -9
- package/src/tasks/export-archive/index.js +0 -11
- package/src/tasks/import-archive/helper.js +38 -39
- package/src/tasks/import-archive/index.js +2 -9
- package/src/tasks/import-comp/index.js +0 -9
- package/src/tasks/init/template/README.md +1 -1
- package/src/tasks/init/template/package.json.mustache +1 -1
- package/src/tasks/list-pub/helper.js +5 -5
- package/src/tasks/list-pub/index.js +5 -4
- package/src/tasks/publish/index.js +5 -1
- package/src/tasks/publish-lib/index.js +0 -7
- package/src/tasks/restore/index.js +0 -3
- package/src/tasks/show-status/index.js +3 -2
- package/src/tasks/validator/index.js +0 -2
- package/src/util.js +30 -11
- package/tests/assets/library/components/create/Pega_DXIL_MyTestText/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyText/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +0 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +0 -1
- package/tests/assets/original/components/create/Pega_DXIL_MyTestText/config.json +0 -1
- package/tests/assets/original/components/create/shared/PConnProps.d.ts +46 -0
- package/tests/assets/original/components/create/shared/create-nonce.ts +5 -0
- package/tests/assets/original/components/create/shared/suggestions-handler.ts +9 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyText/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +0 -1
- package/tests/assets/original/components/createAll/Constellation/shared/PConnProps.d.ts +46 -0
- package/tests/assets/original/components/createAll/Constellation/shared/create-nonce.ts +5 -0
- package/tests/assets/original/components/createAll/Constellation/shared/suggestions-handler.ts +9 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyBoolean/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCurrency/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDecimal/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyEmail/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyForm/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyInteger/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.tsx +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyParagraph/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPercentage/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPhone/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyText/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyURL/config.json +0 -1
- package/tests/assets/original/components/createAll/Launchpad/shared/PConnProps.d.ts +46 -0
- package/tests/assets/original/components/createAll/Launchpad/shared/create-nonce.ts +5 -0
- package/tests/assets/original/components/createAll/Launchpad/shared/suggestions-handler.ts +9 -0
- package/tests/functional/localCreateAllListDeleteAll.test.js +1 -1
- package/tests/functional/localCreateBuildAllDeleteAll.test.js +3 -3
- package/tests/functional/localCreateBuildDelete.test.js +1 -1
- package/tests/functional/localCreateListDelete.test.js +1 -1
- package/tests/functional/localCreatePublishAllDeleteAll.test.js +3 -3
- package/tests/functional/localCreatePublishDelete.test.js +1 -1
- package/tests/functional/localCreateRenameDelete.test.js +1 -1
- package/tests/functional/localLibCreateLibBuildLibDeleteLib.test.js +3 -3
- package/tests/functional/localLibCreateLibBuildLibListPubDeleteLib.test.js +3 -3
- package/tests/functional/localLibCreateLibExportImportLib.test.js +1 -1
- package/tests/functional/localLibCreateLibExportLib.test.js +1 -1
- package/tests/functional/localLibCreateLibListDeleteLib.test.js +1 -1
- package/tests/functional/localLibCreateLibListMoveDeleteLib.test.js +1 -1
- package/tests/functional/localLibCreateLibListSwitchDeleteLib.test.js +1 -1
- package/tests/functional/localLibCreateLibStatusDeleteLib.test.js +1 -1
- package/tests/functional/localLibCreateLibStoreRestoreDeleteLib.test.js +1 -1
- package/tests/functional/localLibCreateLibValidateDeleteLib.test.js +3 -3
- package/tests/functional/localLibCreateLibVersionDeleteLib.test.js +1 -1
package/src/util.js
CHANGED
|
@@ -1322,18 +1322,21 @@ export const showVersion = async () => {
|
|
|
1322
1322
|
};
|
|
1323
1323
|
|
|
1324
1324
|
export const checkForBranch = async(rulesetName) => {
|
|
1325
|
-
if (rulesetName === "") {
|
|
1326
|
-
const serverConfig = await getPegaServerConfig();
|
|
1327
|
-
rulesetName = serverConfig.rulesetName;
|
|
1328
|
-
}
|
|
1329
1325
|
|
|
1330
|
-
if (
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1326
|
+
if (getServerType() === "infinity") {
|
|
1327
|
+
if (rulesetName === "") {
|
|
1328
|
+
const serverConfig = await getPegaServerConfig();
|
|
1329
|
+
rulesetName = serverConfig.rulesetName;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
if (rulesetName.toLowerCase().indexOf("_branch") >= 0) {
|
|
1333
|
+
console.log(
|
|
1334
|
+
chalk.redBright(
|
|
1335
|
+
`Ruleset ${chalk.bold(`${rulesetName}`)} cannot be a branch ruleset.`
|
|
1336
|
+
)
|
|
1337
|
+
);
|
|
1338
|
+
process.exit(1);
|
|
1339
|
+
}
|
|
1337
1340
|
}
|
|
1338
1341
|
}
|
|
1339
1342
|
|
|
@@ -2770,11 +2773,27 @@ export const getMaxComponentNameCount = () => {
|
|
|
2770
2773
|
|
|
2771
2774
|
}
|
|
2772
2775
|
|
|
2776
|
+
export const getStandaloneMaxComponentNameCount = () => {
|
|
2777
|
+
let count = MAX_RFT_CHARS;
|
|
2778
|
+
const configDef = getConfigDefaults();
|
|
2779
|
+
const orgLibCount = configDef.currentOrgLib.length + 1;
|
|
2780
|
+
|
|
2781
|
+
count = count - orgLibCount; // 9 chars for trailing hash
|
|
2782
|
+
|
|
2783
|
+
return count;
|
|
2784
|
+
|
|
2785
|
+
}
|
|
2786
|
+
|
|
2773
2787
|
export const getMaxPrefixCount = () => {
|
|
2774
2788
|
// TwoColumnDetails is 16 chars
|
|
2775
2789
|
return (getMaxComponentNameCount() - 16);
|
|
2776
2790
|
}
|
|
2777
2791
|
|
|
2792
|
+
export const getStandaloneMaxPrefixCount = () => {
|
|
2793
|
+
// TwoColumnDetails is 16 chars
|
|
2794
|
+
return (getStandaloneMaxComponentNameCount() - 16);
|
|
2795
|
+
}
|
|
2796
|
+
|
|
2778
2797
|
export const isComponentValidLength = (componentKey) => {
|
|
2779
2798
|
const configDef = getConfigDefaults();
|
|
2780
2799
|
const componentName = componentKey.replace(configDef.currentOrgLib + "_", "");
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {PConnect } from '@pega/pcore-pconnect-typedefs';
|
|
2
|
+
|
|
3
|
+
// PConnProps.d.ts
|
|
4
|
+
// This gives us a place to have each component (which is most DX Components) that is
|
|
5
|
+
// expected to have a getPConnect extend its props (from BaseProps)
|
|
6
|
+
// such that every component will be expected to have a getPConnect() function
|
|
7
|
+
// that returns a PConnect object. (new/better way of doing .propTypes).
|
|
8
|
+
// This PConnProps can be extended to include other props that we know are in every component
|
|
9
|
+
export interface PConnProps {
|
|
10
|
+
// getPConnect should exist for every C11n component. (add @ts-ignore in special cases where it isn't)
|
|
11
|
+
getPConnect: () => typeof PConnect;
|
|
12
|
+
|
|
13
|
+
// Allow any/all other key/value pairs in the BaseProps for now
|
|
14
|
+
// TODO: refine which other props are always expected for various component
|
|
15
|
+
// types and consider further interface "subclassing". For example, we may
|
|
16
|
+
// want to create a "BasePropsForm" that gives guidance on required, readonly, etc.
|
|
17
|
+
// and any other props that every Form component expects.
|
|
18
|
+
// For example, see the PConnFieldProps below.
|
|
19
|
+
// NOTE: if you uncomment the line below, the PConnProps type will allow
|
|
20
|
+
// otherwise undefined types to appear. This can be helpful for debugging
|
|
21
|
+
// or when adding new components whose types aren't yet known.
|
|
22
|
+
// [key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
// PConnFieldProps extends PConnProps to bring in the common properties that are
|
|
27
|
+
// associated with most field components (ex: Dropdown, TextInput, etc.) in the
|
|
28
|
+
// components/field directory
|
|
29
|
+
export interface PConnFieldProps extends PConnProps {
|
|
30
|
+
label: string,
|
|
31
|
+
required: boolean,
|
|
32
|
+
disabled: boolean,
|
|
33
|
+
value: any,
|
|
34
|
+
validatemessage: string,
|
|
35
|
+
status?: string,
|
|
36
|
+
onChange?: any,
|
|
37
|
+
onBlur?: any,
|
|
38
|
+
readOnly: boolean,
|
|
39
|
+
testId: string,
|
|
40
|
+
helperText: string,
|
|
41
|
+
displayMode?: string,
|
|
42
|
+
hideLabel: boolean,
|
|
43
|
+
placeholder?: string,
|
|
44
|
+
fieldMetadata?: any,
|
|
45
|
+
additionalProps?: any
|
|
46
|
+
}
|