@fw-components/formula-editor 2.0.7-formula-editor-enhancements.12 → 2.0.7-formula-editor.21
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.
- package/dist/formula-editor/src/formula-editor.js +64 -179
- package/dist/formula-editor/src/styles/{formula-editor-styles.js → editor.js} +2 -2
- package/dist/formula-editor/src/styles/suggestion-menu.js +58 -0
- package/dist/formula-editor/src/suggestion-menu.js +72 -86
- package/dist/formula-editor/src/{helpers/types.js → types/index.js} +6 -0
- package/dist/formula-editor/src/utils/constants.js +8 -0
- package/dist/formula-editor/src/{parser.js → utils/parser.js} +89 -136
- package/dist/formula-editor/src/utils/queue.js +28 -0
- package/dist/formula-editor/src/utils/recommendor.js +15 -0
- package/dist/formula-editor/src/utils/stack.js +20 -0
- package/package.json +9 -3
- package/dist/formula-editor/src/cursor.js +0 -142
- package/dist/formula-editor/src/formula-builder.js +0 -139
- package/dist/formula-editor/src/formula-creator.js +0 -83
- package/dist/formula-editor/src/helpers.js +0 -54
- package/dist/formula-editor/src/recommendor.js +0 -18
- package/dist/formula-editor/src/sub-components/operator-input.js +0 -24
- package/dist/styles/src/button-styles.js +0 -419
|
@@ -1,419 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
export const UnderlinedButtonStyles = html `
|
|
3
|
-
<style>
|
|
4
|
-
.primary-text-underlined {
|
|
5
|
-
font-family: var(--theme-font);
|
|
6
|
-
border: none;
|
|
7
|
-
font-size: var(--secondary-font-size, 16px);
|
|
8
|
-
color: var(--primary-color, #205081);
|
|
9
|
-
padding: 0;
|
|
10
|
-
margin: 0;
|
|
11
|
-
border-radius: 0;
|
|
12
|
-
min-width: max-content;
|
|
13
|
-
text-transform: none;
|
|
14
|
-
border-bottom: 1px solid rgba(var(--secondary-color-rgb), 0.3);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.secondary-text-underlined {
|
|
18
|
-
font-family: var(--theme-font);
|
|
19
|
-
border: none;
|
|
20
|
-
font-size: var(--secondary-font-size, 16px);
|
|
21
|
-
color: var(--secondary-color, #515151);
|
|
22
|
-
margin: 0;
|
|
23
|
-
padding: 0;
|
|
24
|
-
border-radius: 0;
|
|
25
|
-
min-width: max-content;
|
|
26
|
-
text-transform: none;
|
|
27
|
-
border-bottom: 1px solid rgba(var(--secondary-color-rgb), 0.3);
|
|
28
|
-
}
|
|
29
|
-
</style>
|
|
30
|
-
`;
|
|
31
|
-
export const TextButtonStyles = html `
|
|
32
|
-
<style>
|
|
33
|
-
.primary-text-button {
|
|
34
|
-
font-family: var(--theme-font);
|
|
35
|
-
border: none;
|
|
36
|
-
font-size: var(--secondary-font-size, 16px);
|
|
37
|
-
color: var(--primary-color, #205081);
|
|
38
|
-
padding: 0 8px;
|
|
39
|
-
min-width: 64px;
|
|
40
|
-
height: var(--button-height, 36px);
|
|
41
|
-
margin: 0;
|
|
42
|
-
text-transform: none;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.secondary-text-button {
|
|
46
|
-
font-family: var(--theme-font);
|
|
47
|
-
border: none;
|
|
48
|
-
font-size: var(--secondary-font-size, 16px);
|
|
49
|
-
color: var(--secondary-color, #515151);
|
|
50
|
-
padding: 0 8px;
|
|
51
|
-
min-width: 64px;
|
|
52
|
-
margin: 0;
|
|
53
|
-
height: var(--button-height, 36px);
|
|
54
|
-
text-transform: none;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.primary-text-button:hover {
|
|
58
|
-
font-weight: bold;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.secondary-text-button:hover {
|
|
62
|
-
font-weight: bold;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.primary-text-button[disabled], .secondary-text-button[disabled] {
|
|
66
|
-
opacity: 0.5;
|
|
67
|
-
}
|
|
68
|
-
</style>
|
|
69
|
-
`;
|
|
70
|
-
export const PrimaryButtonStyles = html `
|
|
71
|
-
<style>
|
|
72
|
-
.primary-outlined {
|
|
73
|
-
font-family: var(--theme-font);
|
|
74
|
-
border: 1px solid var(--primary-color, #205081);
|
|
75
|
-
border-radius: 5px;
|
|
76
|
-
font-size: var(--secondary-font-size, 16px);
|
|
77
|
-
color: var(--secondary-color, #515151);
|
|
78
|
-
padding: 0 var(--button-padding, 16px);
|
|
79
|
-
min-width: 64px;
|
|
80
|
-
margin: 0;
|
|
81
|
-
height: var(--button-height, 36px);
|
|
82
|
-
text-transform: none;
|
|
83
|
-
}
|
|
84
|
-
.primary-outlined:hover {
|
|
85
|
-
background-color: var(--primary-color, #205081);
|
|
86
|
-
color: var(--light-color, #fff);
|
|
87
|
-
}
|
|
88
|
-
.primary-colored {
|
|
89
|
-
font-family: var(--theme-font);
|
|
90
|
-
background-color: var(--primary-color, #205081);
|
|
91
|
-
border-radius: 5px;
|
|
92
|
-
font-size: var(--secondary-font-size, 16px);
|
|
93
|
-
color: var(--light-color, #fff);
|
|
94
|
-
margin: 0;
|
|
95
|
-
padding: 0 var(--button-padding, 16px);
|
|
96
|
-
min-width: 64px;
|
|
97
|
-
height: var(--button-height, 36px);
|
|
98
|
-
text-transform: none;
|
|
99
|
-
}
|
|
100
|
-
.primary-colored:hover {
|
|
101
|
-
box-shadow: 0 1px 2px 1px var(--primary-color, #205081);
|
|
102
|
-
}
|
|
103
|
-
.primary-outlined[disabled], .primary-colored[disabled] {
|
|
104
|
-
opacity: 0.5;
|
|
105
|
-
}
|
|
106
|
-
</style>
|
|
107
|
-
`;
|
|
108
|
-
export const SecondaryButtonStyles = html `
|
|
109
|
-
<style>
|
|
110
|
-
.secondary-outlined {
|
|
111
|
-
font-family: var(--theme-font);
|
|
112
|
-
border: 1px solid rgba(var(--secondary-color-rgb), 0.3);
|
|
113
|
-
border-radius: 5px;
|
|
114
|
-
font-size: var(--secondary-font-size, 16px);
|
|
115
|
-
color: var(--secondary-color, #515151);
|
|
116
|
-
padding: 0 var(--button-padding, 16px);
|
|
117
|
-
margin: 0;
|
|
118
|
-
min-width: 64px;
|
|
119
|
-
height: var(--button-height, 36px);
|
|
120
|
-
text-transform: none;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.secondary-outlined:hover {
|
|
124
|
-
background-color: var(--secondary-color, #515151);
|
|
125
|
-
color: var(--light-color, #fff);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.secondary-colored {
|
|
129
|
-
font-family: var(--theme-font);
|
|
130
|
-
background-color: var(--secondary-color, #515151);
|
|
131
|
-
border-radius: 5px;
|
|
132
|
-
font-size: var(--secondary-font-size, 16px);
|
|
133
|
-
color: var(--light-color, #fff);
|
|
134
|
-
padding: 0 var(--button-padding, 16px);
|
|
135
|
-
margin: 0;
|
|
136
|
-
min-width: 64px;
|
|
137
|
-
height: var(--button-height, 36px);
|
|
138
|
-
text-transform: none;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.secondary-colored:hover {
|
|
142
|
-
box-shadow: 0 1px 2px 1px var(--secondary-color, #515151);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.secondary-outlined[disabled], .secondary-colored[disabled] {
|
|
146
|
-
opacity: 0.5;
|
|
147
|
-
}
|
|
148
|
-
</style>
|
|
149
|
-
`;
|
|
150
|
-
export const AlertButtonStyles = html `
|
|
151
|
-
<style>
|
|
152
|
-
.alert-outlined {
|
|
153
|
-
font-family: var(--theme-font);
|
|
154
|
-
border: 1px solid var(--error-color);
|
|
155
|
-
border-radius: 5px;
|
|
156
|
-
font-size: var(--secondary-font-size, 16px);
|
|
157
|
-
color: var(--error-color, #d50000);
|
|
158
|
-
padding: 0 var(--button-padding, 16px);
|
|
159
|
-
margin: 0;
|
|
160
|
-
min-width: 64px;
|
|
161
|
-
height: var(--button-height, 36px);
|
|
162
|
-
text-transform: none;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.alert-outlined:hover {
|
|
166
|
-
background-color: var(--error-color-l1, #db4437);
|
|
167
|
-
color: var(--light-color, #fff);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.alert-colored {
|
|
171
|
-
font-family: var(--theme-font);
|
|
172
|
-
background-color: var(--error-color, #d50000);
|
|
173
|
-
border-radius: 5px;
|
|
174
|
-
font-size: var(--secondary-font-size, 16px);
|
|
175
|
-
color: var(--light-color, #fff);
|
|
176
|
-
padding: 0 var(--button-padding, 16px);
|
|
177
|
-
margin: 0;
|
|
178
|
-
min-width: 64px;
|
|
179
|
-
height: var(--button-height, 36px);
|
|
180
|
-
text-transform: none;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.alert-colored:hover {
|
|
184
|
-
box-shadow: 0 1px 2px 1px var(--error-color, #d50000);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
.alert-outlined[disabled], .alert-colored[disabled] {
|
|
188
|
-
opacity: 0.5;
|
|
189
|
-
}
|
|
190
|
-
</style>
|
|
191
|
-
`;
|
|
192
|
-
export const ToggleButtonStyles = html `
|
|
193
|
-
<style>
|
|
194
|
-
.toggle-group {
|
|
195
|
-
display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.toggle-group .toggle:first-child{
|
|
199
|
-
border-top-left-radius: 5px; border-bottom-left-radius: 5px;
|
|
200
|
-
}
|
|
201
|
-
.toggle-group .toggle:last-child{
|
|
202
|
-
border-top-right-radius: 5px; border-bottom-right-radius: 5px;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.toggle {
|
|
206
|
-
text-transform: none;
|
|
207
|
-
margin: 0px;
|
|
208
|
-
border-radius: 0px;
|
|
209
|
-
background-color: transparent;
|
|
210
|
-
border: 1px solid var(--secondary-color-l3);
|
|
211
|
-
color: var(--secondary-color);
|
|
212
|
-
font-size: var(--secondary-font-size, 16px);
|
|
213
|
-
font-family: var(--theme-font);
|
|
214
|
-
display: flex;
|
|
215
|
-
justify-content: space-around;
|
|
216
|
-
min-width: 64px;
|
|
217
|
-
align-items: center;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
.toggle.small {
|
|
221
|
-
height: 30px;
|
|
222
|
-
font-size: var(--tertiary-font-size, 14px);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.toggle:hover {
|
|
226
|
-
box-shadow: 0 1px 2px 1px rgba(var(--secondary-color-rgb), 0.1);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
.selected-toggle {
|
|
230
|
-
background-color: var(--secondary-color);
|
|
231
|
-
color: var(--light-color, #fff);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.toggle iron-icon{
|
|
235
|
-
--iron-icon-height: var(--body-font-size, 16px);
|
|
236
|
-
margin-right: 5px;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.toggle mwc-icon{
|
|
240
|
-
--mdc-icon-size: var(--body-font-size, 16px);
|
|
241
|
-
margin-right: 5px;
|
|
242
|
-
}
|
|
243
|
-
</style>
|
|
244
|
-
`;
|
|
245
|
-
export const FabStyles = html `
|
|
246
|
-
<style>
|
|
247
|
-
paper-fab {
|
|
248
|
-
position: fixed;
|
|
249
|
-
display: flex;
|
|
250
|
-
flex-direction: column;
|
|
251
|
-
justify-content: center;
|
|
252
|
-
align-items: center;
|
|
253
|
-
bottom: 3%;
|
|
254
|
-
right: 2%;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
paper-fab[disabled], .fab[disabled] {
|
|
258
|
-
opacity: 0.5;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
.fab {
|
|
262
|
-
font-size: var(--secondary-font-size, 16px);
|
|
263
|
-
position: fixed;
|
|
264
|
-
display: flex;
|
|
265
|
-
justify-content: center;
|
|
266
|
-
align-items: center;
|
|
267
|
-
bottom: 3%;
|
|
268
|
-
right: 2%;
|
|
269
|
-
box-shadow: var(--paper-material-elevation-2_-_box-shadow);
|
|
270
|
-
font-family: var(--theme-font);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.colored-fab {
|
|
274
|
-
background-color: var(--secondary-color, #515151);
|
|
275
|
-
--iron-icon-height: var(--h2-font-size, 26px);
|
|
276
|
-
--iron-icon-width: var(--h2-font-size, 26px);
|
|
277
|
-
color: var(--light-color, #fff);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.light-colored-fab {
|
|
281
|
-
background-color: var(--light-color, #fff);
|
|
282
|
-
--iron-icon-height: var(--h2-font-size, 20px);
|
|
283
|
-
--iron-icon-width: var(--h2-font-size, 20px);
|
|
284
|
-
color: var(--secondary-color);
|
|
285
|
-
/* --iron-icon-stroke-color: var(--secondary-color); */
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.light-colored-fab:hover,
|
|
289
|
-
.colored-fab:hover {
|
|
290
|
-
box-shadow: var(--paper-material-elevation-3_-_box-shadow);
|
|
291
|
-
font-weight: bold;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.rectangular-fab {
|
|
295
|
-
height: var(--rectangular-fab-height, 50px);
|
|
296
|
-
width: var(--rectangular-fab-width, 120px);
|
|
297
|
-
border-radius: var(--rectangular-fab-height, 50px);
|
|
298
|
-
padding: var(--rectangular-fab-padding, 0px);
|
|
299
|
-
max-height: var(--rectangular-fab-max-height, 50px);
|
|
300
|
-
z-index: var(--rectangular-fab-z-index, 1);
|
|
301
|
-
}
|
|
302
|
-
.small-fab {
|
|
303
|
-
height: 50px;
|
|
304
|
-
width: 50px;
|
|
305
|
-
padding: 5px;
|
|
306
|
-
}
|
|
307
|
-
@media all and (max-width: 767px) {
|
|
308
|
-
.rectangular-fab {
|
|
309
|
-
height: var(--rectangular-fab-height, 40px);
|
|
310
|
-
width: var(--rectangular-fab-width, 120px);
|
|
311
|
-
border-radius: 50px;
|
|
312
|
-
padding: 0;
|
|
313
|
-
--fab-icon-height: 40px;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
</style>
|
|
317
|
-
`;
|
|
318
|
-
export const ButtonSpinnerStyles = html `
|
|
319
|
-
<style>
|
|
320
|
-
.colored-bt-spinner {
|
|
321
|
-
width: 18px;
|
|
322
|
-
height: 18px;
|
|
323
|
-
--paper-spinner-color: var(--light-color, #fff);
|
|
324
|
-
--paper-spinner-stroke-width: 3px;
|
|
325
|
-
margin-right: 8px;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.secondary-outlined-bt-spinner {
|
|
329
|
-
width: 18px;
|
|
330
|
-
height: 18px;
|
|
331
|
-
--paper-spinner-color: var(--secondary-color, #fff);
|
|
332
|
-
--paper-spinner-stroke-width: 3px;
|
|
333
|
-
margin-right: 8px;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.primary-outlined-bt-spinner {
|
|
337
|
-
width: 18px;
|
|
338
|
-
height: 18px;
|
|
339
|
-
--paper-spinner-color: var(--primary-color, #fff);
|
|
340
|
-
--paper-spinner-stroke-width: 3px;
|
|
341
|
-
margin-right: 8px;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.button-prefix-icon {
|
|
345
|
-
--iron-icon-height: var(--body-font-size, 16px);
|
|
346
|
-
--mdc-icon-size: var(--body-font-size, 16px);
|
|
347
|
-
margin-right: 5px;
|
|
348
|
-
}
|
|
349
|
-
</style>
|
|
350
|
-
`;
|
|
351
|
-
export const SmallButtonStyles = html `
|
|
352
|
-
<style>
|
|
353
|
-
.small-button {
|
|
354
|
-
height: 25px !important;
|
|
355
|
-
width: auto !important;
|
|
356
|
-
padding: 0px !important;
|
|
357
|
-
font-size: var(--tertiary-font-size) !important;
|
|
358
|
-
}
|
|
359
|
-
@media all and (max-width: 767px) {
|
|
360
|
-
.small-button{
|
|
361
|
-
height: 20px !important;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
</style>
|
|
365
|
-
`;
|
|
366
|
-
export const PaperToggleButtonStyles = html `
|
|
367
|
-
<custom-style>
|
|
368
|
-
<style>
|
|
369
|
-
paper-toggle-button {
|
|
370
|
-
font-family: var(--theme-font);
|
|
371
|
-
cursor: pointer;
|
|
372
|
-
--paper-toggle-button-checked-button: {
|
|
373
|
-
height: 15px;
|
|
374
|
-
width: 50%;
|
|
375
|
-
border-radius: 0;
|
|
376
|
-
bottom: 2px;
|
|
377
|
-
box-shadow: none;
|
|
378
|
-
border-bottom-right-radius : 8px;
|
|
379
|
-
border-top-right-radius: 8px;
|
|
380
|
-
}
|
|
381
|
-
--paper-toggle-button-unchecked-button: {
|
|
382
|
-
height: 15px;
|
|
383
|
-
width: 50%;
|
|
384
|
-
border-radius: 0;
|
|
385
|
-
bottom: 2px;
|
|
386
|
-
box-shadow: none;
|
|
387
|
-
border-bottom-left-radius : 8px;
|
|
388
|
-
border-top-left-radius: 8px;
|
|
389
|
-
}
|
|
390
|
-
--paper-toggle-button-unchecked-bar: {
|
|
391
|
-
height: 15px;
|
|
392
|
-
bottom: 2px;
|
|
393
|
-
box-shadow: none;
|
|
394
|
-
}
|
|
395
|
-
--paper-toggle-button-checked-bar: {
|
|
396
|
-
height: 15px;
|
|
397
|
-
bottom: 2px;
|
|
398
|
-
box-shadow: none;
|
|
399
|
-
}
|
|
400
|
-
--paper-toggle-button-label-color: var(--secondary-color);
|
|
401
|
-
align-items: flex-start;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
paper-toggle-button.primary-colored {
|
|
405
|
-
--paper-toggle-button-unchecked-bar-color: var(--secondary-color-l1);
|
|
406
|
-
--paper-toggle-button-unchecked-button-color: var(--secondary-color-l1);
|
|
407
|
-
--paper-toggle-button-checked-bar-color: var(--primary-color-l1);
|
|
408
|
-
--paper-toggle-button-checked-button-color: var(--primary-color);
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
paper-toggle-button.secondary-colored {
|
|
412
|
-
--paper-toggle-button-unchecked-bar-color: var(--secondary-color-l2);
|
|
413
|
-
--paper-toggle-button-unchecked-button-color: var(--secondary-color-l2);
|
|
414
|
-
--paper-toggle-button-checked-bar-color: var(--secondary-color-l1);
|
|
415
|
-
--paper-toggle-button-checked-button-color: var(--secondary-color);
|
|
416
|
-
}
|
|
417
|
-
</style>
|
|
418
|
-
</custom-style>
|
|
419
|
-
`;
|