-
-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathconstants.ts
More file actions
121 lines (113 loc) · 4.62 KB
/
constants.ts
File metadata and controls
121 lines (113 loc) · 4.62 KB
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
export const rendererAppPort = 4200;
export const rendererAppURL = `http://localhost:${rendererAppPort}`;
export const rendererAppName = 'minsky-web';
export const electronAppName = 'minsky-electron';
export const backgroundColor = '#c1c1c1';
export const updateServerUrl = 'https://deployment-server-url.com'; // TODO: insert your update server url here
export const defaultBackgroundColor = '#ffffff';
export const numLinkGroupColours=8;
export const ZOOM_IN_FACTOR = 1.1;
export const ZOOM_OUT_FACTOR = 0.91;
export const RESET_ZOOM_FACTOR = 1;
export const OPEN_DEV_TOOLS_IN_DEV_BUILD = true;
export const events = {
ADD_RECENT_FILE: 'add-recent-file',
APP_LAYOUT_CHANGED: 'app-layout-changed',
BACKEND: 'backend',
BACKEND_SYNC: 'backend-sync',
CHANGE_MAIN_TAB: 'change-main-tab',
CLOSE_WINDOW: 'close-window',
CONTEXT_MENU: 'context-menu',
CLICK_MENU: 'click-menu',
CREATE_MENU_POPUP: 'create-menu-popup',
CURRENT_TAB_MOVE_TO: 'current-tab-move-to',
CURRENT_TAB_POSITION: 'current-tab-position',
CURSOR_BUSY: 'cursor-busy',
DISPLAY_INIT_HELP: 'display-init-help',
DISPLAY_MOUSE_COORDINATES: 'display-mouse-coordinates',
DOUBLE_CLICK: 'double-click',
DOWNLOAD_CSV: 'download-csv',
GET_CURRENT_WINDOW: 'get-current-window',
GET_PREFERENCES: 'get-preferences',
GODLEY_POPUP_REFRESH: 'godley-popup-refresh',
GODLEY_VIEW_MOUSEDOWN: 'godley-view-mousedown',
GODLEY_VIEW_IMPORT_STOCK: 'godley-view-import-stock',
HELP_FOR: 'help-for',
IMPORT_CSV: 'import-csv',
IMPORT_CSV_TO_DB: 'import-csv-to-db',
INIT_MENU_FOR_GODLEY_VIEW: 'init-menu-for-godley-view',
KEY_PRESS: 'key-press',
LOG: 'log',
LOG_SIMULATION: 'log-simulation',
NEW_SYSTEM: 'new-system',
NEW_PUB_TAB: 'new-pub-tab',
OPEN_FILE_DIALOG: 'open-file-dialog',
OPEN_URL: 'open-url',
PUB_TAB_REMOVED: 'pub-tab-removed',
RECORD: 'record',
RECORDING_REPLAY: 'recording-replay',
RECORDING_STATUS_CHANGED: 'recording-status-changed',
REFRESH_ALL_GODLEY_POPUPS: 'refresh-all-godley-popups',
REFRESH_CSV_IMPORT: 'refresh-csv-import',
REPLAY_RECORDING: 'replay-recording',
RESET_ZOOM: 'reset-zoom',
RESET_SCROLL: 'reset-scroll',
SAVE_FILE_DIALOG: 'save-file-dialog',
SAVE_HANDLE_DESCRIPTION: 'save-handle-description',
SAVE_HANDLE_DIMENSION: 'save-handle-dimension',
SAVE_PICK_SLICES: 'save-pick-slices',
SHOW_MESSAGE_BOX: 'show-message_box',
SET_BACKGROUND_COLOR: 'set-background-color',
UPDATE_BOOKMARK_LIST: 'update-bookmark-list',
UPDATE_PREFERENCES: 'update-preferences',
ZOOM: 'zoom',
LOG_MESSAGE: 'log-message'
};
// add non exposed commands here to get intellisense on the terminal popup
export const unExposedTerminalCommands = [
'minsky.model.cBounds',
'minsky.model.zoomFactor',
'minsky.model.relZoom',
'minsky.model.setZoom',
'minsky.canvas.itemFocus.initValue',
'minsky.canvas.itemFocus.tooltip',
'minsky.canvas.itemFocus.detailedText',
'minsky.canvas.itemFocus.sliderMax',
'minsky.canvas.itemFocus.sliderMin',
'minsky.canvas.itemFocus.sliderStep',
'minsky.canvas.itemFocus.sliderStepRel',
'minsky.canvas.itemFocus.rotation',
'minsky.canvas.itemFocus.setUnits',
];
export const dateTimeFormats = [
{ label: '1999-Q4', value: '%Y-Q%Q' },
{ label: '1999', value: '%Y' },
{ label: '12/31/99', value: '%m/%d/%y' },
{ label: '12/31/1999', value: '%m/%d/%Y' },
{ label: '31/12/99', value: '%d/%m/%y' },
{ label: '31/12/1999', value: '%d/%m/%Y' },
{ label: '1999-12-31T13:37:46', value: '%Y-%m-%dT%H:%M:%S' },
{ label: '1999-12-31 13:37:46', value: '%Y-%m-%dT%H:%M:%S' },
{ label: '12/31/1999 01:37 PM', value: '%m/%d/%Y %I:%M %p' },
{ label: '12/31/99 01:37 PM', value: '%m/%d/%y %I:%M %p' },
{ label: '12/31/1999 13:37 PM', value: '%m/%d/%Y %H:%M %p' },
{ label: '12/31/99 13:37 PM', value: '%m/%d/%y %H:%M %p' },
{ label: 'Friday, December 31, 1999', value: '%A, %B %d, %Y' },
{ label: 'Dec 31, 99', value: '%b %d, %y' },
{ label: 'Dec 31, 1999', value: '%b %d, %Y' },
{ label: '31. Dec. 1999', value: '%d. %b. %Y' },
{ label: 'December 31, 1999', value: '%B %d, %Y' },
{ label: '31. December 1999', value: '%d. %B %Y' },
{ label: 'Fri, Dec 31, 99', value: '%a, %b %d, %y' },
{ label: 'Fri 31/Dec 99', value: '%a %d/%b %y' },
{ label: 'Fri, Dec 31, 1999', value: '%a, %b %d, %Y' },
{ label: 'Friday, December 31, 1999', value: '%A, %B %d, %Y' },
{ label: '12-31', value: '%m-%d' },
{ label: '99-12-31', value: '%y-%m-%d' },
{ label: '1999-12-31', value: '%Y-%m-%d' },
{ label: '12/99', value: '%m/%y' },
{ label: 'Dec 31', value: '%b %d' },
{ label: 'December', value: '%B' },
{ label: '4th quarter 99', value: '%Qth quarter %y' },
];
export const importCSVvariableName = 'dataImport';