@yuneta/gobj-ui 7.23.181 → 7.23.182

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.
@@ -26821,57 +26821,57 @@ function build_ui$5(gobj) {
26821
26821
  });
26822
26822
  $view_toolbar.appendChild($search_box);
26823
26823
  }
26824
- if (with_refresh_button) {
26825
- let $refresh = (0, _yuneta_gobj_js.createElement2)([
26824
+ if (with_schema_button) {
26825
+ let $schema = (0, _yuneta_gobj_js.createElement2)([
26826
26826
  "button",
26827
26827
  {
26828
- class: "button mr-1",
26829
- title: (0, i18next.t)("refresh"),
26830
- "data-i18n-title": "refresh",
26831
- "aria-label": (0, i18next.t)("refresh"),
26832
- "data-i18n-aria-label": "refresh"
26828
+ class: "TREEDB_TABLE_SCHEMA button mr-1",
26829
+ title: (0, i18next.t)("schema"),
26830
+ "data-i18n-title": "schema",
26831
+ "aria-label": (0, i18next.t)("schema"),
26832
+ "data-i18n-aria-label": "schema"
26833
26833
  },
26834
- [yui_toolbar_icon("yi-arrows-rotate"), [
26834
+ [yui_toolbar_icon("yi-hexagon-nodes"), [
26835
26835
  "span",
26836
26836
  {
26837
26837
  class: "is-hidden-mobile",
26838
- i18n: "refresh",
26838
+ i18n: "schema",
26839
26839
  style: "padding-left:5px;"
26840
26840
  },
26841
- "refresh"
26841
+ "schema"
26842
26842
  ]],
26843
26843
  { "click": (event) => {
26844
26844
  event.stopPropagation();
26845
- (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_REFRESH", {}, gobj);
26845
+ (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_SHOW_SCHEMA", {}, gobj);
26846
26846
  } }
26847
26847
  ]);
26848
- $view_toolbar.appendChild($refresh);
26848
+ $view_toolbar.appendChild($schema);
26849
26849
  }
26850
- if (with_schema_button) {
26851
- let $schema = (0, _yuneta_gobj_js.createElement2)([
26850
+ if (with_refresh_button) {
26851
+ let $refresh = (0, _yuneta_gobj_js.createElement2)([
26852
26852
  "button",
26853
26853
  {
26854
- class: "TREEDB_TABLE_SCHEMA button mr-1",
26855
- title: (0, i18next.t)("schema"),
26856
- "data-i18n-title": "schema",
26857
- "aria-label": (0, i18next.t)("schema"),
26858
- "data-i18n-aria-label": "schema"
26854
+ class: "button mr-1",
26855
+ title: (0, i18next.t)("refresh"),
26856
+ "data-i18n-title": "refresh",
26857
+ "aria-label": (0, i18next.t)("refresh"),
26858
+ "data-i18n-aria-label": "refresh"
26859
26859
  },
26860
- [yui_toolbar_icon("yi-hexagon-nodes"), [
26860
+ [yui_toolbar_icon("yi-arrows-rotate"), [
26861
26861
  "span",
26862
26862
  {
26863
26863
  class: "is-hidden-mobile",
26864
- i18n: "schema",
26864
+ i18n: "refresh",
26865
26865
  style: "padding-left:5px;"
26866
26866
  },
26867
- "schema"
26867
+ "refresh"
26868
26868
  ]],
26869
26869
  { "click": (event) => {
26870
26870
  event.stopPropagation();
26871
- (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_SHOW_SCHEMA", {}, gobj);
26871
+ (0, _yuneta_gobj_js.gobj_send_event)(gobj, "EV_REFRESH", {}, gobj);
26872
26872
  } }
26873
26873
  ]);
26874
- $view_toolbar.appendChild($schema);
26874
+ $view_toolbar.appendChild($refresh);
26875
26875
  }
26876
26876
  if (with_columns_button) {
26877
26877
  let $columns = (0, _yuneta_gobj_js.createElement2)([
@@ -26816,57 +26816,57 @@ function build_ui$5(gobj) {
26816
26816
  });
26817
26817
  $view_toolbar.appendChild($search_box);
26818
26818
  }
26819
- if (with_refresh_button) {
26820
- let $refresh = createElement2([
26819
+ if (with_schema_button) {
26820
+ let $schema = createElement2([
26821
26821
  "button",
26822
26822
  {
26823
- class: "button mr-1",
26824
- title: t("refresh"),
26825
- "data-i18n-title": "refresh",
26826
- "aria-label": t("refresh"),
26827
- "data-i18n-aria-label": "refresh"
26823
+ class: "TREEDB_TABLE_SCHEMA button mr-1",
26824
+ title: t("schema"),
26825
+ "data-i18n-title": "schema",
26826
+ "aria-label": t("schema"),
26827
+ "data-i18n-aria-label": "schema"
26828
26828
  },
26829
- [yui_toolbar_icon("yi-arrows-rotate"), [
26829
+ [yui_toolbar_icon("yi-hexagon-nodes"), [
26830
26830
  "span",
26831
26831
  {
26832
26832
  class: "is-hidden-mobile",
26833
- i18n: "refresh",
26833
+ i18n: "schema",
26834
26834
  style: "padding-left:5px;"
26835
26835
  },
26836
- "refresh"
26836
+ "schema"
26837
26837
  ]],
26838
26838
  { "click": (event) => {
26839
26839
  event.stopPropagation();
26840
- gobj_send_event(gobj, "EV_REFRESH", {}, gobj);
26840
+ gobj_send_event(gobj, "EV_SHOW_SCHEMA", {}, gobj);
26841
26841
  } }
26842
26842
  ]);
26843
- $view_toolbar.appendChild($refresh);
26843
+ $view_toolbar.appendChild($schema);
26844
26844
  }
26845
- if (with_schema_button) {
26846
- let $schema = createElement2([
26845
+ if (with_refresh_button) {
26846
+ let $refresh = createElement2([
26847
26847
  "button",
26848
26848
  {
26849
- class: "TREEDB_TABLE_SCHEMA button mr-1",
26850
- title: t("schema"),
26851
- "data-i18n-title": "schema",
26852
- "aria-label": t("schema"),
26853
- "data-i18n-aria-label": "schema"
26849
+ class: "button mr-1",
26850
+ title: t("refresh"),
26851
+ "data-i18n-title": "refresh",
26852
+ "aria-label": t("refresh"),
26853
+ "data-i18n-aria-label": "refresh"
26854
26854
  },
26855
- [yui_toolbar_icon("yi-hexagon-nodes"), [
26855
+ [yui_toolbar_icon("yi-arrows-rotate"), [
26856
26856
  "span",
26857
26857
  {
26858
26858
  class: "is-hidden-mobile",
26859
- i18n: "schema",
26859
+ i18n: "refresh",
26860
26860
  style: "padding-left:5px;"
26861
26861
  },
26862
- "schema"
26862
+ "refresh"
26863
26863
  ]],
26864
26864
  { "click": (event) => {
26865
26865
  event.stopPropagation();
26866
- gobj_send_event(gobj, "EV_SHOW_SCHEMA", {}, gobj);
26866
+ gobj_send_event(gobj, "EV_REFRESH", {}, gobj);
26867
26867
  } }
26868
26868
  ]);
26869
- $view_toolbar.appendChild($schema);
26869
+ $view_toolbar.appendChild($refresh);
26870
26870
  }
26871
26871
  if (with_columns_button) {
26872
26872
  let $columns = createElement2([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuneta/gobj-ui",
3
- "version": "7.23.181",
3
+ "version": "7.23.182",
4
4
  "type": "module",
5
5
  "main": "dist/gobj-ui.cjs.js",
6
6
  "module": "dist/gobj-ui.es.js",
@@ -795,23 +795,6 @@ function build_ui(gobj)
795
795
  $view_toolbar.appendChild($search_box);
796
796
  }
797
797
 
798
- if(with_refresh_button) {
799
- let $refresh = createElement2(
800
- ['button', {class: 'button mr-1',
801
- title: t('refresh'), 'data-i18n-title': 'refresh',
802
- 'aria-label': t('refresh'), 'data-i18n-aria-label': 'refresh'}, [
803
- yui_toolbar_icon('yi-arrows-rotate'),
804
- ['span', {class: 'is-hidden-mobile', i18n: 'refresh', style: 'padding-left:5px;'}, 'refresh']
805
- ], {
806
- 'click': (event) => {
807
- event.stopPropagation();
808
- gobj_send_event(gobj, "EV_REFRESH", {}, gobj);
809
- }
810
- }]
811
- );
812
- $view_toolbar.appendChild($refresh);
813
- }
814
-
815
798
  if(with_schema_button) {
816
799
  /* What the columns of this topic ARE: types, flags, fkeys. The
817
800
  * table shows the data; this shows the contract the data answers
@@ -833,6 +816,28 @@ function build_ui(gobj)
833
816
  $view_toolbar.appendChild($schema);
834
817
  }
835
818
 
819
+ /* The ORDER is a contract shared with every table toolbar of the
820
+ * ecosystem: what is particular to this view first (search, schema),
821
+ * then the common block ALWAYS as Refresh, Columns, Export, then Close
822
+ * when there is one. A button that moves from view to view has to be
823
+ * looked for every time. */
824
+ if(with_refresh_button) {
825
+ let $refresh = createElement2(
826
+ ['button', {class: 'button mr-1',
827
+ title: t('refresh'), 'data-i18n-title': 'refresh',
828
+ 'aria-label': t('refresh'), 'data-i18n-aria-label': 'refresh'}, [
829
+ yui_toolbar_icon('yi-arrows-rotate'),
830
+ ['span', {class: 'is-hidden-mobile', i18n: 'refresh', style: 'padding-left:5px;'}, 'refresh']
831
+ ], {
832
+ 'click': (event) => {
833
+ event.stopPropagation();
834
+ gobj_send_event(gobj, "EV_REFRESH", {}, gobj);
835
+ }
836
+ }]
837
+ );
838
+ $view_toolbar.appendChild($refresh);
839
+ }
840
+
836
841
  if(with_columns_button) {
837
842
  /* A topic with a dozen columns is wider than the screen, and until
838
843
  * now the reader could not decide WHICH of them to keep: the table