@ng-nest/ui 18.0.10 → 18.0.11

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.
Files changed (39) hide show
  1. package/esm2022/input-number/input-number.component.mjs +3 -3
  2. package/esm2022/keyword/keyword.directive.mjs +4 -1
  3. package/esm2022/list/list.component.mjs +28 -13
  4. package/esm2022/menu/menu-node.component.mjs +6 -3
  5. package/esm2022/menu/menu.component.mjs +3 -3
  6. package/esm2022/message-box/message-box.component.mjs +10 -4
  7. package/esm2022/message-box/message-box.property.mjs +1 -1
  8. package/esm2022/message-box/message-box.service.mjs +11 -4
  9. package/esm2022/pagination/pagination.component.mjs +3 -3
  10. package/esm2022/popconfirm/popconfirm.component.mjs +3 -3
  11. package/esm2022/select/select.component.mjs +3 -4
  12. package/esm2022/textarea/textarea.property.mjs +7 -2
  13. package/esm2022/tooltip/tooltip-portal.component.mjs +14 -3
  14. package/fesm2022/ng-nest-ui-input-number.mjs +2 -2
  15. package/fesm2022/ng-nest-ui-input-number.mjs.map +1 -1
  16. package/fesm2022/ng-nest-ui-keyword.mjs +3 -0
  17. package/fesm2022/ng-nest-ui-keyword.mjs.map +1 -1
  18. package/fesm2022/ng-nest-ui-list.mjs +27 -12
  19. package/fesm2022/ng-nest-ui-list.mjs.map +1 -1
  20. package/fesm2022/ng-nest-ui-menu.mjs +7 -4
  21. package/fesm2022/ng-nest-ui-menu.mjs.map +1 -1
  22. package/fesm2022/ng-nest-ui-message-box.mjs +19 -6
  23. package/fesm2022/ng-nest-ui-message-box.mjs.map +1 -1
  24. package/fesm2022/ng-nest-ui-pagination.mjs +2 -2
  25. package/fesm2022/ng-nest-ui-pagination.mjs.map +1 -1
  26. package/fesm2022/ng-nest-ui-popconfirm.mjs +2 -2
  27. package/fesm2022/ng-nest-ui-popconfirm.mjs.map +1 -1
  28. package/fesm2022/ng-nest-ui-select.mjs +2 -3
  29. package/fesm2022/ng-nest-ui-select.mjs.map +1 -1
  30. package/fesm2022/ng-nest-ui-textarea.mjs +6 -1
  31. package/fesm2022/ng-nest-ui-textarea.mjs.map +1 -1
  32. package/fesm2022/ng-nest-ui-tooltip.mjs +13 -2
  33. package/fesm2022/ng-nest-ui-tooltip.mjs.map +1 -1
  34. package/list/list.component.d.ts +3 -0
  35. package/menu/menu-node.component.d.ts +5 -2
  36. package/message-box/message-box.property.d.ts +17 -2
  37. package/package.json +146 -146
  38. package/textarea/textarea.property.d.ts +11 -10
  39. package/tooltip/tooltip-portal.component.d.ts +3 -0
@@ -10,6 +10,7 @@ import { XIconComponent } from '@ng-nest/ui/icon';
10
10
  import { XInputComponent } from '@ng-nest/ui/input';
11
11
  import { XOutletDirective } from '@ng-nest/ui/outlet';
12
12
  import { NgTemplateOutlet } from '@angular/common';
13
+ import { XTextareaComponent } from '@ng-nest/ui/textarea';
13
14
  import { XPortalService } from '@ng-nest/ui/portal';
14
15
  import { XI18nService } from '@ng-nest/ui/i18n';
15
16
 
@@ -43,7 +44,7 @@ class XMessageBoxComponent {
43
44
  return this.msgInput.inputPattern;
44
45
  }
45
46
  ngOnInit() {
46
- this.msgInput.showInput && this.createFormGroup();
47
+ (this.msgInput.showInput || this.msgInput.showTextarea) && this.createFormGroup();
47
48
  }
48
49
  onClose() {
49
50
  this.action = 'close';
@@ -74,6 +75,10 @@ class XMessageBoxComponent {
74
75
  this.action = 'confirm';
75
76
  this.hideBox();
76
77
  }
78
+ else if (!this.msgInput.showTextarea || (this.msgInput.showTextarea && this.formGroup.valid)) {
79
+ this.action = 'confirm';
80
+ this.hideBox();
81
+ }
77
82
  };
78
83
  if (this.msgInput.confirmLoading && XIsFunction(this.msgInput.confirmLoading)) {
79
84
  this.loading = true;
@@ -107,7 +112,7 @@ class XMessageBoxComponent {
107
112
  ]));
108
113
  }
109
114
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: XMessageBoxComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
110
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: XMessageBoxComponent, isStandalone: true, selector: "x-message-box", ngImport: i0, template: "@if (!msgInput.hide) {\r\n <div\r\n class=\"x-message-box\"\r\n [@x-move-box-animation]=\"msgInput.placement\"\r\n (@x-move-box-animation.done)=\"moveDone($event)\"\r\n >\r\n <x-alert\r\n (close)=\"onClose()\"\r\n [title]=\"msgInput.title\"\r\n [content]=\"contentTpl\"\r\n [type]=\"msgInput.type!\"\r\n [effect]=\"msgInput.effect!\"\r\n [hideClose]=\"msgInput.hideClose!\"\r\n [closeText]=\"msgInput.closeText\"\r\n [showIcon]=\"false\"\r\n [duration]=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n <ng-template #contentTpl let-iconTpl=\"$iconTpl\">\r\n <div class=\"x-message-box-inner\">\r\n <div class=\"x-message-box-content\">\r\n @if (msgInput.showInput) {\r\n <form [formGroup]=\"formGroup\">\r\n <x-input\r\n formControlName=\"inputValue\"\r\n [type]=\"msgInput.inputType!\"\r\n [label]=\"getLabel\"\r\n [placeholder]=\"msgInput.inputPlaceholder!\"\r\n [pattern]=\"getPattern\"\r\n [message]=\"msgInput.inputInvalidMessage!\"\r\n [inputValidator]=\"msgInput.inputValidator!\"\r\n ></x-input>\r\n </form>\r\n } @else {\r\n @if (msgInput.showIcon) {\r\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\r\n }\r\n <ng-container *xOutlet=\"msgInput.content\">\r\n {{ msgInput.content }}\r\n </ng-container>\r\n }\r\n </div>\r\n <x-buttons space=\"0.5rem\">\r\n @if (msgInput.showCancel) {\r\n <x-button (click)=\"onCancel()\" flat plain>{{ msgInput.cancelText }}</x-button>\r\n }\r\n <x-button type=\"primary\" flat (click)=\"onConfirm()\" [disabled]=\"formGroup!.invalid\" [loading]=\"loading\">{{\r\n msgInput.confirmText\r\n }}</x-button>\r\n </x-buttons>\r\n </div>\r\n </ng-template>\r\n </div>\r\n}\r\n", styles: [".x-message-box{margin:0;padding:0}.x-message-box-inner{display:flex;flex-direction:column;margin:.5rem 0}.x-message-box-inner>x-buttons{margin-top:1rem;align-self:flex-end}.x-message-box-content{display:inline-flex}.x-message-box-content>form{width:100%}.x-message-box-content>form>x-input{width:100%}.x-message-box-portal x-message-box{width:100%}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: XInputComponent, selector: "x-input" }, { kind: "component", type: XButtonComponent, selector: "x-button" }, { kind: "component", type: XButtonsComponent, selector: "x-buttons" }, { kind: "component", type: XAlertComponent, selector: "x-alert" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], animations: [XMoveBoxAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
115
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: XMessageBoxComponent, isStandalone: true, selector: "x-message-box", ngImport: i0, template: "@if (!msgInput.hide) {\r\n <div\r\n class=\"x-message-box\"\r\n [@x-move-box-animation]=\"msgInput.placement\"\r\n (@x-move-box-animation.done)=\"moveDone($event)\"\r\n >\r\n <x-alert\r\n (close)=\"onClose()\"\r\n [title]=\"msgInput.title\"\r\n [content]=\"contentTpl\"\r\n [type]=\"msgInput.type!\"\r\n [effect]=\"msgInput.effect!\"\r\n [hideClose]=\"msgInput.hideClose!\"\r\n [closeText]=\"msgInput.closeText\"\r\n [showIcon]=\"false\"\r\n [duration]=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n <ng-template #contentTpl let-iconTpl=\"$iconTpl\">\r\n <div class=\"x-message-box-inner\">\r\n <div class=\"x-message-box-content\">\r\n @if (msgInput.showInput) {\r\n <form [formGroup]=\"formGroup\">\r\n <x-input\r\n formControlName=\"inputValue\"\r\n [type]=\"msgInput.inputType!\"\r\n [label]=\"getLabel\"\r\n [placeholder]=\"msgInput.inputPlaceholder!\"\r\n [pattern]=\"getPattern\"\r\n [message]=\"msgInput.inputInvalidMessage!\"\r\n [inputValidator]=\"msgInput.inputValidator!\"\r\n ></x-input>\r\n </form>\r\n } @else if (msgInput.showTextarea) {\r\n <form [formGroup]=\"formGroup\">\r\n <x-textarea\r\n formControlName=\"inputValue\"\r\n [placeholder]=\"msgInput.inputPlaceholder!\"\r\n [label]=\"getLabel\"\r\n [pattern]=\"getPattern\"\r\n [message]=\"msgInput.inputInvalidMessage!\"\r\n [inputValidator]=\"msgInput.inputValidator!\"\r\n [maxlength]=\"msgInput.textareaMaxlength!\"\r\n [height]=\"msgInput.textareaHeight!\"\r\n ></x-textarea>\r\n </form>\r\n } @else {\r\n @if (msgInput.showIcon) {\r\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\r\n }\r\n <ng-container *xOutlet=\"msgInput.content\">\r\n {{ msgInput.content }}\r\n </ng-container>\r\n }\r\n </div>\r\n <x-buttons space=\"0.5rem\">\r\n @if (msgInput.showCancel) {\r\n <x-button (click)=\"onCancel()\" flat plain>{{ msgInput.cancelText }}</x-button>\r\n }\r\n <x-button type=\"primary\" flat (click)=\"onConfirm()\" [disabled]=\"formGroup!.invalid\" [loading]=\"loading\">{{\r\n msgInput.confirmText\r\n }}</x-button>\r\n </x-buttons>\r\n </div>\r\n </ng-template>\r\n </div>\r\n}\r\n", styles: [".x-message-box{margin:0;padding:0}.x-message-box-inner{display:flex;flex-direction:column;margin:.5rem 0}.x-message-box-inner>x-buttons{margin-top:1rem;align-self:flex-end}.x-message-box-content{display:inline-flex}.x-message-box-content>form{width:100%;margin-bottom:1rem}.x-message-box-content>form>x-input{width:100%}.x-message-box-content>form>x-textarea{width:100%}.x-message-box-portal x-message-box{width:100%}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: XInputComponent, selector: "x-input" }, { kind: "component", type: XTextareaComponent, selector: "x-textarea" }, { kind: "component", type: XButtonComponent, selector: "x-button" }, { kind: "component", type: XButtonsComponent, selector: "x-buttons" }, { kind: "component", type: XAlertComponent, selector: "x-alert" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], animations: [XMoveBoxAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
111
116
  }
112
117
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: XMessageBoxComponent, decorators: [{
113
118
  type: Component,
@@ -116,12 +121,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
116
121
  FormsModule,
117
122
  ReactiveFormsModule,
118
123
  XInputComponent,
124
+ XTextareaComponent,
119
125
  XButtonComponent,
120
126
  XButtonsComponent,
121
127
  XIconComponent,
122
128
  XAlertComponent,
123
129
  XOutletDirective
124
- ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [XMoveBoxAnimation], template: "@if (!msgInput.hide) {\r\n <div\r\n class=\"x-message-box\"\r\n [@x-move-box-animation]=\"msgInput.placement\"\r\n (@x-move-box-animation.done)=\"moveDone($event)\"\r\n >\r\n <x-alert\r\n (close)=\"onClose()\"\r\n [title]=\"msgInput.title\"\r\n [content]=\"contentTpl\"\r\n [type]=\"msgInput.type!\"\r\n [effect]=\"msgInput.effect!\"\r\n [hideClose]=\"msgInput.hideClose!\"\r\n [closeText]=\"msgInput.closeText\"\r\n [showIcon]=\"false\"\r\n [duration]=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n <ng-template #contentTpl let-iconTpl=\"$iconTpl\">\r\n <div class=\"x-message-box-inner\">\r\n <div class=\"x-message-box-content\">\r\n @if (msgInput.showInput) {\r\n <form [formGroup]=\"formGroup\">\r\n <x-input\r\n formControlName=\"inputValue\"\r\n [type]=\"msgInput.inputType!\"\r\n [label]=\"getLabel\"\r\n [placeholder]=\"msgInput.inputPlaceholder!\"\r\n [pattern]=\"getPattern\"\r\n [message]=\"msgInput.inputInvalidMessage!\"\r\n [inputValidator]=\"msgInput.inputValidator!\"\r\n ></x-input>\r\n </form>\r\n } @else {\r\n @if (msgInput.showIcon) {\r\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\r\n }\r\n <ng-container *xOutlet=\"msgInput.content\">\r\n {{ msgInput.content }}\r\n </ng-container>\r\n }\r\n </div>\r\n <x-buttons space=\"0.5rem\">\r\n @if (msgInput.showCancel) {\r\n <x-button (click)=\"onCancel()\" flat plain>{{ msgInput.cancelText }}</x-button>\r\n }\r\n <x-button type=\"primary\" flat (click)=\"onConfirm()\" [disabled]=\"formGroup!.invalid\" [loading]=\"loading\">{{\r\n msgInput.confirmText\r\n }}</x-button>\r\n </x-buttons>\r\n </div>\r\n </ng-template>\r\n </div>\r\n}\r\n", styles: [".x-message-box{margin:0;padding:0}.x-message-box-inner{display:flex;flex-direction:column;margin:.5rem 0}.x-message-box-inner>x-buttons{margin-top:1rem;align-self:flex-end}.x-message-box-content{display:inline-flex}.x-message-box-content>form{width:100%}.x-message-box-content>form>x-input{width:100%}.x-message-box-portal x-message-box{width:100%}\n"] }]
130
+ ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [XMoveBoxAnimation], template: "@if (!msgInput.hide) {\r\n <div\r\n class=\"x-message-box\"\r\n [@x-move-box-animation]=\"msgInput.placement\"\r\n (@x-move-box-animation.done)=\"moveDone($event)\"\r\n >\r\n <x-alert\r\n (close)=\"onClose()\"\r\n [title]=\"msgInput.title\"\r\n [content]=\"contentTpl\"\r\n [type]=\"msgInput.type!\"\r\n [effect]=\"msgInput.effect!\"\r\n [hideClose]=\"msgInput.hideClose!\"\r\n [closeText]=\"msgInput.closeText\"\r\n [showIcon]=\"false\"\r\n [duration]=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n <ng-template #contentTpl let-iconTpl=\"$iconTpl\">\r\n <div class=\"x-message-box-inner\">\r\n <div class=\"x-message-box-content\">\r\n @if (msgInput.showInput) {\r\n <form [formGroup]=\"formGroup\">\r\n <x-input\r\n formControlName=\"inputValue\"\r\n [type]=\"msgInput.inputType!\"\r\n [label]=\"getLabel\"\r\n [placeholder]=\"msgInput.inputPlaceholder!\"\r\n [pattern]=\"getPattern\"\r\n [message]=\"msgInput.inputInvalidMessage!\"\r\n [inputValidator]=\"msgInput.inputValidator!\"\r\n ></x-input>\r\n </form>\r\n } @else if (msgInput.showTextarea) {\r\n <form [formGroup]=\"formGroup\">\r\n <x-textarea\r\n formControlName=\"inputValue\"\r\n [placeholder]=\"msgInput.inputPlaceholder!\"\r\n [label]=\"getLabel\"\r\n [pattern]=\"getPattern\"\r\n [message]=\"msgInput.inputInvalidMessage!\"\r\n [inputValidator]=\"msgInput.inputValidator!\"\r\n [maxlength]=\"msgInput.textareaMaxlength!\"\r\n [height]=\"msgInput.textareaHeight!\"\r\n ></x-textarea>\r\n </form>\r\n } @else {\r\n @if (msgInput.showIcon) {\r\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\r\n }\r\n <ng-container *xOutlet=\"msgInput.content\">\r\n {{ msgInput.content }}\r\n </ng-container>\r\n }\r\n </div>\r\n <x-buttons space=\"0.5rem\">\r\n @if (msgInput.showCancel) {\r\n <x-button (click)=\"onCancel()\" flat plain>{{ msgInput.cancelText }}</x-button>\r\n }\r\n <x-button type=\"primary\" flat (click)=\"onConfirm()\" [disabled]=\"formGroup!.invalid\" [loading]=\"loading\">{{\r\n msgInput.confirmText\r\n }}</x-button>\r\n </x-buttons>\r\n </div>\r\n </ng-template>\r\n </div>\r\n}\r\n", styles: [".x-message-box{margin:0;padding:0}.x-message-box-inner{display:flex;flex-direction:column;margin:.5rem 0}.x-message-box-inner>x-buttons{margin-top:1rem;align-self:flex-end}.x-message-box-content{display:inline-flex}.x-message-box-content>form{width:100%;margin-bottom:1rem}.x-message-box-content>form>x-input{width:100%}.x-message-box-content>form>x-textarea{width:100%}.x-message-box-portal x-message-box{width:100%}\n"] }]
125
131
  }], ctorParameters: () => [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }] });
126
132
 
