@yuneta/gobj-ui 2.6.0 → 4.0.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 (56) hide show
  1. package/README.md +331 -11
  2. package/dist/gobj-ui.cjs.js +21386 -17919
  3. package/dist/gobj-ui.es.js +26059 -22613
  4. package/index.js +45 -9
  5. package/package.json +4 -4
  6. package/src/c_g6_nodes_tree.js +128 -40
  7. package/src/c_yui_form.css +9 -0
  8. package/src/c_yui_form.js +113 -53
  9. package/src/c_yui_gobj_tree_js.js +58 -36
  10. package/src/c_yui_json.css +139 -0
  11. package/src/c_yui_json.js +928 -0
  12. package/src/c_yui_json_graph.js +110 -20
  13. package/src/c_yui_map.js +18 -36
  14. package/src/c_yui_nav.js +6 -9
  15. package/src/c_yui_period.css +184 -0
  16. package/src/c_yui_period.js +1441 -0
  17. package/src/c_yui_shell.css +120 -0
  18. package/src/c_yui_shell.js +672 -111
  19. package/src/c_yui_treedb_graph.js +639 -37
  20. package/src/c_yui_treedb_schema.js +478 -0
  21. package/src/c_yui_treedb_topic_with_form.css +18 -0
  22. package/src/c_yui_treedb_topic_with_form.js +153 -103
  23. package/src/c_yui_treedb_topics.css +73 -0
  24. package/src/c_yui_treedb_topics.js +1070 -29
  25. package/src/c_yui_window.css +22 -0
  26. package/src/c_yui_window.js +182 -97
  27. package/src/c_yui_window_manager.js +38 -4
  28. package/src/json_view_helpers.js +214 -0
  29. package/src/json_view_helpers.test.js +135 -0
  30. package/src/route_map_model.js +317 -0
  31. package/src/route_map_model.test.js +209 -0
  32. package/src/route_resolver.js +24 -1
  33. package/src/route_resolver.test.js +40 -1
  34. package/src/shell_modals.js +162 -52
  35. package/src/shell_route_map.css +225 -0
  36. package/src/shell_route_map.js +363 -0
  37. package/src/tabulator.css +245 -0
  38. package/src/yui_dev.js +130 -8
  39. package/src/yui_frontend_view.js +106 -0
  40. package/src/yui_icons.css +62 -0
  41. package/src/yui_inputs.css +8 -3
  42. package/src/yui_inputs.js +51 -8
  43. package/src/yui_tabulator_i18n.js +128 -0
  44. package/src/yui_theme.js +147 -0
  45. package/src/yui_time.js +666 -0
  46. package/src/yui_time.test.js +330 -0
  47. package/src/yui_toolbar.css +28 -0
  48. package/src/yui_toolbar.js +86 -43
  49. package/src/c_yui_main.css +0 -501
  50. package/src/c_yui_main.js +0 -1623
  51. package/src/c_yui_routing.css +0 -18
  52. package/src/c_yui_routing.js +0 -837
  53. package/src/c_yui_tabs.js +0 -487
  54. package/src/themes.js +0 -215
  55. package/src/ytable.css +0 -63
  56. package/src/ytable.js +0 -505
