@elderbyte/ngx-starter 20.12.0-beta.4 → 20.12.0-beta.6
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/fesm2022/elderbyte-ngx-starter.mjs +21 -9
- package/fesm2022/elderbyte-ngx-starter.mjs.map +1 -1
- package/index.d.ts +3 -3
- package/package.json +1 -1
- package/src/lib/components/layout/pane/basic-pane-layout/basic-pane-layout.component.scss +1 -0
- package/theming/abstracts/_elder-starter-theme.scss +2 -0
- package/theming/components/_elder-pane-theme.scss +8 -0
|
@@ -22114,13 +22114,13 @@ class ElderBasicPaneLayoutComponent {
|
|
|
22114
22114
|
this.class = '';
|
|
22115
22115
|
}
|
|
22116
22116
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ElderBasicPaneLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
22117
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", type: ElderBasicPaneLayoutComponent, isStandalone: true, selector: "elder-basic-pane-layout", host: { properties: { "class": "this.class" }, classAttribute: "elder-basic-pane-layout" }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:flex;flex-flow:row nowrap;justify-content:flex-start;padding:var(--elder-pane-padding);gap:var(--elder-pane-gap);align-items:stretch}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
22117
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", type: ElderBasicPaneLayoutComponent, isStandalone: true, selector: "elder-basic-pane-layout", host: { properties: { "class": "this.class" }, classAttribute: "elder-basic-pane-layout" }, ngImport: i0, template: "<ng-content></ng-content>\n", styles: [":host{display:flex;flex-flow:row nowrap;justify-content:flex-start;padding:var(--elder-pane-padding);gap:var(--elder-pane-gap);align-items:stretch;overflow-x:hidden}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
22118
22118
|
}
|
|
22119
22119
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: ElderBasicPaneLayoutComponent, decorators: [{
|
|
22120
22120
|
type: Component,
|
|
22121
22121
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, imports: [], selector: 'elder-basic-pane-layout', host: {
|
|
22122
22122
|
class: 'elder-basic-pane-layout',
|
|
22123
|
-
}, template: "<ng-content></ng-content>\n", styles: [":host{display:flex;flex-flow:row nowrap;justify-content:flex-start;padding:var(--elder-pane-padding);gap:var(--elder-pane-gap);align-items:stretch}\n"] }]
|
|
22123
|
+
}, template: "<ng-content></ng-content>\n", styles: [":host{display:flex;flex-flow:row nowrap;justify-content:flex-start;padding:var(--elder-pane-padding);gap:var(--elder-pane-gap);align-items:stretch;overflow-x:hidden}\n"] }]
|
|
22124
22124
|
}], propDecorators: { class: [{
|
|
22125
22125
|
type: HostBinding,
|
|
22126
22126
|
args: ['class']
|
|
@@ -38132,7 +38132,10 @@ class ElderDraggablePaneDirective {
|
|
|
38132
38132
|
* *
|
|
38133
38133
|
**************************************************************************/
|
|
38134
38134
|
this.constrainedWidth = computed(() => {
|
|
38135
|
-
const width = this.widthInPercent()
|
|
38135
|
+
const width = this.widthInPercent();
|
|
38136
|
+
if (width === null) {
|
|
38137
|
+
return null;
|
|
38138
|
+
}
|
|
38136
38139
|
return Math.max(this.minWidth(), Math.min(this.maxWidth(), width));
|
|
38137
38140
|
}, ...(ngDevMode ? [{ debugName: "constrainedWidth" }] : []));
|
|
38138
38141
|
/***************************************************************************
|
|
@@ -38144,7 +38147,7 @@ class ElderDraggablePaneDirective {
|
|
|
38144
38147
|
this.mouseMove$ = fromEvent(document, 'mousemove');
|
|
38145
38148
|
this.mouseUp$ = fromEvent(document, 'mouseup');
|
|
38146
38149
|
this.drag$ = this.mouseDown$.pipe(tap$1((event) => {
|
|
38147
|
-
this.
|
|
38150
|
+
this.initComputedWidthModeIfNecessary();
|
|
38148
38151
|
this.processDragStart(event);
|
|
38149
38152
|
}), switchMap((event) => this.mouseMove$.pipe(finalize(() => {
|
|
38150
38153
|
this.processDragEnd();
|
|
@@ -38155,6 +38158,10 @@ class ElderDraggablePaneDirective {
|
|
|
38155
38158
|
this.logger.error('Container width is 0, cannot calculate resize delta');
|
|
38156
38159
|
return;
|
|
38157
38160
|
}
|
|
38161
|
+
if (this.dragStartPaneWidthInPercent === null || isNaN(this.dragStartPaneWidthInPercent)) {
|
|
38162
|
+
this.logger.error('Cannot handle mouse move: drag start width is invalid');
|
|
38163
|
+
return;
|
|
38164
|
+
}
|
|
38158
38165
|
const deltaX = event.clientX - this.dragStartMousePosX;
|
|
38159
38166
|
// Convert pixel delta to percentage delta
|
|
38160
38167
|
let delta = (deltaX / this.containerWidth) * 100;
|
|
@@ -38168,13 +38175,14 @@ class ElderDraggablePaneDirective {
|
|
|
38168
38175
|
this.drag$.pipe(takeUntilDestroyed()).subscribe((event) => {
|
|
38169
38176
|
this.handleMouseMove(event);
|
|
38170
38177
|
});
|
|
38178
|
+
/**
|
|
38179
|
+
* Effect syncs the width style with the constrained width.
|
|
38180
|
+
*/
|
|
38171
38181
|
effect(() => {
|
|
38172
38182
|
const constrainedWidth = this.constrainedWidth();
|
|
38173
|
-
const isInComputedWidthMode = this.isInComputedWidthMode();
|
|
38174
38183
|
untracked(() => {
|
|
38175
|
-
if (
|
|
38176
|
-
this.
|
|
38177
|
-
this.setWidthStyle(constrainedWidth);
|
|
38184
|
+
if (constrainedWidth !== null) {
|
|
38185
|
+
this.setWidthStyle(this.constrainedWidth());
|
|
38178
38186
|
}
|
|
38179
38187
|
});
|
|
38180
38188
|
});
|
|
@@ -38213,16 +38221,20 @@ class ElderDraggablePaneDirective {
|
|
|
38213
38221
|
event.preventDefault();
|
|
38214
38222
|
event.stopPropagation();
|
|
38215
38223
|
this.isDragging.set(true);
|
|
38224
|
+
this.setWidthInPercentFromElementWidth();
|
|
38216
38225
|
this.dragStartMousePosX = event.clientX;
|
|
38217
38226
|
this.dragStartPaneWidthInPercent = this.widthInPercent();
|
|
38218
38227
|
}
|
|
38219
38228
|
processDragEnd() {
|
|
38220
38229
|
this.isDragging.set(false);
|
|
38221
38230
|
}
|
|
38222
|
-
|
|
38231
|
+
initComputedWidthModeIfNecessary() {
|
|
38223
38232
|
if (!this.isInComputedWidthMode()) {
|
|
38224
38233
|
this.isInComputedWidthMode.set(true);
|
|
38225
38234
|
this.setWidthInPercentFromElementWidth();
|
|
38235
|
+
this.removeExternalWidthStyles();
|
|
38236
|
+
// manually set width style after removal of initial styles
|
|
38237
|
+
this.setWidthStyle(this.constrainedWidth());
|
|
38226
38238
|
}
|
|
38227
38239
|
}
|
|
38228
38240
|
setWidthInPercentFromElementWidth() {
|