@itwin/editor-frontend 4.0.0-dev.8 → 4.0.0-dev.81

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.
Files changed (89) hide show
  1. package/CHANGELOG.md +44 -1
  2. package/lib/cjs/CreateElementTool.d.ts +100 -100
  3. package/lib/cjs/CreateElementTool.js +325 -327
  4. package/lib/cjs/CreateElementTool.js.map +1 -1
  5. package/lib/cjs/DeleteElementsTool.d.ts +13 -13
  6. package/lib/cjs/DeleteElementsTool.js +38 -38
  7. package/lib/cjs/DeleteElementsTool.js.map +1 -1
  8. package/lib/cjs/EditTool.d.ts +38 -38
  9. package/lib/cjs/EditTool.js +80 -81
  10. package/lib/cjs/EditTool.js.map +1 -1
  11. package/lib/cjs/EditToolIpc.d.ts +18 -18
  12. package/lib/cjs/EditToolIpc.js +28 -28
  13. package/lib/cjs/ElementGeometryTool.d.ts +147 -147
  14. package/lib/cjs/ElementGeometryTool.js +704 -709
  15. package/lib/cjs/ElementGeometryTool.js.map +1 -1
  16. package/lib/cjs/ModifyCurveTools.d.ts +139 -139
  17. package/lib/cjs/ModifyCurveTools.js +776 -784
  18. package/lib/cjs/ModifyCurveTools.js.map +1 -1
  19. package/lib/cjs/ModifyElementTool.d.ts +47 -47
  20. package/lib/cjs/ModifyElementTool.js +177 -177
  21. package/lib/cjs/ModifyElementTool.js.map +1 -1
  22. package/lib/cjs/ProjectLocation/ProjectExtentsDecoration.d.ts +135 -135
  23. package/lib/cjs/ProjectLocation/ProjectExtentsDecoration.js +822 -822
  24. package/lib/cjs/ProjectLocation/ProjectExtentsDecoration.js.map +1 -1
  25. package/lib/cjs/ProjectLocation/ProjectGeolocation.d.ts +135 -135
  26. package/lib/cjs/ProjectLocation/ProjectGeolocation.js +532 -532
  27. package/lib/cjs/ProjectLocation/ProjectGeolocation.js.map +1 -1
  28. package/lib/cjs/SketchTools.d.ts +304 -304
  29. package/lib/cjs/SketchTools.js +1704 -1705
  30. package/lib/cjs/SketchTools.js.map +1 -1
  31. package/lib/cjs/SolidModelingTools.d.ts +380 -380
  32. package/lib/cjs/SolidModelingTools.js +1452 -1462
  33. package/lib/cjs/SolidModelingTools.js.map +1 -1
  34. package/lib/cjs/SolidPrimitiveTools.d.ts +318 -318
  35. package/lib/cjs/SolidPrimitiveTools.js +1372 -1378
  36. package/lib/cjs/SolidPrimitiveTools.js.map +1 -1
  37. package/lib/cjs/TransformElementsTool.d.ts +164 -164
  38. package/lib/cjs/TransformElementsTool.js +652 -652
  39. package/lib/cjs/TransformElementsTool.js.map +1 -1
  40. package/lib/cjs/UndoRedoTool.d.ts +16 -16
  41. package/lib/cjs/UndoRedoTool.js +41 -42
  42. package/lib/cjs/UndoRedoTool.js.map +1 -1
  43. package/lib/cjs/editor-frontend.d.ts +17 -17
  44. package/lib/cjs/editor-frontend.js +37 -33
  45. package/lib/cjs/editor-frontend.js.map +1 -1
  46. package/lib/esm/CreateElementTool.d.ts +100 -100
  47. package/lib/esm/CreateElementTool.js +317 -319
  48. package/lib/esm/CreateElementTool.js.map +1 -1
  49. package/lib/esm/DeleteElementsTool.d.ts +13 -13
  50. package/lib/esm/DeleteElementsTool.js +35 -34
  51. package/lib/esm/DeleteElementsTool.js.map +1 -1
  52. package/lib/esm/EditTool.d.ts +38 -38
  53. package/lib/esm/EditTool.js +77 -77
  54. package/lib/esm/EditTool.js.map +1 -1
  55. package/lib/esm/EditToolIpc.d.ts +18 -18
  56. package/lib/esm/EditToolIpc.js +24 -24
  57. package/lib/esm/ElementGeometryTool.d.ts +147 -147
  58. package/lib/esm/ElementGeometryTool.js +696 -701
  59. package/lib/esm/ElementGeometryTool.js.map +1 -1
  60. package/lib/esm/ModifyCurveTools.d.ts +139 -139
  61. package/lib/esm/ModifyCurveTools.js +771 -775
  62. package/lib/esm/ModifyCurveTools.js.map +1 -1
  63. package/lib/esm/ModifyElementTool.d.ts +47 -47
  64. package/lib/esm/ModifyElementTool.js +172 -172
  65. package/lib/esm/ModifyElementTool.js.map +1 -1
  66. package/lib/esm/ProjectLocation/ProjectExtentsDecoration.d.ts +135 -135
  67. package/lib/esm/ProjectLocation/ProjectExtentsDecoration.js +818 -814
  68. package/lib/esm/ProjectLocation/ProjectExtentsDecoration.js.map +1 -1
  69. package/lib/esm/ProjectLocation/ProjectGeolocation.d.ts +135 -135
  70. package/lib/esm/ProjectLocation/ProjectGeolocation.js +529 -526
  71. package/lib/esm/ProjectLocation/ProjectGeolocation.js.map +1 -1
  72. package/lib/esm/SketchTools.d.ts +304 -304
  73. package/lib/esm/SketchTools.js +1700 -1695
  74. package/lib/esm/SketchTools.js.map +1 -1
  75. package/lib/esm/SolidModelingTools.d.ts +380 -380
  76. package/lib/esm/SolidModelingTools.js +1444 -1437
  77. package/lib/esm/SolidModelingTools.js.map +1 -1
  78. package/lib/esm/SolidPrimitiveTools.d.ts +318 -318
  79. package/lib/esm/SolidPrimitiveTools.js +1368 -1367
  80. package/lib/esm/SolidPrimitiveTools.js.map +1 -1
  81. package/lib/esm/TransformElementsTool.d.ts +164 -164
  82. package/lib/esm/TransformElementsTool.js +647 -644
  83. package/lib/esm/TransformElementsTool.js.map +1 -1
  84. package/lib/esm/UndoRedoTool.d.ts +16 -16
  85. package/lib/esm/UndoRedoTool.js +38 -36
  86. package/lib/esm/UndoRedoTool.js.map +1 -1
  87. package/lib/esm/editor-frontend.d.ts +17 -17
  88. package/lib/esm/editor-frontend.js +21 -21
  89. package/package.json +20 -20
