@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/fesm2020/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);
|
@@ -613,7 +613,7 @@ _SkyAffixer_affixedElement = new WeakMap(), _SkyAffixer_baseElement = new WeakMa
|
|
613
613
|
const affixedRect = __classPrivateFieldGet(this, _SkyAffixer_affixedElement, "f").getBoundingClientRect();
|
614
614
|
const baseRect = baseElement.getBoundingClientRect();
|
615
615
|
// A pixel value representing the leeway between the edge of the overflow parent and the edge
|
616
|
-
// of the base element before it
|
616
|
+
// of the base element before it disappears from view.
|
617
617
|
// If the visible portion of the base element is less than this pixel value, the auto-fit
|
618
618
|
// functionality attempts to find another placement.
|
619
619
|
const defaultPixelTolerance = 40;
|
@@ -1230,35 +1230,43 @@ class SkyDynamicComponentService {
|
|
1230
1230
|
providers: options.providers || [],
|
1231
1231
|
parent: options.parentInjector || __classPrivateFieldGet(this, _SkyDynamicComponentService_injector, "f"),
|
1232
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
|
-
|
1260
|
-
|
1261
|
-
|
1233
|
+
let componentRef;
|
1234
|
+
if (options.viewContainerRef) {
|
1235
|
+
componentRef = options.viewContainerRef.createComponent(componentType, {
|
1236
|
+
injector: injector,
|
1237
|
+
});
|
1238
|
+
}
|
1239
|
+
else {
|
1240
|
+
componentRef = createComponent(componentType, {
|
1241
|
+
environmentInjector: __classPrivateFieldGet(this, _SkyDynamicComponentService_applicationRef, "f").injector,
|
1242
|
+
elementInjector: injector,
|
1243
|
+
});
|
1244
|
+
__classPrivateFieldGet(this, _SkyDynamicComponentService_applicationRef, "f").attachView(componentRef.hostView);
|
1245
|
+
const el = __classPrivateFieldGet(this, _SkyDynamicComponentService_instances, "m", _SkyDynamicComponentService_getRootNode).call(this, componentRef);
|
1246
|
+
const bodyEl = __classPrivateFieldGet(this, _SkyDynamicComponentService_windowRef, "f").nativeWindow.document.body;
|
1247
|
+
switch (options.location) {
|
1248
|
+
case SkyDynamicComponentLocation.BeforeElement:
|
1249
|
+
if (!options.referenceEl) {
|
1250
|
+
throw new Error('[SkyDynamicComponentService] Could not create a component at location `SkyDynamicComponentLocation.BeforeElement` because a reference element was not provided.');
|
1251
|
+
}
|
1252
|
+
__classPrivateFieldGet(this, _SkyDynamicComponentService_renderer, "f").insertBefore(options.referenceEl.parentElement, el, options.referenceEl);
|
1253
|
+
break;
|
1254
|
+
case SkyDynamicComponentLocation.ElementTop:
|
1255
|
+
if (!options.referenceEl) {
|
1256
|
+
throw new Error('[SkyDynamicComponentService] Could not create a component at location `SkyDynamicComponentLocation.ElementTop` because a reference element was not provided.');
|
1257
|
+
}
|
1258
|
+
__classPrivateFieldGet(this, _SkyDynamicComponentService_renderer, "f").insertBefore(options.referenceEl, el, options.referenceEl.firstChild);
|
1259
|
+
break;
|
1260
|
+
case SkyDynamicComponentLocation.ElementBottom:
|
1261
|
+
__classPrivateFieldGet(this, _SkyDynamicComponentService_renderer, "f").appendChild(options.referenceEl, el);
|
1262
|
+
break;
|
1263
|
+
case SkyDynamicComponentLocation.BodyTop:
|
1264
|
+
__classPrivateFieldGet(this, _SkyDynamicComponentService_renderer, "f").insertBefore(bodyEl, el, bodyEl.firstChild);
|
1265
|
+
break;
|
1266
|
+
default:
|
1267
|
+
__classPrivateFieldGet(this, _SkyDynamicComponentService_renderer, "f").appendChild(bodyEl, el);
|
1268
|
+
break;
|
1269
|
+
}
|
1262
1270
|
}
|
1263
1271
|
return componentRef;
|
1264
1272
|
}
|
@@ -1332,7 +1340,7 @@ class SkyDockService {
|
|
1332
1340
|
/**
|
1333
1341
|
* Sets options for the positioning and styling of the dock component. Since the dock service is a
|
1334
1342
|
* singleton instance, these options will be applied to all components inserted into the dock. In
|
1335
|
-
* order to create a
|
1343
|
+
* order to create a separate dock with different options, consumers should provide a different
|
1336
1344
|
* instance of the dock service.
|
1337
1345
|
* @param options The options for positioning and styling
|
1338
1346
|
*/
|
@@ -1558,7 +1566,7 @@ class SkyLogService {
|
|
1558
1566
|
}
|
1559
1567
|
/**
|
1560
1568
|
* Logs console information if the application's log level is `SkyLogLevel.Info` or above.
|
1561
|
-
* @param message The
|
1569
|
+
* @param message The informational message
|
1562
1570
|
* @param params Optional parameters for the informational message.
|
1563
1571
|
*/
|
1564
1572
|
info(message, params) {
|
@@ -3023,7 +3031,7 @@ class SkyTrimDirective {
|
|
3023
3031
|
__classPrivateFieldSet(this, _SkyTrimDirective_elRef, elRef, "f");
|
3024
3032
|
__classPrivateFieldSet(this, _SkyTrimDirective_obs, mutationObs.create((mutations) => {
|
3025
3033
|
const nodes = [];
|
3026
|
-
// Only trim white space inside direct
|
3034
|
+
// Only trim white space inside direct descendants of the current element.
|
3027
3035
|
for (const mutation of mutations) {
|
3028
3036
|
if (mutation.target.parentNode === elRef.nativeElement) {
|
3029
3037
|
nodes.push(mutation.target);
|