@kris701/ez-ui 1.4.0 → 1.4.2

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.
@@ -407,9 +407,11 @@ class EzUIDialog {
407
407
  </hgroup>
408
408
  </header>
409
409
 
410
- <tui-loader [overlay]="true" [loading]="isLoading()">
411
- <ng-container [ngTemplateOutlet]="content"></ng-container>
412
- </tui-loader>
410
+ @if(showDialog()){
411
+ <tui-loader [overlay]="true" [loading]="isLoading()">
412
+ <ng-container [ngTemplateOutlet]="content"></ng-container>
413
+ </tui-loader>
414
+ }
413
415
 
414
416
  @if(!isLoading() && (showSave || showDelete)){
415
417
  <footer class="dialog-footer">
@@ -447,9 +449,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
447
449
  </hgroup>
448
450
  </header>
449
451
 
450
- <tui-loader [overlay]="true" [loading]="isLoading()">
451
- <ng-container [ngTemplateOutlet]="content"></ng-container>
452
- </tui-loader>
452
+ @if(showDialog()){
453
+ <tui-loader [overlay]="true" [loading]="isLoading()">
454
+ <ng-container [ngTemplateOutlet]="content"></ng-container>
455
+ </tui-loader>
456
+ }
453
457
 
454
458
  @if(!isLoading() && (showSave || showDelete)){
455
459
  <footer class="dialog-footer">
@@ -4810,7 +4814,7 @@ class EzUITable {
4810
4814
  showClearFilters = false;
4811
4815
  expandable = false;
4812
4816
  clickable = false;
4813
- values = [];
4817
+ values = null;
4814
4818
  internalValues = [];
4815
4819
  displayValues = signal([], /* @ts-ignore */
4816
4820
  ...(ngDevMode ? [{ debugName: "displayValues" }] : /* istanbul ignore next */ []));
@@ -4853,16 +4857,18 @@ class EzUITable {
4853
4857
  this.internalValues = sorted;
4854
4858
  }
4855
4859
  applyFilter() {
4856
- let filtered = [...this.values];
4857
- for (const filter of this.filters())
4858
- filtered = this.filterService.filter(filtered, filter);
4859
- this.internalValues = filtered;
4860
- this.applySorts();
4861
- this.state = [];
4862
- this.page.set(0);
4863
- this.pages.set(Math.floor(this.internalValues.length / this.pageSize()) + 1);
4864
- this.processPage();
4865
- this.presetHeader?.saveCurrentPreset();
4860
+ if (this.values) {
4861
+ let filtered = [...this.values];
4862
+ for (const filter of this.filters())
4863
+ filtered = this.filterService.filter(filtered, filter);
4864
+ this.internalValues = filtered;
4865
+ this.applySorts();
4866
+ this.state = [];
4867
+ this.page.set(0);
4868
+ this.pages.set(Math.floor(this.internalValues.length / this.pageSize()) + 1);
4869
+ this.processPage();
4870
+ this.presetHeader?.saveCurrentPreset();
4871
+ }
4866
4872
  }
4867
4873
  state = {};
4868
4874
  setSort(sort) {
@@ -4914,7 +4920,7 @@ class EzUITable {
4914
4920
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.0", type: EzUITable, isStandalone: true, selector: "ezui-table", inputs: { disabled: "disabled", isLoading: "isLoading", showAdd: "showAdd", showRefresh: "showRefresh", showClearFilters: "showClearFilters", expandable: "expandable", clickable: "clickable", values: "values", storageKey: "storageKey", allowPresets: "allowPresets", pageSize: "pageSize" }, outputs: { onAddItem: "onAddItem", onLoadItems: "onLoadItems", onRowExpanded: "onRowExpanded", onRowClick: "onRowClick", onPresetChange: "onPresetChange" }, host: { classAttribute: "w-full h-full" }, queries: [{ propertyName: "tableHeader", first: true, predicate: ["tableHeader"], descendants: true }, { propertyName: "tableRows", first: true, predicate: ["tableRows"], descendants: true }, { propertyName: "tableExpandedrow", first: true, predicate: ["tableExpandedrow"], descendants: true }], viewQueries: [{ propertyName: "presetHeader", first: true, predicate: ["presetHeader"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
4915
4921
  <div class="ezui-table">
4916
4922
  <tui-loader [inheritColor]="true" [overlay]="true" size="xxl" [loading]="isLoading()">
4917
- @if(values.length == 0){
4923
+ @if(values === null || values.length == 0){
4918
4924
  @if(showAdd || showRefresh){
4919
4925
  <div class="ezui-table-header">
4920
4926
  @if(showRefresh){
@@ -5032,7 +5038,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
5032
5038
  args: [{ selector: 'ezui-table', imports: [FormsModule, CommonModule, TuiTable, TuiScrollbar, TuiButton, TuiChevron, TuiDropdown, TuiDataListWrapper, TuiTablePagination, TuiLoader, TuiBlockStatus, TuiIcon, TuiInput, EzUITablePresets, TuiHint], template: `
5033
5039
  <div class="ezui-table">
5034
5040
  <tui-loader [inheritColor]="true" [overlay]="true" size="xxl" [loading]="isLoading()">
5035
- @if(values.length == 0){
5041
+ @if(values === null || values.length == 0){
5036
5042
  @if(showAdd || showRefresh){
5037
5043
  <div class="ezui-table-header">
5038
5044
  @if(showRefresh){
@@ -7093,8 +7099,12 @@ class EzUISideBar {
7093
7099
  let index = 0;
7094
7100
  for (let item of from.items) {
7095
7101
  let subOpen = this.getOpenStatesRec(item);
7096
- for (let value of subOpen)
7097
- open.push(index + ";" + value);
7102
+ for (let value of subOpen) {
7103
+ if (value == "")
7104
+ open.push(index + "");
7105
+ else
7106
+ open.push(index + ";" + value);
7107
+ }
7098
7108
  index++;
7099
7109
  }
7100
7110
  }
@@ -7181,15 +7191,11 @@ class EzUISideBar {
7181
7191
  </footer>
7182
7192
  </aside>
7183
7193
  }
7184
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: i4$2.TuiAsideComponent, selector: "aside[tuiNavigationAside]", inputs: ["tuiNavigationAside"] }, { kind: "component", type: EzUISideBarItem, selector: "ezui-sidebar-item", inputs: ["item"], outputs: ["onItemClick"] }] });
7194
+ `, isInline: true, styles: ["::ng-deep tui-aside-group tui-expand tui-aside-group tui-expand [tuiAsideItem]{padding-inline-start:4rem!important}::ng-deep tui-aside-group tui-expand tui-aside-group tui-expand tui-aside-group tui-expand [tuiAsideItem]{padding-inline-start:6rem!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: i4$2.TuiAsideComponent, selector: "aside[tuiNavigationAside]", inputs: ["tuiNavigationAside"] }, { kind: "component", type: EzUISideBarItem, selector: "ezui-sidebar-item", inputs: ["item"], outputs: ["onItemClick"] }] });
7185
7195
  }
7186
7196
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: EzUISideBar, decorators: [{
7187
7197
  type: Component,
7188
- args: [{
7189
- selector: 'ezui-sidebar',
7190
- standalone: true,
7191
- imports: [CommonModule, TuiNavigation, EzUISideBarItem],
7192
- template: `
7198
+ args: [{ selector: 'ezui-sidebar', standalone: true, imports: [CommonModule, TuiNavigation, EzUISideBarItem], template: `
7193
7199
  @if(layoutService.isDesktop()){
7194
7200
  <aside style="height:100%" tuitheme="" [tuiNavigationAside]="layoutService.isMenuExpanded()">
7195
7201
  @for(item of sidebarItems(); track item){
@@ -7216,8 +7222,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
7216
7222
  </footer>
7217
7223
  </aside>
7218
7224
  }
7219
- `
7220
- }]
7225
+ `, styles: ["::ng-deep tui-aside-group tui-expand tui-aside-group tui-expand [tuiAsideItem]{padding-inline-start:4rem!important}::ng-deep tui-aside-group tui-expand tui-aside-group tui-expand tui-aside-group tui-expand [tuiAsideItem]{padding-inline-start:6rem!important}\n"] }]
7221
7226
  }], ctorParameters: () => [{ type: EzUILayoutService }, { type: i2$2.Router }], propDecorators: { sidebarItems: [{
7222
7227
  type: Input
7223
7228
  }], sidebarFooterItems: [{