@itwin/editor-frontend 3.6.0-dev.8 → 3.6.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.
Files changed (98) hide show
  1. package/CHANGELOG.md +34 -1
  2. package/LICENSE.md +1 -1
  3. package/lib/cjs/CreateElementTool.d.ts +100 -100
  4. package/lib/cjs/CreateElementTool.js +327 -327
  5. package/lib/cjs/CreateElementTool.js.map +1 -1
  6. package/lib/cjs/DeleteElementsTool.d.ts +13 -13
  7. package/lib/cjs/DeleteElementsTool.js +38 -38
  8. package/lib/cjs/DeleteElementsTool.js.map +1 -1
  9. package/lib/cjs/EditTool.d.ts +38 -36
  10. package/lib/cjs/EditTool.d.ts.map +1 -1
  11. package/lib/cjs/EditTool.js +81 -135
  12. package/lib/cjs/EditTool.js.map +1 -1
  13. package/lib/cjs/EditToolIpc.d.ts +18 -17
  14. package/lib/cjs/EditToolIpc.d.ts.map +1 -1
  15. package/lib/cjs/EditToolIpc.js +28 -27
  16. package/lib/cjs/EditToolIpc.js.map +1 -1
  17. package/lib/cjs/ElementGeometryTool.d.ts +147 -147
  18. package/lib/cjs/ElementGeometryTool.js +709 -709
  19. package/lib/cjs/ElementGeometryTool.js.map +1 -1
  20. package/lib/cjs/ModifyCurveTools.d.ts +139 -139
  21. package/lib/cjs/ModifyCurveTools.js +784 -784
  22. package/lib/cjs/ModifyCurveTools.js.map +1 -1
  23. package/lib/cjs/ModifyElementTool.d.ts +47 -47
  24. package/lib/cjs/ModifyElementTool.js +177 -177
  25. package/lib/cjs/ModifyElementTool.js.map +1 -1
  26. package/lib/cjs/ProjectLocation/ProjectExtentsDecoration.d.ts +135 -135
  27. package/lib/cjs/ProjectLocation/ProjectExtentsDecoration.js +822 -822
  28. package/lib/cjs/ProjectLocation/ProjectExtentsDecoration.js.map +1 -1
  29. package/lib/cjs/ProjectLocation/ProjectGeolocation.d.ts +135 -135
  30. package/lib/cjs/ProjectLocation/ProjectGeolocation.js +532 -532
  31. package/lib/cjs/ProjectLocation/ProjectGeolocation.js.map +1 -1
  32. package/lib/cjs/SketchTools.d.ts +304 -304
  33. package/lib/cjs/SketchTools.js +1705 -1705
  34. package/lib/cjs/SketchTools.js.map +1 -1
  35. package/lib/cjs/SolidModelingTools.d.ts +380 -380
  36. package/lib/cjs/SolidModelingTools.js +1462 -1462
  37. package/lib/cjs/SolidModelingTools.js.map +1 -1
  38. package/lib/cjs/SolidPrimitiveTools.d.ts +318 -318
  39. package/lib/cjs/SolidPrimitiveTools.js +1378 -1378
  40. package/lib/cjs/SolidPrimitiveTools.js.map +1 -1
  41. package/lib/cjs/TransformElementsTool.d.ts +164 -164
  42. package/lib/cjs/TransformElementsTool.js +652 -652
  43. package/lib/cjs/TransformElementsTool.js.map +1 -1
  44. package/lib/cjs/UndoRedoTool.d.ts +16 -16
  45. package/lib/cjs/UndoRedoTool.js +42 -42
  46. package/lib/cjs/UndoRedoTool.js.map +1 -1
  47. package/lib/cjs/editor-frontend.d.ts +17 -17
  48. package/lib/cjs/editor-frontend.js +33 -33
  49. package/lib/cjs/editor-frontend.js.map +1 -1
  50. package/lib/esm/CreateElementTool.d.ts +100 -100
  51. package/lib/esm/CreateElementTool.js +319 -319
  52. package/lib/esm/CreateElementTool.js.map +1 -1
  53. package/lib/esm/DeleteElementsTool.d.ts +13 -13
  54. package/lib/esm/DeleteElementsTool.js +34 -34
  55. package/lib/esm/DeleteElementsTool.js.map +1 -1
  56. package/lib/esm/EditTool.d.ts +38 -36
  57. package/lib/esm/EditTool.d.ts.map +1 -1
  58. package/lib/esm/EditTool.js +77 -131
  59. package/lib/esm/EditTool.js.map +1 -1
  60. package/lib/esm/EditToolIpc.d.ts +18 -17
  61. package/lib/esm/EditToolIpc.d.ts.map +1 -1
  62. package/lib/esm/EditToolIpc.js +24 -23
  63. package/lib/esm/EditToolIpc.js.map +1 -1
  64. package/lib/esm/ElementGeometryTool.d.ts +147 -147
  65. package/lib/esm/ElementGeometryTool.js +701 -701
  66. package/lib/esm/ElementGeometryTool.js.map +1 -1
  67. package/lib/esm/ModifyCurveTools.d.ts +139 -139
  68. package/lib/esm/ModifyCurveTools.js +775 -775
  69. package/lib/esm/ModifyCurveTools.js.map +1 -1
  70. package/lib/esm/ModifyElementTool.d.ts +47 -47
  71. package/lib/esm/ModifyElementTool.js +172 -172
  72. package/lib/esm/ModifyElementTool.js.map +1 -1
  73. package/lib/esm/ProjectLocation/ProjectExtentsDecoration.d.ts +135 -135
  74. package/lib/esm/ProjectLocation/ProjectExtentsDecoration.js +814 -814
  75. package/lib/esm/ProjectLocation/ProjectExtentsDecoration.js.map +1 -1
  76. package/lib/esm/ProjectLocation/ProjectGeolocation.d.ts +135 -135
  77. package/lib/esm/ProjectLocation/ProjectGeolocation.js +526 -526
  78. package/lib/esm/ProjectLocation/ProjectGeolocation.js.map +1 -1
  79. package/lib/esm/SketchTools.d.ts +304 -304
  80. package/lib/esm/SketchTools.js +1695 -1695
  81. package/lib/esm/SketchTools.js.map +1 -1
  82. package/lib/esm/SolidModelingTools.d.ts +380 -380
  83. package/lib/esm/SolidModelingTools.js +1437 -1437
  84. package/lib/esm/SolidModelingTools.js.map +1 -1
  85. package/lib/esm/SolidPrimitiveTools.d.ts +318 -318
  86. package/lib/esm/SolidPrimitiveTools.js +1367 -1367
  87. package/lib/esm/SolidPrimitiveTools.js.map +1 -1
  88. package/lib/esm/TransformElementsTool.d.ts +164 -164
  89. package/lib/esm/TransformElementsTool.js +644 -644
  90. package/lib/esm/TransformElementsTool.js.map +1 -1
  91. package/lib/esm/UndoRedoTool.d.ts +16 -16
  92. package/lib/esm/UndoRedoTool.js +36 -36
  93. package/lib/esm/UndoRedoTool.js.map +1 -1
  94. package/lib/esm/editor-frontend.d.ts +17 -17
  95. package/lib/esm/editor-frontend.js +21 -21
  96. package/lib/esm/editor-frontend.js.map +1 -1
  97. package/lib/public/locales/en/Editor.json +490 -490
  98. package/package.json +15 -15
@@ -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