@things-factory/meta-ui 7.0.1-alpha.36 → 7.0.1-alpha.38

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.
@@ -1,6 +1,6 @@
1
1
  import '@material/web/icon/icon.js';
2
2
  import moment from 'moment-timezone';
3
- import { css, html, render } from 'lit';
3
+ import { css, html, render, nothing } from 'lit';
4
4
  import { getEditor, getRenderer } from '@operato/data-grist';
5
5
  import { getValueGenerators } from '@operato/time-calculator';
6
6
  import { ScrollbarStyles, CommonGristStyles, CommonButtonStyles, ButtonContainerStyles } from '@operato/styles';
@@ -1753,27 +1753,14 @@ export class MetaUiUtil {
1753
1753
  static getGristPersonalizedStyles() {
1754
1754
  return [
1755
1755
  css `
1756
- #grist-personal {
1757
- padding: 5px 6px 0px 0px;
1758
- margin: 0px;
1759
- user-select: none;
1760
- align-self: end;
1761
- height: var(--padding-narrow);
1762
- }
1763
-
1764
- #grist-personal > md-icon {
1765
- --md-icon-size: 16px;
1766
- padding: 2px;
1767
- margin: 0;
1768
- background-color: rgba(var(--secondary-color-rgb), 0.8);
1769
- color: var(--theme-white-color);
1770
- vertical-align: bottom;
1756
+ [slot='setting'] {
1757
+ --md-icon-size: 18px;
1758
+ color: rgba(var(--secondary-color-rgb), 0.8);
1771
1759
  cursor: pointer;
1772
- border-radius: 50%;
1773
1760
  }
1774
1761
 
1775
- #grist-personal > md-icon:hover {
1776
- background-color: var(--primary-color);
1762
+ [slot='setting']:hover {
1763
+ color: var(--primary-color);
1777
1764
  }
1778
1765
  `
1779
1766
  ];
@@ -2848,45 +2835,43 @@ export class MetaUiUtil {
2848
2835
  let recordCreationCallback = pageView.recordCreationCallback;
2849
2836
  let useSortButton = JSON.parse((pageView.etcConfig || {}).use_grid_sort_button || 'false');
2850
2837
  useFilterAddButton = useFilterAddButton === true && useAddButton === true;
2851
- return useFilterForm == false
2838
+ return html `
2839
+ ${useFilterForm
2852
2840
  ? html `
2853
- <div slot="headroom" style="flex-direction: column;padding: 0px;border-top: none;box-shadow: none;background: none;align-items: stretch;">
2854
- ${this.getGridColumnPersonalizeButton(pageView)}
2855
- </div>
2856
- `
2857
- : html `
2858
- <div slot="headroom" style="flex-direction: column;padding: 0px;border-top: none;box-shadow: none;background: none;align-items: stretch;">
2859
- <div slot="headroom">
2860
- <div id="filters"><ox-filters-form></ox-filters-form></div>
2861
- ${useSortButton
2841
+ <div slot="headroom" style="flex-direction: column;padding: 0px;border-top: none;box-shadow: none;background: none;align-items: stretch;">
2842
+ <div slot="headroom">
2843
+ <div id="filters"><ox-filters-form></ox-filters-form></div>
2844
+ ${useSortButton
2862
2845
  ? html `
2863
- <div id="sorters">
2864
- <md-icon
2865
- @click=${e => {
2846
+ <div id="sorters">
2847
+ <md-icon
2848
+ @click=${e => {
2866
2849
  const target = e.currentTarget;
2867
2850
  target.nextElementSibling.open({
2868
2851
  right: 0,
2869
2852
  top: target.offsetTop + target.offsetHeight
2870
2853
  });
2871
2854
  }}
2872
- >sort</md-icon
2873
- >
2874
- <ox-popup id="sorter-control">
2875
- <ox-sorters-control></ox-sorters-control>
2876
- </ox-popup>
2877
- </div>
2878
- `
2855
+ >sort</md-icon
2856
+ >
2857
+ <ox-popup id="sorter-control">
2858
+ <ox-sorters-control></ox-sorters-control>
2859
+ </ox-popup>
2860
+ </div>
2861
+ `
2879
2862
  : html ``}
2880
- ${MetaUiUtil.getGridViewOption(pageView)}
2881
- <ox-record-creator id="add" ?hidden="${!useFilterAddButton}" .callback=${recordCreationCallback}>
2882
- <button style="display: flex; justify-content: center">
2883
- <md-icon>add</md-icon>
2884
- </button>
2885
- </ox-record-creator>
2863
+ ${MetaUiUtil.getGridViewOption(pageView)}
2864
+ <ox-record-creator id="add" ?hidden="${!useFilterAddButton}" .callback=${recordCreationCallback}>
2865
+ <button style="display: flex; justify-content: center">
2866
+ <md-icon>add</md-icon>
2867
+ </button>
2868
+ </ox-record-creator>
2869
+ </div>
2886
2870
  </div>
2887
- ${this.getGridColumnPersonalizeButton(pageView)}
2888
- </div>
2889
- `;
2871
+ `
2872
+ : nothing}
2873
+ ${this.getGridColumnPersonalizeButton(pageView)}
2874
+ `;
2890
2875
  }
2891
2876
  /**
2892
2877
  * @description 그리드 컬럼 개인화 팝업 버튼을 그린다.
@@ -2900,17 +2885,16 @@ export class MetaUiUtil {
2900
2885
  }
2901
2886
  if (pageView.is_activity !== true) {
2902
2887
  return html `
2903
- <div id="grist-personal">
2904
- <md-icon
2905
- @click=${e => {
2888
+ <md-icon
2889
+ slot="setting"
2890
+ @click=${e => {
2906
2891
  let element = MetaApi.createCustomElement('personal-column-selector', 'personal-column-selector');
2907
- element.configGrist = e.currentTarget.parentElement.parentElement.parentElement;
2892
+ element.configGrist = e.currentTarget.closest('ox-grist');
2908
2893
  element.menuId = pageView.menuId;
2909
2894
  MetaApi.openPopupByElement(TermsUtil.tTitle('grid-column-personalize'), 'midium', element, false);
2910
2895
  }}
2911
- >settings</md-icon
2912
- >
2913
- </div>
2896
+ >tune</md-icon
2897
+ >
2914
2898
  `;
2915
2899
  }
2916
2900
  else {