@nova-ui/dashboards 19.0.0 → 19.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/nova-ui-dashboards.mjs +69 -424
- package/fesm2022/nova-ui-dashboards.mjs.map +1 -1
- package/lib/components/providers/kpi-scale-sync-broker.d.ts +1 -0
- package/lib/components/table-widget/table-widget.component.d.ts +3 -0
- package/lib/components/table-widget/types.d.ts +1 -0
- package/lib/configurator/components/public-api.d.ts +0 -1
- package/lib/configurator/configurator.module.d.ts +17 -18
- package/lib/dashboards.module.d.ts +1 -1
- package/package.json +3 -3
- package/sdk/atoms/src/lib/components/providers/kpi-scale-sync-broker.d.ts +1 -0
- package/sdk/atoms/src/lib/components/providers/kpi-scale-sync-broker.js +31 -14
- package/sdk/atoms/src/lib/components/providers/kpi-scale-sync-broker.js.map +1 -1
- package/sdk/atoms/src/lib/components/table-widget/table-widget.component.d.ts +3 -0
- package/sdk/atoms/src/lib/components/table-widget/table-widget.component.js +10 -0
- package/sdk/atoms/src/lib/components/table-widget/table-widget.component.js.map +1 -1
- package/sdk/atoms/src/lib/components/table-widget/types.d.ts +1 -0
- package/sdk/atoms/src/lib/components/table-widget/types.js.map +1 -1
- package/sdk/atoms/src/lib/configurator/components/public-api.d.ts +0 -1
- package/sdk/atoms/src/lib/configurator/components/public-api.js +0 -1
- package/sdk/atoms/src/lib/configurator/components/public-api.js.map +1 -1
- package/sdk/atoms/src/lib/configurator/configurator.module.js +1 -2
- package/sdk/atoms/src/lib/configurator/configurator.module.js.map +1 -1
- package/sdk/atoms/src/lib/dashboards.module.js +1 -0
- package/sdk/atoms/src/lib/dashboards.module.js.map +1 -1
- package/lib/configurator/components/color-picker/HTMLcolors.d.ts +0 -1
- package/lib/configurator/components/color-picker/color-picker.component.d.ts +0 -42
- package/lib/configurator/components/color-picker/color.service.d.ts +0 -8
- package/sdk/atoms/src/lib/configurator/components/color-picker/HTMLcolors.d.ts +0 -1
- package/sdk/atoms/src/lib/configurator/components/color-picker/HTMLcolors.js +0 -166
- package/sdk/atoms/src/lib/configurator/components/color-picker/HTMLcolors.js.map +0 -1
- package/sdk/atoms/src/lib/configurator/components/color-picker/color-picker.component.d.ts +0 -39
- package/sdk/atoms/src/lib/configurator/components/color-picker/color-picker.component.js +0 -185
- package/sdk/atoms/src/lib/configurator/components/color-picker/color-picker.component.js.map +0 -1
- package/sdk/atoms/src/lib/configurator/components/color-picker/color.service.d.ts +0 -5
- package/sdk/atoms/src/lib/configurator/components/color-picker/color.service.js +0 -58
- package/sdk/atoms/src/lib/configurator/components/color-picker/color.service.js.map +0 -1
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to
|
|
6
|
-
// deal in the Software without restriction, including without limitation the
|
|
7
|
-
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
8
|
-
// sell copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in
|
|
12
|
-
// all copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
20
|
-
// THE SOFTWARE.
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.HTML_COLORS = void 0;
|
|
23
|
-
exports.HTML_COLORS = new Map([
|
|
24
|
-
["aliceblue", "#f0f8ff"],
|
|
25
|
-
["antiquewhite", "#faebd7"],
|
|
26
|
-
["aqua", "#00ffff"],
|
|
27
|
-
["aquamarine", "#7fffd4"],
|
|
28
|
-
["azure", "#f0ffff"],
|
|
29
|
-
["beige", "#f5f5dc"],
|
|
30
|
-
["bisque", "#ffe4c4"],
|
|
31
|
-
["black", "#000000"],
|
|
32
|
-
["blanchedalmond", "#ffebcd"],
|
|
33
|
-
["blue", "#0000ff"],
|
|
34
|
-
["blueviolet", "#8a2be2"],
|
|
35
|
-
["brown", "#a52a2a"],
|
|
36
|
-
["burlywood", "#deb887"],
|
|
37
|
-
["cadetblue", "#5f9ea0"],
|
|
38
|
-
["chartreuse", "#7fff00"],
|
|
39
|
-
["chocolate", "#d2691e"],
|
|
40
|
-
["coral", "#ff7f50"],
|
|
41
|
-
["cornflowerblue", "#6495ed"],
|
|
42
|
-
["cornsilk", "#fff8dc"],
|
|
43
|
-
["crimson", "#dc143c"],
|
|
44
|
-
["cyan", "#00ffff"],
|
|
45
|
-
["darkblue", "#00008b"],
|
|
46
|
-
["darkcyan", "#008b8b"],
|
|
47
|
-
["darkgoldenrod", "#b8860b"],
|
|
48
|
-
["darkgray", "#a9a9a9"],
|
|
49
|
-
["darkgreen", "#006400"],
|
|
50
|
-
["darkkhaki", "#bdb76b"],
|
|
51
|
-
["darkmagenta", "#8b008b"],
|
|
52
|
-
["darkolivegreen", "#556b2f"],
|
|
53
|
-
["darkorange", "#ff8c00"],
|
|
54
|
-
["darkorchid", "#9932cc"],
|
|
55
|
-
["darkred", "#8b0000"],
|
|
56
|
-
["darksalmon", "#e9967a"],
|
|
57
|
-
["darkseagreen", "#8fbc8f"],
|
|
58
|
-
["darkslateblue", "#483d8b"],
|
|
59
|
-
["darkslategray", "#2f4f4f"],
|
|
60
|
-
["darkturquoise", "#00ced1"],
|
|
61
|
-
["darkviolet", "#9400d3"],
|
|
62
|
-
["deeppink", "#ff1493"],
|
|
63
|
-
["deepskyblue", "#00bfff"],
|
|
64
|
-
["dimgray", "#696969"],
|
|
65
|
-
["dodgerblue", "#1e90ff"],
|
|
66
|
-
["firebrick", "#b22222"],
|
|
67
|
-
["floralwhite", "#fffaf0"],
|
|
68
|
-
["forestgreen", "#228b22"],
|
|
69
|
-
["fuchsia", "#ff00ff"],
|
|
70
|
-
["gainsboro", "#dcdcdc"],
|
|
71
|
-
["ghostwhite", "#f8f8ff"],
|
|
72
|
-
["gold", "#ffd700"],
|
|
73
|
-
["goldenrod", "#daa520"],
|
|
74
|
-
["gray", "#808080"],
|
|
75
|
-
["green", "#008000"],
|
|
76
|
-
["greenyellow", "#adff2f"],
|
|
77
|
-
["honeydew", "#f0fff0"],
|
|
78
|
-
["hotpink", "#ff69b4"],
|
|
79
|
-
["indianred ", "#cd5c5c"],
|
|
80
|
-
["indigo", "#4b0082"],
|
|
81
|
-
["ivory", "#fffff0"],
|
|
82
|
-
["khaki", "#f0e68c"],
|
|
83
|
-
["lavender", "#e6e6fa"],
|
|
84
|
-
["lavenderblush", "#fff0f5"],
|
|
85
|
-
["lawngreen", "#7cfc00"],
|
|
86
|
-
["lemonchiffon", "#fffacd"],
|
|
87
|
-
["lightblue", "#add8e6"],
|
|
88
|
-
["lightcoral", "#f08080"],
|
|
89
|
-
["lightcyan", "#e0ffff"],
|
|
90
|
-
["lightgoldenrodyellow", "#fafad2"],
|
|
91
|
-
["lightgrey", "#d3d3d3"],
|
|
92
|
-
["lightgreen", "#90ee90"],
|
|
93
|
-
["lightpink", "#ffb6c1"],
|
|
94
|
-
["lightsalmon", "#ffa07a"],
|
|
95
|
-
["lightseagreen", "#20b2aa"],
|
|
96
|
-
["lightskyblue", "#87cefa"],
|
|
97
|
-
["lightslategray", "#778899"],
|
|
98
|
-
["lightsteelblue", "#b0c4de"],
|
|
99
|
-
["lightyellow", "#ffffe0"],
|
|
100
|
-
["lime", "#00ff00"],
|
|
101
|
-
["limegreen", "#32cd32"],
|
|
102
|
-
["linen", "#faf0e6"],
|
|
103
|
-
["magenta", "#ff00ff"],
|
|
104
|
-
["maroon", "#800000"],
|
|
105
|
-
["mediumaquamarine", "#66cdaa"],
|
|
106
|
-
["mediumblue", "#0000cd"],
|
|
107
|
-
["mediumorchid", "#ba55d3"],
|
|
108
|
-
["mediumpurple", "#9370d8"],
|
|
109
|
-
["mediumseagreen", "#3cb371"],
|
|
110
|
-
["mediumslateblue", "#7b68ee"],
|
|
111
|
-
["mediumspringgreen", "#00fa9a"],
|
|
112
|
-
["mediumturquoise", "#48d1cc"],
|
|
113
|
-
["mediumvioletred", "#c71585"],
|
|
114
|
-
["midnightblue", "#191970"],
|
|
115
|
-
["mintcream", "#f5fffa"],
|
|
116
|
-
["mistyrose", "#ffe4e1"],
|
|
117
|
-
["moccasin", "#ffe4b5"],
|
|
118
|
-
["navajowhite", "#ffdead"],
|
|
119
|
-
["navy", "#000080"],
|
|
120
|
-
["oldlace", "#fdf5e6"],
|
|
121
|
-
["olive", "#808000"],
|
|
122
|
-
["olivedrab", "#6b8e23"],
|
|
123
|
-
["orange", "#ffa500"],
|
|
124
|
-
["orangered", "#ff4500"],
|
|
125
|
-
["orchid", "#da70d6"],
|
|
126
|
-
["palegoldenrod", "#eee8aa"],
|
|
127
|
-
["palegreen", "#98fb98"],
|
|
128
|
-
["paleturquoise", "#afeeee"],
|
|
129
|
-
["palevioletred", "#d87093"],
|
|
130
|
-
["papayawhip", "#ffefd5"],
|
|
131
|
-
["peachpuff", "#ffdab9"],
|
|
132
|
-
["peru", "#cd853f"],
|
|
133
|
-
["pink", "#ffc0cb"],
|
|
134
|
-
["plum", "#dda0dd"],
|
|
135
|
-
["powderblue", "#b0e0e6"],
|
|
136
|
-
["purple", "#800080"],
|
|
137
|
-
["rebeccapurple", "#663399"],
|
|
138
|
-
["red", "#ff0000"],
|
|
139
|
-
["rosybrown", "#bc8f8f"],
|
|
140
|
-
["royalblue", "#4169e1"],
|
|
141
|
-
["saddlebrown", "#8b4513"],
|
|
142
|
-
["salmon", "#fa8072"],
|
|
143
|
-
["sandybrown", "#f4a460"],
|
|
144
|
-
["seagreen", "#2e8b57"],
|
|
145
|
-
["seashell", "#fff5ee"],
|
|
146
|
-
["sienna", "#a0522d"],
|
|
147
|
-
["silver", "#c0c0c0"],
|
|
148
|
-
["skyblue", "#87ceeb"],
|
|
149
|
-
["slateblue", "#6a5acd"],
|
|
150
|
-
["slategray", "#708090"],
|
|
151
|
-
["snow", "#fffafa"],
|
|
152
|
-
["springgreen", "#00ff7f"],
|
|
153
|
-
["steelblue", "#4682b4"],
|
|
154
|
-
["tan", "#d2b48c"],
|
|
155
|
-
["teal", "#008080"],
|
|
156
|
-
["thistle", "#d8bfd8"],
|
|
157
|
-
["tomato", "#ff6347"],
|
|
158
|
-
["turquoise", "#40e0d0"],
|
|
159
|
-
["violet", "#ee82ee"],
|
|
160
|
-
["wheat", "#f5deb3"],
|
|
161
|
-
["white", "#ffffff"],
|
|
162
|
-
["whitesmoke", "#f5f5f5"],
|
|
163
|
-
["yellow", "#ffff00"],
|
|
164
|
-
["yellowgreen", "#9acd32"],
|
|
165
|
-
]);
|
|
166
|
-
//# sourceMappingURL=HTMLcolors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HTMLcolors.js","sourceRoot":"","sources":["../../../../../../../../src/lib/configurator/components/color-picker/HTMLcolors.ts"],"names":[],"mappings":";AAAA,yDAAyD;AACzD,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,4DAA4D;AAC5D,EAAE;AACF,6EAA6E;AAC7E,uDAAuD;AACvD,EAAE;AACF,6EAA6E;AA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AK,EAAE,SAAS,CAAC;IAClB,CAAC,MAAM,EAAE,SAAS,CAAC;IACnB,CAAC,SAAS,EAAE,SAAS,CAAC;IACtB,CAAC,QAAQ,EAAE,SAAS,CAAC;IACrB,CAAC,WAAW,EAAE,SAAS,CAAC;IACxB,CAAC,QAAQ,EAAE,SAAS,CAAC;IACrB,CAAC,OAAO,EAAE,SAAS,CAAC;IACpB,CAAC,OAAO,EAAE,SAAS,CAAC;IACpB,CAAC,YAAY,EAAE,SAAS,CAAC;IACzB,CAAC,QAAQ,EAAE,SAAS,CAAC;IACrB,CAAC,aAAa,EAAE,SAAS,CAAC;CAC7B,CAAC,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Overlay, OverlayConfig } from "@angular/cdk/overlay";
|
|
2
|
-
import { AfterViewInit, ChangeDetectorRef, OnChanges, OnDestroy, SimpleChanges } from "@angular/core";
|
|
3
|
-
import { ControlValueAccessor } from "@angular/forms";
|
|
4
|
-
import { IOptionValueObject, NuiFormFieldControl, OverlayUtilitiesService, SelectV2Component } from "@nova-ui/bits";
|
|
5
|
-
import { ColorService } from "./color.service";
|
|
6
|
-
import { IPaletteColor } from "../../../types";
|
|
7
|
-
export declare class ColorPickerComponent implements NuiFormFieldControl, ControlValueAccessor, OnChanges, AfterViewInit, OnDestroy {
|
|
8
|
-
protected changeDetection: ChangeDetectorRef;
|
|
9
|
-
private colorService;
|
|
10
|
-
private cdkOverlay;
|
|
11
|
-
colors: string[];
|
|
12
|
-
colorPalette: IPaletteColor[];
|
|
13
|
-
cols: number | undefined;
|
|
14
|
-
select: SelectV2Component;
|
|
15
|
-
overlayConfig: OverlayConfig;
|
|
16
|
-
value: string | IOptionValueObject;
|
|
17
|
-
defaultColor: string;
|
|
18
|
-
maxWidth: string;
|
|
19
|
-
palette: Partial<IPaletteColor[]>;
|
|
20
|
-
isBlackTick: boolean;
|
|
21
|
-
isInErrorState: boolean;
|
|
22
|
-
ariaLabel?: string | undefined;
|
|
23
|
-
protected overlayUtilities: OverlayUtilitiesService;
|
|
24
|
-
private selectResizeObserver;
|
|
25
|
-
private destroy$;
|
|
26
|
-
constructor(changeDetection: ChangeDetectorRef, colorService: ColorService, cdkOverlay: Overlay);
|
|
27
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
28
|
-
ngAfterViewInit(): void;
|
|
29
|
-
ngOnDestroy(): void;
|
|
30
|
-
onChange(value: any): void;
|
|
31
|
-
_onTouched(): void;
|
|
32
|
-
writeValue(value: string | IOptionValueObject): void;
|
|
33
|
-
registerOnChange(fn: () => void): void;
|
|
34
|
-
registerOnTouched(fn: () => void): void;
|
|
35
|
-
setStyles: (color: string) => Record<string, any>;
|
|
36
|
-
determineBlackTick(color: string): boolean;
|
|
37
|
-
private initOverlayUtilities;
|
|
38
|
-
private getContrastOnBgColor;
|
|
39
|
-
}
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to
|
|
6
|
-
// deal in the Software without restriction, including without limitation the
|
|
7
|
-
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
8
|
-
// sell copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in
|
|
12
|
-
// all copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
20
|
-
// THE SOFTWARE.
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.ColorPickerComponent = void 0;
|
|
23
|
-
const tslib_1 = require("tslib");
|
|
24
|
-
const overlay_1 = require("@angular/cdk/overlay");
|
|
25
|
-
const core_1 = require("@angular/core");
|
|
26
|
-
const forms_1 = require("@angular/forms");
|
|
27
|
-
const rxjs_1 = require("rxjs");
|
|
28
|
-
const operators_1 = require("rxjs/operators");
|
|
29
|
-
const bits_1 = require("@nova-ui/bits");
|
|
30
|
-
const charts_1 = require("@nova-ui/charts");
|
|
31
|
-
const color_service_1 = require("./color.service");
|
|
32
|
-
// Left and right paddings of .color-picker-container element
|
|
33
|
-
const CONTAINER_SIDE_PADDINGS_PX = 20;
|
|
34
|
-
// Width of the .box element
|
|
35
|
-
const BOX_WIDTH_PX = 30;
|
|
36
|
-
let ColorPickerComponent = class ColorPickerComponent {
|
|
37
|
-
constructor(changeDetection, colorService, cdkOverlay) {
|
|
38
|
-
this.changeDetection = changeDetection;
|
|
39
|
-
this.colorService = colorService;
|
|
40
|
-
this.cdkOverlay = cdkOverlay;
|
|
41
|
-
this.defaultColor = "var(--nui-color-bg-secondary)";
|
|
42
|
-
this.overlayUtilities = new bits_1.OverlayUtilitiesService();
|
|
43
|
-
this.destroy$ = new rxjs_1.Subject();
|
|
44
|
-
this.setStyles = (color) => ({
|
|
45
|
-
"background-color": color || this.defaultColor,
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
ngOnChanges(changes) {
|
|
49
|
-
if (changes.colors) {
|
|
50
|
-
this.colors = changes.colors.currentValue;
|
|
51
|
-
}
|
|
52
|
-
if (changes.colorPalette) {
|
|
53
|
-
this.colorPalette = changes.colorPalette.currentValue;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
ngAfterViewInit() {
|
|
57
|
-
if (this.value) {
|
|
58
|
-
this.select?.writeValue(this.value);
|
|
59
|
-
this.isBlackTick = this.determineBlackTick(this.value.toString());
|
|
60
|
-
}
|
|
61
|
-
this.palette =
|
|
62
|
-
this.colorPalette || this.colors.map((color) => ({ color }));
|
|
63
|
-
this.initOverlayUtilities();
|
|
64
|
-
this.select.valueSelected
|
|
65
|
-
.pipe((0, operators_1.tap)((value) => this.writeValue(value)), (0, operators_1.tap)((value) => this.onChange(value)), (0, operators_1.takeUntil)(this.destroy$))
|
|
66
|
-
.subscribe((value) => {
|
|
67
|
-
if (value) {
|
|
68
|
-
this.isBlackTick = this.determineBlackTick(value.toString());
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
const positions = (0, bits_1.getOverlayPositions)();
|
|
72
|
-
const positionStrategy = this.cdkOverlay
|
|
73
|
-
.position()
|
|
74
|
-
.flexibleConnectedTo(this.select.elRef.nativeElement)
|
|
75
|
-
.withPush(false)
|
|
76
|
-
.withViewportMargin(0)
|
|
77
|
-
.withPositions([
|
|
78
|
-
positions["bottom-right"],
|
|
79
|
-
positions["bottom-left"],
|
|
80
|
-
positions["top-right"],
|
|
81
|
-
positions["top-left"],
|
|
82
|
-
]);
|
|
83
|
-
this.overlayConfig = {
|
|
84
|
-
maxWidth: this.cols
|
|
85
|
-
? this.cols * BOX_WIDTH_PX + CONTAINER_SIDE_PADDINGS_PX + "px"
|
|
86
|
-
: "260px",
|
|
87
|
-
positionStrategy,
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
ngOnDestroy() {
|
|
91
|
-
this.destroy$.next();
|
|
92
|
-
this.destroy$.complete();
|
|
93
|
-
}
|
|
94
|
-
onChange(value) { }
|
|
95
|
-
_onTouched() { }
|
|
96
|
-
writeValue(value) {
|
|
97
|
-
this.value = value;
|
|
98
|
-
this.select?.writeValue(value);
|
|
99
|
-
}
|
|
100
|
-
registerOnChange(fn) {
|
|
101
|
-
this.onChange = fn;
|
|
102
|
-
}
|
|
103
|
-
registerOnTouched(fn) {
|
|
104
|
-
this._onTouched = fn;
|
|
105
|
-
}
|
|
106
|
-
determineBlackTick(color) {
|
|
107
|
-
let hexColorValue = "#fff";
|
|
108
|
-
if (this.colorService.isHEX(color)) {
|
|
109
|
-
hexColorValue = color;
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
hexColorValue =
|
|
113
|
-
(0, charts_1.getColorValueByName)(color) ||
|
|
114
|
-
this.colorService.RGBToHexRGBToHex(color) ||
|
|
115
|
-
this.colorService.colorKeywordsToHex(color);
|
|
116
|
-
}
|
|
117
|
-
return this.getContrastOnBgColor(hexColorValue) === "#fff";
|
|
118
|
-
}
|
|
119
|
-
initOverlayUtilities() {
|
|
120
|
-
const dropdown = this.select.dropdown;
|
|
121
|
-
const config = { updateSize: false };
|
|
122
|
-
this.selectResizeObserver = this.overlayUtilities
|
|
123
|
-
.setPopupComponent(this.select.dropdown)
|
|
124
|
-
.getResizeObserver(config);
|
|
125
|
-
dropdown.show$.pipe((0, operators_1.takeUntil)(this.destroy$)).subscribe(() => {
|
|
126
|
-
this.overlayUtilities.syncWidth();
|
|
127
|
-
this.selectResizeObserver.observe(this.select.elRef.nativeElement);
|
|
128
|
-
});
|
|
129
|
-
dropdown.hide$.pipe((0, operators_1.takeUntil)(this.destroy$)).subscribe(() => {
|
|
130
|
-
this.selectResizeObserver.unobserve(this.select.elRef.nativeElement);
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
// convert hex code to rgb and compare the contrast of pure black and pure white on bgColor
|
|
134
|
-
getContrastOnBgColor(bgColor) {
|
|
135
|
-
if (!bgColor) {
|
|
136
|
-
return "";
|
|
137
|
-
}
|
|
138
|
-
return parseInt(bgColor.replace("#", ""), 16) > 0xffffff / 2
|
|
139
|
-
? "#fff"
|
|
140
|
-
: "#000";
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
exports.ColorPickerComponent = ColorPickerComponent;
|
|
144
|
-
tslib_1.__decorate([
|
|
145
|
-
(0, core_1.Input)(),
|
|
146
|
-
tslib_1.__metadata("design:type", Array)
|
|
147
|
-
], ColorPickerComponent.prototype, "colors", void 0);
|
|
148
|
-
tslib_1.__decorate([
|
|
149
|
-
(0, core_1.Input)(),
|
|
150
|
-
tslib_1.__metadata("design:type", Array)
|
|
151
|
-
], ColorPickerComponent.prototype, "colorPalette", void 0);
|
|
152
|
-
tslib_1.__decorate([
|
|
153
|
-
(0, core_1.Input)(),
|
|
154
|
-
tslib_1.__metadata("design:type", Object)
|
|
155
|
-
], ColorPickerComponent.prototype, "cols", void 0);
|
|
156
|
-
tslib_1.__decorate([
|
|
157
|
-
(0, core_1.ViewChild)((0, core_1.forwardRef)(() => bits_1.SelectV2Component)),
|
|
158
|
-
tslib_1.__metadata("design:type", bits_1.SelectV2Component)
|
|
159
|
-
], ColorPickerComponent.prototype, "select", void 0);
|
|
160
|
-
exports.ColorPickerComponent = ColorPickerComponent = tslib_1.__decorate([
|
|
161
|
-
(0, core_1.Component)({
|
|
162
|
-
selector: "nui-color-picker",
|
|
163
|
-
templateUrl: "./color-picker.component.html",
|
|
164
|
-
styleUrls: ["./color-picker.component.less"],
|
|
165
|
-
changeDetection: core_1.ChangeDetectionStrategy.OnPush,
|
|
166
|
-
providers: [
|
|
167
|
-
{
|
|
168
|
-
provide: bits_1.NuiFormFieldControl,
|
|
169
|
-
useExisting: (0, core_1.forwardRef)(() => ColorPickerComponent),
|
|
170
|
-
multi: true,
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
provide: forms_1.NG_VALUE_ACCESSOR,
|
|
174
|
-
useExisting: (0, core_1.forwardRef)(() => ColorPickerComponent),
|
|
175
|
-
multi: true,
|
|
176
|
-
},
|
|
177
|
-
color_service_1.ColorService,
|
|
178
|
-
],
|
|
179
|
-
standalone: false,
|
|
180
|
-
}),
|
|
181
|
-
tslib_1.__metadata("design:paramtypes", [core_1.ChangeDetectorRef,
|
|
182
|
-
color_service_1.ColorService,
|
|
183
|
-
overlay_1.Overlay])
|
|
184
|
-
], ColorPickerComponent);
|
|
185
|
-
//# sourceMappingURL=color-picker.component.js.map
|
package/sdk/atoms/src/lib/configurator/components/color-picker/color-picker.component.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color-picker.component.js","sourceRoot":"","sources":["../../../../../../../../src/lib/configurator/components/color-picker/color-picker.component.ts"],"names":[],"mappings":";AAAA,yDAAyD;AACzD,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,4DAA4D;AAC5D,EAAE;AACF,6EAA6E;AAC7E,uDAAuD;AACvD,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,+EAA+E;AAC/E,0EAA0E;AAC1E,iFAAiF;AACjF,6EAA6E;AAC7E,iBAAiB;;;;AAEjB,kDAA8D;AAC9D,wCAWuB;AACvB,0CAAyE;AACzE,+BAA+B;AAC/B,8CAAgD;AAEhD,wCAOuB;AACvB,4CAAsD;AAEtD,mDAA+C;AAG/C,6DAA6D;AAC7D,MAAM,0BAA0B,GAAW,EAAE,CAAC;AAC9C,4BAA4B;AAC5B,MAAM,YAAY,GAAW,EAAE,CAAC;AAsBzB,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IA8B7B,YACc,eAAkC,EACpC,YAA0B,EAC1B,UAAmB;QAFjB,oBAAe,GAAf,eAAe,CAAmB;QACpC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,eAAU,GAAV,UAAU,CAAS;QAhBxB,iBAAY,GAAW,+BAA+B,CAAC;QAOpD,qBAAgB,GACtB,IAAI,8BAAuB,EAAE,CAAC;QAG1B,aAAQ,GAAG,IAAI,cAAO,EAAQ,CAAC;QAuFhC,cAAS,GAAG,CAAC,KAAa,EAAuB,E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LLC. All rights reserved.
|
|
3
|
-
//
|
|
4
|
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
-
// of this software and associated documentation files (the "Software"), to
|
|
6
|
-
// deal in the Software without restriction, including without limitation the
|
|
7
|
-
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
8
|
-
// sell copies of the Software, and to permit persons to whom the Software is
|
|
9
|
-
// furnished to do so, subject to the following conditions:
|
|
10
|
-
//
|
|
11
|
-
// The above copyright notice and this permission notice shall be included in
|
|
12
|
-
// all copies or substantial portions of the Software.
|
|
13
|
-
//
|
|
14
|
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
20
|
-
// THE SOFTWARE.
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.ColorService = void 0;
|
|
23
|
-
const tslib_1 = require("tslib");
|
|
24
|
-
const core_1 = require("@angular/core");
|
|
25
|
-
const isNil_1 = tslib_1.__importDefault(require("lodash/isNil"));
|
|
26
|
-
const HTMLcolors_1 = require("./HTMLcolors");
|
|
27
|
-
let ColorService = class ColorService {
|
|
28
|
-
RGBToHexRGBToHex(rgbColor) {
|
|
29
|
-
// Choose correct separator
|
|
30
|
-
const sep = rgbColor.indexOf(",") > -1 ? "," : " ";
|
|
31
|
-
// Turn "rgb(r,g,b)" into [r,g,b]
|
|
32
|
-
const rgbParts = rgbColor.substr(4).split(")")[0].split(sep);
|
|
33
|
-
let r = (+rgbParts[0]).toString(16), g = (+rgbParts[1]).toString(16), b = (+rgbParts[2]).toString(16);
|
|
34
|
-
if (r.length === 1) {
|
|
35
|
-
r = "0" + r;
|
|
36
|
-
}
|
|
37
|
-
if (g.length === 1) {
|
|
38
|
-
g = "0" + g;
|
|
39
|
-
}
|
|
40
|
-
if (b.length === 1) {
|
|
41
|
-
b = "0" + b;
|
|
42
|
-
}
|
|
43
|
-
return "#" + r + g + b;
|
|
44
|
-
}
|
|
45
|
-
isHEX(hexColor) {
|
|
46
|
-
return (/^#[0-9A-F]{6}$/i.test(hexColor) ||
|
|
47
|
-
/^#([0-9A-F]{3}){1,2}$/i.test(hexColor));
|
|
48
|
-
}
|
|
49
|
-
colorKeywordsToHex(color) {
|
|
50
|
-
const hexOfColor = HTMLcolors_1.HTML_COLORS.get(color);
|
|
51
|
-
return !(0, isNil_1.default)(hexOfColor) ? hexOfColor : "";
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
exports.ColorService = ColorService;
|
|
55
|
-
exports.ColorService = ColorService = tslib_1.__decorate([
|
|
56
|
-
(0, core_1.Injectable)()
|
|
57
|
-
], ColorService);
|
|
58
|
-
//# sourceMappingURL=color.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color.service.js","sourceRoot":"","sources":["../../../../../../../../src/lib/configurator/components/color-picker/color.service.ts"],"names":[],"mappings":";AAAA,yDAAyD;AACzD,EAAE;AACF,+EAA+E;AAC/E,4EAA4E;AAC5E,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAC9E,4DAA4D;AAC5D,EAAE;AACF,6EAA6E;AAC7E,uDAAuD;AACvD,EAAE;AACF,6EAA6E;AAC7E,4EAA4E;AAC5E,+EAA+E;AAC/E,0EAA0E;AAC1E,iFAAiF;AACjF,6EAA6E;AAC7E,iBAAiB;;;;AAEjB,wCA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