/
Properties.purs
336 lines (232 loc) · 12 KB
/
Properties.purs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
module GoJS.Diagram.Properties where
import Prelude
import Data.Function.Uncurried (Fn2)
import Data.Maybe (Maybe)
import Data.Nullable (toMaybe)
import Effect.Uncurried (EffectFn1)
import GoJS.Collection (Iterator_, Map_, Set_)
import GoJS.Diagram.CommandHandler.Types (CommandHandler_)
import GoJS.Diagram.Types (class IsDiagram, AnimationManager_, InputEvent_, Layer_)
import GoJS.EnumValue (EnumValue_)
import GoJS.Geometry.Types (Margin_, Point_, Rect_, Size_, Spot_)
import GoJS.GraphObject.Types (class IsPanel, class IsPart, Adornment_, ContextMenu_, Group_, Link_, Node_, Part_, toContextMenu)
import GoJS.Layout.Types (class IsLayout)
import GoJS.Model.Types (class IsModel, UndoManager_)
import GoJS.Tool.Types (ToolManager_, Tool_)
import GoJS.Unsafe (getUnsafe)
import Web.HTML (HTMLDivElement)
_allowClipboard :: forall d. IsDiagram d => d -> Boolean
_allowClipboard = getUnsafe [ "allowClipboard" ]
_allowCopy :: forall d. IsDiagram d => d -> Boolean
_allowCopy = getUnsafe [ "allowCopy" ]
_allowDelete :: forall d. IsDiagram d => d -> Boolean
_allowDelete = getUnsafe [ "allowDelete" ]
_allowDragOut :: forall d. IsDiagram d => d -> Boolean
_allowDragOut = getUnsafe [ "allowDragOut" ]
_allowDrop :: forall d. IsDiagram d => d -> Boolean
_allowDrop = getUnsafe [ "allowDrop" ]
_allowGroup :: forall d. IsDiagram d => d -> Boolean
_allowGroup = getUnsafe [ "allowGroup" ]
_allowHorizontalScroll :: forall d. IsDiagram d => d -> Boolean
_allowHorizontalScroll = getUnsafe [ "allowHorizontalScroll" ]
_allowInsert :: forall d. IsDiagram d => d -> Boolean
_allowInsert = getUnsafe [ "allowInsert" ]
_allowLink :: forall d. IsDiagram d => d -> Boolean
_allowLink = getUnsafe [ "allowLink" ]
_allowMove :: forall d. IsDiagram d => d -> Boolean
_allowMove = getUnsafe [ "allowMove" ]
_allowRelink :: forall d. IsDiagram d => d -> Boolean
_allowRelink = getUnsafe [ "allowRelink" ]
_allowReshape :: forall d. IsDiagram d => d -> Boolean
_allowReshape = getUnsafe [ "allowReshape" ]
_allowResize :: forall d. IsDiagram d => d -> Boolean
_allowResize = getUnsafe [ "allowResize" ]
_allowRotate :: forall d. IsDiagram d => d -> Boolean
_allowRotate = getUnsafe [ "allowRotate" ]
_allowSelect :: forall d. IsDiagram d => d -> Boolean
_allowSelect = getUnsafe [ "allowSelect" ]
_allowTextEdit :: forall d. IsDiagram d => d -> Boolean
_allowTextEdit = getUnsafe [ "allowTextEdit" ]
_allowUndo :: forall d. IsDiagram d => d -> Boolean
_allowUndo = getUnsafe [ "allowUndo" ]
_allowUngroup :: forall d. IsDiagram d => d -> Boolean
_allowUngroup = getUnsafe [ "allowUngroup" ]
_allowVerticalScroll :: forall d. IsDiagram d => d -> Boolean
_allowVerticalScroll = getUnsafe [ "allowVerticalScroll" ]
_allowZoom :: forall d. IsDiagram d => d -> Boolean
_allowZoom = getUnsafe [ "allowZoom" ]
-- Read-only
_animationManager :: forall d. IsDiagram d => d -> AnimationManager_
_animationManager = getUnsafe [ "animationManager" ]
_autoScale :: forall d. IsDiagram d => d -> EnumValue_
_autoScale = getUnsafe [ "autoScale" ]
_autoScrollInterval :: forall d. IsDiagram d => d -> Number
_autoScrollInterval = getUnsafe [ "autoScrollInterval" ]
_autoScrollRegion :: forall d. IsDiagram d => d -> Margin_
_autoScrollRegion = getUnsafe [ "autoScrollRegion" ]
_click :: forall d. IsDiagram d => d -> Maybe (EffectFn1 (InputEvent_ d) Unit)
_click = toMaybe <<< getUnsafe [ "click" ]
_commandHandler :: forall d. IsDiagram d => d -> CommandHandler_
_commandHandler = getUnsafe [ "commandHandler" ]
_contentAlignment :: forall d. IsDiagram d => d -> Spot_
_contentAlignment = getUnsafe [ "contentAlignment" ]
_contextClick :: forall d. IsDiagram d => d -> Maybe (EffectFn1 (InputEvent_ d) Unit)
_contextClick = toMaybe <<< getUnsafe [ "contextClick" ]
_contextMenu :: forall d. IsDiagram d => d -> Maybe ContextMenu_
_contextMenu = toContextMenu <<< getUnsafe [ "contextMenu" ]
_currentCursor :: forall d. IsDiagram d => d -> String
_currentCursor = getUnsafe [ "currentCursor" ]
_currentTool :: forall d. IsDiagram d => d -> Tool_
_currentTool = getUnsafe [ "currentTool" ]
_defaultCursor :: forall d. IsDiagram d => d -> String
_defaultCursor = getUnsafe [ "defaultCursor" ]
_defaultScale :: forall d. IsDiagram d => d -> Number
_defaultScale = getUnsafe [ "defaultScale" ]
_defaultTool :: forall d. IsDiagram d => d -> Tool_
_defaultTool = getUnsafe [ "defaultTool" ]
_div :: forall d. IsDiagram d => d -> HTMLDivElement
_div = getUnsafe [ "div" ]
-- Read-only
_documentBounds :: forall d. IsDiagram d => d -> Rect_
_documentBounds = getUnsafe [ "documentBounds" ]
_doubleClick :: forall d. IsDiagram d => d -> Maybe (EffectFn1 (InputEvent_ d) Unit)
_doubleClick = toMaybe <<< getUnsafe [ "doubleClick" ]
_firstInput :: forall d. IsDiagram d => d -> InputEvent_ d
_firstInput = getUnsafe [ "firstInput" ]
_fixedBounds :: forall d. IsDiagram d => d -> Rect_
_fixedBounds = getUnsafe [ "fixedBounds" ]
_grid :: forall d p. IsPanel p => IsDiagram d => d -> Maybe p
_grid = toMaybe <<< getUnsafe [ "grid" ]
_groupSelectionAdornmentTemplate :: forall d. IsDiagram d => d -> Maybe Adornment_
_groupSelectionAdornmentTemplate = toMaybe <<< getUnsafe [ "groupSelectionAdornmentTemplate" ]
_groupTemplate :: forall d. IsDiagram d => d -> Maybe Group_
_groupTemplate = toMaybe <<< getUnsafe [ "groupTemplate" ]
_groupTemplateMap :: forall d. IsDiagram d => d -> Maybe (Map_ String Group_)
_groupTemplateMap = toMaybe <<< getUnsafe [ "groupTemplateMap" ]
_handlesDragDropForTopLevelParts :: forall d. IsDiagram d => d -> Boolean
_handlesDragDropForTopLevelParts = getUnsafe [ "handlesDragDropForTopLevelParts" ]
_hasHorizontalScrollbar :: forall d. IsDiagram d => d -> Boolean
_hasHorizontalScrollbar = getUnsafe [ "hasHorizontalScrollbar" ]
_hasVerticalScrollbar :: forall d. IsDiagram d => d -> Boolean
_hasVerticalScrollbar = getUnsafe [ "hasVerticalScrollbar" ]
-- Read-only
_highlighteds :: forall d. IsDiagram d => d -> Set_ Part_
_highlighteds = getUnsafe [ "highlighteds" ]
_initialAutoScale :: forall d. IsDiagram d => d -> EnumValue_
_initialAutoScale = getUnsafe [ "initialAutoScale" ]
_initialContentAlignment :: forall d. IsDiagram d => d -> Spot_
_initialContentAlignment = getUnsafe [ "initialContentAlignment" ]
_initialDocumentSpot :: forall d. IsDiagram d => d -> Spot_
_initialDocumentSpot = getUnsafe [ "initialDocumentSpot" ]
_initialPosition :: forall d. IsDiagram d => d -> Point_
_initialPosition = getUnsafe [ "initialPosition" ]
_initialScale :: forall d. IsDiagram d => d -> Number
_initialScale = getUnsafe [ "initialScale" ]
_initialViewportSpot :: forall d. IsDiagram d => d -> Spot_
_initialViewportSpot = getUnsafe [ "initialViewportSpot" ]
_isEnabled :: forall d. IsDiagram d => d -> Boolean
_isEnabled = getUnsafe [ "isEnabled" ]
_isModelReadOnly :: forall d. IsDiagram d => d -> Boolean
_isModelReadOnly = getUnsafe [ "isModelReadOnly" ]
_isModified :: forall d. IsDiagram d => d -> Boolean
_isModified = getUnsafe [ "isModified" ]
_isMouseCaptured :: forall d. IsDiagram d => d -> Boolean
_isMouseCaptured = getUnsafe [ "isMouseCaptured" ]
_isReadOnly :: forall d. IsDiagram d => d -> Boolean
_isReadOnly = getUnsafe [ "isReadOnly" ]
_isTreePathToChildren :: forall d. IsDiagram d => d -> Boolean
_isTreePathToChildren = getUnsafe [ "isTreePathToChildren" ]
_lastInput :: forall d. IsDiagram d => d -> InputEvent_ d
_lastInput = getUnsafe [ "lastInput" ]
-- Read-only
_layers :: forall d. IsDiagram d => d -> Iterator_ Layer_
_layers = getUnsafe [ "layers" ]
_layout :: forall d @l. IsDiagram d => IsLayout l => d -> l
_layout = getUnsafe [ "layout" ]
_linkSelectionAdornmentTemplate :: forall d. IsDiagram d => d -> Maybe Adornment_
_linkSelectionAdornmentTemplate = toMaybe <<< getUnsafe [ "linkSelectionAdornmentTemplate" ]
_linkTemplate :: forall d. IsDiagram d => d -> Link_
_linkTemplate = getUnsafe [ "linkTemplate" ]
_linkTemplateMap :: forall d. IsDiagram d => d -> Maybe (Map_ String Link_)
_linkTemplateMap = toMaybe <<< getUnsafe [ "linkTemplateMap" ]
-- Read-only
_links :: forall d. IsDiagram d => d -> Iterator_ Link_
_links = getUnsafe [ "links" ]
_maxScale :: forall d. IsDiagram d => d -> Number
_maxScale = getUnsafe [ "maxScale" ]
_maxSelectionCount :: forall d. IsDiagram d => d -> Number
_maxSelectionCount = getUnsafe [ "maxSelectionCount" ]
_minScale :: forall d. IsDiagram d => d -> Number
_minScale = getUnsafe [ "minScale" ]
_model :: forall d @m. IsDiagram d => IsModel m => d -> m
_model = getUnsafe [ "model" ]
_mouseDragOver :: forall d. IsDiagram d => d -> Maybe (EffectFn1 (InputEvent_ d) Unit)
_mouseDragOver = toMaybe <<< getUnsafe [ "mouseDragOver" ]
_mouseDrop :: forall d. IsDiagram d => d -> Maybe (EffectFn1 (InputEvent_ d) Unit)
_mouseDrop = toMaybe <<< getUnsafe [ "mouseDrop" ]
_mouseEnter :: forall d. IsDiagram d => d -> Maybe (EffectFn1 (InputEvent_ d) Unit)
_mouseEnter = toMaybe <<< getUnsafe [ "mouseEnter" ]
_mouseHold :: forall d. IsDiagram d => d -> Maybe (EffectFn1 (InputEvent_ d) Unit)
_mouseHold = toMaybe <<< getUnsafe [ "mouseHold" ]
_mouseHover :: forall d. IsDiagram d => d -> Maybe (EffectFn1 (InputEvent_ d) Unit)
_mouseHover = toMaybe <<< getUnsafe [ "mouseHover" ]
_mouseLeave :: forall d. IsDiagram d => d -> Maybe (EffectFn1 (InputEvent_ d) Unit)
_mouseLeave = toMaybe <<< getUnsafe [ "mouseLeave" ]
_mouseOver :: forall d. IsDiagram d => d -> Maybe (EffectFn1 (InputEvent_ d) Unit)
_mouseOver = toMaybe <<< getUnsafe [ "mouseOver" ]
_nodeSelectionAdornmentTemplate :: forall d. IsDiagram d => d -> Maybe Adornment_
_nodeSelectionAdornmentTemplate = toMaybe <<< getUnsafe [ "nodeSelectionAdornmentTemplate" ]
-- Read-only
_nodeTemplate :: forall d @p. IsDiagram d => IsPart p => d -> p
_nodeTemplate = getUnsafe [ "nodeTemplate" ]
_nodeTemplateMap :: forall d. IsDiagram d => d -> Maybe (Map_ String Part_)
_nodeTemplateMap = toMaybe <<< getUnsafe [ "nodeTemplateMap" ]
-- Read-only
_nodes :: forall d. IsDiagram d => d -> Iterator_ Node_
_nodes = getUnsafe [ "nodes" ]
_opacity :: forall d. IsDiagram d => d -> Number
_opacity = getUnsafe [ "opacity" ]
_padding :: forall d. IsDiagram d => d -> Margin_
_padding = getUnsafe [ "padding" ]
-- Read-only
_parts :: forall d. IsDiagram d => d -> Iterator_ Part_
_parts = getUnsafe [ "parts" ]
_position :: forall d. IsDiagram d => d -> Point_
_position = getUnsafe [ "position" ]
_positionComputation :: forall d. IsDiagram d => d -> Maybe (Fn2 d Point_ Point_)
_positionComputation = toMaybe <<< getUnsafe [ "positionComputation" ]
_renderer :: forall d. IsDiagram d => d -> String
_renderer = getUnsafe [ "renderer" ]
_scale :: forall d. IsDiagram d => d -> Number
_scale = getUnsafe [ "scale" ]
_scaleComputation :: forall d. IsDiagram d => d -> Maybe (Fn2 d Number Number)
_scaleComputation = toMaybe <<< getUnsafe [ "scaleComputation" ]
_scrollHorizontalLineChange :: forall d. IsDiagram d => d -> Number
_scrollHorizontalLineChange = getUnsafe [ "scrollHorizontalLineChange" ]
_scrollMargin :: forall d. IsDiagram d => d -> Margin_
_scrollMargin = getUnsafe [ "scrollMargin" ]
_scrollMode :: forall d. IsDiagram d => d -> EnumValue_
_scrollMode = getUnsafe [ "scrollMode" ]
_scrollVerticalLineChange :: forall d. IsDiagram d => d -> Number
_scrollVerticalLineChange = getUnsafe [ "scrollVerticalLineChange" ]
_scrollsPageOnFocus :: forall d. IsDiagram d => d -> Boolean
_scrollsPageOnFocus = getUnsafe [ "scrollsPageOnFocus" ]
-- Read-only
_selection :: forall d. IsDiagram d => d -> Set_ Part_
_selection = getUnsafe [ "selection" ]
_skipsUndoManager :: forall d. IsDiagram d => d -> Boolean
_skipsUndoManager = getUnsafe [ "skipsUndoManager" ]
_toolManager :: forall d. IsDiagram d => d -> ToolManager_
_toolManager = getUnsafe [ "toolManager" ]
-- Read-only
_undoManager :: forall d. IsDiagram d => d -> UndoManager_
_undoManager = getUnsafe [ "undoManager" ]
_validCycle :: forall d. IsDiagram d => d -> EnumValue_
_validCycle = getUnsafe [ "validCycle" ]
_viewSize :: forall d. IsDiagram d => d -> Size_
_viewSize = getUnsafe [ "viewSize" ]
-- Read-only
_viewportBounds :: forall d. IsDiagram d => d -> Rect_
_viewportBounds = getUnsafe [ "viewportBounds" ]
_zoomPoint :: forall d. IsDiagram d => d -> Point_
_zoomPoint = getUnsafe [ "zoomPoint" ]