@@ -1,501 +0,0 @@
1
- /*********************************************************
2
- * Colors
3
- *********************************************************/
4
- [data-theme=light],
5
- .theme-light {
6
- /* CSS Variables */
7
- /*background-color: #EEEEEE;*/
8
- --my-text-color: black;
9
- --modal-background-color: hsla(var(--bulma-scheme-h),var(--bulma-scheme-s),var(--bulma-scheme-invert-l),0.40);
10
-
11
- }
12
-
13
- [data-theme=dark],
14
- .theme-dark {
15
- /* CSS Variables */
16
- /*background-color: black;*/
17
- --my-text-color: white;
18
- --modal-background-color: hsla(var(--bulma-scheme-h),var(--bulma-scheme-s),var(--bulma-scheme-invert-l),0.90);
19
- }
20
-
21
- [data-theme=system],
22
- .theme-system {
23
- /* CSS Variables */
24
- /*background-color: var(--bulma-body-background-color);*/
25
- --my-text-color: var(--bulma-body-color);
26
- --modal-background-color: hsla(var(--bulma-scheme-h),var(--bulma-scheme-s),var(--bulma-scheme-invert-l),0.90);
27
- }
28
-
29
-
30
- /*********************************************************
31
- * Body
32
- *********************************************************/
33
- /*
34
- * Margins and size of html/body is defined in index.mako, same as below #root
35
- */
36
- #root {
37
- margin: 0;
38
- padding: 0;
39
- width: 100%;
40
- height: 100%;
41
- }
42
-
43
-
44
- /*********************************************************
45
- * Layers
46
- *********************************************************/
47
- :root {
48
- --top-layer-size: 41px;
49
- --top-layer-size-inside: 36px; /* top-layer-size - 5 */
50
- /* (1 for border, 4 for top/bottom center */
51
- --top-border: 1px;
52
-
53
- /*--bottom-layer-size: 35px;*/
54
- --bottom-layer-size: 0px;
55
- --bottom-layer-size-inside: 30px;
56
- /*--bottom-border: 1px;*/
57
- --bottom-border: 0px;
58
- --bulma-body-min-width: 200px !important;
59
- }
60
-
61
- .top-layer {
62
- position: fixed;
63
- z-index: 2;
64
-
65
- left: 0;
66
- right: 0;
67
-
68
- top: 0;
69
- height: var(--top-layer-size);
70
-
71
- border-bottom: var(--top-border) solid var(--bulma-border-weak);
72
-
73
- display: flex;
74
- justify-content: space-between;
75
- align-items: center;
76
- }
77
-
78
- .bottom-layer {
79
- position: fixed;
80
- z-index: 2;
81
-
82
- left: 0;
83
- right: 0;
84
-
85
- height: var(--bottom-layer-size);
86
- bottom: 0;
87
-
88
- border-top: var(--bottom-border) solid var(--bulma-border-weak);
89
-
90
- display: none;
91
- /*display: flex;*/
92
- justify-content: space-between;
93
- align-items: center;
94
- }
95
-
96
- .content-layer {
97
- position: absolute;
98
- z-index: 1;
99
- top: calc(var(--top-layer-size) + var(--top-border));
100
- bottom: calc(var(--bottom-layer-size) + var(--bottom-border));
101
- left: 0;
102
- right: 0;
103
- }
104
-
105
- .iframe-layer {
106
- position: absolute;
107
- z-index: 1;
108
- top: calc(var(--top-layer-size) + var(--top-border));
109
- bottom: calc(var(--bottom-layer-size) + var(--bottom-border));
110
- left: 0;
111
- right: 0;
112
- }
113
-
114
- .popup-layer {
115
- position: absolute;
116
- z-index: 20;
117
- top: 0;
118
- left: 0;
119
- }
120
-
121
- .modal-layer {
122
- position: absolute;
123
- z-index: 99;
124
- top: 0;
125
- left: 0;
126
- width: 100%;
127
- height: 100%;
128
- background-color: rgba(0,0,0,0.3);
129
- display: none;
130
- }
131
-
132
- /*********************************************************
133
- * Bulma
134
- *********************************************************/
135
- .modal-background {
136
- /* En firefox aclara el fondo, pero en chrome no cambia */
137
- /*background-color: var(--modal-background-color) !important;*/
138
- }
139
-
140
- .is-large.modal-close {
141
- --bulma-delete-dimensions: 3.5rem !important;
142
- }
143
-
144
- /* Custom class to adjust the modal width */
145
- .modal-card.modal-is-responsive {
146
- width: 100%;
147
- max-width: 100%;
148
- }
149
-
150
- @media screen and (min-width: 768px) {
151
- .modal-card.modal-is-responsive {
152
- width: 50rem;
153
- max-width: 50rem;
154
- }
155
- }
156
-
157
- /*
158
- * Mobile (< 768px, dovetails with the desktop rule above): a
159
- * `modal-is-responsive` card (the C_YUI_TREEDB edit/delete form
160
- * popup, and any other consumer of this opt-in class) takes the
161
- * WHOLE screen instead of a centred sheet — more room to edit on a
162
- * phone. Confirm dialogs do not carry `modal-is-responsive`, so
163
- * they stay compact. Edge-to-edge: full size, no margin, flat
164
- * corners; the body keeps Bulma's own scroll.
165
- */
166
- @media screen and (max-width: 767px) {
167
- .modal-card.modal-is-responsive {
168
- width: 100%;
169
- max-width: 100%;
170
- height: 100%;
171
- max-height: 100%;
172
- margin: 0;
173
- border-radius: 0;
174
- }
175
- .modal-card.modal-is-responsive .modal-card-head,
176
- .modal-card.modal-is-responsive .modal-card-foot {
177
- border-radius: 0;
178
- }
179
- .modal-card.modal-is-responsive .modal-card-body {
180
- flex: 1 1 auto;
181
- overflow-y: auto;
182
- }
183
- }
184
-
185
- .grid.is-col-min-22 {
186
- --bulma-grid-column-min: 28rem !important;
187
- }
188
-
189
- /*
190
- * Generic helpers
191
- */
192
-
193
- .overscroll-contain {
194
- overscroll-behavior: contain;
195
- }
196
-
197
- .without-border {
198
- border: none !important;
199
- box-shadow: none !important;
200
- background: transparent !important;
201
- }
202
-
203
- .with-border {
204
- border: 1px solid var(--bulma-border);
205
- }
206
-
207
- .wrap-text {
208
- white-space: normal !important;;
209
- word-wrap: break-word !important;;
210
- overflow-wrap: break-word !important;;
211
- }
212
-
213
- .strong-shadow {
214
- box-shadow:
215
- 0 1em 2em -0.125em hsla(var(--bulma-shadow-h), var(--bulma-shadow-s), var(--bulma-shadow-l), 0.3),
216
- 0 0 0 2px hsla(var(--bulma-shadow-h), var(--bulma-shadow-s), var(--bulma-shadow-l), 0.1) !important;
217
- }
218
-
219
- @media screen and (max-width: 768px) {
220
- .column {
221
- padding: 0 !important;
222
- margin-bottom: 16px !important;
223
- }
224
- }
225
-
226
- .full-width-button {
227
- width: 100%;
228
- }
229
-
230
- /*********************************************************
231
- * Toolbars
232
- *********************************************************/
233
- .yui-horizontal-toolbar-section {
234
- display: flex;
235
- height: auto;
236
- flex-shrink: 0; /* Prevents resizing */
237
- white-space: nowrap;
238
- margin: 0 2px; /* Space between sections */
239
- justify-content: space-between;
240
- align-items: center;
241
- }
242
-
243
- a.flex-horizontal-section { /* To make flex any <a> */
244
- display: flex;
245
- flex-shrink: 0; /* Prevents resizing */
246
- white-space: nowrap;
247
- margin: 0 2px; /* Space between sections */
248
- justify-content: space-between;
249
- align-items: center;
250
- padding-inline-end: 2rem;
251
- }
252
-
253
- /*********************************************************
254
- * Tabulator
255
- *********************************************************/
256
-
257
- /* Visible column separator via pseudo-element on the right-side resize handle only.
258
- .prev handles (left-side) are excluded so hidden columns (e.g. Select Row when
259
- not in edit mode) don't leave a spurious line at the start of the table. */
260
- .tabulator .tabulator-col-resize-handle:not(.prev)::after {
261
- content: "";
262
- position: absolute;
263
- top: 0;
264
- bottom: 0;
265
- left: 50%;
266
- width: 1px;
267
- background-color: var(--bulma-border);
268
- }
269
-
270
- .tabulator-row .tabulator-cell.tabulator-frozen {
271
- background-color: var(--bulma-background) !important;
272
- }
273
- .tabulator .tabulator-header .tabulator-frozen {
274
- background-color: var(--bulma-background) !important;
275
- }
276
-
277
- /*
278
- * Tabulator light theme — alternating row backgrounds
279
- * scheme-main-ter (#f5f5f5) gives visible contrast against white odd rows.
280
- * !important needed to override the tabulator_bulma.css theme.
281
- */
282
- .tabulator .tabulator-row,
283
- .tabulator .tabulator-row.tabulator-row-odd {
284
- background-color: var(--bulma-scheme-main, #fff) !important;
285
- }
286
-
287
- .tabulator .tabulator-row.tabulator-row-even {
288
- background-color: var(--bulma-scheme-main-ter, #f5f5f5) !important;
289
- }
290
-
291
- .tabulator .tabulator-row.tabulator-selectable:hover {
292
- background-color: var(--bulma-background, #ebebeb) !important;
293
- }
294
-
295
- /*
296
- * Tabulator dark theme
297
- * Activated by html[data-theme=dark] (set by the app's theme switcher)
298
- */
299
- [data-theme=dark] .tabulator {
300
- background-color: var(--bulma-body-background-color);
301
- border-color: var(--bulma-border);
302
- color: var(--bulma-body-color);
303
- }
304
-
305
- [data-theme=dark] .tabulator .tabulator-header,
306
- [data-theme=dark] .tabulator .tabulator-header .tabulator-col {
307
- background-color: var(--bulma-background);
308
- border-color: var(--bulma-border);
309
- color: var(--bulma-text);
310
- }
311
-
312
- [data-theme=dark] .tabulator .tabulator-header .tabulator-col.tabulator-sortable:hover {
313
- background-color: var(--bulma-background-bis, var(--bulma-background));
314
- }
315
-
316
- [data-theme=dark] .tabulator-row,
317
- [data-theme=dark] .tabulator-row.tabulator-row-odd {
318
- background-color: var(--bulma-body-background-color) !important;
319
- color: var(--bulma-body-color);
320
- border-color: var(--bulma-border);
321
- }
322
-
323
- [data-theme=dark] .tabulator-row.tabulator-row-even {
324
- background-color: var(--bulma-background) !important;
325
- color: var(--bulma-body-color);
326
- border-color: var(--bulma-border);
327
- }
328
-
329
- [data-theme=dark] .tabulator-row .tabulator-cell {
330
- border-color: var(--bulma-border);
331
- color: var(--bulma-body-color);
332
- }
333
-
334
- [data-theme=dark] .tabulator-row.tabulator-selectable:hover {
335
- background-color: var(--bulma-background) !important;
336
- color: var(--bulma-text) !important;
337
- }
338
-
339
- [data-theme=dark] .tabulator-row.tabulator-selected {
340
- background-color: var(--bulma-link) !important;
341
- color: var(--bulma-link-invert) !important;
342
- }
343
-
344
- [data-theme=dark] .tabulator-row.tabulator-selected .tabulator-cell {
345
- color: var(--bulma-link-invert) !important;
346
- }
347
-
348
- [data-theme=dark] .tabulator .tabulator-footer {
349
- background-color: var(--bulma-background);
350
- border-color: var(--bulma-border);
351
- color: var(--bulma-text);
352
- }
353
-
354
- [data-theme=dark] .tabulator .tabulator-footer .tabulator-page {
355
- background-color: transparent;
356
- color: var(--bulma-text);
357
- border-color: var(--bulma-border);
358
- }
359
-
360
- [data-theme=dark] .tabulator .tabulator-footer .tabulator-page:not(.disabled):hover {
361
- background-color: var(--bulma-background);
362
- color: var(--bulma-text);
363
- }
364
-
365
- [data-theme=dark] .tabulator .tabulator-footer .tabulator-page.active {
366
- background-color: var(--bulma-link);
367
- color: var(--bulma-link-invert);
368
- }
369
-
370
- [data-theme=dark] .tabulator-row .tabulator-cell.tabulator-frozen {
371
- background-color: var(--bulma-background) !important;
372
- }
373
-
374
- /* system theme: follow OS preference */
375
- @media (prefers-color-scheme: dark) {
376
- [data-theme=system] .tabulator {
377
- background-color: var(--bulma-body-background-color);
378
- border-color: var(--bulma-border);
379
- color: var(--bulma-body-color);
380
- }
381
- [data-theme=system] .tabulator .tabulator-header,
382
- [data-theme=system] .tabulator .tabulator-header .tabulator-col {
383
- background-color: var(--bulma-background);
384
- border-color: var(--bulma-border);
385
- color: var(--bulma-text);
386
- }
387
- [data-theme=system] .tabulator-row,
388
- [data-theme=system] .tabulator-row.tabulator-row-odd {
389
- background-color: var(--bulma-body-background-color) !important;
390
- color: var(--bulma-body-color);
391
- border-color: var(--bulma-border);
392
- }
393
- [data-theme=system] .tabulator-row.tabulator-row-even {
394
- background-color: var(--bulma-background) !important;
395
- color: var(--bulma-body-color);
396
- border-color: var(--bulma-border);
397
- }
398
- [data-theme=system] .tabulator-row .tabulator-cell {
399
- border-color: var(--bulma-border);
400
- color: var(--bulma-body-color);
401
- }
402
- [data-theme=system] .tabulator-row.tabulator-selectable:hover {
403
- background-color: var(--bulma-background) !important;
404
- }
405
- [data-theme=system] .tabulator-row.tabulator-selected {
406
- background-color: var(--bulma-link) !important;
407
- color: var(--bulma-link-invert) !important;
408
- }
409
- [data-theme=system] .tabulator .tabulator-footer {
410
- background-color: var(--bulma-background);
411
- border-color: var(--bulma-border);
412
- color: var(--bulma-text);
413
- }
414
- [data-theme=system] .tabulator .tabulator-footer .tabulator-page {
415
- background-color: transparent;
416
- color: var(--bulma-text);
417
- border-color: var(--bulma-border);
418
- }
419
- [data-theme=system] .tabulator .tabulator-footer .tabulator-page.active {
420
- background-color: var(--bulma-link);
421
- color: var(--bulma-link-invert);
422
- }
423
- }
424
-
425
- /*============================================================
426
- * Volatil modals (display_volatil_modal):
427
- * get_yesnocancel / get_yesno / get_ok and the typed
428
- * info/warning/error messages. Icon-centric layout: a
429
- * narrow rounded card with a tinted round icon of the
430
- * type; everything maps to Bulma vars so one rule set
431
- * follows light and dark.
432
- *============================================================*/
433
- .modal.yui-volatil .modal-background {
434
- background-color: color-mix(in srgb, var(--bulma-scheme-invert, #000) 45%, transparent);
435
- }
436
- .modal.yui-volatil .modal-card {
437
- position: relative;
438
- width: min(26rem, calc(100vw - 2rem));
439
- border-radius: 0.75rem;
440
- background: var(--bulma-scheme-main, #fff);
441
- box-shadow: 0 12px 40px color-mix(in srgb, var(--bulma-scheme-invert, #000) 30%, transparent);
442
- padding: 1.5rem 1.5rem 1.25rem;
443
- }
444
- .modal.yui-volatil .modal-card-body {
445
- background: transparent;
446
- padding: 0;
447
- }
448
- .modal.yui-volatil .modal-card-foot {
449
- background: transparent;
450
- border-top: none;
451
- padding: 1rem 0 0;
452
- }
453
- .yui-volatil-icon {
454
- width: 3.25rem;
455
- height: 3.25rem;
456
- border-radius: 9999px;
457
- display: flex;
458
- align-items: center;
459
- justify-content: center;
460
- margin: 0 auto 0.75rem;
461
- font-size: 1.5rem;
462
- background: color-mix(in srgb, var(--yui-volatil-base, var(--bulma-info, #3e8ed0)) 15%, transparent);
463
- color: var(--yui-volatil-ink, var(--bulma-info, #3e8ed0));
464
- }
465
- .modal.yui-volatil.is-info,
466
- .modal.yui-volatil.is-question {
467
- --yui-volatil-base: var(--bulma-info, #3e8ed0);
468
- --yui-volatil-ink: var(--bulma-info-on-scheme, #3e8ed0);
469
- }
470
- .modal.yui-volatil.is-success {
471
- --yui-volatil-base: var(--bulma-success, #48c78e);
472
- --yui-volatil-ink: var(--bulma-success-on-scheme, #257953);
473
- }
474
- .modal.yui-volatil.is-warning {
475
- --yui-volatil-base: var(--bulma-warning, #ffe08a);
476
- --yui-volatil-ink: var(--bulma-warning-on-scheme, #946c00);
477
- }
478
- .modal.yui-volatil.is-error {
479
- --yui-volatil-base: var(--bulma-danger, #f14668);
480
- --yui-volatil-ink: var(--bulma-danger-on-scheme, #cc0f35);
481
- }
482
- .yui-volatil-title {
483
- font-size: 1.15rem;
484
- font-weight: 600;
485
- text-transform: capitalize;
486
- margin-bottom: 0.25rem;
487
- color: var(--bulma-text-strong, inherit);
488
- }
489
- .yui-volatil-x {
490
- position: absolute;
491
- top: 0.75rem;
492
- right: 0.75rem;
493
- }
494
- .yui-volatil-msg {
495
- font-size: 1.05rem;
496
- color: var(--bulma-text, inherit);
497
- }
498
- .modal.yui-volatil .modal-card-body .buttons {
499
- margin-top: 1.25rem;
500
- margin-bottom: 0;
501
- }