forked from Ilhasoft/floweditor
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
232 lines (191 loc) · 7.33 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="/manifest.json" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono:300|Roboto:200,300,400,500" />
<script type="module" src="/src/main.jsx" defer></script>
<script>
window.addEventListener('DOMContentLoaded', (event) => {
var base = '/.netlify/functions/';
var config = {
flow: 'a4f64f1b-85bc-477e-b706-de313a022979',
flowType: 'message',
localStorage: true,
mutable: true,
filters: ['facebook', 'whatsapp', 'airtime', 'resthook', 'classifier', 'ticketer', 'external_service', 'whatsapp_catalog', 'brain'],
help: {
legacy_extra: 'help.html',
missing_dependency: 'help.html',
invalid_regex: 'help.html'
},
endpoints: {
globals: base + 'globals',
groups: base + 'groups',
fields: base + 'fields',
labels: base + 'labels',
channels: base + 'channels',
classifiers: base + 'classifiers',
ticketers: base + 'ticketers',
resthooks: base + 'resthooks',
templates: base + 'templates',
flows: base + 'flows',
revisions: base + 'revisions',
recents: base + 'recents',
languages: base + 'languages',
environment: base + 'environment',
recipients: base + 'recipients',
functions: base + 'functions',
completion: base + 'completion',
attachments: base + 'attachments',
activity: base + 'activity',
users: base + 'users',
topics: base + 'topics',
ticketer_queues: base + 'ticketer_queues',
external_services: base + 'external_services',
knowledgeBases: base + 'knowledge_bases',
whatsapp_products: base + 'whatsapp_products',
whatsapp_flows: base + 'whatsapp_flows',
brain: base + 'brain',
editor: '/',
simulateStart: null,
simulateResume: null
},
showNewUpdates: false,
initialGuide: 'v2'
};
showFlowEditor(document.getElementById('floweditor'), config);
});
</script>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Nyaruka Flow Editor</title>
<style>
html input {
font-weight: 300;
}
:root {
font-size: 16px;
}
html {
--font-family: 'Roboto', Helvetica, Arial, sans-serif;
--primary-rgb: 35, 135, 202;
--secondary-rgb: 140, 51, 140;
--tertiary-rgb: 135, 202, 35;
--focus-rgb: 82, 168, 236;
--error-rgb: 255, 99, 71;
--success-rgb: 102, 186, 104;
--selection-light-rgb: 240, 240, 240;
--selection-dark-rgb: 180, 180, 180;
--select-input-height: inherit;
--curvature: 6px;
--curvature-widget: 6px;
--color-focus: #a4cafe;
--color-widget-bg: #fff;
--color-widget-bg-focused: #fff;
--color-widget-border: rgb(225, 225, 225);
/* primary colors, should be dark */
--color-selection: #f0f6ff;
--widget-box-shadow-focused: 0 0 0 3px rgba(164, 202, 254, .45);
--widget-box-shadow-focused-error: 0 0 0 3px rgba(var(--error-rgb), 0.3);
--shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
/* page text, borders, widgets */
--color-text: #555;
--color-widget-text: #555;
--color-borders: rgba(0, 0, 0, 0.07);
--color-placeholder: #ccc;
/* light colors, panel backgrounds, selection, etc */
--color-primary-light: #eee;
--color-secondary-light: #ccc;
/* dark colors, nav bar, buttons, etc */
--color-primary-dark: rgb(var(--primary-rgb));
--color-secondary-dark: rgb(var(--secondary-rgb));
/* light text goes over dark, dark over lights */
--color-text-light: rgba(255, 255, 255, 1);
--color-text-dark: rgba(0, 0, 0, 0.5);
--color-text-dark-secondary: rgba(0, 0, 0, 0.25);
--color-text-help: rgba(0, 0, 0, 0.35);
/* solid overlays with text */
--color-overlay-dark: rgba(0, 0, 0, 0.2);
--color-overlay-dark-text: rgba(255, 255, 255, 0.9);
--color-overlay-light: rgba(0, 0, 0, 0.05);
--color-overlay-light-text: rgba(0, 0, 0, 0.6);
/* links, buttons, and label badges */
--color-link-primary: rgba(var(--primary-rgb), 0.8);
--color-link-primary-hover: rgba(var(--primary-rgb), 0.9);
--color-link-secondary: rgba(var(--secondary-rgb), 0.8);
--color-link-secondary-hover: rgba(var(--secondary-rgb), 0.9);
--color-button-primary: var(--color-primary-dark);
--color-button-primary-text: var(--color-text-light);
--color-button-secondary: var(--color-secondary-light);
--color-button-secondary-text: var(--color-text-dark);
--color-button-destructive: rgb(var(--error-rgb));
--color-button-destructive-text: var(--color-text-light);
--color-button-attention: #2ecc71;
--color-label-primary: var(--color-primary-dark);
--color-label-primary-text: var(--color-text-light);
--color-label-secondary: rgba(0, 0, 0, 0.2);
--color-label-secondary-text: rgba(255, 255, 255, 0.9);
--color-nav-unselected: #fff;
--color-nav-selected-bg: #fff;
--color-nav-selected-text: var(--color-primary-dark);
--color-info: #c0d9eb;
--color-warning: #fff6c0;
--color-error: rgb(var(--error-rgb));
--font-size: 14px;
--button-font-size: 1.125rem;
--header-bg: var(--color-primary-dark);
--temba-textinput-padding: 9px;
--temba-textinput-font-size: var(--font-size);
font-size: var(--font-size);
font-weight: 300;
font-family: var(--font-family);
--button-y: 6px;
--button-x: 14px;
}
html {
height: 100%;
}
body {
height: 100%;
}
#floweditor {
height: 100%;
}
temba-select:focus {
outline: none;
box-shadow: none;
}
.flatpickr-calendar {
margin-top: 28px;
margin-bottom: 28px;
margin-left: -13px;
}
</style>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="floweditor"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>