@leafer-ui/data 1.11.1 → 1.12.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/package.json +5 -5
- package/src/TextData.ts +9 -1
- package/types/index.d.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafer-ui/data",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "@leafer-ui/data",
|
|
5
5
|
"author": "Chao (Leafer) Wan",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"leaferjs"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@leafer/core": "1.
|
|
26
|
-
"@leafer-ui/external": "1.
|
|
25
|
+
"@leafer/core": "1.12.0",
|
|
26
|
+
"@leafer-ui/external": "1.12.0"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@leafer/interface": "1.
|
|
30
|
-
"@leafer-ui/interface": "1.
|
|
29
|
+
"@leafer/interface": "1.12.0",
|
|
30
|
+
"@leafer-ui/interface": "1.12.0"
|
|
31
31
|
}
|
|
32
32
|
}
|
package/src/TextData.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { IJSONOptions } from '@leafer/interface'
|
|
1
2
|
import { UICreator, isString } from '@leafer/core'
|
|
2
3
|
|
|
3
|
-
import { IFontWeight, ITextData, IUI, IText, IObject, IBackgroundBoxStyle, IFontWeightNumer } from '@leafer-ui/interface'
|
|
4
|
+
import { IFontWeight, ITextData, IUI, IText, IObject, IBackgroundBoxStyle, IFontWeightNumer, ITextInputData } from '@leafer-ui/interface'
|
|
4
5
|
|
|
5
6
|
import { UIData } from "./UIData"
|
|
6
7
|
|
|
7
8
|
|
|
9
|
+
|
|
8
10
|
const fontWeightMap = {
|
|
9
11
|
'thin': 100,
|
|
10
12
|
'extra-light': 200,
|
|
@@ -56,4 +58,10 @@ export class TextData extends UIData implements ITextData {
|
|
|
56
58
|
|
|
57
59
|
}
|
|
58
60
|
|
|
61
|
+
public __getInputData(names?: string[] | IObject, options?: IJSONOptions): IObject {
|
|
62
|
+
const data: ITextInputData = super.__getInputData(names, options)
|
|
63
|
+
if (data.textEditing) delete data.textEditing
|
|
64
|
+
return data
|
|
65
|
+
}
|
|
66
|
+
|
|
59
67
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INumber, IPointData, IBoolean, IValue, IPathCommandData, IPathCommandNode, IPathCommandObject, IPathString } from '@leafer/interface';
|
|
1
|
+
import { INumber, IPointData, IBoolean, IValue, IPathCommandData, IPathCommandNode, IPathCommandObject, IPathString, IJSONOptions as IJSONOptions$1 } from '@leafer/interface';
|
|
2
2
|
import { LeafData } from '@leafer/core';
|
|
3
3
|
import { IUIData, IUI, IStrokeComputedStyle, IGroupData, IBoxData, ILeaferData, IObject, IJSONOptions, IFrameData, ILineData, IRectData, IEllipseData, IPolygonData, IStarData, IPathData, IPenData, ITextData, IBackgroundBoxStyle, IFontWeight, IImageData, IImage, ICanvasData } from '@leafer-ui/interface';
|
|
4
4
|
|
|
@@ -93,6 +93,7 @@ declare class TextData extends UIData implements ITextData {
|
|
|
93
93
|
protected _boxStyle?: IBackgroundBoxStyle;
|
|
94
94
|
setFontWeight(value: IFontWeight): void;
|
|
95
95
|
setBoxStyle(value: IUI): void;
|
|
96
|
+
__getInputData(names?: string[] | IObject, options?: IJSONOptions$1): IObject;
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
declare class ImageData extends RectData implements IImageData {
|