@sitecore-jss/sitecore-jss-angular 20.0.0-canary.13 → 20.0.0-canary.130
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/README.md +8 -3
- package/dist/README.md +8 -3
- package/dist/bundles/sitecore-jss-sitecore-jss-angular.umd.js +161 -102
- package/dist/bundles/sitecore-jss-sitecore-jss-angular.umd.js.map +1 -1
- package/dist/bundles/sitecore-jss-sitecore-jss-angular.umd.min.js +12 -12
- package/dist/bundles/sitecore-jss-sitecore-jss-angular.umd.min.js.map +1 -1
- package/dist/components/hidden-rendering.component.d.ts +4 -0
- package/dist/components/missing-component.component.d.ts +1 -1
- package/dist/components/placeholder.component.d.ts +3 -2
- package/dist/components/placeholder.token.d.ts +1 -0
- package/dist/components/raw.component.d.ts +1 -1
- package/dist/components/render-component.component.d.ts +1 -1
- package/dist/components/rendering.d.ts +1 -1
- package/dist/esm2015/components/hidden-rendering.component.js +17 -0
- package/dist/esm2015/components/image.directive.js +2 -2
- package/dist/esm2015/components/missing-component.component.js +1 -1
- package/dist/esm2015/components/placeholder.component.js +10 -4
- package/dist/esm2015/components/placeholder.token.js +2 -1
- package/dist/esm2015/components/raw.component.js +1 -1
- package/dist/esm2015/components/render-component.component.js +1 -1
- package/dist/esm2015/components/rendering.js +1 -1
- package/dist/esm2015/components/router-link.directive.js +2 -2
- package/dist/esm2015/jss-component-factory.service.js +1 -1
- package/dist/esm2015/lib.module.js +6 -2
- package/dist/esm2015/public_api.js +6 -2
- package/dist/esm2015/sitecore-jss-sitecore-jss-angular.js +10 -9
- package/dist/fesm2015/sitecore-jss-sitecore-jss-angular.js +36 -7
- package/dist/fesm2015/sitecore-jss-sitecore-jss-angular.js.map +1 -1
- package/dist/jss-component-factory.service.d.ts +1 -1
- package/dist/package.json +6 -2
- package/dist/public_api.d.ts +5 -1
- package/dist/sitecore-jss-sitecore-jss-angular.d.ts +9 -8
- package/dist/sitecore-jss-sitecore-jss-angular.metadata.json +1 -1
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
# Sitecore JavaScript
|
|
1
|
+
# Sitecore JavaScript Rendering SDK for Angular
|
|
2
2
|
|
|
3
|
-
This module is provided as a part of Sitecore JavaScript
|
|
3
|
+
This module is provided as a part of Sitecore JavaScript Rendering SDK (JSS). It contains Angular integration components and services for JSS.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<!---
|
|
6
|
+
@TODO: Update to version 20.0.0 docs before release
|
|
7
|
+
-->
|
|
8
|
+
[Documentation](https://doc.sitecore.com/xp/en/developers/hd/190/sitecore-headless-development/sitecore-javascript-rendering-sdk--jss--for-angular.html)
|
|
9
|
+
|
|
10
|
+
[API reference documentation](/ref-docs/sitecore-jss-angular/).
|
package/dist/README.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
# Sitecore JavaScript
|
|
1
|
+
# Sitecore JavaScript Rendering SDK for Angular
|
|
2
2
|
|
|
3
|
-
This module is provided as a part of Sitecore JavaScript
|
|
3
|
+
This module is provided as a part of Sitecore JavaScript Rendering SDK (JSS). It contains Angular integration components and services for JSS.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<!---
|
|
6
|
+
@TODO: Update to version 20.0.0 docs before release
|
|
7
|
+
-->
|
|
8
|
+
[Documentation](https://doc.sitecore.com/xp/en/developers/hd/190/sitecore-headless-development/sitecore-javascript-rendering-sdk--jss--for-angular.html)
|
|
9
|
+
|
|
10
|
+
[API reference documentation](/ref-docs/sitecore-jss-angular/).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@sitecore-jss/sitecore-jss'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('@angular/common')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@sitecore-jss/sitecore-jss-angular', ['exports', '@angular/core', '@sitecore-jss/sitecore-jss', '@angular/router', 'rxjs', 'rxjs/operators', '@angular/common'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global[
|
|
5
|
-
}(this, (function (exports, core,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@sitecore-jss/sitecore-jss/media'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('@angular/common'), require('@sitecore-jss/sitecore-jss/i18n'), require('@sitecore-jss/sitecore-jss/layout'), require('@sitecore-jss/sitecore-jss'), require('@sitecore-jss/sitecore-jss/utils')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@sitecore-jss/sitecore-jss-angular', ['exports', '@angular/core', '@sitecore-jss/sitecore-jss/media', '@angular/router', 'rxjs', 'rxjs/operators', '@angular/common', '@sitecore-jss/sitecore-jss/i18n', '@sitecore-jss/sitecore-jss/layout', '@sitecore-jss/sitecore-jss', '@sitecore-jss/sitecore-jss/utils'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["sitecore-jss"] = global["sitecore-jss"] || {}, global["sitecore-jss"]["sitecore-jss-angular"] = {}), global.ng.core, global.media, global.ng.router, global.rxjs, global.rxjs.operators, global.ng.common, global.i18n, global.layout, global["@sitecore-jss/sitecore-jss"], global.utils));
|
|
5
|
+
})(this, (function (exports, core, media, router, rxjs, operators, common, i18n, layout, sitecoreJss, utils) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* File fields cannot be managed via the EE. We never output "editable."
|
|
@@ -50,29 +50,31 @@
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
/*! *****************************************************************************
|
|
53
|
-
Copyright (c) Microsoft Corporation.
|
|
54
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
55
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
56
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
53
|
+
Copyright (c) Microsoft Corporation.
|
|
57
54
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
61
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
55
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
56
|
+
purpose with or without fee is hereby granted.
|
|
62
57
|
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
59
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
60
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
61
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
62
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
63
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
64
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
65
65
|
***************************************************************************** */
|
|
66
66
|
/* global Reflect, Promise */
|
|
67
67
|
var extendStatics = function (d, b) {
|
|
68
68
|
extendStatics = Object.setPrototypeOf ||
|
|
69
69
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
70
70
|
function (d, b) { for (var p in b)
|
|
71
|
-
if (
|
|
71
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
72
72
|
d[p] = b[p]; };
|
|
73
73
|
return extendStatics(d, b);
|
|
74
74
|
};
|
|
75
75
|
function __extends(d, b) {
|
|
76
|
+
if (typeof b !== "function" && b !== null)
|
|
77
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
76
78
|
extendStatics(d, b);
|
|
77
79
|
function __() { this.constructor = d; }
|
|
78
80
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -119,6 +121,7 @@
|
|
|
119
121
|
return Reflect.metadata(metadataKey, metadataValue);
|
|
120
122
|
}
|
|
121
123
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
124
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
122
125
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
123
126
|
function fulfilled(value) { try {
|
|
124
127
|
step(generator.next(value));
|
|
@@ -132,7 +135,7 @@
|
|
|
132
135
|
catch (e) {
|
|
133
136
|
reject(e);
|
|
134
137
|
} }
|
|
135
|
-
function step(result) { result.done ? resolve(result.value) :
|
|
138
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
136
139
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
137
140
|
});
|
|
138
141
|
}
|
|
@@ -205,22 +208,33 @@
|
|
|
205
208
|
return { value: op[0] ? op[1] : void 0, done: true };
|
|
206
209
|
}
|
|
207
210
|
}
|
|
208
|
-
function
|
|
211
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
212
|
+
if (k2 === undefined)
|
|
213
|
+
k2 = k;
|
|
214
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
215
|
+
}) : (function (o, m, k, k2) {
|
|
216
|
+
if (k2 === undefined)
|
|
217
|
+
k2 = k;
|
|
218
|
+
o[k2] = m[k];
|
|
219
|
+
});
|
|
220
|
+
function __exportStar(m, o) {
|
|
209
221
|
for (var p in m)
|
|
210
|
-
if (!
|
|
211
|
-
|
|
222
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
223
|
+
__createBinding(o, m, p);
|
|
212
224
|
}
|
|
213
225
|
function __values(o) {
|
|
214
|
-
var
|
|
226
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
215
227
|
if (m)
|
|
216
228
|
return m.call(o);
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
o
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
229
|
+
if (o && typeof o.length === "number")
|
|
230
|
+
return {
|
|
231
|
+
next: function () {
|
|
232
|
+
if (o && i >= o.length)
|
|
233
|
+
o = void 0;
|
|
234
|
+
return { value: o && o[i++], done: !o };
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
224
238
|
}
|
|
225
239
|
function __read(o, n) {
|
|
226
240
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -246,11 +260,13 @@
|
|
|
246
260
|
}
|
|
247
261
|
return ar;
|
|
248
262
|
}
|
|
263
|
+
/** @deprecated */
|
|
249
264
|
function __spread() {
|
|
250
265
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
251
266
|
ar = ar.concat(__read(arguments[i]));
|
|
252
267
|
return ar;
|
|
253
268
|
}
|
|
269
|
+
/** @deprecated */
|
|
254
270
|
function __spreadArrays() {
|
|
255
271
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
256
272
|
s += arguments[i].length;
|
|
@@ -259,7 +275,17 @@
|
|
|
259
275
|
r[k] = a[j];
|
|
260
276
|
return r;
|
|
261
277
|
}
|
|
262
|
-
|
|
278
|
+
function __spreadArray(to, from, pack) {
|
|
279
|
+
if (pack || arguments.length === 2)
|
|
280
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
281
|
+
if (ar || !(i in from)) {
|
|
282
|
+
if (!ar)
|
|
283
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
284
|
+
ar[i] = from[i];
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
288
|
+
}
|
|
263
289
|
function __await(v) {
|
|
264
290
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
265
291
|
}
|
|
@@ -305,20 +331,41 @@
|
|
|
305
331
|
return cooked;
|
|
306
332
|
}
|
|
307
333
|
;
|
|
334
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
335
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
336
|
+
}) : function (o, v) {
|
|
337
|
+
o["default"] = v;
|
|
338
|
+
};
|
|
308
339
|
function __importStar(mod) {
|
|
309
340
|
if (mod && mod.__esModule)
|
|
310
341
|
return mod;
|
|
311
342
|
var result = {};
|
|
312
343
|
if (mod != null)
|
|
313
344
|
for (var k in mod)
|
|
314
|
-
if (Object.hasOwnProperty.call(mod, k))
|
|
315
|
-
result
|
|
316
|
-
result
|
|
345
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
346
|
+
__createBinding(result, mod, k);
|
|
347
|
+
__setModuleDefault(result, mod);
|
|
317
348
|
return result;
|
|
318
349
|
}
|
|
319
350
|
function __importDefault(mod) {
|
|
320
351
|
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
321
352
|
}
|
|
353
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
354
|
+
if (kind === "a" && !f)
|
|
355
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
356
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
357
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
358
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
359
|
+
}
|
|
360
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
361
|
+
if (kind === "m")
|
|
362
|
+
throw new TypeError("Private method is not writable");
|
|
363
|
+
if (kind === "a" && !f)
|
|
364
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
365
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
366
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
367
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
368
|
+
}
|
|
322
369
|
|
|
323
370
|
var ImageDirective = /** @class */ (function () {
|
|
324
371
|
function ImageDirective(viewContainer, templateRef, renderer, elementRef) {
|
|
@@ -343,31 +390,31 @@
|
|
|
343
390
|
};
|
|
344
391
|
ImageDirective.prototype.updateView = function () {
|
|
345
392
|
var overrideAttrs = Object.assign(Object.assign({}, this.getElementAttrs()), this.attrs);
|
|
346
|
-
var media = this.field;
|
|
347
|
-
if (!media || (!media.editable && !media.value && !media.src)) {
|
|
393
|
+
var media$1 = this.field;
|
|
394
|
+
if (!media$1 || (!media$1.editable && !media$1.value && !media$1.src)) {
|
|
348
395
|
return;
|
|
349
396
|
}
|
|
350
397
|
var attrs = {};
|
|
351
398
|
// we likely have an experience editor value, should be a string
|
|
352
|
-
if (this.editable && media.editable) {
|
|
353
|
-
var foundImg =
|
|
399
|
+
if (this.editable && media$1.editable) {
|
|
400
|
+
var foundImg = media.mediaApi.findEditorImageTag(media$1.editable);
|
|
354
401
|
if (!foundImg) {
|
|
355
|
-
return this.renderInlineWrapper(media.editable);
|
|
402
|
+
return this.renderInlineWrapper(media$1.editable);
|
|
356
403
|
}
|
|
357
404
|
attrs = this.getImageAttrs(foundImg.attrs, overrideAttrs, this.urlParams);
|
|
358
405
|
if (!attrs) {
|
|
359
|
-
return this.renderInlineWrapper(media.editable);
|
|
406
|
+
return this.renderInlineWrapper(media$1.editable);
|
|
360
407
|
}
|
|
361
408
|
var tempImg_1 = this.renderer.createElement('img');
|
|
362
409
|
Object.entries(attrs).forEach(function (_a) {
|
|
363
410
|
var _b = __read(_a, 2), key = _b[0], attrValue = _b[1];
|
|
364
411
|
return tempImg_1.setAttribute(key, attrValue);
|
|
365
412
|
});
|
|
366
|
-
var editableMarkup = media.editable.replace(foundImg.imgTag, tempImg_1.outerHTML);
|
|
413
|
+
var editableMarkup = media$1.editable.replace(foundImg.imgTag, tempImg_1.outerHTML);
|
|
367
414
|
return this.renderInlineWrapper(editableMarkup);
|
|
368
415
|
}
|
|
369
416
|
// some wise-guy/gal is passing in a 'raw' image object value
|
|
370
|
-
var img = media.src ? media : media.value;
|
|
417
|
+
var img = media$1.src ? media$1 : media$1.value;
|
|
371
418
|
if (!img) {
|
|
372
419
|
return null;
|
|
373
420
|
}
|
|
@@ -385,10 +432,10 @@
|
|
|
385
432
|
}
|
|
386
433
|
var newAttrs = Object.assign({}, otherAttrs);
|
|
387
434
|
// update image URL for jss handler and image rendering params
|
|
388
|
-
src =
|
|
435
|
+
src = media.mediaApi.updateImageUrl(src, imageParams, this.mediaUrlPrefix);
|
|
389
436
|
if (srcSet) {
|
|
390
437
|
// replace with HTML-formatted srcset, including updated image URLs
|
|
391
|
-
newAttrs.srcSet =
|
|
438
|
+
newAttrs.srcSet = media.mediaApi.getSrcSet(src, srcSet, imageParams, this.mediaUrlPrefix);
|
|
392
439
|
}
|
|
393
440
|
else {
|
|
394
441
|
newAttrs.src = src;
|
|
@@ -574,7 +621,7 @@
|
|
|
574
621
|
_this.renderer.setAttribute(node, key, propValue);
|
|
575
622
|
if (key === 'href') {
|
|
576
623
|
_this.renderer.listen(node, 'click', function (event) {
|
|
577
|
-
_this.router.
|
|
624
|
+
_this.router.navigateByUrl(propValue);
|
|
578
625
|
event.preventDefault();
|
|
579
626
|
});
|
|
580
627
|
}
|
|
@@ -683,6 +730,7 @@
|
|
|
683
730
|
var PLACEHOLDER_COMPONENTS = new core.InjectionToken('Sc.placeholder.components');
|
|
684
731
|
var PLACEHOLDER_LAZY_COMPONENTS = new core.InjectionToken('Sc.placeholder.lazyComponents');
|
|
685
732
|
var PLACEHOLDER_MISSING_COMPONENT_COMPONENT = new core.InjectionToken('Sc.placeholder.missingComponentComponent');
|
|
733
|
+
var PLACEHOLDER_HIDDEN_RENDERING_COMPONENT = new core.InjectionToken('Sc.placeholder.hiddenRenderingComponent');
|
|
686
734
|
var DYNAMIC_COMPONENT = new core.InjectionToken('Sc.placeholder.dynamicComponent');
|
|
687
735
|
|
|
688
736
|
var RawComponent = /** @class */ (function () {
|
|
@@ -819,6 +867,29 @@
|
|
|
819
867
|
{ type: Array, decorators: [{ type: core.Inject, args: [PLACEHOLDER_LAZY_COMPONENTS,] }] }
|
|
820
868
|
]; };
|
|
821
869
|
|
|
870
|
+
var HiddenRenderingComponent = /** @class */ (function () {
|
|
871
|
+
function HiddenRenderingComponent() {
|
|
872
|
+
}
|
|
873
|
+
Object.defineProperty(HiddenRenderingComponent.prototype, "style", {
|
|
874
|
+
get: function () {
|
|
875
|
+
return 'display: block; height: 100px; background-image: linear-gradient(45deg, #ffffff 25%, #dcdcdc 25%, #dcdcdc 50%, #ffffff 50%, #ffffff 75%, #dcdcdc 75%, #dcdcdc 100%); background-size: 3px 3px;';
|
|
876
|
+
},
|
|
877
|
+
enumerable: false,
|
|
878
|
+
configurable: true
|
|
879
|
+
});
|
|
880
|
+
return HiddenRenderingComponent;
|
|
881
|
+
}());
|
|
882
|
+
HiddenRenderingComponent.decorators = [
|
|
883
|
+
{ type: core.Component, args: [{
|
|
884
|
+
selector: 'sc-hidden-rendering',
|
|
885
|
+
template: ''
|
|
886
|
+
},] }
|
|
887
|
+
];
|
|
888
|
+
HiddenRenderingComponent.propDecorators = {
|
|
889
|
+
style: [{ type: core.HostBinding, args: ['style',] }]
|
|
890
|
+
};
|
|
891
|
+
var HIDDEN_RENDERING_NAME = 'Hidden Rendering';
|
|
892
|
+
|
|
822
893
|
var PlaceholderLoadingDirective = /** @class */ (function () {
|
|
823
894
|
function PlaceholderLoadingDirective(templateRef) {
|
|
824
895
|
this.templateRef = templateRef;
|
|
@@ -875,7 +946,7 @@
|
|
|
875
946
|
return null;
|
|
876
947
|
}
|
|
877
948
|
var PlaceholderComponent = /** @class */ (function () {
|
|
878
|
-
function PlaceholderComponent(componentFactoryResolver, differs, componentFactory, changeDetectorRef, elementRef, renderer, missingComponentComponent) {
|
|
949
|
+
function PlaceholderComponent(componentFactoryResolver, differs, componentFactory, changeDetectorRef, elementRef, renderer, missingComponentComponent, hiddenRenderingComponent) {
|
|
879
950
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
880
951
|
this.differs = differs;
|
|
881
952
|
this.componentFactory = componentFactory;
|
|
@@ -883,6 +954,7 @@
|
|
|
883
954
|
this.elementRef = elementRef;
|
|
884
955
|
this.renderer = renderer;
|
|
885
956
|
this.missingComponentComponent = missingComponentComponent;
|
|
957
|
+
this.hiddenRenderingComponent = hiddenRenderingComponent;
|
|
886
958
|
this._componentInstances = [];
|
|
887
959
|
this.destroyed = false;
|
|
888
960
|
this.parentStyleAttribute = '';
|
|
@@ -1004,6 +1076,9 @@
|
|
|
1004
1076
|
});
|
|
1005
1077
|
};
|
|
1006
1078
|
PlaceholderComponent.prototype._renderEmbeddedComponent = function (rendering, index) {
|
|
1079
|
+
if (rendering.componentDefinition.componentName === HIDDEN_RENDERING_NAME) {
|
|
1080
|
+
rendering.componentImplementation = this.hiddenRenderingComponent;
|
|
1081
|
+
}
|
|
1007
1082
|
if (!rendering.componentImplementation) {
|
|
1008
1083
|
var componentName = rendering.componentDefinition.componentName;
|
|
1009
1084
|
console.error("Placeholder " + this.name + " contains unknown component " + componentName + ".", "Ensure component is mapped, like:\n JssModule.withComponents([\n { name: '" + componentName + "', type: " + componentName + "Component }\n ])");
|
|
@@ -1042,7 +1117,8 @@
|
|
|
1042
1117
|
{ type: core.ChangeDetectorRef },
|
|
1043
1118
|
{ type: core.ElementRef },
|
|
1044
1119
|
{ type: core.Renderer2 },
|
|
1045
|
-
{ type: core.Type, decorators: [{ type: core.Inject, args: [PLACEHOLDER_MISSING_COMPONENT_COMPONENT,] }] }
|
|
1120
|
+
{ type: core.Type, decorators: [{ type: core.Inject, args: [PLACEHOLDER_MISSING_COMPONENT_COMPONENT,] }] },
|
|
1121
|
+
{ type: core.Type, decorators: [{ type: core.Inject, args: [PLACEHOLDER_HIDDEN_RENDERING_COMPONENT,] }] }
|
|
1046
1122
|
]; };
|
|
1047
1123
|
PlaceholderComponent.propDecorators = {
|
|
1048
1124
|
name: [{ type: core.Input }],
|
|
@@ -1360,7 +1436,8 @@
|
|
|
1360
1436
|
{ provide: PLACEHOLDER_COMPONENTS, useValue: components },
|
|
1361
1437
|
{ provide: PLACEHOLDER_LAZY_COMPONENTS, useValue: lazyComponents || [] },
|
|
1362
1438
|
{ provide: router.ROUTES, useValue: lazyComponents || [], multi: true },
|
|
1363
|
-
{ provide: PLACEHOLDER_MISSING_COMPONENT_COMPONENT, useValue: MissingComponentComponent }
|
|
1439
|
+
{ provide: PLACEHOLDER_MISSING_COMPONENT_COMPONENT, useValue: MissingComponentComponent },
|
|
1440
|
+
{ provide: PLACEHOLDER_HIDDEN_RENDERING_COMPONENT, useValue: HiddenRenderingComponent }
|
|
1364
1441
|
], JssModule.forRoot().providers),
|
|
1365
1442
|
};
|
|
1366
1443
|
};
|
|
@@ -1385,6 +1462,7 @@
|
|
|
1385
1462
|
RichTextDirective,
|
|
1386
1463
|
TextDirective,
|
|
1387
1464
|
MissingComponentComponent,
|
|
1465
|
+
HiddenRenderingComponent,
|
|
1388
1466
|
],
|
|
1389
1467
|
exports: [
|
|
1390
1468
|
FileDirective,
|
|
@@ -1397,6 +1475,7 @@
|
|
|
1397
1475
|
RenderEmptyDirective,
|
|
1398
1476
|
RenderComponentComponent,
|
|
1399
1477
|
PlaceholderComponent,
|
|
1478
|
+
HiddenRenderingComponent,
|
|
1400
1479
|
PlaceholderLoadingDirective,
|
|
1401
1480
|
RichTextDirective,
|
|
1402
1481
|
TextDirective,
|
|
@@ -1409,83 +1488,61 @@
|
|
|
1409
1488
|
* Generated bundle index. Do not edit.
|
|
1410
1489
|
*/
|
|
1411
1490
|
|
|
1412
|
-
Object.defineProperty(exports, '
|
|
1491
|
+
Object.defineProperty(exports, 'mediaApi', {
|
|
1413
1492
|
enumerable: true,
|
|
1414
|
-
get: function () {
|
|
1415
|
-
return sitecoreJss.GraphQLDictionaryService;
|
|
1416
|
-
}
|
|
1493
|
+
get: function () { return media.mediaApi; }
|
|
1417
1494
|
});
|
|
1418
|
-
Object.defineProperty(exports, '
|
|
1495
|
+
Object.defineProperty(exports, 'GraphQLDictionaryService', {
|
|
1419
1496
|
enumerable: true,
|
|
1420
|
-
get: function () {
|
|
1421
|
-
return sitecoreJss.GraphQLLayoutService;
|
|
1422
|
-
}
|
|
1497
|
+
get: function () { return i18n.GraphQLDictionaryService; }
|
|
1423
1498
|
});
|
|
1424
1499
|
Object.defineProperty(exports, 'RestDictionaryService', {
|
|
1425
1500
|
enumerable: true,
|
|
1426
|
-
get: function () {
|
|
1427
|
-
return sitecoreJss.RestDictionaryService;
|
|
1428
|
-
}
|
|
1501
|
+
get: function () { return i18n.RestDictionaryService; }
|
|
1429
1502
|
});
|
|
1430
|
-
Object.defineProperty(exports, '
|
|
1503
|
+
Object.defineProperty(exports, 'GraphQLLayoutService', {
|
|
1431
1504
|
enumerable: true,
|
|
1432
|
-
get: function () {
|
|
1433
|
-
return sitecoreJss.RestLayoutService;
|
|
1434
|
-
}
|
|
1505
|
+
get: function () { return layout.GraphQLLayoutService; }
|
|
1435
1506
|
});
|
|
1436
|
-
Object.defineProperty(exports, '
|
|
1507
|
+
Object.defineProperty(exports, 'RestLayoutService', {
|
|
1437
1508
|
enumerable: true,
|
|
1438
|
-
get: function () {
|
|
1439
|
-
return sitecoreJss.constants;
|
|
1440
|
-
}
|
|
1509
|
+
get: function () { return layout.RestLayoutService; }
|
|
1441
1510
|
});
|
|
1442
1511
|
Object.defineProperty(exports, 'getChildPlaceholder', {
|
|
1443
1512
|
enumerable: true,
|
|
1444
|
-
get: function () {
|
|
1445
|
-
return sitecoreJss.getChildPlaceholder;
|
|
1446
|
-
}
|
|
1513
|
+
get: function () { return layout.getChildPlaceholder; }
|
|
1447
1514
|
});
|
|
1448
1515
|
Object.defineProperty(exports, 'getFieldValue', {
|
|
1449
1516
|
enumerable: true,
|
|
1450
|
-
get: function () {
|
|
1451
|
-
|
|
1452
|
-
|
|
1517
|
+
get: function () { return layout.getFieldValue; }
|
|
1518
|
+
});
|
|
1519
|
+
Object.defineProperty(exports, 'constants', {
|
|
1520
|
+
enumerable: true,
|
|
1521
|
+
get: function () { return sitecoreJss.constants; }
|
|
1522
|
+
});
|
|
1523
|
+
Object.defineProperty(exports, 'handleEditorAnchors', {
|
|
1524
|
+
enumerable: true,
|
|
1525
|
+
get: function () { return utils.handleEditorAnchors; }
|
|
1453
1526
|
});
|
|
1454
1527
|
Object.defineProperty(exports, 'isEditorActive', {
|
|
1455
1528
|
enumerable: true,
|
|
1456
|
-
get: function () {
|
|
1457
|
-
return sitecoreJss.isEditorActive;
|
|
1458
|
-
}
|
|
1529
|
+
get: function () { return utils.isEditorActive; }
|
|
1459
1530
|
});
|
|
1460
1531
|
Object.defineProperty(exports, 'isExperienceEditorActive', {
|
|
1461
1532
|
enumerable: true,
|
|
1462
|
-
get: function () {
|
|
1463
|
-
return sitecoreJss.isExperienceEditorActive;
|
|
1464
|
-
}
|
|
1533
|
+
get: function () { return utils.isExperienceEditorActive; }
|
|
1465
1534
|
});
|
|
1466
1535
|
Object.defineProperty(exports, 'isServer', {
|
|
1467
1536
|
enumerable: true,
|
|
1468
|
-
get: function () {
|
|
1469
|
-
return sitecoreJss.isServer;
|
|
1470
|
-
}
|
|
1471
|
-
});
|
|
1472
|
-
Object.defineProperty(exports, 'mediaApi', {
|
|
1473
|
-
enumerable: true,
|
|
1474
|
-
get: function () {
|
|
1475
|
-
return sitecoreJss.mediaApi;
|
|
1476
|
-
}
|
|
1537
|
+
get: function () { return utils.isServer; }
|
|
1477
1538
|
});
|
|
1478
1539
|
Object.defineProperty(exports, 'resetEditorChromes', {
|
|
1479
1540
|
enumerable: true,
|
|
1480
|
-
get: function () {
|
|
1481
|
-
return sitecoreJss.resetEditorChromes;
|
|
1482
|
-
}
|
|
1541
|
+
get: function () { return utils.resetEditorChromes; }
|
|
1483
1542
|
});
|
|
1484
1543
|
Object.defineProperty(exports, 'resetExperienceEditorChromes', {
|
|
1485
1544
|
enumerable: true,
|
|
1486
|
-
get: function () {
|
|
1487
|
-
return sitecoreJss.resetExperienceEditorChromes;
|
|
1488
|
-
}
|
|
1545
|
+
get: function () { return utils.resetExperienceEditorChromes; }
|
|
1489
1546
|
});
|
|
1490
1547
|
exports.ComponentNameAndType = ComponentNameAndType;
|
|
1491
1548
|
exports.DYNAMIC_COMPONENT = DYNAMIC_COMPONENT;
|
|
@@ -1500,18 +1557,20 @@
|
|
|
1500
1557
|
exports.RouterLinkDirective = RouterLinkDirective;
|
|
1501
1558
|
exports.TextDirective = TextDirective;
|
|
1502
1559
|
exports.isRawRendering = isRawRendering;
|
|
1503
|
-
exports
|
|
1504
|
-
exports
|
|
1505
|
-
exports
|
|
1506
|
-
exports
|
|
1507
|
-
exports
|
|
1508
|
-
exports
|
|
1509
|
-
exports
|
|
1510
|
-
exports
|
|
1511
|
-
exports
|
|
1512
|
-
exports
|
|
1560
|
+
exports["ɵb"] = PLACEHOLDER_COMPONENTS;
|
|
1561
|
+
exports["ɵc"] = PLACEHOLDER_LAZY_COMPONENTS;
|
|
1562
|
+
exports["ɵd"] = PLACEHOLDER_MISSING_COMPONENT_COMPONENT;
|
|
1563
|
+
exports["ɵe"] = PLACEHOLDER_HIDDEN_RENDERING_COMPONENT;
|
|
1564
|
+
exports["ɵf"] = RenderEachDirective;
|
|
1565
|
+
exports["ɵg"] = RenderEmptyDirective;
|
|
1566
|
+
exports["ɵh"] = JssComponentFactoryService;
|
|
1567
|
+
exports["ɵi"] = DateDirective;
|
|
1568
|
+
exports["ɵj"] = RenderComponentComponent;
|
|
1569
|
+
exports["ɵk"] = RawComponent;
|
|
1570
|
+
exports["ɵl"] = MissingComponentComponent;
|
|
1571
|
+
exports["ɵm"] = HiddenRenderingComponent;
|
|
1513
1572
|
|
|
1514
1573
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1515
1574
|
|
|
1516
|
-
}))
|
|
1575
|
+
}));
|
|
1517
1576
|
//# sourceMappingURL=sitecore-jss-sitecore-jss-angular.umd.js.map
|