@skyux/core 12.0.0-alpha.2 → 12.0.0-alpha.4
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 +746 -835
- package/fesm2022/skyux-core.mjs +33 -16
- package/fesm2022/skyux-core.mjs.map +1 -1
- package/lib/modules/content-info-provider/content-info-provider.d.ts +3 -0
- package/lib/modules/dock/dock.module.d.ts +1 -0
- package/lib/modules/dock/dock.service.d.ts +0 -2
- package/lib/modules/overlay/overlay.module.d.ts +1 -0
- package/lib/modules/viewkeeper/viewkeeper-host-options.d.ts +1 -0
- package/lib/modules/viewkeeper/viewkeeper-options.d.ts +4 -0
- package/package.json +2 -2
- package/testing/modules/overlay/overlay-harness-filters.d.ts +2 -2
package/fesm2022/skyux-core.mjs
CHANGED
@@ -1060,7 +1060,12 @@ class SkyContentInfoProvider {
|
|
1060
1060
|
getInfo() {
|
1061
1061
|
return this.#contentInfo.asObservable();
|
1062
1062
|
}
|
1063
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyContentInfoProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1064
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyContentInfoProvider }); }
|
1063
1065
|
}
|
1066
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyContentInfoProvider, decorators: [{
|
1067
|
+
type: Injectable
|
1068
|
+
}] });
|
1064
1069
|
|
1065
1070
|
/**
|
1066
1071
|
* @internal
|
@@ -1138,6 +1143,7 @@ var SkyDockLocation;
|
|
1138
1143
|
|
1139
1144
|
/**
|
1140
1145
|
* @deprecated The `SkyDockModule` is no longer needed and can be removed from your application.
|
1146
|
+
* @internal
|
1141
1147
|
*/
|
1142
1148
|
class SkyDockModule {
|
1143
1149
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
@@ -1385,7 +1391,7 @@ class SkyDockDomAdapterService {
|
|
1385
1391
|
}
|
1386
1392
|
// Create a style element to avoid overwriting any existing inline body styles.
|
1387
1393
|
const styleElement = this.#renderer.createElement('style');
|
1388
|
-
const textNode = this.#renderer.createText(`body { margin-bottom: ${dockHeight}px; }`);
|
1394
|
+
const textNode = this.#renderer.createText(`body { margin-bottom: ${dockHeight}px; --sky-dock-height: ${dockHeight}px; }`);
|
1389
1395
|
// Apply a `data-` attribute to make unit testing easier.
|
1390
1396
|
this.#renderer.setAttribute(styleElement, 'data-test-selector', 'sky-layout-dock-bottom-styles');
|
1391
1397
|
this.#renderer.appendChild(styleElement, textNode);
|
@@ -1526,28 +1532,27 @@ class SkyDockService {
|
|
1526
1532
|
get items() {
|
1527
1533
|
return _a$1._items;
|
1528
1534
|
}
|
1529
|
-
#dynamicComponentSvc;
|
1535
|
+
#dynamicComponentSvc = inject(SkyDynamicComponentService);
|
1536
|
+
#subscription;
|
1530
1537
|
#options;
|
1531
|
-
constructor(dynamicComponentSvc) {
|
1532
|
-
this.#dynamicComponentSvc = dynamicComponentSvc;
|
1533
|
-
}
|
1534
1538
|
/**
|
1535
1539
|
* Docks a component to the bottom of the page.
|
1536
1540
|
* @param component The component to dock.
|
1537
1541
|
* @param config Options that affect the docking action.
|
1538
1542
|
*/
|
1539
1543
|
insertComponent(component, config) {
|
1544
|
+
this.#subscription ??= new Subscription();
|
1540
1545
|
const dockRef = (_a$1.dockRef =
|
1541
1546
|
_a$1.dockRef || this.#createDock());
|
1542
1547
|
const itemRef = dockRef.instance.insertComponent(component, config);
|
1543
1548
|
const item = new SkyDockItem(itemRef.componentRef.instance, itemRef.stackOrder);
|
1544
|
-
item.destroyed.subscribe(() => {
|
1549
|
+
this.#subscription?.add(item.destroyed.subscribe(() => {
|
1545
1550
|
dockRef.instance.removeItem(itemRef);
|
1546
1551
|
_a$1._items.splice(_a$1._items.indexOf(item), 1);
|
1547
1552
|
if (_a$1._items.length === 0) {
|
1548
1553
|
this.#destroyDock();
|
1549
1554
|
}
|
1550
|
-
});
|
1555
|
+
}));
|
1551
1556
|
_a$1._items.push(item);
|
1552
1557
|
_a$1._items.sort(sortByStackOrder);
|
1553
1558
|
return item;
|
@@ -1587,10 +1592,12 @@ class SkyDockService {
|
|
1587
1592
|
return dockRef;
|
1588
1593
|
}
|
1589
1594
|
#destroyDock() {
|
1595
|
+
this.#subscription?.unsubscribe();
|
1596
|
+
this.#subscription = undefined;
|
1590
1597
|
this.#dynamicComponentSvc.removeComponent(_a$1.dockRef);
|
1591
1598
|
_a$1.dockRef = undefined;
|
1592
1599
|
}
|
1593
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDockService, deps: [
|
1600
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDockService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
1594
1601
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyDockService, providedIn: 'root' }); }
|
1595
1602
|
}
|
1596
1603
|
_a$1 = SkyDockService;
|
@@ -1599,7 +1606,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
1599
1606
|
args: [{
|
1600
1607
|
providedIn: 'root',
|
1601
1608
|
}]
|
1602
|
-
}]
|
1609
|
+
}] });
|
1603
1610
|
|
1604
1611
|
/**
|
1605
1612
|
* Provides services required to create dynamic components on the page.
|
@@ -2878,6 +2885,7 @@ class SkyOverlayInstance {
|
|
2878
2885
|
|
2879
2886
|
/**
|
2880
2887
|
* @deprecated The `SkyOverlayModule` is no longer needed and can be removed from your application.
|
2888
|
+
* @internal
|
2881
2889
|
*/
|
2882
2890
|
class SkyOverlayModule {
|
2883
2891
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SkyOverlayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
@@ -4075,10 +4083,12 @@ function px(value) {
|
|
4075
4083
|
}
|
4076
4084
|
return pxValue;
|
4077
4085
|
}
|
4078
|
-
function setElPosition(el, left, top, width, marginTop, clipTop, clipLeft) {
|
4086
|
+
function setElPosition(el, left, top, width, marginTop, marginTopProperty, clipTop, clipLeft) {
|
4079
4087
|
el.style.top = px(top);
|
4080
4088
|
el.style.left = px(left);
|
4081
|
-
el.style.marginTop =
|
4089
|
+
el.style.marginTop = marginTopProperty
|
4090
|
+
? `calc(${px(marginTop)} + var(${marginTopProperty}, 0))`
|
4091
|
+
: px(marginTop);
|
4082
4092
|
el.style.clipPath =
|
4083
4093
|
clipTop || clipLeft ? `inset(${px(clipTop)} 0 0 ${px(clipLeft)})` : 'none';
|
4084
4094
|
/*istanbul ignore else*/
|
@@ -4106,6 +4116,7 @@ class SkyViewkeeper {
|
|
4106
4116
|
#verticalOffset;
|
4107
4117
|
#verticalOffsetEl;
|
4108
4118
|
#viewportMarginTop = 0;
|
4119
|
+
#viewportMarginProperty;
|
4109
4120
|
#currentElFixedLeft;
|
4110
4121
|
#currentElFixedTop;
|
4111
4122
|
#currentElFixedWidth;
|
@@ -4136,6 +4147,7 @@ class SkyViewkeeper {
|
|
4136
4147
|
// Only set viewport margin if the scrollable host is undefined.
|
4137
4148
|
if (!this.#scrollableHost) {
|
4138
4149
|
this.#viewportMarginTop = options.viewportMarginTop ?? 0;
|
4150
|
+
this.#viewportMarginProperty = options.viewportMarginProperty;
|
4139
4151
|
}
|
4140
4152
|
this.#syncElPositionHandler = () => this.syncElPosition(el, boundaryEl);
|
4141
4153
|
if (this.#verticalOffsetEl) {
|
@@ -4209,7 +4221,7 @@ class SkyViewkeeper {
|
|
4209
4221
|
if (this.#setWidth) {
|
4210
4222
|
width = 'auto';
|
4211
4223
|
}
|
4212
|
-
setElPosition(el, '', '', width, '', 0, 0);
|
4224
|
+
setElPosition(el, '', '', width, '', '', 0, 0);
|
4213
4225
|
}
|
4214
4226
|
#calculateVerticalOffset() {
|
4215
4227
|
let offset = this.#verticalOffset;
|
@@ -4231,8 +4243,13 @@ class SkyViewkeeper {
|
|
4231
4243
|
else {
|
4232
4244
|
anchorTop = getOffset(el, this.#scrollableHost).top;
|
4233
4245
|
}
|
4234
|
-
|
4235
|
-
|
4246
|
+
let viewportMarginTop = this.#viewportMarginTop;
|
4247
|
+
const viewportMarginProperty = this.#viewportMarginProperty &&
|
4248
|
+
getComputedStyle(document.body).getPropertyValue(this.#viewportMarginProperty);
|
4249
|
+
if (viewportMarginProperty) {
|
4250
|
+
viewportMarginTop += parseInt(viewportMarginProperty, 10);
|
4251
|
+
}
|
4252
|
+
const doFixEl = boundaryInfo.scrollTop + verticalOffset + viewportMarginTop > anchorTop;
|
4236
4253
|
return doFixEl;
|
4237
4254
|
}
|
4238
4255
|
#getFixedStyles(boundaryInfo, verticalOffset) {
|
@@ -4300,7 +4317,7 @@ class SkyViewkeeper {
|
|
4300
4317
|
if (this.#setWidth) {
|
4301
4318
|
width = fixedStyles.elFixedWidth;
|
4302
4319
|
}
|
4303
|
-
setElPosition(el, fixedStyles.elFixedLeft, fixedStyles.elFixedTop, width, this.#viewportMarginTop, fixedStyles.elClipTop, fixedStyles.elClipLeft);
|
4320
|
+
setElPosition(el, fixedStyles.elFixedLeft, fixedStyles.elFixedTop, width, this.#viewportMarginTop, this.#viewportMarginProperty, fixedStyles.elClipTop, fixedStyles.elClipLeft);
|
4304
4321
|
}
|
4305
4322
|
#getBoundaryInfo(el, boundaryEl) {
|
4306
4323
|
const spacerId = this.#getSpacerId();
|
@@ -4518,7 +4535,7 @@ class Version {
|
|
4518
4535
|
/**
|
4519
4536
|
* Represents the version of @skyux/core.
|
4520
4537
|
*/
|
4521
|
-
const VERSION = new Version('12.0.0-alpha.
|
4538
|
+
const VERSION = new Version('12.0.0-alpha.4');
|
4522
4539
|
|
4523
4540
|
/**
|
4524
4541
|
* Generated bundle index. Do not edit.
|