@lingk/sync 1.1.51 → 1.1.52
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/credentialSections.js +45997 -0
- package/build/credentialSections.js.map +1 -0
- package/build/css/credentialSections.css +334 -0
- package/build/css/credentialSections.css.map +1 -0
- package/build/css/lightningStyles.css +170 -0
- package/build/css/lightningStyles.css.map +1 -0
- package/build/css/lingkStyles.css +222 -0
- package/build/css/lingkStyles.css.map +1 -0
- package/build/css/main.css +1577 -0
- package/build/css/main.css.map +1 -0
- package/build/lightning.js +3585 -0
- package/build/lightning.js.map +1 -0
- package/build/lightningStyles.js +62 -0
- package/build/lightningStyles.js.map +1 -0
- package/build/lingk.js +1681 -0
- package/build/lingk.js.map +1 -0
- package/build/lingkStyles.js +62 -0
- package/build/lingkStyles.js.map +1 -0
- package/build/loadData.js +367 -0
- package/build/loadData.js.map +1 -0
- package/build/main.js +69447 -0
- package/build/main.js.map +1 -0
- package/build/metadataDropdown.js +303 -0
- package/build/metadataDropdown.js.map +1 -0
- package/build/metadataFunctions.js +448 -0
- package/build/metadataFunctions.js.map +1 -0
- package/build/reducer.js +609 -0
- package/build/reducer.js.map +1 -0
- package/build/saveData.js +369 -0
- package/build/saveData.js.map +1 -0
- package/package.json +1 -1
package/build/reducer.js
ADDED
|
@@ -0,0 +1,609 @@
|
|
|
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__(130);
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/***/ },
|
|
53
|
+
|
|
54
|
+
/***/ 66:
|
|
55
|
+
/***/ function(module, exports) {
|
|
56
|
+
|
|
57
|
+
'use strict';
|
|
58
|
+
|
|
59
|
+
Object.defineProperty(exports, "__esModule", {
|
|
60
|
+
value: true
|
|
61
|
+
});
|
|
62
|
+
exports.metadataFunctions = metadataFunctions;
|
|
63
|
+
/*
|
|
64
|
+
Provider-specific nested alphabetization of resources and properties
|
|
65
|
+
|
|
66
|
+
Canvas + BB switch name for type right now
|
|
67
|
+
|
|
68
|
+
Salesforce adds "fake" Lingk External Id to each resource (createLingkExternalIds action)
|
|
69
|
+
Salesforce also adds new virtual resources for Record Type Id differences
|
|
70
|
+
*/
|
|
71
|
+
|
|
72
|
+
function metadataFunctions(r, providerType) {
|
|
73
|
+
|
|
74
|
+
var res = void 0;
|
|
75
|
+
// if the metadata comes in an array
|
|
76
|
+
if (Array.isArray(r)) {
|
|
77
|
+
res = r;
|
|
78
|
+
} else if (r.resources) {
|
|
79
|
+
// if the metadata is an object with a "resources" property array
|
|
80
|
+
res = r.resources;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
var meta = null;
|
|
84
|
+
switch (providerType) {
|
|
85
|
+
|
|
86
|
+
/*case 'Banner':
|
|
87
|
+
if(res){
|
|
88
|
+
var bannerResources = []
|
|
89
|
+
res.forEach(rsc=>{
|
|
90
|
+
rsc.properties && rsc.properties.sort((a, b)=>{
|
|
91
|
+
if(a.label < b.label) return -1;
|
|
92
|
+
if(a.label > b.label) return 1;
|
|
93
|
+
return 0;
|
|
94
|
+
})
|
|
95
|
+
bannerResources.push(rsc)
|
|
96
|
+
})
|
|
97
|
+
meta = bannerResources
|
|
98
|
+
}
|
|
99
|
+
break;*/
|
|
100
|
+
|
|
101
|
+
/*case 'Moodle':
|
|
102
|
+
if(res){
|
|
103
|
+
var moodleResources = []
|
|
104
|
+
res.resources.forEach(rsc=>{
|
|
105
|
+
rsc.properties && rsc.properties.sort((a, b)=>{
|
|
106
|
+
if(a.label < b.label) return -1;
|
|
107
|
+
if(a.label > b.label) return 1;
|
|
108
|
+
return 0;
|
|
109
|
+
})
|
|
110
|
+
moodleResources.push(rsc)
|
|
111
|
+
})
|
|
112
|
+
meta = moodleResources
|
|
113
|
+
}
|
|
114
|
+
break;*/
|
|
115
|
+
|
|
116
|
+
/*case 'LingkAdapter':
|
|
117
|
+
if(res){
|
|
118
|
+
var lingkResources = []
|
|
119
|
+
res.forEach(rsc=>{
|
|
120
|
+
rsc.properties && rsc.properties.sort((a, b)=>{
|
|
121
|
+
if(a.label < b.label) return -1;
|
|
122
|
+
if(a.label > b.label) return 1;
|
|
123
|
+
return 0;
|
|
124
|
+
})
|
|
125
|
+
lingkResources.push(rsc)
|
|
126
|
+
})
|
|
127
|
+
meta = lingkResources
|
|
128
|
+
}
|
|
129
|
+
break;*/
|
|
130
|
+
|
|
131
|
+
/*case 'Colleague':
|
|
132
|
+
if(res){
|
|
133
|
+
var colleagueResources = []
|
|
134
|
+
res.forEach(rsc=>{
|
|
135
|
+
rsc.properties && rsc.properties.sort((a, b)=>{
|
|
136
|
+
if(a.label < b.label) return -1;
|
|
137
|
+
if(a.label > b.label) return 1;
|
|
138
|
+
return 0;
|
|
139
|
+
})
|
|
140
|
+
colleagueResources.push(rsc)
|
|
141
|
+
})
|
|
142
|
+
meta = colleagueResources
|
|
143
|
+
meta.sort(function(a, b){
|
|
144
|
+
if(a.name < b.name) return -1;
|
|
145
|
+
if(a.name > b.name) return 1;
|
|
146
|
+
return 0;
|
|
147
|
+
})
|
|
148
|
+
}
|
|
149
|
+
break;*/
|
|
150
|
+
|
|
151
|
+
case 'Canvas':
|
|
152
|
+
if (res) {
|
|
153
|
+
var canvasResources = [];
|
|
154
|
+
// sort properties
|
|
155
|
+
res.forEach(function (rsc) {
|
|
156
|
+
rsc.properties && rsc.properties.sort(function (a, b) {
|
|
157
|
+
if (a && b) {
|
|
158
|
+
if (a.label < b.label) return -1;
|
|
159
|
+
if (a.label > b.label) return 1;
|
|
160
|
+
}
|
|
161
|
+
return 0;
|
|
162
|
+
});
|
|
163
|
+
canvasResources.push(rsc);
|
|
164
|
+
});
|
|
165
|
+
// sort resources
|
|
166
|
+
canvasResources.sort(function (a, b) {
|
|
167
|
+
if (a.type < b.type) return -1;
|
|
168
|
+
if (a.type > b.type) return 1;
|
|
169
|
+
return 0;
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
// sort nesting of resources
|
|
173
|
+
meta = [];
|
|
174
|
+
canvasResources = canvasResources.map(function (r) {
|
|
175
|
+
if (r && !r.parentRef) {
|
|
176
|
+
meta.push([Object.assign({}, r, { name: r.type, apiName: r.name })]);
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
return r;
|
|
180
|
+
});
|
|
181
|
+
canvasResources = canvasResources.map(function (r) {
|
|
182
|
+
if (r && r.parentRef.length === 1) {
|
|
183
|
+
var parentString = r.parentRef[0].ref.split('/')[2];
|
|
184
|
+
var parentIndex = meta.findIndex(function (r) {
|
|
185
|
+
return r[0].type === parentString;
|
|
186
|
+
});
|
|
187
|
+
if (parentIndex > -1) {
|
|
188
|
+
meta[parentIndex].push([Object.assign({}, r, { name: r.type, apiName: r.name })]);
|
|
189
|
+
return null;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return r;
|
|
193
|
+
});
|
|
194
|
+
canvasResources = canvasResources.map(function (r) {
|
|
195
|
+
if (r && r.parentRef.length === 2) {
|
|
196
|
+
var grandParentString = r.parentRef[1].ref.split('/')[2];
|
|
197
|
+
var grandParentIndex = meta.findIndex(function (r) {
|
|
198
|
+
return r[0].type === grandParentString;
|
|
199
|
+
});
|
|
200
|
+
if (grandParentIndex > -1) {
|
|
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 null;
|
|
208
|
+
}
|
|
209
|
+
return r;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return r;
|
|
213
|
+
});
|
|
214
|
+
meta = flatten(meta);
|
|
215
|
+
}
|
|
216
|
+
break;
|
|
217
|
+
|
|
218
|
+
/*case 'PeopleSoft':
|
|
219
|
+
if(res){
|
|
220
|
+
var psResources = []
|
|
221
|
+
res.forEach(rsc=>{
|
|
222
|
+
rsc.properties && rsc.properties.sort((a, b)=>{
|
|
223
|
+
if(a.label < b.label) return -1;
|
|
224
|
+
if(a.label > b.label) return 1;
|
|
225
|
+
return 0;
|
|
226
|
+
})
|
|
227
|
+
psResources.push(rsc)
|
|
228
|
+
})
|
|
229
|
+
meta = psResources
|
|
230
|
+
meta.sort(function(a, b){
|
|
231
|
+
if(a.name < b.name) return -1;
|
|
232
|
+
if(a.name > b.name) return 1;
|
|
233
|
+
return 0;
|
|
234
|
+
})
|
|
235
|
+
}
|
|
236
|
+
break;*/
|
|
237
|
+
|
|
238
|
+
case 'Blackboard':
|
|
239
|
+
var recurseSort = function recurseSort(rsc) {
|
|
240
|
+
rsc.properties && rsc.properties.sort(function (a, b) {
|
|
241
|
+
if (a.hasOwnProperty('object') === b.hasOwnProperty('object')) {
|
|
242
|
+
if (a.label < b.label) return -1;
|
|
243
|
+
if (a.label > b.label) return 1;
|
|
244
|
+
return 0;
|
|
245
|
+
} else if (a.hasOwnProperty('object')) return -1;else return 1;
|
|
246
|
+
});
|
|
247
|
+
rsc.properties && rsc.properties.forEach(function (p) {
|
|
248
|
+
if (p.object) {
|
|
249
|
+
recurseSort(p.object);
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
return rsc;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
if (res) {
|
|
256
|
+
var blackboardResources = [];
|
|
257
|
+
res.forEach(function (rsc) {
|
|
258
|
+
return blackboardResources.push(recurseSort(rsc));
|
|
259
|
+
});
|
|
260
|
+
blackboardResources.sort(function (a, b) {
|
|
261
|
+
if (a.type < b.type) return -1;
|
|
262
|
+
if (a.type > b.type) return 1;
|
|
263
|
+
return 0;
|
|
264
|
+
});
|
|
265
|
+
meta = [];
|
|
266
|
+
blackboardResources = blackboardResources.map(function (rsc) {
|
|
267
|
+
if (rsc && !rsc.parentRef) {
|
|
268
|
+
meta.push([Object.assign({}, rsc, { name: rsc.type, apiName: rsc.name })]);
|
|
269
|
+
return null;
|
|
270
|
+
}
|
|
271
|
+
return rsc;
|
|
272
|
+
});
|
|
273
|
+
blackboardResources = blackboardResources.map(function (rsc) {
|
|
274
|
+
if (rsc && rsc.parentRef.length === 1) {
|
|
275
|
+
var parentString = rsc.parentRef[0].ref.split('/')[2];
|
|
276
|
+
var index = meta.findIndex(function (r) {
|
|
277
|
+
return r[0].type === parentString;
|
|
278
|
+
});
|
|
279
|
+
if (index > -1) {
|
|
280
|
+
meta[index].push([Object.assign({}, rsc, { name: rsc.type, apiName: rsc.name })]);
|
|
281
|
+
return null;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
return rsc;
|
|
285
|
+
});
|
|
286
|
+
blackboardResources = blackboardResources.map(function (rsc) {
|
|
287
|
+
if (rsc && rsc.parentRef.length === 2) {
|
|
288
|
+
var grandParentString = rsc.parentRef[1].ref.split('/')[2];
|
|
289
|
+
var grandParentIndex = meta.findIndex(function (r) {
|
|
290
|
+
return r[0].type === grandParentString;
|
|
291
|
+
});
|
|
292
|
+
if (grandParentIndex > -1) {
|
|
293
|
+
var parentString = rsc.parentRef[0].ref.split('/')[2];
|
|
294
|
+
var parentIndex = meta[grandParentIndex].findIndex(function (r) {
|
|
295
|
+
return r[0] && r[0].type === parentString;
|
|
296
|
+
});
|
|
297
|
+
if (parentIndex > -1) {
|
|
298
|
+
meta[grandParentIndex][parentIndex].push([Object.assign({}, rsc, { name: rsc.type, apiName: rsc.name })]);
|
|
299
|
+
return null;
|
|
300
|
+
}
|
|
301
|
+
return rsc;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
return rsc;
|
|
305
|
+
});
|
|
306
|
+
meta = flatten(meta);
|
|
307
|
+
}
|
|
308
|
+
break;
|
|
309
|
+
|
|
310
|
+
case 'Salesforce':
|
|
311
|
+
var resources = [];
|
|
312
|
+
res.forEach(function (rsc) {
|
|
313
|
+
if (!rsc.properties.find(function (p) {
|
|
314
|
+
return p.name === 'Lingk_External_Id__c';
|
|
315
|
+
})) {
|
|
316
|
+
rsc.properties.push({
|
|
317
|
+
label: 'Lingk External Id',
|
|
318
|
+
name: 'Lingk_External_Id__c',
|
|
319
|
+
readOnly: false,
|
|
320
|
+
required: false,
|
|
321
|
+
size: 150,
|
|
322
|
+
type: 'string',
|
|
323
|
+
updateable: true,
|
|
324
|
+
fake: true
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
rsc.properties && rsc.properties.sort(function (a, b) {
|
|
329
|
+
if (a.required === b.required) {
|
|
330
|
+
if (a.label < b.label) return -1;
|
|
331
|
+
if (a.label > b.label) return 1;
|
|
332
|
+
return 0;
|
|
333
|
+
} else if (a.required) return -1;else return 1;
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
if (rsc.metadata && rsc.metadata.recordTypes && rsc.metadata.recordTypes.length > 0) {
|
|
337
|
+
rsc.metadata.recordTypes.forEach(function (recordType) {
|
|
338
|
+
if (recordType.isActive) {
|
|
339
|
+
var metadataResource = res.find(function (r) {
|
|
340
|
+
return r.type === recordType.sobjectType;
|
|
341
|
+
});
|
|
342
|
+
metadataResource && resources.push({
|
|
343
|
+
name: metadataResource.name + ' - ' + recordType.name,
|
|
344
|
+
type: metadataResource.type,
|
|
345
|
+
recordTypeId: recordType.id,
|
|
346
|
+
properties: metadataResource.properties,
|
|
347
|
+
endpointSuffix: metadataResource.endpointSuffix
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
} else {
|
|
352
|
+
resources.push(rsc);
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
meta = resources;
|
|
356
|
+
meta.sort(function (a, b) {
|
|
357
|
+
if (a.name < b.name) return -1;
|
|
358
|
+
if (a.name > b.name) return 1;
|
|
359
|
+
return 0;
|
|
360
|
+
});
|
|
361
|
+
break;
|
|
362
|
+
|
|
363
|
+
/*case 'SFTP':
|
|
364
|
+
if(res && res.resources){
|
|
365
|
+
var sftpRsc = []
|
|
366
|
+
res.resources.forEach(rsc=>{
|
|
367
|
+
rsc.properties && rsc.properties.sort((a, b)=>{
|
|
368
|
+
if(a.label < b.label) return -1;
|
|
369
|
+
if(a.label > b.label) return 1;
|
|
370
|
+
return 0;
|
|
371
|
+
})
|
|
372
|
+
sftpRsc.push(rsc)
|
|
373
|
+
})
|
|
374
|
+
meta = sftpRsc
|
|
375
|
+
meta.sort(function(a, b){
|
|
376
|
+
if(a.name < b.name) return -1;
|
|
377
|
+
if(a.name > b.name) return 1;
|
|
378
|
+
return 0;
|
|
379
|
+
})
|
|
380
|
+
}
|
|
381
|
+
break;*/
|
|
382
|
+
|
|
383
|
+
/*case 'Ethos':
|
|
384
|
+
if(res && res.resources){
|
|
385
|
+
var ethosRsc = []
|
|
386
|
+
res.resources.forEach(rsc=>{
|
|
387
|
+
rsc.properties && rsc.properties.sort((a, b)=>{
|
|
388
|
+
if(a.label < b.label) return -1;
|
|
389
|
+
if(a.label > b.label) return 1;
|
|
390
|
+
return 0;
|
|
391
|
+
})
|
|
392
|
+
ethosRsc.push(rsc)
|
|
393
|
+
})
|
|
394
|
+
meta = ethosRsc
|
|
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
|
+
}
|
|
401
|
+
break;*/
|
|
402
|
+
|
|
403
|
+
default:
|
|
404
|
+
if (res) {
|
|
405
|
+
var rscs = [];
|
|
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
|
+
rscs.push(rsc);
|
|
413
|
+
});
|
|
414
|
+
meta = rscs;
|
|
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
|
+
|
|
424
|
+
return meta.map(function (m) {
|
|
425
|
+
return Object.assign({}, m, {
|
|
426
|
+
resourceNameAndProvider: m.type + '_' + providerType
|
|
427
|
+
});
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
function flatten(obj) {
|
|
432
|
+
return obj.reduce(function (a, b) {
|
|
433
|
+
if (isArray(a) && isArray(b)) return flatten(a).concat(flatten(b));
|
|
434
|
+
return a.concat(b);
|
|
435
|
+
}, []);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
function isArray(a) {
|
|
439
|
+
if (Object.prototype.toString.call(a) === '[object Array]') {
|
|
440
|
+
return true;
|
|
441
|
+
}
|
|
442
|
+
return false;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
/***/ },
|
|
446
|
+
|
|
447
|
+
/***/ 67:
|
|
448
|
+
/***/ function(module, exports) {
|
|
449
|
+
|
|
450
|
+
'use strict';
|
|
451
|
+
|
|
452
|
+
Object.defineProperty(exports, "__esModule", {
|
|
453
|
+
value: true
|
|
454
|
+
});
|
|
455
|
+
var SET_WIZARD_SAVED_MAPPING = exports.SET_WIZARD_SAVED_MAPPING = 'SET_WIZARD_SAVED_MAPPING';
|
|
456
|
+
var SET_WIZARD_SAVED_CONFIGURATION = exports.SET_WIZARD_SAVED_CONFIGURATION = 'SET_WIZARD_SAVED_CONFIGURATION';
|
|
457
|
+
var SET_WIZARD_SAVED_BUNDLES = exports.SET_WIZARD_SAVED_BUNDLES = 'SET_WIZARD_SAVED_BUNDLES';
|
|
458
|
+
var SET_WIZARD_TRIGGER = exports.SET_WIZARD_TRIGGER = 'SET_WIZARD_TRIGGER';
|
|
459
|
+
var SET_WIZARD_LOADED = exports.SET_WIZARD_LOADED = 'SET_WIZARD_LOADED';
|
|
460
|
+
var SET_WIZARD_DATA_LOADED = exports.SET_WIZARD_DATA_LOADED = 'SET_WIZARD_DATA_LOADED';
|
|
461
|
+
var START_WIZARD_ENV_CHECK = exports.START_WIZARD_ENV_CHECK = 'START_WIZARD_ENV_CHECK';
|
|
462
|
+
var FINISH_WIZARD_ENV_CHECK = exports.FINISH_WIZARD_ENV_CHECK = 'FINISH_WIZARD_ENV_CHECK';
|
|
463
|
+
var START_WIZARD_GET_SCENARIO = exports.START_WIZARD_GET_SCENARIO = 'START_WIZARD_GET_SCENARIO';
|
|
464
|
+
var FINISH_WIZARD_GET_SCENARIO = exports.FINISH_WIZARD_GET_SCENARIO = 'FINISH_WIZARD_GET_SCENARIO';
|
|
465
|
+
var SET_WIZARD_OAUTH_URL = exports.SET_WIZARD_OAUTH_URL = 'SET_WIZARD_OAUTH_URL';
|
|
466
|
+
var GETTING_WIZARD_OAUTH_URL = exports.GETTING_WIZARD_OAUTH_URL = 'GETTING_WIZARD_OAUTH_URL';
|
|
467
|
+
var SET_WIZARD_SAVED_CREDENTIALS = exports.SET_WIZARD_SAVED_CREDENTIALS = 'SET_WIZARD_SAVED_CREDENTIALS';
|
|
468
|
+
var SET_WIZARD_ENVIRONMENTS = exports.SET_WIZARD_ENVIRONMENTS = 'SET_WIZARD_ENVIRONMENTS';
|
|
469
|
+
var SET_WIZARD_ONGOING_EXECUTION_LOGS = exports.SET_WIZARD_ONGOING_EXECUTION_LOGS = 'SET_WIZARD_ONGOING_EXECUTION_LOGS';
|
|
470
|
+
var SET_WIZARD_ONGOING_EXECUTION_LOG_COUNT = exports.SET_WIZARD_ONGOING_EXECUTION_LOG_COUNT = 'SET_WIZARD_ONGOING_EXECUTION_LOG_COUNT';
|
|
471
|
+
|
|
472
|
+
var CLEAR_WIZARD = exports.CLEAR_WIZARD = 'CLEAR_WIZARD';
|
|
473
|
+
|
|
474
|
+
var SET_FAVICON = exports.SET_FAVICON = 'SET_FAVICON';
|
|
475
|
+
|
|
476
|
+
/***/ },
|
|
477
|
+
|
|
478
|
+
/***/ 130:
|
|
479
|
+
/***/ function(module, exports, __webpack_require__) {
|
|
480
|
+
|
|
481
|
+
'use strict';
|
|
482
|
+
|
|
483
|
+
Object.defineProperty(exports, "__esModule", {
|
|
484
|
+
value: true
|
|
485
|
+
});
|
|
486
|
+
exports.default = wizardReducer;
|
|
487
|
+
|
|
488
|
+
var _types = __webpack_require__(67);
|
|
489
|
+
|
|
490
|
+
var types = _interopRequireWildcard(_types);
|
|
491
|
+
|
|
492
|
+
var _metadataFunctions = __webpack_require__(66);
|
|
493
|
+
|
|
494
|
+
var util = _interopRequireWildcard(_metadataFunctions);
|
|
495
|
+
|
|
496
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
|
|
497
|
+
|
|
498
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
499
|
+
|
|
500
|
+
var initialState = {
|
|
501
|
+
savedBundles: null,
|
|
502
|
+
savedMapping: null,
|
|
503
|
+
savedConfiguration: null,
|
|
504
|
+
savedTrigger: null,
|
|
505
|
+
savedCredentials: null,
|
|
506
|
+
loaded: false, // saved config data has been loaded from backend
|
|
507
|
+
dataLoaded: false, // loaded data entered into redux-form
|
|
508
|
+
sourceCheckResult: null,
|
|
509
|
+
destinationCheckResult: null,
|
|
510
|
+
sourceMetadata: null,
|
|
511
|
+
destinationMetadata: null,
|
|
512
|
+
gettingScenario: false,
|
|
513
|
+
gotScenario: false,
|
|
514
|
+
oauthUrl: null,
|
|
515
|
+
gettingOauthUrl: false,
|
|
516
|
+
environments: null,
|
|
517
|
+
ongoingExecutionLogs: [],
|
|
518
|
+
ongoingExecutionLogCount: null
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
function wizardReducer() {
|
|
522
|
+
var _Object$assign, _Object$assign2;
|
|
523
|
+
|
|
524
|
+
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
|
|
525
|
+
var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
526
|
+
|
|
527
|
+
switch (action.type) {
|
|
528
|
+
case types.SET_WIZARD_SAVED_BUNDLES:
|
|
529
|
+
return Object.assign({}, state, {
|
|
530
|
+
savedBundles: action.data
|
|
531
|
+
});
|
|
532
|
+
case types.SET_WIZARD_SAVED_MAPPING:
|
|
533
|
+
return Object.assign({}, state, {
|
|
534
|
+
savedMapping: action.data
|
|
535
|
+
});
|
|
536
|
+
case types.SET_WIZARD_TRIGGER:
|
|
537
|
+
return Object.assign({}, state, {
|
|
538
|
+
savedTrigger: action.data
|
|
539
|
+
});
|
|
540
|
+
case types.SET_WIZARD_SAVED_CONFIGURATION:
|
|
541
|
+
return Object.assign({}, state, {
|
|
542
|
+
savedConfiguration: action.data
|
|
543
|
+
});
|
|
544
|
+
case types.SET_WIZARD_SAVED_CREDENTIALS:
|
|
545
|
+
return Object.assign({}, state, {
|
|
546
|
+
savedCredentials: action.data
|
|
547
|
+
});
|
|
548
|
+
case types.SET_WIZARD_ENVIRONMENTS:
|
|
549
|
+
return Object.assign({}, state, {
|
|
550
|
+
environments: action.data
|
|
551
|
+
});
|
|
552
|
+
case types.SET_WIZARD_LOADED:
|
|
553
|
+
return Object.assign({}, state, {
|
|
554
|
+
loaded: action.bool
|
|
555
|
+
});
|
|
556
|
+
case types.SET_WIZARD_DATA_LOADED:
|
|
557
|
+
return Object.assign({}, state, {
|
|
558
|
+
dataLoaded: action.bool
|
|
559
|
+
});
|
|
560
|
+
case types.START_WIZARD_ENV_CHECK:
|
|
561
|
+
return Object.assign({}, state, (_Object$assign = {}, _defineProperty(_Object$assign, action.mode + 'CheckResult', null), _defineProperty(_Object$assign, action.mode + 'Metadata', null), _Object$assign));
|
|
562
|
+
case types.FINISH_WIZARD_ENV_CHECK:
|
|
563
|
+
var schema = null;
|
|
564
|
+
if (action.data.metadata) {
|
|
565
|
+
schema = util.metadataFunctions(action.data.metadata, action.data.providerType);
|
|
566
|
+
}
|
|
567
|
+
var hasMetadata = schema && schema.length;
|
|
568
|
+
return Object.assign({}, state, (_Object$assign2 = {}, _defineProperty(_Object$assign2, action.data.mode + 'CheckResult', hasMetadata ? action.data.code : ''), _defineProperty(_Object$assign2, action.data.mode + 'Metadata', schema), _defineProperty(_Object$assign2, action.data.mode + 'CheckError', action.data.err), _Object$assign2));
|
|
569
|
+
case types.START_WIZARD_GET_SCENARIO:
|
|
570
|
+
return Object.assign({}, state, {
|
|
571
|
+
gettingScenario: true,
|
|
572
|
+
gotScenario: false
|
|
573
|
+
});
|
|
574
|
+
case types.FINISH_WIZARD_GET_SCENARIO:
|
|
575
|
+
return Object.assign({}, state, {
|
|
576
|
+
gettingScenario: false,
|
|
577
|
+
gotScenario: true
|
|
578
|
+
});
|
|
579
|
+
case types.SET_WIZARD_ONGOING_EXECUTION_LOGS:
|
|
580
|
+
return Object.assign({}, state, {
|
|
581
|
+
ongoingExecutionLogs: action.data && action.data.sort(function (a, b) {
|
|
582
|
+
return a.sortOrder - b.sortOrder;
|
|
583
|
+
})
|
|
584
|
+
});
|
|
585
|
+
case types.SET_WIZARD_ONGOING_EXECUTION_LOG_COUNT:
|
|
586
|
+
return Object.assign({}, state, {
|
|
587
|
+
ongoingExecutionLogCount: action.data
|
|
588
|
+
});
|
|
589
|
+
case types.GETTING_WIZARD_OAUTH_URL:
|
|
590
|
+
return Object.assign({}, state, _defineProperty({
|
|
591
|
+
oauthUrl: null,
|
|
592
|
+
gettingOauthUrl: action.bool
|
|
593
|
+
}, action.mode + 'CheckResult', null));
|
|
594
|
+
case types.SET_WIZARD_OAUTH_URL:
|
|
595
|
+
return Object.assign({}, state, {
|
|
596
|
+
oauthUrl: action.data,
|
|
597
|
+
gettingOauthUrl: false
|
|
598
|
+
});
|
|
599
|
+
case types.CLEAR_WIZARD:
|
|
600
|
+
return Object.assign({}, initialState);
|
|
601
|
+
default:
|
|
602
|
+
return state;
|
|
603
|
+
}
|
|
604
|
+
};
|
|
605
|
+
|
|
606
|
+
/***/ }
|
|
607
|
+
|
|
608
|
+
/******/ });
|
|
609
|
+
//# sourceMappingURL=reducer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack:///webpack/bootstrap 7635203b80a7bb78b2b0","webpack:///./src/lib/reducer/metadataFunctions.js","webpack:///./src/lib/wizard/actions/types.js?caa0","webpack:///./src/lib/reducer/wizard.js"],"names":["metadataFunctions","r","providerType","res","Array","isArray","resources","meta","canvasResources","forEach","rsc","properties","sort","a","b","label","push","type","map","parentRef","name","apiName","length","parentString","ref","split","parentIndex","findIndex","grandParentString","grandParentIndex","flatten","recurseSort","hasOwnProperty","p","object","blackboardResources","index","find","readOnly","required","size","updateable","fake","metadata","recordTypes","recordType","isActive","metadataResource","sobjectType","recordTypeId","id","endpointSuffix","rscs","m","resourceNameAndProvider","obj","reduce","concat","Object","prototype","toString","call","SET_WIZARD_SAVED_MAPPING","SET_WIZARD_SAVED_CONFIGURATION","SET_WIZARD_SAVED_BUNDLES","SET_WIZARD_TRIGGER","SET_WIZARD_LOADED","SET_WIZARD_DATA_LOADED","START_WIZARD_ENV_CHECK","FINISH_WIZARD_ENV_CHECK","START_WIZARD_GET_SCENARIO","FINISH_WIZARD_GET_SCENARIO","SET_WIZARD_OAUTH_URL","GETTING_WIZARD_OAUTH_URL","SET_WIZARD_SAVED_CREDENTIALS","SET_WIZARD_ENVIRONMENTS","SET_WIZARD_ONGOING_EXECUTION_LOGS","SET_WIZARD_ONGOING_EXECUTION_LOG_COUNT","CLEAR_WIZARD","SET_FAVICON","wizardReducer","types","util","initialState","savedBundles","savedMapping","savedConfiguration","savedTrigger","savedCredentials","loaded","dataLoaded","sourceCheckResult","destinationCheckResult","sourceMetadata","destinationMetadata","gettingScenario","gotScenario","oauthUrl","gettingOauthUrl","environments","ongoingExecutionLogs","ongoingExecutionLogCount","state","action","data","bool","mode","schema","hasMetadata","code","err","sortOrder"],"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;;;;;;;;;;;;;;;;;;;;;SC5BgBA,iB,GAAAA,iB;AAVhB;;;;;;;;;AAUO,UAASA,iBAAT,CAA2BC,CAA3B,EAA8BC,YAA9B,EAA2C;;AAEhD,OAAIC,YAAJ;AACA;AACA,OAAGC,MAAMC,OAAN,CAAcJ,CAAd,CAAH,EAAoB;AAClBE,WAAMF,CAAN;AACD,IAFD,MAEO,IAAGA,EAAEK,SAAL,EAAe;AACpB;AACAH,WAAMF,EAAEK,SAAR;AACD;;AAED,OAAIC,OAAO,IAAX;AACA,WAAQL,YAAR;;AAEE;;;;;;;;;;;;;;;AAeA;;;;;;;;;;;;;;;AAeA;;;;;;;;;;;;;;;AAeA;;;;;;;;;;;;;;;;;;;;AAoBA,UAAK,QAAL;AACE,WAAGC,GAAH,EAAO;AACL,aAAIK,kBAAkB,EAAtB;AACA;AACAL,aAAIM,OAAJ,CAAY,eAAK;AACfC,eAAIC,UAAJ,IAAkBD,IAAIC,UAAJ,CAAeC,IAAf,CAAoB,UAACC,CAAD,EAAIC,CAAJ,EAAQ;AAC5C,iBAAGD,KAAKC,CAAR,EAAU;AACR,mBAAGD,EAAEE,KAAF,GAAUD,EAAEC,KAAf,EAAsB,OAAO,CAAC,CAAR;AACtB,mBAAGF,EAAEE,KAAF,GAAUD,EAAEC,KAAf,EAAsB,OAAO,CAAP;AACvB;AACD,oBAAO,CAAP;AACD,YANiB,CAAlB;AAOAP,2BAAgBQ,IAAhB,CAAqBN,GAArB;AACD,UATD;AAUA;AACAF,yBAAgBI,IAAhB,CAAqB,UAASC,CAAT,EAAYC,CAAZ,EAAc;AACjC,eAAGD,EAAEI,I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jB;AAHJ;AAKF,UAAK9B,MAAMJ,sCAAX;AACE,gCACKyB,KADL;AAEED,mCAA0BE,OAAOC;AAFnC;AAIF,UAAKvB,MAAMR,wBAAX;AACE,gCACK6B,KADL;AAEEL,mBAAU,IAFZ;AAGEC,0BAAiBK,OAAOE;AAH1B,UAIMF,OAAOG,IAJb,kBAIgC,IAJhC;AAMF,UAAKzB,MAAMT,oBAAX;AACE,gCACK8B,KADL;AAEEL,mBAAUM,OAAOC,IAFnB;AAGEN,0BAAiB;AAHnB;AAKF,UAAKjB,MAAMH,YAAX;AACE,gCACKK,YADL;AAGF;AAAS,cAAOmB,KAAP;AAnGX;AAqGD,G","file":"reducer.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 7635203b80a7bb78b2b0","/* \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\n\nexport function metadataFunctions(r, providerType){\n\n let res;\n // if the metadata comes in an array\n if(Array.isArray(r)){\n res = r\n } else if(r.resources){\n // if the metadata is an object with a \"resources\" property array\n res = r.resources\n }\n\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 'Moodle':\n if(res){\n var moodleResources = []\n res.resources.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 moodleResources.push(rsc)\n })\n meta = moodleResources\n }\n break;*/\n\n /*case 'LingkAdapter':\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){\n var canvasResources = []\n // sort properties\n res.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.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.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.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 'SFTP':\n if(res && res.resources){\n var sftpRsc = []\n res.resources.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 sftpRsc.push(rsc)\n })\n meta = sftpRsc\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 'Ethos':\n if(res && res.resources){\n var ethosRsc = []\n res.resources.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 ethosRsc.push(rsc)\n })\n meta = ethosRsc\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 if(res){\n var rscs = []\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 rscs.push(rsc)\n })\n meta = rscs\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\n\n return meta.map(m=>{\n return {\n ...m,\n resourceNameAndProvider:`${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","export const SET_WIZARD_SAVED_MAPPING = 'SET_WIZARD_SAVED_MAPPING';\nexport const SET_WIZARD_SAVED_CONFIGURATION = 'SET_WIZARD_SAVED_CONFIGURATION';\nexport const SET_WIZARD_SAVED_BUNDLES = 'SET_WIZARD_SAVED_BUNDLES';\nexport const SET_WIZARD_TRIGGER = 'SET_WIZARD_TRIGGER';\nexport const SET_WIZARD_LOADED = 'SET_WIZARD_LOADED';\nexport const SET_WIZARD_DATA_LOADED = 'SET_WIZARD_DATA_LOADED';\nexport const START_WIZARD_ENV_CHECK = 'START_WIZARD_ENV_CHECK';\nexport const FINISH_WIZARD_ENV_CHECK = 'FINISH_WIZARD_ENV_CHECK';\nexport const START_WIZARD_GET_SCENARIO = 'START_WIZARD_GET_SCENARIO';\nexport const FINISH_WIZARD_GET_SCENARIO = 'FINISH_WIZARD_GET_SCENARIO';\nexport const SET_WIZARD_OAUTH_URL = 'SET_WIZARD_OAUTH_URL';\nexport const GETTING_WIZARD_OAUTH_URL = 'GETTING_WIZARD_OAUTH_URL';\nexport const SET_WIZARD_SAVED_CREDENTIALS = 'SET_WIZARD_SAVED_CREDENTIALS';\nexport const SET_WIZARD_ENVIRONMENTS = 'SET_WIZARD_ENVIRONMENTS';\nexport const SET_WIZARD_ONGOING_EXECUTION_LOGS = 'SET_WIZARD_ONGOING_EXECUTION_LOGS';\nexport const SET_WIZARD_ONGOING_EXECUTION_LOG_COUNT = 'SET_WIZARD_ONGOING_EXECUTION_LOG_COUNT';\n\nexport const CLEAR_WIZARD = 'CLEAR_WIZARD'\n\nexport const SET_FAVICON = 'SET_FAVICON'\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/wizard/actions/types.js","import * as types from '../wizard/actions/types';\nimport * as util from './metadataFunctions'\n\nconst initialState = {\n savedBundles: null,\n savedMapping: null,\n savedConfiguration: null,\n savedTrigger:null,\n savedCredentials:null,\n loaded:false, // saved config data has been loaded from backend\n dataLoaded:false, // loaded data entered into redux-form\n sourceCheckResult:null,\n destinationCheckResult:null,\n sourceMetadata:null,\n destinationMetadata:null,\n gettingScenario:false,\n gotScenario:false,\n oauthUrl:null,\n gettingOauthUrl:false,\n environments:null,\n ongoingExecutionLogs: [],\n ongoingExecutionLogCount: null,\n};\n\nexport default function wizardReducer(state = initialState, action = {}) {\n switch (action.type) {\n case types.SET_WIZARD_SAVED_BUNDLES:\n return {\n ...state,\n savedBundles: action.data\n }\n case types.SET_WIZARD_SAVED_MAPPING:\n return {\n ...state,\n savedMapping: action.data\n }\n case types.SET_WIZARD_TRIGGER:\n return {\n ...state,\n savedTrigger: action.data\n }\n case types.SET_WIZARD_SAVED_CONFIGURATION:\n return {\n ...state,\n savedConfiguration: action.data\n }\n case types.SET_WIZARD_SAVED_CREDENTIALS:\n return {\n ...state,\n savedCredentials: action.data\n }\n case types.SET_WIZARD_ENVIRONMENTS:\n return {\n ...state,\n environments: action.data\n };\n case types.SET_WIZARD_LOADED:\n return {\n ...state,\n loaded: action.bool\n };\n case types.SET_WIZARD_DATA_LOADED:\n return {\n ...state,\n dataLoaded: action.bool\n };\n case types.START_WIZARD_ENV_CHECK:\n return {\n ...state,\n [`${action.mode}CheckResult`]:null,\n [`${action.mode}Metadata`]:null,\n }\n case types.FINISH_WIZARD_ENV_CHECK:\n let schema = null\n if(action.data.metadata){\n schema = util.metadataFunctions(action.data.metadata, action.data.providerType)\n }\n const hasMetadata = schema && schema.length\n return {\n ...state,\n [`${action.data.mode}CheckResult`]:hasMetadata?action.data.code:'',\n [`${action.data.mode}Metadata`]:schema,\n [`${action.data.mode}CheckError`]:action.data.err,\n }\n case types.START_WIZARD_GET_SCENARIO:\n return {\n ...state,\n gettingScenario:true,\n gotScenario:false,\n }\n case types.FINISH_WIZARD_GET_SCENARIO:\n return {\n ...state,\n gettingScenario:false,\n gotScenario:true,\n }\n case types.SET_WIZARD_ONGOING_EXECUTION_LOGS:\n return {\n ...state,\n ongoingExecutionLogs: action.data && \n action.data.sort((a,b)=>a.sortOrder-b.sortOrder),\n };\n case types.SET_WIZARD_ONGOING_EXECUTION_LOG_COUNT:\n return {\n ...state,\n ongoingExecutionLogCount: action.data,\n };\n case types.GETTING_WIZARD_OAUTH_URL:\n return {\n ...state,\n oauthUrl: null,\n gettingOauthUrl: action.bool,\n [`${action.mode}CheckResult`]:null,\n }\n case types.SET_WIZARD_OAUTH_URL:\n return {\n ...state,\n oauthUrl: action.data,\n gettingOauthUrl: false\n }\n case types.CLEAR_WIZARD:\n return {\n ...initialState\n }\n default: return state;\n }\n};\n\n\n\n\n// WEBPACK FOOTER //\n// ./src/lib/reducer/wizard.js"],"sourceRoot":""}
|