@@ -1,136 +1,136 @@
1
- /** @packageDocumentation
2
- * @module Editing
3
- */
4
- import { BeEvent } from "@itwin/core-bentley";
5
- import { Cartographic, EcefLocation, EcefLocationProps } from "@itwin/core-common";
6
- import { BeButtonEvent, BriefcaseConnection, DecorateContext, EditManipulator, EventHandled, HitDetail, IModelConnection, ScreenViewport, Tool, ViewClipControlArrow } from "@itwin/core-frontend";
7
- import { Angle, ClipShape, ClipVector, Point3d, Range1d, Range3d, Range3dProps, Ray3d } from "@itwin/core-geometry";
8
- declare class ProjectExtentsControlArrow extends ViewClipControlArrow {
9
- extentValid: boolean;
10
- }
11
- /** Values for [[ProjectExtentsClipDecoration.onChanged] event.
12
- * @beta
13
- */
14
- export declare enum ProjectLocationChanged {
15
- /** Extents has been modified (unsaved changes) */
16
- Extents = 0,
17
- /** Geolocation has been modified (unsaved changes) */
18
- Geolocation = 1,
19
- /** Abandon unsaved changes to extents */
20
- ResetExtents = 2,
21
- /** Abandon unsaved changes to geolocation */
22
- ResetGeolocation = 3,
23
- /** Decoration hidden (unsaved changes preserved) */
24
- Hide = 4,
25
- /** Decoration shown (unsaved changes restored) */
26
- Show = 5,
27
- /** Save changes to extents and geolocation */
28
- Save = 6
29
- }
30
- /** Controls to modify project extents shown using view clip
31
- * @beta
32
- */
33
- export declare class ProjectExtentsClipDecoration extends EditManipulator.HandleProvider {
34
- viewport: ScreenViewport;
35
- private static _decorator?;
36
- protected _clip?: ClipVector;
37
- protected _clipId?: string;
38
- protected _clipShape?: ClipShape;
39
- protected _clipShapeExtents?: Range1d;
40
- protected _clipRange?: Range3d;
41
- protected _extentsLengthValid: boolean;
42
- protected _extentsWidthValid: boolean;
43
- protected _extentsHeightValid: boolean;
44
- protected _ecefLocation?: EcefLocation;
45
- protected _allowEcefLocationChange: boolean;
46
- protected _controlIds: string[];
47
- protected _controls: ProjectExtentsControlArrow[];
48
- protected _monumentPoint?: Point3d;
49
- protected _northDirection?: Ray3d;
50
- protected _monumentId?: string;
51
- protected _northId?: string;
52
- protected _suspendDecorator: boolean;
53
- protected _removeViewCloseListener?: () => void;
54
- suspendGeolocationDecorations: boolean;
55
- /** Called when project extents or geolocation is modified */
56
- readonly onChanged: BeEvent<(iModel: IModelConnection, ev: ProjectLocationChanged) => void>;
57
- constructor(viewport: ScreenViewport);
58
- protected start(): void;
59
- protected stop(): void;
60
- protected init(): boolean;
61
- onViewClose(vp: ScreenViewport): void;
62
- private getClipData;
63
- private ensureNumControls;
64
- private createClipShapeControls;
65
- /** Allow project extents for map projections to be larger since curvature of the earth is accounted for. */
66
- protected get maxExtentLength(): number;
67
- /** Impose some reasonable height limit for project extents. */
68
- protected get maxExtentHeight(): number;
69
- protected hasValidGCS(): boolean;
70
- protected createControls(): Promise<boolean>;
71
- protected clearControls(): void;
72
- protected modifyControls(hit: HitDetail, _ev: BeButtonEvent): Promise<boolean>;
73
- protected onRightClick(_hit: HitDetail, _ev: BeButtonEvent): Promise<EventHandled>;
74
- protected onTouchTap(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled>;
75
- onDecorationButtonEvent(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled>;
76
- onManipulatorEvent(eventType: EditManipulator.EventType): void;
77
- getDecorationToolTip(hit: HitDetail): Promise<HTMLElement | string>;
78
- testDecorationHit(id: string): boolean;
79
- protected updateDecorationListener(_add: boolean): void;
80
- getMonumentPoint(): Point3d;
81
- getClockwiseAngleToNorth(): Angle;
82
- getNorthAngle(): Angle;
83
- getNorthDirection(refOrigin?: Point3d): Ray3d;
84
- drawNorthArrow(context: DecorateContext, northDir: Ray3d, id?: string): void;
85
- drawMonumentPoint(context: DecorateContext, point: Point3d, scaleFactor: number, id?: string): void;
86
- protected drawAreaTooLargeIndicator(context: DecorateContext): void;
87
- protected drawExtentTooLargeIndicator(context: DecorateContext, worldPoint: Point3d, sizePixels: number): void;
88
- decorate(context: DecorateContext): void;
89
- resetViewClip(): boolean;
90
- resetGeolocation(): boolean;
91
- updateEcefLocation(origin: Cartographic, point?: Point3d, angle?: Angle): boolean;
92
- updateNorthDirection(northDir: Ray3d): boolean;
93
- getModifiedEcefLocation(): EcefLocation | undefined;
94
- getModifiedExtents(): Range3d | undefined;
95
- static allowEcefLocationChange(requireExisting: boolean, outputError?: boolean): boolean;
96
- fitExtents(): void;
97
- static get(): ProjectExtentsClipDecoration | undefined;
98
- static show(vp: ScreenViewport, fitExtents?: boolean): boolean;
99
- static hide(): void;
100
- static clear(clearClip?: boolean, resetGeolocation?: boolean): void;
101
- static update(): Promise<void>;
102
- }
103
- /** Show project location decoration. Project extents represented by view clip.
104
- * @beta
105
- */
106
- export declare class ProjectLocationShowTool extends Tool {
107
- static toolId: string;
108
- run(): Promise<boolean>;
109
- }
110
- /** Hide project location decoration. Preserves changes to project extents view clip and geolocation.
111
- * @beta
112
- */
113
- export declare class ProjectLocationHideTool extends Tool {
114
- static toolId: string;
115
- run(): Promise<boolean>;
116
- }
117
- /** Clear project location decoration. Restore modified geolocation and remove view clip.
118
- * @beta
119
- */
120
- export declare class ProjectLocationCancelTool extends Tool {
121
- static toolId: string;
122
- run(): Promise<boolean>;
123
- }
124
- /** Save modified project extents and geolocation. Updates decoration to reflect saved state.
125
- * @note Allowing this change to be undone is both problematic and undesirable.
126
- * Warns the user if called with previous changes to cancel restarting the TxnManager session.
127
- * @beta
128
- */
129
- export declare class ProjectLocationSaveTool extends Tool {
130
- static toolId: string;
131
- protected allowRestartTxnSession(iModel: BriefcaseConnection): Promise<boolean>;
132
- protected saveChanges(deco: ProjectExtentsClipDecoration, extents?: Range3dProps, ecefLocation?: EcefLocationProps): Promise<void>;
133
- run(): Promise<boolean>;
134
- }
135
- export {};
1
+ /** @packageDocumentation
2
+ * @module Editing
3
+ */
4
+ import { BeEvent } from "@itwin/core-bentley";
5
+ import { Cartographic, EcefLocation, EcefLocationProps } from "@itwin/core-common";
6
+ import { BeButtonEvent, BriefcaseConnection, DecorateContext, EditManipulator, EventHandled, HitDetail, IModelConnection, ScreenViewport, Tool, ViewClipControlArrow } from "@itwin/core-frontend";
7
+ import { Angle, ClipShape, ClipVector, Point3d, Range1d, Range3d, Range3dProps, Ray3d } from "@itwin/core-geometry";
8
+ declare class ProjectExtentsControlArrow extends ViewClipControlArrow {
9
+ extentValid: boolean;
10
+ }
11
+ /** Values for [[ProjectExtentsClipDecoration.onChanged] event.
12
+ * @beta
13
+ */
14
+ export declare enum ProjectLocationChanged {
15
+ /** Extents has been modified (unsaved changes) */
16
+ Extents = 0,
17
+ /** Geolocation has been modified (unsaved changes) */
18
+ Geolocation = 1,
19
+ /** Abandon unsaved changes to extents */
20
+ ResetExtents = 2,
21
+ /** Abandon unsaved changes to geolocation */
22
+ ResetGeolocation = 3,
23
+ /** Decoration hidden (unsaved changes preserved) */
24
+ Hide = 4,
25
+ /** Decoration shown (unsaved changes restored) */
26
+ Show = 5,
27
+ /** Save changes to extents and geolocation */
28
+ Save = 6
29
+ }
30
+ /** Controls to modify project extents shown using view clip
31
+ * @beta
32
+ */
33
+ export declare class ProjectExtentsClipDecoration extends EditManipulator.HandleProvider {
34
+ viewport: ScreenViewport;
35
+ private static _decorator?;
36
+ protected _clip?: ClipVector;
37
+ protected _clipId?: string;
38
+ protected _clipShape?: ClipShape;
39
+ protected _clipShapeExtents?: Range1d;
40
+ protected _clipRange?: Range3d;
41
+ protected _extentsLengthValid: boolean;
42
+ protected _extentsWidthValid: boolean;
43
+ protected _extentsHeightValid: boolean;
44
+ protected _ecefLocation?: EcefLocation;
45
+ protected _allowEcefLocationChange: boolean;
46
+ protected _controlIds: string[];
47
+ protected _controls: ProjectExtentsControlArrow[];
48
+ protected _monumentPoint?: Point3d;
49
+ protected _northDirection?: Ray3d;
50
+ protected _monumentId?: string;
51
+ protected _northId?: string;
52
+ protected _suspendDecorator: boolean;
53
+ protected _removeViewCloseListener?: () => void;
54
+ suspendGeolocationDecorations: boolean;
55
+ /** Called when project extents or geolocation is modified */
56
+ readonly onChanged: BeEvent<(iModel: IModelConnection, ev: ProjectLocationChanged) => void>;
57
+ constructor(viewport: ScreenViewport);
58
+ protected start(): void;
59
+ protected stop(): void;
60
+ protected init(): boolean;
61
+ onViewClose(vp: ScreenViewport): void;
62
+ private getClipData;
63
+ private ensureNumControls;
64
+ private createClipShapeControls;
65
+ /** Allow project extents for map projections to be larger since curvature of the earth is accounted for. */
66
+ protected get maxExtentLength(): number;
67
+ /** Impose some reasonable height limit for project extents. */
68
+ protected get maxExtentHeight(): number;
69
+ protected hasValidGCS(): boolean;
70
+ protected createControls(): Promise<boolean>;
71
+ protected clearControls(): void;
72
+ protected modifyControls(hit: HitDetail, _ev: BeButtonEvent): Promise<boolean>;
73
+ protected onRightClick(_hit: HitDetail, _ev: BeButtonEvent): Promise<EventHandled>;
74
+ protected onTouchTap(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled>;
75
+ onDecorationButtonEvent(hit: HitDetail, ev: BeButtonEvent): Promise<EventHandled>;
76
+ onManipulatorEvent(eventType: EditManipulator.EventType): void;
77
+ getDecorationToolTip(hit: HitDetail): Promise<HTMLElement | string>;
78
+ testDecorationHit(id: string): boolean;
79
+ protected updateDecorationListener(_add: boolean): void;
80
+ getMonumentPoint(): Point3d;
81
+ getClockwiseAngleToNorth(): Angle;
82
+ getNorthAngle(): Angle;
83
+ getNorthDirection(refOrigin?: Point3d): Ray3d;
84
+ drawNorthArrow(context: DecorateContext, northDir: Ray3d, id?: string): void;
85
+ drawMonumentPoint(context: DecorateContext, point: Point3d, scaleFactor: number, id?: string): void;
86
+ protected drawAreaTooLargeIndicator(context: DecorateContext): void;
87
+ protected drawExtentTooLargeIndicator(context: DecorateContext, worldPoint: Point3d, sizePixels: number): void;
88
+ decorate(context: DecorateContext): void;
89
+ resetViewClip(): boolean;
90
+ resetGeolocation(): boolean;
91
+ updateEcefLocation(origin: Cartographic, point?: Point3d, angle?: Angle): boolean;
92
+ updateNorthDirection(northDir: Ray3d): boolean;
93
+ getModifiedEcefLocation(): EcefLocation | undefined;
94
+ getModifiedExtents(): Range3d | undefined;
95
+ static allowEcefLocationChange(requireExisting: boolean, outputError?: boolean): boolean;
96
+ fitExtents(): void;
97
+ static get(): ProjectExtentsClipDecoration | undefined;
98
+ static show(vp: ScreenViewport, fitExtents?: boolean): boolean;
99
+ static hide(): void;
100
+ static clear(clearClip?: boolean, resetGeolocation?: boolean): void;
101
+ static update(): Promise<void>;
102
+ }
103
+ /** Show project location decoration. Project extents represented by view clip.
104
+ * @beta
105
+ */
106
+ export declare class ProjectLocationShowTool extends Tool {
107
+ static toolId: string;
108
+ run(): Promise<boolean>;
109
+ }
110
+ /** Hide project location decoration. Preserves changes to project extents view clip and geolocation.
111
+ * @beta
112
+ */
113
+ export declare class ProjectLocationHideTool extends Tool {
114
+ static toolId: string;
115
+ run(): Promise<boolean>;
116
+ }
117
+ /** Clear project location decoration. Restore modified geolocation and remove view clip.
118
+ * @beta
119
+ */
120
+ export declare class ProjectLocationCancelTool extends Tool {
121
+ static toolId: string;
122
+ run(): Promise<boolean>;
123
+ }
124
+ /** Save modified project extents and geolocation. Updates decoration to reflect saved state.
125
+ * @note Allowing this change to be undone is both problematic and undesirable.
126
+ * Warns the user if called with previous changes to cancel restarting the TxnManager session.
127
+ * @beta
128
+ */
129
+ export declare class ProjectLocationSaveTool extends Tool {
130
+ static toolId: string;
131
+ protected allowRestartTxnSession(iModel: BriefcaseConnection): Promise<boolean>;
132
+ protected saveChanges(deco: ProjectExtentsClipDecoration, extents?: Range3dProps, ecefLocation?: EcefLocationProps): Promise<void>;
133
+ run(): Promise<boolean>;
134
+ }
135
+ export {};
136
136
  //# sourceMappingURL=ProjectExtentsDecoration.d.ts.map