127
133
  class XMessageBoxService {
@@ -135,11 +141,13 @@ class XMessageBoxService {
135
141
  duration: 3000,
136
142
  showIcon: false,
137
143
  showInput: false,
144
+ showTextarea: false,
138
145
  backdropClose: false,
139
146
  cancelText: '取消',
140
147
  confirmText: '确认',
141
148
  inputPlaceholder: '',
142
- hide: false
149
+ hide: false,
150
+ textareaHeight: '6rem'
143
151
  };
144
152
  this.portal = inject(XPortalService);
145
153
  this.i18n = inject(XI18nService);
@@ -151,7 +159,12 @@ class XMessageBoxService {
151
159
  return this.createMessageBox(option, { showIcon: true, showCancel: true, showInput: false });
152
160
  }
153
161
  prompt(option) {
154
- return this.createMessageBox(option, { showIcon: false, showCancel: true, showInput: true });
162
+ const opt = option;
163
+ let def = { showIcon: false, showCancel: true, showInput: true };
164
+ if (!opt.showInput && opt.showTextarea) {
165
+ def = { showIcon: false, showCancel: true, showTextarea: true };
166
+ }
167
+ return this.createMessageBox(option, def);
155
168
  }
156
169
  create(option) {
157
170
  const offset = XIsString(option.offset) ? [option.offset] : option.offset;
@@ -175,7 +188,7 @@ class XMessageBoxService {
175
188
  opt = option;
176
189
  }
177
190
  this.setLocal();
178
- XFillDefault(opt, Object.assign(this.default, def));
191
+ XFillDefault(opt, Object.assign({ ...this.default }, def));
179
192
  return this.createMessageBoxPlacement(opt);
180
193
  }
181
194
  createMessageBoxPlacement(option) {
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-message-box.mjs","sources":["../../../../lib/ng-nest/ui/message-box/message-box.property.ts","../../../../lib/ng-nest/ui/message-box/message-box.component.ts","../../../../lib/ng-nest/ui/message-box/message-box.component.html","../../../../lib/ng-nest/ui/message-box/message-box.service.ts","../../../../lib/ng-nest/ui/message-box/message-box.module.ts","../../../../lib/ng-nest/ui/message-box/ng-nest-ui-message-box.ts"],"sourcesContent":["import { XStatus, XPlace } from '@ng-nest/ui/core';\r\nimport { XAlertOption } from '@ng-nest/ui/alert';\r\nimport { XMessageBoxComponent } from './message-box.component';\r\nimport { XPortalOverlayRef } from '@ng-nest/ui/portal';\r\nimport { XInputType } from '@ng-nest/ui/input';\r\nimport { Observable } from 'rxjs';\r\n\r\n/**\r\n * MessageBox\r\n * @selector x-message-box\r\n * @decorator component\r\n */\r\nexport const XMessageBoxPrefix = 'x-message-box';\r\n\r\nexport const XMessageBoxPortal = 'x-message-box-portal';\r\n\r\n/**\r\n * MessageBox Option\r\n */\r\nexport interface XMessageBoxOption extends XAlertOption {\r\n /**\r\n * @zh_CN 方位,九宫格\r\n * @en_US Direction, nine grid\r\n * @default 'top'\r\n */\r\n placement?: XPlace;\r\n /**\r\n * @zh_CN 偏移距离\r\n * @en_US Offset distance\r\n * @default '2rem'\r\n */\r\n offset?: string | string[];\r\n /**\r\n * @zh_CN 类型\r\n * @en_US Types of\r\n * @default 'info'\r\n */\r\n type?: XMessageBoxType;\r\n /**\r\n * @zh_CN 宽度\r\n * @en_US Width\r\n * @default '16rem'\r\n */\r\n width?: string;\r\n /**\r\n * @zh_CN 高度\r\n * @en_US Height\r\n */\r\n height?: string;\r\n /**\r\n * @zh_CN 隐藏关闭按钮\r\n * @en_US Hide close button\r\n * @default true\r\n */\r\n hideClose?: boolean;\r\n /**\r\n * @zh_CN 显示图标\r\n * @en_US Show icon\r\n * @default true\r\n */\r\n showIcon?: boolean;\r\n /**\r\n * @zh_CN 显示取消按钮\r\n * @en_US Show cancel button\r\n */\r\n showCancel?: boolean;\r\n /**\r\n * @zh_CN 关闭事件\r\n * @en_US Close event\r\n */\r\n callback?: XMessageBoxCallback;\r\n /**\r\n * @zh_CN 点击遮罩关闭\r\n * @en_US Click the mask to close\r\n * @default false\r\n */\r\n backdropClose?: boolean;\r\n /**\r\n * @zh_CN 确认按钮文字\r\n * @en_US Confirm button text\r\n * @default '确定'\r\n */\r\n confirmText?: string;\r\n /**\r\n * @zh_CN 取消按钮文字\r\n * @en_US Cancel button text\r\n * @default '取消'\r\n */\r\n cancelText?: string;\r\n /**\r\n * @zh_CN 是否显示输入框\r\n * @en_US Whether to show the input box\r\n */\r\n showInput?: boolean;\r\n /**\r\n * @zh_CN 匹配规则\r\n * @en_US Matching rules\r\n */\r\n inputPattern?: RegExp | RegExp[];\r\n /**\r\n * @zh_CN 匹配失败的信息提示\r\n * @en_US Information prompt for matching failure\r\n */\r\n inputInvalidMessage?: string | string[];\r\n /**\r\n * @zh_CN 输入框的占位符\r\n * @en_US Placeholder for input box\r\n */\r\n inputPlaceholder?: string;\r\n /**\r\n * @zh_CN 输入框的类型\r\n * @en_US Type of input box\r\n */\r\n inputType?: XInputType;\r\n /**\r\n * @zh_CN 输入框的值\r\n * @en_US Value of input box\r\n */\r\n inputValue?: string;\r\n /**\r\n * @zh_CN 输入框的验证函数\r\n * @en_US Validation function of input box\r\n */\r\n inputValidator?: (value: any) => boolean;\r\n /**\r\n * @zh_CN 关闭前处理函数\r\n * @en_US Processing function before closing\r\n */\r\n beforeClose?: XMessageBoxCallback;\r\n /**\r\n * @zh_CN 确认加载\r\n * @en_US confirm Loading\r\n */\r\n confirmLoading?: XMessageBoxConfirmLoading;\r\n}\r\n\r\n/**\r\n * @zh_CN 关闭的回调函数类型\r\n * @en_US Closed callback function type\r\n */\r\nexport interface XMessageBoxCallback {\r\n (action: XMessageBoxAction, message?: string): void;\r\n}\r\n\r\n/**\r\n * @zh_CN 确认加载\r\n * @en_US confirm Loading\r\n */\r\nexport type XMessageBoxConfirmLoading = () => Observable<boolean>;\r\n\r\n/**\r\n * @zh_CN 触发关闭的类型\r\n * @en_US Type of trigger closure\r\n */\r\nexport type XMessageBoxAction = 'confirm' | 'cancel' | 'close';\r\n\r\n/**\r\n * @zh_CN 创建的消息对象\r\n * @en_US Message object created\r\n */\r\nexport interface XMessageBoxOverlayRef extends XPortalOverlayRef<XMessageBoxComponent> {}\r\n\r\nexport interface XMessageBoxRef {\r\n ref: XMessageBoxOverlayRef;\r\n input: XMessageBoxOption;\r\n close: () => void;\r\n}\r\n\r\n/**\r\n * @zh_CN 类型\r\n * @en_US Types of\r\n */\r\nexport type XMessageBoxType = XStatus;\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n OnInit\r\n} from '@angular/core';\r\nimport { XIsFunction, XMoveBoxAnimation } from '@ng-nest/ui/core';\r\nimport { XMessageBoxPrefix, XMessageBoxRef, XMessageBoxAction } from './message-box.property';\r\nimport { UntypedFormGroup, UntypedFormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { XFormInputValidator } from '@ng-nest/ui/base-form';\r\nimport { XAlertComponent } from '@ng-nest/ui/alert';\r\nimport { XButtonComponent, XButtonsComponent } from '@ng-nest/ui/button';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XInputComponent } from '@ng-nest/ui/input';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\n\r\n@Component({\r\n selector: `${XMessageBoxPrefix}`,\r\n standalone: true,\r\n imports: [\r\n NgTemplateOutlet,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n XInputComponent,\r\n XButtonComponent,\r\n XButtonsComponent,\r\n XIconComponent,\r\n XAlertComponent,\r\n XOutletDirective\r\n ],\r\n templateUrl: './message-box.component.html',\r\n styleUrls: ['./message-box.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: [XMoveBoxAnimation]\r\n})\r\nexport class XMessageBoxComponent implements OnInit {\r\n messageBox!: XMessageBoxRef;\r\n action: XMessageBoxAction = 'close';\r\n formGroup: UntypedFormGroup = new UntypedFormGroup({});\r\n loading = false;\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef<HTMLElement>,\r\n public cdr: ChangeDetectorRef\r\n ) {}\r\n\r\n get msgInput() {\r\n return this.messageBox.input!;\r\n }\r\n\r\n get msgOverlayRef() {\r\n return this.messageBox.ref!;\r\n }\r\n\r\n get getLabel() {\r\n return this.msgInput.content as string;\r\n }\r\n\r\n get getPattern() {\r\n return this.msgInput.inputPattern as RegExp;\r\n }\r\n\r\n ngOnInit() {\r\n this.msgInput.showInput && this.createFormGroup();\r\n }\r\n\r\n onClose() {\r\n this.action = 'close';\r\n this.hideBox();\r\n }\r\n\r\n onCancel() {\r\n this.action = 'cancel';\r\n this.hideBox();\r\n }\r\n\r\n hideBox() {\r\n if (XIsFunction(this.msgInput.beforeClose)) {\r\n this.msgInput.beforeClose!(this.action, this.getInputValue());\r\n } else {\r\n this.close();\r\n }\r\n }\r\n\r\n close() {\r\n if (this.msgInput.hide && this.msgInput.hide !== true) {\r\n this.msgInput.hide = true;\r\n }\r\n this.msgOverlayRef?.overlayRef?.detach();\r\n this.cdr.detectChanges();\r\n }\r\n\r\n onConfirm() {\r\n const hide = () => {\r\n if (!this.msgInput.showInput || (this.msgInput.showInput && this.formGroup.valid)) {\r\n this.action = 'confirm';\r\n this.hideBox();\r\n }\r\n };\r\n if (this.msgInput.confirmLoading && XIsFunction(this.msgInput.confirmLoading)) {\r\n this.loading = true;\r\n this.msgInput.confirmLoading().subscribe((x) => {\r\n this.loading = false;\r\n this.cdr.markForCheck();\r\n if (!x) return;\r\n this.action = 'confirm';\r\n hide();\r\n });\r\n } else {\r\n hide();\r\n }\r\n }\r\n\r\n moveDone($event: { toState: string }) {\r\n if ($event.toState === 'void') {\r\n XIsFunction(this.msgInput.callback) && this.msgInput.callback!(this.action, this.getInputValue());\r\n this.msgOverlayRef.overlayRef?.dispose();\r\n }\r\n }\r\n\r\n getInputValue() {\r\n return this.formGroup.controls['inputValue']?.value;\r\n }\r\n\r\n createFormGroup() {\r\n this.formGroup.addControl(\r\n 'inputValue',\r\n new UntypedFormControl(this.msgInput.inputValue, [\r\n Validators.required,\r\n Validators.pattern(this.msgInput.inputPattern as RegExp),\r\n XFormInputValidator(this.msgInput.inputValidator!)\r\n ])\r\n );\r\n }\r\n}\r\n","@if (!msgInput.hide) {\r\n <div\r\n class=\"x-message-box\"\r\n [@x-move-box-animation]=\"msgInput.placement\"\r\n (@x-move-box-animation.done)=\"moveDone($event)\"\r\n >\r\n <x-alert\r\n (close)=\"onClose()\"\r\n [title]=\"msgInput.title\"\r\n [content]=\"contentTpl\"\r\n [type]=\"msgInput.type!\"\r\n [effect]=\"msgInput.effect!\"\r\n [hideClose]=\"msgInput.hideClose!\"\r\n [closeText]=\"msgInput.closeText\"\r\n [showIcon]=\"false\"\r\n [duration]=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n <ng-template #contentTpl let-iconTpl=\"$iconTpl\">\r\n <div class=\"x-message-box-inner\">\r\n <div class=\"x-message-box-content\">\r\n @if (msgInput.showInput) {\r\n <form [formGroup]=\"formGroup\">\r\n <x-input\r\n formControlName=\"inputValue\"\r\n [type]=\"msgInput.inputType!\"\r\n [label]=\"getLabel\"\r\n [placeholder]=\"msgInput.inputPlaceholder!\"\r\n [pattern]=\"getPattern\"\r\n [message]=\"msgInput.inputInvalidMessage!\"\r\n [inputValidator]=\"msgInput.inputValidator!\"\r\n ></x-input>\r\n </form>\r\n } @else {\r\n @if (msgInput.showIcon) {\r\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\r\n }\r\n <ng-container *xOutlet=\"msgInput.content\">\r\n {{ msgInput.content }}\r\n </ng-container>\r\n }\r\n </div>\r\n <x-buttons space=\"0.5rem\">\r\n @if (msgInput.showCancel) {\r\n <x-button (click)=\"onCancel()\" flat plain>{{ msgInput.cancelText }}</x-button>\r\n }\r\n <x-button type=\"primary\" flat (click)=\"onConfirm()\" [disabled]=\"formGroup!.invalid\" [loading]=\"loading\">{{\r\n msgInput.confirmText\r\n }}</x-button>\r\n </x-buttons>\r\n </div>\r\n </ng-template>\r\n </div>\r\n}\r\n","import { ComponentRef, Injectable, inject } from '@angular/core';\r\nimport { XTemplate, XIsXTemplate, XFillDefault, XIsString } from '@ng-nest/ui/core';\r\nimport { XMessageBoxOption, XMessageBoxOverlayRef, XMessageBoxRef, XMessageBoxPortal } from './message-box.property';\r\nimport { XMessageBoxComponent } from './message-box.component';\r\nimport { XPortalService } from '@ng-nest/ui/portal';\r\nimport { XI18nService } from '@ng-nest/ui/i18n';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class XMessageBoxService {\r\n default: XMessageBoxOption = {\r\n type: 'info',\r\n width: '20rem',\r\n placement: 'center',\r\n offset: '2rem',\r\n effect: 'white',\r\n duration: 3000,\r\n showIcon: false,\r\n showInput: false,\r\n backdropClose: false,\r\n cancelText: '取消',\r\n confirmText: '确认',\r\n inputPlaceholder: '',\r\n hide: false\r\n };\r\n\r\n private portal = inject(XPortalService);\r\n private i18n = inject(XI18nService);\r\n\r\n alert(option: XTemplate | XMessageBoxOption): XMessageBoxRef {\r\n return this.createMessageBox(option, { showIcon: false, showCancel: false, showInput: false });\r\n }\r\n\r\n confirm(option: XTemplate | XMessageBoxOption): XMessageBoxRef {\r\n return this.createMessageBox(option, { showIcon: true, showCancel: true, showInput: false });\r\n }\r\n\r\n prompt(option: XTemplate | XMessageBoxOption): XMessageBoxRef {\r\n return this.createMessageBox(option, { showIcon: false, showCancel: true, showInput: true });\r\n }\r\n\r\n create(option: XMessageBoxOption): XMessageBoxOverlayRef {\r\n const offset = XIsString(option.offset) ? [option.offset as string] : (option.offset as string[]);\r\n return this.portal.attach({\r\n content: XMessageBoxComponent,\r\n overlayConfig: {\r\n panelClass: XMessageBoxPortal,\r\n hasBackdrop: true,\r\n width: option.width,\r\n height: option.height,\r\n positionStrategy: this.portal.setPlace(option.placement, ...offset)\r\n }\r\n });\r\n }\r\n\r\n private createMessageBox(option: XTemplate | XMessageBoxOption, def: XMessageBoxOption): XMessageBoxRef {\r\n let opt: XMessageBoxOption;\r\n if (XIsXTemplate(option)) {\r\n opt = { title: option as XTemplate };\r\n } else {\r\n opt = option as XMessageBoxOption;\r\n }\r\n this.setLocal();\r\n XFillDefault(opt, Object.assign(this.default, def));\r\n return this.createMessageBoxPlacement(opt);\r\n }\r\n\r\n private createMessageBoxPlacement(option: XMessageBoxOption): XMessageBoxRef {\r\n const ref = this.create(option);\r\n const { overlayRef, componentRef } = ref;\r\n const { instance } = componentRef as ComponentRef<XMessageBoxComponent>;\r\n const result = {\r\n ref: ref,\r\n input: option,\r\n close: () => {\r\n instance.close();\r\n }\r\n };\r\n instance.messageBox = result;\r\n if (option.backdropClose && overlayRef) {\r\n overlayRef.backdropClick().subscribe(() => instance.onClose());\r\n }\r\n return result;\r\n }\r\n\r\n private setLocal() {\r\n const messageBoxLocale = this.i18n.getLocale().messageBox;\r\n this.default = { ...this.default, ...messageBoxLocale };\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\n\r\n@NgModule({\r\n exports: [],\r\n imports: []\r\n})\r\nexport class XMessageBoxModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAOA;;;;AAIG;AACI,MAAM,iBAAiB,GAAG,gBAAgB;AAE1C,MAAM,iBAAiB,GAAG;;MC0BpB,oBAAoB,CAAA;AAK/B,IAAA,WAAA,CACS,QAAmB,EACnB,UAAmC,EACnC,GAAsB,EAAA;QAFtB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAW;QACnB,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;QACnC,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QAN/B,IAAM,CAAA,MAAA,GAAsB,OAAO,CAAC;AACpC,QAAA,IAAA,CAAA,SAAS,GAAqB,IAAI,gBA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A,EAAA,IAAA,EAAA,kBAAkB,cADL,MAAM,EAAA,CAAA,CAAA,EAAA;;2FACnB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;MCDrB,iBAAiB,CAAA;iIAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;kIAAjB,iBAAiB,EAAA,CAAA,CAAA,EAAA;kIAAjB,iBAAiB,EAAA,CAAA,CAAA,EAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,EAAE;AACZ,iBAAA,CAAA;;;ACLD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-message-box.mjs","sources":["../../../../lib/ng-nest/ui/message-box/message-box.property.ts","../../../../lib/ng-nest/ui/message-box/message-box.component.ts","../../../../lib/ng-nest/ui/message-box/message-box.component.html","../../../../lib/ng-nest/ui/message-box/message-box.service.ts","../../../../lib/ng-nest/ui/message-box/message-box.module.ts","../../../../lib/ng-nest/ui/message-box/ng-nest-ui-message-box.ts"],"sourcesContent":["import { XStatus, XPlace } from '@ng-nest/ui/core';\r\nimport { XAlertOption } from '@ng-nest/ui/alert';\r\nimport { XMessageBoxComponent } from './message-box.component';\r\nimport { XPortalOverlayRef } from '@ng-nest/ui/portal';\r\nimport { XInputType } from '@ng-nest/ui/input';\r\nimport { Observable } from 'rxjs';\r\n\r\n/**\r\n * MessageBox\r\n * @selector x-message-box\r\n * @decorator component\r\n */\r\nexport const XMessageBoxPrefix = 'x-message-box';\r\n\r\nexport const XMessageBoxPortal = 'x-message-box-portal';\r\n\r\n/**\r\n * MessageBox Option\r\n */\r\nexport interface XMessageBoxOption extends XAlertOption {\r\n /**\r\n * @zh_CN 方位,九宫格\r\n * @en_US Direction, nine grid\r\n * @default 'top'\r\n */\r\n placement?: XPlace;\r\n /**\r\n * @zh_CN 偏移距离\r\n * @en_US Offset distance\r\n * @default '2rem'\r\n */\r\n offset?: string | string[];\r\n /**\r\n * @zh_CN 类型\r\n * @en_US Types of\r\n * @default 'info'\r\n */\r\n type?: XMessageBoxType;\r\n /**\r\n * @zh_CN 宽度\r\n * @en_US Width\r\n * @default '16rem'\r\n */\r\n width?: string;\r\n /**\r\n * @zh_CN 高度\r\n * @en_US Height\r\n */\r\n height?: string;\r\n /**\r\n * @zh_CN 隐藏关闭按钮\r\n * @en_US Hide close button\r\n * @default true\r\n */\r\n hideClose?: boolean;\r\n /**\r\n * @zh_CN 显示图标\r\n * @en_US Show icon\r\n * @default true\r\n */\r\n showIcon?: boolean;\r\n /**\r\n * @zh_CN 显示取消按钮\r\n * @en_US Show cancel button\r\n */\r\n showCancel?: boolean;\r\n /**\r\n * @zh_CN 关闭事件\r\n * @en_US Close event\r\n */\r\n callback?: XMessageBoxCallback;\r\n /**\r\n * @zh_CN 点击遮罩关闭\r\n * @en_US Click the mask to close\r\n * @default false\r\n */\r\n backdropClose?: boolean;\r\n /**\r\n * @zh_CN 确认按钮文字\r\n * @en_US Confirm button text\r\n * @default '确定'\r\n */\r\n confirmText?: string;\r\n /**\r\n * @zh_CN 取消按钮文字\r\n * @en_US Cancel button text\r\n * @default '取消'\r\n */\r\n cancelText?: string;\r\n /**\r\n * @zh_CN 是否显示输入框,显示单行文本框后,将不能显示多行文本框\r\n * @en_US Do not display input box. After displaying a single line text box, multi line text boxes cannot be displayed\r\n */\r\n showInput?: boolean;\r\n /**\r\n * @zh_CN 匹配规则\r\n * @en_US Matching rules\r\n */\r\n inputPattern?: RegExp | RegExp[];\r\n /**\r\n * @zh_CN 匹配失败的信息提示\r\n * @en_US Information prompt for matching failure\r\n */\r\n inputInvalidMessage?: string | string[];\r\n /**\r\n * @zh_CN 输入框的占位符\r\n * @en_US Placeholder for input box\r\n */\r\n inputPlaceholder?: string;\r\n /**\r\n * @zh_CN 输入框的类型\r\n * @en_US Type of input box\r\n */\r\n inputType?: XInputType;\r\n /**\r\n * @zh_CN 输入框的值\r\n * @en_US Value of input box\r\n */\r\n inputValue?: string;\r\n /**\r\n * @zh_CN 输入框的验证函数\r\n * @en_US Validation function of input box\r\n */\r\n inputValidator?: (value: any) => boolean;\r\n /**\r\n * @zh_CN 关闭前处理函数\r\n * @en_US Processing function before closing\r\n */\r\n beforeClose?: XMessageBoxCallback;\r\n /**\r\n * @zh_CN 确认加载\r\n * @en_US confirm Loading\r\n */\r\n confirmLoading?: XMessageBoxConfirmLoading;\r\n /**\r\n * @zh_CN 是否显示多行文本框\r\n * @en_US Whether to show the input box\r\n */\r\n showTextarea?: boolean;\r\n /**\r\n * @zh_CN 输入最大长度\r\n * @en_US Enter the maximum length\r\n */\r\n textareaMaxlength?: number;\r\n /**\r\n * @zh_CN 高度\r\n * @en_US height\r\n */\r\n textareaHeight?: string;\r\n}\r\n\r\n/**\r\n * @zh_CN 关闭的回调函数类型\r\n * @en_US Closed callback function type\r\n */\r\nexport interface XMessageBoxCallback {\r\n (action: XMessageBoxAction, message?: string): void;\r\n}\r\n\r\n/**\r\n * @zh_CN 确认加载\r\n * @en_US confirm Loading\r\n */\r\nexport type XMessageBoxConfirmLoading = () => Observable<boolean>;\r\n\r\n/**\r\n * @zh_CN 触发关闭的类型\r\n * @en_US Type of trigger closure\r\n */\r\nexport type XMessageBoxAction = 'confirm' | 'cancel' | 'close';\r\n\r\n/**\r\n * @zh_CN 创建的消息对象\r\n * @en_US Message object created\r\n */\r\nexport interface XMessageBoxOverlayRef extends XPortalOverlayRef<XMessageBoxComponent> {}\r\n\r\nexport interface XMessageBoxRef {\r\n ref: XMessageBoxOverlayRef;\r\n input: XMessageBoxOption;\r\n close: () => void;\r\n}\r\n\r\n/**\r\n * @zh_CN 类型\r\n * @en_US Types of\r\n */\r\nexport type XMessageBoxType = XStatus;\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n Renderer2,\r\n ElementRef,\r\n ChangeDetectorRef,\r\n ChangeDetectionStrategy,\r\n OnInit\r\n} from '@angular/core';\r\nimport { XIsFunction, XMoveBoxAnimation } from '@ng-nest/ui/core';\r\nimport { XMessageBoxPrefix, XMessageBoxRef, XMessageBoxAction } from './message-box.property';\r\nimport { UntypedFormGroup, UntypedFormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { XFormInputValidator } from '@ng-nest/ui/base-form';\r\nimport { XAlertComponent } from '@ng-nest/ui/alert';\r\nimport { XButtonComponent, XButtonsComponent } from '@ng-nest/ui/button';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XInputComponent } from '@ng-nest/ui/input';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\nimport { XTextareaComponent } from '@ng-nest/ui/textarea';\r\n\r\n@Component({\r\n selector: `${XMessageBoxPrefix}`,\r\n standalone: true,\r\n imports: [\r\n NgTemplateOutlet,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n XInputComponent,\r\n XTextareaComponent,\r\n XButtonComponent,\r\n XButtonsComponent,\r\n XIconComponent,\r\n XAlertComponent,\r\n XOutletDirective\r\n ],\r\n templateUrl: './message-box.component.html',\r\n styleUrls: ['./message-box.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n animations: [XMoveBoxAnimation]\r\n})\r\nexport class XMessageBoxComponent implements OnInit {\r\n messageBox!: XMessageBoxRef;\r\n action: XMessageBoxAction = 'close';\r\n formGroup: UntypedFormGroup = new UntypedFormGroup({});\r\n loading = false;\r\n constructor(\r\n public renderer: Renderer2,\r\n public elementRef: ElementRef<HTMLElement>,\r\n public cdr: ChangeDetectorRef\r\n ) {}\r\n\r\n get msgInput() {\r\n return this.messageBox.input!;\r\n }\r\n\r\n get msgOverlayRef() {\r\n return this.messageBox.ref!;\r\n }\r\n\r\n get getLabel() {\r\n return this.msgInput.content as string;\r\n }\r\n\r\n get getPattern() {\r\n return this.msgInput.inputPattern as RegExp;\r\n }\r\n\r\n ngOnInit() {\r\n (this.msgInput.showInput || this.msgInput.showTextarea) && this.createFormGroup();\r\n }\r\n\r\n onClose() {\r\n this.action = 'close';\r\n this.hideBox();\r\n }\r\n\r\n onCancel() {\r\n this.action = 'cancel';\r\n this.hideBox();\r\n }\r\n\r\n hideBox() {\r\n if (XIsFunction(this.msgInput.beforeClose)) {\r\n this.msgInput.beforeClose!(this.action, this.getInputValue());\r\n } else {\r\n this.close();\r\n }\r\n }\r\n\r\n close() {\r\n if (this.msgInput.hide && this.msgInput.hide !== true) {\r\n this.msgInput.hide = true;\r\n }\r\n this.msgOverlayRef?.overlayRef?.detach();\r\n this.cdr.detectChanges();\r\n }\r\n\r\n onConfirm() {\r\n const hide = () => {\r\n if (!this.msgInput.showInput || (this.msgInput.showInput && this.formGroup.valid)) {\r\n this.action = 'confirm';\r\n this.hideBox();\r\n } else if (!this.msgInput.showTextarea || (this.msgInput.showTextarea && this.formGroup.valid)) {\r\n this.action = 'confirm';\r\n this.hideBox();\r\n }\r\n };\r\n if (this.msgInput.confirmLoading && XIsFunction(this.msgInput.confirmLoading)) {\r\n this.loading = true;\r\n this.msgInput.confirmLoading().subscribe((x) => {\r\n this.loading = false;\r\n this.cdr.markForCheck();\r\n if (!x) return;\r\n this.action = 'confirm';\r\n hide();\r\n });\r\n } else {\r\n hide();\r\n }\r\n }\r\n\r\n moveDone($event: { toState: string }) {\r\n if ($event.toState === 'void') {\r\n XIsFunction(this.msgInput.callback) && this.msgInput.callback!(this.action, this.getInputValue());\r\n this.msgOverlayRef.overlayRef?.dispose();\r\n }\r\n }\r\n\r\n getInputValue() {\r\n return this.formGroup.controls['inputValue']?.value;\r\n }\r\n\r\n createFormGroup() {\r\n this.formGroup.addControl(\r\n 'inputValue',\r\n new UntypedFormControl(this.msgInput.inputValue, [\r\n Validators.required,\r\n Validators.pattern(this.msgInput.inputPattern as RegExp),\r\n XFormInputValidator(this.msgInput.inputValidator!)\r\n ])\r\n );\r\n }\r\n}\r\n","@if (!msgInput.hide) {\r\n <div\r\n class=\"x-message-box\"\r\n [@x-move-box-animation]=\"msgInput.placement\"\r\n (@x-move-box-animation.done)=\"moveDone($event)\"\r\n >\r\n <x-alert\r\n (close)=\"onClose()\"\r\n [title]=\"msgInput.title\"\r\n [content]=\"contentTpl\"\r\n [type]=\"msgInput.type!\"\r\n [effect]=\"msgInput.effect!\"\r\n [hideClose]=\"msgInput.hideClose!\"\r\n [closeText]=\"msgInput.closeText\"\r\n [showIcon]=\"false\"\r\n [duration]=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n <ng-template #contentTpl let-iconTpl=\"$iconTpl\">\r\n <div class=\"x-message-box-inner\">\r\n <div class=\"x-message-box-content\">\r\n @if (msgInput.showInput) {\r\n <form [formGroup]=\"formGroup\">\r\n <x-input\r\n formControlName=\"inputValue\"\r\n [type]=\"msgInput.inputType!\"\r\n [label]=\"getLabel\"\r\n [placeholder]=\"msgInput.inputPlaceholder!\"\r\n [pattern]=\"getPattern\"\r\n [message]=\"msgInput.inputInvalidMessage!\"\r\n [inputValidator]=\"msgInput.inputValidator!\"\r\n ></x-input>\r\n </form>\r\n } @else if (msgInput.showTextarea) {\r\n <form [formGroup]=\"formGroup\">\r\n <x-textarea\r\n formControlName=\"inputValue\"\r\n [placeholder]=\"msgInput.inputPlaceholder!\"\r\n [label]=\"getLabel\"\r\n [pattern]=\"getPattern\"\r\n [message]=\"msgInput.inputInvalidMessage!\"\r\n [inputValidator]=\"msgInput.inputValidator!\"\r\n [maxlength]=\"msgInput.textareaMaxlength!\"\r\n [height]=\"msgInput.textareaHeight!\"\r\n ></x-textarea>\r\n </form>\r\n } @else {\r\n @if (msgInput.showIcon) {\r\n <ng-container *ngTemplateOutlet=\"iconTpl\"></ng-container>\r\n }\r\n <ng-container *xOutlet=\"msgInput.content\">\r\n {{ msgInput.content }}\r\n </ng-container>\r\n }\r\n </div>\r\n <x-buttons space=\"0.5rem\">\r\n @if (msgInput.showCancel) {\r\n <x-button (click)=\"onCancel()\" flat plain>{{ msgInput.cancelText }}</x-button>\r\n }\r\n <x-button type=\"primary\" flat (click)=\"onConfirm()\" [disabled]=\"formGroup!.invalid\" [loading]=\"loading\">{{\r\n msgInput.confirmText\r\n }}</x-button>\r\n </x-buttons>\r\n </div>\r\n </ng-template>\r\n </div>\r\n}\r\n","import { ComponentRef, Injectable, inject } from '@angular/core';\r\nimport { XTemplate, XIsXTemplate, XFillDefault, XIsString } from '@ng-nest/ui/core';\r\nimport { XMessageBoxOption, XMessageBoxOverlayRef, XMessageBoxRef, XMessageBoxPortal } from './message-box.property';\r\nimport { XMessageBoxComponent } from './message-box.component';\r\nimport { XPortalService } from '@ng-nest/ui/portal';\r\nimport { XI18nService } from '@ng-nest/ui/i18n';\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class XMessageBoxService {\r\n default: XMessageBoxOption = {\r\n type: 'info',\r\n width: '20rem',\r\n placement: 'center',\r\n offset: '2rem',\r\n effect: 'white',\r\n duration: 3000,\r\n showIcon: false,\r\n showInput: false,\r\n showTextarea: false,\r\n backdropClose: false,\r\n cancelText: '取消',\r\n confirmText: '确认',\r\n inputPlaceholder: '',\r\n hide: false,\r\n textareaHeight: '6rem'\r\n };\r\n\r\n private portal = inject(XPortalService);\r\n private i18n = inject(XI18nService);\r\n\r\n alert(option: XTemplate | XMessageBoxOption): XMessageBoxRef {\r\n return this.createMessageBox(option, { showIcon: false, showCancel: false, showInput: false });\r\n }\r\n\r\n confirm(option: XTemplate | XMessageBoxOption): XMessageBoxRef {\r\n return this.createMessageBox(option, { showIcon: true, showCancel: true, showInput: false });\r\n }\r\n\r\n prompt(option: XTemplate | XMessageBoxOption): XMessageBoxRef {\r\n const opt = option as XMessageBoxOption;\r\n let def: XMessageBoxOption = { showIcon: false, showCancel: true, showInput: true };\r\n if (!opt.showInput && opt.showTextarea) {\r\n def = { showIcon: false, showCancel: true, showTextarea: true };\r\n }\r\n return this.createMessageBox(option, def);\r\n }\r\n\r\n create(option: XMessageBoxOption): XMessageBoxOverlayRef {\r\n const offset = XIsString(option.offset) ? [option.offset as string] : (option.offset as string[]);\r\n return this.portal.attach({\r\n content: XMessageBoxComponent,\r\n overlayConfig: {\r\n panelClass: XMessageBoxPortal,\r\n hasBackdrop: true,\r\n width: option.width,\r\n height: option.height,\r\n positionStrategy: this.portal.setPlace(option.placement, ...offset)\r\n }\r\n });\r\n }\r\n\r\n private createMessageBox(option: XTemplate | XMessageBoxOption, def: XMessageBoxOption): XMessageBoxRef {\r\n let opt: XMessageBoxOption;\r\n if (XIsXTemplate(option)) {\r\n opt = { title: option as XTemplate };\r\n } else {\r\n opt = option as XMessageBoxOption;\r\n }\r\n this.setLocal();\r\n XFillDefault(opt, Object.assign({ ...this.default }, def));\r\n return this.createMessageBoxPlacement(opt);\r\n }\r\n\r\n private createMessageBoxPlacement(option: XMessageBoxOption): XMessageBoxRef {\r\n const ref = this.create(option);\r\n const { overlayRef, componentRef } = ref;\r\n const { instance } = componentRef as ComponentRef<XMessageBoxComponent>;\r\n const result = {\r\n ref: ref,\r\n input: option,\r\n close: () => {\r\n instance.close();\r\n }\r\n };\r\n instance.messageBox = result;\r\n if (option.backdropClose && overlayRef) {\r\n overlayRef.backdropClick().subscribe(() => instance.onClose());\r\n }\r\n return result;\r\n }\r\n\r\n private setLocal() {\r\n const messageBoxLocale = this.i18n.getLocale().messageBox;\r\n this.default = { ...this.default, ...messageBoxLocale };\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\n\r\n@NgModule({\r\n exports: [],\r\n imports: []\r\n})\r\nexport class XMessageBoxModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAOA;;;;AAIG;AACI,MAAM,iBAAiB,GAAG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AAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cADL,MAAM,EAAA,CAAA,CAAA,EAAA;;2FACnB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;MCDrB,iBAAiB,CAAA;iIAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;kIAAjB,iBAAiB,EAAA,CAAA,CAAA,EAAA;kIAAjB,iBAAiB,EAAA,CAAA,CAAA,EAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE,EAAE;AACZ,iBAAA,CAAA;;;ACLD;;AAEG;;;;"}
@@ -330,7 +330,7 @@ class XPaginationComponent extends XPaginationProperty {
330
330
  return this.index() === index;
331
331
  }
332
332
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: XPaginationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
333
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: XPaginationComponent, isStandalone: true, selector: "x-pagination", host: { properties: { "class": "this.className" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (simple()) {\r\n <div class=\"x-pagination-simple\">\r\n <x-input\r\n [bordered]=\"showBackground()\"\r\n [before]=\"previousTpl\"\r\n [after]=\"nextTpl\"\r\n [style.width]=\"simpleIndexWidth()\"\r\n [(ngModel)]=\"index\"\r\n (xKeydown)=\"onSimpleKeydown($event)\"\r\n ></x-input>\r\n <span>/</span>\r\n <span>{{ lastIndex() }}</span>\r\n </div>\r\n} @else {\r\n <x-buttons [space]=\"space()\" [hiddenBorder]=\"!showBackground()\" [boxShadow]=\"false\">\r\n @if (showEllipsis()) {\r\n <x-button\r\n [icon]=\"'fto-chevrons-left'\"\r\n [title]=\"'pagination.first' | xI18n\"\r\n [disabled]=\"disabled() || firstActivated()\"\r\n (click)=\"jump(1)\"\r\n plain\r\n flat\r\n ></x-button>\r\n }\r\n <ng-container *xOutlet=\"previousTpl\"></ng-container>\r\n @for (item of indexes(); track item) {\r\n <x-button [disabled]=\"disabled()\" plain flat [activated]=\"getActivated(item)\" (click)=\"jump(item)\">{{\r\n item\r\n }}</x-button>\r\n }\r\n <ng-container *xOutlet=\"nextTpl\"></ng-container>\r\n @if (showEllipsis() && !simple()) {\r\n <x-button\r\n [icon]=\"'fto-chevrons-right'\"\r\n [title]=\"'pagination.last' | xI18n\"\r\n [disabled]=\"disabled() || lastActivated()\"\r\n (click)=\"jump(lastIndex())\"\r\n plain\r\n flat\r\n ></x-button>\r\n }\r\n </x-buttons>\r\n}\r\n@if (showSize() && !showInputSize()) {\r\n <x-select\r\n [style.width]=\"sizeWidth()\"\r\n class=\"x-pagination-size\"\r\n [data]=\"sizeDataSignal()\"\r\n [clearable]=\"false\"\r\n [disabled]=\"disabled()\"\r\n [bordered]=\"showBackground()\"\r\n [nodeTpl]=\"nodeTpl\"\r\n [(ngModel)]=\"size\"\r\n (ngModelChange)=\"sizeChanged()\"\r\n ></x-select>\r\n}\r\n@if (showInputSize()) {\r\n <div class=\"x-pagination-input-size\">\r\n <x-input\r\n x-tooltip\r\n [content]=\"inputSizeTooltip()\"\r\n [style.width]=\"inputSizeWidth()\"\r\n [disabled]=\"disabled()\"\r\n [bordered]=\"showBackground()\"\r\n [(ngModel)]=\"inputSize\"\r\n (xBlur)=\"onInputSizeBlur($event)\"\r\n (xKeydown)=\"onInputSizeKeydown($event)\"\r\n ></x-input>\r\n <span> {{ 'pagination.sizePage' | xI18n }} </span>\r\n </div>\r\n}\r\n@if (showJump() && !simple()) {\r\n <div class=\"x-pagination-jump\">\r\n <span>{{ 'pagination.jump' | xI18n }}</span>\r\n <x-input\r\n x-tooltip\r\n [content]=\"jumpTooltip()\"\r\n [bordered]=\"showBackground()\"\r\n [style.width]=\"jumpWidth()\"\r\n [(ngModel)]=\"jumpPage\"\r\n (xBlur)=\"onJumpBlur($event)\"\r\n (xKeydown)=\"onJumpKeydown($event)\"\r\n ></x-input>\r\n </div>\r\n}\r\n@if (showTotal()) {\r\n <x-button [disabled]=\"disabled()\" plain flat class=\"x-pagination-total\">\r\n <ng-container *xOutlet=\"totalTpl(); context: { $total: total() }\">\r\n {{ 'pagination.total' | xI18n }} {{ total() }} {{ 'pagination.item' | xI18n }}\r\n </ng-container>\r\n </x-button>\r\n}\r\n<ng-template #previousTpl>\r\n <x-button\r\n [icon]=\"'fto-chevron-left'\"\r\n [title]=\"'pagination.previous' | xI18n\"\r\n [disabled]=\"disabled() || leftDisabled()\"\r\n (click)=\"jump(-1, true)\"\r\n plain\r\n flat\r\n ></x-button>\r\n</ng-template>\r\n\r\n<ng-template #nextTpl>\r\n <x-button\r\n [icon]=\"'fto-chevron-right'\"\r\n [title]=\"'pagination.next' | xI18n\"\r\n [disabled]=\"disabled() || rightDisabled()\"\r\n (click)=\"jump(1, true)\"\r\n plain\r\n flat\r\n ></x-button>\r\n</ng-template>\r\n\r\n<ng-template #nodeTpl let-node=\"$node\">\r\n @if (node) {\r\n {{ node?.label }} {{ 'pagination.sizePage' | xI18n }}\r\n }\r\n</ng-template>\r\n", styles: [".x-pagination{margin:0;padding:0}.x-pagination{display:inline-flex}.x-pagination>.x-buttons.x-buttons-hiddenBorder>x-button>.x-button{min-width:1.75rem}.x-pagination>.x-buttons.x-buttons-hiddenBorder>x-button>.x-button-activated{background-color:#0000000d}.x-pagination-size,.x-pagination-total{margin-left:.5rem}.x-pagination-input-size{margin-left:.5rem;display:inline-flex;align-items:center}.x-pagination-input-size x-input{margin-right:.5rem}.x-pagination-jump{margin-left:.5rem;display:inline-flex;align-items:center}.x-pagination-jump x-input{margin-left:.5rem}.x-pagination-simple{margin-right:.5rem;display:inline-flex;align-items:center}.x-pagination-simple>x-input input{text-align:center}.x-pagination-simple>span{margin-left:.5rem}\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: XButtonComponent, selector: "x-button" }, { kind: "component", type: XButtonsComponent, selector: "x-buttons" }, { kind: "pipe", type: XI18nPipe, name: "xI18n" }, { kind: "component", type: XSelectComponent, selector: "x-select" }, { kind: "component", type: XInputComponent, selector: "x-input" }, { kind: "ngmodule", type: XTooltipModule }, { kind: "directive", type: i2.XTooltipDirective, selector: "[x-tooltip], x-tooltip" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
333
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: XPaginationComponent, isStandalone: true, selector: "x-pagination", host: { properties: { "class": "this.className" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (simple()) {\r\n <div class=\"x-pagination-simple\">\r\n <x-input\r\n [bordered]=\"showBackground()\"\r\n [before]=\"previousTpl\"\r\n [after]=\"nextTpl\"\r\n [style.width]=\"simpleIndexWidth()\"\r\n [(ngModel)]=\"index\"\r\n (xKeydown)=\"onSimpleKeydown($event)\"\r\n ></x-input>\r\n <span>/</span>\r\n <span>{{ lastIndex() }}</span>\r\n </div>\r\n} @else {\r\n <x-buttons class=\"x-pagination-group\" [space]=\"space()\" [hiddenBorder]=\"!showBackground()\" [boxShadow]=\"false\">\r\n @if (showEllipsis()) {\r\n <x-button\r\n class=\"x-pagination-first\"\r\n [icon]=\"'fto-chevrons-left'\"\r\n [title]=\"'pagination.first' | xI18n\"\r\n [disabled]=\"disabled() || firstActivated()\"\r\n (click)=\"jump(1)\"\r\n plain\r\n flat\r\n ></x-button>\r\n }\r\n <ng-container *xOutlet=\"previousTpl\"></ng-container>\r\n @for (item of indexes(); track item) {\r\n <x-button\r\n class=\"x-pagination-link\"\r\n [disabled]=\"disabled()\"\r\n plain\r\n flat\r\n [activated]=\"getActivated(item)\"\r\n (click)=\"jump(item)\"\r\n >{{ item }}</x-button\r\n >\r\n }\r\n <ng-container *xOutlet=\"nextTpl\"></ng-container>\r\n @if (showEllipsis() && !simple()) {\r\n <x-button\r\n class=\"x-pagination-last\"\r\n [icon]=\"'fto-chevrons-right'\"\r\n [title]=\"'pagination.last' | xI18n\"\r\n [disabled]=\"disabled() || lastActivated()\"\r\n (click)=\"jump(lastIndex())\"\r\n plain\r\n flat\r\n ></x-button>\r\n }\r\n </x-buttons>\r\n}\r\n@if (showSize() && !showInputSize()) {\r\n <x-select\r\n [style.width]=\"sizeWidth()\"\r\n class=\"x-pagination-size\"\r\n [data]=\"sizeDataSignal()\"\r\n [clearable]=\"false\"\r\n [disabled]=\"disabled()\"\r\n [bordered]=\"showBackground()\"\r\n [nodeTpl]=\"nodeTpl\"\r\n [(ngModel)]=\"size\"\r\n (ngModelChange)=\"sizeChanged()\"\r\n ></x-select>\r\n}\r\n@if (showInputSize()) {\r\n <div class=\"x-pagination-input-size\">\r\n <x-input\r\n x-tooltip\r\n [content]=\"inputSizeTooltip()\"\r\n [style.width]=\"inputSizeWidth()\"\r\n [disabled]=\"disabled()\"\r\n [bordered]=\"showBackground()\"\r\n [(ngModel)]=\"inputSize\"\r\n (xBlur)=\"onInputSizeBlur($event)\"\r\n (xKeydown)=\"onInputSizeKeydown($event)\"\r\n ></x-input>\r\n <span> {{ 'pagination.sizePage' | xI18n }} </span>\r\n </div>\r\n}\r\n@if (showJump() && !simple()) {\r\n <div class=\"x-pagination-jump\">\r\n <span>{{ 'pagination.jump' | xI18n }}</span>\r\n <x-input\r\n x-tooltip\r\n [content]=\"jumpTooltip()\"\r\n [bordered]=\"showBackground()\"\r\n [style.width]=\"jumpWidth()\"\r\n [(ngModel)]=\"jumpPage\"\r\n (xBlur)=\"onJumpBlur($event)\"\r\n (xKeydown)=\"onJumpKeydown($event)\"\r\n ></x-input>\r\n </div>\r\n}\r\n@if (showTotal()) {\r\n <x-button [disabled]=\"disabled()\" plain flat class=\"x-pagination-total\">\r\n <ng-container *xOutlet=\"totalTpl(); context: { $total: total() }\">\r\n {{ 'pagination.total' | xI18n }} {{ total() }} {{ 'pagination.item' | xI18n }}\r\n </ng-container>\r\n </x-button>\r\n}\r\n<ng-template #previousTpl>\r\n <x-button\r\n [icon]=\"'fto-chevron-left'\"\r\n [title]=\"'pagination.previous' | xI18n\"\r\n [disabled]=\"disabled() || leftDisabled()\"\r\n (click)=\"jump(-1, true)\"\r\n plain\r\n flat\r\n ></x-button>\r\n</ng-template>\r\n\r\n<ng-template #nextTpl>\r\n <x-button\r\n [icon]=\"'fto-chevron-right'\"\r\n [title]=\"'pagination.next' | xI18n\"\r\n [disabled]=\"disabled() || rightDisabled()\"\r\n (click)=\"jump(1, true)\"\r\n plain\r\n flat\r\n ></x-button>\r\n</ng-template>\r\n\r\n<ng-template #nodeTpl let-node=\"$node\">\r\n @if (node) {\r\n {{ node?.label }} {{ 'pagination.sizePage' | xI18n }}\r\n }\r\n</ng-template>\r\n", styles: [".x-pagination{margin:0;padding:0}.x-pagination{display:inline-flex}.x-pagination>.x-buttons.x-buttons-hiddenBorder>x-button>.x-button{min-width:1.75rem}.x-pagination>.x-buttons.x-buttons-hiddenBorder>x-button>.x-button-activated{background-color:#0000000d}.x-pagination-size,.x-pagination-total{margin-left:.5rem}.x-pagination-input-size{margin-left:.5rem;display:inline-flex;align-items:center}.x-pagination-input-size x-input{margin-right:.5rem}.x-pagination-jump{margin-left:.5rem;display:inline-flex;align-items:center}.x-pagination-jump x-input{margin-left:.5rem}.x-pagination-simple{margin-right:.5rem;display:inline-flex;align-items:center}.x-pagination-simple>x-input input{text-align:center}.x-pagination-simple>span{margin-left:.5rem}\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: XButtonComponent, selector: "x-button" }, { kind: "component", type: XButtonsComponent, selector: "x-buttons" }, { kind: "pipe", type: XI18nPipe, name: "xI18n" }, { kind: "component", type: XSelectComponent, selector: "x-select" }, { kind: "component", type: XInputComponent, selector: "x-input" }, { kind: "ngmodule", type: XTooltipModule }, { kind: "directive", type: i2.XTooltipDirective, selector: "[x-tooltip], x-tooltip" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
334
334
  }
335
335
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: XPaginationComponent, decorators: [{
336
336
  type: Component,
@@ -343,7 +343,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImpor
343
343
  XInputComponent,
344
344
  XTooltipModule,
345
345
  XOutletDirective
346
- ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (simple()) {\r\n <div class=\"x-pagination-simple\">\r\n <x-input\r\n [bordered]=\"showBackground()\"\r\n [before]=\"previousTpl\"\r\n [after]=\"nextTpl\"\r\n [style.width]=\"simpleIndexWidth()\"\r\n [(ngModel)]=\"index\"\r\n (xKeydown)=\"onSimpleKeydown($event)\"\r\n ></x-input>\r\n <span>/</span>\r\n <span>{{ lastIndex() }}</span>\r\n </div>\r\n} @else {\r\n <x-buttons [space]=\"space()\" [hiddenBorder]=\"!showBackground()\" [boxShadow]=\"false\">\r\n @if (showEllipsis()) {\r\n <x-button\r\n [icon]=\"'fto-chevrons-left'\"\r\n [title]=\"'pagination.first' | xI18n\"\r\n [disabled]=\"disabled() || firstActivated()\"\r\n (click)=\"jump(1)\"\r\n plain\r\n flat\r\n ></x-button>\r\n }\r\n <ng-container *xOutlet=\"previousTpl\"></ng-container>\r\n @for (item of indexes(); track item) {\r\n <x-button [disabled]=\"disabled()\" plain flat [activated]=\"getActivated(item)\" (click)=\"jump(item)\">{{\r\n item\r\n }}</x-button>\r\n }\r\n <ng-container *xOutlet=\"nextTpl\"></ng-container>\r\n @if (showEllipsis() && !simple()) {\r\n <x-button\r\n [icon]=\"'fto-chevrons-right'\"\r\n [title]=\"'pagination.last' | xI18n\"\r\n [disabled]=\"disabled() || lastActivated()\"\r\n (click)=\"jump(lastIndex())\"\r\n plain\r\n flat\r\n ></x-button>\r\n }\r\n </x-buttons>\r\n}\r\n@if (showSize() && !showInputSize()) {\r\n <x-select\r\n [style.width]=\"sizeWidth()\"\r\n class=\"x-pagination-size\"\r\n [data]=\"sizeDataSignal()\"\r\n [clearable]=\"false\"\r\n [disabled]=\"disabled()\"\r\n [bordered]=\"showBackground()\"\r\n [nodeTpl]=\"nodeTpl\"\r\n [(ngModel)]=\"size\"\r\n (ngModelChange)=\"sizeChanged()\"\r\n ></x-select>\r\n}\r\n@if (showInputSize()) {\r\n <div class=\"x-pagination-input-size\">\r\n <x-input\r\n x-tooltip\r\n [content]=\"inputSizeTooltip()\"\r\n [style.width]=\"inputSizeWidth()\"\r\n [disabled]=\"disabled()\"\r\n [bordered]=\"showBackground()\"\r\n [(ngModel)]=\"inputSize\"\r\n (xBlur)=\"onInputSizeBlur($event)\"\r\n (xKeydown)=\"onInputSizeKeydown($event)\"\r\n ></x-input>\r\n <span> {{ 'pagination.sizePage' | xI18n }} </span>\r\n </div>\r\n}\r\n@if (showJump() && !simple()) {\r\n <div class=\"x-pagination-jump\">\r\n <span>{{ 'pagination.jump' | xI18n }}</span>\r\n <x-input\r\n x-tooltip\r\n [content]=\"jumpTooltip()\"\r\n [bordered]=\"showBackground()\"\r\n [style.width]=\"jumpWidth()\"\r\n [(ngModel)]=\"jumpPage\"\r\n (xBlur)=\"onJumpBlur($event)\"\r\n (xKeydown)=\"onJumpKeydown($event)\"\r\n ></x-input>\r\n </div>\r\n}\r\n@if (showTotal()) {\r\n <x-button [disabled]=\"disabled()\" plain flat class=\"x-pagination-total\">\r\n <ng-container *xOutlet=\"totalTpl(); context: { $total: total() }\">\r\n {{ 'pagination.total' | xI18n }} {{ total() }} {{ 'pagination.item' | xI18n }}\r\n </ng-container>\r\n </x-button>\r\n}\r\n<ng-template #previousTpl>\r\n <x-button\r\n [icon]=\"'fto-chevron-left'\"\r\n [title]=\"'pagination.previous' | xI18n\"\r\n [disabled]=\"disabled() || leftDisabled()\"\r\n (click)=\"jump(-1, true)\"\r\n plain\r\n flat\r\n ></x-button>\r\n</ng-template>\r\n\r\n<ng-template #nextTpl>\r\n <x-button\r\n [icon]=\"'fto-chevron-right'\"\r\n [title]=\"'pagination.next' | xI18n\"\r\n [disabled]=\"disabled() || rightDisabled()\"\r\n (click)=\"jump(1, true)\"\r\n plain\r\n flat\r\n ></x-button>\r\n</ng-template>\r\n\r\n<ng-template #nodeTpl let-node=\"$node\">\r\n @if (node) {\r\n {{ node?.label }} {{ 'pagination.sizePage' | xI18n }}\r\n }\r\n</ng-template>\r\n", styles: [".x-pagination{margin:0;padding:0}.x-pagination{display:inline-flex}.x-pagination>.x-buttons.x-buttons-hiddenBorder>x-button>.x-button{min-width:1.75rem}.x-pagination>.x-buttons.x-buttons-hiddenBorder>x-button>.x-button-activated{background-color:#0000000d}.x-pagination-size,.x-pagination-total{margin-left:.5rem}.x-pagination-input-size{margin-left:.5rem;display:inline-flex;align-items:center}.x-pagination-input-size x-input{margin-right:.5rem}.x-pagination-jump{margin-left:.5rem;display:inline-flex;align-items:center}.x-pagination-jump x-input{margin-left:.5rem}.x-pagination-simple{margin-right:.5rem;display:inline-flex;align-items:center}.x-pagination-simple>x-input input{text-align:center}.x-pagination-simple>span{margin-left:.5rem}\n"] }]
346
+ ], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (simple()) {\r\n <div class=\"x-pagination-simple\">\r\n <x-input\r\n [bordered]=\"showBackground()\"\r\n [before]=\"previousTpl\"\r\n [after]=\"nextTpl\"\r\n [style.width]=\"simpleIndexWidth()\"\r\n [(ngModel)]=\"index\"\r\n (xKeydown)=\"onSimpleKeydown($event)\"\r\n ></x-input>\r\n <span>/</span>\r\n <span>{{ lastIndex() }}</span>\r\n </div>\r\n} @else {\r\n <x-buttons class=\"x-pagination-group\" [space]=\"space()\" [hiddenBorder]=\"!showBackground()\" [boxShadow]=\"false\">\r\n @if (showEllipsis()) {\r\n <x-button\r\n class=\"x-pagination-first\"\r\n [icon]=\"'fto-chevrons-left'\"\r\n [title]=\"'pagination.first' | xI18n\"\r\n [disabled]=\"disabled() || firstActivated()\"\r\n (click)=\"jump(1)\"\r\n plain\r\n flat\r\n ></x-button>\r\n }\r\n <ng-container *xOutlet=\"previousTpl\"></ng-container>\r\n @for (item of indexes(); track item) {\r\n <x-button\r\n class=\"x-pagination-link\"\r\n [disabled]=\"disabled()\"\r\n plain\r\n flat\r\n [activated]=\"getActivated(item)\"\r\n (click)=\"jump(item)\"\r\n >{{ item }}</x-button\r\n >\r\n }\r\n <ng-container *xOutlet=\"nextTpl\"></ng-container>\r\n @if (showEllipsis() && !simple()) {\r\n <x-button\r\n class=\"x-pagination-last\"\r\n [icon]=\"'fto-chevrons-right'\"\r\n [title]=\"'pagination.last' | xI18n\"\r\n [disabled]=\"disabled() || lastActivated()\"\r\n (click)=\"jump(lastIndex())\"\r\n plain\r\n flat\r\n ></x-button>\r\n }\r\n </x-buttons>\r\n}\r\n@if (showSize() && !showInputSize()) {\r\n <x-select\r\n [style.width]=\"sizeWidth()\"\r\n class=\"x-pagination-size\"\r\n [data]=\"sizeDataSignal()\"\r\n [clearable]=\"false\"\r\n [disabled]=\"disabled()\"\r\n [bordered]=\"showBackground()\"\r\n [nodeTpl]=\"nodeTpl\"\r\n [(ngModel)]=\"size\"\r\n (ngModelChange)=\"sizeChanged()\"\r\n ></x-select>\r\n}\r\n@if (showInputSize()) {\r\n <div class=\"x-pagination-input-size\">\r\n <x-input\r\n x-tooltip\r\n [content]=\"inputSizeTooltip()\"\r\n [style.width]=\"inputSizeWidth()\"\r\n [disabled]=\"disabled()\"\r\n [bordered]=\"showBackground()\"\r\n [(ngModel)]=\"inputSize\"\r\n (xBlur)=\"onInputSizeBlur($event)\"\r\n (xKeydown)=\"onInputSizeKeydown($event)\"\r\n ></x-input>\r\n <span> {{ 'pagination.sizePage' | xI18n }} </span>\r\n </div>\r\n}\r\n@if (showJump() && !simple()) {\r\n <div class=\"x-pagination-jump\">\r\n <span>{{ 'pagination.jump' | xI18n }}</span>\r\n <x-input\r\n x-tooltip\r\n [content]=\"jumpTooltip()\"\r\n [bordered]=\"showBackground()\"\r\n [style.width]=\"jumpWidth()\"\r\n [(ngModel)]=\"jumpPage\"\r\n (xBlur)=\"onJumpBlur($event)\"\r\n (xKeydown)=\"onJumpKeydown($event)\"\r\n ></x-input>\r\n </div>\r\n}\r\n@if (showTotal()) {\r\n <x-button [disabled]=\"disabled()\" plain flat class=\"x-pagination-total\">\r\n <ng-container *xOutlet=\"totalTpl(); context: { $total: total() }\">\r\n {{ 'pagination.total' | xI18n }} {{ total() }} {{ 'pagination.item' | xI18n }}\r\n </ng-container>\r\n </x-button>\r\n}\r\n<ng-template #previousTpl>\r\n <x-button\r\n [icon]=\"'fto-chevron-left'\"\r\n [title]=\"'pagination.previous' | xI18n\"\r\n [disabled]=\"disabled() || leftDisabled()\"\r\n (click)=\"jump(-1, true)\"\r\n plain\r\n flat\r\n ></x-button>\r\n</ng-template>\r\n\r\n<ng-template #nextTpl>\r\n <x-button\r\n [icon]=\"'fto-chevron-right'\"\r\n [title]=\"'pagination.next' | xI18n\"\r\n [disabled]=\"disabled() || rightDisabled()\"\r\n (click)=\"jump(1, true)\"\r\n plain\r\n flat\r\n ></x-button>\r\n</ng-template>\r\n\r\n<ng-template #nodeTpl let-node=\"$node\">\r\n @if (node) {\r\n {{ node?.label }} {{ 'pagination.sizePage' | xI18n }}\r\n }\r\n</ng-template>\r\n", styles: [".x-pagination{margin:0;padding:0}.x-pagination{display:inline-flex}.x-pagination>.x-buttons.x-buttons-hiddenBorder>x-button>.x-button{min-width:1.75rem}.x-pagination>.x-buttons.x-buttons-hiddenBorder>x-button>.x-button-activated{background-color:#0000000d}.x-pagination-size,.x-pagination-total{margin-left:.5rem}.x-pagination-input-size{margin-left:.5rem;display:inline-flex;align-items:center}.x-pagination-input-size x-input{margin-right:.5rem}.x-pagination-jump{margin-left:.5rem;display:inline-flex;align-items:center}.x-pagination-jump x-input{margin-left:.5rem}.x-pagination-simple{margin-right:.5rem;display:inline-flex;align-items:center}.x-pagination-simple>x-input input{text-align:center}.x-pagination-simple>span{margin-left:.5rem}\n"] }]
347
347
  }], propDecorators: { className: [{
348
348
  type: HostBinding,
349
349
  args: ['class']
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-pagination.mjs","sources":["../../../../lib/ng-nest/ui/pagination/pagination.property.ts","../../../../lib/ng-nest/ui/pagination/pagination.component.ts","../../../../lib/ng-nest/ui/pagination/pagination.component.html","../../../../lib/ng-nest/ui/pagination/pagination.module.ts","../../../../lib/ng-nest/ui/pagination/ng-nest-ui-pagination.ts"],"sourcesContent":["import { XPropertyFunction, XToNumber, XToBoolean, XToCssPixelValue } from '@ng-nest/ui/core';\r\nimport { Component, model, input } from '@angular/core';\r\nimport type { XSelectNode } from '@ng-nest/ui/select';\r\nimport type { XNumber, XQuery, XBoolean, XTemplate, XDataArray } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Pagination\r\n * @selector x-pagination\r\n * @decorator component\r\n */\r\nexport const XPaginationPrefix = 'x-pagination';\r\nconst X_PAGINATION_CONFIG_NAME = 'pagination';\r\n\r\n/**\r\n * @zh_CN 分页选择条数\r\n * @en_US Sub-selection\r\n */\r\nexport const XPaginationSizeData = [10, 20, 50, 100];\r\n\r\n/**\r\n * Pagination Property\r\n */\r\n@Component({ selector: `${XPaginationPrefix}-property`, template: '' })\r\nexport class XPaginationProperty extends XPropertyFunction(X_PAGINATION_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 当前页码\r\n * @en_US Current page number\r\n */\r\n readonly index = model<number>(this.config?.index ?? 1);\r\n /**\r\n * @zh_CN 每页显示条数\r\n * @en_US Number of items displayed per page\r\n */\r\n readonly size = model<number>(this.config?.size ?? 10);\r\n /**\r\n * @zh_CN 总数\r\n * @en_US Total\r\n */\r\n readonly total = input<number, XNumber>(0, { transform: XToNumber });\r\n /**\r\n * @zh_CN 查询条件\r\n * @en_US Query conditions\r\n */\r\n readonly query = model<XQuery>({});\r\n /**\r\n * @zh_CN 最多显示的分页数量\r\n * @en_US The largest number of pages display\r\n */\r\n readonly pageLinkSize = input<number, XNumber>(this.config?.pageLinkSize ?? 5, { transform: XToNumber });\r\n /**\r\n * @zh_CN 显示首尾页跳转\r\n * @en_US Display the first and last page\r\n */\r\n readonly showEllipsis = input<boolean, XBoolean>(this.config?.showEllipsis ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 显示总条数\r\n * @en_US Display the total\r\n */\r\n readonly showTotal = input<boolean, XBoolean>(this.config?.showTotal ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 按钮间距\r\n * @en_US Button spacing\r\n */\r\n readonly space = input<string, XNumber>(this.config?.space ?? '0.25rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 添加背景色\r\n * @en_US Show background\r\n */\r\n readonly showBackground = input<boolean, XBoolean>(this.config?.showBackground ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 显示分页条数\r\n * @en_US Show size\r\n */\r\n readonly showSize = input<boolean, XBoolean>(this.config?.showSize ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 分页条数选择框的宽度\r\n * @en_US size with select\r\n */\r\n readonly sizeWidth = input<string, XNumber>(this.config?.sizeWidth ?? '6.875rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 显示输入分页框(不能跟下拉选项同时使用),默认使用回车确认改变\r\n * @en_US Display the number of input page breaks (cannot exist with the drop-down options of page breaks). default to using Enter to confirm changes\r\n */\r\n readonly showInputSize = input<boolean, XBoolean>(this.config?.showInputSize ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 输入分页框的 tooltip 提示信息,默认根据输入确认改变的方式来显示\r\n * @en_US Enter the tooltip prompt information for the pagination box, which will be displayed by default based on the confirmation of the input\r\n */\r\n readonly inputSizeTooltipText = input<string>(this.config?.inputSizeTooltipText ?? '');\r\n /**\r\n * @zh_CN 分页条数输入框的宽度\r\n * @en_US size with input\r\n */\r\n readonly inputSizeWidth = input<string, XNumber>(this.config?.sizeWidth ?? '3.125rem', {\r\n transform: XToCssPixelValue\r\n });\r\n /**\r\n * @zh_CN 分页选择的数据项\r\n * @en_US Paging choose items of data\r\n */\r\n readonly sizeData = input<XDataArray<XSelectNode>>(this.config?.sizeData ?? XPaginationSizeData);\r\n /**\r\n * @zh_CN 禁用整个分页\r\n * @en_US disabled\r\n */\r\n readonly disabled = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 显示跳转输入框,默认使用回车确认改变\r\n * @en_US Show size. default to using Enter to confirm changes\r\n */\r\n readonly showJump = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 跳转输入框的 tooltip 提示信息,默认根据输入确认改变的方式来显示\r\n * @en_US The tooltip prompt information for jumping to the input box is displayed by default based on the confirmation of input changes\r\n */\r\n readonly jumpTooltipText = input<string>(this.config?.jumpTooltipText ?? '');\r\n /**\r\n * @zh_CN 跳转页的宽度\r\n * @en_US size with\r\n */\r\n readonly jumpWidth = input<string, XNumber>(this.config?.jumpWidth ?? '3.125rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 总数自定义模板\r\n * @en_US Total template\r\n */\r\n readonly totalTpl = input<XTemplate>();\r\n /**\r\n * @zh_CN 简单分页\r\n * @en_US Simple\r\n */\r\n readonly simple = input<boolean, XBoolean>(this.config?.simple ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 简单分页输入框宽度\r\n * @en_US Simple index with\r\n */\r\n readonly simpleIndexWidth = input<string, XNumber>(this.config?.simpleIndexWidth ?? '8.125rem', {\r\n transform: XToCssPixelValue\r\n });\r\n /**\r\n * @zh_CN 输入确认改变的方式,针对输入分页大小和输入跳转页\r\n * @en_US The method for confirming changes in input is based on the input page size and input jump page\r\n */\r\n readonly inputIndexSizeSureType = input<XPaginationInputIndexSizeSureType>(\r\n this.config?.inputIndexSizeSureType ?? 'enter'\r\n );\r\n}\r\n\r\n/**\r\n * @zh_CN 输入确认改变的方式,针对输入分页大小和输入跳转页\r\n * - `'enter'` : 输入后使用回车键确认\r\n * - `'blur'` : 输入后失去焦点后确认\r\n * - `'both'` : 上面2种都可以触发确认操作\r\n * @en_US The method for confirming changes in input is based on the input page size and input jump page\r\n * - `'enter'` : After entering, use the enter key to confirm\r\n * - `'blur'` : Confirm after losing focus after input\r\n * - `'both'` : Both of the above can trigger confirmation operations\r\n */\r\nexport type XPaginationInputIndexSizeSureType = 'enter' | 'blur' | 'both';\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n OnInit,\r\n signal,\r\n computed,\r\n HostBinding,\r\n ElementRef,\r\n inject,\r\n SimpleChanges\r\n} from '@angular/core';\r\nimport { XPaginationPrefix, XPaginationProperty } from './pagination.property';\r\nimport { XI18nPagination, XI18nPipe, XI18nService, zh_CN } from '@ng-nest/ui/i18n';\r\nimport { ENTER } from '@angular/cdk/keycodes';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonComponent, XButtonsComponent } from '@ng-nest/ui/button';\r\nimport { XSelectComponent } from '@ng-nest/ui/select';\r\nimport { XInputComponent } from '@ng-nest/ui/input';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { XIsChange, XToDataArray } from '@ng-nest/ui/core';\r\nimport { XTooltipModule } from '@ng-nest/ui/tooltip';\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\nimport { map } from 'rxjs';\r\n\r\n@Component({\r\n selector: `${XPaginationPrefix}`,\r\n standalone: true,\r\n imports: [\r\n FormsModule,\r\n XButtonComponent,\r\n XButtonsComponent,\r\n XI18nPipe,\r\n XSelectComponent,\r\n XInputComponent,\r\n XTooltipModule,\r\n XOutletDirective\r\n ],\r\n templateUrl: './pagination.component.html',\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XPaginationComponent extends XPaginationProperty implements OnInit {\r\n elementRef = inject(ElementRef);\r\n private i18n = inject(XI18nService);\r\n locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.pagination as XI18nPagination)), {\r\n initialValue: zh_CN.pagination\r\n });\r\n\r\n @HostBinding('class') className = XPaginationPrefix;\r\n\r\n indexFirst = signal(1);\r\n indexLast = signal(1);\r\n jumpPage = signal<string>('');\r\n inputSize = signal<string>('');\r\n\r\n lastIndex = computed(() => Math.ceil(this.total() / this.size()) || 1);\r\n leftDisabled = computed(() => this.index() === 1 || this.total() === 0);\r\n rightDisabled = computed(() => this.index() === this.lastIndex() || this.total() === 0);\r\n firstActivated = computed(() => this.index() === 1);\r\n lastActivated = computed(() => this.index() === this.lastIndex());\r\n\r\n indexes = computed(() => {\r\n const indexes: number[] = [];\r\n const current = this.index() - 1;\r\n const maxSize = this.pageLinkSize();\r\n const pages = Math.min(maxSize, this.lastIndex());\r\n let start = Math.max(0, Math.ceil(current - pages / 2)),\r\n end = Math.min(this.lastIndex() - 1, start + pages - 1);\r\n var delta = maxSize - (end - start + 1);\r\n start = Math.max(0, start - delta);\r\n\r\n for (let i = start; i <= end; i++) {\r\n indexes.push(i + 1);\r\n }\r\n return indexes;\r\n });\r\n\r\n sizeDataSignal = computed(() => XToDataArray(this.sizeData()));\r\n\r\n inputSizeTooltip = computed(() => {\r\n if (this.inputSizeTooltipText()) return this.inputSizeTooltipText();\r\n if (this.inputIndexSizeSureType() === 'enter') {\r\n return this.locale().inputSizeTooltipEnter;\r\n }\r\n if (this.inputIndexSizeSureType() === 'blur') {\r\n return this.locale().inputSizeTooltipBlur;\r\n }\r\n if (this.inputIndexSizeSureType() === 'both') {\r\n return this.locale().inputSizeTooltipBoth;\r\n }\r\n return '';\r\n });\r\n\r\n jumpTooltip = computed(() => {\r\n if (this.jumpTooltipText()) return this.jumpTooltipText();\r\n if (this.inputIndexSizeSureType() === 'enter') {\r\n return this.locale().jumpTooltipEnter;\r\n }\r\n if (this.inputIndexSizeSureType() === 'blur') {\r\n return this.locale().jumpTooltipBlur;\r\n }\r\n if (this.inputIndexSizeSureType() === 'both') {\r\n return this.locale().jumpTooltipBoth;\r\n }\r\n return '';\r\n });\r\n\r\n ngOnInit() {\r\n this.inputSize.set(this.size().toString());\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n const { size } = changes;\r\n XIsChange(size) && this.inputSize.set(this.size().toString());\r\n }\r\n\r\n sizeChanged() {\r\n if (this.index() !== 1) {\r\n this.index.set(1);\r\n }\r\n }\r\n\r\n jump(index: number, isDiff = false) {\r\n const ix = this.validateIndex(isDiff ? this.index() + index : index);\r\n if (ix !== this.index()) {\r\n this.index.set(ix);\r\n }\r\n }\r\n\r\n onJumpBlur(_event: MouseEvent) {\r\n if (!['blur', 'both'].includes(this.inputIndexSizeSureType())) return;\r\n const jumpPage = this.jumpPage().trim();\r\n const page = Number(jumpPage);\r\n this.onJumpPageChange(page);\r\n }\r\n\r\n onJumpKeydown(event: KeyboardEvent) {\r\n if (!['enter', 'both'].includes(this.inputIndexSizeSureType())) return;\r\n const jumpPage = this.jumpPage().trim();\r\n if (jumpPage !== '' && event.keyCode === ENTER) {\r\n const page = Number(jumpPage);\r\n this.onJumpPageChange(page);\r\n }\r\n }\r\n\r\n onJumpPageChange(page: number) {\r\n if (page <= this.indexFirst()) {\r\n this.jump(this.indexFirst());\r\n } else if (page >= this.lastIndex()) {\r\n this.jump(this.lastIndex());\r\n } else {\r\n this.jump(page);\r\n }\r\n this.jumpPage.set('');\r\n }\r\n\r\n onSimpleKeydown(event: KeyboardEvent) {\r\n if (this.index() !== null && event.keyCode === ENTER) {\r\n if (this.index() % 1 !== 0) {\r\n this.index.update((x) => Math.round(x));\r\n }\r\n if (isNaN(this.index()) || this.index() === 0) {\r\n this.index.set(1);\r\n }\r\n if (this.index() <= this.indexFirst()) {\r\n this.index.set(this.indexFirst());\r\n } else if (this.index() >= this.lastIndex()) {\r\n this.index.set(this.lastIndex());\r\n }\r\n this.jump(this.index());\r\n }\r\n }\r\n\r\n onInputSizeBlur(_event: MouseEvent) {\r\n if (!['blur', 'both'].includes(this.inputIndexSizeSureType())) return;\r\n const inputSize = this.inputSize().trim();\r\n const inputNumber = Number(inputSize);\r\n this.onSizeChange(inputNumber);\r\n }\r\n\r\n onInputSizeKeydown(event: KeyboardEvent) {\r\n if (!['enter', 'both'].includes(this.inputIndexSizeSureType())) return;\r\n const inputSize = this.inputSize().trim();\r\n if (inputSize !== '' && event.keyCode === ENTER) {\r\n const inputNumber = Number(inputSize);\r\n this.onSizeChange(inputNumber);\r\n }\r\n }\r\n\r\n onSizeChange(size: number) {\r\n if (size % 1 !== 0) {\r\n this.inputSize.set(`${Math.round(size)}`);\r\n }\r\n if (isNaN(size)) {\r\n this.inputSize.set(`${this.size()}`);\r\n }\r\n if (size <= 0) {\r\n this.inputSize.set(`${this.size()}`);\r\n } else if (size !== this.size()) {\r\n this.size.set(size);\r\n this.sizeChanged();\r\n }\r\n }\r\n\r\n validateIndex(value: number): number {\r\n if (value > this.lastIndex()) {\r\n return this.lastIndex();\r\n } else if (value < 1) {\r\n return 1;\r\n } else {\r\n return value;\r\n }\r\n }\r\n\r\n getActivated(index: number) {\r\n return this.index() === index;\r\n }\r\n}\r\n","@if (simple()) {\r\n <div class=\"x-pagination-simple\">\r\n <x-input\r\n [bordered]=\"showBackground()\"\r\n [before]=\"previousTpl\"\r\n [after]=\"nextTpl\"\r\n [style.width]=\"simpleIndexWidth()\"\r\n [(ngModel)]=\"index\"\r\n (xKeydown)=\"onSimpleKeydown($event)\"\r\n ></x-input>\r\n <span>/</span>\r\n <span>{{ lastIndex() }}</span>\r\n </div>\r\n} @else {\r\n <x-buttons [space]=\"space()\" [hiddenBorder]=\"!showBackground()\" [boxShadow]=\"false\">\r\n @if (showEllipsis()) {\r\n <x-button\r\n [icon]=\"'fto-chevrons-left'\"\r\n [title]=\"'pagination.first' | xI18n\"\r\n [disabled]=\"disabled() || firstActivated()\"\r\n (click)=\"jump(1)\"\r\n plain\r\n flat\r\n ></x-button>\r\n }\r\n <ng-container *xOutlet=\"previousTpl\"></ng-container>\r\n @for (item of indexes(); track item) {\r\n <x-button [disabled]=\"disabled()\" plain flat [activated]=\"getActivated(item)\" (click)=\"jump(item)\">{{\r\n item\r\n }}</x-button>\r\n }\r\n <ng-container *xOutlet=\"nextTpl\"></ng-container>\r\n @if (showEllipsis() && !simple()) {\r\n <x-button\r\n [icon]=\"'fto-chevrons-right'\"\r\n [title]=\"'pagination.last' | xI18n\"\r\n [disabled]=\"disabled() || lastActivated()\"\r\n (click)=\"jump(lastIndex())\"\r\n plain\r\n flat\r\n ></x-button>\r\n }\r\n </x-buttons>\r\n}\r\n@if (showSize() && !showInputSize()) {\r\n <x-select\r\n [style.width]=\"sizeWidth()\"\r\n class=\"x-pagination-size\"\r\n [data]=\"sizeDataSignal()\"\r\n [clearable]=\"false\"\r\n [disabled]=\"disabled()\"\r\n [bordered]=\"showBackground()\"\r\n [nodeTpl]=\"nodeTpl\"\r\n [(ngModel)]=\"size\"\r\n (ngModelChange)=\"sizeChanged()\"\r\n ></x-select>\r\n}\r\n@if (showInputSize()) {\r\n <div class=\"x-pagination-input-size\">\r\n <x-input\r\n x-tooltip\r\n [content]=\"inputSizeTooltip()\"\r\n [style.width]=\"inputSizeWidth()\"\r\n [disabled]=\"disabled()\"\r\n [bordered]=\"showBackground()\"\r\n [(ngModel)]=\"inputSize\"\r\n (xBlur)=\"onInputSizeBlur($event)\"\r\n (xKeydown)=\"onInputSizeKeydown($event)\"\r\n ></x-input>\r\n <span> {{ 'pagination.sizePage' | xI18n }} </span>\r\n </div>\r\n}\r\n@if (showJump() && !simple()) {\r\n <div class=\"x-pagination-jump\">\r\n <span>{{ 'pagination.jump' | xI18n }}</span>\r\n <x-input\r\n x-tooltip\r\n [content]=\"jumpTooltip()\"\r\n [bordered]=\"showBackground()\"\r\n [style.width]=\"jumpWidth()\"\r\n [(ngModel)]=\"jumpPage\"\r\n (xBlur)=\"onJumpBlur($event)\"\r\n (xKeydown)=\"onJumpKeydown($event)\"\r\n ></x-input>\r\n </div>\r\n}\r\n@if (showTotal()) {\r\n <x-button [disabled]=\"disabled()\" plain flat class=\"x-pagination-total\">\r\n <ng-container *xOutlet=\"totalTpl(); context: { $total: total() }\">\r\n {{ 'pagination.total' | xI18n }} {{ total() }} {{ 'pagination.item' | xI18n }}\r\n </ng-container>\r\n </x-button>\r\n}\r\n<ng-template #previousTpl>\r\n <x-button\r\n [icon]=\"'fto-chevron-left'\"\r\n [title]=\"'pagination.previous' | xI18n\"\r\n [disabled]=\"disabled() || leftDisabled()\"\r\n (click)=\"jump(-1, true)\"\r\n plain\r\n flat\r\n ></x-button>\r\n</ng-template>\r\n\r\n<ng-template #nextTpl>\r\n <x-button\r\n [icon]=\"'fto-chevron-right'\"\r\n [title]=\"'pagination.next' | xI18n\"\r\n [disabled]=\"disabled() || rightDisabled()\"\r\n (click)=\"jump(1, true)\"\r\n plain\r\n flat\r\n ></x-button>\r\n</ng-template>\r\n\r\n<ng-template #nodeTpl let-node=\"$node\">\r\n @if (node) {\r\n {{ node?.label }} {{ 'pagination.sizePage' | xI18n }}\r\n }\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { XPaginationComponent } from './pagination.component';\r\n\r\n@NgModule({\r\n exports: [XPaginationComponent],\r\n imports: [XPaginationComponent]\r\n})\r\nexport class XPaginationModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAKA;;;;AAIG;AACI,MAAM,iBAAiB,GAAG,eAAe;AAChD,MAAM,wBAAwB,GAAG,YAAY,CAAC;AAE9C;;;AAGG;AACI,MAAM,mBAAmB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE;AAErD;;AAEG;MAEU,mBAAoB,SAAQ,iBAAiB,CAAC,wBAAwB,CAAC,CAAA;AADpF,IAAA,WAAA,GAAA;;AAEE;;;AAGG;QACM,IAAK,CAAA,KAAA,GAAG,KAAK,CAAS,IAAI,CAAC,MAAM,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC;AACxD;;;AAGG;QACM,IAAI,CAAA,IAAA,GAAG,KAAK,CAAS,IAAI,CAAC,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;AACvD;;;AAGG;QACM,IAAK,CAAA,KAAA,GAAG,KAAK,CAAkB,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC;AACrE;;;AAGG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;AACnC;;;AAGG;AACM,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAkB,IAAI,CAAC,MAAM,EAAE,YAAY,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC,CAAC;AACzG;;;AAGG;AAC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AA,CAAA,CAAA,EAAA;AAGnB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAFlB,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAEnB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA,CAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-pagination.mjs","sources":["../../../../lib/ng-nest/ui/pagination/pagination.property.ts","../../../../lib/ng-nest/ui/pagination/pagination.component.ts","../../../../lib/ng-nest/ui/pagination/pagination.component.html","../../../../lib/ng-nest/ui/pagination/pagination.module.ts","../../../../lib/ng-nest/ui/pagination/ng-nest-ui-pagination.ts"],"sourcesContent":["import { XPropertyFunction, XToNumber, XToBoolean, XToCssPixelValue } from '@ng-nest/ui/core';\r\nimport { Component, model, input } from '@angular/core';\r\nimport type { XSelectNode } from '@ng-nest/ui/select';\r\nimport type { XNumber, XQuery, XBoolean, XTemplate, XDataArray } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Pagination\r\n * @selector x-pagination\r\n * @decorator component\r\n */\r\nexport const XPaginationPrefix = 'x-pagination';\r\nconst X_PAGINATION_CONFIG_NAME = 'pagination';\r\n\r\n/**\r\n * @zh_CN 分页选择条数\r\n * @en_US Sub-selection\r\n */\r\nexport const XPaginationSizeData = [10, 20, 50, 100];\r\n\r\n/**\r\n * Pagination Property\r\n */\r\n@Component({ selector: `${XPaginationPrefix}-property`, template: '' })\r\nexport class XPaginationProperty extends XPropertyFunction(X_PAGINATION_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 当前页码\r\n * @en_US Current page number\r\n */\r\n readonly index = model<number>(this.config?.index ?? 1);\r\n /**\r\n * @zh_CN 每页显示条数\r\n * @en_US Number of items displayed per page\r\n */\r\n readonly size = model<number>(this.config?.size ?? 10);\r\n /**\r\n * @zh_CN 总数\r\n * @en_US Total\r\n */\r\n readonly total = input<number, XNumber>(0, { transform: XToNumber });\r\n /**\r\n * @zh_CN 查询条件\r\n * @en_US Query conditions\r\n */\r\n readonly query = model<XQuery>({});\r\n /**\r\n * @zh_CN 最多显示的分页数量\r\n * @en_US The largest number of pages display\r\n */\r\n readonly pageLinkSize = input<number, XNumber>(this.config?.pageLinkSize ?? 5, { transform: XToNumber });\r\n /**\r\n * @zh_CN 显示首尾页跳转\r\n * @en_US Display the first and last page\r\n */\r\n readonly showEllipsis = input<boolean, XBoolean>(this.config?.showEllipsis ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 显示总条数\r\n * @en_US Display the total\r\n */\r\n readonly showTotal = input<boolean, XBoolean>(this.config?.showTotal ?? true, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 按钮间距\r\n * @en_US Button spacing\r\n */\r\n readonly space = input<string, XNumber>(this.config?.space ?? '0.25rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 添加背景色\r\n * @en_US Show background\r\n */\r\n readonly showBackground = input<boolean, XBoolean>(this.config?.showBackground ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 显示分页条数\r\n * @en_US Show size\r\n */\r\n readonly showSize = input<boolean, XBoolean>(this.config?.showSize ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 分页条数选择框的宽度\r\n * @en_US size with select\r\n */\r\n readonly sizeWidth = input<string, XNumber>(this.config?.sizeWidth ?? '6.875rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 显示输入分页框(不能跟下拉选项同时使用),默认使用回车确认改变\r\n * @en_US Display the number of input page breaks (cannot exist with the drop-down options of page breaks). default to using Enter to confirm changes\r\n */\r\n readonly showInputSize = input<boolean, XBoolean>(this.config?.showInputSize ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 输入分页框的 tooltip 提示信息,默认根据输入确认改变的方式来显示\r\n * @en_US Enter the tooltip prompt information for the pagination box, which will be displayed by default based on the confirmation of the input\r\n */\r\n readonly inputSizeTooltipText = input<string>(this.config?.inputSizeTooltipText ?? '');\r\n /**\r\n * @zh_CN 分页条数输入框的宽度\r\n * @en_US size with input\r\n */\r\n readonly inputSizeWidth = input<string, XNumber>(this.config?.sizeWidth ?? '3.125rem', {\r\n transform: XToCssPixelValue\r\n });\r\n /**\r\n * @zh_CN 分页选择的数据项\r\n * @en_US Paging choose items of data\r\n */\r\n readonly sizeData = input<XDataArray<XSelectNode>>(this.config?.sizeData ?? XPaginationSizeData);\r\n /**\r\n * @zh_CN 禁用整个分页\r\n * @en_US disabled\r\n */\r\n readonly disabled = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 显示跳转输入框,默认使用回车确认改变\r\n * @en_US Show size. default to using Enter to confirm changes\r\n */\r\n readonly showJump = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 跳转输入框的 tooltip 提示信息,默认根据输入确认改变的方式来显示\r\n * @en_US The tooltip prompt information for jumping to the input box is displayed by default based on the confirmation of input changes\r\n */\r\n readonly jumpTooltipText = input<string>(this.config?.jumpTooltipText ?? '');\r\n /**\r\n * @zh_CN 跳转页的宽度\r\n * @en_US size with\r\n */\r\n readonly jumpWidth = input<string, XNumber>(this.config?.jumpWidth ?? '3.125rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 总数自定义模板\r\n * @en_US Total template\r\n */\r\n readonly totalTpl = input<XTemplate>();\r\n /**\r\n * @zh_CN 简单分页\r\n * @en_US Simple\r\n */\r\n readonly simple = input<boolean, XBoolean>(this.config?.simple ?? false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 简单分页输入框宽度\r\n * @en_US Simple index with\r\n */\r\n readonly simpleIndexWidth = input<string, XNumber>(this.config?.simpleIndexWidth ?? '8.125rem', {\r\n transform: XToCssPixelValue\r\n });\r\n /**\r\n * @zh_CN 输入确认改变的方式,针对输入分页大小和输入跳转页\r\n * @en_US The method for confirming changes in input is based on the input page size and input jump page\r\n */\r\n readonly inputIndexSizeSureType = input<XPaginationInputIndexSizeSureType>(\r\n this.config?.inputIndexSizeSureType ?? 'enter'\r\n );\r\n}\r\n\r\n/**\r\n * @zh_CN 输入确认改变的方式,针对输入分页大小和输入跳转页\r\n * - `'enter'` : 输入后使用回车键确认\r\n * - `'blur'` : 输入后失去焦点后确认\r\n * - `'both'` : 上面2种都可以触发确认操作\r\n * @en_US The method for confirming changes in input is based on the input page size and input jump page\r\n * - `'enter'` : After entering, use the enter key to confirm\r\n * - `'blur'` : Confirm after losing focus after input\r\n * - `'both'` : Both of the above can trigger confirmation operations\r\n */\r\nexport type XPaginationInputIndexSizeSureType = 'enter' | 'blur' | 'both';\r\n","import {\r\n Component,\r\n ViewEncapsulation,\r\n ChangeDetectionStrategy,\r\n OnInit,\r\n signal,\r\n computed,\r\n HostBinding,\r\n ElementRef,\r\n inject,\r\n SimpleChanges\r\n} from '@angular/core';\r\nimport { XPaginationPrefix, XPaginationProperty } from './pagination.property';\r\nimport { XI18nPagination, XI18nPipe, XI18nService, zh_CN } from '@ng-nest/ui/i18n';\r\nimport { ENTER } from '@angular/cdk/keycodes';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { XButtonComponent, XButtonsComponent } from '@ng-nest/ui/button';\r\nimport { XSelectComponent } from '@ng-nest/ui/select';\r\nimport { XInputComponent } from '@ng-nest/ui/input';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { XIsChange, XToDataArray } from '@ng-nest/ui/core';\r\nimport { XTooltipModule } from '@ng-nest/ui/tooltip';\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\nimport { map } from 'rxjs';\r\n\r\n@Component({\r\n selector: `${XPaginationPrefix}`,\r\n standalone: true,\r\n imports: [\r\n FormsModule,\r\n XButtonComponent,\r\n XButtonsComponent,\r\n XI18nPipe,\r\n XSelectComponent,\r\n XInputComponent,\r\n XTooltipModule,\r\n XOutletDirective\r\n ],\r\n templateUrl: './pagination.component.html',\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XPaginationComponent extends XPaginationProperty implements OnInit {\r\n elementRef = inject(ElementRef);\r\n private i18n = inject(XI18nService);\r\n locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.pagination as XI18nPagination)), {\r\n initialValue: zh_CN.pagination\r\n });\r\n\r\n @HostBinding('class') className = XPaginationPrefix;\r\n\r\n indexFirst = signal(1);\r\n indexLast = signal(1);\r\n jumpPage = signal<string>('');\r\n inputSize = signal<string>('');\r\n\r\n lastIndex = computed(() => Math.ceil(this.total() / this.size()) || 1);\r\n leftDisabled = computed(() => this.index() === 1 || this.total() === 0);\r\n rightDisabled = computed(() => this.index() === this.lastIndex() || this.total() === 0);\r\n firstActivated = computed(() => this.index() === 1);\r\n lastActivated = computed(() => this.index() === this.lastIndex());\r\n\r\n indexes = computed(() => {\r\n const indexes: number[] = [];\r\n const current = this.index() - 1;\r\n const maxSize = this.pageLinkSize();\r\n const pages = Math.min(maxSize, this.lastIndex());\r\n let start = Math.max(0, Math.ceil(current - pages / 2)),\r\n end = Math.min(this.lastIndex() - 1, start + pages - 1);\r\n var delta = maxSize - (end - start + 1);\r\n start = Math.max(0, start - delta);\r\n\r\n for (let i = start; i <= end; i++) {\r\n indexes.push(i + 1);\r\n }\r\n return indexes;\r\n });\r\n\r\n sizeDataSignal = computed(() => XToDataArray(this.sizeData()));\r\n\r\n inputSizeTooltip = computed(() => {\r\n if (this.inputSizeTooltipText()) return this.inputSizeTooltipText();\r\n if (this.inputIndexSizeSureType() === 'enter') {\r\n return this.locale().inputSizeTooltipEnter;\r\n }\r\n if (this.inputIndexSizeSureType() === 'blur') {\r\n return this.locale().inputSizeTooltipBlur;\r\n }\r\n if (this.inputIndexSizeSureType() === 'both') {\r\n return this.locale().inputSizeTooltipBoth;\r\n }\r\n return '';\r\n });\r\n\r\n jumpTooltip = computed(() => {\r\n if (this.jumpTooltipText()) return this.jumpTooltipText();\r\n if (this.inputIndexSizeSureType() === 'enter') {\r\n return this.locale().jumpTooltipEnter;\r\n }\r\n if (this.inputIndexSizeSureType() === 'blur') {\r\n return this.locale().jumpTooltipBlur;\r\n }\r\n if (this.inputIndexSizeSureType() === 'both') {\r\n return this.locale().jumpTooltipBoth;\r\n }\r\n return '';\r\n });\r\n\r\n ngOnInit() {\r\n this.inputSize.set(this.size().toString());\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n const { size } = changes;\r\n XIsChange(size) && this.inputSize.set(this.size().toString());\r\n }\r\n\r\n sizeChanged() {\r\n if (this.index() !== 1) {\r\n this.index.set(1);\r\n }\r\n }\r\n\r\n jump(index: number, isDiff = false) {\r\n const ix = this.validateIndex(isDiff ? this.index() + index : index);\r\n if (ix !== this.index()) {\r\n this.index.set(ix);\r\n }\r\n }\r\n\r\n onJumpBlur(_event: MouseEvent) {\r\n if (!['blur', 'both'].includes(this.inputIndexSizeSureType())) return;\r\n const jumpPage = this.jumpPage().trim();\r\n const page = Number(jumpPage);\r\n this.onJumpPageChange(page);\r\n }\r\n\r\n onJumpKeydown(event: KeyboardEvent) {\r\n if (!['enter', 'both'].includes(this.inputIndexSizeSureType())) return;\r\n const jumpPage = this.jumpPage().trim();\r\n if (jumpPage !== '' && event.keyCode === ENTER) {\r\n const page = Number(jumpPage);\r\n this.onJumpPageChange(page);\r\n }\r\n }\r\n\r\n onJumpPageChange(page: number) {\r\n if (page <= this.indexFirst()) {\r\n this.jump(this.indexFirst());\r\n } else if (page >= this.lastIndex()) {\r\n this.jump(this.lastIndex());\r\n } else {\r\n this.jump(page);\r\n }\r\n this.jumpPage.set('');\r\n }\r\n\r\n onSimpleKeydown(event: KeyboardEvent) {\r\n if (this.index() !== null && event.keyCode === ENTER) {\r\n if (this.index() % 1 !== 0) {\r\n this.index.update((x) => Math.round(x));\r\n }\r\n if (isNaN(this.index()) || this.index() === 0) {\r\n this.index.set(1);\r\n }\r\n if (this.index() <= this.indexFirst()) {\r\n this.index.set(this.indexFirst());\r\n } else if (this.index() >= this.lastIndex()) {\r\n this.index.set(this.lastIndex());\r\n }\r\n this.jump(this.index());\r\n }\r\n }\r\n\r\n onInputSizeBlur(_event: MouseEvent) {\r\n if (!['blur', 'both'].includes(this.inputIndexSizeSureType())) return;\r\n const inputSize = this.inputSize().trim();\r\n const inputNumber = Number(inputSize);\r\n this.onSizeChange(inputNumber);\r\n }\r\n\r\n onInputSizeKeydown(event: KeyboardEvent) {\r\n if (!['enter', 'both'].includes(this.inputIndexSizeSureType())) return;\r\n const inputSize = this.inputSize().trim();\r\n if (inputSize !== '' && event.keyCode === ENTER) {\r\n const inputNumber = Number(inputSize);\r\n this.onSizeChange(inputNumber);\r\n }\r\n }\r\n\r\n onSizeChange(size: number) {\r\n if (size % 1 !== 0) {\r\n this.inputSize.set(`${Math.round(size)}`);\r\n }\r\n if (isNaN(size)) {\r\n this.inputSize.set(`${this.size()}`);\r\n }\r\n if (size <= 0) {\r\n this.inputSize.set(`${this.size()}`);\r\n } else if (size !== this.size()) {\r\n this.size.set(size);\r\n this.sizeChanged();\r\n }\r\n }\r\n\r\n validateIndex(value: number): number {\r\n if (value > this.lastIndex()) {\r\n return this.lastIndex();\r\n } else if (value < 1) {\r\n return 1;\r\n } else {\r\n return value;\r\n }\r\n }\r\n\r\n getActivated(index: number) {\r\n return this.index() === index;\r\n }\r\n}\r\n","@if (simple()) {\r\n <div class=\"x-pagination-simple\">\r\n <x-input\r\n [bordered]=\"showBackground()\"\r\n [before]=\"previousTpl\"\r\n [after]=\"nextTpl\"\r\n [style.width]=\"simpleIndexWidth()\"\r\n [(ngModel)]=\"index\"\r\n (xKeydown)=\"onSimpleKeydown($event)\"\r\n ></x-input>\r\n <span>/</span>\r\n <span>{{ lastIndex() }}</span>\r\n </div>\r\n} @else {\r\n <x-buttons class=\"x-pagination-group\" [space]=\"space()\" [hiddenBorder]=\"!showBackground()\" [boxShadow]=\"false\">\r\n @if (showEllipsis()) {\r\n <x-button\r\n class=\"x-pagination-first\"\r\n [icon]=\"'fto-chevrons-left'\"\r\n [title]=\"'pagination.first' | xI18n\"\r\n [disabled]=\"disabled() || firstActivated()\"\r\n (click)=\"jump(1)\"\r\n plain\r\n flat\r\n ></x-button>\r\n }\r\n <ng-container *xOutlet=\"previousTpl\"></ng-container>\r\n @for (item of indexes(); track item) {\r\n <x-button\r\n class=\"x-pagination-link\"\r\n [disabled]=\"disabled()\"\r\n plain\r\n flat\r\n [activated]=\"getActivated(item)\"\r\n (click)=\"jump(item)\"\r\n >{{ item }}</x-button\r\n >\r\n }\r\n <ng-container *xOutlet=\"nextTpl\"></ng-container>\r\n @if (showEllipsis() && !simple()) {\r\n <x-button\r\n class=\"x-pagination-last\"\r\n [icon]=\"'fto-chevrons-right'\"\r\n [title]=\"'pagination.last' | xI18n\"\r\n [disabled]=\"disabled() || lastActivated()\"\r\n (click)=\"jump(lastIndex())\"\r\n plain\r\n flat\r\n ></x-button>\r\n }\r\n </x-buttons>\r\n}\r\n@if (showSize() && !showInputSize()) {\r\n <x-select\r\n [style.width]=\"sizeWidth()\"\r\n class=\"x-pagination-size\"\r\n [data]=\"sizeDataSignal()\"\r\n [clearable]=\"false\"\r\n [disabled]=\"disabled()\"\r\n [bordered]=\"showBackground()\"\r\n [nodeTpl]=\"nodeTpl\"\r\n [(ngModel)]=\"size\"\r\n (ngModelChange)=\"sizeChanged()\"\r\n ></x-select>\r\n}\r\n@if (showInputSize()) {\r\n <div class=\"x-pagination-input-size\">\r\n <x-input\r\n x-tooltip\r\n [content]=\"inputSizeTooltip()\"\r\n [style.width]=\"inputSizeWidth()\"\r\n [disabled]=\"disabled()\"\r\n [bordered]=\"showBackground()\"\r\n [(ngModel)]=\"inputSize\"\r\n (xBlur)=\"onInputSizeBlur($event)\"\r\n (xKeydown)=\"onInputSizeKeydown($event)\"\r\n ></x-input>\r\n <span> {{ 'pagination.sizePage' | xI18n }} </span>\r\n </div>\r\n}\r\n@if (showJump() && !simple()) {\r\n <div class=\"x-pagination-jump\">\r\n <span>{{ 'pagination.jump' | xI18n }}</span>\r\n <x-input\r\n x-tooltip\r\n [content]=\"jumpTooltip()\"\r\n [bordered]=\"showBackground()\"\r\n [style.width]=\"jumpWidth()\"\r\n [(ngModel)]=\"jumpPage\"\r\n (xBlur)=\"onJumpBlur($event)\"\r\n (xKeydown)=\"onJumpKeydown($event)\"\r\n ></x-input>\r\n </div>\r\n}\r\n@if (showTotal()) {\r\n <x-button [disabled]=\"disabled()\" plain flat class=\"x-pagination-total\">\r\n <ng-container *xOutlet=\"totalTpl(); context: { $total: total() }\">\r\n {{ 'pagination.total' | xI18n }} {{ total() }} {{ 'pagination.item' | xI18n }}\r\n </ng-container>\r\n </x-button>\r\n}\r\n<ng-template #previousTpl>\r\n <x-button\r\n [icon]=\"'fto-chevron-left'\"\r\n [title]=\"'pagination.previous' | xI18n\"\r\n [disabled]=\"disabled() || leftDisabled()\"\r\n (click)=\"jump(-1, true)\"\r\n plain\r\n flat\r\n ></x-button>\r\n</ng-template>\r\n\r\n<ng-template #nextTpl>\r\n <x-button\r\n [icon]=\"'fto-chevron-right'\"\r\n [title]=\"'pagination.next' | xI18n\"\r\n [disabled]=\"disabled() || rightDisabled()\"\r\n (click)=\"jump(1, true)\"\r\n plain\r\n flat\r\n ></x-button>\r\n</ng-template>\r\n\r\n<ng-template #nodeTpl let-node=\"$node\">\r\n @if (node) {\r\n {{ node?.label }} {{ 'pagination.sizePage' | xI18n }}\r\n }\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { XPaginationComponent } from './pagination.component';\r\n\r\n@NgModule({\r\n exports: [XPaginationComponent],\r\n imports: [XPaginationComponent]\r\n})\r\nex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AJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA,CAAA;;;ACND;;AAEG;;;;"}
@@ -148,11 +148,11 @@ class XPopconfirmComponent extends XPopconfirmProperty {
148
148
  this.condition() && this.onConfirm(event);
149
149
  }
150
150
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: XPopconfirmComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
151
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: XPopconfirmComponent, isStandalone: true, selector: "x-popconfirm", usesInheritance: true, ngImport: i0, template: "<div\r\n #popconfirm\r\n class=\"x-popconfirm\"\r\n x-popover\r\n [title]=\"titleTpl\"\r\n [content]=\"content()\"\r\n [footer]=\"footerTpl\"\r\n [placement]=\"placement()\"\r\n [trigger]=\"trigger()\"\r\n [width]=\"width()\"\r\n [maxWidth]=\"maxWidth()\"\r\n [minWidth]=\"minWidth()\"\r\n [condition]=\"condition()\"\r\n [(visible)]=\"visible\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n<ng-template #titleTpl>\r\n <div class=\"x-popconfirm-title\">\r\n <ng-container *xOutlet=\"title()\">\r\n @if (icon()) {\r\n <x-icon [style.color]=\"iconColor()\" [type]=\"icon()\"></x-icon>\r\n }\r\n <span>{{ title() }}</span>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #footerTpl>\r\n <div class=\"x-popconfirm-buttons\">\r\n <x-button (click)=\"onCancel($event)\" flat plain>{{ cancelTextSignal() }}</x-button>\r\n <x-button type=\"primary\" flat (click)=\"onConfirm($event)\" [loading]=\"loading()\">{{ confirmTextSignal() }}</x-button>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-popconfirm{margin:0;padding:0}.x-popconfirm{display:inline-block}.x-popconfirm-buttons{display:flex;justify-content:flex-end}.x-popconfirm-buttons>x-button:not(:first-child){margin-left:.5rem}.x-popconfirm-title{display:flex;align-items:center}.x-popconfirm-title>.x-icon{margin-right:.325rem;font-size:1rem}\n"], dependencies: [{ kind: "directive", type: XPopoverDirective, selector: "[x-popover], x-popover" }, { kind: "component", type: XButtonComponent, selector: "x-button" }, { kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
151
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.2", type: XPopconfirmComponent, isStandalone: true, selector: "x-popconfirm", usesInheritance: true, ngImport: i0, template: "<div\r\n #popconfirm\r\n class=\"x-popconfirm\"\r\n x-popover\r\n [title]=\"titleTpl\"\r\n [content]=\"content()\"\r\n [footer]=\"footerTpl\"\r\n [placement]=\"placement()\"\r\n [trigger]=\"trigger()\"\r\n [width]=\"width()\"\r\n [maxWidth]=\"maxWidth()\"\r\n [minWidth]=\"minWidth()\"\r\n [condition]=\"condition()\"\r\n [(visible)]=\"visible\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n<ng-template #titleTpl>\r\n <div class=\"x-popconfirm-title\">\r\n <ng-container *xOutlet=\"title()\">\r\n @if (icon()) {\r\n <x-icon [style.color]=\"iconColor()\" [type]=\"icon()\"></x-icon>\r\n }\r\n <span>{{ title() }}</span>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #footerTpl>\r\n <div class=\"x-popconfirm-buttons\">\r\n <x-button class=\"x-popconfirm-cancel\" (click)=\"onCancel($event)\" flat plain>{{ cancelTextSignal() }}</x-button>\r\n <x-button class=\"x-popconfirm-confirm\" type=\"primary\" flat (click)=\"onConfirm($event)\" [loading]=\"loading()\">{{\r\n confirmTextSignal()\r\n }}</x-button>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-popconfirm{margin:0;padding:0}.x-popconfirm{display:inline-block}.x-popconfirm-buttons{display:flex;justify-content:flex-end}.x-popconfirm-buttons>x-button:not(:first-child){margin-left:.5rem}.x-popconfirm-title{display:flex;align-items:center}.x-popconfirm-title>.x-icon{margin-right:.325rem;font-size:1rem}\n"], dependencies: [{ kind: "directive", type: XPopoverDirective, selector: "[x-popover], x-popover" }, { kind: "component", type: XButtonComponent, selector: "x-button" }, { kind: "component", type: XIconComponent, selector: "x-icon" }, { kind: "directive", type: XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
152
152
  }
153
153
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.2", ngImport: i0, type: XPopconfirmComponent, decorators: [{
154
154
  type: Component,
155
- args: [{ selector: `${XPopconfirmPrefix}`, standalone: true, imports: [XPopoverDirective, XButtonComponent, XIconComponent, XOutletDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n #popconfirm\r\n class=\"x-popconfirm\"\r\n x-popover\r\n [title]=\"titleTpl\"\r\n [content]=\"content()\"\r\n [footer]=\"footerTpl\"\r\n [placement]=\"placement()\"\r\n [trigger]=\"trigger()\"\r\n [width]=\"width()\"\r\n [maxWidth]=\"maxWidth()\"\r\n [minWidth]=\"minWidth()\"\r\n [condition]=\"condition()\"\r\n [(visible)]=\"visible\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n<ng-template #titleTpl>\r\n <div class=\"x-popconfirm-title\">\r\n <ng-container *xOutlet=\"title()\">\r\n @if (icon()) {\r\n <x-icon [style.color]=\"iconColor()\" [type]=\"icon()\"></x-icon>\r\n }\r\n <span>{{ title() }}</span>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #footerTpl>\r\n <div class=\"x-popconfirm-buttons\">\r\n <x-button (click)=\"onCancel($event)\" flat plain>{{ cancelTextSignal() }}</x-button>\r\n <x-button type=\"primary\" flat (click)=\"onConfirm($event)\" [loading]=\"loading()\">{{ confirmTextSignal() }}</x-button>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-popconfirm{margin:0;padding:0}.x-popconfirm{display:inline-block}.x-popconfirm-buttons{display:flex;justify-content:flex-end}.x-popconfirm-buttons>x-button:not(:first-child){margin-left:.5rem}.x-popconfirm-title{display:flex;align-items:center}.x-popconfirm-title>.x-icon{margin-right:.325rem;font-size:1rem}\n"] }]
155
+ args: [{ selector: `${XPopconfirmPrefix}`, standalone: true, imports: [XPopoverDirective, XButtonComponent, XIconComponent, XOutletDirective], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n #popconfirm\r\n class=\"x-popconfirm\"\r\n x-popover\r\n [title]=\"titleTpl\"\r\n [content]=\"content()\"\r\n [footer]=\"footerTpl\"\r\n [placement]=\"placement()\"\r\n [trigger]=\"trigger()\"\r\n [width]=\"width()\"\r\n [maxWidth]=\"maxWidth()\"\r\n [minWidth]=\"minWidth()\"\r\n [condition]=\"condition()\"\r\n [(visible)]=\"visible\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n<ng-template #titleTpl>\r\n <div class=\"x-popconfirm-title\">\r\n <ng-container *xOutlet=\"title()\">\r\n @if (icon()) {\r\n <x-icon [style.color]=\"iconColor()\" [type]=\"icon()\"></x-icon>\r\n }\r\n <span>{{ title() }}</span>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #footerTpl>\r\n <div class=\"x-popconfirm-buttons\">\r\n <x-button class=\"x-popconfirm-cancel\" (click)=\"onCancel($event)\" flat plain>{{ cancelTextSignal() }}</x-button>\r\n <x-button class=\"x-popconfirm-confirm\" type=\"primary\" flat (click)=\"onConfirm($event)\" [loading]=\"loading()\">{{\r\n confirmTextSignal()\r\n }}</x-button>\r\n </div>\r\n</ng-template>\r\n", styles: [".x-popconfirm{margin:0;padding:0}.x-popconfirm{display:inline-block}.x-popconfirm-buttons{display:flex;justify-content:flex-end}.x-popconfirm-buttons>x-button:not(:first-child){margin-left:.5rem}.x-popconfirm-title{display:flex;align-items:center}.x-popconfirm-title>.x-icon{margin-right:.325rem;font-size:1rem}\n"] }]
156
156
  }] });
157
157
 
158
158
  class XPopconfirmModule {
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-popconfirm.mjs","sources":["../../../../lib/ng-nest/ui/popconfirm/popconfirm.property.ts","../../../../lib/ng-nest/ui/popconfirm/popconfirm.component.ts","../../../../lib/ng-nest/ui/popconfirm/popconfirm.component.html","../../../../lib/ng-nest/ui/popconfirm/popconfirm.module.ts","../../../../lib/ng-nest/ui/popconfirm/ng-nest-ui-popconfirm.ts"],"sourcesContent":["import { XPropertyFunction, XToCssPixelValue, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input, output } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport type { XPopoverTrigger } from '@ng-nest/ui/popover';\r\nimport type { XPlacement, XTemplate, XBoolean, XNumber } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Popconfirm\r\n * @selector x-popconfirm\r\n * @decorator component\r\n */\r\nexport const XPopconfirmPrefix = 'x-popconfirm';\r\nconst X_POPCONFIRM_CONFIG_NAME = 'popconfirm';\r\n\r\n/**\r\n * Popconfirm Property\r\n */\r\n@Component({ selector: `${XPopconfirmPrefix}-property`, template: '' })\r\nexport class XPopconfirmProperty extends XPropertyFunction(X_POPCONFIRM_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 标题,支持自定义模板\r\n * @en_US Title, support custom template\r\n */\r\n readonly title = input<XTemplate>('');\r\n /**\r\n * @zh_CN 内容,支持自定义模板\r\n * @en_US Content, support custom templates\r\n */\r\n readonly content = input<XTemplate>('');\r\n /**\r\n * @zh_CN 弹出的位置\r\n * @en_US Pop-up position\r\n */\r\n readonly placement = input<XPlacement>(this.config?.placement ?? 'bottom');\r\n /**\r\n * @zh_CN 激活方式\r\n * @en_US Activation method\r\n */\r\n readonly trigger = input<XPopoverTrigger>(this.config?.trigger ?? 'click');\r\n /**\r\n * @zh_CN 宽度\r\n * @en_US width\r\n */\r\n readonly width = input<string, XNumber>(this.config?.width ?? '', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 最大宽度\r\n * @en_US Max width\r\n */\r\n readonly maxWidth = input<string, XNumber>(this.config?.maxWidth ?? '15rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 最小宽度\r\n * @en_US Min width\r\n */\r\n readonly minWidth = input<string, XNumber>(this.config?.minWidth ?? '15rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n readonly icon = input<string>(this.config?.icon ?? 'fto-help-circle');\r\n /**\r\n * @zh_CN 图标颜色\r\n * @en_US Icon color\r\n */\r\n readonly iconColor = input<string>(this.config?.iconColor ?? '#e6a23c');\r\n /**\r\n * @zh_CN 取消的文字\r\n * @en_US Canceled text\r\n */\r\n readonly cancelText = input<string>(this.config?.cancelText ?? '');\r\n /**\r\n * @zh_CN 确认的文字\r\n * @en_US Confirmed text\r\n */\r\n readonly confirmText = input<string>(this.config?.confirmText ?? '');\r\n /**\r\n * @zh_CN 确认异步 Observable\r\n * @en_US Confirm async\r\n */\r\n readonly confirmAsync = input<Observable<void>>();\r\n /**\r\n * @zh_CN 条件触发\r\n * @en_US condition trigger\r\n */\r\n readonly condition = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 取消的点击事件\r\n * @en_US Cancelled click event\r\n */\r\n readonly cancel = output<Event>();\r\n /**\r\n * @zh_CN 确认的点击事件\r\n * @en_US Confirmed click event\r\n */\r\n readonly confirm = output<Event>();\r\n}\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n OnDestroy,\r\n inject,\r\n computed,\r\n signal\r\n} from '@angular/core';\r\nimport { XPopconfirmProperty, XPopconfirmPrefix } from './popconfirm.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XI18nService, XI18nPopconfirm, zh_CN } from '@ng-nest/ui/i18n';\r\nimport { map, takeUntil } from 'rxjs/operators';\r\nimport { XPopoverDirective } from '@ng-nest/ui/popover';\r\nimport { XButtonComponent } from '@ng-nest/ui/button';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\n\r\n@Component({\r\n selector: `${XPopconfirmPrefix}`,\r\n standalone: true,\r\n imports: [XPopoverDirective, XButtonComponent, XIconComponent, XOutletDirective],\r\n templateUrl: './popconfirm.component.html',\r\n styleUrls: ['./popconfirm.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XPopconfirmComponent extends XPopconfirmProperty implements OnDestroy {\r\n private i18n = inject(XI18nService);\r\n visible = signal(false);\r\n loading = signal(false);\r\n\r\n private asyncUnSub = new Subject<void>();\r\n\r\n locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.popconfirm as XI18nPopconfirm)), {\r\n initialValue: zh_CN.popconfirm\r\n });\r\n\r\n cancelTextSignal = computed(() => this.cancelText() || this.locale().cancelText);\r\n confirmTextSignal = computed(() => this.confirmText() || this.locale().confirmText);\r\n\r\n ngOnDestroy(): void {\r\n this.asyncUnSub.next();\r\n this.asyncUnSub.complete();\r\n }\r\n\r\n onCancel(event: Event) {\r\n this.visible.set(false);\r\n this.cancel.emit(event);\r\n }\r\n\r\n onConfirm(event: Event) {\r\n const confirmAsync = this.confirmAsync();\r\n if (confirmAsync) {\r\n this.loading.set(true);\r\n confirmAsync.pipe(takeUntil(this.asyncUnSub)).subscribe(() => {\r\n this.loading.set(false);\r\n this.visible.set(false);\r\n this.confirm.emit(event);\r\n this.asyncUnSub.next();\r\n });\r\n } else {\r\n this.visible.set(false);\r\n this.confirm.emit(event);\r\n }\r\n }\r\n\r\n onClick(event: Event) {\r\n this.condition() && this.onConfirm(event);\r\n }\r\n}\r\n","<div\r\n #popconfirm\r\n class=\"x-popconfirm\"\r\n x-popover\r\n [title]=\"titleTpl\"\r\n [content]=\"content()\"\r\n [footer]=\"footerTpl\"\r\n [placement]=\"placement()\"\r\n [trigger]=\"trigger()\"\r\n [width]=\"width()\"\r\n [maxWidth]=\"maxWidth()\"\r\n [minWidth]=\"minWidth()\"\r\n [condition]=\"condition()\"\r\n [(visible)]=\"visible\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n<ng-template #titleTpl>\r\n <div class=\"x-popconfirm-title\">\r\n <ng-container *xOutlet=\"title()\">\r\n @if (icon()) {\r\n <x-icon [style.color]=\"iconColor()\" [type]=\"icon()\"></x-icon>\r\n }\r\n <span>{{ title() }}</span>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #footerTpl>\r\n <div class=\"x-popconfirm-buttons\">\r\n <x-button (click)=\"onCancel($event)\" flat plain>{{ cancelTextSignal() }}</x-button>\r\n <x-button type=\"primary\" flat (click)=\"onConfirm($event)\" [loading]=\"loading()\">{{ confirmTextSignal() }}</x-button>\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { XPopconfirmComponent } from './popconfirm.component';\r\n\r\n@NgModule({\r\n exports: [XPopconfirmComponent],\r\n imports: [XPopconfirmComponent]\r\n})\r\nexport class XPopconfirmModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAMA;;;;AAIG;AACI,MAAM,iBAAiB,GAAG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BAAA,CAAA,IAAA,EAAA,CAAA,CAAA,EAAA;;2FAMpE,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAThC,SAAS;+BACE,CAAG,EAAA,iBAAiB,EAAE,EACpB,UAAA,EAAA,IAAI,WACP,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,CAAC,EAGjE,aAAA,EAAA,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6jCAAA,EAAA,MAAA,EAAA,CAAA,2TAAA,CAAA,EAAA,CAAA;;;MEnBpC,iBAAiB,CAAA;iIAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;kIAAjB,iBAAiB,EAAA,OAAA,EAAA,CAFlB,oBAAoB,CAAA,EAAA,OAAA,EAAA,CADpB,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;AAGnB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAFlB,oBAAoB,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAEnB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA,CAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-popconfirm.mjs","sources":["../../../../lib/ng-nest/ui/popconfirm/popconfirm.property.ts","../../../../lib/ng-nest/ui/popconfirm/popconfirm.component.ts","../../../../lib/ng-nest/ui/popconfirm/popconfirm.component.html","../../../../lib/ng-nest/ui/popconfirm/popconfirm.module.ts","../../../../lib/ng-nest/ui/popconfirm/ng-nest-ui-popconfirm.ts"],"sourcesContent":["import { XPropertyFunction, XToCssPixelValue, XToBoolean } from '@ng-nest/ui/core';\r\nimport { Component, input, output } from '@angular/core';\r\nimport { Observable } from 'rxjs';\r\nimport type { XPopoverTrigger } from '@ng-nest/ui/popover';\r\nimport type { XPlacement, XTemplate, XBoolean, XNumber } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Popconfirm\r\n * @selector x-popconfirm\r\n * @decorator component\r\n */\r\nexport const XPopconfirmPrefix = 'x-popconfirm';\r\nconst X_POPCONFIRM_CONFIG_NAME = 'popconfirm';\r\n\r\n/**\r\n * Popconfirm Property\r\n */\r\n@Component({ selector: `${XPopconfirmPrefix}-property`, template: '' })\r\nexport class XPopconfirmProperty extends XPropertyFunction(X_POPCONFIRM_CONFIG_NAME) {\r\n /**\r\n * @zh_CN 标题,支持自定义模板\r\n * @en_US Title, support custom template\r\n */\r\n readonly title = input<XTemplate>('');\r\n /**\r\n * @zh_CN 内容,支持自定义模板\r\n * @en_US Content, support custom templates\r\n */\r\n readonly content = input<XTemplate>('');\r\n /**\r\n * @zh_CN 弹出的位置\r\n * @en_US Pop-up position\r\n */\r\n readonly placement = input<XPlacement>(this.config?.placement ?? 'bottom');\r\n /**\r\n * @zh_CN 激活方式\r\n * @en_US Activation method\r\n */\r\n readonly trigger = input<XPopoverTrigger>(this.config?.trigger ?? 'click');\r\n /**\r\n * @zh_CN 宽度\r\n * @en_US width\r\n */\r\n readonly width = input<string, XNumber>(this.config?.width ?? '', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 最大宽度\r\n * @en_US Max width\r\n */\r\n readonly maxWidth = input<string, XNumber>(this.config?.maxWidth ?? '15rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 最小宽度\r\n * @en_US Min width\r\n */\r\n readonly minWidth = input<string, XNumber>(this.config?.minWidth ?? '15rem', { transform: XToCssPixelValue });\r\n /**\r\n * @zh_CN 图标\r\n * @en_US Icon\r\n */\r\n readonly icon = input<string>(this.config?.icon ?? 'fto-help-circle');\r\n /**\r\n * @zh_CN 图标颜色\r\n * @en_US Icon color\r\n */\r\n readonly iconColor = input<string>(this.config?.iconColor ?? '#e6a23c');\r\n /**\r\n * @zh_CN 取消的文字\r\n * @en_US Canceled text\r\n */\r\n readonly cancelText = input<string>(this.config?.cancelText ?? '');\r\n /**\r\n * @zh_CN 确认的文字\r\n * @en_US Confirmed text\r\n */\r\n readonly confirmText = input<string>(this.config?.confirmText ?? '');\r\n /**\r\n * @zh_CN 确认异步 Observable\r\n * @en_US Confirm async\r\n */\r\n readonly confirmAsync = input<Observable<void>>();\r\n /**\r\n * @zh_CN 条件触发\r\n * @en_US condition trigger\r\n */\r\n readonly condition = input<boolean, XBoolean>(false, { transform: XToBoolean });\r\n /**\r\n * @zh_CN 取消的点击事件\r\n * @en_US Cancelled click event\r\n */\r\n readonly cancel = output<Event>();\r\n /**\r\n * @zh_CN 确认的点击事件\r\n * @en_US Confirmed click event\r\n */\r\n readonly confirm = output<Event>();\r\n}\r\n","import {\r\n Component,\r\n ChangeDetectionStrategy,\r\n ViewEncapsulation,\r\n OnDestroy,\r\n inject,\r\n computed,\r\n signal\r\n} from '@angular/core';\r\nimport { XPopconfirmProperty, XPopconfirmPrefix } from './popconfirm.property';\r\nimport { Subject } from 'rxjs';\r\nimport { XI18nService, XI18nPopconfirm, zh_CN } from '@ng-nest/ui/i18n';\r\nimport { map, takeUntil } from 'rxjs/operators';\r\nimport { XPopoverDirective } from '@ng-nest/ui/popover';\r\nimport { XButtonComponent } from '@ng-nest/ui/button';\r\nimport { XIconComponent } from '@ng-nest/ui/icon';\r\nimport { XOutletDirective } from '@ng-nest/ui/outlet';\r\nimport { toSignal } from '@angular/core/rxjs-interop';\r\n\r\n@Component({\r\n selector: `${XPopconfirmPrefix}`,\r\n standalone: true,\r\n imports: [XPopoverDirective, XButtonComponent, XIconComponent, XOutletDirective],\r\n templateUrl: './popconfirm.component.html',\r\n styleUrls: ['./popconfirm.component.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XPopconfirmComponent extends XPopconfirmProperty implements OnDestroy {\r\n private i18n = inject(XI18nService);\r\n visible = signal(false);\r\n loading = signal(false);\r\n\r\n private asyncUnSub = new Subject<void>();\r\n\r\n locale = toSignal(this.i18n.localeChange.pipe(map((x) => x.popconfirm as XI18nPopconfirm)), {\r\n initialValue: zh_CN.popconfirm\r\n });\r\n\r\n cancelTextSignal = computed(() => this.cancelText() || this.locale().cancelText);\r\n confirmTextSignal = computed(() => this.confirmText() || this.locale().confirmText);\r\n\r\n ngOnDestroy(): void {\r\n this.asyncUnSub.next();\r\n this.asyncUnSub.complete();\r\n }\r\n\r\n onCancel(event: Event) {\r\n this.visible.set(false);\r\n this.cancel.emit(event);\r\n }\r\n\r\n onConfirm(event: Event) {\r\n const confirmAsync = this.confirmAsync();\r\n if (confirmAsync) {\r\n this.loading.set(true);\r\n confirmAsync.pipe(takeUntil(this.asyncUnSub)).subscribe(() => {\r\n this.loading.set(false);\r\n this.visible.set(false);\r\n this.confirm.emit(event);\r\n this.asyncUnSub.next();\r\n });\r\n } else {\r\n this.visible.set(false);\r\n this.confirm.emit(event);\r\n }\r\n }\r\n\r\n onClick(event: Event) {\r\n this.condition() && this.onConfirm(event);\r\n }\r\n}\r\n","<div\r\n #popconfirm\r\n class=\"x-popconfirm\"\r\n x-popover\r\n [title]=\"titleTpl\"\r\n [content]=\"content()\"\r\n [footer]=\"footerTpl\"\r\n [placement]=\"placement()\"\r\n [trigger]=\"trigger()\"\r\n [width]=\"width()\"\r\n [maxWidth]=\"maxWidth()\"\r\n [minWidth]=\"minWidth()\"\r\n [condition]=\"condition()\"\r\n [(visible)]=\"visible\"\r\n (click)=\"onClick($event)\"\r\n>\r\n <ng-content></ng-content>\r\n</div>\r\n\r\n<ng-template #titleTpl>\r\n <div class=\"x-popconfirm-title\">\r\n <ng-container *xOutlet=\"title()\">\r\n @if (icon()) {\r\n <x-icon [style.color]=\"iconColor()\" [type]=\"icon()\"></x-icon>\r\n }\r\n <span>{{ title() }}</span>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #footerTpl>\r\n <div class=\"x-popconfirm-buttons\">\r\n <x-button class=\"x-popconfirm-cancel\" (click)=\"onCancel($event)\" flat plain>{{ cancelTextSignal() }}</x-button>\r\n <x-button class=\"x-popconfirm-confirm\" type=\"primary\" flat (click)=\"onConfirm($event)\" [loading]=\"loading()\">{{\r\n confirmTextSignal()\r\n }}</x-button>\r\n </div>\r\n</ng-template>\r\n","import { NgModule } from '@angular/core';\r\nimport { XPopconfirmComponent } from './popconfirm.component';\r\n\r\n@NgModule({\r\n exports: [XPopconfirmComponent],\r\n imports: [XPopconfirmComponent]\r\n})\r\nexport class XPopconfirmModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAMA;;;;AAIG;AACI,MAAM,iBAAiB,GAAG,eAAe;AAChD,MAAM,wBAAwB,GAAG,YAAY,CAAC;AAE9C;;AAEG;MAEU,mBAAoB,SAAQ,iBAAiB,CAAC,wBAAwB,CAAC,CAAA;AADpF,IAAA,WAAA,GAAA;;AAEE;;;AAGG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAY,EAAE,CAAC,CAAC;AACtC;;;AAGG;AACM,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAY,EAAE,CAAC,CAAC;AACxC;;;AAGG;QACM,IAAS,CAAA,SAAA,GAAG,KAAK,CAAa,IAAI,CAAC,MAAM,EAAE,SAAS,IAAI,QAAQ,CAAC,CAAC;AAC3E;;;AAGG;QACM,IAAO,CAAA,OAAA,GAAG,KAAK,CAAkB,IAAI,CAAC,MAAM,EAAE,OAAO,IAAI,OAAO,CAAC,CAAC;AAC3E;;;AAGG;AACM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