@lingk/sync 0.1.98 → 0.2.0
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/build/lightning.js +24 -24
- package/build/lightning.js.map +1 -1
- package/build/lightningStyles.js.map +1 -1
- package/build/lingk.js.map +1 -1
- package/build/lingkStyles.js.map +1 -1
- package/build/main.js +73 -78
- package/build/main.js.map +1 -1
- package/build/metadataFunctions.js +452 -0
- package/build/metadataFunctions.js.map +1 -0
- package/build/reducer.js +29 -29
- package/build/reducer.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,452 @@
|
|
|
1
|
+
module.exports =
|
|
2
|
+
/******/ (function(modules) { // webpackBootstrap
|
|
3
|
+
/******/ // The module cache
|
|
4
|
+
/******/ var installedModules = {};
|
|
5
|
+
/******/
|
|
6
|
+
/******/ // The require function
|
|
7
|
+
/******/ function __webpack_require__(moduleId) {
|
|
8
|
+
/******/
|
|
9
|
+
/******/ // Check if module is in cache
|
|
10
|
+
/******/ if(installedModules[moduleId])
|
|
11
|
+
/******/ return installedModules[moduleId].exports;
|
|
12
|
+
/******/
|
|
13
|
+
/******/ // Create a new module (and put it into the cache)
|
|
14
|
+
/******/ var module = installedModules[moduleId] = {
|
|
15
|
+
/******/ exports: {},
|
|
16
|
+
/******/ id: moduleId,
|
|
17
|
+
/******/ loaded: false
|
|
18
|
+
/******/ };
|
|
19
|
+
/******/
|
|
20
|
+
/******/ // Execute the module function
|
|
21
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
+
/******/
|
|
23
|
+
/******/ // Flag the module as loaded
|
|
24
|
+
/******/ module.loaded = true;
|
|
25
|
+
/******/
|
|
26
|
+
/******/ // Return the exports of the module
|
|
27
|
+
/******/ return module.exports;
|
|
28
|
+
/******/ }
|
|
29
|
+
/******/
|
|
30
|
+
/******/
|
|
31
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
+
/******/ __webpack_require__.m = modules;
|
|
33
|
+
/******/
|
|
34
|
+
/******/ // expose the module cache
|
|
35
|
+
/******/ __webpack_require__.c = installedModules;
|
|
36
|
+
/******/
|
|
37
|
+
/******/ // __webpack_public_path__
|
|
38
|
+
/******/ __webpack_require__.p = "";
|
|
39
|
+
/******/
|
|
40
|
+
/******/ // Load entry module and return exports
|
|
41
|
+
/******/ return __webpack_require__(0);
|
|
42
|
+
/******/ })
|
|
43
|
+
/************************************************************************/
|
|
44
|
+
/******/ ({
|
|
45
|
+
|
|
46
|
+
/***/ 0:
|
|
47
|
+
/***/ function(module, exports, __webpack_require__) {
|
|
48
|
+
|
|
49
|
+
module.exports = __webpack_require__(40);
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/***/ },
|
|
53
|
+
|
|
54
|
+
/***/ 40:
|
|
55
|
+
/***/ function(module, exports) {
|
|
56
|
+
|
|
57
|
+
'use strict';
|
|
58
|
+
|
|
59
|
+
Object.defineProperty(exports, "__esModule", {
|
|
60
|
+
value: true
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
64
|
+
|
|
65
|
+
exports.metadataFunctions = metadataFunctions;
|
|
66
|
+
/*
|
|
67
|
+
Provider-specific nested alphabetization of resources and properties
|
|
68
|
+
|
|
69
|
+
Canvas + BB switch name for type right now
|
|
70
|
+
|
|
71
|
+
Salesforce adds "fake" Lingk External Id to each resource (createLingkExternalIds action)
|
|
72
|
+
Salesforce also adds new virtual resources for Record Type Id differences
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
function metadataFunctions(res, providerType) {
|
|
76
|
+
var meta = null;
|
|
77
|
+
var bannerResources;
|
|
78
|
+
var lingkResources;
|
|
79
|
+
var colleagueResources;
|
|
80
|
+
var canvasResources;
|
|
81
|
+
var psResources;
|
|
82
|
+
var blackboardResources;
|
|
83
|
+
var resources;
|
|
84
|
+
var csvResources;
|
|
85
|
+
|
|
86
|
+
(function () {
|
|
87
|
+
switch (providerType) {
|
|
88
|
+
|
|
89
|
+
case 'Banner':
|
|
90
|
+
if (res) {
|
|
91
|
+
bannerResources = [];
|
|
92
|
+
|
|
93
|
+
res.forEach(function (rsc) {
|
|
94
|
+
rsc.properties && rsc.properties.sort(function (a, b) {
|
|
95
|
+
if (a.label < b.label) return -1;
|
|
96
|
+
if (a.label > b.label) return 1;
|
|
97
|
+
return 0;
|
|
98
|
+
});
|
|
99
|
+
bannerResources.push(rsc);
|
|
100
|
+
});
|
|
101
|
+
meta = bannerResources;
|
|
102
|
+
}
|
|
103
|
+
break;
|
|
104
|
+
|
|
105
|
+
case 'Lingk Adapter':
|
|
106
|
+
if (res) {
|
|
107
|
+
lingkResources = [];
|
|
108
|
+
|
|
109
|
+
res.forEach(function (rsc) {
|
|
110
|
+
rsc.properties && rsc.properties.sort(function (a, b) {
|
|
111
|
+
if (a.label < b.label) return -1;
|
|
112
|
+
if (a.label > b.label) return 1;
|
|
113
|
+
return 0;
|
|
114
|
+
});
|
|
115
|
+
lingkResources.push(rsc);
|
|
116
|
+
});
|
|
117
|
+
meta = lingkResources;
|
|
118
|
+
}
|
|
119
|
+
break;
|
|
120
|
+
|
|
121
|
+
case 'Colleague':
|
|
122
|
+
if (res) {
|
|
123
|
+
colleagueResources = [];
|
|
124
|
+
|
|
125
|
+
res.forEach(function (rsc) {
|
|
126
|
+
rsc.properties && rsc.properties.sort(function (a, b) {
|
|
127
|
+
if (a.label < b.label) return -1;
|
|
128
|
+
if (a.label > b.label) return 1;
|
|
129
|
+
return 0;
|
|
130
|
+
});
|
|
131
|
+
colleagueResources.push(rsc);
|
|
132
|
+
});
|
|
133
|
+
meta = colleagueResources;
|
|
134
|
+
meta.sort(function (a, b) {
|
|
135
|
+
if (a.name < b.name) return -1;
|
|
136
|
+
if (a.name > b.name) return 1;
|
|
137
|
+
return 0;
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
break;
|
|
141
|
+
|
|
142
|
+
case 'Canvas':
|
|
143
|
+
if (res && res.resources) {
|
|
144
|
+
canvasResources = [];
|
|
145
|
+
// sort properties
|
|
146
|
+
|
|
147
|
+
res.resources.forEach(function (rsc) {
|
|
148
|
+
rsc.properties && rsc.properties.sort(function (a, b) {
|
|
149
|
+
if (a && b) {
|
|
150
|
+
if (a.label < b.label) return -1;
|
|
151
|
+
if (a.label > b.label) return 1;
|
|
152
|
+
}
|
|
153
|
+
return 0;
|
|
154
|
+
});
|
|
155
|
+
canvasResources.push(rsc);
|
|
156
|
+
});
|
|
157
|
+
// sort resources
|
|
158
|
+
canvasResources.sort(function (a, b) {
|
|
159
|
+
if (a.type < b.type) return -1;
|
|
160
|
+
if (a.type > b.type) return 1;
|
|
161
|
+
return 0;
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// sort nesting of resources
|
|
165
|
+
meta = [];
|
|
166
|
+
canvasResources = canvasResources.map(function (r) {
|
|
167
|
+
if (r && !r.parentRef) {
|
|
168
|
+
meta.push([Object.assign({}, r, { name: r.type, apiName: r.name })]);
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
return r;
|
|
172
|
+
});
|
|
173
|
+
canvasResources = canvasResources.map(function (r) {
|
|
174
|
+
if (r && r.parentRef.length === 1) {
|
|
175
|
+
var _ret2 = function () {
|
|
176
|
+
var parentString = r.parentRef[0].ref.split('/')[2];
|
|
177
|
+
var parentIndex = meta.findIndex(function (r) {
|
|
178
|
+
return r[0].type === parentString;
|
|
179
|
+
});
|
|
180
|
+
if (parentIndex > -1) {
|
|
181
|
+
meta[parentIndex].push([Object.assign({}, r, { name: r.type, apiName: r.name })]);
|
|
182
|
+
return {
|
|
183
|
+
v: null
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}();
|
|
187
|
+
|
|
188
|
+
if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === "object") return _ret2.v;
|
|
189
|
+
}
|
|
190
|
+
return r;
|
|
191
|
+
});
|
|
192
|
+
canvasResources = canvasResources.map(function (r) {
|
|
193
|
+
if (r && r.parentRef.length === 2) {
|
|
194
|
+
var _ret3 = function () {
|
|
195
|
+
var grandParentString = r.parentRef[1].ref.split('/')[2];
|
|
196
|
+
var grandParentIndex = meta.findIndex(function (r) {
|
|
197
|
+
return r[0].type === grandParentString;
|
|
198
|
+
});
|
|
199
|
+
if (grandParentIndex > -1) {
|
|
200
|
+
var _ret4 = function () {
|
|
201
|
+
var parentString = r.parentRef[0].ref.split('/')[2];
|
|
202
|
+
var parentIndex = meta[grandParentIndex].findIndex(function (r) {
|
|
203
|
+
return r[0] && r[0].type === parentString;
|
|
204
|
+
});
|
|
205
|
+
if (parentIndex > -1) {
|
|
206
|
+
meta[grandParentIndex][parentIndex].push([Object.assign({}, r, { name: r.type, apiName: r.name })]);
|
|
207
|
+
return {
|
|
208
|
+
v: {
|
|
209
|
+
v: null
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
return {
|
|
214
|
+
v: {
|
|
215
|
+
v: r
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
}();
|
|
219
|
+
|
|
220
|
+
if ((typeof _ret4 === 'undefined' ? 'undefined' : _typeof(_ret4)) === "object") return _ret4.v;
|
|
221
|
+
}
|
|
222
|
+
}();
|
|
223
|
+
|
|
224
|
+
if ((typeof _ret3 === 'undefined' ? 'undefined' : _typeof(_ret3)) === "object") return _ret3.v;
|
|
225
|
+
}
|
|
226
|
+
return r;
|
|
227
|
+
});
|
|
228
|
+
meta = flatten(meta);
|
|
229
|
+
}
|
|
230
|
+
break;
|
|
231
|
+
|
|
232
|
+
case 'PeopleSoft':
|
|
233
|
+
if (res) {
|
|
234
|
+
psResources = [];
|
|
235
|
+
|
|
236
|
+
res.forEach(function (rsc) {
|
|
237
|
+
rsc.properties && rsc.properties.sort(function (a, b) {
|
|
238
|
+
if (a.label < b.label) return -1;
|
|
239
|
+
if (a.label > b.label) return 1;
|
|
240
|
+
return 0;
|
|
241
|
+
});
|
|
242
|
+
psResources.push(rsc);
|
|
243
|
+
});
|
|
244
|
+
meta = psResources;
|
|
245
|
+
meta.sort(function (a, b) {
|
|
246
|
+
if (a.name < b.name) return -1;
|
|
247
|
+
if (a.name > b.name) return 1;
|
|
248
|
+
return 0;
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
break;
|
|
252
|
+
|
|
253
|
+
case 'Blackboard':
|
|
254
|
+
var recurseSort = function recurseSort(rsc) {
|
|
255
|
+
rsc.properties && rsc.properties.sort(function (a, b) {
|
|
256
|
+
if (a.hasOwnProperty('object') === b.hasOwnProperty('object')) {
|
|
257
|
+
if (a.label < b.label) return -1;
|
|
258
|
+
if (a.label > b.label) return 1;
|
|
259
|
+
return 0;
|
|
260
|
+
} else if (a.hasOwnProperty('object')) return -1;else return 1;
|
|
261
|
+
});
|
|
262
|
+
rsc.properties && rsc.properties.forEach(function (p) {
|
|
263
|
+
if (p.object) {
|
|
264
|
+
recurseSort(p.object);
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
return rsc;
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
if (res) {
|
|
271
|
+
blackboardResources = [];
|
|
272
|
+
|
|
273
|
+
res.resources.forEach(function (rsc) {
|
|
274
|
+
return blackboardResources.push(recurseSort(rsc));
|
|
275
|
+
});
|
|
276
|
+
blackboardResources.sort(function (a, b) {
|
|
277
|
+
if (a.type < b.type) return -1;
|
|
278
|
+
if (a.type > b.type) return 1;
|
|
279
|
+
return 0;
|
|
280
|
+
});
|
|
281
|
+
meta = [];
|
|
282
|
+
blackboardResources = blackboardResources.map(function (rsc) {
|
|
283
|
+
if (rsc && !rsc.parentRef) {
|
|
284
|
+
meta.push([Object.assign({}, rsc, { name: rsc.type, apiName: rsc.name })]);
|
|
285
|
+
return null;
|
|
286
|
+
}
|
|
287
|
+
return rsc;
|
|
288
|
+
});
|
|
289
|
+
blackboardResources = blackboardResources.map(function (rsc) {
|
|
290
|
+
if (rsc && rsc.parentRef.length === 1) {
|
|
291
|
+
var _ret5 = function () {
|
|
292
|
+
var parentString = rsc.parentRef[0].ref.split('/')[2];
|
|
293
|
+
var index = meta.findIndex(function (r) {
|
|
294
|
+
return r[0].type === parentString;
|
|
295
|
+
});
|
|
296
|
+
if (index > -1) {
|
|
297
|
+
meta[index].push([Object.assign({}, rsc, { name: rsc.type, apiName: rsc.name })]);
|
|
298
|
+
return {
|
|
299
|
+
v: null
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
}();
|
|
303
|
+
|
|
304
|
+
if ((typeof _ret5 === 'undefined' ? 'undefined' : _typeof(_ret5)) === "object") return _ret5.v;
|
|
305
|
+
}
|
|
306
|
+
return rsc;
|
|
307
|
+
});
|
|
308
|
+
blackboardResources = blackboardResources.map(function (rsc) {
|
|
309
|
+
if (rsc && rsc.parentRef.length === 2) {
|
|
310
|
+
var _ret6 = function () {
|
|
311
|
+
var grandParentString = rsc.parentRef[1].ref.split('/')[2];
|
|
312
|
+
var grandParentIndex = meta.findIndex(function (r) {
|
|
313
|
+
return r[0].type === grandParentString;
|
|
314
|
+
});
|
|
315
|
+
if (grandParentIndex > -1) {
|
|
316
|
+
var _ret7 = function () {
|
|
317
|
+
var parentString = rsc.parentRef[0].ref.split('/')[2];
|
|
318
|
+
var parentIndex = meta[grandParentIndex].findIndex(function (r) {
|
|
319
|
+
return r[0] && r[0].type === parentString;
|
|
320
|
+
});
|
|
321
|
+
if (parentIndex > -1) {
|
|
322
|
+
meta[grandParentIndex][parentIndex].push([Object.assign({}, rsc, { name: rsc.type, apiName: rsc.name })]);
|
|
323
|
+
return {
|
|
324
|
+
v: {
|
|
325
|
+
v: null
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
return {
|
|
330
|
+
v: {
|
|
331
|
+
v: rsc
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
}();
|
|
335
|
+
|
|
336
|
+
if ((typeof _ret7 === 'undefined' ? 'undefined' : _typeof(_ret7)) === "object") return _ret7.v;
|
|
337
|
+
}
|
|
338
|
+
}();
|
|
339
|
+
|
|
340
|
+
if ((typeof _ret6 === 'undefined' ? 'undefined' : _typeof(_ret6)) === "object") return _ret6.v;
|
|
341
|
+
}
|
|
342
|
+
return rsc;
|
|
343
|
+
});
|
|
344
|
+
meta = flatten(meta);
|
|
345
|
+
}
|
|
346
|
+
break;
|
|
347
|
+
|
|
348
|
+
case 'Salesforce':
|
|
349
|
+
resources = [];
|
|
350
|
+
|
|
351
|
+
res.resources.forEach(function (rsc) {
|
|
352
|
+
if (!rsc.properties.find(function (p) {
|
|
353
|
+
return p.name === 'Lingk_External_Id__c';
|
|
354
|
+
})) {
|
|
355
|
+
rsc.properties.push({
|
|
356
|
+
label: 'Lingk External Id',
|
|
357
|
+
name: 'Lingk_External_Id__c',
|
|
358
|
+
readOnly: false,
|
|
359
|
+
required: false,
|
|
360
|
+
size: 150,
|
|
361
|
+
type: 'string',
|
|
362
|
+
updateable: true,
|
|
363
|
+
fake: true
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
rsc.properties && rsc.properties.sort(function (a, b) {
|
|
368
|
+
if (a.required === b.required) {
|
|
369
|
+
if (a.label < b.label) return -1;
|
|
370
|
+
if (a.label > b.label) return 1;
|
|
371
|
+
return 0;
|
|
372
|
+
} else if (a.required) return -1;else return 1;
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
if (rsc.metadata && rsc.metadata.recordTypes && rsc.metadata.recordTypes.length > 0) {
|
|
376
|
+
rsc.metadata.recordTypes.forEach(function (recordType) {
|
|
377
|
+
if (recordType.isActive) {
|
|
378
|
+
var metadataResource = res.resources.find(function (r) {
|
|
379
|
+
return r.type === recordType.sobjectType;
|
|
380
|
+
});
|
|
381
|
+
metadataResource && resources.push({
|
|
382
|
+
name: metadataResource.name + ' - ' + recordType.name,
|
|
383
|
+
type: metadataResource.type,
|
|
384
|
+
recordTypeId: recordType.id,
|
|
385
|
+
properties: metadataResource.properties,
|
|
386
|
+
endpointSuffix: metadataResource.endpointSuffix
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
} else {
|
|
391
|
+
resources.push(rsc);
|
|
392
|
+
}
|
|
393
|
+
});
|
|
394
|
+
meta = resources;
|
|
395
|
+
meta.sort(function (a, b) {
|
|
396
|
+
if (a.name < b.name) return -1;
|
|
397
|
+
if (a.name > b.name) return 1;
|
|
398
|
+
return 0;
|
|
399
|
+
});
|
|
400
|
+
break;
|
|
401
|
+
|
|
402
|
+
case 'Flat File':
|
|
403
|
+
if (res) {
|
|
404
|
+
csvResources = [];
|
|
405
|
+
|
|
406
|
+
res.forEach(function (rsc) {
|
|
407
|
+
rsc.properties && rsc.properties.sort(function (a, b) {
|
|
408
|
+
if (a.label < b.label) return -1;
|
|
409
|
+
if (a.label > b.label) return 1;
|
|
410
|
+
return 0;
|
|
411
|
+
});
|
|
412
|
+
csvResources.push(rsc);
|
|
413
|
+
});
|
|
414
|
+
meta = csvResources;
|
|
415
|
+
meta.sort(function (a, b) {
|
|
416
|
+
if (a.name < b.name) return -1;
|
|
417
|
+
if (a.name > b.name) return 1;
|
|
418
|
+
return 0;
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
break;
|
|
422
|
+
|
|
423
|
+
default:
|
|
424
|
+
break;
|
|
425
|
+
}
|
|
426
|
+
})();
|
|
427
|
+
|
|
428
|
+
return meta.map(function (m) {
|
|
429
|
+
return Object.assign({}, m, {
|
|
430
|
+
resourceLabel: m.type + '_' + providerType
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
function flatten(obj) {
|
|
436
|
+
return obj.reduce(function (a, b) {
|
|
437
|
+
if (isArray(a) && isArray(b)) return flatten(a).concat(flatten(b));
|
|
438
|
+
return a.concat(b);
|
|
439
|
+
}, []);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
function isArray(a) {
|
|
443
|
+
if (Object.prototype.toString.call(a) === '[object Array]') {
|
|
444
|
+
return true;
|
|
445
|
+
}
|
|
446
|
+
return false;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/***/ }
|
|
450
|
+
|
|
451
|
+
/******/ });
|
|
452
|
+
//# sourceMappingURL=metadataFunctions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap cd07495355447ae00613?52cf*****","webpack:///./src/lib/reducer/metadataFunctions.js?07c0"],"names":["metadataFunctions","res","providerType","meta","bannerResources","lingkResources","colleagueResources","canvasResources","psResources","blackboardResources","resources","csvResources","forEach","rsc","properties","sort","a","b","label","push","name","type","map","r","parentRef","apiName","length","parentString","ref","split","parentIndex","findIndex","grandParentString","grandParentIndex","flatten","recurseSort","hasOwnProperty","p","object","index","find","readOnly","required","size","updateable","fake","metadata","recordTypes","recordType","isActive","metadataResource","sobjectType","recordTypeId","id","endpointSuffix","m","resourceLabel","obj","reduce","isArray","concat","Object","prototype","toString","call"],"mappings":";;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;SC7BgBA,iB,GAAAA,iB;AAThB;;;;;;;;;AASO,UAASA,iBAAT,CAA2BC,GAA3B,EAAgCC,YAAhC,EAA6C;AAClD,OAAIC,OAAO,IAAX;AADkD,OAMxCC,eANwC;AAAA,OAqBxCC,cArBwC;AAAA,OAoCxCC,kBApCwC;AAAA,OAwDxCC,eAxDwC;AAAA,OAsHxCC,WAtHwC;AAAA,OA2JxCC,mBA3JwC;AAAA,OA2M1CC,SA3M0C;AAAA,OA+PxC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,CAAlB,CAAP;AAC7B,YAAOD,EAAE4C,MAAF,CAAS3C,CAAT,CAAP;AACD,IAHM,EAGJ,EAHI,CAAP;AAID;;AAED,UAAS0C,OAAT,CAAiB3C,CAAjB,EAAoB;AAClB,OAAI6C,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BhD,CAA/B,MAAsC,gBAA1C,EAA6D;AAC3D,YAAO,IAAP;AACD;AACD,UAAO,KAAP;AACD,E","file":"metadataFunctions.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap cd07495355447ae00613","/* \n Provider-specific nested alphabetization of resources and properties\n\n Canvas + BB switch name for type right now\n\n Salesforce adds \"fake\" Lingk External Id to each resource (createLingkExternalIds action)\n Salesforce also adds new virtual resources for Record Type Id differences\n*/\n\nexport function metadataFunctions(res, providerType){\n var meta = null\n switch (providerType) {\n\n case 'Banner':\n if(res){\n var bannerResources = []\n res.forEach(rsc=>{\n rsc.properties && rsc.properties.sort((a, b)=>{\n if(a.label < b.label) return -1;\n if(a.label > b.label) return 1;\n return 0;\n })\n bannerResources.push(rsc)\n })\n meta = bannerResources\n }\n break;\n\n case 'Lingk Adapter':\n if(res){\n var lingkResources = []\n res.forEach(rsc=>{\n rsc.properties && rsc.properties.sort((a, b)=>{\n if(a.label < b.label) return -1;\n if(a.label > b.label) return 1;\n return 0;\n })\n lingkResources.push(rsc)\n })\n meta = lingkResources\n }\n break;\n\n case 'Colleague':\n if(res){\n var colleagueResources = []\n res.forEach(rsc=>{\n rsc.properties && rsc.properties.sort((a, b)=>{\n if(a.label < b.label) return -1;\n if(a.label > b.label) return 1;\n return 0;\n })\n colleagueResources.push(rsc)\n })\n meta = colleagueResources\n meta.sort(function(a, b){\n if(a.name < b.name) return -1;\n if(a.name > b.name) return 1;\n return 0;\n })\n }\n break;\n\n case 'Canvas':\n if(res && res.resources){\n var canvasResources = []\n // sort properties\n res.resources.forEach(rsc=>{\n rsc.properties && rsc.properties.sort((a, b)=>{\n if(a && b){\n if(a.label < b.label) return -1;\n if(a.label > b.label) return 1;\n }\n return 0;\n })\n canvasResources.push(rsc)\n })\n // sort resources\n canvasResources.sort(function(a, b){\n if(a.type < b.type) return -1;\n if(a.type > b.type) return 1;\n return 0;\n })\n\n // sort nesting of resources\n meta = []\n canvasResources = canvasResources.map(r=>{\n if(r && !r.parentRef) {\n meta.push([{...r, name: r.type, apiName: r.name}])\n return null\n }\n return r\n })\n canvasResources = canvasResources.map(r=>{\n if(r && r.parentRef.length === 1) {\n const parentString = r.parentRef[0].ref.split('/')[2]\n const parentIndex = meta.findIndex(r=>r[0].type===parentString)\n if(parentIndex>-1){\n meta[parentIndex].push([{...r, name: r.type, apiName: r.name}])\n return null\n }\n }\n return r\n })\n canvasResources = canvasResources.map(r=>{\n if(r && r.parentRef.length === 2) {\n const grandParentString = r.parentRef[1].ref.split('/')[2]\n const grandParentIndex = meta.findIndex(r=>r[0].type===grandParentString)\n if(grandParentIndex>-1){\n const parentString = r.parentRef[0].ref.split('/')[2]\n const parentIndex = meta[grandParentIndex]\n .findIndex(r=>r[0] && r[0].type===parentString)\n if(parentIndex>-1){\n meta[grandParentIndex][parentIndex].push([{...r, name: r.type, apiName: r.name}])\n return null\n }\n return r\n }\n }\n return r\n })\n meta = flatten(meta)\n }\n break;\n\n case 'PeopleSoft':\n if(res){\n var psResources = []\n res.forEach(rsc=>{\n rsc.properties && rsc.properties.sort((a, b)=>{\n if(a.label < b.label) return -1;\n if(a.label > b.label) return 1;\n return 0;\n })\n psResources.push(rsc)\n })\n meta = psResources\n meta.sort(function(a, b){\n if(a.name < b.name) return -1;\n if(a.name > b.name) return 1;\n return 0;\n })\n }\n break;\n\n case 'Blackboard':\n function recurseSort(rsc){\n rsc.properties && rsc.properties.sort((a, b)=>{\n if(a.hasOwnProperty('object') === b.hasOwnProperty('object')) {\n if(a.label < b.label) return -1;\n if(a.label > b.label) return 1;\n return 0;\n } else if(a.hasOwnProperty('object'))\n return -1;\n else return 1;\n })\n rsc.properties && rsc.properties.forEach(p=>{\n if(p.object){\n recurseSort(p.object)\n }\n })\n return rsc\n }\n if(res){\n var blackboardResources = []\n res.resources.forEach(rsc=>blackboardResources.push(recurseSort(rsc)))\n blackboardResources.sort(function(a, b){\n if(a.type < b.type) return -1;\n if(a.type > b.type) return 1;\n return 0;\n })\n meta = []\n blackboardResources = blackboardResources.map(rsc=>{\n if(rsc && !rsc.parentRef) {\n meta.push([{...rsc,name:rsc.type,apiName:rsc.name}])\n return null\n }\n return rsc\n })\n blackboardResources = blackboardResources.map(rsc=>{\n if(rsc && rsc.parentRef.length===1){\n const parentString = rsc.parentRef[0].ref.split('/')[2]\n const index = meta.findIndex(r=>r[0].type===parentString)\n if(index>-1){\n meta[index].push([{...rsc,name:rsc.type,apiName:rsc.name}])\n return null\n }\n }\n return rsc\n })\n blackboardResources = blackboardResources.map(rsc=>{\n if(rsc && rsc.parentRef.length===2){\n const grandParentString = rsc.parentRef[1].ref.split('/')[2]\n const grandParentIndex = meta.findIndex(r=>r[0].type===grandParentString)\n if(grandParentIndex>-1){\n const parentString = rsc.parentRef[0].ref.split('/')[2]\n const parentIndex = meta[grandParentIndex]\n .findIndex(r=>r[0] && r[0].type===parentString)\n if(parentIndex>-1){\n meta[grandParentIndex][parentIndex].push([{...rsc,name:rsc.type,apiName:rsc.name}])\n return null\n }\n return rsc\n }\n }\n return rsc\n })\n meta = flatten(meta)\n }\n break;\n\n case 'Salesforce':\n var resources = []\n res.resources.forEach((rsc)=>{\n if(!rsc.properties.find(p=>p.name==='Lingk_External_Id__c')){\n rsc.properties.push({\n label:'Lingk External Id',\n name:'Lingk_External_Id__c',\n readOnly:false,\n required:false,\n size:150,\n type:'string',\n updateable:true,\n fake:true,\n })\n }\n\n rsc.properties && rsc.properties.sort(function(a, b) {\n if(a.required === b.required) {\n if(a.label < b.label) return -1;\n if(a.label > b.label) return 1;\n return 0;\n } else if(a.required)\n return -1;\n else return 1;\n })\n\n if(rsc.metadata && rsc.metadata.recordTypes && rsc.metadata.recordTypes.length > 0) {\n rsc.metadata.recordTypes.forEach((recordType)=>{\n if(recordType.isActive){\n const metadataResource = res.resources.find(r=>r.type===recordType.sobjectType)\n metadataResource && resources.push({\n name: metadataResource.name + ' - ' + recordType.name,\n type: metadataResource.type,\n recordTypeId: recordType.id,\n properties: metadataResource.properties,\n endpointSuffix: metadataResource.endpointSuffix,\n })\n }\n })\n } else {\n resources.push(rsc)\n }\n })\n meta = resources\n meta.sort(function(a, b){\n if(a.name < b.name) return -1;\n if(a.name > b.name) return 1;\n return 0;\n })\n break;\n\n case 'Flat File':\n if(res){\n var csvResources = []\n res.forEach(rsc=>{\n rsc.properties && rsc.properties.sort((a, b)=>{\n if(a.label < b.label) return -1;\n if(a.label > b.label) return 1;\n return 0;\n })\n csvResources.push(rsc)\n })\n meta = csvResources\n meta.sort(function(a, b){\n if(a.name < b.name) return -1;\n if(a.name > b.name) return 1;\n return 0;\n })\n }\n break;\n\n default:\n break;\n }\n\n return meta.map(m=>{\n return {\n ...m,\n resourceLabel: `${m.type}_${providerType}`\n }\n })\n\n}\n\nfunction flatten(obj){\n return obj.reduce(function(a, b){\n if(isArray(a) && isArray(b)) return flatten(a).concat(flatten(b))\n return a.concat(b);\n }, []);\n}\n\nfunction isArray(a) {\n if( Object.prototype.toString.call(a) === '[object Array]' ) {\n return true\n }\n return false\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/reducer/metadataFunctions.js"],"sourceRoot":""}
|
package/build/reducer.js
CHANGED
|
@@ -56,33 +56,6 @@ module.exports =
|
|
|
56
56
|
|
|
57
57
|
'use strict';
|
|
58
58
|
|
|
59
|
-
Object.defineProperty(exports, "__esModule", {
|
|
60
|
-
value: true
|
|
61
|
-
});
|
|
62
|
-
var SET_WIZARD_SAVED_MAPPING = exports.SET_WIZARD_SAVED_MAPPING = 'SET_WIZARD_SAVED_MAPPING';
|
|
63
|
-
var SET_WIZARD_SAVED_CONFIGURATION = exports.SET_WIZARD_SAVED_CONFIGURATION = 'SET_WIZARD_SAVED_CONFIGURATION';
|
|
64
|
-
var SET_WIZARD_SAVED_BUNDLES = exports.SET_WIZARD_SAVED_BUNDLES = 'SET_WIZARD_SAVED_BUNDLES';
|
|
65
|
-
var SET_WIZARD_TRIGGER = exports.SET_WIZARD_TRIGGER = 'SET_WIZARD_TRIGGER';
|
|
66
|
-
var SET_WIZARD_LOADED = exports.SET_WIZARD_LOADED = 'SET_WIZARD_LOADED';
|
|
67
|
-
var SET_WIZARD_DATA_LOADED = exports.SET_WIZARD_DATA_LOADED = 'SET_WIZARD_DATA_LOADED';
|
|
68
|
-
var START_WIZARD_ENV_CHECK = exports.START_WIZARD_ENV_CHECK = 'START_WIZARD_ENV_CHECK';
|
|
69
|
-
var FINISH_WIZARD_ENV_CHECK = exports.FINISH_WIZARD_ENV_CHECK = 'FINISH_WIZARD_ENV_CHECK';
|
|
70
|
-
var START_WIZARD_GET_SCENARIO = exports.START_WIZARD_GET_SCENARIO = 'START_WIZARD_GET_SCENARIO';
|
|
71
|
-
var FINISH_WIZARD_GET_SCENARIO = exports.FINISH_WIZARD_GET_SCENARIO = 'FINISH_WIZARD_GET_SCENARIO';
|
|
72
|
-
var SET_WIZARD_OAUTH_URL = exports.SET_WIZARD_OAUTH_URL = 'SET_WIZARD_OAUTH_URL';
|
|
73
|
-
var GETTING_WIZARD_OAUTH_URL = exports.GETTING_WIZARD_OAUTH_URL = 'GETTING_WIZARD_OAUTH_URL';
|
|
74
|
-
var SET_WIZARD_SAVED_CREDENTIALS = exports.SET_WIZARD_SAVED_CREDENTIALS = 'SET_WIZARD_SAVED_CREDENTIALS';
|
|
75
|
-
var SET_WIZARD_ENVIRONMENTS = exports.SET_WIZARD_ENVIRONMENTS = 'SET_WIZARD_ENVIRONMENTS';
|
|
76
|
-
|
|
77
|
-
var CLEAR_WIZARD = exports.CLEAR_WIZARD = 'CLEAR_WIZARD';
|
|
78
|
-
|
|
79
|
-
/***/ },
|
|
80
|
-
|
|
81
|
-
/***/ 69:
|
|
82
|
-
/***/ function(module, exports) {
|
|
83
|
-
|
|
84
|
-
'use strict';
|
|
85
|
-
|
|
86
59
|
Object.defineProperty(exports, "__esModule", {
|
|
87
60
|
value: true
|
|
88
61
|
});
|
|
@@ -475,6 +448,33 @@ module.exports =
|
|
|
475
448
|
|
|
476
449
|
/***/ },
|
|
477
450
|
|
|
451
|
+
/***/ 41:
|
|
452
|
+
/***/ function(module, exports) {
|
|
453
|
+
|
|
454
|
+
'use strict';
|
|
455
|
+
|
|
456
|
+
Object.defineProperty(exports, "__esModule", {
|
|
457
|
+
value: true
|
|
458
|
+
});
|
|
459
|
+
var SET_WIZARD_SAVED_MAPPING = exports.SET_WIZARD_SAVED_MAPPING = 'SET_WIZARD_SAVED_MAPPING';
|
|
460
|
+
var SET_WIZARD_SAVED_CONFIGURATION = exports.SET_WIZARD_SAVED_CONFIGURATION = 'SET_WIZARD_SAVED_CONFIGURATION';
|
|
461
|
+
var SET_WIZARD_SAVED_BUNDLES = exports.SET_WIZARD_SAVED_BUNDLES = 'SET_WIZARD_SAVED_BUNDLES';
|
|
462
|
+
var SET_WIZARD_TRIGGER = exports.SET_WIZARD_TRIGGER = 'SET_WIZARD_TRIGGER';
|
|
463
|
+
var SET_WIZARD_LOADED = exports.SET_WIZARD_LOADED = 'SET_WIZARD_LOADED';
|
|
464
|
+
var SET_WIZARD_DATA_LOADED = exports.SET_WIZARD_DATA_LOADED = 'SET_WIZARD_DATA_LOADED';
|
|
465
|
+
var START_WIZARD_ENV_CHECK = exports.START_WIZARD_ENV_CHECK = 'START_WIZARD_ENV_CHECK';
|
|
466
|
+
var FINISH_WIZARD_ENV_CHECK = exports.FINISH_WIZARD_ENV_CHECK = 'FINISH_WIZARD_ENV_CHECK';
|
|
467
|
+
var START_WIZARD_GET_SCENARIO = exports.START_WIZARD_GET_SCENARIO = 'START_WIZARD_GET_SCENARIO';
|
|
468
|
+
var FINISH_WIZARD_GET_SCENARIO = exports.FINISH_WIZARD_GET_SCENARIO = 'FINISH_WIZARD_GET_SCENARIO';
|
|
469
|
+
var SET_WIZARD_OAUTH_URL = exports.SET_WIZARD_OAUTH_URL = 'SET_WIZARD_OAUTH_URL';
|
|
470
|
+
var GETTING_WIZARD_OAUTH_URL = exports.GETTING_WIZARD_OAUTH_URL = 'GETTING_WIZARD_OAUTH_URL';
|
|
471
|
+
var SET_WIZARD_SAVED_CREDENTIALS = exports.SET_WIZARD_SAVED_CREDENTIALS = 'SET_WIZARD_SAVED_CREDENTIALS';
|
|
472
|
+
var SET_WIZARD_ENVIRONMENTS = exports.SET_WIZARD_ENVIRONMENTS = 'SET_WIZARD_ENVIRONMENTS';
|
|
473
|
+
|
|
474
|
+
var CLEAR_WIZARD = exports.CLEAR_WIZARD = 'CLEAR_WIZARD';
|
|
475
|
+
|
|
476
|
+
/***/ },
|
|
477
|
+
|
|
478
478
|
/***/ 70:
|
|
479
479
|
/***/ function(module, exports, __webpack_require__) {
|
|
480
480
|
|
|
@@ -485,11 +485,11 @@ module.exports =
|
|
|
485
485
|
});
|
|
486
486
|
exports.default = wizardReducer;
|
|
487
487
|
|
|
488
|
-
var _types = __webpack_require__(
|
|
488
|
+
var _types = __webpack_require__(41);
|
|
489
489
|
|
|
490
490
|
var types = _interopRequireWildcard(_types);
|
|
491
491
|
|
|
492
|
-
var _metadataFunctions = __webpack_require__(
|
|
492
|
+
var _metadataFunctions = __webpack_require__(40);
|
|
493
493
|
|
|
494
494
|
var util = _interopRequireWildcard(_metadataFunctions);
|
|
495
495
|
|