@ng-matero/extensions 16.3.0 → 17.0.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/_index.scss +2 -1
- package/alert/_alert-theme.scss +54 -24
- package/alert/alert.d.ts +3 -6
- package/alert/alert.scss +3 -3
- package/button/_button-theme.scss +6 -4
- package/button/button-loading.d.ts +5 -10
- package/button/button-module.d.ts +5 -5
- package/checkbox-group/checkbox-group.d.ts +4 -9
- package/colorpicker/_colorpicker-theme.scss +62 -34
- package/colorpicker/colorpicker-input.d.ts +1 -3
- package/colorpicker/colorpicker-toggle.d.ts +2 -3
- package/colorpicker/colorpicker.d.ts +5 -6
- package/core/color/_all-color.scss +7 -18
- package/core/density/_all-density.scss +28 -14
- package/core/mdc-helpers/_mdc-helpers.scss +27 -238
- package/core/style/_sass-utils.scss +13 -1
- package/core/style/_validation.scss +43 -0
- package/core/theming/_all-theme.scss +32 -17
- package/core/theming/_inspection.scss +303 -0
- package/core/theming/_m2-inspection.scss +266 -0
- package/core/tokens/_token-utils.scss +4 -5
- package/core/tokens/m2/mdc/_plain-tooltip.scss +21 -29
- package/core/tokens/m2/mtx/_alert.scss +14 -15
- package/core/tokens/m2/mtx/_colorpicker.scss +8 -11
- package/core/tokens/m2/mtx/_datetimepicker.scss +38 -47
- package/core/tokens/m2/mtx/_drawer.scss +9 -10
- package/core/tokens/m2/mtx/_grid.scss +34 -22
- package/core/tokens/m2/mtx/_loader.scss +6 -6
- package/core/tokens/m2/mtx/_popover.scss +10 -11
- package/core/tokens/m2/mtx/_progress.scss +18 -17
- package/core/tokens/m2/mtx/_select.scss +65 -25
- package/core/tokens/m2/mtx/_split.scss +8 -11
- package/core/typography/_all-typography.scss +40 -0
- package/core/typography/_typography.scss +1 -579
- package/datetimepicker/_datetimepicker-theme.scss +75 -48
- package/datetimepicker/calendar.d.ts +7 -14
- package/datetimepicker/calendar.scss +16 -4
- package/datetimepicker/clock.d.ts +1 -2
- package/datetimepicker/datetimepicker-content.scss +3 -3
- package/datetimepicker/datetimepicker-input.d.ts +1 -2
- package/datetimepicker/datetimepicker-toggle.d.ts +2 -3
- package/datetimepicker/datetimepicker.d.ts +15 -26
- package/datetimepicker/month-view.d.ts +1 -1
- package/datetimepicker/multi-year-view.d.ts +1 -1
- package/datetimepicker/time.d.ts +3 -5
- package/datetimepicker/time.scss +2 -2
- package/datetimepicker/year-view.d.ts +1 -1
- package/drawer/_drawer-theme.scss +55 -22
- package/drawer/drawer-container.scss +25 -4
- package/esm2022/alert/alert-module.mjs +4 -4
- package/esm2022/alert/alert.mjs +11 -18
- package/esm2022/button/button-loading.mjs +13 -23
- package/esm2022/button/button-module.mjs +6 -7
- package/esm2022/checkbox-group/checkbox-group-module.mjs +4 -4
- package/esm2022/checkbox-group/checkbox-group.mjs +18 -29
- package/esm2022/colorpicker/colorpicker-input.mjs +13 -14
- package/esm2022/colorpicker/colorpicker-module.mjs +4 -4
- package/esm2022/colorpicker/colorpicker-toggle.mjs +18 -18
- package/esm2022/colorpicker/colorpicker.mjs +31 -36
- package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
- package/esm2022/column-resize/column-resize-directives/column-resize.mjs +4 -4
- package/esm2022/column-resize/column-resize-module.mjs +4 -4
- package/esm2022/column-resize/column-resize-notifier.mjs +7 -7
- 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 +4 -4
- package/esm2022/column-resize/overlay-handle.mjs +3 -3
- package/esm2022/column-resize/resizable.mjs +3 -3
- package/esm2022/column-resize/resize-strategy.mjs +13 -13
- package/esm2022/core/datetime/datetime.module.mjs +8 -8
- package/esm2022/core/datetime/native-datetime-adapter.mjs +5 -5
- 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 +5 -6
- package/esm2022/datetimepicker/calendar.mjs +30 -47
- package/esm2022/datetimepicker/clock.mjs +10 -9
- package/esm2022/datetimepicker/datetimepicker-input.mjs +14 -15
- package/esm2022/datetimepicker/datetimepicker-intl.mjs +3 -3
- package/esm2022/datetimepicker/datetimepicker-module.mjs +4 -4
- package/esm2022/datetimepicker/datetimepicker-toggle.mjs +18 -18
- package/esm2022/datetimepicker/datetimepicker.mjs +57 -80
- package/esm2022/datetimepicker/month-view.mjs +8 -9
- package/esm2022/datetimepicker/multi-year-view.mjs +8 -8
- package/esm2022/datetimepicker/time.mjs +18 -24
- package/esm2022/datetimepicker/year-view.mjs +8 -8
- package/esm2022/dialog/dialog-container.mjs +7 -7
- package/esm2022/dialog/dialog-module.mjs +4 -4
- package/esm2022/dialog/dialog.mjs +4 -4
- package/esm2022/drawer/drawer-container.mjs +7 -7
- package/esm2022/drawer/drawer-module.mjs +4 -4
- package/esm2022/drawer/drawer.mjs +5 -5
- package/esm2022/grid/cell.mjs +6 -6
- package/esm2022/grid/column-menu.mjs +5 -5
- package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
- package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +4 -4
- package/esm2022/grid/column-resize/column-resize-module.mjs +8 -8
- package/esm2022/grid/column-resize/overlay-handle.mjs +6 -6
- package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +6 -6
- package/esm2022/grid/column-resize/resize-strategy.mjs +5 -5
- package/esm2022/grid/expansion-toggle.mjs +5 -5
- package/esm2022/grid/grid-module.mjs +4 -4
- package/esm2022/grid/grid-pipes.mjs +22 -22
- package/esm2022/grid/grid-utils.mjs +4 -4
- package/esm2022/grid/grid.mjs +76 -44
- package/esm2022/loader/loader-module.mjs +4 -4
- package/esm2022/loader/loader.mjs +17 -29
- package/esm2022/photoviewer/photoviewer-module.mjs +4 -4
- package/esm2022/photoviewer/photoviewer.mjs +7 -7
- package/esm2022/popover/popover-content.mjs +8 -8
- package/esm2022/popover/popover-module.mjs +4 -4
- package/esm2022/popover/popover-target.mjs +4 -4
- package/esm2022/popover/popover-trigger.mjs +6 -6
- package/esm2022/popover/popover.mjs +52 -137
- package/esm2022/progress/progress-module.mjs +4 -4
- package/esm2022/progress/progress.mjs +14 -25
- package/esm2022/select/option.mjs +11 -17
- package/esm2022/select/select-module.mjs +4 -4
- package/esm2022/select/select.mjs +13 -13
- package/esm2022/select/templates.mjs +44 -44
- package/esm2022/split/split-module.mjs +4 -4
- package/esm2022/split/split-pane.mjs +5 -5
- package/esm2022/split/split.mjs +7 -7
- package/esm2022/tooltip/tooltip-module.mjs +4 -4
- package/esm2022/tooltip/tooltip.mjs +22 -22
- package/fesm2022/mtxAlert.mjs +14 -21
- package/fesm2022/mtxAlert.mjs.map +1 -1
- package/fesm2022/mtxButton.mjs +17 -28
- package/fesm2022/mtxButton.mjs.map +1 -1
- package/fesm2022/mtxCheckboxGroup.mjs +21 -32
- package/fesm2022/mtxCheckboxGroup.mjs.map +1 -1
- package/fesm2022/mtxColorpicker.mjs +61 -64
- package/fesm2022/mtxColorpicker.mjs.map +1 -1
- package/fesm2022/mtxColumnResize.mjs +48 -48
- package/fesm2022/mtxCore.mjs +23 -23
- package/fesm2022/mtxDatetimepicker.mjs +150 -190
- package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2022/mtxDialog.mjs +14 -14
- package/fesm2022/mtxDialog.mjs.map +1 -1
- package/fesm2022/mtxDrawer.mjs +17 -17
- package/fesm2022/mtxDrawer.mjs.map +1 -1
- package/fesm2022/mtxGrid.mjs +150 -118
- package/fesm2022/mtxGrid.mjs.map +1 -1
- package/fesm2022/mtxLoader.mjs +20 -32
- package/fesm2022/mtxLoader.mjs.map +1 -1
- package/fesm2022/mtxPhotoviewer.mjs +10 -10
- package/fesm2022/mtxPhotoviewer.mjs.map +1 -1
- package/fesm2022/mtxPopover.mjs +73 -158
- package/fesm2022/mtxPopover.mjs.map +1 -1
- package/fesm2022/mtxProgress.mjs +17 -28
- package/fesm2022/mtxProgress.mjs.map +1 -1
- package/fesm2022/mtxSelect.mjs +68 -73
- package/fesm2022/mtxSelect.mjs.map +1 -1
- package/fesm2022/mtxSplit.mjs +14 -14
- package/fesm2022/mtxSplit.mjs.map +1 -1
- package/fesm2022/mtxTooltip.mjs +26 -26
- package/fesm2022/mtxTooltip.mjs.map +1 -1
- package/grid/_grid-theme.scss +60 -24
- package/grid/column-menu.scss +32 -3
- package/grid/grid.d.ts +33 -1
- package/grid/grid.scss +36 -108
- package/loader/_loader-theme.scss +55 -22
- package/loader/loader.d.ts +4 -9
- package/loader/loader.scss +1 -1
- package/package.json +35 -41
- package/photoviewer/photoviewer.d.ts +1 -0
- package/popover/_popover-theme.scss +55 -22
- package/popover/popover.d.ts +23 -54
- package/popover/popover.scss +2 -2
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress/_progress-theme.scss +60 -22
- package/progress/progress.d.ts +4 -9
- package/progress/progress.scss +3 -3
- package/select/_select-theme.scss +66 -34
- package/select/option.d.ts +2 -5
- package/select/select.d.ts +1 -3
- package/select/select.scss +104 -127
- package/split/_split-theme.scss +62 -32
- package/split/split.scss +2 -4
- package/tooltip/_tooltip-theme.scss +66 -34
- package/_theming.scss +0 -16
- package/alert/_alert-theme.import.scss +0 -2
- package/button/_button-theme.import.scss +0 -2
- package/colorpicker/_colorpicker-theme.import.scss +0 -2
- package/core/style/_elevation.scss +0 -91
- package/core/style/_private.scss +0 -32
- package/core/style/_variables.scss +0 -44
- package/core/style/_vendor-prefixes.scss +0 -46
- package/core/theming/_palette.scss +0 -746
- package/core/theming/_theming.scss +0 -463
- package/core/typography/_typography-utils.scss +0 -101
- package/datetimepicker/_datetimepicker-theme.import.scss +0 -4
- package/drawer/_drawer-theme.import.scss +0 -2
- package/grid/_grid-theme.import.scss +0 -2
- package/loader/_loader-theme.import.scss +0 -2
- package/popover/_popover-theme.import.scss +0 -2
- package/progress/_progress-theme.import.scss +0 -2
- package/select/_select-density.scss +0 -68
- package/select/_select-theme.import.scss +0 -3
- package/split/_split-theme.import.scss +0 -2
- package/tooltip/_tooltip-theme.import.scss +0 -1
package/fesm2022/mtxLoader.mjs
CHANGED
|
@@ -1,28 +1,12 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
2
|
+
import { booleanAttribute, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
|
|
4
3
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as
|
|
4
|
+
import * as i2 from '@angular/material/progress-bar';
|
|
6
5
|
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
7
|
-
import * as
|
|
6
|
+
import * as i1 from '@angular/material/progress-spinner';
|
|
8
7
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
9
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
10
8
|
|
|
11
9
|
class MtxLoader {
|
|
12
|
-
/** Whether the loader is loading. */
|
|
13
|
-
get loading() {
|
|
14
|
-
return this._loading;
|
|
15
|
-
}
|
|
16
|
-
set loading(value) {
|
|
17
|
-
this._loading = coerceBooleanProperty(value);
|
|
18
|
-
}
|
|
19
|
-
/** Whether the loader has a backdrop. */
|
|
20
|
-
get hasBackdrop() {
|
|
21
|
-
return this._hasBackdrop;
|
|
22
|
-
}
|
|
23
|
-
set hasBackdrop(value) {
|
|
24
|
-
this._hasBackdrop = coerceBooleanProperty(value);
|
|
25
|
-
}
|
|
26
10
|
constructor(_changeDetectorRef) {
|
|
27
11
|
this._changeDetectorRef = _changeDetectorRef;
|
|
28
12
|
/** The loader's type. Can be `spinner` or `progressbar` */
|
|
@@ -39,19 +23,21 @@ class MtxLoader {
|
|
|
39
23
|
this.bufferValue = 0;
|
|
40
24
|
/** Value of the progress circle or the progress bar. */
|
|
41
25
|
this.value = 0;
|
|
42
|
-
|
|
43
|
-
this.
|
|
26
|
+
/** Whether the loader is loading. */
|
|
27
|
+
this.loading = true;
|
|
28
|
+
/** Whether the loader has a backdrop. */
|
|
29
|
+
this.hasBackdrop = true;
|
|
44
30
|
}
|
|
45
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
46
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
31
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxLoader, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
32
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.0.7", type: MtxLoader, selector: "mtx-loader", inputs: { type: "type", color: "color", mode: "mode", strokeWidth: "strokeWidth", diameter: "diameter", bufferValue: "bufferValue", value: "value", loading: ["loading", "loading", booleanAttribute], hasBackdrop: ["hasBackdrop", "hasBackdrop", booleanAttribute] }, host: { properties: { "class.mtx-loader-loading": "loading" }, classAttribute: "mtx-loader" }, exportAs: ["mtxLoader"], ngImport: i0, template: "@if (loading && hasBackdrop) {\n <div class=\"mtx-loader-backdrop\"></div>\n}\n@if (loading) {\n <div class=\"mtx-loader-main\">\n @if (type==='spinner') {\n <mat-spinner\n [color]=\"color\"\n [strokeWidth]=\"strokeWidth\"\n [diameter]=\"diameter\"\n [mode]=\"$any(mode)\"\n [value]=\"value\">\n </mat-spinner>\n }\n @if (type==='progressbar') {\n <mat-progress-bar\n [color]=\"color\"\n [mode]=\"$any(mode)\"\n [value]=\"value\"\n [bufferValue]=\"bufferValue\">\n </mat-progress-bar>\n }\n </div>\n}\n<ng-content></ng-content>\n", styles: [".mtx-loader{position:relative;display:block;width:100%;height:100%}.mtx-loader-main{position:absolute;top:0;left:0;z-index:2;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.mtx-loader-main .mat-mdc-spinner{position:relative}.mtx-loader-main .mat-mdc-progress-bar{position:absolute;top:0;left:0;width:100%}.mtx-loader-backdrop{position:absolute;top:0;left:0;z-index:1;display:block;width:100%;height:100%;content:\"\";background-color:var(--mtx-loader-backdrop-background-color)}\n"], dependencies: [{ kind: "component", type: i1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
47
33
|
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxLoader, decorators: [{
|
|
49
35
|
type: Component,
|
|
50
36
|
args: [{ selector: 'mtx-loader', exportAs: 'mtxLoader', host: {
|
|
51
37
|
'class': 'mtx-loader',
|
|
52
38
|
'[class.mtx-loader-loading]': 'loading',
|
|
53
|
-
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mtx-loader-backdrop\"
|
|
54
|
-
}], ctorParameters:
|
|
39
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (loading && hasBackdrop) {\n <div class=\"mtx-loader-backdrop\"></div>\n}\n@if (loading) {\n <div class=\"mtx-loader-main\">\n @if (type==='spinner') {\n <mat-spinner\n [color]=\"color\"\n [strokeWidth]=\"strokeWidth\"\n [diameter]=\"diameter\"\n [mode]=\"$any(mode)\"\n [value]=\"value\">\n </mat-spinner>\n }\n @if (type==='progressbar') {\n <mat-progress-bar\n [color]=\"color\"\n [mode]=\"$any(mode)\"\n [value]=\"value\"\n [bufferValue]=\"bufferValue\">\n </mat-progress-bar>\n }\n </div>\n}\n<ng-content></ng-content>\n", styles: [".mtx-loader{position:relative;display:block;width:100%;height:100%}.mtx-loader-main{position:absolute;top:0;left:0;z-index:2;display:flex;justify-content:center;align-items:center;width:100%;height:100%}.mtx-loader-main .mat-mdc-spinner{position:relative}.mtx-loader-main .mat-mdc-progress-bar{position:absolute;top:0;left:0;width:100%}.mtx-loader-backdrop{position:absolute;top:0;left:0;z-index:1;display:block;width:100%;height:100%;content:\"\";background-color:var(--mtx-loader-backdrop-background-color)}\n"] }]
|
|
40
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { type: [{
|
|
55
41
|
type: Input
|
|
56
42
|
}], color: [{
|
|
57
43
|
type: Input
|
|
@@ -66,17 +52,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
66
52
|
}], value: [{
|
|
67
53
|
type: Input
|
|
68
54
|
}], loading: [{
|
|
69
|
-
type: Input
|
|
55
|
+
type: Input,
|
|
56
|
+
args: [{ transform: booleanAttribute }]
|
|
70
57
|
}], hasBackdrop: [{
|
|
71
|
-
type: Input
|
|
58
|
+
type: Input,
|
|
59
|
+
args: [{ transform: booleanAttribute }]
|
|
72
60
|
}] } });
|
|
73
61
|
|
|
74
62
|
class MtxLoaderModule {
|
|
75
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
76
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
77
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
63
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxLoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
64
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.7", ngImport: i0, type: MtxLoaderModule, declarations: [MtxLoader], imports: [CommonModule, MatProgressSpinnerModule, MatProgressBarModule], exports: [MtxLoader] }); }
|
|
65
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxLoaderModule, imports: [CommonModule, MatProgressSpinnerModule, MatProgressBarModule] }); }
|
|
78
66
|
}
|
|
79
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxLoaderModule, decorators: [{
|
|
80
68
|
type: NgModule,
|
|
81
69
|
args: [{
|
|
82
70
|
imports: [CommonModule, MatProgressSpinnerModule, MatProgressBarModule],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mtxLoader.mjs","sources":["../../../projects/extensions/loader/loader.ts","../../../projects/extensions/loader/loader.html","../../../projects/extensions/loader/loader-module.ts","../../../projects/extensions/loader/mtxLoader.ts"],"sourcesContent":["import {\n
|
|
1
|
+
{"version":3,"file":"mtxLoader.mjs","sources":["../../../projects/extensions/loader/loader.ts","../../../projects/extensions/loader/loader.html","../../../projects/extensions/loader/loader-module.ts","../../../projects/extensions/loader/mtxLoader.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Input,\n ViewEncapsulation,\n booleanAttribute,\n} from '@angular/core';\nimport { ThemePalette } from '@angular/material/core';\nimport { ProgressBarMode } from '@angular/material/progress-bar';\nimport { ProgressSpinnerMode } from '@angular/material/progress-spinner';\n\nexport type MtxLoaderType = 'spinner' | 'progressbar';\n\n@Component({\n selector: 'mtx-loader',\n exportAs: 'mtxLoader',\n host: {\n 'class': 'mtx-loader',\n '[class.mtx-loader-loading]': 'loading',\n },\n templateUrl: './loader.html',\n styleUrls: ['./loader.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MtxLoader {\n /** The loader's type. Can be `spinner` or `progressbar` */\n @Input() type: MtxLoaderType = 'spinner';\n\n /** Theme color palette for the component. */\n @Input() color: ThemePalette = 'primary';\n\n /** Mode of the progress circle or the progress bar. */\n @Input() mode: ProgressSpinnerMode | ProgressBarMode = 'indeterminate';\n\n /** Stroke width of the spinner loader. */\n @Input() strokeWidth = 4;\n\n /** The diameter of the spinner loader (will set width and height of svg). */\n @Input() diameter = 48;\n\n /** Buffer value of the progressbar loader. */\n @Input() bufferValue = 0;\n\n /** Value of the progress circle or the progress bar. */\n @Input() value = 0;\n\n /** Whether the loader is loading. */\n @Input({ transform: booleanAttribute }) loading = true;\n\n /** Whether the loader has a backdrop. */\n @Input({ transform: booleanAttribute }) hasBackdrop = true;\n\n constructor(private _changeDetectorRef: ChangeDetectorRef) {}\n}\n","@if (loading && hasBackdrop) {\n <div class=\"mtx-loader-backdrop\"></div>\n}\n@if (loading) {\n <div class=\"mtx-loader-main\">\n @if (type==='spinner') {\n <mat-spinner\n [color]=\"color\"\n [strokeWidth]=\"strokeWidth\"\n [diameter]=\"diameter\"\n [mode]=\"$any(mode)\"\n [value]=\"value\">\n </mat-spinner>\n }\n @if (type==='progressbar') {\n <mat-progress-bar\n [color]=\"color\"\n [mode]=\"$any(mode)\"\n [value]=\"value\"\n [bufferValue]=\"bufferValue\">\n </mat-progress-bar>\n }\n </div>\n}\n<ng-content></ng-content>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\nimport { MtxLoader } from './loader';\n\n@NgModule({\n imports: [CommonModule, MatProgressSpinnerModule, MatProgressBarModule],\n exports: [MtxLoader],\n declarations: [MtxLoader],\n})\nexport class MtxLoaderModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MA0Ba,SAAS,CAAA;AA4BpB,IAAA,WAAA,CAAoB,kBAAqC,EAAA;QAArC,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAmB;;QA1BhD,IAAI,CAAA,IAAA,GAAkB,SAAS,CAAC;;QAGhC,IAAK,CAAA,KAAA,GAAiB,SAAS,CAAC;;QAGhC,IAAI,CAAA,IAAA,GAA0C,eAAe,CAAC;;QAG9D,IAAW,CAAA,WAAA,GAAG,CAAC,CAAC;;QAGhB,IAAQ,CAAA,QAAA,GAAG,EAAE,CAAC;;QAGd,IAAW,CAAA,WAAA,GAAG,CAAC,CAAC;;QAGhB,IAAK,CAAA,KAAA,GAAG,CAAC,CAAC;;QAGqB,IAAO,CAAA,OAAA,GAAG,IAAI,CAAC;;QAGf,IAAW,CAAA,WAAA,GAAG,IAAI,CAAC;KAEE;iIA5BlD,SAAS,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAT,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,SAAS,EAuBA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,KAAA,EAAA,OAAA,EAAA,IAAA,EAAA,MAAA,EAAA,WAAA,EAAA,aAAA,EAAA,QAAA,EAAA,UAAA,EAAA,WAAA,EAAA,aAAA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
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, HostListener, NgModule } from '@angular/core';
|
|
2
|
+
import { booleanAttribute, Directive, Input, HostListener, NgModule } from '@angular/core';
|
|
3
3
|
import PhotoViewer from 'photoviewer';
|
|
4
4
|
|
|
5
5
|
class MtxPhotoviewer {
|
|
@@ -39,16 +39,16 @@ class MtxPhotoviewer {
|
|
|
39
39
|
initPhotoViewer() {
|
|
40
40
|
this.photoviewerInstance = new PhotoViewer(this.images, this.options);
|
|
41
41
|
}
|
|
42
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
43
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
42
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxPhotoviewer, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
43
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.0.7", type: MtxPhotoviewer, selector: "[mtxPhotoviewer]", inputs: { images: ["mtxPhotoviewerItems", "images"], options: ["mtxPhotoviewerOptions", "options"], embed: ["mtxPhotoviewerEmbed", "embed", booleanAttribute] }, host: { listeners: { "click": "onClick($event)" } }, exportAs: ["mtxPhotoviewer"], ngImport: i0 }); }
|
|
44
44
|
}
|
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxPhotoviewer, decorators: [{
|
|
46
46
|
type: Directive,
|
|
47
47
|
args: [{
|
|
48
48
|
selector: '[mtxPhotoviewer]',
|
|
49
49
|
exportAs: 'mtxPhotoviewer',
|
|
50
50
|
}]
|
|
51
|
-
}], ctorParameters:
|
|
51
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { images: [{
|
|
52
52
|
type: Input,
|
|
53
53
|
args: ['mtxPhotoviewerItems']
|
|
54
54
|
}], options: [{
|
|
@@ -56,18 +56,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.7", ngImpor
|
|
|
56
56
|
args: ['mtxPhotoviewerOptions']
|
|
57
57
|
}], embed: [{
|
|
58
58
|
type: Input,
|
|
59
|
-
args: ['mtxPhotoviewerEmbed']
|
|
59
|
+
args: [{ alias: 'mtxPhotoviewerEmbed', transform: booleanAttribute }]
|
|
60
60
|
}], onClick: [{
|
|
61
61
|
type: HostListener,
|
|
62
62
|
args: ['click', ['$event']]
|
|
63
63
|
}] } });
|
|
64
64
|
|
|
65
65
|
class MtxPhotoviewerModule {
|
|
66
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
67
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
68
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
66
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxPhotoviewerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
67
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.7", ngImport: i0, type: MtxPhotoviewerModule, declarations: [MtxPhotoviewer], exports: [MtxPhotoviewer] }); }
|
|
68
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxPhotoviewerModule }); }
|
|
69
69
|
}
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.7", ngImport: i0, type: MtxPhotoviewerModule, decorators: [{
|
|
71
71
|
type: NgModule,
|
|
72
72
|
args: [{
|
|
73
73
|
imports: [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mtxPhotoviewer.mjs","sources":["../../../projects/extensions/photoviewer/photoviewer.ts","../../../projects/extensions/photoviewer/photoviewer-module.ts","../../../projects/extensions/photoviewer/mtxPhotoviewer.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"mtxPhotoviewer.mjs","sources":["../../../projects/extensions/photoviewer/photoviewer.ts","../../../projects/extensions/photoviewer/photoviewer-module.ts","../../../projects/extensions/photoviewer/mtxPhotoviewer.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n HostListener,\n Input,\n OnDestroy,\n OnInit,\n booleanAttribute,\n} from '@angular/core';\nimport PhotoViewer from 'photoviewer';\n\n@Directive({\n selector: '[mtxPhotoviewer]',\n exportAs: 'mtxPhotoviewer',\n})\nexport class MtxPhotoviewer implements OnInit, OnDestroy {\n @Input('mtxPhotoviewerItems')\n images: PhotoViewer.Img[] = [];\n\n @Input('mtxPhotoviewerOptions')\n options?: PhotoViewer.Options;\n\n @Input({ alias: 'mtxPhotoviewerEmbed', transform: booleanAttribute })\n embed = false;\n\n photoviewerInstance?: PhotoViewer;\n\n constructor(private _elementRef: ElementRef<Element>) {}\n\n ngOnInit(): void {\n const { nativeElement } = this._elementRef;\n\n if (this.embed) {\n this.options = {\n appendTo: nativeElement,\n positionFixed: false,\n modalWidth: nativeElement.clientWidth,\n modalHeight: nativeElement.clientHeight,\n ...this.options,\n };\n this.initPhotoViewer();\n } else {\n if (this.images.length === 0 && nativeElement.nodeName === 'IMG') {\n const img = nativeElement as HTMLImageElement;\n this.images = [{ title: img.title || img.alt, src: img.src }];\n }\n }\n }\n\n ngOnDestroy(): void {\n this.photoviewerInstance?.close();\n }\n\n @HostListener('click', ['$event'])\n onClick(event: MouseEvent) {\n event.preventDefault();\n\n if (!this.embed) {\n this.initPhotoViewer();\n }\n }\n\n initPhotoViewer() {\n this.photoviewerInstance = new PhotoViewer(this.images, this.options);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { MtxPhotoviewer } from './photoviewer';\n\n@NgModule({\n imports: [],\n exports: [MtxPhotoviewer],\n declarations: [MtxPhotoviewer],\n})\nexport class MtxPhotoviewerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAea,cAAc,CAAA;AAYzB,IAAA,WAAA,CAAoB,WAAgC,EAAA;QAAhC,IAAW,CAAA,WAAA,GAAX,WAAW,CAAqB;QAVpD,IAAM,CAAA,MAAA,GAAsB,EAAE,CAAC;QAM/B,IAAK,CAAA,KAAA,GAAG,KAAK,CAAC;KAI0C;IAExD,QAAQ,GAAA;AACN,QAAA,MAAM,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC;QAE3C,IAAI,IAAI,CAAC,KAAK,EAAE;YACd,IAAI,CAAC,OAAO,GAAG;AACb,gBAAA,QAAQ,EAAE,aAAa;AACvB,gBAAA,aAAa,EAAE,KAAK;gBACpB,UAAU,EAAE,aAAa,CAAC,WAAW;gBACrC,WAAW,EAAE,aAAa,CAAC,YAAY;gBACvC,GAAG,IAAI,CAAC,OAAO;aAChB,CAAC;YACF,IAAI,CAAC,eAAe,EAAE,CAAC;AACxB,SAAA;AAAM,aAAA;AACL,YAAA,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,aAAa,CAAC,QAAQ,KAAK,KAAK,EAAE;gBAChE,MAAM,GAAG,GAAG,aAAiC,CAAC;gBAC9C,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;A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