@shival99/z-ui 1.3.27 → 1.3.29

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.
@@ -28,13 +28,21 @@ import { FormsModule } from '@angular/forms';
28
28
  import { ZCalendarComponent } from '@shival99/z-ui/components/z-calendar';
29
29
  import { ZSelectComponent } from '@shival99/z-ui/components/z-select';
30
30
 
31
- const DEFAULT_MAX_VISIBLE = 3;
32
- const DEFAULT_DROPDOWN_BUTTON_SIZE = 'sm';
31
+ const Z_DEFAULT_ROW_HEIGHT = 40;
32
+ const Z_DEFAULT_VIRTUAL_OVERSCAN = 5;
33
+ const Z_DEFAULT_GROUP_SIZE = 1;
34
+ const Z_DEFAULT_COLUMN_MIN_SIZE = 100;
35
+ const Z_DEFAULT_DEBOUNCE_TIME = 150;
36
+ const Z_SKELETON_ROW_HEIGHT = 60;
37
+ const Z_TABLE_DEFAULT_ACTION_BUTTON_WIDTH = 32;
38
+ const Z_TABLE_DEFAULT_MAX_VISIBLE_ACTIONS = 3;
39
+ const Z_TABLE_DEFAULT_DROPDOWN_BUTTON_SIZE = 'sm';
40
+
33
41
  class ZTableActionsComponent {
34
42
  zConfig = input.required(...(ngDevMode ? [{ debugName: "zConfig" }] : []));
35
43
  zRow = input.required(...(ngDevMode ? [{ debugName: "zRow" }] : []));
36
44
  zRowId = input.required(...(ngDevMode ? [{ debugName: "zRowId" }] : []));
37
- zDropdownButtonSize = input(DEFAULT_DROPDOWN_BUTTON_SIZE, ...(ngDevMode ? [{ debugName: "zDropdownButtonSize" }] : []));
45
+ zDropdownButtonSize = input(Z_TABLE_DEFAULT_DROPDOWN_BUTTON_SIZE, ...(ngDevMode ? [{ debugName: "zDropdownButtonSize" }] : []));
38
46
  zActionClick = output();
39
47
  allActions = computed(() => {
40
48
  const config = this.zConfig();
@@ -48,7 +56,7 @@ class ZTableActionsComponent {
48
56
  }, ...(ngDevMode ? [{ debugName: "allActions" }] : []));
49
57
  shouldShowAsButtons = computed(() => {
50
58
  const actions = this.allActions();
51
- const maxVisible = this.zConfig().maxVisible ?? DEFAULT_MAX_VISIBLE;
59
+ const maxVisible = this.zConfig().maxVisible ?? Z_TABLE_DEFAULT_MAX_VISIBLE_ACTIONS;
52
60
  return actions.length <= maxVisible;
53
61
  }, ...(ngDevMode ? [{ debugName: "shouldShowAsButtons" }] : []));
54
62
  actionStates = computed(() => {
@@ -479,7 +487,7 @@ class ZTableFilterComponent {
479
487
  />
480
488
  }
481
489
  }
482
- `, isInline: true, styles: [":host{color:var(--foreground);font-weight:450;font-style:normal;text-decoration:none;text-transform:none;letter-spacing:normal}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ZInputComponent, selector: "z-input", inputs: ["class", "zType", "zSize", "zLabel", "zLabelClass", "zPlaceholder", "zRequired", "zDisabled", "zReadonly", "zPrefix", "zSuffix", "zMin", "zMax", "zStep", "zShowArrows", "zMask", "zDecimalPlaces", "zAllowNegative", "zThousandSeparator", "zDecimalMarker", "zValidators", "zAsyncValidators", "zAsyncDebounce", "zAsyncValidateOn", "zShowPasswordToggle", "zSearch", "zDebounce", "zAutofocus", "zAutoComplete", "zAllowClear", "zAutoSizeContent", "zRows", "zResize", "zMaxLength", "zAutoSuggest"], outputs: ["zOnSearch", "zOnChange", "zControl"], exportAs: ["zInput"] }, { kind: "component", type: ZSelectComponent, selector: "z-select", inputs: ["class", "zMode", "zSize", "zLabel", "zLabelClass", "zPlaceholder", "zRequired", "zDisabled", "zReadonly", "zLoading", "zPrefix", "zAllowClear", "zWrap", "zShowSearch", "zPlaceholderSearch", "zDebounce", "zNotFoundText", "zEmptyText", "zEmptyIcon", "zMaxTagCount", "zDropdownMaxHeight", "zOptionHeight", "zVirtualScroll", "zShowAction", "zOptions", "zTranslateLabels", "zKey", "zSearchServer", "zLoadingMore", "zEnableLoadMore", "zScrollDistance", "zMaxVisible", "zScrollClose", "zSelectedTemplate", "zOptionTemplate", "zActionTemplate", "zAsyncValidators", "zAsyncDebounce", "zAsyncValidateOn", "zValidators"], outputs: ["zOnSearch", "zOnLoadMore", "zControl"], exportAs: ["zSelect"] }, { kind: "component", type: ZCalendarComponent, selector: "z-calendar", inputs: ["class", "zMode", "zSize", "zLabel", "zLabelClass", "zPlaceholder", "zRequired", "zDisabled", "zReadonly", "zShowTime", "zTimeFormat", "zShowHour", "zShowMinute", "zShowSecond", "zQuickSelect", "zAllowClear", "zFormat", "zMinDate", "zMaxDate", "zValueType", "zValidators", "zLocale", "zShowOk", "zOkText", "zShowCancel", "zCancelText", "zDisabledDate", "zScrollClose"], outputs: ["zControl", "zChange"], exportAs: ["zCalendar"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
490
+ `, isInline: true, styles: [":host{color:var(--foreground);font-weight:450;font-style:normal;text-decoration:none;text-transform:none;letter-spacing:normal}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ZInputComponent, selector: "z-input", inputs: ["class", "zType", "zSize", "zLabel", "zLabelClass", "zPlaceholder", "zRequired", "zDisabled", "zReadonly", "zPrefix", "zSuffix", "zMin", "zMax", "zStep", "zShowArrows", "zMask", "zDecimalPlaces", "zAllowNegative", "zThousandSeparator", "zDecimalMarker", "zValidators", "zAsyncValidators", "zAsyncDebounce", "zAsyncValidateOn", "zShowPasswordToggle", "zSearch", "zDebounce", "zAutofocus", "zAutoComplete", "zAllowClear", "zAutoSizeContent", "zRows", "zResize", "zMaxLength", "zAutoSuggest"], outputs: ["zOnSearch", "zOnChange", "zControl"], exportAs: ["zInput"] }, { kind: "component", type: ZSelectComponent, selector: "z-select", inputs: ["class", "zMode", "zSize", "zLabel", "zLabelClass", "zPlaceholder", "zRequired", "zDisabled", "zReadonly", "zLoading", "zPrefix", "zAllowClear", "zWrap", "zShowSearch", "zPlaceholderSearch", "zDebounce", "zNotFoundText", "zEmptyText", "zEmptyIcon", "zMaxTagCount", "zDropdownMaxHeight", "zOptionHeight", "zVirtualScroll", "zShowAction", "zOptions", "zTranslateLabels", "zKey", "zSearchServer", "zLoadingMore", "zEnableLoadMore", "zScrollDistance", "zMaxVisible", "zScrollClose", "zSelectedTemplate", "zOptionTemplate", "zActionTemplate", "zAsyncValidators", "zAsyncDebounce", "zAsyncValidateOn", "zValidators"], outputs: ["zOnSearch", "zOnLoadMore", "zControl"], exportAs: ["zSelect"] }, { kind: "component", type: ZCalendarComponent, selector: "z-calendar", inputs: ["class", "zMode", "zSize", "zLabel", "zLabelClass", "zPlaceholder", "zRequired", "zDisabled", "zReadonly", "zShowTime", "zTimeFormat", "zShowHour", "zShowMinute", "zShowSecond", "zQuickSelect", "zAllowClear", "zFormat", "zMinDate", "zMaxDate", "zValueType", "zValidators", "zLocale", "zShowOk", "zOkText", "zShowCancel", "zCancelText", "zDisabledDate", "zScrollClose", "zDefaultTime", "zRangeDefaultTime"], outputs: ["zControl", "zChange"], exportAs: ["zCalendar"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
483
491
  }
484
492
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ZTableFilterComponent, decorators: [{
485
493
  type: Component,
@@ -605,14 +613,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
605
613
  }, styles: [":host{color:var(--foreground);font-weight:450;font-style:normal;text-decoration:none;text-transform:none;letter-spacing:normal}\n"] }]
606
614
  }], propDecorators: { zColumn: [{ type: i0.Input, args: [{ isSignal: true, alias: "zColumn", required: true }] }], zTable: [{ type: i0.Input, args: [{ isSignal: true, alias: "zTable", required: true }] }] } });
607
615
 
608
- const Z_DEFAULT_ROW_HEIGHT = 40;
609
- const Z_DEFAULT_VIRTUAL_OVERSCAN = 5;
610
- const Z_DEFAULT_GROUP_SIZE = 1;
611
- const Z_DEFAULT_COLUMN_MIN_SIZE = 100;
612
- const Z_DEFAULT_DEBOUNCE_TIME = 150;
613
- const Z_SKELETON_ROW_HEIGHT = 60;
614
- const Z_TABLE_DEFAULT_ACTION_BUTTON_WIDTH = 32;
615
-
616
616
  const filterVisibleColumns = (columns) => columns
617
617
  .filter(col => {
618
618
  const { visible } = col;