@skyux/core 7.4.1 → 7.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/documentation.json +413 -387
- package/esm2020/lib/modules/adapter-service/adapter.service.mjs +4 -4
- package/esm2020/lib/modules/affix/affixer.mjs +2 -2
- package/esm2020/lib/modules/dock/dock.service.mjs +2 -2
- package/esm2020/lib/modules/dynamic-component/dynamic-component-options.mjs +1 -1
- package/esm2020/lib/modules/dynamic-component/dynamic-component.service.mjs +38 -30
- package/esm2020/lib/modules/log/log.service.mjs +2 -2
- package/esm2020/lib/modules/log/types/log-deprecation-args.mjs +1 -1
- package/esm2020/lib/modules/trim/trim.directive.mjs +2 -2
- package/fesm2015/skyux-core.mjs +44 -36
- package/fesm2015/skyux-core.mjs.map +1 -1
- package/fesm2020/skyux-core.mjs +44 -36
- package/fesm2020/skyux-core.mjs.map +1 -1
- package/lib/modules/adapter-service/adapter.service.d.ts +3 -3
- package/lib/modules/dock/dock.service.d.ts +1 -1
- package/lib/modules/dynamic-component/dynamic-component-options.d.ts +5 -1
- package/lib/modules/log/log.service.d.ts +1 -1
- package/lib/modules/log/types/log-deprecation-args.d.ts +1 -1
- package/package.json +2 -2
package/fesm2015/skyux-core.mjs
CHANGED
@@ -68,7 +68,7 @@ class SkyCoreAdapterService {
|
|
68
68
|
/**
|
69
69
|
* Set the responsive container CSS class for a given element.
|
70
70
|
*
|
71
|
-
* @param elementRef - The element that will
|
71
|
+
* @param elementRef - The element that will receive the new CSS class.
|
72
72
|
* @param breakpoint - The SkyMediaBreakpoint will determine which class
|
73
73
|
* gets set. For example a SkyMediaBreakpoint of `xs` will set a CSS class of `sky-responsive-container-xs`.
|
74
74
|
*/
|
@@ -138,9 +138,9 @@ class SkyCoreAdapterService {
|
|
138
138
|
*
|
139
139
|
* @param elementRef - The element to search within.
|
140
140
|
* @param containerSelector - A CSS selector indicating the container that should
|
141
|
-
*
|
141
|
+
* receive focus if no focusable children are found.
|
142
142
|
* @param focusOnContainerIfNoChildrenFound - It set to `true`, the container will
|
143
|
-
*
|
143
|
+
* receive focus if no focusable children are found.
|
144
144
|
*/
|
145
145
|
getFocusableChildrenAndApplyFocus(elementRef, containerSelector, focusOnContainerIfNoChildrenFound = false) {
|
146
146
|
const containerElement = elementRef.nativeElement.querySelector(containerSelector);
|
@@ -610,7 +610,7 @@ _SkyAffixer_affixedElement = new WeakMap(), _SkyAffixer_baseElement = new WeakMa
|
|
610
610
|
const affixedRect = __classPrivateFieldGet(this, _SkyAffixer_affixedElement, "f").getBoundingClientRect();
|
611
611
|
const baseRect = baseElement.getBoundingClientRect();
|
612
612
|
// A pixel value representing the leeway between the edge of the overflow parent and the edge
|
613
|
-
// of the base element before it
|
613
|
+
// of the base element before it disappears from view.
|
614
614
|
// If the visible portion of the base element is less than this pixel value, the auto-fit
|
615
615
|
// functionality attempts to find another placement.
|
616
616
|
const defaultPixelTolerance = 40;
|
@@ -1228,35 +1228,43 @@ class SkyDynamicComponentService {
|
|
1228
1228
|
providers: options.providers || [],
|
1229
1229
|
parent: options.parentInjector || __classPrivateFieldGet(this, _SkyDynamicComponentService_injector, "f"),
|
1230
1230
|
});
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1231
|
+
let componentRef;
|
1232
|
+
if (options.viewContainerRef) {
|
1233
|
+
componentRef = options.viewContainerRef.createComponent(componentType, {
|
1234
|
+
injector: injector,
|
1235
|
+
});
|
1236
|
+
}
|
1237
|
+
else {
|
1238
|
+
componentRef = createComponent(componentType, {
|
1239
|
+
environmentInjector: __classPrivateFieldGet(this, _SkyDynamicComponentService_applicationRef, "f").injector,
|
1240
|
+
elementInjector: injector,
|
1241
|
+
});
|
1242
|
+
__classPrivateFieldGet(this, _SkyDynamicComponentService_applicationRef, "f").attachView(componentRef.hostView);
|
1243
|
+
const el = __classPrivateFieldGet(this, _SkyDynamicComponentService_instances, "m", _SkyDynamicComponentService_getRootNode).call(this, componentRef);
|
1244
|
+
const bodyEl = __classPrivateFieldGet(this, _SkyDynamicComponentService_windowRef, "f").nativeWindow.document.body;
|
1245
|
+
switch (options.location) {
|
1246
|
+
case SkyDynamicComponentLocation.BeforeElement:
|
1247
|
+
if (!options.referenceEl) {
|
1248
|
+
throw new Error('[SkyDynamicComponentService] Could not create a component at location `SkyDynamicComponentLocation.BeforeElement` because a reference element was not provided.');
|
1249
|
+
}
|
1250
|
+
__classPrivateFieldGet(this, _SkyDynamicComponentService_renderer, "f").insertBefore(options.referenceEl.parentElement, el, options.referenceEl);
|
1251
|
+
break;
|
1252
|
+
case SkyDynamicComponentLocation.ElementTop:
|
1253
|
+
if (!options.referenceEl) {
|
1254
|
+
throw new Error('[SkyDynamicComponentService] Could not create a component at location `SkyDynamicComponentLocation.ElementTop` because a reference element was not provided.');
|
1255
|
+
}
|
1256
|
+
__classPrivateFieldGet(this, _SkyDynamicComponentService_renderer, "f").insertBefore(options.referenceEl, el, options.referenceEl.firstChild);
|
1257
|
+
break;
|
1258
|
+
case SkyDynamicComponentLocation.ElementBottom:
|
1259
|
+
__classPrivateFieldGet(this, _SkyDynamicComponentService_renderer, "f").appendChild(options.referenceEl, el);
|
1260
|
+
break;
|
1261
|
+
case SkyDynamicComponentLocation.BodyTop:
|
1262
|
+
__classPrivateFieldGet(this, _SkyDynamicComponentService_renderer, "f").insertBefore(bodyEl, el, bodyEl.firstChild);
|
1263
|
+
break;
|
1264
|
+
default:
|
1265
|
+
__classPrivateFieldGet(this, _SkyDynamicComponentService_renderer, "f").appendChild(bodyEl, el);
|
1266
|
+
break;
|
1267
|
+
}
|
1260
1268
|
}
|
1261
1269
|
return componentRef;
|
1262
1270
|
}
|
@@ -1330,7 +1338,7 @@ class SkyDockService {
|
|
1330
1338
|
/**
|
1331
1339
|
* Sets options for the positioning and styling of the dock component. Since the dock service is a
|
1332
1340
|
* singleton instance, these options will be applied to all components inserted into the dock. In
|
1333
|
-
* order to create a
|
1341
|
+
* order to create a separate dock with different options, consumers should provide a different
|
1334
1342
|
* instance of the dock service.
|
1335
1343
|
* @param options The options for positioning and styling
|
1336
1344
|
*/
|
@@ -1559,7 +1567,7 @@ class SkyLogService {
|
|
1559
1567
|
}
|
1560
1568
|
/**
|
1561
1569
|
* Logs console information if the application's log level is `SkyLogLevel.Info` or above.
|
1562
|
-
* @param message The
|
1570
|
+
* @param message The informational message
|
1563
1571
|
* @param params Optional parameters for the informational message.
|
1564
1572
|
*/
|
1565
1573
|
info(message, params) {
|
@@ -3029,7 +3037,7 @@ class SkyTrimDirective {
|
|
3029
3037
|
__classPrivateFieldSet(this, _SkyTrimDirective_elRef, elRef, "f");
|
3030
3038
|
__classPrivateFieldSet(this, _SkyTrimDirective_obs, mutationObs.create((mutations) => {
|
3031
3039
|
const nodes = [];
|
3032
|
-
// Only trim white space inside direct
|
3040
|
+
// Only trim white space inside direct descendants of the current element.
|
3033
3041
|
for (const mutation of mutations) {
|
3034
3042
|
if (mutation.target.parentNode === elRef.nativeElement) {
|
3035
3043
|
nodes.push(mutation.target);
|