@ng-matero/extensions 17.3.5 → 18.0.1
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 +11 -0
- package/_index.scss +6 -0
- package/alert/_alert-theme.scss +2 -3
- package/colorpicker/_colorpicker-theme.scss +2 -3
- package/colorpicker/colorpicker.d.ts +4 -4
- package/{experimental/theming/_color-api-back-compat.scss → core/theming/_color-api-backwards-compatibility.scss} +1 -1
- package/{experimental → core}/theming/_config-validation.scss +11 -5
- package/{experimental → core}/theming/_definition.scss +4 -3
- package/core/theming/prebuilt/azure-blue.scss +26 -0
- package/core/theming/prebuilt/cyan-orange.scss +26 -0
- package/core/theming/prebuilt/deeppurple-amber.scss +4 -4
- package/core/theming/prebuilt/indigo-pink.scss +4 -4
- package/core/theming/prebuilt/magenta-violet.scss +26 -0
- package/core/theming/prebuilt/pink-bluegrey.scss +4 -4
- package/core/theming/prebuilt/purple-green.scss +4 -4
- package/core/theming/prebuilt/rose-red.scss +26 -0
- package/{experimental/theming/_m3-density.scss → core/tokens/_density.scss} +0 -1
- package/core/tokens/_m3-tokens.scss +350 -0
- package/core/tokens/_token-utils.scss +164 -40
- package/core/tokens/m2/_index.scss +2 -3
- package/core/tokens/m2/mdc/_plain-tooltip.scss +1 -2
- package/core/tokens/m2/mtx/_alert.scss +5 -6
- package/core/tokens/m2/mtx/_colorpicker.scss +2 -3
- package/core/tokens/m2/mtx/_datetimepicker.scss +7 -8
- package/core/tokens/m2/mtx/_drawer.scss +3 -2
- package/core/tokens/m2/mtx/_grid.scss +4 -3
- package/core/tokens/m2/mtx/_loader.scss +2 -3
- package/core/tokens/m2/mtx/_popover.scss +1 -2
- package/core/tokens/m2/mtx/_progress.scss +5 -6
- package/core/tokens/m2/mtx/_select.scss +3 -2
- package/core/tokens/m2/mtx/_split.scss +2 -3
- package/core/tokens/m3/index.scss +45 -0
- package/core/tokens/m3/mtx/_alert.scss +31 -0
- package/core/tokens/m3/mtx/_colorpicker.scss +19 -0
- package/{experimental/theming/_custom-tokens.scss → core/tokens/m3/mtx/_datetimepicker.scss} +15 -191
- package/core/tokens/m3/mtx/_drawer.scss +22 -0
- package/core/tokens/m3/mtx/_grid.scss +34 -0
- package/core/tokens/m3/mtx/_loader.scss +22 -0
- package/core/tokens/m3/mtx/_popover.scss +22 -0
- package/core/tokens/m3/mtx/_progress.scss +31 -0
- package/core/tokens/m3/mtx/_select.scss +72 -0
- package/core/tokens/m3/mtx/_split.scss +30 -0
- package/datetimepicker/_datetimepicker-theme.scss +3 -4
- package/datetimepicker/calendar-body.scss +2 -2
- package/datetimepicker/calendar.d.ts +1 -0
- package/datetimepicker/datetimepicker-content.scss +0 -2
- package/datetimepicker/datetimepicker.d.ts +4 -4
- package/drawer/_drawer-theme.scss +2 -3
- package/drawer/drawer-container.scss +1 -2
- package/esm2022/alert/alert-module.mjs +4 -4
- package/esm2022/alert/alert.mjs +3 -3
- package/esm2022/button/button-loading.mjs +3 -3
- package/esm2022/button/button-module.mjs +4 -4
- package/esm2022/checkbox-group/checkbox-group-module.mjs +4 -4
- package/esm2022/checkbox-group/checkbox-group.mjs +3 -3
- package/esm2022/colorpicker/colorpicker-input.mjs +3 -3
- package/esm2022/colorpicker/colorpicker-module.mjs +4 -4
- package/esm2022/colorpicker/colorpicker-toggle.mjs +6 -6
- package/esm2022/colorpicker/colorpicker.mjs +14 -12
- package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
- package/esm2022/column-resize/column-resize-directives/column-resize.mjs +3 -3
- package/esm2022/column-resize/column-resize-module.mjs +4 -4
- package/esm2022/column-resize/column-resize-notifier.mjs +6 -6
- package/esm2022/column-resize/column-resize.mjs +3 -3
- package/esm2022/column-resize/column-size-store.mjs +3 -3
- package/esm2022/column-resize/event-dispatcher.mjs +3 -3
- package/esm2022/column-resize/overlay-handle.mjs +3 -3
- package/esm2022/column-resize/resizable.mjs +3 -3
- package/esm2022/column-resize/resize-strategy.mjs +9 -9
- package/esm2022/core/datetime/datetime.module.mjs +8 -8
- package/esm2022/core/datetime/native-datetime-adapter.mjs +3 -3
- package/esm2022/core/pipes/is-template-ref.pipe.mjs +3 -3
- package/esm2022/core/pipes/pipes.module.mjs +4 -4
- package/esm2022/core/pipes/to-observable.pipe.mjs +3 -3
- package/esm2022/datetimepicker/calendar-body.mjs +3 -3
- package/esm2022/datetimepicker/calendar.mjs +9 -14
- package/esm2022/datetimepicker/clock.mjs +5 -5
- package/esm2022/datetimepicker/datetimepicker-input.mjs +3 -3
- package/esm2022/datetimepicker/datetimepicker-intl.mjs +3 -3
- package/esm2022/datetimepicker/datetimepicker-module.mjs +4 -4
- package/esm2022/datetimepicker/datetimepicker-toggle.mjs +6 -6
- package/esm2022/datetimepicker/datetimepicker.mjs +15 -13
- package/esm2022/datetimepicker/month-view.mjs +3 -3
- package/esm2022/datetimepicker/multi-year-view.mjs +3 -3
- package/esm2022/datetimepicker/time.mjs +6 -6
- package/esm2022/datetimepicker/year-view.mjs +3 -3
- package/esm2022/dialog/dialog-container.mjs +3 -3
- package/esm2022/dialog/dialog-module.mjs +4 -4
- package/esm2022/dialog/dialog.mjs +3 -3
- package/esm2022/drawer/drawer-container.mjs +5 -5
- package/esm2022/drawer/drawer-module.mjs +4 -4
- package/esm2022/drawer/drawer.mjs +3 -3
- package/esm2022/grid/cell.mjs +3 -3
- package/esm2022/grid/column-menu.mjs +5 -5
- package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
- package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +3 -3
- package/esm2022/grid/column-resize/column-resize-module.mjs +8 -8
- package/esm2022/grid/column-resize/overlay-handle.mjs +3 -3
- package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +3 -3
- package/esm2022/grid/column-resize/resize-strategy.mjs +3 -3
- package/esm2022/grid/expansion-toggle.mjs +3 -3
- package/esm2022/grid/grid-module.mjs +4 -4
- package/esm2022/grid/grid-pipes.mjs +21 -21
- package/esm2022/grid/grid-utils.mjs +3 -3
- package/esm2022/grid/grid.mjs +3 -3
- package/esm2022/grid/selectable-cell.mjs +3 -3
- package/esm2022/loader/loader-module.mjs +4 -4
- package/esm2022/loader/loader.mjs +3 -3
- package/esm2022/photoviewer/photoviewer-module.mjs +4 -4
- package/esm2022/photoviewer/photoviewer.mjs +3 -3
- package/esm2022/popover/popover-content.mjs +6 -6
- package/esm2022/popover/popover-module.mjs +4 -4
- package/esm2022/popover/popover-target.mjs +3 -3
- package/esm2022/popover/popover-trigger.mjs +6 -8
- package/esm2022/popover/popover.mjs +6 -6
- package/esm2022/progress/progress-module.mjs +4 -4
- package/esm2022/progress/progress.mjs +3 -3
- package/esm2022/select/option.mjs +3 -3
- package/esm2022/select/select-module.mjs +4 -4
- package/esm2022/select/select.mjs +37 -23
- package/esm2022/select/templates.mjs +33 -33
- package/esm2022/split/split-module.mjs +4 -4
- package/esm2022/split/split-pane.mjs +37 -28
- package/esm2022/split/split.mjs +55 -49
- package/esm2022/split/utils.mjs +1 -4
- package/esm2022/tooltip/tooltip-module.mjs +4 -4
- package/esm2022/tooltip/tooltip.mjs +6 -6
- package/fesm2022/mtxAlert.mjs +7 -7
- package/fesm2022/mtxButton.mjs +7 -7
- package/fesm2022/mtxCheckboxGroup.mjs +7 -7
- package/fesm2022/mtxColorpicker.mjs +27 -25
- package/fesm2022/mtxColorpicker.mjs.map +1 -1
- package/fesm2022/mtxColumnResize.mjs +40 -40
- package/fesm2022/mtxCore.mjs +21 -21
- package/fesm2022/mtxDatetimepicker.mjs +61 -63
- package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2022/mtxDialog.mjs +10 -10
- package/fesm2022/mtxDrawer.mjs +13 -13
- package/fesm2022/mtxDrawer.mjs.map +1 -1
- package/fesm2022/mtxGrid.mjs +68 -68
- package/fesm2022/mtxGrid.mjs.map +1 -1
- package/fesm2022/mtxLoader.mjs +7 -7
- package/fesm2022/mtxPhotoviewer.mjs +7 -7
- package/fesm2022/mtxPopover.mjs +24 -26
- package/fesm2022/mtxPopover.mjs.map +1 -1
- package/fesm2022/mtxProgress.mjs +7 -7
- package/fesm2022/mtxSelect.mjs +76 -62
- package/fesm2022/mtxSelect.mjs.map +1 -1
- package/fesm2022/mtxSplit.mjs +92 -80
- package/fesm2022/mtxSplit.mjs.map +1 -1
- package/fesm2022/mtxTooltip.mjs +12 -12
- package/grid/_grid-theme.scss +3 -4
- package/grid/column-menu.scss +15 -9
- package/grid/grid.scss +2 -2
- package/loader/_loader-theme.scss +2 -3
- package/package.json +18 -18
- package/popover/_popover-theme.scss +2 -3
- package/popover/popover.d.ts +2 -2
- package/prebuilt-themes/azure-blue.css +1 -0
- package/prebuilt-themes/cyan-orange.css +1 -0
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -0
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -0
- package/progress/_progress-theme.scss +3 -4
- package/select/_select-theme.scss +3 -4
- package/select/select.d.ts +17 -2
- package/select/select.scss +2 -4
- package/split/_split-theme.scss +2 -3
- package/split/split-pane.d.ts +29 -13
- package/split/split.d.ts +44 -20
- package/split/utils.d.ts +0 -1
- package/tooltip/_tooltip-theme.scss +4 -5
- package/core/style/_sass-utils.scss +0 -80
- package/experimental/_index.scss +0 -5
- package/experimental/theming/_m3-tokens.scss +0 -308
- /package/{experimental/theming → core/tokens}/_format-tokens.scss +0 -0
package/fesm2022/mtxSplit.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, Input, Output, ViewChildren, Directive, NgModule } from '@angular/core';
|
|
2
|
+
import { InjectionToken, EventEmitter, booleanAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, Optional, Inject, Input, Output, ViewChildren, Directive, NgModule } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { Observable, Subject } from 'rxjs';
|
|
5
5
|
import { debounceTime } from 'rxjs/operators';
|
|
@@ -27,9 +27,6 @@ function getElementPixelSize(elRef, direction) {
|
|
|
27
27
|
const rect = elRef.nativeElement.getBoundingClientRect();
|
|
28
28
|
return direction === 'horizontal' ? rect.width : rect.height;
|
|
29
29
|
}
|
|
30
|
-
function getInputBoolean(v) {
|
|
31
|
-
return typeof v === 'boolean' ? v : v === 'false' ? false : true;
|
|
32
|
-
}
|
|
33
30
|
function getInputPositiveNumber(v, defaultValue) {
|
|
34
31
|
if (v === null || v === undefined) {
|
|
35
32
|
return defaultValue;
|
|
@@ -258,14 +255,19 @@ const MTX_SPLIT_DEFAULT_OPTIONS = new InjectionToken('mtx-split-default-options'
|
|
|
258
255
|
*
|
|
259
256
|
*/
|
|
260
257
|
class MtxSplit {
|
|
258
|
+
/** The split direction. */
|
|
259
|
+
get direction() {
|
|
260
|
+
return this._direction;
|
|
261
|
+
}
|
|
261
262
|
set direction(v) {
|
|
262
263
|
this._direction = v === 'vertical' ? 'vertical' : 'horizontal';
|
|
263
264
|
this.renderer.addClass(this.elRef.nativeElement, `mtx-split-${this._direction}`);
|
|
264
265
|
this.renderer.removeClass(this.elRef.nativeElement, `mtx-split-${this._direction === 'vertical' ? 'horizontal' : 'vertical'}`);
|
|
265
266
|
this.build(false, false);
|
|
266
267
|
}
|
|
267
|
-
|
|
268
|
-
|
|
268
|
+
/** The unit you want to specify area sizes. */
|
|
269
|
+
get unit() {
|
|
270
|
+
return this._unit;
|
|
269
271
|
}
|
|
270
272
|
set unit(v) {
|
|
271
273
|
this._unit = v === 'pixel' ? 'pixel' : 'percent';
|
|
@@ -273,30 +275,26 @@ class MtxSplit {
|
|
|
273
275
|
this.renderer.removeClass(this.elRef.nativeElement, `mtx-split-${this._unit === 'pixel' ? 'percent' : 'pixel'}`);
|
|
274
276
|
this.build(false, true);
|
|
275
277
|
}
|
|
276
|
-
|
|
277
|
-
return this._unit;
|
|
278
|
-
}
|
|
279
|
-
set gutterSize(v) {
|
|
280
|
-
this._gutterSize = getInputPositiveNumber(v, 11);
|
|
281
|
-
this.build(false, false);
|
|
282
|
-
}
|
|
278
|
+
/** Gutters's size (dragging elements) in pixels. */
|
|
283
279
|
get gutterSize() {
|
|
284
280
|
return this._gutterSize;
|
|
285
281
|
}
|
|
286
|
-
set
|
|
287
|
-
this.
|
|
282
|
+
set gutterSize(v) {
|
|
283
|
+
this._gutterSize = getInputPositiveNumber(v, 4);
|
|
284
|
+
this.build(false, false);
|
|
288
285
|
}
|
|
286
|
+
/** Gutter step while moving in pixels. */
|
|
289
287
|
get gutterStep() {
|
|
290
288
|
return this._gutterStep;
|
|
291
289
|
}
|
|
292
|
-
set
|
|
293
|
-
this.
|
|
290
|
+
set gutterStep(v) {
|
|
291
|
+
this._gutterStep = getInputPositiveNumber(v, 1);
|
|
294
292
|
}
|
|
295
|
-
|
|
296
|
-
|
|
293
|
+
/** Add transition when toggling visibility using `visible` or `size` changes. */
|
|
294
|
+
get useTransition() {
|
|
295
|
+
return this._useTransition;
|
|
297
296
|
}
|
|
298
297
|
set useTransition(v) {
|
|
299
|
-
this._useTransition = getInputBoolean(v);
|
|
300
298
|
if (this._useTransition) {
|
|
301
299
|
this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-transition');
|
|
302
300
|
}
|
|
@@ -304,11 +302,14 @@ class MtxSplit {
|
|
|
304
302
|
this.renderer.removeClass(this.elRef.nativeElement, 'mtx-split-transition');
|
|
305
303
|
}
|
|
306
304
|
}
|
|
307
|
-
|
|
308
|
-
|
|
305
|
+
/**
|
|
306
|
+
* Disable the dragging feature (remove cursor/image on gutters).
|
|
307
|
+
* `gutterClick`/`gutterDblClick` still emits.
|
|
308
|
+
*/
|
|
309
|
+
get disabled() {
|
|
310
|
+
return this._disabled;
|
|
309
311
|
}
|
|
310
312
|
set disabled(v) {
|
|
311
|
-
this._disabled = getInputBoolean(v);
|
|
312
313
|
if (this._disabled) {
|
|
313
314
|
this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-disabled');
|
|
314
315
|
}
|
|
@@ -316,22 +317,28 @@ class MtxSplit {
|
|
|
316
317
|
this.renderer.removeClass(this.elRef.nativeElement, 'mtx-split-disabled');
|
|
317
318
|
}
|
|
318
319
|
}
|
|
319
|
-
|
|
320
|
-
|
|
320
|
+
/** Indicates the directionality of the areas. */
|
|
321
|
+
get dir() {
|
|
322
|
+
return this._dir;
|
|
321
323
|
}
|
|
322
324
|
set dir(v) {
|
|
323
325
|
this._dir = v === 'rtl' ? 'rtl' : 'ltr';
|
|
324
326
|
this.renderer.setAttribute(this.elRef.nativeElement, 'dir', this._dir);
|
|
325
327
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
+
/**
|
|
329
|
+
* Milliseconds to detect a double click on a gutter. Set it around 300-500ms if
|
|
330
|
+
* you want to use `gutterDblClick` event.
|
|
331
|
+
*/
|
|
332
|
+
get gutterDblClickDuration() {
|
|
333
|
+
return this._gutterDblClickDuration;
|
|
328
334
|
}
|
|
329
335
|
set gutterDblClickDuration(v) {
|
|
330
336
|
this._gutterDblClickDuration = getInputPositiveNumber(v, 0);
|
|
331
337
|
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
338
|
+
/**
|
|
339
|
+
* Event emitted when transition ends (could be triggered from `visible` or `size` changes).
|
|
340
|
+
* Only if `useTransition` equals true.
|
|
341
|
+
*/
|
|
335
342
|
get transitionEnd() {
|
|
336
343
|
return new Observable(subscriber => (this.transitionEndSubscriber = subscriber)).pipe(debounceTime(20));
|
|
337
344
|
}
|
|
@@ -342,30 +349,25 @@ class MtxSplit {
|
|
|
342
349
|
this.renderer = renderer;
|
|
343
350
|
this._defaultOptions = _defaultOptions;
|
|
344
351
|
this._direction = 'horizontal';
|
|
345
|
-
////
|
|
346
352
|
this._unit = 'percent';
|
|
347
|
-
////
|
|
348
353
|
this._gutterSize = 4;
|
|
349
|
-
////
|
|
350
354
|
this._gutterStep = 1;
|
|
351
|
-
|
|
352
|
-
this.
|
|
353
|
-
////
|
|
355
|
+
/** Set to true if you want to limit gutter move to adjacent areas only. */
|
|
356
|
+
this.restrictMove = false;
|
|
354
357
|
this._useTransition = false;
|
|
355
|
-
////
|
|
356
358
|
this._disabled = false;
|
|
357
|
-
////
|
|
358
359
|
this._dir = 'ltr';
|
|
359
|
-
////
|
|
360
360
|
this._gutterDblClickDuration = 0;
|
|
361
|
-
|
|
361
|
+
/** Event emitted when drag starts. */
|
|
362
362
|
this.dragStart = new EventEmitter(false);
|
|
363
|
+
/** Event emitted when drag ends. */
|
|
363
364
|
this.dragEnd = new EventEmitter(false);
|
|
365
|
+
/** Event emitted when user clicks on a gutter. */
|
|
364
366
|
this.gutterClick = new EventEmitter(false);
|
|
367
|
+
/** Event emitted when user double clicks on a gutter. */
|
|
365
368
|
this.gutterDblClick = new EventEmitter(false);
|
|
366
369
|
this.dragProgressSubject = new Subject();
|
|
367
370
|
this.dragProgress$ = this.dragProgressSubject.asObservable();
|
|
368
|
-
////
|
|
369
371
|
this.isDragging = false;
|
|
370
372
|
this.dragListeners = [];
|
|
371
373
|
this.snapshot = null;
|
|
@@ -459,9 +461,7 @@ class MtxSplit {
|
|
|
459
461
|
if (isValid === false) {
|
|
460
462
|
return false;
|
|
461
463
|
}
|
|
462
|
-
|
|
463
|
-
// @ts-ignore
|
|
464
|
-
this.displayedAreas.forEach((area, i) => (area.component._size = formatedSizes[i]));
|
|
464
|
+
this.displayedAreas.forEach((area, i) => (area.component.size = formatedSizes[i]));
|
|
465
465
|
this.build(false, true);
|
|
466
466
|
return true;
|
|
467
467
|
}
|
|
@@ -799,10 +799,10 @@ class MtxSplit {
|
|
|
799
799
|
ngOnDestroy() {
|
|
800
800
|
this.stopDragging();
|
|
801
801
|
}
|
|
802
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
803
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
802
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxSplit, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: MTX_SPLIT_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
803
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.1", type: MtxSplit, isStandalone: true, selector: "mtx-split", inputs: { color: "color", direction: "direction", unit: "unit", gutterSize: "gutterSize", gutterStep: "gutterStep", restrictMove: ["restrictMove", "restrictMove", booleanAttribute], useTransition: ["useTransition", "useTransition", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], dir: "dir", gutterDblClickDuration: "gutterDblClickDuration" }, outputs: { dragStart: "dragStart", dragEnd: "dragEnd", gutterClick: "gutterClick", gutterDblClick: "gutterDblClick", transitionEnd: "transitionEnd" }, host: { classAttribute: "mtx-split" }, viewQueries: [{ propertyName: "gutterEls", predicate: ["gutterEls"], descendants: true }], exportAs: ["mtxSplit"], ngImport: i0, template: "<ng-content></ng-content>\r\n@for (area of displayedAreas; track area; let index = $index; let last = $last) {\r\n @if (!last) {\r\n <div #gutterEls class=\"mtx-split-gutter\" [class]=\"color ? 'mat-' + color : ''\"\r\n [style.flex-basis.px]=\"gutterSize\"\r\n [style.order]=\"index * 2 + 1\"\r\n (mousedown)=\"startDragging($event, index * 2 + 1, index + 1)\"\r\n (touchstart)=\"startDragging($event, index * 2 + 1, index + 1)\"\r\n (mouseup)=\"clickGutter($event, index + 1)\"\r\n (touchend)=\"clickGutter($event, index + 1)\">\r\n <div class=\"mtx-split-gutter-handle\"></div>\r\n </div>\r\n }\r\n}\r\n", styles: [".mtx-split{display:flex;flex-wrap:nowrap;justify-content:flex-start;align-items:stretch;overflow:hidden;width:100%;height:100%}.mtx-split>.mtx-split-gutter{position:relative;display:flex;flex-grow:0;flex-shrink:0;align-items:center;justify-content:center;background-color:var(--mtx-split-gutter-background-color)}.mtx-split>.mtx-split-gutter:hover{background-color:var(--mtx-split-gutter-hover-state-background-color)}.mtx-split>.mtx-split-gutter>.mtx-split-gutter-handle{position:absolute;opacity:0}.mtx-split>.mtx-split-pane{flex-grow:0;flex-shrink:0;overflow:hidden auto}.mtx-split>.mtx-split-pane.mtx-split-pane-hidden{flex:0 1 0!important;overflow:hidden hidden}.mtx-split.mtx-split-horizontal{flex-direction:row}.mtx-split.mtx-split-horizontal>.mtx-split-gutter{flex-direction:row;height:100%;cursor:col-resize}.mtx-split.mtx-split-horizontal>.mtx-split-gutter>.mtx-split-gutter-handle{width:8px;height:100%;left:-2px;right:2px}.mtx-split.mtx-split-horizontal>.mtx-split-pane{height:100%}.mtx-split.mtx-split-vertical{flex-direction:column}.mtx-split.mtx-split-vertical>.mtx-split-gutter{flex-direction:column;width:100%;cursor:row-resize}.mtx-split.mtx-split-vertical>.mtx-split-gutter>.mtx-split-gutter-handle{width:100%;height:8px;top:-2px;bottom:2px}.mtx-split.mtx-split-vertical>.mtx-split-pane{width:100%}.mtx-split.mtx-split-vertical>.mtx-split-pane.mtx-split-pane-hidden{max-width:0}.mtx-split.mtx-split-disabled>.mtx-split-gutter{cursor:default}.mtx-split.mtx-split-disabled>.mtx-split-gutter .mtx-split-gutter-handle{background-image:none}.mtx-split.mtx-split-transition.mtx-split-init:not(.mtx-dragging)>.mtx-split-gutter,.mtx-split.mtx-split-transition.mtx-split-init:not(.mtx-dragging)>.mtx-split-pane{transition:flex-basis .3s}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
804
804
|
}
|
|
805
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
805
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxSplit, decorators: [{
|
|
806
806
|
type: Component,
|
|
807
807
|
args: [{ selector: 'mtx-split', exportAs: 'mtxSplit', host: {
|
|
808
808
|
class: 'mtx-split',
|
|
@@ -823,11 +823,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
|
|
|
823
823
|
}], gutterStep: [{
|
|
824
824
|
type: Input
|
|
825
825
|
}], restrictMove: [{
|
|
826
|
-
type: Input
|
|
826
|
+
type: Input,
|
|
827
|
+
args: [{ transform: booleanAttribute }]
|
|
827
828
|
}], useTransition: [{
|
|
828
|
-
type: Input
|
|
829
|
+
type: Input,
|
|
830
|
+
args: [{ transform: booleanAttribute }]
|
|
829
831
|
}], disabled: [{
|
|
830
|
-
type: Input
|
|
832
|
+
type: Input,
|
|
833
|
+
args: [{ transform: booleanAttribute }]
|
|
831
834
|
}], dir: [{
|
|
832
835
|
type: Input
|
|
833
836
|
}], gutterDblClickDuration: [{
|
|
@@ -848,43 +851,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
|
|
|
848
851
|
}] } });
|
|
849
852
|
|
|
850
853
|
class MtxSplitPane {
|
|
854
|
+
/**
|
|
855
|
+
* Order of the area. Used to maintain the order of areas when toggling their visibility.
|
|
856
|
+
* Toggling area visibility without specifying an `order` leads to weird behavior.
|
|
857
|
+
*/
|
|
858
|
+
get order() {
|
|
859
|
+
return this._order;
|
|
860
|
+
}
|
|
851
861
|
set order(v) {
|
|
852
862
|
this._order = getInputPositiveNumber(v, null);
|
|
853
863
|
this.split.updateArea(this, true, false);
|
|
854
864
|
}
|
|
855
|
-
|
|
856
|
-
|
|
865
|
+
/**
|
|
866
|
+
* Size of the area in selected unit (percent/pixel).
|
|
867
|
+
* - Percent: All areas sizes should equal to `100`, If not, all areas will have the same size.
|
|
868
|
+
* - Pixel: An area with wildcard size (`size="*"`) is mandatory (only one) and
|
|
869
|
+
* can't have `visible="false"` or `minSize`/`maxSize`/`lockSize` properties.
|
|
870
|
+
*/
|
|
871
|
+
get size() {
|
|
872
|
+
return this._size;
|
|
857
873
|
}
|
|
858
874
|
set size(v) {
|
|
859
875
|
this._size = getInputPositiveNumber(v, null);
|
|
860
876
|
this.split.updateArea(this, false, true);
|
|
861
877
|
}
|
|
862
|
-
|
|
863
|
-
|
|
878
|
+
/** Minimum pixel or percent size, should be equal to or smaller than provided `size`. */
|
|
879
|
+
get minSize() {
|
|
880
|
+
return this._minSize;
|
|
864
881
|
}
|
|
865
882
|
set minSize(v) {
|
|
866
883
|
this._minSize = getInputPositiveNumber(v, null);
|
|
867
884
|
this.split.updateArea(this, false, true);
|
|
868
885
|
}
|
|
869
|
-
|
|
870
|
-
|
|
886
|
+
/** Maximum pixel or percent size, should be equal to or larger than provided `size`. */
|
|
887
|
+
get maxSize() {
|
|
888
|
+
return this._maxSize;
|
|
871
889
|
}
|
|
872
890
|
set maxSize(v) {
|
|
873
891
|
this._maxSize = getInputPositiveNumber(v, null);
|
|
874
892
|
this.split.updateArea(this, false, true);
|
|
875
893
|
}
|
|
876
|
-
|
|
877
|
-
|
|
894
|
+
/** Lock area size, same as `minSize`=`maxSize`=`size`. */
|
|
895
|
+
get lockSize() {
|
|
896
|
+
return this._lockSize;
|
|
878
897
|
}
|
|
879
898
|
set lockSize(v) {
|
|
880
|
-
this._lockSize = getInputBoolean(v);
|
|
881
899
|
this.split.updateArea(this, false, true);
|
|
882
900
|
}
|
|
883
|
-
|
|
884
|
-
|
|
901
|
+
/** Hide area visually but still present in the DOM, use `ngIf` to completely remove it. */
|
|
902
|
+
get visible() {
|
|
903
|
+
return this._visible;
|
|
885
904
|
}
|
|
886
905
|
set visible(v) {
|
|
887
|
-
this._visible = getInputBoolean(v);
|
|
888
906
|
if (this._visible) {
|
|
889
907
|
this.split.showArea(this);
|
|
890
908
|
this.renderer.removeClass(this.elRef.nativeElement, 'mtx-split-pane-hidden');
|
|
@@ -894,24 +912,16 @@ class MtxSplitPane {
|
|
|
894
912
|
this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-pane-hidden');
|
|
895
913
|
}
|
|
896
914
|
}
|
|
897
|
-
get visible() {
|
|
898
|
-
return this._visible;
|
|
899
|
-
}
|
|
900
915
|
constructor(ngZone, elRef, renderer, split) {
|
|
901
916
|
this.ngZone = ngZone;
|
|
902
917
|
this.elRef = elRef;
|
|
903
918
|
this.renderer = renderer;
|
|
904
919
|
this.split = split;
|
|
905
920
|
this._order = null;
|
|
906
|
-
////
|
|
907
921
|
this._size = null;
|
|
908
|
-
////
|
|
909
922
|
this._minSize = null;
|
|
910
|
-
////
|
|
911
923
|
this._maxSize = null;
|
|
912
|
-
////
|
|
913
924
|
this._lockSize = false;
|
|
914
|
-
////
|
|
915
925
|
this._visible = true;
|
|
916
926
|
this.lockListeners = [];
|
|
917
927
|
this.renderer.addClass(this.elRef.nativeElement, 'mtx-split-pane');
|
|
@@ -969,10 +979,10 @@ class MtxSplitPane {
|
|
|
969
979
|
}
|
|
970
980
|
this.split.removeArea(this);
|
|
971
981
|
}
|
|
972
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
973
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
982
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxSplitPane, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: MtxSplit }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
983
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.0.1", type: MtxSplitPane, isStandalone: true, selector: "mtx-split-pane, [mtx-split-pane]", inputs: { order: "order", size: "size", minSize: "minSize", maxSize: "maxSize", lockSize: ["lockSize", "lockSize", booleanAttribute], visible: ["visible", "visible", booleanAttribute] }, exportAs: ["mtxSplitPane"], ngImport: i0 }); }
|
|
974
984
|
}
|
|
975
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
985
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxSplitPane, decorators: [{
|
|
976
986
|
type: Directive,
|
|
977
987
|
args: [{
|
|
978
988
|
selector: 'mtx-split-pane, [mtx-split-pane]',
|
|
@@ -988,17 +998,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
|
|
|
988
998
|
}], maxSize: [{
|
|
989
999
|
type: Input
|
|
990
1000
|
}], lockSize: [{
|
|
991
|
-
type: Input
|
|
1001
|
+
type: Input,
|
|
1002
|
+
args: [{ transform: booleanAttribute }]
|
|
992
1003
|
}], visible: [{
|
|
993
|
-
type: Input
|
|
1004
|
+
type: Input,
|
|
1005
|
+
args: [{ transform: booleanAttribute }]
|
|
994
1006
|
}] } });
|
|
995
1007
|
|
|
996
1008
|
class MtxSplitModule {
|
|
997
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
998
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
999
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
1009
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxSplitModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1010
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.0.1", ngImport: i0, type: MtxSplitModule, imports: [CommonModule, MtxSplit, MtxSplitPane], exports: [MtxSplit, MtxSplitPane] }); }
|
|
1011
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxSplitModule, imports: [CommonModule] }); }
|
|
1000
1012
|
}
|
|
1001
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1013
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: MtxSplitModule, decorators: [{
|
|
1002
1014
|
type: NgModule,
|
|
1003
1015
|
args: [{
|
|
1004
1016
|
imports: [CommonModule, MtxSplit, MtxSplitPane],
|
|
@@ -1010,5 +1022,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
|
|
|
1010
1022
|
* Generated bundle index. Do not edit.
|
|
1011
1023
|
*/
|
|
1012
1024
|
|
|
1013
|
-
export { MTX_SPLIT_DEFAULT_OPTIONS, MtxSplit, MtxSplitModule, MtxSplitPane, getAreaAbsorptionCapacity, getAreaAbsorptionCapacityPercent, getAreaAbsorptionCapacityPixel, getAreaMaxSize, getAreaMinSize, getElementPixelSize, getGutterSideAbsorptionCapacity,
|
|
1025
|
+
export { MTX_SPLIT_DEFAULT_OPTIONS, MtxSplit, MtxSplitModule, MtxSplitPane, getAreaAbsorptionCapacity, getAreaAbsorptionCapacityPercent, getAreaAbsorptionCapacityPixel, getAreaMaxSize, getAreaMinSize, getElementPixelSize, getGutterSideAbsorptionCapacity, getInputPositiveNumber, getPointFromEvent, isUserSizesValid, updateAreaSize };
|
|
1014
1026
|
//# sourceMappingURL=mtxSplit.mjs.map
|