customized-fabric 1.8.4 → 1.8.6
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.
@@ -1,5 +1,5 @@
|
|
1
1
|
import { fabric } from "fabric";
|
2
|
-
import { ICalendarOptions } from "./interfaces";
|
2
|
+
import { CalendarSettings, ICalendarOptions } from "./interfaces";
|
3
3
|
import { ObjectId } from "../utils/objectId";
|
4
4
|
export declare const toCalendarObject: (object: Calendar) => {
|
5
5
|
_id: ObjectId | undefined;
|
@@ -18,6 +18,7 @@ export declare const toCalendarObject: (object: Calendar) => {
|
|
18
18
|
titleAlignment: string | undefined;
|
19
19
|
titleColor: string | undefined;
|
20
20
|
titleFontUrl: string | undefined;
|
21
|
+
letterCase: string | undefined;
|
21
22
|
dayColor: string | undefined;
|
22
23
|
dayFontUrl: string | undefined;
|
23
24
|
markerColor: string | undefined;
|
@@ -40,6 +41,7 @@ export default class Calendar extends fabric.Group {
|
|
40
41
|
calendarTitleAlignment?: string;
|
41
42
|
calendarTitleColor?: string;
|
42
43
|
calendarTitleFontUrl?: string;
|
44
|
+
calendarLetterCase?: string;
|
43
45
|
calendarDayColor?: string;
|
44
46
|
calendarDayFontUrl?: string;
|
45
47
|
calendarMarkerColor?: string;
|
@@ -52,5 +54,6 @@ export default class Calendar extends fabric.Group {
|
|
52
54
|
}) => void;
|
53
55
|
loadImage?: (imageInput: File | string) => Promise<void>;
|
54
56
|
fitImage?: (image: fabric.Image, cover?: boolean) => void;
|
57
|
+
getCalendarAttributes?: () => CalendarSettings;
|
55
58
|
constructor(options?: ICalendarOptions);
|
56
59
|
}
|
@@ -103,6 +103,22 @@ const CalendarClass = fabric_1.fabric.util.createClass(fabric_1.fabric.Group, {
|
|
103
103
|
getSettings: function (attribute) {
|
104
104
|
return this.get(attribute);
|
105
105
|
},
|
106
|
+
getCalendarAttributes: function () {
|
107
|
+
return {
|
108
|
+
width: this?.calendarWidth,
|
109
|
+
height: this?.calendarHeight,
|
110
|
+
backgroundColor: this?.calendarBackgroundColor,
|
111
|
+
titleAlignment: this?.calendarTitleAlignment,
|
112
|
+
titleColor: this?.calendarTitleColor,
|
113
|
+
titleFontUrl: this?.calendarTitleFontUrl,
|
114
|
+
letterCase: this?.calendarLetterCase,
|
115
|
+
dayColor: this?.calendarDayColor,
|
116
|
+
dayFontUrl: this?.calendarDayFontUrl,
|
117
|
+
markerColor: this?.calendarMarkerColor,
|
118
|
+
markerUrl: this?.calendarMarkerUrl,
|
119
|
+
date: this?.calendarDate,
|
120
|
+
};
|
121
|
+
},
|
106
122
|
});
|
107
123
|
const toCalendarObject = (object) => {
|
108
124
|
return {
|
@@ -122,6 +138,7 @@ const toCalendarObject = (object) => {
|
|
122
138
|
titleAlignment: object?.calendarTitleAlignment,
|
123
139
|
titleColor: object?.calendarTitleColor,
|
124
140
|
titleFontUrl: object?.calendarTitleFontUrl,
|
141
|
+
letterCase: object?.calendarLetterCase,
|
125
142
|
dayColor: object?.calendarDayColor,
|
126
143
|
dayFontUrl: object?.calendarDayFontUrl,
|
127
144
|
markerColor: object?.calendarMarkerColor,
|
@@ -1,4 +1,18 @@
|
|
1
1
|
import { ObjectId } from "../utils/objectId";
|
2
|
+
export interface CalendarSettings {
|
3
|
+
width?: number;
|
4
|
+
height?: number;
|
5
|
+
backgroundColor?: string;
|
6
|
+
titleAlignment?: string;
|
7
|
+
titleColor?: string;
|
8
|
+
titleFontUrl?: string;
|
9
|
+
letterCase?: string;
|
10
|
+
dayColor?: string;
|
11
|
+
dayFontUrl?: string;
|
12
|
+
markerColor?: string;
|
13
|
+
markerUrl?: string;
|
14
|
+
date?: string;
|
15
|
+
}
|
2
16
|
export interface ICalendarOptions extends fabric.IGroupOptions {
|
3
17
|
_id?: ObjectId;
|
4
18
|
personalizeId?: number;
|
@@ -7,17 +21,5 @@ export interface ICalendarOptions extends fabric.IGroupOptions {
|
|
7
21
|
isOriginal?: boolean;
|
8
22
|
isAdditional?: boolean;
|
9
23
|
hideStroke?: boolean;
|
10
|
-
calendarSettings?:
|
11
|
-
width?: number;
|
12
|
-
height?: number;
|
13
|
-
backgroundColor?: string;
|
14
|
-
titleAlignment?: string;
|
15
|
-
titleColor?: string;
|
16
|
-
titleFontUrl?: string;
|
17
|
-
dayColor?: string;
|
18
|
-
dayFontUrl?: string;
|
19
|
-
markerColor?: string;
|
20
|
-
markerUrl?: string;
|
21
|
-
date?: string;
|
22
|
-
};
|
24
|
+
calendarSettings?: CalendarSettings;
|
23
25
|
}
|