@transcommerce/cwm-shared 1.1.83 → 1.1.86
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/transcommerce-cwm-shared.mjs +1182 -146
- package/fesm2022/transcommerce-cwm-shared.mjs.map +1 -1
- package/lib/models/category-slide.d.ts +12 -0
- package/lib/models/category.d.ts +2 -2
- package/lib/models/product.d.ts +8 -5
- package/lib/models/profile.d.ts +2 -2
- package/lib/models/style/color-style.d.ts +93 -0
- package/lib/models/style/coordinates-style.d.ts +8 -0
- package/lib/models/style/font-style.d.ts +11 -0
- package/lib/models/style/hex-color.d.ts +122 -0
- package/lib/models/style/image-style.d.ts +13 -0
- package/lib/models/{justifications.d.ts → style/justifications.d.ts} +1 -1
- package/lib/models/style/named-colors.d.ts +172 -0
- package/lib/models/style/ng-style-item.d.ts +3 -0
- package/lib/models/style/on-style.d.ts +4 -0
- package/lib/models/style/rgba-color-style.d.ts +16 -0
- package/lib/models/style/size-style.d.ts +8 -0
- package/lib/models/style/text-style.d.ts +15 -0
- package/lib/models/{create-subscription-request.d.ts → webapi-requests/create-subscription-request.d.ts} +2 -2
- package/lib/services/subscription-api.service.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +13 -10
- package/lib/models/color.d.ts +0 -2
- package/lib/models/font.d.ts +0 -9
- package/lib/models/image.d.ts +0 -8
- package/lib/models/logging-verbosity.d.ts +0 -7
- package/lib/models/model-map.d.ts +0 -4
- package/lib/models/named-colors.d.ts +0 -8
- package/lib/models/on-element-style.d.ts +0 -3
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TextStyle } from './style/text-style';
|
|
2
|
+
import { ImageStyle } from './style/image-style';
|
|
3
|
+
import { ColorStyle } from './style/color-style';
|
|
4
|
+
export interface CategorySlide {
|
|
5
|
+
id?: string;
|
|
6
|
+
name: TextStyle;
|
|
7
|
+
description: TextStyle | undefined;
|
|
8
|
+
picture: ImageStyle | undefined;
|
|
9
|
+
backgroundColor: ColorStyle | undefined;
|
|
10
|
+
selected?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const DEFAULT_CATEGORY_SLIDE: CategorySlide;
|
package/lib/models/category.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export declare class Category {
|
|
|
2
2
|
id: string;
|
|
3
3
|
name: string;
|
|
4
4
|
description: string;
|
|
5
|
-
|
|
6
|
-
static
|
|
5
|
+
toString(): string;
|
|
6
|
+
static newCategory(categoryName: string, categoryDescription?: string | undefined): Category;
|
|
7
7
|
}
|
package/lib/models/product.d.ts
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { FlowhubProduct } from './flowhub-product';
|
|
2
|
+
import { Category } from './category';
|
|
3
|
+
import { ImageStyle } from './style/image-style';
|
|
2
4
|
export declare class Product {
|
|
3
5
|
id: string;
|
|
4
6
|
name: string;
|
|
5
7
|
description: string;
|
|
6
|
-
brand:
|
|
8
|
+
brand: string | undefined;
|
|
7
9
|
price: number;
|
|
8
|
-
thcPercentage: number |
|
|
9
|
-
|
|
10
|
+
thcPercentage: number | undefined;
|
|
11
|
+
cbdPercentage: number | undefined;
|
|
12
|
+
category: Category;
|
|
10
13
|
quantity: number;
|
|
11
14
|
type: string;
|
|
12
|
-
pictureURL:
|
|
15
|
+
pictureURL: ImageStyle | undefined;
|
|
13
16
|
terpenes: unknown[] | null;
|
|
14
|
-
static
|
|
17
|
+
static newProduct(from: FlowhubProduct): Product;
|
|
15
18
|
}
|
package/lib/models/profile.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare class Profile {
|
|
|
15
15
|
companyName?: string;
|
|
16
16
|
promoCode?: string;
|
|
17
17
|
employeeType?: string;
|
|
18
|
-
static
|
|
19
|
-
|
|
18
|
+
static newProfile(from: Customer): Profile;
|
|
19
|
+
toCustomer(): Customer;
|
|
20
20
|
}
|
|
21
21
|
export declare const DEFAULT_PROFILE: Profile;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { NamedColors } from './named-colors';
|
|
2
|
+
import { RgbaColorStyle } from './rgba-color-style';
|
|
3
|
+
import { HexColor } from './hex-color';
|
|
4
|
+
import { OnStyle } from './on-style';
|
|
5
|
+
import { ngStyleItem } from './ng-style-item';
|
|
6
|
+
export type ColorValue = NamedColors | HexColor | RgbaColorStyle;
|
|
7
|
+
/**
|
|
8
|
+
* A unified Color class that can represent colors as Named, Hex, or RGBA formats
|
|
9
|
+
* and provides conversion methods between all formats.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ColorStyle implements OnStyle {
|
|
12
|
+
private _value;
|
|
13
|
+
constructor(value: ColorValue);
|
|
14
|
+
ngOnStyle(ngStyle: ngStyleItem): ngStyleItem;
|
|
15
|
+
/**
|
|
16
|
+
* Gets the original color value
|
|
17
|
+
*/
|
|
18
|
+
get value(): ColorValue;
|
|
19
|
+
/**
|
|
20
|
+
* Creates a Color from a named color string
|
|
21
|
+
*/
|
|
22
|
+
static fromNamedColor(colorName: string): ColorStyle;
|
|
23
|
+
/**
|
|
24
|
+
* Creates a Color from a hex color string
|
|
25
|
+
*/
|
|
26
|
+
static fromHexColor(hexColor: HexColor): ColorStyle;
|
|
27
|
+
/**
|
|
28
|
+
* Creates a Color from an RGBAColor object
|
|
29
|
+
*/
|
|
30
|
+
static fromRGBAColor(rgba: RgbaColorStyle): ColorStyle;
|
|
31
|
+
/**
|
|
32
|
+
* Creates a Color from RGB values
|
|
33
|
+
*/
|
|
34
|
+
static fromRGB(r: number, g: number, b: number, a?: number): ColorStyle;
|
|
35
|
+
/**
|
|
36
|
+
* Parses a CSS color string (hex, named, or rgba)
|
|
37
|
+
*/
|
|
38
|
+
static parse(colorString: string): ColorStyle;
|
|
39
|
+
/**
|
|
40
|
+
* Checks if the current value is a named color
|
|
41
|
+
*/
|
|
42
|
+
isNamedColor(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Checks if the current value is a hex color
|
|
45
|
+
*/
|
|
46
|
+
isHexColor(): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Checks if the current value is an RGBA color object
|
|
49
|
+
*/
|
|
50
|
+
isRGBAColor(): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Converts to hex color format
|
|
53
|
+
*/
|
|
54
|
+
toHexColor(includeAlpha?: boolean): HexColor;
|
|
55
|
+
/**
|
|
56
|
+
* Converts to RGBA color object
|
|
57
|
+
*/
|
|
58
|
+
toRGBAColor(): RgbaColorStyle;
|
|
59
|
+
/**
|
|
60
|
+
* Attempts to convert to a named color (only for exact matches)
|
|
61
|
+
*/
|
|
62
|
+
toNamedColor(): string | null;
|
|
63
|
+
/**
|
|
64
|
+
* Converts to CSS string format (hex, named, or rgba)
|
|
65
|
+
*/
|
|
66
|
+
toCssString(): string;
|
|
67
|
+
/**
|
|
68
|
+
* Returns the best CSS string representation (named if possible, otherwise hex)
|
|
69
|
+
*/
|
|
70
|
+
toString(): string;
|
|
71
|
+
/**
|
|
72
|
+
* Lightens the color by a percentage
|
|
73
|
+
*/
|
|
74
|
+
lighten(percentage: number): ColorStyle;
|
|
75
|
+
/**
|
|
76
|
+
* Darkens the color by a percentage
|
|
77
|
+
*/
|
|
78
|
+
darken(percentage: number): ColorStyle;
|
|
79
|
+
/**
|
|
80
|
+
* Adjusts the alpha channel
|
|
81
|
+
*/
|
|
82
|
+
withAlpha(alpha: number): ColorStyle;
|
|
83
|
+
/**
|
|
84
|
+
* Checks if two colors are equal
|
|
85
|
+
*/
|
|
86
|
+
equals(other: ColorStyle): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Creates a copy of the color
|
|
89
|
+
*/
|
|
90
|
+
clone(): ColorStyle;
|
|
91
|
+
}
|
|
92
|
+
export declare const DEFAULT_FORECOLOR: ColorStyle;
|
|
93
|
+
export declare const DEFAULT_BACKCOLOR: ColorStyle;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OnStyle } from './on-style';
|
|
2
|
+
import { ngStyleItem } from './ng-style-item';
|
|
3
|
+
export declare class CoordinatesStyle implements OnStyle {
|
|
4
|
+
top: number | string | any | undefined;
|
|
5
|
+
left: number | string | any | undefined;
|
|
6
|
+
ngOnStyle(ngStyle: ngStyleItem): ngStyleItem;
|
|
7
|
+
}
|
|
8
|
+
export declare const DEFAULT_COORDINATES: CoordinatesStyle;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OnStyle } from './on-style';
|
|
2
|
+
import { ngStyleItem } from './ng-style-item';
|
|
3
|
+
export declare class FontStyle implements OnStyle {
|
|
4
|
+
family: string;
|
|
5
|
+
size: number;
|
|
6
|
+
italic: boolean;
|
|
7
|
+
bold: boolean;
|
|
8
|
+
underline: boolean;
|
|
9
|
+
ngOnStyle(ngStyle: ngStyleItem): ngStyleItem;
|
|
10
|
+
}
|
|
11
|
+
export declare const DEFAULT_FONT: FontStyle;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hex color type and conversion utilities.
|
|
3
|
+
*
|
|
4
|
+
* Note: These standalone functions are also available through the Color class,
|
|
5
|
+
* which provides a unified interface for working with Named, Hex, and RGBA colors.
|
|
6
|
+
* Consider using the Color class for a more object-oriented approach.
|
|
7
|
+
*
|
|
8
|
+
* Example:
|
|
9
|
+
* const color = Color.fromHexColor('#FF0000');
|
|
10
|
+
* const rgba = color.toRGBAColor();
|
|
11
|
+
*/
|
|
12
|
+
export type HexColor = `#${string}`;
|
|
13
|
+
import { NamedColors } from './named-colors';
|
|
14
|
+
import { RgbaColorStyle } from './rgba-color-style';
|
|
15
|
+
/**
|
|
16
|
+
* Converts a hex color to RGBA format
|
|
17
|
+
* @param hex - Hex color string (e.g., "#FF0000" or "#FF0000FF")
|
|
18
|
+
* @returns RGBAColor object with r, g, b (0-255) and a (0-1)
|
|
19
|
+
*/
|
|
20
|
+
export declare function hexToRGBA(hex: HexColor): RgbaColorStyle;
|
|
21
|
+
/**
|
|
22
|
+
* Converts RGBA values to hex color format
|
|
23
|
+
* @param r - Red value (0-255)
|
|
24
|
+
* @param g - Green value (0-255)
|
|
25
|
+
* @param b - Blue value (0-255)
|
|
26
|
+
* @param a - Alpha value (0-1), optional
|
|
27
|
+
* @returns Hex color string (e.g., "#FF0000" or "#FF0000FF" if alpha < 1)
|
|
28
|
+
*/
|
|
29
|
+
export declare function rgbaToHex(r: number, g: number, b: number, a?: number): HexColor;
|
|
30
|
+
/**
|
|
31
|
+
* Converts an RGBAColor object to hex color format
|
|
32
|
+
* @param rgba - RGBAColor object
|
|
33
|
+
* @returns Hex color string
|
|
34
|
+
*/
|
|
35
|
+
export declare function rgbaObjectToHex(rgba: RgbaColorStyle): HexColor;
|
|
36
|
+
/**
|
|
37
|
+
* Converts an RGBAColor object to CSS rgba() string format
|
|
38
|
+
* @param rgba - RGBAColor object
|
|
39
|
+
* @returns CSS rgba string (e.g., "rgba(255, 0, 0, 1)")
|
|
40
|
+
*/
|
|
41
|
+
export declare function rgbaToCssString(rgba: RgbaColorStyle): string;
|
|
42
|
+
/**
|
|
43
|
+
* Parses a CSS rgba() or rgb() string to RGBAColor object
|
|
44
|
+
* @param cssString - CSS color string (e.g., "rgba(255, 0, 0, 1)" or "rgb(255, 0, 0)")
|
|
45
|
+
* @returns RGBAColor object or null if parsing fails
|
|
46
|
+
*/
|
|
47
|
+
export declare function cssStringToRGBA(cssString: string): RgbaColorStyle | null;
|
|
48
|
+
/**
|
|
49
|
+
* Creates an RGBAColor object from individual values
|
|
50
|
+
* @param r - Red value (0-255)
|
|
51
|
+
* @param g - Green value (0-255)
|
|
52
|
+
* @param b - Blue value (0-255)
|
|
53
|
+
* @param a - Alpha value (0-1), defaults to 1
|
|
54
|
+
* @returns RGBAColor object
|
|
55
|
+
*/
|
|
56
|
+
export declare function createRGBA(r: number, g: number, b: number, a?: number): RgbaColorStyle;
|
|
57
|
+
/**
|
|
58
|
+
* Clones an RGBAColor object
|
|
59
|
+
* @param rgba - RGBAColor object to clone
|
|
60
|
+
* @returns New RGBAColor object with same values
|
|
61
|
+
*/
|
|
62
|
+
export declare function cloneRGBA(rgba: RgbaColorStyle): RgbaColorStyle;
|
|
63
|
+
/**
|
|
64
|
+
* Checks if two RGBAColor objects are equal
|
|
65
|
+
* @param rgba1 - First RGBAColor object
|
|
66
|
+
* @param rgba2 - Second RGBAColor object
|
|
67
|
+
* @returns True if all values are equal
|
|
68
|
+
*/
|
|
69
|
+
export declare function rgbaEquals(rgba1: RgbaColorStyle, rgba2: RgbaColorStyle): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Adjusts the alpha channel of an RGBA color
|
|
72
|
+
* @param rgba - Original RGBAColor object
|
|
73
|
+
* @param alpha - New alpha value (0-1)
|
|
74
|
+
* @returns New RGBAColor object with adjusted alpha
|
|
75
|
+
*/
|
|
76
|
+
export declare function adjustAlpha(rgba: RgbaColorStyle, alpha: number): RgbaColorStyle;
|
|
77
|
+
/**
|
|
78
|
+
* Lightens an RGBA color by a percentage
|
|
79
|
+
* @param rgba - Original RGBAColor object
|
|
80
|
+
* @param percentage - Amount to lighten (0-100)
|
|
81
|
+
* @returns New RGBAColor object that is lighter
|
|
82
|
+
*/
|
|
83
|
+
export declare function lightenRGBA(rgba: RgbaColorStyle, percentage: number): RgbaColorStyle;
|
|
84
|
+
/**
|
|
85
|
+
* Darkens an RGBA color by a percentage
|
|
86
|
+
* @param rgba - Original RGBAColor object
|
|
87
|
+
* @param percentage - Amount to darken (0-100)
|
|
88
|
+
* @returns New RGBAColor object that is darker
|
|
89
|
+
*/
|
|
90
|
+
export declare function darkenRGBA(rgba: RgbaColorStyle, percentage: number): RgbaColorStyle;
|
|
91
|
+
/**
|
|
92
|
+
* Converts a CSS named color to hex format
|
|
93
|
+
* @param colorName - CSS named color (case-insensitive, e.g., 'red', 'cornflowerblue')
|
|
94
|
+
* @returns Hex color string
|
|
95
|
+
* @throws Error if the color name is not recognized
|
|
96
|
+
*/
|
|
97
|
+
export declare function namedColorToHexColor(colorName: NamedColors): HexColor;
|
|
98
|
+
/**
|
|
99
|
+
* Converts a CSS named color to RGBA format
|
|
100
|
+
* @param colorName - CSS named color (case-insensitive)
|
|
101
|
+
* @returns RGBAColor object
|
|
102
|
+
* @throws Error if the color name is not recognized
|
|
103
|
+
*/
|
|
104
|
+
export declare function namedColorToRGBA(colorName: NamedColors): RgbaColorStyle;
|
|
105
|
+
/**
|
|
106
|
+
* Checks if a string is a valid CSS named color
|
|
107
|
+
* @param colorName - String to check
|
|
108
|
+
* @returns True if it's a valid named color
|
|
109
|
+
*/
|
|
110
|
+
export declare function isValidNamedColor(colorName: string): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* Attempts to find the closest named color for a given hex color
|
|
113
|
+
* @param hexColor - Hex color to match
|
|
114
|
+
* @returns Named color string or null if no close match found
|
|
115
|
+
*/
|
|
116
|
+
export declare function hexToNamedColor(hexColor: HexColor): string | null;
|
|
117
|
+
/**
|
|
118
|
+
* Attempts to find the closest named color for a given RGBA color
|
|
119
|
+
* @param rgba - RGBAColor to match
|
|
120
|
+
* @returns Named color string or null if no close match found
|
|
121
|
+
*/
|
|
122
|
+
export declare function rgbaToNamedColor(rgba: RgbaColorStyle): string | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CoordinatesStyle } from './coordinates-style';
|
|
2
|
+
import { Justifications } from './justifications';
|
|
3
|
+
import { SizeStyle } from "./size-style";
|
|
4
|
+
import { OnStyle } from './on-style';
|
|
5
|
+
import { ngStyleItem } from './ng-style-item';
|
|
6
|
+
export declare class ImageStyle implements OnStyle {
|
|
7
|
+
href: string | URL;
|
|
8
|
+
justification: Justifications;
|
|
9
|
+
size: SizeStyle | undefined;
|
|
10
|
+
coordinates: CoordinatesStyle | undefined;
|
|
11
|
+
ngOnStyle(ngStyle: ngStyleItem): ngStyleItem;
|
|
12
|
+
}
|
|
13
|
+
export declare const DEFAULT_IMAGE: ImageStyle;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
export declare enum NamedColors {
|
|
2
|
+
White = "white",
|
|
3
|
+
Black = "black",
|
|
4
|
+
Red = "red",
|
|
5
|
+
Green = "green",
|
|
6
|
+
Blue = "blue",
|
|
7
|
+
Yellow = "yellow",
|
|
8
|
+
Cyan = "cyan",
|
|
9
|
+
Magenta = "magenta",
|
|
10
|
+
Lime = "lime",
|
|
11
|
+
Maroon = "maroon",
|
|
12
|
+
Navy = "navy",
|
|
13
|
+
Olive = "olive",
|
|
14
|
+
Purple = "purple",
|
|
15
|
+
Teal = "teal",
|
|
16
|
+
Silver = "silver",
|
|
17
|
+
Gray = "gray",
|
|
18
|
+
Grey = "grey",
|
|
19
|
+
AliceBlue = "aliceblue",
|
|
20
|
+
AntiqueWhite = "antiquewhite",
|
|
21
|
+
Aqua = "aqua",
|
|
22
|
+
Aquamarine = "aquamarine",
|
|
23
|
+
Azure = "azure",
|
|
24
|
+
Beige = "beige",
|
|
25
|
+
Bisque = "bisque",
|
|
26
|
+
BlanchedAlmond = "blanchedalmond",
|
|
27
|
+
BlueViolet = "blueviolet",
|
|
28
|
+
Brown = "brown",
|
|
29
|
+
BurlyWood = "burlywood",
|
|
30
|
+
CadetBlue = "cadetblue",
|
|
31
|
+
Chartreuse = "chartreuse",
|
|
32
|
+
Chocolate = "chocolate",
|
|
33
|
+
Coral = "coral",
|
|
34
|
+
CornflowerBlue = "cornflowerblue",
|
|
35
|
+
Cornsilk = "cornsilk",
|
|
36
|
+
Crimson = "crimson",
|
|
37
|
+
DarkBlue = "darkblue",
|
|
38
|
+
DarkCyan = "darkcyan",
|
|
39
|
+
DarkGoldenRod = "darkgoldenrod",
|
|
40
|
+
DarkGray = "darkgray",
|
|
41
|
+
DarkGrey = "darkgrey",
|
|
42
|
+
DarkGreen = "darkgreen",
|
|
43
|
+
DarkKhaki = "darkkhaki",
|
|
44
|
+
DarkMagenta = "darkmagenta",
|
|
45
|
+
DarkOliveGreen = "darkolivegreen",
|
|
46
|
+
DarkOrange = "darkorange",
|
|
47
|
+
DarkOrchid = "darkorchid",
|
|
48
|
+
DarkRed = "darkred",
|
|
49
|
+
DarkSalmon = "darksalmon",
|
|
50
|
+
DarkSeaGreen = "darkseagreen",
|
|
51
|
+
DarkSlateBlue = "darkslateblue",
|
|
52
|
+
DarkSlateGray = "darkslategray",
|
|
53
|
+
DarkSlateGrey = "darkslategrey",
|
|
54
|
+
DarkTurquoise = "darkturquoise",
|
|
55
|
+
DarkViolet = "darkviolet",
|
|
56
|
+
DeepPink = "deeppink",
|
|
57
|
+
DeepSkyBlue = "deepskyblue",
|
|
58
|
+
DimGray = "dimgray",
|
|
59
|
+
DimGrey = "dimgrey",
|
|
60
|
+
DodgerBlue = "dodgerblue",
|
|
61
|
+
FireBrick = "firebrick",
|
|
62
|
+
FloralWhite = "floralwhite",
|
|
63
|
+
ForestGreen = "forestgreen",
|
|
64
|
+
Fuchsia = "fuchsia",
|
|
65
|
+
Gainsboro = "gainsboro",
|
|
66
|
+
GhostWhite = "ghostwhite",
|
|
67
|
+
Gold = "gold",
|
|
68
|
+
GoldenRod = "goldenrod",
|
|
69
|
+
GreenYellow = "greenyellow",
|
|
70
|
+
Honeydew = "honeydew",
|
|
71
|
+
HotPink = "hotpink",
|
|
72
|
+
IndianRed = "indianred",
|
|
73
|
+
Indigo = "indigo",
|
|
74
|
+
Ivory = "ivory",
|
|
75
|
+
Khaki = "khaki",
|
|
76
|
+
Lavender = "lavender",
|
|
77
|
+
LavenderBlush = "lavenderblush",
|
|
78
|
+
LawnGreen = "lawngreen",
|
|
79
|
+
LemonChiffon = "lemonchiffon",
|
|
80
|
+
LightBlue = "lightblue",
|
|
81
|
+
LightCoral = "lightcoral",
|
|
82
|
+
LightCyan = "lightcyan",
|
|
83
|
+
LightGoldenRodYellow = "lightgoldenrodyellow",
|
|
84
|
+
LightGray = "lightgray",
|
|
85
|
+
LightGrey = "lightgrey",
|
|
86
|
+
LightGreen = "lightgreen",
|
|
87
|
+
LightPink = "lightpink",
|
|
88
|
+
LightSalmon = "lightsalmon",
|
|
89
|
+
LightSeaGreen = "lightseagreen",
|
|
90
|
+
LightSkyBlue = "lightskyblue",
|
|
91
|
+
LightSlateGray = "lightslategray",
|
|
92
|
+
LightSlateGrey = "lightslategrey",
|
|
93
|
+
LightSteelBlue = "lightsteelblue",
|
|
94
|
+
LightYellow = "lightyellow",
|
|
95
|
+
LimeGreen = "limegreen",
|
|
96
|
+
Linen = "linen",
|
|
97
|
+
MediumAquaMarine = "mediumaquamarine",
|
|
98
|
+
MediumBlue = "mediumblue",
|
|
99
|
+
MediumOrchid = "mediumorchid",
|
|
100
|
+
MediumPurple = "mediumpurple",
|
|
101
|
+
MediumSeaGreen = "mediumseagreen",
|
|
102
|
+
MediumSlateBlue = "mediumslateblue",
|
|
103
|
+
MediumSpringGreen = "mediumspringgreen",
|
|
104
|
+
MediumTurquoise = "mediumturquoise",
|
|
105
|
+
MediumVioletRed = "mediumvioletred",
|
|
106
|
+
MidnightBlue = "midnightblue",
|
|
107
|
+
MintCream = "mintcream",
|
|
108
|
+
MistyRose = "mistyrose",
|
|
109
|
+
Moccasin = "moccasin",
|
|
110
|
+
NavajoWhite = "navajowhite",
|
|
111
|
+
OldLace = "oldlace",
|
|
112
|
+
OliveDrab = "olivedrab",
|
|
113
|
+
Orange = "orange",
|
|
114
|
+
OrangeRed = "orangered",
|
|
115
|
+
Orchid = "orchid",
|
|
116
|
+
PaleGoldenRod = "palegoldenrod",
|
|
117
|
+
PaleGreen = "palegreen",
|
|
118
|
+
PaleTurquoise = "paleturquoise",
|
|
119
|
+
PaleVioletRed = "palevioletred",
|
|
120
|
+
PapayaWhip = "papayawhip",
|
|
121
|
+
PeachPuff = "peachpuff",
|
|
122
|
+
Peru = "peru",
|
|
123
|
+
Pink = "pink",
|
|
124
|
+
Plum = "plum",
|
|
125
|
+
PowderBlue = "powderblue",
|
|
126
|
+
RosyBrown = "rosybrown",
|
|
127
|
+
RoyalBlue = "royalblue",
|
|
128
|
+
SaddleBrown = "saddlebrown",
|
|
129
|
+
Salmon = "salmon",
|
|
130
|
+
SandyBrown = "sandybrown",
|
|
131
|
+
SeaGreen = "seagreen",
|
|
132
|
+
SeaShell = "seashell",
|
|
133
|
+
Sienna = "sienna",
|
|
134
|
+
SkyBlue = "skyblue",
|
|
135
|
+
SlateBlue = "slateblue",
|
|
136
|
+
SlateGray = "slategray",
|
|
137
|
+
SlateGrey = "slategrey",
|
|
138
|
+
Snow = "snow",
|
|
139
|
+
SpringGreen = "springgreen",
|
|
140
|
+
SteelBlue = "steelblue",
|
|
141
|
+
Tan = "tan",
|
|
142
|
+
Thistle = "thistle",
|
|
143
|
+
Tomato = "tomato",
|
|
144
|
+
Turquoise = "turquoise",
|
|
145
|
+
Violet = "violet",
|
|
146
|
+
Wheat = "wheat",
|
|
147
|
+
WhiteSmoke = "whitesmoke",
|
|
148
|
+
YellowGreen = "yellowgreen",
|
|
149
|
+
Transparent = "transparent"
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Comprehensive mapping of CSS named colors to their hex values.
|
|
153
|
+
* Based on CSS Color Module Level 4 specification.
|
|
154
|
+
*/
|
|
155
|
+
export declare const NAMED_COLOR_MAP: Record<NamedColors, string>;
|
|
156
|
+
/**
|
|
157
|
+
* Converts a named color to its hex representation
|
|
158
|
+
* @param colorName - CSS named color (case-insensitive)
|
|
159
|
+
* @returns Hex color string or null if color name is not recognized
|
|
160
|
+
*/
|
|
161
|
+
export declare function namedColorToHex(colorName: NamedColors): string | null;
|
|
162
|
+
/**
|
|
163
|
+
* Checks if a string is a valid CSS named color
|
|
164
|
+
* @param colorName - String to check
|
|
165
|
+
* @returns True if it's a valid named color
|
|
166
|
+
*/
|
|
167
|
+
export declare function isNamedColor(colorName: string): boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Gets all available named color names
|
|
170
|
+
* @returns Array of all CSS named color names
|
|
171
|
+
*/
|
|
172
|
+
export declare function getNamedColors(): string[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HexColor } from './hex-color';
|
|
2
|
+
import { NamedColors } from './named-colors';
|
|
3
|
+
import { OnStyle } from './on-style';
|
|
4
|
+
import { ngStyleItem } from './ng-style-item';
|
|
5
|
+
export declare class RgbaColorStyle implements OnStyle {
|
|
6
|
+
ngOnStyle(ngStyle: ngStyleItem): ngStyleItem;
|
|
7
|
+
r: number;
|
|
8
|
+
g: number;
|
|
9
|
+
b: number;
|
|
10
|
+
a: number;
|
|
11
|
+
static fromHexColor(hexColor: HexColor): RgbaColorStyle;
|
|
12
|
+
static fromNamedColor(colorName: NamedColors): RgbaColorStyle;
|
|
13
|
+
toHexColor(includeAlpha?: boolean): HexColor;
|
|
14
|
+
toCssString(): string;
|
|
15
|
+
toNamedColor(): string | null;
|
|
16
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { OnStyle } from './on-style';
|
|
2
|
+
import { ngStyleItem } from './ng-style-item';
|
|
3
|
+
export declare class SizeStyle implements OnStyle {
|
|
4
|
+
ngOnStyle(ngStyle: ngStyleItem): ngStyleItem;
|
|
5
|
+
width: number | string | any | undefined;
|
|
6
|
+
height: number | string | any | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare const DEFAULT_SIZE: SizeStyle;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ColorStyle } from './color-style';
|
|
2
|
+
import { FontStyle } from './font-style';
|
|
3
|
+
import { ImageStyle } from './image-style';
|
|
4
|
+
import { OnStyle } from './on-style';
|
|
5
|
+
import { ngStyleItem } from './ng-style-item';
|
|
6
|
+
export declare class TextStyle implements OnStyle {
|
|
7
|
+
font: FontStyle | undefined;
|
|
8
|
+
textColor: ColorStyle | undefined;
|
|
9
|
+
backgroundColor: ColorStyle | undefined;
|
|
10
|
+
watermark: string | undefined;
|
|
11
|
+
image: ImageStyle | undefined;
|
|
12
|
+
value: string;
|
|
13
|
+
ngOnStyle(ngStyle: ngStyleItem): ngStyleItem;
|
|
14
|
+
}
|
|
15
|
+
export declare const DEFAULT_TEXT_STYLE: TextStyle;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CreditCard } from "
|
|
2
|
-
import { Subscription } from "
|
|
1
|
+
import { CreditCard } from "../credit-card";
|
|
2
|
+
import { Subscription } from "../subscription";
|
|
3
3
|
export interface CreateSubscriptionRequest {
|
|
4
4
|
creditCard: CreditCard;
|
|
5
5
|
subscription: Subscription;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
|
-
import { CreateSubscriptionRequest } from '../models/create-subscription-request';
|
|
2
|
+
import { CreateSubscriptionRequest } from '../models/webapi-requests/create-subscription-request';
|
|
3
3
|
import { ClassLoggerService } from './class-logger.service';
|
|
4
4
|
import { ConfigService } from './config.service';
|
|
5
5
|
import { BaseApiService } from './base-api.service';
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -17,23 +17,26 @@ export * from './lib/models/config/carousel-config';
|
|
|
17
17
|
export * from './lib/models/config/configuration';
|
|
18
18
|
export * from './lib/models/config/menu-board-config';
|
|
19
19
|
export * from './lib/models/config/subscription-config';
|
|
20
|
-
export * from './lib/models/
|
|
20
|
+
export * from './lib/models/style/color-style';
|
|
21
|
+
export * from './lib/models/style/coordinates-style';
|
|
22
|
+
export * from './lib/models/style/font-style';
|
|
23
|
+
export * from './lib/models/style/hex-color';
|
|
24
|
+
export * from './lib/models/style/image-style';
|
|
25
|
+
export * from './lib/models/style/justifications';
|
|
26
|
+
export * from './lib/models/style/ng-style-item';
|
|
27
|
+
export * from './lib/models/style/on-style';
|
|
28
|
+
export * from './lib/models/style/rgba-color-style';
|
|
29
|
+
export * from './lib/models/style/size-style';
|
|
30
|
+
export * from './lib/models/style/text-style';
|
|
31
|
+
export * from './lib/models/webapi-requests/create-subscription-request';
|
|
21
32
|
export * from './lib/models/cannabinoid-information';
|
|
22
33
|
export * from './lib/models/category';
|
|
23
|
-
export * from './lib/models/
|
|
34
|
+
export * from './lib/models/category-slide';
|
|
24
35
|
export * from './lib/models/credit-card';
|
|
25
36
|
export * from './lib/models/customer';
|
|
26
37
|
export * from './lib/models/flowhub-product';
|
|
27
|
-
export * from './lib/models/font';
|
|
28
|
-
export * from './lib/models/image';
|
|
29
38
|
export * from './lib/models/inventory-api-response';
|
|
30
|
-
export * from './lib/models/justifications';
|
|
31
39
|
export * from './lib/models/log-levels';
|
|
32
|
-
export * from './lib/models/logging-verbosity';
|
|
33
|
-
export * from './lib/models/model-map';
|
|
34
|
-
export * from './lib/models/named-colors';
|
|
35
|
-
export * from './lib/models/on-element-style';
|
|
36
|
-
export * from './lib/models/product';
|
|
37
40
|
export * from './lib/models/profile';
|
|
38
41
|
export * from './lib/models/slide';
|
|
39
42
|
export * from './lib/models/subscription';
|
package/lib/models/color.d.ts
DELETED
package/lib/models/font.d.ts
DELETED
package/lib/models/image.d.ts
DELETED