Skip to content

Commit 8a83fa2

Browse files
committed
Changeset import, export features are done!
1 parent 7515775 commit 8a83fa2

File tree

16 files changed

+467
-137
lines changed

16 files changed

+467
-137
lines changed

bower.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"salesforce-lightning-design-system": "^2.3.1",
1616
"vue": "^2.5.16",
1717
"font-awesome": "^5.0.13",
18-
"moment": "^2.22.2"
18+
"moment": "^2.22.2",
19+
"js-xlsx": "^0.14.0"
1920
}
2021
}

builder.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
"!src/view/components/font-awesome/advanced-options/*",
2222
"!src/view/components/font-awesome/svg-with-js/*",
2323
"!src/view/components/font-awesome/use-on-desktop/*",
24+
"!src/view/components/js-xlsx/demos/*",
25+
"!src/view/components/js-xlsx/docbits/*",
26+
"!src/view/components/js-xlsx/test_files/*",
27+
"!src/view/components/js-xlsx/tests/*",
28+
"!src/view/components/js-xlsx/types/*",
2429
"!src/view/components/salesforce-lightning-design-system/design-tokens/*",
2530
"!src/view/components/salesforce-lightning-design-system/scss/*",
2631
"!src/view/components/salesforce-lightning-design-system/ui/*",

package-lock.json

