@yuneta/gobj-ui 7.23.51 → 7.23.53
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/README.md +21 -5
- package/dist/gobj-ui.cjs.js +237 -157
- package/dist/gobj-ui.es.js +237 -157
- package/package.json +2 -2
- package/src/c_yui_form.js +4 -0
- package/src/c_yui_treedb_topic_with_form.css +10 -0
- package/src/c_yui_treedb_topic_with_form.js +89 -7
- package/src/c_yui_treedb_topics.js +4 -1
- package/src/lib_icons.js +51 -0
package/dist/gobj-ui.es.js
CHANGED
|
@@ -6806,6 +6806,7 @@ function build_form_field_conf(gobj, field_desc) {
|
|
|
6806
6806
|
field_conf.options = get_fkey_select_options(gobj, field_desc);
|
|
6807
6807
|
break;
|
|
6808
6808
|
case "image":
|
|
6809
|
+
case "icon":
|
|
6809
6810
|
case "string":
|
|
6810
6811
|
field_conf.tag = "input";
|
|
6811
6812
|
field_conf.inputType = "text";
|
|
@@ -7723,6 +7724,7 @@ function template2columns(gobj, columns, template, sub_elements) {
|
|
|
7723
7724
|
case "hook": break;
|
|
7724
7725
|
case "fkey": break;
|
|
7725
7726
|
case "image":
|
|
7727
|
+
case "icon":
|
|
7726
7728
|
case "string":
|
|
7727
7729
|
column.editor = "input";
|
|
7728
7730
|
column.editorParams = {
|
|
@@ -8161,6 +8163,7 @@ function treedb_value_2_form_value(gobj, field_desc, value) {
|
|
|
8161
8163
|
case "date":
|
|
8162
8164
|
case "color":
|
|
8163
8165
|
case "image":
|
|
8166
|
+
case "icon":
|
|
8164
8167
|
case "tel":
|
|
8165
8168
|
case "template":
|
|
8166
8169
|
case "table":
|
|
@@ -8253,6 +8256,7 @@ function form_value_2_treedb_value(gobj, field_desc, value) {
|
|
|
8253
8256
|
case "date":
|
|
8254
8257
|
case "color":
|
|
8255
8258
|
case "image":
|
|
8259
|
+
case "icon":
|
|
8256
8260
|
case "tel": break;
|
|
8257
8261
|
case "template":
|
|
8258
8262
|
if (is_string(value)) try {
|
|
@@ -20529,7 +20533,8 @@ var attrs_table$6 = [
|
|
|
20529
20533
|
SDATA(data_type_t.DTP_POINTER, "gobj_remote_yuno", 0, null, "Remote yuno for data fetching"),
|
|
20530
20534
|
SDATA(data_type_t.DTP_STRING, "treedb_name", 0, null, "Remote TreeDB service name"),
|
|
20531
20535
|
SDATA(data_type_t.DTP_JSON, "descs", 0, null, "Description of topics"),
|
|
20532
|
-
SDATA(data_type_t.DTP_BOOLEAN, "with_remote_paging", 0, false, "Each topic table pulls its rows a PAGE at a time (`nodes` from/limit) instead of loading the topic whole.
|
|
20536
|
+
SDATA(data_type_t.DTP_BOOLEAN, "with_remote_paging", 0, false, "Each topic table pulls its rows a PAGE at a time (`nodes` from/limit) instead of loading the topic whole. ⚠️ DO NOT TURN THIS ON: a partial topic BREAKS LINKING -- the link picker of a record is built from the rows the PARENT topic's table holds, which with paging is one page, so the right parent is usually not offered and an existing link the form cannot match is dropped on save. Off in every consumer until linking asks the backend instead of the sibling table"),
|
|
20537
|
+
SDATA(data_type_t.DTP_INTEGER, "page_size", 0, 0, "Rows per page of each topic table (the DISPLAY; the fetch is whole). 0 leaves the table's own default"),
|
|
20533
20538
|
SDATA(data_type_t.DTP_BOOLEAN, "with_selection_bar", 0, false, "Each topic table shows the shared selection bar (\"N selected\" + a way out) above it while in edition mode. OFF by default: the bar takes its words from the HOST's i18n, so a host that turns it on must define \"{{n}} selected\" and \"clear selection\""),
|
|
20534
20539
|
SDATA(data_type_t.DTP_BOOLEAN, "system", 0, false, "Manage system topics (true) or user topics (false)"),
|
|
20535
20540
|
SDATA(data_type_t.DTP_STRING, "tabs_style", 0, "is-toggle is-fullwidth", "Bulma tab styling"),
|
|
@@ -21346,6 +21351,7 @@ function process_treedb_descs$1(gobj) {
|
|
|
21346
21351
|
topic_name: key,
|
|
21347
21352
|
desc,
|
|
21348
21353
|
with_remote_paging: gobj_read_bool_attr(gobj, "with_remote_paging"),
|
|
21354
|
+
page_size: gobj_read_integer_attr(gobj, "page_size"),
|
|
21349
21355
|
with_selection_bar: gobj_read_bool_attr(gobj, "with_selection_bar")
|
|
21350
21356
|
};
|
|
21351
21357
|
let id = `${gobj_name(gobj)}?${desc.topic_name}`;
|
|
@@ -22651,6 +22657,182 @@ function yui_table_filter_clear(table) {
|
|
|
22651
22657
|
});
|
|
22652
22658
|
}
|
|
22653
22659
|
//#endregion
|
|
22660
|
+
//#region src/lib_icons.js
|
|
22661
|
+
/*********************************************************
|
|
22662
|
+
* lib_icons.js
|
|
22663
|
+
*
|
|
22664
|
+
* Two icon systems are managed here:
|
|
22665
|
+
*
|
|
22666
|
+
* 1. FA-style CSS icons (yui_icons.css)
|
|
22667
|
+
* Usage: <i class="yi-save"></i>
|
|
22668
|
+
* Color: inherits currentColor from parent via CSS mask.
|
|
22669
|
+
*
|
|
22670
|
+
* 2. SVG symbol icons for G6 toolbar (and any other component
|
|
22671
|
+
* that uses <use xlink:href="#id">).
|
|
22672
|
+
* Symbols are injected once into the DOM.
|
|
22673
|
+
* All symbol ids are prefixed with "g6-icon-" to avoid
|
|
22674
|
+
* conflicts with other DOM elements.
|
|
22675
|
+
* Icon paths come from:
|
|
22676
|
+
* fontawesome-free-7.1.0-web/sprites/solid.svg
|
|
22677
|
+
*
|
|
22678
|
+
* G6 toolbar items are managed via CSS class names (className
|
|
22679
|
+
* field in getItems()) using YuiToolbar in c_g6_nodes_tree.js.
|
|
22680
|
+
* This lets lib_graph.js state functions (set_submit_state,
|
|
22681
|
+
* disableElements, …) work on toolbar icons exactly like on
|
|
22682
|
+
* regular Bulma/FA buttons — no icon-specific helpers needed.
|
|
22683
|
+
*
|
|
22684
|
+
* Copyright (c) 2025-2026, ArtGins.
|
|
22685
|
+
* All Rights Reserved.
|
|
22686
|
+
*********************************************************/
|
|
22687
|
+
var CUSTOM_SVG_ICONS_ID = "g6-custom-svgicons";
|
|
22688
|
+
var ICONS = `<svg xmlns="http://www.w3.org/2000/svg">
|
|
22689
|
+
<!-- magnifying-glass-plus -->
|
|
22690
|
+
<symbol id="g6-icon-zoom-in" viewBox="0 0 512 512">
|
|
22691
|
+
<path fill="currentColor" d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM208 112c-13.3 0-24 10.7-24 24l0 48-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0 0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48 48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-48c0-13.3-10.7-24-24-24z"/>
|
|
22692
|
+
</symbol>
|
|
22693
|
+
<!-- magnifying-glass-minus -->
|
|
22694
|
+
<symbol id="g6-icon-zoom-out" viewBox="0 0 512 512">
|
|
22695
|
+
<path fill="currentColor" d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM136 184c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"/>
|
|
22696
|
+
</symbol>
|
|
22697
|
+
<!-- house (reset zoom: back to original 100% view) -->
|
|
22698
|
+
<symbol id="g6-icon-home" viewBox="0 0 512 512">
|
|
22699
|
+
<path fill="currentColor" d="M277.8 8.6c-12.3-11.4-31.3-11.4-43.5 0l-224 208c-9.6 9-12.8 22.9-8 35.1S18.8 272 32 272l16 0 0 176c0 35.3 28.7 64 64 64l288 0c35.3 0 64-28.7 64-64l0-176 16 0c13.2 0 25-8.1 29.8-20.3s1.6-26.2-8-35.1l-224-208zM240 320l32 0c26.5 0 48 21.5 48 48l0 96-128 0 0-96c0-26.5 21.5-48 48-48z"/>
|
|
22700
|
+
</symbol>
|
|
22701
|
+
<!-- expand (zoom to fit) -->
|
|
22702
|
+
<symbol id="g6-icon-fit" viewBox="0 0 448 512">
|
|
22703
|
+
<path fill="currentColor" d="M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32S0 334.3 0 352l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z"/>
|
|
22704
|
+
</symbol>
|
|
22705
|
+
<!-- fit to selection: the same corner brackets as the fit icon,
|
|
22706
|
+
around a marked object. The two sit side by side in the
|
|
22707
|
+
toolbar and have to read as a family, which a borrowed glyph
|
|
22708
|
+
would not. (No backticks in here: the sprite lives inside a
|
|
22709
|
+
template literal.) -->
|
|
22710
|
+
<symbol id="g6-icon-fit-selection" viewBox="0 0 448 512">
|
|
22711
|
+
<path fill="currentColor" d="M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32S0 334.3 0 352l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z"/>
|
|
22712
|
+
<rect fill="currentColor" x="144" y="176" width="160" height="160" rx="24"/>
|
|
22713
|
+
</symbol>
|
|
22714
|
+
<!-- crosshairs (center) -->
|
|
22715
|
+
<symbol id="g6-icon-center" viewBox="0 0 576 512">
|
|
22716
|
+
<path fill="currentColor" d="M288-16c17.7 0 32 14.3 32 32l0 18.3c98.1 14 175.7 91.6 189.7 189.7l18.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-18.3 0c-14 98.1-91.6 175.7-189.7 189.7l0 18.3c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-18.3C157.9 463.7 80.3 386.1 66.3 288L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l18.3 0C80.3 125.9 157.9 48.3 256 34.3L256 16c0-17.7 14.3-32 32-32zM131.2 288c12.7 62.7 62.1 112.1 124.8 124.8l0-12.8c0-17.7 14.3-32 32-32s32 14.3 32 32l0 12.8c62.7-12.7 112.1-62.1 124.8-124.8L432 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l12.8 0C432.1 161.3 382.7 111.9 320 99.2l0 12.8c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-12.8C193.3 111.9 143.9 161.3 131.2 224l12.8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-12.8 0zM288 208a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"/>
|
|
22717
|
+
</symbol>
|
|
22718
|
+
<!-- up-right-and-down-left-from-center (enter fullscreen) -->
|
|
22719
|
+
<symbol id="g6-icon-fullscreen" viewBox="0 0 512 512">
|
|
22720
|
+
<path fill="currentColor" d="M344 0L488 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87-39-39c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512L24 512c-13.3 0-24-10.7-24-24L0 344c0-9.7 5.8-18.5 14.8-22.2S34.1 320.2 41 327l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2S177.7 512 168 512z"/>
|
|
22721
|
+
</symbol>
|
|
22722
|
+
<!-- down-left-and-up-right-to-center (exit fullscreen) -->
|
|
22723
|
+
<symbol id="g6-icon-fullscreen-exit" viewBox="0 0 512 512">
|
|
22724
|
+
<path fill="currentColor" d="M439.5 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2S450.2 240 440.5 240l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87zM72.5 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87-39-39c-6.9-6.9-8.9-17.2-5.2-26.2S62.8 272 72.5 272z"/>
|
|
22725
|
+
</symbol>
|
|
22726
|
+
<!-- arrow-rotate-left (undo) -->
|
|
22727
|
+
<symbol id="g6-icon-undo" viewBox="0 0 512 512">
|
|
22728
|
+
<path fill="currentColor" d="M256 64c-56.8 0-107.9 24.7-143.1 64l47.1 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 192c-17.7 0-32-14.3-32-32L0 32C0 14.3 14.3 0 32 0S64 14.3 64 32l0 54.7C110.9 33.6 179.5 0 256 0 397.4 0 512 114.6 512 256S397.4 512 256 512c-87 0-163.9-43.4-210.1-109.7-10.1-14.5-6.6-34.4 7.9-44.6s34.4-6.6 44.6 7.9c34.8 49.8 92.4 82.3 157.6 82.3 106 0 192-86 192-192S362 64 256 64z"/>
|
|
22729
|
+
</symbol>
|
|
22730
|
+
<!-- arrow-rotate-right (redo) -->
|
|
22731
|
+
<symbol id="g6-icon-redo" viewBox="0 0 512 512">
|
|
22732
|
+
<path fill="currentColor" d="M436.7 74.7L448 85.4 448 32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l47.9 0-7.6-7.2c-.2-.2-.4-.4-.6-.6-75-75-196.5-75-271.5 0s-75 196.5 0 271.5 196.5 75 271.5 0c8.2-8.2 15.5-16.9 21.9-26.1 10.1-14.5 30.1-18 44.6-7.9s18 30.1 7.9 44.6c-8.5 12.2-18.2 23.8-29.1 34.7-100 100-262.1 100-362 0S-25 175 75 75c99.9-99.9 261.7-100 361.7-.3z"/>
|
|
22733
|
+
</symbol>
|
|
22734
|
+
<!-- pen (edit node) -->
|
|
22735
|
+
<symbol id="g6-icon-edit" viewBox="0 0 512 512">
|
|
22736
|
+
<path fill="currentColor" d="M352.9 21.2L308 66.1 445.9 204 490.8 159.1C504.4 145.6 512 127.2 512 108s-7.6-37.6-21.2-51.1L455.1 21.2C441.6 7.6 423.2 0 404 0s-37.6 7.6-51.1 21.2zM274.1 100L58.9 315.1c-10.7 10.7-18.5 24.1-22.6 38.7L.9 481.6c-2.3 8.3 0 17.3 6.2 23.4s15.1 8.5 23.4 6.2l127.8-35.5c14.6-4.1 27.9-11.8 38.7-22.6L412 237.9 274.1 100z"/>
|
|
22737
|
+
</symbol>
|
|
22738
|
+
<!-- trash-can (delete) -->
|
|
22739
|
+
<symbol id="g6-icon-delete" viewBox="0 0 448 512">
|
|
22740
|
+
<path fill="currentColor" d="M136.7 5.9C141.1-7.2 153.3-16 167.1-16l113.9 0c13.8 0 26 8.8 30.4 21.9L320 32 416 32c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 8.7-26.1zM32 144l384 0 0 304c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-304zm88 64c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24zm104 0c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24zm104 0c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24z"/>
|
|
22741
|
+
</symbol>
|
|
22742
|
+
<!-- link (link nodes) -->
|
|
22743
|
+
<symbol id="g6-icon-link" viewBox="0 0 576 512">
|
|
22744
|
+
<path fill="currentColor" d="M419.5 96c-16.6 0-32.7 4.5-46.8 12.7-15.8-16-34.2-29.4-54.5-39.5 28.2-24 64.1-37.2 101.3-37.2 86.4 0 156.5 70 156.5 156.5 0 41.5-16.5 81.3-45.8 110.6l-71.1 71.1c-29.3 29.3-69.1 45.8-110.6 45.8-86.4 0-156.5-70-156.5-156.5 0-1.5 0-3 .1-4.5 .5-17.7 15.2-31.6 32.9-31.1s31.6 15.2 31.1 32.9c0 .9 0 1.8 0 2.6 0 51.1 41.4 92.5 92.5 92.5 24.5 0 48-9.7 65.4-27.1l71.1-71.1c17.3-17.3 27.1-40.9 27.1-65.4 0-51.1-41.4-92.5-92.5-92.5zM275.2 173.3c-1.9-.8-3.8-1.9-5.5-3.1-12.6-6.5-27-10.2-42.1-10.2-24.5 0-48 9.7-65.4 27.1L91.1 258.2c-17.3 17.3-27.1 40.9-27.1 65.4 0 51.1 41.4 92.5 92.5 92.5 16.5 0 32.6-4.4 46.7-12.6 15.8 16 34.2 29.4 54.6 39.5-28.2 23.9-64 37.2-101.3 37.2-86.4 0-156.5-70-156.5-156.5 0-41.5 16.5-81.3 45.8-110.6l71.1-71.1c29.3-29.3 69.1-45.8 110.6-45.8 86.6 0 156.5 70.6 156.5 156.9 0 1.3 0 2.6 0 3.9-.4 17.7-15.1 31.6-32.8 31.2s-31.6-15.1-31.2-32.8c0-.8 0-1.5 0-2.3 0-33.7-18-63.3-44.8-79.6z"/>
|
|
22745
|
+
</symbol>
|
|
22746
|
+
<!-- link-slash (unlink) -->
|
|
22747
|
+
<symbol id="g6-icon-unlink" viewBox="0 0 576 512">
|
|
22748
|
+
<path fill="currentColor" d="M41-24.9c-9.4-9.4-24.6-9.4-33.9 0S-2.3-.3 7 9.1l528 528c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-122-122c4.2-3.4 8.3-7.1 12.1-10.9l71.1-71.1c29.3-29.3 45.8-69.1 45.8-110.6 0-86.4-70-156.5-156.5-156.5-37.3 0-73.1 13.3-101.3 37.2 20.3 10.1 38.7 23.5 54.5 39.5 14.1-8.3 30.2-12.7 46.8-12.7 51.1 0 92.5 41.4 92.5 92.5 0 24.5-9.7 48-27.1 65.4l-71.1 71.1c-3.9 3.9-8.1 7.4-12.6 10.5l-47.5-47.5c16.5-.9 29.7-14.4 30.2-31.1 0-1.3 0-2.6 0-3.9 0-86.3-69.9-156.9-156.5-156.9-19.2 0-37.9 3.5-55.5 10.2L41-24.9zM225.9 160c.6 0 1.1 0 1.7 0 15.1 0 29.5 3.7 42.1 10.2 1.8 1.2 3.6 2.3 5.5 3.1 26.8 16.3 44.8 45.9 44.8 79.6 0 .4 0 .8 0 1.2L225.9 160zM346.2 416L192 261.8c1.2 84.6 69.6 152.9 154.1 154.1zM139.7 209.5l-45.3-45.3-48.6 48.6c-29.3 29.3-45.8 69.1-45.8 110.6 0 86.4 70 156.5 156.5 156.5 37.2 0 73.1-13.3 101.3-37.2-20.3-10.1-38.8-23.5-54.6-39.5-14 8.2-30.1 12.6-46.7 12.6-51.1 0-92.5-41.4-92.5-92.5 0-24.5 9.7-48 27.1-65.4l48.6-48.6z"/>
|
|
22749
|
+
</symbol>
|
|
22750
|
+
<!-- play (run node) -->
|
|
22751
|
+
<symbol id="g6-icon-run" viewBox="0 0 448 512">
|
|
22752
|
+
<path fill="currentColor" d="M91.2 36.9c-12.4-6.8-27.4-6.5-39.6 .7S32 57.9 32 72l0 368c0 14.1 7.5 27.2 19.6 34.4s27.2 7.5 39.6 .7l336-184c12.8-7 20.8-20.5 20.8-35.1s-8-28.1-20.8-35.1l-336-184z"/>
|
|
22753
|
+
</symbol>
|
|
22754
|
+
<!-- clone (copy size to other nodes/ports) -->
|
|
22755
|
+
<symbol id="g6-icon-resize" viewBox="0 0 512 512">
|
|
22756
|
+
<path fill="currentColor" d="M288 448l-224 0 0-224 48 0 0-64-48 0c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-48-64 0 0 48zm-64-96l224 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L224 0c-35.3 0-64 28.7-64 64l0 224c0 35.3 28.7 64 64 64z"/>
|
|
22757
|
+
</symbol>
|
|
22758
|
+
<!-- plus (create node). Deliberately NOT the FA7 solid plus:
|
|
22759
|
+
its arms are ~14% of the width and read thin next to the
|
|
22760
|
+
other solid glyphs. Bold geometric plus (~23% arm
|
|
22761
|
+
thickness) with long arms (32..480) so it reads as a "+",
|
|
22762
|
+
not a stubby Red-Cross square. -->
|
|
22763
|
+
<symbol id="g6-icon-plus" viewBox="0 0 512 512">
|
|
22764
|
+
<path fill="currentColor" d="M316 32 L316 196 L480 196 L480 316 L316 316 L316 480 L196 480 L196 316 L32 316 L32 196 L196 196 L196 32 Z"/>
|
|
22765
|
+
</symbol>
|
|
22766
|
+
<!-- ellipsis-vertical (unfold the floating toolbar).
|
|
22767
|
+
The strip it stands for is a vertical stack, and a vertical
|
|
22768
|
+
ellipsis is what "there is more of this here" is drawn as
|
|
22769
|
+
everywhere else. -->
|
|
22770
|
+
<symbol id="g6-icon-toolbar-show" viewBox="0 0 128 512">
|
|
22771
|
+
<path fill="currentColor" d="M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"/>
|
|
22772
|
+
</symbol>
|
|
22773
|
+
<!-- xmark (fold the floating toolbar away).
|
|
22774
|
+
Not a chevron: the two toolbars sit on OPPOSITE edges, so a
|
|
22775
|
+
direction would point the wrong way on one of them. What the
|
|
22776
|
+
button does is close an overlay, and that is an x. -->
|
|
22777
|
+
<symbol id="g6-icon-toolbar-hide" viewBox="0 0 384 512">
|
|
22778
|
+
<path fill="currentColor" d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/>
|
|
22779
|
+
</symbol>
|
|
22780
|
+
<!-- dashed marquee (selection mode).
|
|
22781
|
+
The band ITSELF, because that is what the button turns on: a
|
|
22782
|
+
drag on the canvas draws one and a tap picks a card. Not the
|
|
22783
|
+
fit-to-selection glyph next to it in the other toolbar -- that
|
|
22784
|
+
one is solid brackets around a solid object and means "put the
|
|
22785
|
+
camera on what is picked", which is the opposite end of the
|
|
22786
|
+
gesture. Dashes: 16 segments of 59 with gaps of 36 over a
|
|
22787
|
+
perimeter of 1520, so they land on the corners. -->
|
|
22788
|
+
<symbol id="g6-icon-select-mode" viewBox="0 0 512 512">
|
|
22789
|
+
<rect x="46" y="86" width="420" height="340" fill="none"
|
|
22790
|
+
stroke="currentColor" stroke-width="40"
|
|
22791
|
+
stroke-dasharray="59 36"/>
|
|
22792
|
+
</symbol>
|
|
22793
|
+
<!-- location-crosshairs (anchor the camera on one element).
|
|
22794
|
+
The SAME path as the DOM toolbars and their yi-location-crosshairs
|
|
22795
|
+
mask: the two toolbars sit in one console, and a control that
|
|
22796
|
+
does one thing has to be drawn one way. -->
|
|
22797
|
+
<symbol id="g6-icon-anchor" viewBox="0 0 576 512">
|
|
22798
|
+
<path fill="currentColor" d="M288-16c17.7 0 32 14.3 32 32l0 18.3c98.1 14 175.7 91.6 189.7 189.7l18.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-18.3 0c-14 98.1-91.6 175.7-189.7 189.7l0 18.3c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-18.3C157.9 463.7 80.3 386.1 66.3 288L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l18.3 0C80.3 125.9 157.9 48.3 256 34.3L256 16c0-17.7 14.3-32 32-32zM128 256a160 160 0 1 0 320 0 160 160 0 1 0 -320 0zm160-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"/>
|
|
22799
|
+
</symbol>
|
|
22800
|
+
<!-- floppy-disk (save) -->
|
|
22801
|
+
<symbol id="g6-icon-save" viewBox="0 0 448 512">
|
|
22802
|
+
<path fill="currentColor" d="M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-242.7c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32L64 32zm32 96c0-17.7 14.3-32 32-32l160 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32l0-64zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"/>
|
|
22803
|
+
</symbol>
|
|
22804
|
+
</svg>`;
|
|
22805
|
+
function inject_svg_icons() {
|
|
22806
|
+
if (document.getElementById(CUSTOM_SVG_ICONS_ID)) return;
|
|
22807
|
+
const div = document.createElement("div");
|
|
22808
|
+
div.id = CUSTOM_SVG_ICONS_ID;
|
|
22809
|
+
div.style.display = "none";
|
|
22810
|
+
div.innerHTML = ICONS;
|
|
22811
|
+
document.body.appendChild(div);
|
|
22812
|
+
}
|
|
22813
|
+
var __icon_defined__ = {};
|
|
22814
|
+
function yui_icon_is_defined(name) {
|
|
22815
|
+
if (!name || typeof name !== "string") return false;
|
|
22816
|
+
if (__icon_defined__[name] !== void 0) return __icon_defined__[name];
|
|
22817
|
+
let defined = false;
|
|
22818
|
+
try {
|
|
22819
|
+
const el = document.createElement("i");
|
|
22820
|
+
el.className = name;
|
|
22821
|
+
el.style.position = "absolute";
|
|
22822
|
+
el.style.visibility = "hidden";
|
|
22823
|
+
el.style.pointerEvents = "none";
|
|
22824
|
+
document.body.appendChild(el);
|
|
22825
|
+
const st = window.getComputedStyle(el, "::before");
|
|
22826
|
+
const mask = st.maskImage || st.webkitMaskImage || "";
|
|
22827
|
+
defined = !!mask && mask !== "none";
|
|
22828
|
+
document.body.removeChild(el);
|
|
22829
|
+
} catch (e) {
|
|
22830
|
+
defined = false;
|
|
22831
|
+
}
|
|
22832
|
+
__icon_defined__[name] = defined;
|
|
22833
|
+
return defined;
|
|
22834
|
+
}
|
|
22835
|
+
//#endregion
|
|
22654
22836
|
//#region src/yui_row_search.js
|
|
22655
22837
|
/***********************************************************************
|
|
22656
22838
|
* yui_row_search.js
|
|
@@ -22907,8 +23089,8 @@ var attrs_table$5 = [
|
|
|
22907
23089
|
SDATA(data_type_t.DTP_BOOLEAN, "with_export_button", 0, true, "Button toolbar EXPORT (download as CSV what the table holds)"),
|
|
22908
23090
|
SDATA(data_type_t.DTP_BOOLEAN, "with_header_filters", 0, true, "Per-column filter box in the table header, on the columns a text/number match means something (not hooks, fkeys or json)"),
|
|
22909
23091
|
SDATA(data_type_t.DTP_BOOLEAN, "with_inline_edit", 0, true, "Edit a writable scalar cell in place while in edition mode (the record form keeps the rest)"),
|
|
22910
|
-
SDATA(data_type_t.DTP_BOOLEAN, "with_remote_paging", 0, false, "Pull the topic a PAGE at a time from the backend (`nodes` from/limit) instead of loading it whole. Needs a backend that pages"),
|
|
22911
|
-
SDATA(data_type_t.DTP_INTEGER, "page_size", 0,
|
|
23092
|
+
SDATA(data_type_t.DTP_BOOLEAN, "with_remote_paging", 0, false, "Pull the topic a PAGE at a time from the backend (`nodes` from/limit) instead of loading it whole. Needs a backend that pages. ⚠️ DO NOT TURN THIS ON: it breaks LINKS -- see the note above the tabulator settings. It is off in every consumer until linking works with a partial topic"),
|
|
23093
|
+
SDATA(data_type_t.DTP_INTEGER, "page_size", 0, 0, "Rows per page. 0 leaves the `tabulator_settings` value alone. With with_remote_paging it is also the size of each fetch (200 when unset)"),
|
|
22912
23094
|
SDATA(data_type_t.DTP_BOOLEAN, "with_in_row_edit_icons", 0, true, "Add a last column with internal EDIT/DELETE icon"),
|
|
22913
23095
|
SDATA(data_type_t.DTP_BOOLEAN, "editable", 0, false, "Edit state"),
|
|
22914
23096
|
SDATA(data_type_t.DTP_BOOLEAN, "with_checkbox", 0, true, "Auxiliary first column to select rows"),
|
|
@@ -23731,6 +23913,11 @@ function create_tabulator(gobj) {
|
|
|
23731
23913
|
hozAlign = "center";
|
|
23732
23914
|
colFormatter = "color";
|
|
23733
23915
|
break;
|
|
23916
|
+
case "icon":
|
|
23917
|
+
hozAlign = "center";
|
|
23918
|
+
vertAlign = "middle";
|
|
23919
|
+
colFormatter = icon_formatter;
|
|
23920
|
+
break;
|
|
23734
23921
|
case "object":
|
|
23735
23922
|
case "dict":
|
|
23736
23923
|
case "template":
|
|
@@ -23829,6 +24016,19 @@ function create_tabulator(gobj) {
|
|
|
23829
24016
|
}
|
|
23830
24017
|
});
|
|
23831
24018
|
}
|
|
24019
|
+
if (!gobj_read_bool_attr(gobj, "with_remote_paging")) {
|
|
24020
|
+
let page_size = gobj_read_integer_attr(gobj, "page_size");
|
|
24021
|
+
if (page_size > 0 && tabulator_settings.pagination) {
|
|
24022
|
+
tabulator_settings.paginationSize = page_size;
|
|
24023
|
+
tabulator_settings.paginationSizeSelector = [
|
|
24024
|
+
50,
|
|
24025
|
+
100,
|
|
24026
|
+
200,
|
|
24027
|
+
500,
|
|
24028
|
+
true
|
|
24029
|
+
];
|
|
24030
|
+
}
|
|
24031
|
+
}
|
|
23832
24032
|
let remembered_size = load_page_size(gobj);
|
|
23833
24033
|
if (remembered_size !== null && tabulator_settings.pagination) tabulator_settings.paginationSize = remembered_size;
|
|
23834
24034
|
gobj.priv._page_size = tabulator_settings.paginationSize;
|
|
@@ -23941,6 +24141,39 @@ function table__destroy(gobj) {
|
|
|
23941
24141
|
}
|
|
23942
24142
|
}
|
|
23943
24143
|
/************************************************************
|
|
24144
|
+
* Cell of a col flagged `icon`: the value is the NAME of an
|
|
24145
|
+
* icon of the app's set ("yi-bolt"), so it is DRAWN.
|
|
24146
|
+
*
|
|
24147
|
+
* Built as a DOM node and not as an HTML string: the value is
|
|
24148
|
+
* raw record data and must never be parsed as markup -- and
|
|
24149
|
+
* here it also becomes a CSS class, so it is filtered to the
|
|
24150
|
+
* shape of a class name before it gets near one.
|
|
24151
|
+
*
|
|
24152
|
+
* A name the set does not carry falls back to the TEXT of it.
|
|
24153
|
+
* The catch-all rule `[class^="yi-"]::before` paints a
|
|
24154
|
+
* currentColor box for any name, so drawing it anyway would
|
|
24155
|
+
* render a solid square -- a glyph nobody recognises rather
|
|
24156
|
+
* than a mistake somebody can fix.
|
|
24157
|
+
************************************************************/
|
|
24158
|
+
function icon_formatter(cell) {
|
|
24159
|
+
let name = cell.getValue();
|
|
24160
|
+
if (!is_string(name) || empty_string(name)) return "";
|
|
24161
|
+
name = name.trim();
|
|
24162
|
+
if (!/^[a-z0-9-]+$/.test(name) || !yui_icon_is_defined(name)) return createElement2([
|
|
24163
|
+
"span",
|
|
24164
|
+
{
|
|
24165
|
+
class: "ICON_CELL_UNKNOWN is-size-7 has-text-grey",
|
|
24166
|
+
title: name
|
|
24167
|
+
},
|
|
24168
|
+
name
|
|
24169
|
+
]);
|
|
24170
|
+
return createElement2(["span", {
|
|
24171
|
+
class: `ICON_CELL ${name}`,
|
|
24172
|
+
title: name,
|
|
24173
|
+
"aria-label": name
|
|
24174
|
+
}]);
|
|
24175
|
+
}
|
|
24176
|
+
/************************************************************
|
|
23944
24177
|
* Cell of a col holding a JSON document (dict/list/blob/
|
|
23945
24178
|
* template/coordinates/…): a one-line truncated preview,
|
|
23946
24179
|
* marked as a link because the click opens the whole value
|
|
@@ -24052,6 +24285,7 @@ function transform__treedb_value_2_table_value(gobj, col, value, row, field) {
|
|
|
24052
24285
|
}
|
|
24053
24286
|
break;
|
|
24054
24287
|
case "color": break;
|
|
24288
|
+
case "icon": break;
|
|
24055
24289
|
case "image": break;
|
|
24056
24290
|
default: log_error(`transform__treedb_value_2_table_value() unhandled type '${field_desc.type}' (real_type='${field_desc.real_type}') for field '${field}', topic ${priv.topic_name}`);
|
|
24057
24291
|
}
|
|
@@ -52385,160 +52619,6 @@ Sector.PARSED_STYLE_LIST = new Set([].concat(_toConsumableArray(Path.PARSED_STYL
|
|
|
52385
52619
|
"endAngle"
|
|
52386
52620
|
]));
|
|
52387
52621
|
//#endregion
|
|
52388
|
-
//#region src/lib_icons.js
|
|
52389
|
-
/*********************************************************
|
|
52390
|
-
* lib_icons.js
|
|
52391
|
-
*
|
|
52392
|
-
* Two icon systems are managed here:
|
|
52393
|
-
*
|
|
52394
|
-
* 1. FA-style CSS icons (yui_icons.css)
|
|
52395
|
-
* Usage: <i class="yi-save"></i>
|
|
52396
|
-
* Color: inherits currentColor from parent via CSS mask.
|
|
52397
|
-
*
|
|
52398
|
-
* 2. SVG symbol icons for G6 toolbar (and any other component
|
|
52399
|
-
* that uses <use xlink:href="#id">).
|
|
52400
|
-
* Symbols are injected once into the DOM.
|
|
52401
|
-
* All symbol ids are prefixed with "g6-icon-" to avoid
|
|
52402
|
-
* conflicts with other DOM elements.
|
|
52403
|
-
* Icon paths come from:
|
|
52404
|
-
* fontawesome-free-7.1.0-web/sprites/solid.svg
|
|
52405
|
-
*
|
|
52406
|
-
* G6 toolbar items are managed via CSS class names (className
|
|
52407
|
-
* field in getItems()) using YuiToolbar in c_g6_nodes_tree.js.
|
|
52408
|
-
* This lets lib_graph.js state functions (set_submit_state,
|
|
52409
|
-
* disableElements, …) work on toolbar icons exactly like on
|
|
52410
|
-
* regular Bulma/FA buttons — no icon-specific helpers needed.
|
|
52411
|
-
*
|
|
52412
|
-
* Copyright (c) 2025-2026, ArtGins.
|
|
52413
|
-
* All Rights Reserved.
|
|
52414
|
-
*********************************************************/
|
|
52415
|
-
var CUSTOM_SVG_ICONS_ID = "g6-custom-svgicons";
|
|
52416
|
-
var ICONS = `<svg xmlns="http://www.w3.org/2000/svg">
|
|
52417
|
-
<!-- magnifying-glass-plus -->
|
|
52418
|
-
<symbol id="g6-icon-zoom-in" viewBox="0 0 512 512">
|
|
52419
|
-
<path fill="currentColor" d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM208 112c-13.3 0-24 10.7-24 24l0 48-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0 0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48 48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-48c0-13.3-10.7-24-24-24z"/>
|
|
52420
|
-
</symbol>
|
|
52421
|
-
<!-- magnifying-glass-minus -->
|
|
52422
|
-
<symbol id="g6-icon-zoom-out" viewBox="0 0 512 512">
|
|
52423
|
-
<path fill="currentColor" d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM136 184c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z"/>
|
|
52424
|
-
</symbol>
|
|
52425
|
-
<!-- house (reset zoom: back to original 100% view) -->
|
|
52426
|
-
<symbol id="g6-icon-home" viewBox="0 0 512 512">
|
|
52427
|
-
<path fill="currentColor" d="M277.8 8.6c-12.3-11.4-31.3-11.4-43.5 0l-224 208c-9.6 9-12.8 22.9-8 35.1S18.8 272 32 272l16 0 0 176c0 35.3 28.7 64 64 64l288 0c35.3 0 64-28.7 64-64l0-176 16 0c13.2 0 25-8.1 29.8-20.3s1.6-26.2-8-35.1l-224-208zM240 320l32 0c26.5 0 48 21.5 48 48l0 96-128 0 0-96c0-26.5 21.5-48 48-48z"/>
|
|
52428
|
-
</symbol>
|
|
52429
|
-
<!-- expand (zoom to fit) -->
|
|
52430
|
-
<symbol id="g6-icon-fit" viewBox="0 0 448 512">
|
|
52431
|
-
<path fill="currentColor" d="M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32S0 334.3 0 352l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z"/>
|
|
52432
|
-
</symbol>
|
|
52433
|
-
<!-- fit to selection: the same corner brackets as the fit icon,
|
|
52434
|
-
around a marked object. The two sit side by side in the
|
|
52435
|
-
toolbar and have to read as a family, which a borrowed glyph
|
|
52436
|
-
would not. (No backticks in here: the sprite lives inside a
|
|
52437
|
-
template literal.) -->
|
|
52438
|
-
<symbol id="g6-icon-fit-selection" viewBox="0 0 448 512">
|
|
52439
|
-
<path fill="currentColor" d="M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32S0 334.3 0 352l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z"/>
|
|
52440
|
-
<rect fill="currentColor" x="144" y="176" width="160" height="160" rx="24"/>
|
|
52441
|
-
</symbol>
|
|
52442
|
-
<!-- crosshairs (center) -->
|
|
52443
|
-
<symbol id="g6-icon-center" viewBox="0 0 576 512">
|
|
52444
|
-
<path fill="currentColor" d="M288-16c17.7 0 32 14.3 32 32l0 18.3c98.1 14 175.7 91.6 189.7 189.7l18.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-18.3 0c-14 98.1-91.6 175.7-189.7 189.7l0 18.3c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-18.3C157.9 463.7 80.3 386.1 66.3 288L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l18.3 0C80.3 125.9 157.9 48.3 256 34.3L256 16c0-17.7 14.3-32 32-32zM131.2 288c12.7 62.7 62.1 112.1 124.8 124.8l0-12.8c0-17.7 14.3-32 32-32s32 14.3 32 32l0 12.8c62.7-12.7 112.1-62.1 124.8-124.8L432 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l12.8 0C432.1 161.3 382.7 111.9 320 99.2l0 12.8c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-12.8C193.3 111.9 143.9 161.3 131.2 224l12.8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-12.8 0zM288 208a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"/>
|
|
52445
|
-
</symbol>
|
|
52446
|
-
<!-- up-right-and-down-left-from-center (enter fullscreen) -->
|
|
52447
|
-
<symbol id="g6-icon-fullscreen" viewBox="0 0 512 512">
|
|
52448
|
-
<path fill="currentColor" d="M344 0L488 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87-39-39c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512L24 512c-13.3 0-24-10.7-24-24L0 344c0-9.7 5.8-18.5 14.8-22.2S34.1 320.2 41 327l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2S177.7 512 168 512z"/>
|
|
52449
|
-
</symbol>
|
|
52450
|
-
<!-- down-left-and-up-right-to-center (exit fullscreen) -->
|
|
52451
|
-
<symbol id="g6-icon-fullscreen-exit" viewBox="0 0 512 512">
|
|
52452
|
-
<path fill="currentColor" d="M439.5 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2S450.2 240 440.5 240l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87zM72.5 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87-39-39c-6.9-6.9-8.9-17.2-5.2-26.2S62.8 272 72.5 272z"/>
|
|
52453
|
-
</symbol>
|
|
52454
|
-
<!-- arrow-rotate-left (undo) -->
|
|
52455
|
-
<symbol id="g6-icon-undo" viewBox="0 0 512 512">
|
|
52456
|
-
<path fill="currentColor" d="M256 64c-56.8 0-107.9 24.7-143.1 64l47.1 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 192c-17.7 0-32-14.3-32-32L0 32C0 14.3 14.3 0 32 0S64 14.3 64 32l0 54.7C110.9 33.6 179.5 0 256 0 397.4 0 512 114.6 512 256S397.4 512 256 512c-87 0-163.9-43.4-210.1-109.7-10.1-14.5-6.6-34.4 7.9-44.6s34.4-6.6 44.6 7.9c34.8 49.8 92.4 82.3 157.6 82.3 106 0 192-86 192-192S362 64 256 64z"/>
|
|
52457
|
-
</symbol>
|
|
52458
|
-
<!-- arrow-rotate-right (redo) -->
|
|
52459
|
-
<symbol id="g6-icon-redo" viewBox="0 0 512 512">
|
|
52460
|
-
<path fill="currentColor" d="M436.7 74.7L448 85.4 448 32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l47.9 0-7.6-7.2c-.2-.2-.4-.4-.6-.6-75-75-196.5-75-271.5 0s-75 196.5 0 271.5 196.5 75 271.5 0c8.2-8.2 15.5-16.9 21.9-26.1 10.1-14.5 30.1-18 44.6-7.9s18 30.1 7.9 44.6c-8.5 12.2-18.2 23.8-29.1 34.7-100 100-262.1 100-362 0S-25 175 75 75c99.9-99.9 261.7-100 361.7-.3z"/>
|
|
52461
|
-
</symbol>
|
|
52462
|
-
<!-- pen (edit node) -->
|
|
52463
|
-
<symbol id="g6-icon-edit" viewBox="0 0 512 512">
|
|
52464
|
-
<path fill="currentColor" d="M352.9 21.2L308 66.1 445.9 204 490.8 159.1C504.4 145.6 512 127.2 512 108s-7.6-37.6-21.2-51.1L455.1 21.2C441.6 7.6 423.2 0 404 0s-37.6 7.6-51.1 21.2zM274.1 100L58.9 315.1c-10.7 10.7-18.5 24.1-22.6 38.7L.9 481.6c-2.3 8.3 0 17.3 6.2 23.4s15.1 8.5 23.4 6.2l127.8-35.5c14.6-4.1 27.9-11.8 38.7-22.6L412 237.9 274.1 100z"/>
|
|
52465
|
-
</symbol>
|
|
52466
|
-
<!-- trash-can (delete) -->
|
|
52467
|
-
<symbol id="g6-icon-delete" viewBox="0 0 448 512">
|
|
52468
|
-
<path fill="currentColor" d="M136.7 5.9C141.1-7.2 153.3-16 167.1-16l113.9 0c13.8 0 26 8.8 30.4 21.9L320 32 416 32c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 8.7-26.1zM32 144l384 0 0 304c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-304zm88 64c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24zm104 0c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24zm104 0c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24z"/>
|
|
52469
|
-
</symbol>
|
|
52470
|
-
<!-- link (link nodes) -->
|
|
52471
|
-
<symbol id="g6-icon-link" viewBox="0 0 576 512">
|
|
52472
|
-
<path fill="currentColor" d="M419.5 96c-16.6 0-32.7 4.5-46.8 12.7-15.8-16-34.2-29.4-54.5-39.5 28.2-24 64.1-37.2 101.3-37.2 86.4 0 156.5 70 156.5 156.5 0 41.5-16.5 81.3-45.8 110.6l-71.1 71.1c-29.3 29.3-69.1 45.8-110.6 45.8-86.4 0-156.5-70-156.5-156.5 0-1.5 0-3 .1-4.5 .5-17.7 15.2-31.6 32.9-31.1s31.6 15.2 31.1 32.9c0 .9 0 1.8 0 2.6 0 51.1 41.4 92.5 92.5 92.5 24.5 0 48-9.7 65.4-27.1l71.1-71.1c17.3-17.3 27.1-40.9 27.1-65.4 0-51.1-41.4-92.5-92.5-92.5zM275.2 173.3c-1.9-.8-3.8-1.9-5.5-3.1-12.6-6.5-27-10.2-42.1-10.2-24.5 0-48 9.7-65.4 27.1L91.1 258.2c-17.3 17.3-27.1 40.9-27.1 65.4 0 51.1 41.4 92.5 92.5 92.5 16.5 0 32.6-4.4 46.7-12.6 15.8 16 34.2 29.4 54.6 39.5-28.2 23.9-64 37.2-101.3 37.2-86.4 0-156.5-70-156.5-156.5 0-41.5 16.5-81.3 45.8-110.6l71.1-71.1c29.3-29.3 69.1-45.8 110.6-45.8 86.6 0 156.5 70.6 156.5 156.9 0 1.3 0 2.6 0 3.9-.4 17.7-15.1 31.6-32.8 31.2s-31.6-15.1-31.2-32.8c0-.8 0-1.5 0-2.3 0-33.7-18-63.3-44.8-79.6z"/>
|
|
52473
|
-
</symbol>
|
|
52474
|
-
<!-- link-slash (unlink) -->
|
|
52475
|
-
<symbol id="g6-icon-unlink" viewBox="0 0 576 512">
|
|
52476
|
-
<path fill="currentColor" d="M41-24.9c-9.4-9.4-24.6-9.4-33.9 0S-2.3-.3 7 9.1l528 528c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-122-122c4.2-3.4 8.3-7.1 12.1-10.9l71.1-71.1c29.3-29.3 45.8-69.1 45.8-110.6 0-86.4-70-156.5-156.5-156.5-37.3 0-73.1 13.3-101.3 37.2 20.3 10.1 38.7 23.5 54.5 39.5 14.1-8.3 30.2-12.7 46.8-12.7 51.1 0 92.5 41.4 92.5 92.5 0 24.5-9.7 48-27.1 65.4l-71.1 71.1c-3.9 3.9-8.1 7.4-12.6 10.5l-47.5-47.5c16.5-.9 29.7-14.4 30.2-31.1 0-1.3 0-2.6 0-3.9 0-86.3-69.9-156.9-156.5-156.9-19.2 0-37.9 3.5-55.5 10.2L41-24.9zM225.9 160c.6 0 1.1 0 1.7 0 15.1 0 29.5 3.7 42.1 10.2 1.8 1.2 3.6 2.3 5.5 3.1 26.8 16.3 44.8 45.9 44.8 79.6 0 .4 0 .8 0 1.2L225.9 160zM346.2 416L192 261.8c1.2 84.6 69.6 152.9 154.1 154.1zM139.7 209.5l-45.3-45.3-48.6 48.6c-29.3 29.3-45.8 69.1-45.8 110.6 0 86.4 70 156.5 156.5 156.5 37.2 0 73.1-13.3 101.3-37.2-20.3-10.1-38.8-23.5-54.6-39.5-14 8.2-30.1 12.6-46.7 12.6-51.1 0-92.5-41.4-92.5-92.5 0-24.5 9.7-48 27.1-65.4l48.6-48.6z"/>
|
|
52477
|
-
</symbol>
|
|
52478
|
-
<!-- play (run node) -->
|
|
52479
|
-
<symbol id="g6-icon-run" viewBox="0 0 448 512">
|
|
52480
|
-
<path fill="currentColor" d="M91.2 36.9c-12.4-6.8-27.4-6.5-39.6 .7S32 57.9 32 72l0 368c0 14.1 7.5 27.2 19.6 34.4s27.2 7.5 39.6 .7l336-184c12.8-7 20.8-20.5 20.8-35.1s-8-28.1-20.8-35.1l-336-184z"/>
|
|
52481
|
-
</symbol>
|
|
52482
|
-
<!-- clone (copy size to other nodes/ports) -->
|
|
52483
|
-
<symbol id="g6-icon-resize" viewBox="0 0 512 512">
|
|
52484
|
-
<path fill="currentColor" d="M288 448l-224 0 0-224 48 0 0-64-48 0c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l224 0c35.3 0 64-28.7 64-64l0-48-64 0 0 48zm-64-96l224 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L224 0c-35.3 0-64 28.7-64 64l0 224c0 35.3 28.7 64 64 64z"/>
|
|
52485
|
-
</symbol>
|
|
52486
|
-
<!-- plus (create node). Deliberately NOT the FA7 solid plus:
|
|
52487
|
-
its arms are ~14% of the width and read thin next to the
|
|
52488
|
-
other solid glyphs. Bold geometric plus (~23% arm
|
|
52489
|
-
thickness) with long arms (32..480) so it reads as a "+",
|
|
52490
|
-
not a stubby Red-Cross square. -->
|
|
52491
|
-
<symbol id="g6-icon-plus" viewBox="0 0 512 512">
|
|
52492
|
-
<path fill="currentColor" d="M316 32 L316 196 L480 196 L480 316 L316 316 L316 480 L196 480 L196 316 L32 316 L32 196 L196 196 L196 32 Z"/>
|
|
52493
|
-
</symbol>
|
|
52494
|
-
<!-- ellipsis-vertical (unfold the floating toolbar).
|
|
52495
|
-
The strip it stands for is a vertical stack, and a vertical
|
|
52496
|
-
ellipsis is what "there is more of this here" is drawn as
|
|
52497
|
-
everywhere else. -->
|
|
52498
|
-
<symbol id="g6-icon-toolbar-show" viewBox="0 0 128 512">
|
|
52499
|
-
<path fill="currentColor" d="M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"/>
|
|
52500
|
-
</symbol>
|
|
52501
|
-
<!-- xmark (fold the floating toolbar away).
|
|
52502
|
-
Not a chevron: the two toolbars sit on OPPOSITE edges, so a
|
|
52503
|
-
direction would point the wrong way on one of them. What the
|
|
52504
|
-
button does is close an overlay, and that is an x. -->
|
|
52505
|
-
<symbol id="g6-icon-toolbar-hide" viewBox="0 0 384 512">
|
|
52506
|
-
<path fill="currentColor" d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/>
|
|
52507
|
-
</symbol>
|
|
52508
|
-
<!-- dashed marquee (selection mode).
|
|
52509
|
-
The band ITSELF, because that is what the button turns on: a
|
|
52510
|
-
drag on the canvas draws one and a tap picks a card. Not the
|
|
52511
|
-
fit-to-selection glyph next to it in the other toolbar -- that
|
|
52512
|
-
one is solid brackets around a solid object and means "put the
|
|
52513
|
-
camera on what is picked", which is the opposite end of the
|
|
52514
|
-
gesture. Dashes: 16 segments of 59 with gaps of 36 over a
|
|
52515
|
-
perimeter of 1520, so they land on the corners. -->
|
|
52516
|
-
<symbol id="g6-icon-select-mode" viewBox="0 0 512 512">
|
|
52517
|
-
<rect x="46" y="86" width="420" height="340" fill="none"
|
|
52518
|
-
stroke="currentColor" stroke-width="40"
|
|
52519
|
-
stroke-dasharray="59 36"/>
|
|
52520
|
-
</symbol>
|
|
52521
|
-
<!-- location-crosshairs (anchor the camera on one element).
|
|
52522
|
-
The SAME path as the DOM toolbars and their yi-location-crosshairs
|
|
52523
|
-
mask: the two toolbars sit in one console, and a control that
|
|
52524
|
-
does one thing has to be drawn one way. -->
|
|
52525
|
-
<symbol id="g6-icon-anchor" viewBox="0 0 576 512">
|
|
52526
|
-
<path fill="currentColor" d="M288-16c17.7 0 32 14.3 32 32l0 18.3c98.1 14 175.7 91.6 189.7 189.7l18.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-18.3 0c-14 98.1-91.6 175.7-189.7 189.7l0 18.3c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-18.3C157.9 463.7 80.3 386.1 66.3 288L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l18.3 0C80.3 125.9 157.9 48.3 256 34.3L256 16c0-17.7 14.3-32 32-32zM128 256a160 160 0 1 0 320 0 160 160 0 1 0 -320 0zm160-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"/>
|
|
52527
|
-
</symbol>
|
|
52528
|
-
<!-- floppy-disk (save) -->
|
|
52529
|
-
<symbol id="g6-icon-save" viewBox="0 0 448 512">
|
|
52530
|
-
<path fill="currentColor" d="M64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-242.7c0-17-6.7-33.3-18.7-45.3L352 50.7C340 38.7 323.7 32 306.7 32L64 32zm32 96c0-17.7 14.3-32 32-32l160 0c17.7 0 32 14.3 32 32l0 64c0 17.7-14.3 32-32 32l-160 0c-17.7 0-32-14.3-32-32l0-64zM224 288a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"/>
|
|
52531
|
-
</symbol>
|
|
52532
|
-
</svg>`;
|
|
52533
|
-
function inject_svg_icons() {
|
|
52534
|
-
if (document.getElementById(CUSTOM_SVG_ICONS_ID)) return;
|
|
52535
|
-
const div = document.createElement("div");
|
|
52536
|
-
div.id = CUSTOM_SVG_ICONS_ID;
|
|
52537
|
-
div.style.display = "none";
|
|
52538
|
-
div.innerHTML = ICONS;
|
|
52539
|
-
document.body.appendChild(div);
|
|
52540
|
-
}
|
|
52541
|
-
//#endregion
|
|
52542
52622
|
//#region src/g6_brush_select_owned.js
|
|
52543
52623
|
/***********************************************************************
|
|
52544
52624
|
* g6_brush_select_owned.js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuneta/gobj-ui",
|
|
3
|
-
"version": "7.23.
|
|
3
|
+
"version": "7.23.53",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/gobj-ui.cjs.js",
|
|
6
6
|
"module": "dist/gobj-ui.es.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@rollup/plugin-terser": "^1.0.0",
|
|
31
31
|
"@vitest/coverage-v8": "^4.1.10",
|
|
32
|
-
"@yuneta/gobj-js": "^7.16.
|
|
32
|
+
"@yuneta/gobj-js": "^7.16.3",
|
|
33
33
|
"vite": "^8.2.1",
|
|
34
34
|
"vitest": "^4.1.10"
|
|
35
35
|
},
|
package/src/c_yui_form.js
CHANGED
|
@@ -661,6 +661,7 @@ function build_form_field_conf(gobj, field_desc)
|
|
|
661
661
|
break;
|
|
662
662
|
|
|
663
663
|
case "image":
|
|
664
|
+
case "icon":
|
|
664
665
|
case "string":
|
|
665
666
|
field_conf.tag = 'input';
|
|
666
667
|
field_conf.inputType = 'text';
|
|
@@ -1787,6 +1788,7 @@ function template2columns(gobj, columns, template, sub_elements)
|
|
|
1787
1788
|
break;
|
|
1788
1789
|
|
|
1789
1790
|
case "image":
|
|
1791
|
+
case "icon":
|
|
1790
1792
|
case "string":
|
|
1791
1793
|
// field_conf.tag = 'input';
|
|
1792
1794
|
// field_conf.inputType = 'text';
|
|
@@ -2516,6 +2518,7 @@ function treedb_value_2_form_value(gobj, field_desc, value)
|
|
|
2516
2518
|
case "date":
|
|
2517
2519
|
case "color":
|
|
2518
2520
|
case "image":
|
|
2521
|
+
case "icon":
|
|
2519
2522
|
case "tel":
|
|
2520
2523
|
case "template":
|
|
2521
2524
|
case "table":
|
|
@@ -2653,6 +2656,7 @@ function form_value_2_treedb_value(gobj, field_desc, value)
|
|
|
2653
2656
|
case "date":
|
|
2654
2657
|
case "color":
|
|
2655
2658
|
case "image":
|
|
2659
|
+
case "icon":
|
|
2656
2660
|
case "tel":
|
|
2657
2661
|
break;
|
|
2658
2662
|
case "template":
|
|
@@ -116,3 +116,13 @@
|
|
|
116
116
|
background: transparent !important;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
|
|
120
|
+
/* Cell of a col flagged `icon`: the glyph is a CSS mask sized in `em`,
|
|
121
|
+
* so it comes out at the row's font size -- smaller than the 18px the
|
|
122
|
+
* `image` cells next to it get. A touch larger, and centred on the row
|
|
123
|
+
* rather than on the text baseline. */
|
|
124
|
+
.ICON_CELL {
|
|
125
|
+
font-size: 1.25em;
|
|
126
|
+
line-height: 1;
|
|
127
|
+
vertical-align: middle;
|
|
128
|
+
}
|