@lingk/sync 1.1.38 → 1.1.40
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 +576 -429
- package/build/credentialSections.js.map +1 -1
- package/build/css/credentialSections.css +3 -10
- package/build/css/lightningStyles.css +2 -4
- package/build/css/lingkStyles.css +2 -4
- package/build/css/main.css +45 -95
- package/build/lightning.js +1810 -778
- package/build/lightning.js.map +1 -1
- package/build/lightningStyles.js +2 -2
- package/build/lightningStyles.js.map +1 -1
- package/build/lingk.js +59 -55
- package/build/lingk.js.map +1 -1
- package/build/lingkStyles.js +2 -2
- package/build/lingkStyles.js.map +1 -1
- package/build/loadData.js +224 -232
- package/build/loadData.js.map +1 -1
- package/build/main.js +8357 -4718
- package/build/main.js.map +1 -1
- package/build/metadataDropdown.js +51 -55
- package/build/metadataDropdown.js.map +1 -1
- package/build/metadataFunctions.js +307 -365
- package/build/metadataFunctions.js.map +1 -1
- package/build/reducer.js +313 -371
- package/build/reducer.js.map +1 -1
- package/build/saveData.js +61 -70
- package/build/saveData.js.map +1 -1
- package/package.json +1 -1
package/build/reducer.js
CHANGED
|
@@ -46,12 +46,12 @@ module.exports =
|
|
|
46
46
|
/***/ 0:
|
|
47
47
|
/***/ function(module, exports, __webpack_require__) {
|
|
48
48
|
|
|
49
|
-
module.exports = __webpack_require__(
|
|
49
|
+
module.exports = __webpack_require__(128);
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
/***/ },
|
|
53
53
|
|
|
54
|
-
/***/
|
|
54
|
+
/***/ 66:
|
|
55
55
|
/***/ function(module, exports) {
|
|
56
56
|
|
|
57
57
|
'use strict';
|
|
@@ -59,9 +59,6 @@ module.exports =
|
|
|
59
59
|
Object.defineProperty(exports, "__esModule", {
|
|
60
60
|
value: true
|
|
61
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
62
|
exports.metadataFunctions = metadataFunctions;
|
|
66
63
|
/*
|
|
67
64
|
Provider-specific nested alphabetization of resources and properties
|
|
@@ -84,400 +81,345 @@ module.exports =
|
|
|
84
81
|
}
|
|
85
82
|
|
|
86
83
|
var meta = null;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
var bannerResources = []
|
|
98
|
-
res.forEach(rsc=>{
|
|
99
|
-
rsc.properties && rsc.properties.sort((a, b)=>{
|
|
100
|
-
if(a.label < b.label) return -1;
|
|
101
|
-
if(a.label > b.label) return 1;
|
|
102
|
-
return 0;
|
|
103
|
-
})
|
|
104
|
-
bannerResources.push(rsc)
|
|
105
|
-
})
|
|
106
|
-
meta = bannerResources
|
|
107
|
-
}
|
|
108
|
-
break;*/
|
|
109
|
-
|
|
110
|
-
/*case 'Moodle':
|
|
111
|
-
if(res){
|
|
112
|
-
var moodleResources = []
|
|
113
|
-
res.resources.forEach(rsc=>{
|
|
114
|
-
rsc.properties && rsc.properties.sort((a, b)=>{
|
|
115
|
-
if(a.label < b.label) return -1;
|
|
116
|
-
if(a.label > b.label) return 1;
|
|
117
|
-
return 0;
|
|
118
|
-
})
|
|
119
|
-
moodleResources.push(rsc)
|
|
120
|
-
})
|
|
121
|
-
meta = moodleResources
|
|
122
|
-
}
|
|
123
|
-
break;*/
|
|
124
|
-
|
|
125
|
-
/*case 'LingkAdapter':
|
|
126
|
-
if(res){
|
|
127
|
-
var lingkResources = []
|
|
128
|
-
res.forEach(rsc=>{
|
|
129
|
-
rsc.properties && rsc.properties.sort((a, b)=>{
|
|
130
|
-
if(a.label < b.label) return -1;
|
|
131
|
-
if(a.label > b.label) return 1;
|
|
132
|
-
return 0;
|
|
133
|
-
})
|
|
134
|
-
lingkResources.push(rsc)
|
|
135
|
-
})
|
|
136
|
-
meta = lingkResources
|
|
137
|
-
}
|
|
138
|
-
break;*/
|
|
139
|
-
|
|
140
|
-
/*case 'Colleague':
|
|
141
|
-
if(res){
|
|
142
|
-
var colleagueResources = []
|
|
143
|
-
res.forEach(rsc=>{
|
|
144
|
-
rsc.properties && rsc.properties.sort((a, b)=>{
|
|
145
|
-
if(a.label < b.label) return -1;
|
|
146
|
-
if(a.label > b.label) return 1;
|
|
147
|
-
return 0;
|
|
148
|
-
})
|
|
149
|
-
colleagueResources.push(rsc)
|
|
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;
|
|
150
94
|
})
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
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;
|
|
155
108
|
return 0;
|
|
156
109
|
})
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
return 0;
|
|
172
|
-
});
|
|
173
|
-
canvasResources.push(rsc);
|
|
174
|
-
});
|
|
175
|
-
// sort resources
|
|
176
|
-
canvasResources.sort(function (a, b) {
|
|
177
|
-
if (a.type < b.type) return -1;
|
|
178
|
-
if (a.type > b.type) return 1;
|
|
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;
|
|
179
123
|
return 0;
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
// sort nesting of resources
|
|
183
|
-
meta = [];
|
|
184
|
-
canvasResources = canvasResources.map(function (r) {
|
|
185
|
-
if (r && !r.parentRef) {
|
|
186
|
-
meta.push([Object.assign({}, r, { name: r.type, apiName: r.name })]);
|
|
187
|
-
return null;
|
|
188
|
-
}
|
|
189
|
-
return r;
|
|
190
|
-
});
|
|
191
|
-
canvasResources = canvasResources.map(function (r) {
|
|
192
|
-
if (r && r.parentRef.length === 1) {
|
|
193
|
-
var _ret2 = function () {
|
|
194
|
-
var parentString = r.parentRef[0].ref.split('/')[2];
|
|
195
|
-
var parentIndex = meta.findIndex(function (r) {
|
|
196
|
-
return r[0].type === parentString;
|
|
197
|
-
});
|
|
198
|
-
if (parentIndex > -1) {
|
|
199
|
-
meta[parentIndex].push([Object.assign({}, r, { name: r.type, apiName: r.name })]);
|
|
200
|
-
return {
|
|
201
|
-
v: null
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
}();
|
|
205
|
-
|
|
206
|
-
if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === "object") return _ret2.v;
|
|
207
|
-
}
|
|
208
|
-
return r;
|
|
209
|
-
});
|
|
210
|
-
canvasResources = canvasResources.map(function (r) {
|
|
211
|
-
if (r && r.parentRef.length === 2) {
|
|
212
|
-
var _ret3 = function () {
|
|
213
|
-
var grandParentString = r.parentRef[1].ref.split('/')[2];
|
|
214
|
-
var grandParentIndex = meta.findIndex(function (r) {
|
|
215
|
-
return r[0].type === grandParentString;
|
|
216
|
-
});
|
|
217
|
-
if (grandParentIndex > -1) {
|
|
218
|
-
var _ret4 = function () {
|
|
219
|
-
var parentString = r.parentRef[0].ref.split('/')[2];
|
|
220
|
-
var parentIndex = meta[grandParentIndex].findIndex(function (r) {
|
|
221
|
-
return r[0] && r[0].type === parentString;
|
|
222
|
-
});
|
|
223
|
-
if (parentIndex > -1) {
|
|
224
|
-
meta[grandParentIndex][parentIndex].push([Object.assign({}, r, { name: r.type, apiName: r.name })]);
|
|
225
|
-
return {
|
|
226
|
-
v: {
|
|
227
|
-
v: null
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
}
|
|
231
|
-
return {
|
|
232
|
-
v: {
|
|
233
|
-
v: r
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
}();
|
|
237
|
-
|
|
238
|
-
if ((typeof _ret4 === 'undefined' ? 'undefined' : _typeof(_ret4)) === "object") return _ret4.v;
|
|
239
|
-
}
|
|
240
|
-
}();
|
|
241
|
-
|
|
242
|
-
if ((typeof _ret3 === 'undefined' ? 'undefined' : _typeof(_ret3)) === "object") return _ret3.v;
|
|
243
|
-
}
|
|
244
|
-
return r;
|
|
245
|
-
});
|
|
246
|
-
meta = flatten(meta);
|
|
247
|
-
}
|
|
248
|
-
break;
|
|
249
|
-
|
|
250
|
-
/*case 'PeopleSoft':
|
|
251
|
-
if(res){
|
|
252
|
-
var psResources = []
|
|
253
|
-
res.forEach(rsc=>{
|
|
254
|
-
rsc.properties && rsc.properties.sort((a, b)=>{
|
|
255
|
-
if(a.label < b.label) return -1;
|
|
256
|
-
if(a.label > b.label) return 1;
|
|
257
|
-
return 0;
|
|
258
|
-
})
|
|
259
|
-
psResources.push(rsc)
|
|
260
124
|
})
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
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;
|
|
265
138
|
return 0;
|
|
266
139
|
})
|
|
267
|
-
|
|
268
|
-
|
|
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;*/
|
|
269
150
|
|
|
270
|
-
|
|
271
|
-
|
|
151
|
+
case 'Canvas':
|
|
152
|
+
if (res) {
|
|
153
|
+
var canvasResources = [];
|
|
154
|
+
// sort properties
|
|
155
|
+
res.forEach(function (rsc) {
|
|
272
156
|
rsc.properties && rsc.properties.sort(function (a, b) {
|
|
273
|
-
if (a
|
|
157
|
+
if (a && b) {
|
|
274
158
|
if (a.label < b.label) return -1;
|
|
275
159
|
if (a.label > b.label) return 1;
|
|
276
|
-
return 0;
|
|
277
|
-
} else if (a.hasOwnProperty('object')) return -1;else return 1;
|
|
278
|
-
});
|
|
279
|
-
rsc.properties && rsc.properties.forEach(function (p) {
|
|
280
|
-
if (p.object) {
|
|
281
|
-
recurseSort(p.object);
|
|
282
160
|
}
|
|
283
|
-
});
|
|
284
|
-
return rsc;
|
|
285
|
-
};
|
|
286
|
-
|
|
287
|
-
if (res) {
|
|
288
|
-
blackboardResources = [];
|
|
289
|
-
|
|
290
|
-
res.forEach(function (rsc) {
|
|
291
|
-
return blackboardResources.push(recurseSort(rsc));
|
|
292
|
-
});
|
|
293
|
-
blackboardResources.sort(function (a, b) {
|
|
294
|
-
if (a.type < b.type) return -1;
|
|
295
|
-
if (a.type > b.type) return 1;
|
|
296
161
|
return 0;
|
|
297
162
|
});
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
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 })]);
|
|
302
189
|
return null;
|
|
303
190
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
return rsc;
|
|
324
|
-
});
|
|
325
|
-
blackboardResources = blackboardResources.map(function (rsc) {
|
|
326
|
-
if (rsc && rsc.parentRef.length === 2) {
|
|
327
|
-
var _ret6 = function () {
|
|
328
|
-
var grandParentString = rsc.parentRef[1].ref.split('/')[2];
|
|
329
|
-
var grandParentIndex = meta.findIndex(function (r) {
|
|
330
|
-
return r[0].type === grandParentString;
|
|
331
|
-
});
|
|
332
|
-
if (grandParentIndex > -1) {
|
|
333
|
-
var _ret7 = function () {
|
|
334
|
-
var parentString = rsc.parentRef[0].ref.split('/')[2];
|
|
335
|
-
var parentIndex = meta[grandParentIndex].findIndex(function (r) {
|
|
336
|
-
return r[0] && r[0].type === parentString;
|
|
337
|
-
});
|
|
338
|
-
if (parentIndex > -1) {
|
|
339
|
-
meta[grandParentIndex][parentIndex].push([Object.assign({}, rsc, { name: rsc.type, apiName: rsc.name })]);
|
|
340
|
-
return {
|
|
341
|
-
v: {
|
|
342
|
-
v: null
|
|
343
|
-
}
|
|
344
|
-
};
|
|
345
|
-
}
|
|
346
|
-
return {
|
|
347
|
-
v: {
|
|
348
|
-
v: rsc
|
|
349
|
-
}
|
|
350
|
-
};
|
|
351
|
-
}();
|
|
352
|
-
|
|
353
|
-
if ((typeof _ret7 === 'undefined' ? 'undefined' : _typeof(_ret7)) === "object") return _ret7.v;
|
|
354
|
-
}
|
|
355
|
-
}();
|
|
356
|
-
|
|
357
|
-
if ((typeof _ret6 === 'undefined' ? 'undefined' : _typeof(_ret6)) === "object") return _ret6.v;
|
|
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;
|
|
358
210
|
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
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
|
+
};
|
|
367
254
|
|
|
255
|
+
if (res) {
|
|
256
|
+
var blackboardResources = [];
|
|
368
257
|
res.forEach(function (rsc) {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
});
|
|
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;
|
|
382
270
|
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
});
|
|
391
|
-
|
|
392
|
-
if (rsc.metadata && rsc.metadata.recordTypes && rsc.metadata.recordTypes.length > 0) {
|
|
393
|
-
rsc.metadata.recordTypes.forEach(function (recordType) {
|
|
394
|
-
if (recordType.isActive) {
|
|
395
|
-
var metadataResource = res.find(function (r) {
|
|
396
|
-
return r.type === recordType.sobjectType;
|
|
397
|
-
});
|
|
398
|
-
metadataResource && resources.push({
|
|
399
|
-
name: metadataResource.name + ' - ' + recordType.name,
|
|
400
|
-
type: metadataResource.type,
|
|
401
|
-
recordTypeId: recordType.id,
|
|
402
|
-
properties: metadataResource.properties,
|
|
403
|
-
endpointSuffix: metadataResource.endpointSuffix
|
|
404
|
-
});
|
|
405
|
-
}
|
|
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;
|
|
406
278
|
});
|
|
407
|
-
|
|
408
|
-
|
|
279
|
+
if (index > -1) {
|
|
280
|
+
meta[index].push([Object.assign({}, rsc, { name: rsc.type, apiName: rsc.name })]);
|
|
281
|
+
return null;
|
|
282
|
+
}
|
|
409
283
|
}
|
|
284
|
+
return rsc;
|
|
410
285
|
});
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
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;
|
|
416
305
|
});
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
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;
|
|
434
332
|
return 0;
|
|
435
|
-
})
|
|
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);
|
|
436
353
|
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
if(
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
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;
|
|
449
371
|
})
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
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;
|
|
454
390
|
return 0;
|
|
455
391
|
})
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
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;*/
|
|
462
402
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
});
|
|
471
|
-
meta = rscs;
|
|
472
|
-
meta.sort(function (a, b) {
|
|
473
|
-
if (a.name < b.name) return -1;
|
|
474
|
-
if (a.name > b.name) return 1;
|
|
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;
|
|
475
410
|
return 0;
|
|
476
411
|
});
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
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
|
+
}
|
|
481
423
|
|
|
482
424
|
return meta.map(function (m) {
|
|
483
425
|
return Object.assign({}, m, {
|
|
@@ -502,7 +444,7 @@ module.exports =
|
|
|
502
444
|
|
|
503
445
|
/***/ },
|
|
504
446
|
|
|
505
|
-
/***/
|
|
447
|
+
/***/ 67:
|
|
506
448
|
/***/ function(module, exports) {
|
|
507
449
|
|
|
508
450
|
'use strict';
|
|
@@ -533,7 +475,7 @@ module.exports =
|
|
|
533
475
|
|
|
534
476
|
/***/ },
|
|
535
477
|
|
|
536
|
-
/***/
|
|
478
|
+
/***/ 128:
|
|
537
479
|
/***/ function(module, exports, __webpack_require__) {
|
|
538
480
|
|
|
539
481
|
'use strict';
|
|
@@ -543,11 +485,11 @@ module.exports =
|
|
|
543
485
|
});
|
|
544
486
|
exports.default = wizardReducer;
|
|
545
487
|
|
|
546
|
-
var _types = __webpack_require__(
|
|
488
|
+
var _types = __webpack_require__(67);
|
|
547
489
|
|
|
548
490
|
var types = _interopRequireWildcard(_types);
|
|
549
491
|
|
|
550
|
-
var _metadataFunctions = __webpack_require__(
|
|
492
|
+
var _metadataFunctions = __webpack_require__(66);
|
|
551
493
|
|
|
552
494
|
var util = _interopRequireWildcard(_metadataFunctions);
|
|
553
495
|
|