Lines changed: 18 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "pipeline",
33
"description": "Be less busy, less mistake in Salesforce metadata deploy",
4-
"version": "0.1.3-beta",
4+
"version": "0.2.0",
55
"private": false,
66
"main": "src/main.js",
77
"dependencies": {
8+
"@exponent/electron-cookies": "^2.0.0",
89
"archiver": "^2.1.1",
910
"async": "^2.6.1",
1011
"decompress-zip": "^0.3.1",

src/class/Pipeline.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class Pipeline {
7171
}
7272
// Change id
7373
const now = new Date();
74-
let newPipeline = utils.popItems(pipeline, ['branch', 'commits', 'type', 'from', 'name', 'prs', 'to', '']);
74+
let newPipeline = utils.popItems(pipeline, ['branch', 'commits', 'type', 'from', 'fromApiVersion', 'name', 'prs', 'to', 'toApiVersion', 'runTests', 'targetTypes']);
7575
newPipeline['id'] = uuidv4();
7676
newPipeline['status'] = 'ready';
7777
newPipeline['created_at'] = now.toISOString();
@@ -271,8 +271,9 @@ class Pipeline {
271271
})
272272
.then(function(zipPath) {
273273
// Do Deploy
274-
// opt @see https://jsforce.github.io/jsforce/doc/Metadata.html#deploy
275-
return metadata.deploy(toConn, zipPath, { rollbackOnError : true }, function(deployResult) {
274+
// opts @see https://jsforce.github.io/jsforce/doc/Metadata.html#deploy
275+
let opts = { rollbackOnError : true, runAllTests : (pipeline.runTests === true) };
276+
return metadata.deploy(toConn, zipPath, opts, function(deployResult) {
276277
self.outputDeployProcessLog(pipelineLog, deployResult);
277278
});
278279
})

src/class/SfdcApi.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ class SfdcApi {
346346
};
347347
if(type == 'CustomTab') {
348348
resetFunction = function(meta) {
349-
meta['label'] = (objLabelMap.hasOwnProperty(meta.fullName)) ? objLabelMap[meta.fullName] : meta.fullName;
349+
meta['customName'] = (objLabelMap.hasOwnProperty(meta.fullName)) ? objLabelMap[meta.fullName] : meta.fullName;
350350
return meta;
351351
};
352352
}
@@ -370,17 +370,17 @@ class SfdcApi {
370370
meta['object'] = objName;
371371
meta['objectLabel'] = (objLabelMap.hasOwnProperty(objName)) ? objLabelMap[objName] : objName;
372372
meta['customName'] = names[1]; // Case.Reply → Reply
373-
meta['label'] = names[1];
374373
return meta;
375374
};
376375
break;
377376
case 'CustomObject' :
378377
case 'MatchingRules' :
378+
case 'SharingRules' :
379379
/*filterFunction = function(meta) {
380380
return (!meta.fullName.endsWith('__c') && !meta.fullName.endsWith('__mdt') && !meta.fullName.endsWith('__kav'));
381381
}*/
382382
resetFunction = function(meta) {
383-
meta['label'] = (objLabelMap.hasOwnProperty(meta.fullName)) ? objLabelMap[meta.fullName] : meta.fullName;
383+
meta['customName'] = (objLabelMap.hasOwnProperty(meta.fullName)) ? objLabelMap[meta.fullName] : meta.fullName;
384384
return meta;
385385
};
386386
break;
@@ -446,7 +446,7 @@ class SfdcApi {
446446
}
447447
for(let i = 0; i < targets.length; i++) {
448448
if(labelMap.hasOwnProperty(targets[i].id)) {
449-
targets[i]['label'] = labelMap[targets[i].id];
449+
targets[i]['customName'] = labelMap[targets[i].id];
450450
}
451451
}
452452
return callback(targets);
@@ -524,13 +524,14 @@ class SfdcApi {
524524
// Filter standard field
525525
continue;
526526
}
527+
if(cMeta.label) cMeta['customName'] = cMeta.label;
527528
if(meta.fullName) cMeta['object'] = meta.fullName;
528529
if(meta.label) cMeta['objectLabel'] = meta.label;
529530
if(utils.isBlank(cMeta.ObjectLabel) && objLabelMap.hasOwnProperty(meta.fullName)) {
530531
// Set Object Label for Workflow Alert
531532
cMeta['objectLabel'] = objLabelMap[meta.fullName];
532533
}
533-
if(child.typeName == 'WorkflowAlert' && cMeta.description) cMeta['label'] = cMeta.description;
534+
if(child.typeName == 'WorkflowAlert' && cMeta.description) cMeta['customName'] = cMeta.description;
534535
if(child.typeName == 'WorkflowFieldUpdate' && cMeta.name) cMeta['customName'] = cMeta.name;
535536

536537
metadataMap[child.typeName].push(cMeta);

src/class/Utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ const utils = {
141141
popItems : function(obj, keys) {
142142
let res = {};
143143
for(let key of keys) {
144-
res[key] = obj[key];
144+
if(obj.hasOwnProperty(key)) res[key] = obj[key];
145145
}
146146
return res;
147147
},

src/config/package.js

Lines changed: 6 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -363,14 +363,14 @@ module.exports = {
363363

364364
}
365365
},
366-
"datacategorygroups":{
366+
/*"datacategorygroups":{
367367
"xmlName":"DataCategoryGroup",
368368
"label":"",
369369
"label_ja":"",
370370
"children":{
371371
372372
}
373-
},
373+
},*/
374374
"remoteSiteSettings":{
375375
"xmlName":"RemoteSiteSetting",
376376
"label":"Remote Site",
@@ -387,62 +387,6 @@ module.exports = {
387387

388388
}
389389
},
390-
"leadSharingRules":{
391-
"xmlName":"LeadSharingRules",
392-
"label":"",
393-
"label_ja":"",
394-
"children":{
395-
396-
}
397-
},
398-
"campaignSharingRules":{
399-
"xmlName":"CampaignSharingRules",
400-
"label":"",
401-
"label_ja":"",
402-
"children":{
403-
404-
}
405-
},
406-
"caseSharingRules":{
407-
"xmlName":"CaseSharingRules",
408-
"label":"",
409-
"label_ja":"",
410-
"children":{
411-
412-
}
413-
},
414-
"contactSharingRules":{
415-
"xmlName":"ContactSharingRules",
416-
"label":"",
417-
"label_ja":"",
418-
"children":{
419-
420-
}
421-
},
422-
"opportunitySharingRules":{
423-
"xmlName":"OpportunitySharingRules",
424-
"label":"",
425-
"label_ja":"",
426-
"children":{
427-
428-
}
429-
},
430-
"accountSharingRules":{
431-
"xmlName":"AccountSharingRules",
432-
"label":"",
433-
"label_ja":"",
434-
"children":{
435-
436-
}
437-
},
438-
"customObjectSharingRules":{
439-
"xmlName":"CustomObjectSharingRules",
440-
"label":"",
441-
"label_ja":"",
442-
"children":{
443-
444-
}
445-
},
446390
"communities":{
447391
"xmlName":"Community",
448392
"label":"Zone",
@@ -475,7 +419,7 @@ module.exports = {
475419

476420
}
477421
},
478-
"synonymDictionaries":{
422+
/*"synonymDictionaries":{
479423
"xmlName":"SynonymDictionary",
480424
"label":"",
481425
"label_ja":"",
@@ -490,7 +434,7 @@ module.exports = {
490434
"children":{
491435
492436
}
493-
},
437+
},*/
494438
"aura":{
495439
"xmlName":"AuraDefinitionBundle",
496440
"label":"Lightning Component Bundle",
@@ -501,8 +445,8 @@ module.exports = {
501445
},
502446
"sharingRules":{
503447
"xmlName":"SharingRules",
504-
"label":"",
505-
"label_ja":"",
448+
"label":"Sharing Rule",
449+
"label_ja":"共有ルール",
506450
"children":{
507451
"sharingTerritoryRules":"SharingTerritoryRule",
508452
"sharingOwnerRules":"SharingOwnerRule",

src/view/css/style.css

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
min-height: 24rem;
1010
margin-bottom: 4rem;
1111
}
12+
.mr0{
13+
margin-right: 0;
14+
}
1215
.mt1{
1316
margin-top: 1rem;
1417
}
@@ -19,7 +22,7 @@
1922
margin-top: 2rem;
2023
}
2124
.mt4{
22-
margin-top: 2rem;
25+
margin-top: 3.3rem;
2326
}
2427
.slds-color-text-error{
2528
color: #c23934;
@@ -272,7 +275,11 @@
272275
}
273276

274277
#pipeline-new .slds-select__label .slds-form-element__label{
275-
line-height: 2;
278+
line-height: 2.5;
279+
}
280+
#pipeline-new .slds-select__label.txt-center {
281+
text-align: center;
282+
padding-left: 1rem;
276283
}
277284

278285
.new-pipeline-connect{
@@ -317,6 +324,17 @@
317324
.new-pipeline-detail .slds-form_horizontal .slds-form-element__label{
318325
padding-right: 0.5rem;
319326
}
327+
.new-pipeline-detail-sfdc .select-middle-col {
328+
width: 178px;
329+
margin-left: 1rem;
330+
}
331+
.new-pipeline-detail-sfdc .check-wide-col{
332+
width: calc(41.66667% - 200px);
333+
}
334+
.new-pipeline-detail-sfdc .select-middle-col .input-small{
335+
width: 175px;
336+
}
337+
320338
.new-pipeline-detail .input-small,
321339
.new-pipeline-detail-sfdc .input-small{
322340
max-width: 366px;
@@ -337,8 +355,8 @@
337355
.slds-dropdown_actions a.slds-color-text-error:hover {
338356
color: #c23934;
339357
}
340-
.slds-form_horizontal .slds-form-element__control.w80 {
341-
width: 80%;
358+
.slds-form_horizontal .slds-form-element__control.w275 {
359+
width: 275px;
342360
}
343361

344362
.metadata-select-table{
@@ -349,7 +367,7 @@
349367
overflow-y: auto;
350368
}
351369
.slds-button-group.inline-group .slds-button+.slds-button {
352-
margin-left: -4px;
370+
margin-left: -5px;
353371
}
354372
/* .new-pipeline-detail-sfdc .slds-form_horizontal .slds-form-element>.slds-form-element__label{
355373
width: 100px;

src/view/index.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<link rel="stylesheet" href="components/font-awesome/web-fonts-with-css/css/fontawesome-all.min.css">
88
<link rel="stylesheet" href="css/style.css">
99
</head>
10-
1110
<body>
1211
<div id="app">
1312
<div class="loading" v-if="(page.status=='processing')">
@@ -45,7 +44,10 @@ <h1 class="">{{ page.title }}</h1>
4544

4645
<script type="text/javascript" src="components/vue/dist/vue.min.js"></script>
4746
<script type="text/javascript" src="components/moment/min/moment-with-locales.min.js"></script>
47+
<script type="text/javascript" src="components/js-xlsx/dist/xlsx.full.min.js"></script>
48+
<script type="text/javascript" src="js/include/ExcelHandler.js"></script>
4849
<script type="text/javascript" src="js/include/master.js"></script>
50+
<script type="text/javascript" src="js/include/ga.js"></script>
4951
<script type="text/javascript" src="js/vue-components/app-message.js"></script>
5052
<script type="text/javascript" src="js/vue-components/app-sidebar.js"></script>
5153
<script type="text/javascript" src="js/vue-components/app-newpipeline-detail-git.js"></script>

src/view/js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ var app = new Vue({
232232
handleError : function(err) {
233233
let message = (typeof err == 'string') ? err : err.message;
234234
if(message && message.length > 0) {
235-
this.showMessage({ type : 'error', message : message });
235+
this.showMessage({ type : err.type || 'error', message : message });
236236
}
237237
}
238238
}

0 commit comments

Comments
 (0)