@ng-matero/extensions 12.5.1 → 12.7.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/_all-theme.scss +2 -0
- package/_index.scss +2 -0
- package/_theming.scss +2 -0
- package/bundles/extensions.umd.js +24 -58
- package/bundles/extensions.umd.js.map +1 -1
- package/bundles/mtxAlert.umd.js +3 -3
- package/bundles/mtxButton.umd.js +3 -3
- package/bundles/mtxCheckboxGroup.umd.js +4 -5
- package/bundles/mtxCheckboxGroup.umd.js.map +1 -1
- package/bundles/mtxColorpicker.umd.js +1123 -0
- package/bundles/mtxColorpicker.umd.js.map +1 -0
- package/bundles/mtxColumnResize.umd.js +3 -3
- package/bundles/mtxColumnResize.umd.js.map +1 -1
- package/bundles/mtxCore.umd.js +3 -3
- package/bundles/mtxDatetimepicker.umd.js +611 -156
- package/bundles/mtxDatetimepicker.umd.js.map +1 -1
- package/bundles/mtxDialog.umd.js +4 -6
- package/bundles/mtxDialog.umd.js.map +1 -1
- package/bundles/mtxFormGroup.umd.js +5 -12
- package/bundles/mtxFormGroup.umd.js.map +1 -1
- package/bundles/mtxGrid.umd.js +5 -7
- package/bundles/mtxGrid.umd.js.map +1 -1
- package/bundles/mtxLoader.umd.js +10 -7
- package/bundles/mtxLoader.umd.js.map +1 -1
- package/bundles/mtxPipes.umd.js +3 -3
- package/bundles/mtxPopover.umd.js +3 -3
- package/bundles/mtxPopover.umd.js.map +1 -1
- package/bundles/mtxProgress.umd.js +4 -4
- package/bundles/mtxSelect.umd.js +4 -4
- package/bundles/mtxSelect.umd.js.map +1 -1
- package/bundles/mtxSlider.umd.js +4 -4
- package/bundles/mtxSplit.umd.js +83 -82
- package/bundles/mtxSplit.umd.js.map +1 -1
- package/bundles/mtxText3d.umd.js +4 -12
- package/bundles/mtxText3d.umd.js.map +1 -1
- package/bundles/mtxTooltip.umd.js +10 -5
- package/bundles/mtxTooltip.umd.js.map +1 -1
- package/checkbox-group/checkbox-group.component.d.ts +2 -4
- package/checkbox-group/mtxCheckboxGroup.metadata.json +1 -1
- package/colorpicker/_colorpicker-theme.import.scss +2 -0
- package/colorpicker/_colorpicker-theme.scss +43 -0
- package/colorpicker/colorpicker-animations.d.ts +8 -0
- package/colorpicker/colorpicker-content.scss +4 -0
- package/colorpicker/colorpicker-input.d.ts +89 -0
- package/colorpicker/colorpicker-module.d.ts +2 -0
- package/colorpicker/colorpicker-toggle.d.ts +33 -0
- package/colorpicker/colorpicker-toggle.scss +23 -0
- package/colorpicker/colorpicker.d.ts +126 -0
- package/{color-picker/mtxColorPicker.d.ts → colorpicker/mtxColorpicker.d.ts} +0 -0
- package/colorpicker/mtxColorpicker.metadata.json +1 -0
- package/colorpicker/package.json +11 -0
- package/colorpicker/public-api.d.ts +5 -0
- package/datetimepicker/_datetimepicker-theme.scss +12 -0
- package/datetimepicker/calendar.d.ts +2 -10
- package/datetimepicker/clock.d.ts +10 -9
- package/datetimepicker/datetimepicker-animations.d.ts +7 -5
- package/datetimepicker/datetimepicker-input.d.ts +4 -2
- package/datetimepicker/{datetimepicker.module.d.ts → datetimepicker-module.d.ts} +0 -0
- package/datetimepicker/datetimepicker-toggle.d.ts +15 -2
- package/datetimepicker/datetimepicker-toggle.scss +23 -0
- package/datetimepicker/datetimepicker.d.ts +67 -24
- package/datetimepicker/month-view.d.ts +3 -3
- package/datetimepicker/mtxDatetimepicker.d.ts +0 -2
- package/datetimepicker/mtxDatetimepicker.metadata.json +1 -1
- package/datetimepicker/multi-year-view.d.ts +3 -3
- package/datetimepicker/public-api.d.ts +3 -1
- package/datetimepicker/year-view.d.ts +3 -3
- package/dialog/{dialog.config.d.ts → dialog-config.d.ts} +0 -0
- package/dialog/dialog.component.d.ts +1 -1
- package/dialog/dialog.d.ts +1 -1
- package/dialog/mtxDialog.metadata.json +1 -1
- package/dialog/public-api.d.ts +2 -2
- package/esm2015/checkbox-group/checkbox-group.component.js +2 -3
- package/esm2015/colorpicker/colorpicker-animations.js +16 -0
- package/esm2015/colorpicker/colorpicker-input.js +228 -0
- package/esm2015/colorpicker/colorpicker-module.js +41 -0
- package/esm2015/colorpicker/colorpicker-toggle.js +97 -0
- package/esm2015/colorpicker/colorpicker.js +372 -0
- package/esm2015/colorpicker/mtxColorpicker.js +5 -0
- package/esm2015/colorpicker/public-api.js +6 -0
- package/esm2015/column-resize/event-dispatcher.js +1 -1
- package/esm2015/datetimepicker/calendar-body.js +2 -1
- package/esm2015/datetimepicker/calendar.js +17 -32
- package/esm2015/datetimepicker/clock.js +10 -10
- package/esm2015/datetimepicker/datetimepicker-animations.js +38 -24
- package/esm2015/datetimepicker/datetimepicker-input.js +7 -4
- package/esm2015/datetimepicker/datetimepicker-module.js +52 -0
- package/esm2015/datetimepicker/datetimepicker-toggle.js +30 -8
- package/esm2015/datetimepicker/datetimepicker.js +150 -71
- package/esm2015/datetimepicker/month-view.js +8 -7
- package/esm2015/datetimepicker/mtxDatetimepicker.js +1 -3
- package/esm2015/datetimepicker/multi-year-view.js +8 -7
- package/esm2015/datetimepicker/public-api.js +4 -2
- package/esm2015/datetimepicker/year-view.js +8 -7
- package/esm2015/dialog/{dialog.config.js → dialog-config.js} +1 -1
- package/esm2015/dialog/dialog.component.js +2 -2
- package/esm2015/dialog/dialog.js +1 -1
- package/esm2015/dialog/public-api.js +3 -3
- package/esm2015/extensions.module.js +3 -3
- package/esm2015/form-group/form-group.component.js +4 -11
- package/esm2015/loader/loader.component.js +8 -5
- package/esm2015/popover/popover.js +1 -1
- package/esm2015/progress/progress.component.js +1 -1
- package/esm2015/public-api.js +2 -2
- package/esm2015/select/select.component.js +2 -2
- package/esm2015/slider/slider.js +1 -1
- package/esm2015/split/interface.js +1 -1
- package/esm2015/split/split.component.js +15 -11
- package/esm2015/split/utils.js +1 -6
- package/esm2015/text3d/text3d.component.js +2 -10
- package/esm2015/tooltip/tooltip.js +8 -3
- package/extensions.metadata.json +1 -1
- package/fesm2015/extensions.js +3 -3
- package/fesm2015/extensions.js.map +1 -1
- package/fesm2015/mtxCheckboxGroup.js +1 -2
- package/fesm2015/mtxCheckboxGroup.js.map +1 -1
- package/fesm2015/mtxColorpicker.js +743 -0
- package/fesm2015/mtxColorpicker.js.map +1 -0
- package/fesm2015/mtxColumnResize.js.map +1 -1
- package/fesm2015/mtxDatetimepicker.js +266 -153
- package/fesm2015/mtxDatetimepicker.js.map +1 -1
- package/fesm2015/mtxDialog.js +2 -2
- package/fesm2015/mtxDialog.js.map +1 -1
- package/fesm2015/mtxFormGroup.js +3 -10
- package/fesm2015/mtxFormGroup.js.map +1 -1
- package/fesm2015/mtxLoader.js +7 -4
- package/fesm2015/mtxLoader.js.map +1 -1
- package/fesm2015/mtxPopover.js.map +1 -1
- package/fesm2015/mtxProgress.js +1 -1
- package/fesm2015/mtxSelect.js +1 -1
- package/fesm2015/mtxSelect.js.map +1 -1
- package/fesm2015/mtxSlider.js +1 -1
- package/fesm2015/mtxSplit.js +14 -15
- package/fesm2015/mtxSplit.js.map +1 -1
- package/fesm2015/mtxText3d.js +1 -9
- package/fesm2015/mtxText3d.js.map +1 -1
- package/fesm2015/mtxTooltip.js +7 -2
- package/fesm2015/mtxTooltip.js.map +1 -1
- package/form-group/form-group.component.d.ts +2 -4
- package/form-group/mtxFormGroup.metadata.json +1 -1
- package/loader/loader.component.d.ts +4 -1
- package/loader/mtxLoader.metadata.json +1 -1
- package/package.json +2 -2
- package/popover/popover.d.ts +3 -3
- package/progress/mtxProgress.metadata.json +1 -1
- package/public-api.d.ts +1 -1
- package/select/mtxSelect.metadata.json +1 -1
- package/select/select.component.d.ts +1 -1
- package/slider/_slider-theme.scss +1 -1
- package/slider/mtxSlider.metadata.json +1 -1
- package/slider/slider.scss +1 -0
- package/split/_split-theme.scss +9 -2
- package/split/interface.d.ts +1 -2
- package/split/mtxSplit.metadata.json +1 -1
- package/split/split.component.d.ts +9 -1
- package/text3d/mtxText3d.metadata.json +1 -1
- package/text3d/text3d.component.d.ts +0 -1
- package/tooltip/mtxTooltip.metadata.json +1 -1
- package/bundles/mtxColorPicker.umd.js +0 -337
- package/bundles/mtxColorPicker.umd.js.map +0 -1
- package/color-picker/color-picker.component.d.ts +0 -120
- package/color-picker/color-picker.module.d.ts +0 -2
- package/color-picker/mtxColorPicker.metadata.json +0 -1
- package/color-picker/package.json +0 -11
- package/color-picker/public-api.d.ts +0 -2
- package/esm2015/color-picker/color-picker.component.js +0 -268
- package/esm2015/color-picker/color-picker.module.js +0 -26
- package/esm2015/color-picker/mtxColorPicker.js +0 -5
- package/esm2015/color-picker/public-api.js +0 -3
- package/esm2015/datetimepicker/datetimepicker.module.js +0 -49
- package/fesm2015/mtxColorPicker.js +0 -295
- package/fesm2015/mtxColorPicker.js.map +0 -1
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { ChangeDetectorRef, Renderer2, AfterViewInit, OnDestroy, ElementRef, NgZone, EventEmitter } from '@angular/core';
|
|
2
|
+
import { CanColor } from '@angular/material/core';
|
|
2
3
|
import { Observable } from 'rxjs';
|
|
3
4
|
import { MtxSplitArea, MtxSplitOutputData, MtxSplitOutputAreaSizes } from './interface';
|
|
4
5
|
import { MtxSplitPaneDirective } from './split-pane.directive';
|
|
6
|
+
/** @docs-private */
|
|
7
|
+
declare const _MtxSplitComponentBase: import("@angular/material/core/common-behaviors/constructor").Constructor<CanColor> & import("@angular/material/core/common-behaviors/constructor").AbstractConstructor<CanColor> & {
|
|
8
|
+
new (_elementRef: ElementRef): {
|
|
9
|
+
_elementRef: ElementRef;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
5
12
|
/**
|
|
6
13
|
* mtx-split
|
|
7
14
|
*
|
|
@@ -31,7 +38,7 @@ import { MtxSplitPaneDirective } from './split-pane.directive';
|
|
|
31
38
|
* 800px <-- el.getBoundingClientRect().width
|
|
32
39
|
*
|
|
33
40
|
*/
|
|
34
|
-
export declare class MtxSplitComponent implements AfterViewInit, OnDestroy {
|
|
41
|
+
export declare class MtxSplitComponent extends _MtxSplitComponentBase implements AfterViewInit, OnDestroy, CanColor {
|
|
35
42
|
private ngZone;
|
|
36
43
|
private elRef;
|
|
37
44
|
private cdRef;
|
|
@@ -99,3 +106,4 @@ export declare class MtxSplitComponent implements AfterViewInit, OnDestroy {
|
|
|
99
106
|
notify(type: 'start' | 'progress' | 'end' | 'click' | 'dblclick' | 'transitionEnd', gutterNum: number): void;
|
|
100
107
|
ngOnDestroy(): void;
|
|
101
108
|
}
|
|
109
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"MtxText3dModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":6,"character":12}],"exports":[{"__symbolic":"reference","name":"MtxText3dComponent"}],"declarations":[{"__symbolic":"reference","name":"MtxText3dComponent"}]}]}],"members":{}},"MtxText3dComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":9,"character":1},"arguments":[{"selector":"mtx-text3d","exportAs":"mtxText3d","host":{"class":"mtx-text3d","[style.transform]":"transform","$quoted$":["class","[style.transform]"]},"encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":18,"character":17},"member":"None"},"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":19,"character":19},"member":"OnPush"},"template":"<span class=\"mtx-text3d-layer\" *ngFor=\"let i of depthArr\"\n [ngStyle]=\"{'z-index': -i, 'transform': 'translate3d(0, 0,'+ -i + 'px)'}\">\n {{text}}\n <ng-container [ngTemplateOutlet]=\"template\"></ng-container>\n</span>\n","styles":[".mtx-text3d{display:block;transform-style:preserve-3d
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"MtxText3dModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":5,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":6,"character":12}],"exports":[{"__symbolic":"reference","name":"MtxText3dComponent"}],"declarations":[{"__symbolic":"reference","name":"MtxText3dComponent"}]}]}],"members":{}},"MtxText3dComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":9,"character":1},"arguments":[{"selector":"mtx-text3d","exportAs":"mtxText3d","host":{"class":"mtx-text3d","[style.transform]":"transform","$quoted$":["class","[style.transform]"]},"encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":18,"character":17},"member":"None"},"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":19,"character":19},"member":"OnPush"},"template":"<span class=\"mtx-text3d-layer\" *ngFor=\"let i of depthArr\"\n [ngStyle]=\"{'z-index': -i, 'transform': 'translate3d(0, 0,'+ -i + 'px)'}\">\n {{text}}\n <ng-container [ngTemplateOutlet]=\"template\"></ng-container>\n</span>\n","styles":[".mtx-text3d{display:block;transform-style:preserve-3d;animation:rotate 5s ease infinite;font-weight:bold}.mtx-text3d .mtx-text3d-layer{display:block;text-align:center;font-size:10rem}.mtx-text3d .mtx-text3d-layer:not(:first-child){position:absolute;top:0;left:0%;right:0%;margin:auto;transform-style:preserve-3d}\n"]}]}],"members":{"template":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ContentChild","line":22,"character":3},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"TemplateRef","line":22,"character":16},{"static":false}]}]}],"text":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":24,"character":3}}]}],"depth":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":26,"character":3}}]}],"rotateX":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":28,"character":3}}]}],"rotateY":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":29,"character":3}}]}],"rotateZ":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":30,"character":3}}]}]}}},"origins":{"MtxText3dModule":"./text3d.module","MtxText3dComponent":"./text3d.component"},"importAs":"@ng-matero/extensions/text3d"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"MtxTooltipModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/cdk/a11y","name":"A11yModule","line":13,"character":12},{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":13,"character":24},{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"OverlayModule","line":13,"character":38},{"__symbolic":"reference","module":"@angular/material/core","name":"MatCommonModule","line":13,"character":53}],"exports":[{"__symbolic":"reference","name":"MtxTooltip"},{"__symbolic":"reference","name":"TooltipComponent"},{"__symbolic":"reference","module":"@angular/material/core","name":"MatCommonModule","line":14,"character":42},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"CdkScrollableModule","line":14,"character":59}],"declarations":[{"__symbolic":"reference","name":"MtxTooltip"},{"__symbolic":"reference","name":"TooltipComponent"}],"entryComponents":[{"__symbolic":"reference","name":"TooltipComponent"}],"providers":[{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER"}]}]}],"members":{}},"TooltipPosition":{"__symbolic":"interface"},"TooltipTouchGestures":{"__symbolic":"interface"},"TooltipVisibility":{"__symbolic":"interface"},"SCROLL_THROTTLE_MS":20,"TOOLTIP_PANEL_CLASS":"mtx-tooltip-panel","getMtxTooltipInvalidPositionError":{"__symbolic":"function","parameters":["position"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Error"},"arguments":[{"__symbolic":"binop","operator":"+","left":{"__symbolic":"binop","operator":"+","left":"Tooltip position \"","right":{"__symbolic":"reference","name":"position"}},"right":"\" is invalid."}]}},"MTX_TOOLTIP_SCROLL_STRATEGY":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":77,"character":47},"arguments":["mtx-tooltip-scroll-strategy"]},"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY":{"__symbolic":"function","parameters":["overlay"],"value":{"__symbolic":"error","message":"Lambda not supported","line":83,"character":9,"module":"./tooltip"}},"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER":{"provide":{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY"},"deps":[{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"Overlay","line":89,"character":9}],"useFactory":{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY"}},"MtxTooltipDefaultOptions":{"__symbolic":"interface"},"MTX_TOOLTIP_DEFAULT_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":103,"character":47},"arguments":["mtx-tooltip-default-options",{"providedIn":"root","factory":{"__symbolic":"reference","name":"MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY"}}]},"MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY":{"__symbolic":"function","parameters":[],"value":{"showDelay":0,"hideDelay":0,"touchendHideDelay":1500}},"MtxTooltip":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":126,"character":1},"arguments":[{"selector":"[mtxTooltip]","exportAs":"mtxTooltip","host":{"class":"mtx-tooltip-trigger"}}]}],"members":{"position":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":146,"character":3},"arguments":["mtxTooltipPosition"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":167,"character":3},"arguments":["mtxTooltipDisabled"]}]}],"showDelay":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":183,"character":3},"arguments":["mtxTooltipShowDelay"]}]}],"hideDelay":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":186,"character":3},"arguments":["mtxTooltipHideDelay"]}]}],"touchGestures":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":202,"character":3},"arguments":["mtxTooltipTouchGestures"]}]}],"message":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":205,"character":3},"arguments":["mtxTooltip"]}]}],"tooltipClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":235,"character":3},"arguments":["mtxTooltipClass"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":267,"character":5},"arguments":[{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":268,"character":5}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":269,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":270,"character":5},"arguments":[{"__symbolic":"reference","name":"MTX_TOOLTIP_DEFAULT_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"Overlay","line":259,"character":22},{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":260,"character":36,"context":{"typeName":"HTMLElement"},"module":"./tooltip"}]},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"ScrollDispatcher","line":261,"character":31},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":262,"character":31},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":263,"character":21},{"__symbolic":"reference","module":"@angular/cdk/platform","name":"Platform","line":264,"character":23},{"__symbolic":"reference","module":"@angular/cdk/a11y","name":"AriaDescriber","line":265,"character":28},{"__symbolic":"reference","module":"@angular/cdk/a11y","name":"FocusMonitor","line":266,"character":27},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/cdk/bidi","name":"Directionality","line":268,"character":30},{"__symbolic":"reference","name":"any"}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}],"_isTooltipVisible":[{"__symbolic":"method"}],"_createOverlay":[{"__symbolic":"method"}],"_detach":[{"__symbolic":"method"}],"_updatePosition":[{"__symbolic":"method"}],"_getOrigin":[{"__symbolic":"method"}],"_getOverlayPosition":[{"__symbolic":"method"}],"_updateTooltipMessage":[{"__symbolic":"method"}],"_setTooltipClass":[{"__symbolic":"method"}],"_invertPosition":[{"__symbolic":"method"}],"_setupPointerEnterEventsIfNeeded":[{"__symbolic":"method"}],"_setupPointerExitEventsIfNeeded":[{"__symbolic":"method"}],"_addListeners":[{"__symbolic":"method"}],"_platformSupportsMouseEvents":[{"__symbolic":"method"}],"_disableNativeGesturesIfNecessary":[{"__symbolic":"method"}]}},"TooltipComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":682,"character":1},"arguments":[{"selector":"mtx-tooltip-component","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":686,"character":17},"member":"None"},"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":687,"character":19},"member":"OnPush"},"animations":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"mtxTooltipAnimations"},"member":"tooltipState"}],"host":{"[style.zoom]":"_visibility === \"visible\" ? 1 : null","(body:click)":"this._handleBodyInteraction()","aria-hidden":"true","$quoted$":["[style.zoom]","(body:click)","aria-hidden"]},"template":"<div class=\"mtx-tooltip\"\n [ngClass]=\"tooltipClass\"\n [class.mtx-tooltip-handset]=\"(_isHandset | async)?.matches\"\n [@state]=\"_visibility\"\n (@state.start)=\"_animationStart()\"\n (@state.done)=\"_animationDone($event)\">\n <ng-template [ngIf]=\"_isTemplateRef(message)\" [ngIfElse]=\"msgStrTpl\">\n <ng-template [ngTemplateOutlet]=\"$any(message)\"></ng-template>\n </ng-template>\n <ng-template #msgStrTpl>{{message}}</ng-template>\n</div>\n","styles":[".mtx-tooltip-panel{pointer-events:none!important}.mtx-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mtx-tooltip{outline:solid 1px}.mtx-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"]}]}],"members":{"_isTemplateRef":[{"__symbolic":"method"}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":727,"character":32},{"__symbolic":"reference","module":"@angular/cdk/layout","name":"BreakpointObserver","line":728,"character":33}]}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"afterHidden":[{"__symbolic":"method"}],"isVisible":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_animationStart":[{"__symbolic":"method"}],"_animationDone":[{"__symbolic":"method"}],"_handleBodyInteraction":[{"__symbolic":"method"}],"_markForCheck":[{"__symbolic":"method"}]}},"mtxTooltipAnimations":{"tooltipState":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger","line":18,"character":16},"arguments":["state",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":19,"character":4},"arguments":["initial, void, hidden",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":19,"character":35},"arguments":[{"opacity":0,"transform":"scale(0)"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":20,"character":4},"arguments":["visible",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":20,"character":21},"arguments":[{"transform":"scale(1)"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":21,"character":4},"arguments":["* => visible",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":23,"character":6},"arguments":["200ms cubic-bezier(0, 0, 0.2, 1)",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"keyframes","line":25,"character":8},"arguments":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":26,"character":10},"arguments":[{"opacity":0,"transform":"scale(0)","offset":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":27,"character":10},"arguments":[{"opacity":0.5,"transform":"scale(0.99)","offset":0.5}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":28,"character":10},"arguments":[{"opacity":1,"transform":"scale(1)","offset":1}]}]]}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":32,"character":4},"arguments":["* => hidden",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":32,"character":30},"arguments":["100ms cubic-bezier(0, 0, 0.2, 1)",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":32,"character":74},"arguments":[{"opacity":0}]}]}]}]]}}},"origins":{"MtxTooltipModule":"./tooltip-module","TooltipPosition":"./tooltip","TooltipTouchGestures":"./tooltip","TooltipVisibility":"./tooltip","SCROLL_THROTTLE_MS":"./tooltip","TOOLTIP_PANEL_CLASS":"./tooltip","getMtxTooltipInvalidPositionError":"./tooltip","MTX_TOOLTIP_SCROLL_STRATEGY":"./tooltip","MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY":"./tooltip","MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER":"./tooltip","MtxTooltipDefaultOptions":"./tooltip","MTX_TOOLTIP_DEFAULT_OPTIONS":"./tooltip","MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY":"./tooltip","MtxTooltip":"./tooltip","TooltipComponent":"./tooltip","mtxTooltipAnimations":"./tooltip-animations"},"importAs":"@ng-matero/extensions/tooltip"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"MtxTooltipModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{"imports":[{"__symbolic":"reference","module":"@angular/cdk/a11y","name":"A11yModule","line":13,"character":12},{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":13,"character":24},{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"OverlayModule","line":13,"character":38},{"__symbolic":"reference","module":"@angular/material/core","name":"MatCommonModule","line":13,"character":53}],"exports":[{"__symbolic":"reference","name":"MtxTooltip"},{"__symbolic":"reference","name":"TooltipComponent"},{"__symbolic":"reference","module":"@angular/material/core","name":"MatCommonModule","line":14,"character":42},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"CdkScrollableModule","line":14,"character":59}],"declarations":[{"__symbolic":"reference","name":"MtxTooltip"},{"__symbolic":"reference","name":"TooltipComponent"}],"entryComponents":[{"__symbolic":"reference","name":"TooltipComponent"}],"providers":[{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER"}]}]}],"members":{}},"TooltipPosition":{"__symbolic":"interface"},"TooltipTouchGestures":{"__symbolic":"interface"},"TooltipVisibility":{"__symbolic":"interface"},"SCROLL_THROTTLE_MS":20,"TOOLTIP_PANEL_CLASS":"mtx-tooltip-panel","getMtxTooltipInvalidPositionError":{"__symbolic":"function","parameters":["position"],"value":{"__symbolic":"call","expression":{"__symbolic":"reference","name":"Error"},"arguments":[{"__symbolic":"binop","operator":"+","left":{"__symbolic":"binop","operator":"+","left":"Tooltip position \"","right":{"__symbolic":"reference","name":"position"}},"right":"\" is invalid."}]}},"MTX_TOOLTIP_SCROLL_STRATEGY":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":77,"character":47},"arguments":["mtx-tooltip-scroll-strategy"]},"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY":{"__symbolic":"function","parameters":["overlay"],"value":{"__symbolic":"error","message":"Lambda not supported","line":83,"character":9,"module":"./tooltip"}},"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER":{"provide":{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY"},"deps":[{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"Overlay","line":89,"character":9}],"useFactory":{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY"}},"MtxTooltipDefaultOptions":{"__symbolic":"interface"},"MTX_TOOLTIP_DEFAULT_OPTIONS":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":103,"character":47},"arguments":["mtx-tooltip-default-options",{"providedIn":"root","factory":{"__symbolic":"reference","name":"MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY"}}]},"MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY":{"__symbolic":"function","parameters":[],"value":{"showDelay":0,"hideDelay":0,"touchendHideDelay":1500}},"MtxTooltip":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":126,"character":1},"arguments":[{"selector":"[mtxTooltip]","exportAs":"mtxTooltip","host":{"class":"mtx-tooltip-trigger"}}]}],"members":{"position":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":146,"character":3},"arguments":["mtxTooltipPosition"]}]}],"disabled":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":167,"character":3},"arguments":["mtxTooltipDisabled"]}]}],"showDelay":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":183,"character":3},"arguments":["mtxTooltipShowDelay"]}]}],"hideDelay":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":186,"character":3},"arguments":["mtxTooltipHideDelay"]}]}],"touchGestures":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":202,"character":3},"arguments":["mtxTooltipTouchGestures"]}]}],"message":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":205,"character":3},"arguments":["mtxTooltip"]}]}],"tooltipClass":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":235,"character":3},"arguments":["mtxTooltipClass"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,null,null,null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":265,"character":5},"arguments":[{"__symbolic":"reference","name":"MTX_TOOLTIP_SCROLL_STRATEGY"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":266,"character":5}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":267,"character":5}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":268,"character":5},"arguments":[{"__symbolic":"reference","name":"MTX_TOOLTIP_DEFAULT_OPTIONS"}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/cdk/overlay","name":"Overlay","line":257,"character":22},{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":258,"character":36,"context":{"typeName":"HTMLElement"},"module":"./tooltip"}]},{"__symbolic":"reference","module":"@angular/cdk/scrolling","name":"ScrollDispatcher","line":259,"character":31},{"__symbolic":"reference","module":"@angular/core","name":"ViewContainerRef","line":260,"character":31},{"__symbolic":"reference","module":"@angular/core","name":"NgZone","line":261,"character":21},{"__symbolic":"reference","module":"@angular/cdk/platform","name":"Platform","line":262,"character":23},{"__symbolic":"reference","module":"@angular/cdk/a11y","name":"AriaDescriber","line":263,"character":28},{"__symbolic":"reference","module":"@angular/cdk/a11y","name":"FocusMonitor","line":264,"character":27},{"__symbolic":"reference","name":"any"},{"__symbolic":"reference","module":"@angular/cdk/bidi","name":"Directionality","line":266,"character":30},{"__symbolic":"reference","name":"any"}]}],"ngAfterViewInit":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"toggle":[{"__symbolic":"method"}],"_isTooltipVisible":[{"__symbolic":"method"}],"_createOverlay":[{"__symbolic":"method"}],"_detach":[{"__symbolic":"method"}],"_updatePosition":[{"__symbolic":"method"}],"_getOrigin":[{"__symbolic":"method"}],"_getOverlayPosition":[{"__symbolic":"method"}],"_updateTooltipMessage":[{"__symbolic":"method"}],"_setTooltipClass":[{"__symbolic":"method"}],"_invertPosition":[{"__symbolic":"method"}],"_setupPointerEnterEventsIfNeeded":[{"__symbolic":"method"}],"_setupPointerExitEventsIfNeeded":[{"__symbolic":"method"}],"_addListeners":[{"__symbolic":"method"}],"_platformSupportsMouseEvents":[{"__symbolic":"method"}],"_disableNativeGesturesIfNecessary":[{"__symbolic":"method"}]}},"TooltipComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":685,"character":1},"arguments":[{"selector":"mtx-tooltip-component","encapsulation":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewEncapsulation","line":689,"character":17},"member":"None"},"changeDetection":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectionStrategy","line":690,"character":19},"member":"OnPush"},"animations":[{"__symbolic":"select","expression":{"__symbolic":"reference","name":"mtxTooltipAnimations"},"member":"tooltipState"}],"host":{"[style.zoom]":"_visibility === \"visible\" ? 1 : null","(body:click)":"this._handleBodyInteraction()","aria-hidden":"true","$quoted$":["[style.zoom]","(body:click)","aria-hidden"]},"template":"<div class=\"mtx-tooltip\"\n [ngClass]=\"tooltipClass\"\n [class.mtx-tooltip-handset]=\"(_isHandset | async)?.matches\"\n [@state]=\"_visibility\"\n (@state.start)=\"_animationStart()\"\n (@state.done)=\"_animationDone($event)\">\n <ng-template [ngIf]=\"_isTemplateRef(message)\" [ngIfElse]=\"msgStrTpl\">\n <ng-template [ngTemplateOutlet]=\"$any(message)\"></ng-template>\n </ng-template>\n <ng-template #msgStrTpl>{{message}}</ng-template>\n</div>\n","styles":[".mtx-tooltip-panel{pointer-events:none!important}.mtx-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mtx-tooltip{outline:solid 1px}.mtx-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"]}]}],"members":{"_isTemplateRef":[{"__symbolic":"method"}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":730,"character":32},{"__symbolic":"reference","module":"@angular/cdk/layout","name":"BreakpointObserver","line":731,"character":33}]}],"show":[{"__symbolic":"method"}],"hide":[{"__symbolic":"method"}],"afterHidden":[{"__symbolic":"method"}],"isVisible":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_animationStart":[{"__symbolic":"method"}],"_animationDone":[{"__symbolic":"method"}],"_handleBodyInteraction":[{"__symbolic":"method"}],"_markForCheck":[{"__symbolic":"method"}]}},"mtxTooltipAnimations":{"tooltipState":{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"trigger","line":18,"character":16},"arguments":["state",[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":19,"character":4},"arguments":["initial, void, hidden",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":19,"character":35},"arguments":[{"opacity":0,"transform":"scale(0)"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"state","line":20,"character":4},"arguments":["visible",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":20,"character":21},"arguments":[{"transform":"scale(1)"}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":21,"character":4},"arguments":["* => visible",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":23,"character":6},"arguments":["200ms cubic-bezier(0, 0, 0.2, 1)",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"keyframes","line":25,"character":8},"arguments":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":26,"character":10},"arguments":[{"opacity":0,"transform":"scale(0)","offset":0}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":27,"character":10},"arguments":[{"opacity":0.5,"transform":"scale(0.99)","offset":0.5}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":28,"character":10},"arguments":[{"opacity":1,"transform":"scale(1)","offset":1}]}]]}]}]},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"transition","line":32,"character":4},"arguments":["* => hidden",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"animate","line":32,"character":30},"arguments":["100ms cubic-bezier(0, 0, 0.2, 1)",{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/animations","name":"style","line":32,"character":74},"arguments":[{"opacity":0}]}]}]}]]}}},"origins":{"MtxTooltipModule":"./tooltip-module","TooltipPosition":"./tooltip","TooltipTouchGestures":"./tooltip","TooltipVisibility":"./tooltip","SCROLL_THROTTLE_MS":"./tooltip","TOOLTIP_PANEL_CLASS":"./tooltip","getMtxTooltipInvalidPositionError":"./tooltip","MTX_TOOLTIP_SCROLL_STRATEGY":"./tooltip","MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY":"./tooltip","MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER":"./tooltip","MtxTooltipDefaultOptions":"./tooltip","MTX_TOOLTIP_DEFAULT_OPTIONS":"./tooltip","MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY":"./tooltip","MtxTooltip":"./tooltip","TooltipComponent":"./tooltip","mtxTooltipAnimations":"./tooltip-animations"},"importAs":"@ng-matero/extensions/tooltip"}
|
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/menu'), require('@angular/material/form-field'), require('@angular/material/input'), require('ngx-color/chrome'), require('@angular/cdk/a11y'), require('@angular/cdk/coercion'), require('@angular/cdk/platform'), require('rxjs'), require('rxjs/operators')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@ng-matero/extensions/color-picker', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/menu', '@angular/material/form-field', '@angular/material/input', 'ngx-color/chrome', '@angular/cdk/a11y', '@angular/cdk/coercion', '@angular/cdk/platform', 'rxjs', 'rxjs/operators'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['ng-matero'] = global['ng-matero'] || {}, global['ng-matero'].extensions = global['ng-matero'].extensions || {}, global['ng-matero'].extensions['color-picker'] = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.menu, global.ng.material.formField, global.ng.material.input, global['ngx-color-chrome'], global.ng.cdk.a11y, global.ng.cdk.coercion, global.ng.cdk.platform, global.rxjs, global.rxjs.operators));
|
|
5
|
-
}(this, (function (exports, core, common, forms, menu, formField, input, chrome, a11y, coercion, platform, rxjs, operators) { 'use strict';
|
|
6
|
-
|
|
7
|
-
var nextUniqueId = 0;
|
|
8
|
-
var MtxColorPickerComponent = /** @class */ (function () {
|
|
9
|
-
function MtxColorPickerComponent(_focusMonitor, _elementRef, _changeDetectorRef, _zone, ngControl, _formField, _document) {
|
|
10
|
-
var _this = this;
|
|
11
|
-
this._focusMonitor = _focusMonitor;
|
|
12
|
-
this._elementRef = _elementRef;
|
|
13
|
-
this._changeDetectorRef = _changeDetectorRef;
|
|
14
|
-
this._zone = _zone;
|
|
15
|
-
this.ngControl = ngControl;
|
|
16
|
-
this._formField = _formField;
|
|
17
|
-
this._document = _document;
|
|
18
|
-
this._value = '';
|
|
19
|
-
/** Implemented as part of MatFormFieldControl. */
|
|
20
|
-
this.stateChanges = new rxjs.Subject();
|
|
21
|
-
/** Unique id for this input. */
|
|
22
|
-
this._uid = "mtx-color-picker-" + nextUniqueId++;
|
|
23
|
-
this._focused = false;
|
|
24
|
-
this._required = false;
|
|
25
|
-
this._disabled = false;
|
|
26
|
-
this._readonly = false;
|
|
27
|
-
this.errorState = false;
|
|
28
|
-
/** A name for this control that can be used by `mat-form-field`. */
|
|
29
|
-
this.controlType = 'mtx-color-picker';
|
|
30
|
-
/** `View -> model callback called when value changes` */
|
|
31
|
-
this._onChange = function () { };
|
|
32
|
-
/** `View -> model callback called when color picker has been touched` */
|
|
33
|
-
this._onTouched = function () { };
|
|
34
|
-
/** Event emitted when the color changed */
|
|
35
|
-
this.colorChange = new core.EventEmitter();
|
|
36
|
-
/** Whether or not the overlay panel is open. */
|
|
37
|
-
this._panelOpen = false;
|
|
38
|
-
/**
|
|
39
|
-
* Whether the color picker can open the next time it is focused. Used to prevent a focused,
|
|
40
|
-
* closed color picker from being reopened if the user switches to another browser tab and then
|
|
41
|
-
* comes back.
|
|
42
|
-
*/
|
|
43
|
-
this._canOpenOnNextFocus = true;
|
|
44
|
-
/**
|
|
45
|
-
* Event handler for when the window is blurred. Needs to be an
|
|
46
|
-
* arrow function in order to preserve the context.
|
|
47
|
-
*/
|
|
48
|
-
this._windowBlurHandler = function () {
|
|
49
|
-
// If the user blurred the window while the color picker is focused, it means that it'll be
|
|
50
|
-
// refocused when they come back. In this case we want to skip the first focus event, if the
|
|
51
|
-
// pane was closed, in order to avoid reopening it unintentionally.
|
|
52
|
-
_this._canOpenOnNextFocus =
|
|
53
|
-
_this._document.activeElement !== _this._elementRef.nativeElement || _this._panelOpen;
|
|
54
|
-
};
|
|
55
|
-
_focusMonitor.monitor(_elementRef, true).subscribe(function (origin) {
|
|
56
|
-
if (_this._focused && !origin) {
|
|
57
|
-
_this._onTouched();
|
|
58
|
-
}
|
|
59
|
-
_this._focused = !!origin;
|
|
60
|
-
_this.stateChanges.next();
|
|
61
|
-
});
|
|
62
|
-
if (this.ngControl != null) {
|
|
63
|
-
this.ngControl.valueAccessor = this;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
Object.defineProperty(MtxColorPickerComponent.prototype, "value", {
|
|
67
|
-
/** Value of the color picker control. */
|
|
68
|
-
get: function () {
|
|
69
|
-
return this._value;
|
|
70
|
-
},
|
|
71
|
-
set: function (newValue) {
|
|
72
|
-
this._value = newValue;
|
|
73
|
-
this._onChange(newValue);
|
|
74
|
-
this.stateChanges.next();
|
|
75
|
-
},
|
|
76
|
-
enumerable: false,
|
|
77
|
-
configurable: true
|
|
78
|
-
});
|
|
79
|
-
Object.defineProperty(MtxColorPickerComponent.prototype, "id", {
|
|
80
|
-
/** Unique id of the element. */
|
|
81
|
-
get: function () {
|
|
82
|
-
return this._id;
|
|
83
|
-
},
|
|
84
|
-
set: function (value) {
|
|
85
|
-
this._id = value || this._uid;
|
|
86
|
-
this.stateChanges.next();
|
|
87
|
-
},
|
|
88
|
-
enumerable: false,
|
|
89
|
-
configurable: true
|
|
90
|
-
});
|
|
91
|
-
Object.defineProperty(MtxColorPickerComponent.prototype, "placeholder", {
|
|
92
|
-
/** Placeholder to be shown if value is empty. */
|
|
93
|
-
get: function () {
|
|
94
|
-
return this._placeholder;
|
|
95
|
-
},
|
|
96
|
-
set: function (value) {
|
|
97
|
-
this._placeholder = value;
|
|
98
|
-
this.stateChanges.next();
|
|
99
|
-
},
|
|
100
|
-
enumerable: false,
|
|
101
|
-
configurable: true
|
|
102
|
-
});
|
|
103
|
-
Object.defineProperty(MtxColorPickerComponent.prototype, "focused", {
|
|
104
|
-
/** Whether the input is focused. */
|
|
105
|
-
get: function () {
|
|
106
|
-
return this._focused || this._panelOpen;
|
|
107
|
-
},
|
|
108
|
-
enumerable: false,
|
|
109
|
-
configurable: true
|
|
110
|
-
});
|
|
111
|
-
Object.defineProperty(MtxColorPickerComponent.prototype, "empty", {
|
|
112
|
-
get: function () {
|
|
113
|
-
return !this.value;
|
|
114
|
-
},
|
|
115
|
-
enumerable: false,
|
|
116
|
-
configurable: true
|
|
117
|
-
});
|
|
118
|
-
Object.defineProperty(MtxColorPickerComponent.prototype, "shouldLabelFloat", {
|
|
119
|
-
get: function () {
|
|
120
|
-
return this.focused || !this.empty;
|
|
121
|
-
},
|
|
122
|
-
enumerable: false,
|
|
123
|
-
configurable: true
|
|
124
|
-
});
|
|
125
|
-
Object.defineProperty(MtxColorPickerComponent.prototype, "required", {
|
|
126
|
-
get: function () {
|
|
127
|
-
return this._required;
|
|
128
|
-
},
|
|
129
|
-
set: function (value) {
|
|
130
|
-
this._required = coercion.coerceBooleanProperty(value);
|
|
131
|
-
this.stateChanges.next();
|
|
132
|
-
},
|
|
133
|
-
enumerable: false,
|
|
134
|
-
configurable: true
|
|
135
|
-
});
|
|
136
|
-
Object.defineProperty(MtxColorPickerComponent.prototype, "disabled", {
|
|
137
|
-
get: function () {
|
|
138
|
-
return this._disabled;
|
|
139
|
-
},
|
|
140
|
-
set: function (value) {
|
|
141
|
-
this._disabled = coercion.coerceBooleanProperty(value);
|
|
142
|
-
this.stateChanges.next();
|
|
143
|
-
},
|
|
144
|
-
enumerable: false,
|
|
145
|
-
configurable: true
|
|
146
|
-
});
|
|
147
|
-
Object.defineProperty(MtxColorPickerComponent.prototype, "readonly", {
|
|
148
|
-
/** Whether the element is readonly. */
|
|
149
|
-
get: function () {
|
|
150
|
-
return this._readonly;
|
|
151
|
-
},
|
|
152
|
-
set: function (value) {
|
|
153
|
-
this._readonly = coercion.coerceBooleanProperty(value);
|
|
154
|
-
},
|
|
155
|
-
enumerable: false,
|
|
156
|
-
configurable: true
|
|
157
|
-
});
|
|
158
|
-
MtxColorPickerComponent.prototype.ngDoCheck = function () {
|
|
159
|
-
if (this.ngControl) {
|
|
160
|
-
this.errorState = (this.ngControl.invalid && this.ngControl.touched);
|
|
161
|
-
this.stateChanges.next();
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
MtxColorPickerComponent.prototype.ngAfterViewInit = function () {
|
|
165
|
-
var _this = this;
|
|
166
|
-
if (typeof window !== 'undefined') {
|
|
167
|
-
this._zone.runOutsideAngular(function () {
|
|
168
|
-
window.addEventListener('blur', _this._windowBlurHandler);
|
|
169
|
-
});
|
|
170
|
-
if (platform._supportsShadowDom()) {
|
|
171
|
-
var element = this._elementRef.nativeElement;
|
|
172
|
-
var rootNode = element.getRootNode ? element.getRootNode() : null;
|
|
173
|
-
// We need to take the `ShadowRoot` off of `window`, because the built-in types are
|
|
174
|
-
// incorrect. See https://github.com/Microsoft/TypeScript/issues/27929.
|
|
175
|
-
this._isInsideShadowRoot = rootNode instanceof window.ShadowRoot;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
MtxColorPickerComponent.prototype.ngOnDestroy = function () {
|
|
180
|
-
this.stateChanges.complete();
|
|
181
|
-
this._focusMonitor.stopMonitoring(this._elementRef);
|
|
182
|
-
};
|
|
183
|
-
/** Implemented as part of MatFormFieldControl. */
|
|
184
|
-
MtxColorPickerComponent.prototype.setDescribedByIds = function (ids) {
|
|
185
|
-
this._ariaDescribedby = ids.join(' ');
|
|
186
|
-
};
|
|
187
|
-
/** Implemented as part of MatFormFieldControl. */
|
|
188
|
-
MtxColorPickerComponent.prototype.onContainerClick = function () {
|
|
189
|
-
this._handleFocus();
|
|
190
|
-
};
|
|
191
|
-
/**
|
|
192
|
-
* Sets the model value. Implemented as part of ControlValueAccessor.
|
|
193
|
-
* @param value New value to be written to the model.
|
|
194
|
-
*/
|
|
195
|
-
MtxColorPickerComponent.prototype.writeValue = function (value) {
|
|
196
|
-
this.value = value || '';
|
|
197
|
-
this._changeDetectorRef.markForCheck();
|
|
198
|
-
};
|
|
199
|
-
/**
|
|
200
|
-
* Registers a callback to be triggered when the model value changes.
|
|
201
|
-
* Implemented as part of ControlValueAccessor.
|
|
202
|
-
* @param fn Callback to be registered.
|
|
203
|
-
*/
|
|
204
|
-
MtxColorPickerComponent.prototype.registerOnChange = function (fn) {
|
|
205
|
-
this._onChange = fn;
|
|
206
|
-
};
|
|
207
|
-
/**
|
|
208
|
-
* Registers a callback to be triggered when the control is touched.
|
|
209
|
-
* Implemented as part of ControlValueAccessor.
|
|
210
|
-
* @param fn Callback to be registered.
|
|
211
|
-
*/
|
|
212
|
-
MtxColorPickerComponent.prototype.registerOnTouched = function (fn) {
|
|
213
|
-
this._onTouched = fn;
|
|
214
|
-
};
|
|
215
|
-
/**
|
|
216
|
-
* Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
|
|
217
|
-
* @param isDisabled Whether the control should be disabled.
|
|
218
|
-
*/
|
|
219
|
-
MtxColorPickerComponent.prototype.setDisabledState = function (isDisabled) {
|
|
220
|
-
this.disabled = isDisabled;
|
|
221
|
-
};
|
|
222
|
-
/** Open panel with input focus event. */
|
|
223
|
-
MtxColorPickerComponent.prototype._handleFocus = function () {
|
|
224
|
-
var _this = this;
|
|
225
|
-
this.trigger.openMenu();
|
|
226
|
-
this._closingActionsSubscription = rxjs.merge(this._getOutsideClickStream())
|
|
227
|
-
.pipe()
|
|
228
|
-
.subscribe(function (event) {
|
|
229
|
-
_this.trigger.closeMenu();
|
|
230
|
-
_this._closingActionsSubscription.unsubscribe();
|
|
231
|
-
});
|
|
232
|
-
};
|
|
233
|
-
/** Opens the overlay panel. */
|
|
234
|
-
MtxColorPickerComponent.prototype._openPanel = function () {
|
|
235
|
-
if (this._focused) {
|
|
236
|
-
this._panelOpen = true;
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
/** Closes the overlay panel and focuses the host element. */
|
|
240
|
-
MtxColorPickerComponent.prototype._closePanel = function () {
|
|
241
|
-
if (this._panelOpen) {
|
|
242
|
-
this._panelOpen = false;
|
|
243
|
-
this._changeDetectorRef.markForCheck();
|
|
244
|
-
this._onTouched();
|
|
245
|
-
}
|
|
246
|
-
};
|
|
247
|
-
/** The callback of color changed. */
|
|
248
|
-
MtxColorPickerComponent.prototype._onColorChanged = function (model) {
|
|
249
|
-
this.value = model.color.hex;
|
|
250
|
-
this.colorChange.emit(model);
|
|
251
|
-
};
|
|
252
|
-
/** Stream of clicks outside of the color picker panel. */
|
|
253
|
-
MtxColorPickerComponent.prototype._getOutsideClickStream = function () {
|
|
254
|
-
var _this = this;
|
|
255
|
-
return rxjs.merge(rxjs.fromEvent(this._document, 'click'), rxjs.fromEvent(this._document, 'touchend')).pipe(operators.filter(function (event) {
|
|
256
|
-
// If we're in the Shadow DOM, the event target will be the shadow root, so we have to
|
|
257
|
-
// fall back to check the first element in the path of the click event.
|
|
258
|
-
var clickTarget = (_this._isInsideShadowRoot && event.composedPath ? event.composedPath()[0] : event.target);
|
|
259
|
-
var formField = _this._formField ? _this._formField._elementRef.nativeElement : null;
|
|
260
|
-
return (clickTarget !== _this._elementRef.nativeElement &&
|
|
261
|
-
(!formField || !formField.contains(clickTarget)));
|
|
262
|
-
}));
|
|
263
|
-
};
|
|
264
|
-
return MtxColorPickerComponent;
|
|
265
|
-
}());
|
|
266
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
267
|
-
MtxColorPickerComponent.decorators = [
|
|
268
|
-
{ type: core.Component, args: [{
|
|
269
|
-
selector: 'mtx-color-picker',
|
|
270
|
-
exportAs: 'mtxColorPicker',
|
|
271
|
-
template: "<input matInput\n [(ngModel)]=\"value\"\n [placeholder]=\"placeholder\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (focus)=\"_handleFocus()\"\n autocomplete=\"off\">\n\n<div #colorPickerTrigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"colorPickerPopover\"\n (menuOpened)=\"_openPanel()\"\n (menuClosed)=\"_closePanel()\">\n</div>\n\n<mat-menu #colorPickerPopover=\"matMenu\" class=\"mtx-color-picker-panel\" [hasBackdrop]=\"false\">\n <div class=\"mtx-color-picker\"\n (click)=\"$event.stopPropagation()\"\n (keydown)=\"$event.stopPropagation()\">\n <color-chrome [color]=\"value!\" (onChangeComplete)=\"_onColorChanged($event)\"></color-chrome>\n </div>\n</mat-menu>\n",
|
|
272
|
-
encapsulation: core.ViewEncapsulation.None,
|
|
273
|
-
changeDetection: core.ChangeDetectionStrategy.OnPush,
|
|
274
|
-
providers: [{ provide: formField.MatFormFieldControl, useExisting: MtxColorPickerComponent }],
|
|
275
|
-
styles: [".mtx-color-picker-panel .mat-menu-content:not(:empty){padding:0}.mtx-color-picker-panel .mtx-color-picker{padding:8px}.mtx-color-picker-panel .mtx-color-picker .chrome-picker{box-shadow:none;border-radius:0}.mtx-color-picker-panel .mtx-color-picker .chrome-picker .saturation{border-radius:0}\n"]
|
|
276
|
-
},] }
|
|
277
|
-
];
|
|
278
|
-
/**
|
|
279
|
-
* @type {function(): !Array<(null|{
|
|
280
|
-
* type: ?,
|
|
281
|
-
* decorators: (undefined|!Array<{type: !Function, args: (undefined|!Array<?>)}>),
|
|
282
|
-
* })>}
|
|
283
|
-
* @nocollapse
|
|
284
|
-
*/
|
|
285
|
-
MtxColorPickerComponent.ctorParameters = function () { return [
|
|
286
|
-
{ type: a11y.FocusMonitor },
|
|
287
|
-
{ type: core.ElementRef },
|
|
288
|
-
{ type: core.ChangeDetectorRef },
|
|
289
|
-
{ type: core.NgZone },
|
|
290
|
-
{ type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }] },
|
|
291
|
-
{ type: formField.MatFormField, decorators: [{ type: core.Optional }, { type: core.Host }] },
|
|
292
|
-
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [common.DOCUMENT,] }] }
|
|
293
|
-
]; };
|
|
294
|
-
/** @type {!Object<string, !Array<{type: !Function, args: (undefined|!Array<?>)}>>} */
|
|
295
|
-
MtxColorPickerComponent.propDecorators = {
|
|
296
|
-
value: [{ type: core.Input }],
|
|
297
|
-
id: [{ type: core.Input }],
|
|
298
|
-
placeholder: [{ type: core.Input }],
|
|
299
|
-
required: [{ type: core.Input }],
|
|
300
|
-
disabled: [{ type: core.Input }],
|
|
301
|
-
readonly: [{ type: core.Input }],
|
|
302
|
-
colorChange: [{ type: core.Output }],
|
|
303
|
-
trigger: [{ type: core.ViewChild, args: [menu.MatMenuTrigger, { static: true },] }]
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
var MtxColorPickerModule = /** @class */ (function () {
|
|
307
|
-
function MtxColorPickerModule() {
|
|
308
|
-
}
|
|
309
|
-
return MtxColorPickerModule;
|
|
310
|
-
}());
|
|
311
|
-
/** @type {!Array<{type: !Function, args: (undefined|!Array<?>)}>} */
|
|
312
|
-
MtxColorPickerModule.decorators = [
|
|
313
|
-
{ type: core.NgModule, args: [{
|
|
314
|
-
imports: [
|
|
315
|
-
common.CommonModule,
|
|
316
|
-
forms.FormsModule,
|
|
317
|
-
menu.MatMenuModule,
|
|
318
|
-
formField.MatFormFieldModule,
|
|
319
|
-
input.MatInputModule,
|
|
320
|
-
chrome.ColorChromeModule,
|
|
321
|
-
],
|
|
322
|
-
exports: [MtxColorPickerComponent],
|
|
323
|
-
declarations: [MtxColorPickerComponent],
|
|
324
|
-
},] }
|
|
325
|
-
];
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* Generated bundle index. Do not edit.
|
|
329
|
-
*/
|
|
330
|
-
|
|
331
|
-
exports.MtxColorPickerComponent = MtxColorPickerComponent;
|
|
332
|
-
exports.MtxColorPickerModule = MtxColorPickerModule;
|
|
333
|
-
|
|
334
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
335
|
-
|
|
336
|
-
})));
|
|
337
|
-
//# sourceMappingURL=mtxColorPicker.umd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mtxColorPicker.umd.js","sources":["../../../projects/extensions/color-picker/color-picker.component.ts","../../../projects/extensions/color-picker/color-picker.module.ts","../../../projects/extensions/color-picker/mtxColorPicker.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n OnDestroy,\n Optional,\n Self,\n ElementRef,\n Input,\n Output,\n EventEmitter,\n Inject,\n DoCheck,\n ViewChild,\n Host,\n AfterViewInit,\n NgZone,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { _supportsShadowDom } from '@angular/cdk/platform';\nimport { MatFormFieldControl, MatFormField } from '@angular/material/form-field';\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport { Subject, Observable, merge, fromEvent, Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { ColorEvent } from 'ngx-color';\n\nlet nextUniqueId = 0;\n\n@Component({\n selector: 'mtx-color-picker',\n exportAs: 'mtxColorPicker',\n templateUrl: './color-picker.component.html',\n styleUrls: ['./color-picker.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: MatFormFieldControl, useExisting: MtxColorPickerComponent }],\n})\nexport class MtxColorPickerComponent\n implements OnDestroy, DoCheck, AfterViewInit, ControlValueAccessor, MatFormFieldControl<any>\n{\n /** Value of the color picker control. */\n @Input()\n get value(): string | null {\n return this._value;\n }\n set value(newValue: string | null) {\n this._value = newValue;\n this._onChange(newValue);\n this.stateChanges.next();\n }\n private _value: string | null = '';\n\n /** Implemented as part of MatFormFieldControl. */\n readonly stateChanges: Subject<void> = new Subject<void>();\n\n /** Unique id for this input. */\n private _uid = `mtx-color-picker-${nextUniqueId++}`;\n\n /** Unique id of the element. */\n @Input()\n get id(): string {\n return this._id;\n }\n set id(value: string) {\n this._id = value || this._uid;\n this.stateChanges.next();\n }\n private _id!: string;\n\n /** Placeholder to be shown if value is empty. */\n @Input()\n get placeholder(): string {\n return this._placeholder;\n }\n set placeholder(value: string) {\n this._placeholder = value;\n this.stateChanges.next();\n }\n private _placeholder!: string;\n\n /** Whether the input is focused. */\n get focused(): boolean {\n return this._focused || this._panelOpen;\n }\n private _focused = false;\n\n get empty(): boolean {\n return !this.value;\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n @Input()\n get required(): boolean {\n return this._required;\n }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n private _required = false;\n\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n private _disabled = false;\n\n /** Whether the element is readonly. */\n @Input()\n get readonly(): boolean {\n return this._readonly;\n }\n set readonly(value: boolean) {\n this._readonly = coerceBooleanProperty(value);\n }\n private _readonly = false;\n\n errorState = false;\n\n /** A name for this control that can be used by `mat-form-field`. */\n controlType = 'mtx-color-picker';\n\n /** The aria-describedby attribute on the color picker for improved a11y. */\n _ariaDescribedby!: string;\n\n /** `View -> model callback called when value changes` */\n _onChange: (value: any) => void = () => {};\n\n /** `View -> model callback called when color picker has been touched` */\n _onTouched = () => {};\n\n /** Event emitted when the color changed */\n @Output() readonly colorChange = new EventEmitter<ColorEvent>();\n\n @ViewChild(MatMenuTrigger, { static: true }) trigger!: MatMenuTrigger;\n\n /** Whether or not the overlay panel is open. */\n _panelOpen = false;\n\n /** The subscription for closing actions (some are bound to document). */\n private _closingActionsSubscription!: Subscription;\n\n /** Whether the element is inside of a ShadowRoot component. */\n private _isInsideShadowRoot!: boolean;\n\n /**\n * Whether the color picker can open the next time it is focused. Used to prevent a focused,\n * closed color picker from being reopened if the user switches to another browser tab and then\n * comes back.\n */\n private _canOpenOnNextFocus = true;\n\n /**\n * Event handler for when the window is blurred. Needs to be an\n * arrow function in order to preserve the context.\n */\n private _windowBlurHandler = () => {\n // If the user blurred the window while the color picker is focused, it means that it'll be\n // refocused when they come back. In this case we want to skip the first focus event, if the\n // pane was closed, in order to avoid reopening it unintentionally.\n this._canOpenOnNextFocus =\n this._document.activeElement !== this._elementRef.nativeElement || this._panelOpen;\n };\n\n constructor(\n private _focusMonitor: FocusMonitor,\n private _elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _zone: NgZone,\n @Optional() @Self() public ngControl: NgControl,\n @Optional() @Host() private _formField: MatFormField,\n @Optional() @Inject(DOCUMENT) private _document: any\n ) {\n _focusMonitor.monitor(_elementRef, true).subscribe(origin => {\n if (this._focused && !origin) {\n this._onTouched();\n }\n this._focused = !!origin;\n this.stateChanges.next();\n });\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngDoCheck(): void {\n if (this.ngControl) {\n this.errorState = (this.ngControl.invalid && this.ngControl.touched) as boolean;\n this.stateChanges.next();\n }\n }\n\n ngAfterViewInit() {\n if (typeof window !== 'undefined') {\n this._zone.runOutsideAngular(() => {\n window.addEventListener('blur', this._windowBlurHandler);\n });\n\n if (_supportsShadowDom()) {\n const element = this._elementRef.nativeElement;\n const rootNode = element.getRootNode ? element.getRootNode() : null;\n\n // We need to take the `ShadowRoot` off of `window`, because the built-in types are\n // incorrect. See https://github.com/Microsoft/TypeScript/issues/27929.\n this._isInsideShadowRoot = rootNode instanceof (window as any).ShadowRoot;\n }\n }\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n /** Implemented as part of MatFormFieldControl. */\n setDescribedByIds(ids: string[]) {\n this._ariaDescribedby = ids.join(' ');\n }\n\n /** Implemented as part of MatFormFieldControl. */\n onContainerClick() {\n this._handleFocus();\n }\n\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value New value to be written to the model.\n */\n writeValue(value: string | null): void {\n this.value = value || '';\n this._changeDetectorRef.markForCheck();\n }\n\n /**\n * Registers a callback to be triggered when the model value changes.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnChange(fn: any): void {\n this._onChange = fn;\n }\n\n /**\n * Registers a callback to be triggered when the control is touched.\n * Implemented as part of ControlValueAccessor.\n * @param fn Callback to be registered.\n */\n registerOnTouched(fn: any): void {\n this._onTouched = fn;\n }\n\n /**\n * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.\n * @param isDisabled Whether the control should be disabled.\n */\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n /** Open panel with input focus event. */\n _handleFocus() {\n this.trigger.openMenu();\n\n this._closingActionsSubscription = merge(this._getOutsideClickStream())\n .pipe()\n .subscribe(event => {\n this.trigger.closeMenu();\n this._closingActionsSubscription.unsubscribe();\n });\n }\n\n /** Opens the overlay panel. */\n _openPanel() {\n if (this._focused) {\n this._panelOpen = true;\n }\n }\n\n /** Closes the overlay panel and focuses the host element. */\n _closePanel() {\n if (this._panelOpen) {\n this._panelOpen = false;\n this._changeDetectorRef.markForCheck();\n this._onTouched();\n }\n }\n\n /** The callback of color changed. */\n _onColorChanged(model: ColorEvent) {\n this.value = model.color.hex;\n this.colorChange.emit(model);\n }\n\n /** Stream of clicks outside of the color picker panel. */\n private _getOutsideClickStream(): Observable<any> {\n return merge(\n fromEvent(this._document, 'click') as Observable<MouseEvent>,\n fromEvent(this._document, 'touchend') as Observable<TouchEvent>\n ).pipe(\n filter(event => {\n // If we're in the Shadow DOM, the event target will be the shadow root, so we have to\n // fall back to check the first element in the path of the click event.\n const clickTarget = (\n this._isInsideShadowRoot && event.composedPath ? event.composedPath()[0] : event.target\n ) as HTMLElement;\n const formField = this._formField ? this._formField._elementRef.nativeElement : null;\n\n return (\n clickTarget !== this._elementRef.nativeElement &&\n (!formField || !formField.contains(clickTarget))\n );\n })\n );\n }\n\n static ngAcceptInputType_required: BooleanInput;\n static ngAcceptInputType_readonly: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { ColorChromeModule } from 'ngx-color/chrome';\n\nimport { MtxColorPickerComponent } from './color-picker.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n MatMenuModule,\n MatFormFieldModule,\n MatInputModule,\n ColorChromeModule,\n ],\n exports: [MtxColorPickerComponent],\n declarations: [MtxColorPickerComponent],\n})\nexport class MtxColorPickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["Subject","EventEmitter","coerceBooleanProperty","_supportsShadowDom","merge","fromEvent","filter","Component","ViewEncapsulation","ChangeDetectionStrategy","MatFormFieldControl","FocusMonitor","ElementRef","ChangeDetectorRef","NgZone","NgControl","Optional","Self","MatFormField","Host","Inject","DOCUMENT","Input","Output","ViewChild","MatMenuTrigger","NgModule","CommonModule","FormsModule","MatMenuModule","MatFormFieldModule","MatInputModule","ColorChromeModule"],"mappings":";;;;;;IA+BA,IAAI,YAAY,GAAG,CAAC,CAAC;;QAiJnB,iCACU,aAA2B,EAC3B,WAAoC,EACpC,kBAAqC,EACrC,KAAa,EACM,SAAoB,EACnB,UAAwB,EACd,SAAc;YAPtD,iBAoBC;YAnBS,kBAAa,GAAb,aAAa,CAAc;YAC3B,gBAAW,GAAX,WAAW,CAAyB;YACpC,uBAAkB,GAAlB,kBAAkB,CAAmB;YACrC,UAAK,GAAL,KAAK,CAAQ;YACM,cAAS,GAAT,SAAS,CAAW;YACnB,eAAU,GAAV,UAAU,CAAc;YACd,cAAS,GAAT,SAAS,CAAK;YAhI9C,WAAM,GAAkB,EAAE,CAAC;;YAG1B,iBAAY,GAAkB,IAAIA,YAAO,EAAQ,CAAC;;YAGnD,SAAI,GAAG,sBAAoB,YAAY,EAAI,CAAC;YA4B5C,aAAQ,GAAG,KAAK,CAAC;YAkBjB,cAAS,GAAG,KAAK,CAAC;YAUlB,cAAS,GAAG,KAAK,CAAC;YAUlB,cAAS,GAAG,KAAK,CAAC;YAE1B,eAAU,GAAG,KAAK,CAAC;;YAGnB,gBAAW,GAAG,kBAAkB,CAAC;;YAMjC,cAAS,GAAyB,eAAQ,CAAC;;YAG3C,eAAU,GAAG,eAAQ,CAAC;;YAGH,gBAAW,GAAG,IAAIC,iBAAY,EAAc,CAAC;;YAKhE,eAAU,GAAG,KAAK,CAAC;;;;;;YAaX,wBAAmB,GAAG,IAAI,CAAC;;;;;YAM3B,uBAAkB,GAAG;;;;gBAI3B,KAAI,CAAC,mBAAmB;oBACtB,KAAI,CAAC,SAAS,CAAC,aAAa,KAAK,KAAI,CAAC,WAAW,CA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