@pega/custom-dx-components 0.242.42 → 0.242.44
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/constants.js +2 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +5 -2
- package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/config.json.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/config.json.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/config.json.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Field/Text/config.json.mustache +6 -3
- package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/config.json.mustache +4 -1
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/config.json.mustache +4 -1
- package/src/tasks/export-archive/helper.js +24 -2
- package/src/tasks/export-archive/index.js +5 -1
- package/src/tasks/import-comp/helper.js +24 -3
- package/src/tasks/import-comp/index.js +101 -67
- package/src/tasks/init/template/package.json.mustache +1 -1
- package/src/tasks/init/template/tasks.config.json +2 -0
- package/src/util.js +42 -3
- package/tests/assets/library/components/create/Pega_DXIL_MyTestText/config.json +3 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +5 -2
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyText/config.json +3 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +4 -1
- package/tests/assets/original/components/create/Pega_DXIL_MyTestText/config.json +3 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +5 -2
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyText/config.json +3 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyBoolean/config.json +5 -2
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCurrency/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDecimal/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyEmail/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyInteger/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyParagraph/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPercentage/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPhone/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyText/config.json +3 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/config.json +4 -1
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyURL/config.json +4 -1
package/src/util.js
CHANGED
|
@@ -34,7 +34,9 @@ import {
|
|
|
34
34
|
COMPONENTS_PATH,
|
|
35
35
|
ARCHIVES_PATH,
|
|
36
36
|
TEMP_PATH,
|
|
37
|
-
JEST_TESTS_FUNCTIONAL_PATH
|
|
37
|
+
JEST_TESTS_FUNCTIONAL_PATH,
|
|
38
|
+
IMPORT_RELATIVE_PATH,
|
|
39
|
+
EXPORT_RELATIVE_PATH
|
|
38
40
|
} from './constants.js';
|
|
39
41
|
|
|
40
42
|
|
|
@@ -57,7 +59,9 @@ let defaultConfigs = {
|
|
|
57
59
|
version: "",
|
|
58
60
|
buildVersion: "",
|
|
59
61
|
displayLibVersion: "",
|
|
60
|
-
showDebug: false
|
|
62
|
+
showDebug: false,
|
|
63
|
+
importRelativePath: "",
|
|
64
|
+
exportRelativePath: ""
|
|
61
65
|
};
|
|
62
66
|
|
|
63
67
|
let pegaConfig = null;
|
|
@@ -110,7 +114,9 @@ export const setUpDefaults = async () => {
|
|
|
110
114
|
version: "",
|
|
111
115
|
buildVersion: "",
|
|
112
116
|
displayLibVersion: "",
|
|
113
|
-
showDebug: false
|
|
117
|
+
showDebug: false,
|
|
118
|
+
importRelativePath: "",
|
|
119
|
+
exportRelativePath: ""
|
|
114
120
|
};
|
|
115
121
|
|
|
116
122
|
// retrievedConfigData
|
|
@@ -124,6 +130,14 @@ export const setUpDefaults = async () => {
|
|
|
124
130
|
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
125
131
|
data = JSON.parse(data);
|
|
126
132
|
|
|
133
|
+
if (data[IMPORT_RELATIVE_PATH]) {
|
|
134
|
+
retrievedConfigData.importRelativePath = data[IMPORT_RELATIVE_PATH];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (data[EXPORT_RELATIVE_PATH]) {
|
|
138
|
+
retrievedConfigData.exportRelativePath = data[EXPORT_RELATIVE_PATH];
|
|
139
|
+
}
|
|
140
|
+
|
|
127
141
|
if (data[LIBRARY_BASED]) {
|
|
128
142
|
retrievedConfigData.isLibraryBased = data[LIBRARY_BASED];
|
|
129
143
|
}
|
|
@@ -674,6 +688,30 @@ if (showDebug) addDebugLog("setConfigDevBuild", `devBuild: ${devBuild}`, "");
|
|
|
674
688
|
fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(configData, null, 4), { encoding: 'utf8' });
|
|
675
689
|
}
|
|
676
690
|
|
|
691
|
+
export const setConfigImportRelativePath = async (importRelativePath) => {
|
|
692
|
+
if (showDebug) addDebugLog("setConfigImportRelativePath", `importRelativePath: ${importRelativePath}`, "");
|
|
693
|
+
const currentDirectory = process.cwd();
|
|
694
|
+
const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
695
|
+
let configData = await getPegaConfig();
|
|
696
|
+
configData[IMPORT_RELATIVE_PATH] = importRelativePath;
|
|
697
|
+
|
|
698
|
+
// update file
|
|
699
|
+
// stringify "4", makes the json string look like JSON in the file, formated instead of a single line
|
|
700
|
+
fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(configData, null, 4), { encoding: 'utf8' });
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
export const setConfigExportRelativePath = async (exportRelativePath) => {
|
|
704
|
+
if (showDebug) addDebugLog("setConfigImportRelativePath", `exportRelativePath: ${exportRelativePath}`, "");
|
|
705
|
+
const currentDirectory = process.cwd();
|
|
706
|
+
const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
707
|
+
let configData = await getPegaConfig();
|
|
708
|
+
configData[EXPORT_RELATIVE_PATH] = exportRelativePath;
|
|
709
|
+
|
|
710
|
+
// update file
|
|
711
|
+
// stringify "4", makes the json string look like JSON in the file, formated instead of a single line
|
|
712
|
+
fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(configData, null, 4), { encoding: 'utf8' });
|
|
713
|
+
}
|
|
714
|
+
|
|
677
715
|
export const updateDefaultOrganization = async (organization) => {
|
|
678
716
|
if (showDebug) addDebugLog("updateDefaultOrganization", `organization: ${organization}`, "");
|
|
679
717
|
let packageData = JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf-8'));
|
|
@@ -817,6 +855,7 @@ if (showDebug) addDebugLog("getComponentDirectoryPath", "END", "-");
|
|
|
817
855
|
return overrideDir ? join(overrideDir, componentKey) : join(currentDirectory, data[COMPONENTS_DIRECTORY_PATH], componentKey);
|
|
818
856
|
};
|
|
819
857
|
|
|
858
|
+
|
|
820
859
|
export const compileMustacheTemplate = (file, data) => {
|
|
821
860
|
if (showDebug) addDebugLog("compileMustacheTemplate", `file: ${file}`, "");
|
|
822
861
|
const content = fs.readFileSync(file, 'utf8');
|
package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json
CHANGED
|
@@ -109,6 +109,9 @@
|
|
|
109
109
|
"label": "@L $this.label",
|
|
110
110
|
"placeholder": "@L Select...",
|
|
111
111
|
"listType": "associated",
|
|
112
|
-
"datasource": "@ASSOCIATED .$this.name"
|
|
112
|
+
"datasource": "@ASSOCIATED .$this.name",
|
|
113
|
+
"detailFVLItem": true,
|
|
114
|
+
"isFormWidth" : false,
|
|
115
|
+
"isContainerWidth" : false
|
|
113
116
|
}
|
|
114
117
|
}
|
package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json
CHANGED
|
@@ -108,6 +108,9 @@
|
|
|
108
108
|
"defaultConfig": {
|
|
109
109
|
"label": "@L $this.label",
|
|
110
110
|
"listType": "associated",
|
|
111
|
-
"datasource": "@ASSOCIATED .$this.name"
|
|
111
|
+
"datasource": "@ASSOCIATED .$this.name",
|
|
112
|
+
"detailFVLItem": true,
|
|
113
|
+
"isFormWidth" : true,
|
|
114
|
+
"isContainerWidth" : false
|
|
112
115
|
}
|
|
113
116
|
}
|
package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json
CHANGED
|
@@ -110,6 +110,9 @@
|
|
|
110
110
|
"placeholder": "@L Select...",
|
|
111
111
|
"listType": "associated",
|
|
112
112
|
"datasource": "@ASSOCIATED .$this.name",
|
|
113
|
-
"deferDatasource": true
|
|
113
|
+
"deferDatasource": true,
|
|
114
|
+
"detailFVLItem": true,
|
|
115
|
+
"isFormWidth" : false,
|
|
116
|
+
"isContainerWidth" : false
|
|
114
117
|
}
|
|
115
118
|
}
|
package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json
CHANGED
|
@@ -109,6 +109,9 @@
|
|
|
109
109
|
"label": "@L $this.label",
|
|
110
110
|
"placeholder": "@L Select...",
|
|
111
111
|
"listType": "associated",
|
|
112
|
-
"datasource": "@ASSOCIATED .$this.name"
|
|
112
|
+
"datasource": "@ASSOCIATED .$this.name",
|
|
113
|
+
"detailFVLItem": true,
|
|
114
|
+
"isFormWidth" : false,
|
|
115
|
+
"isContainerWidth" : false
|
|
113
116
|
}
|
|
114
117
|
}
|
|
@@ -108,6 +108,9 @@
|
|
|
108
108
|
"defaultConfig": {
|
|
109
109
|
"label": "@L $this.label",
|
|
110
110
|
"listType": "associated",
|
|
111
|
-
"datasource": "@ASSOCIATED .$this.name"
|
|
111
|
+
"datasource": "@ASSOCIATED .$this.name",
|
|
112
|
+
"detailFVLItem": true,
|
|
113
|
+
"isFormWidth" : true,
|
|
114
|
+
"isContainerWidth" : false
|
|
112
115
|
}
|
|
113
116
|
}
|
package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json
CHANGED
|
@@ -110,6 +110,9 @@
|
|
|
110
110
|
"placeholder": "@L Select...",
|
|
111
111
|
"listType": "associated",
|
|
112
112
|
"datasource": "@ASSOCIATED .$this.name",
|
|
113
|
-
"deferDatasource": true
|
|
113
|
+
"deferDatasource": true,
|
|
114
|
+
"detailFVLItem": true,
|
|
115
|
+
"isFormWidth" : false,
|
|
116
|
+
"isContainerWidth" : false
|
|
114
117
|
}
|
|
115
118
|
}
|