@ng-nest/ui 13.1.4 → 13.1.7

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 (82) hide show
  1. package/auto-complete/auto-complete.component.d.ts +1 -0
  2. package/auto-complete/auto-complete.property.d.ts +6 -1
  3. package/core/config/config.d.ts +6 -0
  4. package/dialog/dialog.component.d.ts +3 -5
  5. package/dialog/dialog.property.d.ts +10 -5
  6. package/dropdown/dropdown-portal.component.d.ts +2 -0
  7. package/dropdown/dropdown.component.d.ts +1 -0
  8. package/dropdown/dropdown.module.d.ts +2 -1
  9. package/dropdown/dropdown.property.d.ts +11 -1
  10. package/esm2020/auto-complete/auto-complete.component.mjs +25 -10
  11. package/esm2020/auto-complete/auto-complete.property.mjs +8 -2
  12. package/esm2020/core/config/config.mjs +1 -1
  13. package/esm2020/core/interfaces/identify.type.mjs +1 -1
  14. package/esm2020/description/description.component.mjs +3 -3
  15. package/esm2020/dialog/dialog-portal.component.mjs +8 -3
  16. package/esm2020/dialog/dialog-ref.mjs +3 -1
  17. package/esm2020/dialog/dialog.component.mjs +24 -27
  18. package/esm2020/dialog/dialog.property.mjs +10 -3
  19. package/esm2020/dialog/dialog.service.mjs +5 -2
  20. package/esm2020/dropdown/dropdown-portal.component.mjs +10 -4
  21. package/esm2020/dropdown/dropdown.component.mjs +8 -1
  22. package/esm2020/dropdown/dropdown.module.mjs +5 -4
  23. package/esm2020/dropdown/dropdown.property.mjs +11 -2
  24. package/esm2020/list/list.component.mjs +4 -4
  25. package/esm2020/menu/menu.component.mjs +3 -3
  26. package/esm2020/resizable/resizable.directive.mjs +10 -4
  27. package/esm2020/table/table-body.component.mjs +14 -7
  28. package/esm2020/table/table.component.mjs +65 -17
  29. package/esm2020/table/table.module.mjs +5 -1
  30. package/esm2020/table/table.property.mjs +44 -3
  31. package/esm2020/upload/upload.component.mjs +9 -4
  32. package/esm2020/upload/upload.property.mjs +15 -3
  33. package/fesm2015/ng-nest-ui-auto-complete.mjs +31 -10
  34. package/fesm2015/ng-nest-ui-auto-complete.mjs.map +1 -1
  35. package/fesm2015/ng-nest-ui-core.mjs.map +1 -1
  36. package/fesm2015/ng-nest-ui-description.mjs +2 -2
  37. package/fesm2015/ng-nest-ui-description.mjs.map +1 -1
  38. package/fesm2015/ng-nest-ui-dialog.mjs +46 -32
  39. package/fesm2015/ng-nest-ui-dialog.mjs.map +1 -1
  40. package/fesm2015/ng-nest-ui-dropdown.mjs +32 -9
  41. package/fesm2015/ng-nest-ui-dropdown.mjs.map +1 -1
  42. package/fesm2015/ng-nest-ui-list.mjs +3 -3
  43. package/fesm2015/ng-nest-ui-list.mjs.map +1 -1
  44. package/fesm2015/ng-nest-ui-menu.mjs +2 -2
  45. package/fesm2015/ng-nest-ui-menu.mjs.map +1 -1
  46. package/fesm2015/ng-nest-ui-resizable.mjs +9 -3
  47. package/fesm2015/ng-nest-ui-resizable.mjs.map +1 -1
  48. package/fesm2015/ng-nest-ui-table.mjs +124 -22
  49. package/fesm2015/ng-nest-ui-table.mjs.map +1 -1
  50. package/fesm2015/ng-nest-ui-upload.mjs +22 -5
  51. package/fesm2015/ng-nest-ui-upload.mjs.map +1 -1
  52. package/fesm2020/ng-nest-ui-auto-complete.mjs +31 -10
  53. package/fesm2020/ng-nest-ui-auto-complete.mjs.map +1 -1
  54. package/fesm2020/ng-nest-ui-core.mjs.map +1 -1
  55. package/fesm2020/ng-nest-ui-description.mjs +2 -2
  56. package/fesm2020/ng-nest-ui-description.mjs.map +1 -1
  57. package/fesm2020/ng-nest-ui-dialog.mjs +45 -31
  58. package/fesm2020/ng-nest-ui-dialog.mjs.map +1 -1
  59. package/fesm2020/ng-nest-ui-dropdown.mjs +32 -9
  60. package/fesm2020/ng-nest-ui-dropdown.mjs.map +1 -1
  61. package/fesm2020/ng-nest-ui-list.mjs +3 -3
  62. package/fesm2020/ng-nest-ui-list.mjs.map +1 -1
  63. package/fesm2020/ng-nest-ui-menu.mjs +2 -2
  64. package/fesm2020/ng-nest-ui-menu.mjs.map +1 -1
  65. package/fesm2020/ng-nest-ui-resizable.mjs +9 -3
  66. package/fesm2020/ng-nest-ui-resizable.mjs.map +1 -1
  67. package/fesm2020/ng-nest-ui-table.mjs +122 -22
  68. package/fesm2020/ng-nest-ui-table.mjs.map +1 -1
  69. package/fesm2020/ng-nest-ui-upload.mjs +22 -5
  70. package/fesm2020/ng-nest-ui-upload.mjs.map +1 -1
  71. package/package.json +1 -1
  72. package/resizable/resizable.directive.d.ts +1 -0
  73. package/style/core/index.css +3 -0
  74. package/style/core/index.css.map +1 -1
  75. package/style/directives/resizable/mixin.scss +5 -0
  76. package/table/examples/en_US/default/expand/README.md +8 -0
  77. package/table/examples/zh_CN/default/expand/README.md +8 -0
  78. package/table/table-body.component.d.ts +1 -0
  79. package/table/table.component.d.ts +10 -2
  80. package/table/table.module.d.ts +5 -4
  81. package/table/table.property.d.ts +60 -5
  82. package/upload/upload.property.d.ts +16 -1
@@ -170,10 +170,10 @@ class XDescriptionComponent extends XDescriptionProperty {
170
170
  }
171
171
  }
172
172
  /** @nocollapse */ /** @nocollapse */ XDescriptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: XDescriptionComponent, deps: [{ token: i1.XConfigService }], target: i0.ɵɵFactoryTarget.Component });
173
- /** @nocollapse */ /** @nocollapse */ XDescriptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: XDescriptionComponent, selector: "x-description", queries: [{ propertyName: "items", predicate: XDescriptionItemComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"x-description\" [class.x-description-bordered]=\"bordered\" [ngClass]=\"classMap\">\r\n <div class=\"x-description-header\">\r\n <div class=\"x-description-title\" *xOutlet=\"title\">\r\n {{ title }}\r\n </div>\r\n </div>\r\n <div class=\"x-description-grid\" [style.grid-template-columns]=\"gridTemplateColumns\">\r\n <div\r\n *ngFor=\"let item of items; index as i\"\r\n class=\"x-description-item\"\r\n [style.grid-area]=\"item.gridArea ? item.gridArea : '1 / ' + (i + 1)\"\r\n [class.x-description-item-heading]=\"item.heading\"\r\n [ngClass]=\"setFlex(item)\"\r\n >\r\n <div class=\"x-description-item-label\">\r\n <ng-container *xOutlet=\"item.label\">{{ item.label }}</ng-container>\r\n </div>\r\n <div class=\"x-description-item-content\">\r\n <ng-template [ngTemplateOutlet]=\"item.content\"></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".x-description{margin:0;padding:0}.x-description-header{display:flex;align-items:center}.x-description-title{font-weight:700}.x-description-grid{display:grid;grid-auto-flow:row}.x-description-item{display:flex;align-items:baseline}.x-description-item.x-flex{display:flex}.x-description-item.x-justify-start{justify-content:flex-start}.x-description-item.x-justify-center{justify-content:center}.x-description-item.x-justify-end{justify-content:flex-end}.x-description-item.x-justify-space-between{justify-content:space-between}.x-description-item.x-justify-space-around{justify-content:space-around}.x-description-item.x-align-start{align-items:flex-start}.x-description-item.x-align-center{align-items:center}.x-description-item.x-align-end{align-items:flex-end}.x-description-item.x-direction-column{flex-direction:column}.x-description-item.x-direction-column-reverse{flex-direction:column-reverse}.x-description-item.x-direction-row{flex-direction:row}.x-description-item.x-direction-row-reverse{flex-direction:row-reverse}.x-description-item-heading{background-color:var(--x-background-a100)}.x-description-bordered .x-description-item{border:var(--x-border-width) var(--x-border-style) var(--x-border);margin-left:-1px;margin-top:-1px}.x-description-big .x-description-header{padding:var(--x-padding-big) 0}.x-description-big .x-description-item{padding:calc(var(--x-padding-big) / 2) 0}.x-description-big.x-description-bordered .x-description-item{padding:var(--x-padding-big)}.x-description-large .x-description-header{padding:var(--x-padding-large) 0}.x-description-large .x-description-item{padding:calc(var(--x-padding-large) / 2) 0}.x-description-large.x-description-bordered .x-description-item{padding:var(--x-padding-large)}.x-description-medium .x-description-header{padding:var(--x-padding-medium) 0}.x-description-medium .x-description-item{padding:calc(var(--x-padding-medium) / 2) 0}.x-description-medium.x-description-bordered .x-description-item{padding:var(--x-padding-medium)}.x-description-small .x-description-header{padding:var(--x-padding-small) 0}.x-description-small .x-description-item{padding:calc(var(--x-padding-small) / 2) 0}.x-description-small.x-description-bordered .x-description-item{padding:var(--x-padding-small)}.x-description-mini .x-description-header{padding:var(--x-padding-mini) 0}.x-description-mini .x-description-item{padding:calc(var(--x-padding-mini) / 2) 0}.x-description-mini.x-description-bordered .x-description-item{padding:var(--x-padding-mini)}\n"], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
173
+ /** @nocollapse */ /** @nocollapse */ XDescriptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: XDescriptionComponent, selector: "x-description", queries: [{ propertyName: "items", predicate: XDescriptionItemComponent }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"x-description\" [class.x-description-bordered]=\"bordered\" [ngClass]=\"classMap\">\r\n <div class=\"x-description-header\" *ngIf=\"title\">\r\n <div class=\"x-description-title\" *xOutlet=\"title\">\r\n {{ title }}\r\n </div>\r\n </div>\r\n <div class=\"x-description-grid\" [style.grid-template-columns]=\"gridTemplateColumns\">\r\n <div\r\n *ngFor=\"let item of items; index as i\"\r\n class=\"x-description-item\"\r\n [style.grid-area]=\"item.gridArea ? item.gridArea : '1 / ' + (i + 1)\"\r\n [class.x-description-item-heading]=\"item.heading\"\r\n [ngClass]=\"setFlex(item)\"\r\n >\r\n <div class=\"x-description-item-label\">\r\n <ng-container *xOutlet=\"item.label\">{{ item.label }}</ng-container>\r\n </div>\r\n <div class=\"x-description-item-content\">\r\n <ng-template [ngTemplateOutlet]=\"item.content\"></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".x-description{margin:0;padding:0}.x-description-header{display:flex;align-items:center}.x-description-title{font-weight:700}.x-description-grid{display:grid;grid-auto-flow:row}.x-description-item{display:flex;align-items:baseline}.x-description-item.x-flex{display:flex}.x-description-item.x-justify-start{justify-content:flex-start}.x-description-item.x-justify-center{justify-content:center}.x-description-item.x-justify-end{justify-content:flex-end}.x-description-item.x-justify-space-between{justify-content:space-between}.x-description-item.x-justify-space-around{justify-content:space-around}.x-description-item.x-align-start{align-items:flex-start}.x-description-item.x-align-center{align-items:center}.x-description-item.x-align-end{align-items:flex-end}.x-description-item.x-direction-column{flex-direction:column}.x-description-item.x-direction-column-reverse{flex-direction:column-reverse}.x-description-item.x-direction-row{flex-direction:row}.x-description-item.x-direction-row-reverse{flex-direction:row-reverse}.x-description-item-heading{background-color:var(--x-background-a100)}.x-description-bordered .x-description-item{border:var(--x-border-width) var(--x-border-style) var(--x-border);margin-left:-1px;margin-top:-1px}.x-description-big .x-description-header{padding:var(--x-padding-big) 0}.x-description-big .x-description-item{padding:calc(var(--x-padding-big) / 2) 0}.x-description-big.x-description-bordered .x-description-item{padding:var(--x-padding-big)}.x-description-large .x-description-header{padding:var(--x-padding-large) 0}.x-description-large .x-description-item{padding:calc(var(--x-padding-large) / 2) 0}.x-description-large.x-description-bordered .x-description-item{padding:var(--x-padding-large)}.x-description-medium .x-description-header{padding:var(--x-padding-medium) 0}.x-description-medium .x-description-item{padding:calc(var(--x-padding-medium) / 2) 0}.x-description-medium.x-description-bordered .x-description-item{padding:var(--x-padding-medium)}.x-description-small .x-description-header{padding:var(--x-padding-small) 0}.x-description-small .x-description-item{padding:calc(var(--x-padding-small) / 2) 0}.x-description-small.x-description-bordered .x-description-item{padding:var(--x-padding-small)}.x-description-mini .x-description-header{padding:var(--x-padding-mini) 0}.x-description-mini .x-description-item{padding:calc(var(--x-padding-mini) / 2) 0}.x-description-mini.x-description-bordered .x-description-item{padding:var(--x-padding-mini)}\n"], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
174
174
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: XDescriptionComponent, decorators: [{
175
175
  type: Component,
176
- args: [{ selector: `${XDescriptionPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"x-description\" [class.x-description-bordered]=\"bordered\" [ngClass]=\"classMap\">\r\n <div class=\"x-description-header\">\r\n <div class=\"x-description-title\" *xOutlet=\"title\">\r\n {{ title }}\r\n </div>\r\n </div>\r\n <div class=\"x-description-grid\" [style.grid-template-columns]=\"gridTemplateColumns\">\r\n <div\r\n *ngFor=\"let item of items; index as i\"\r\n class=\"x-description-item\"\r\n [style.grid-area]=\"item.gridArea ? item.gridArea : '1 / ' + (i + 1)\"\r\n [class.x-description-item-heading]=\"item.heading\"\r\n [ngClass]=\"setFlex(item)\"\r\n >\r\n <div class=\"x-description-item-label\">\r\n <ng-container *xOutlet=\"item.label\">{{ item.label }}</ng-container>\r\n </div>\r\n <div class=\"x-description-item-content\">\r\n <ng-template [ngTemplateOutlet]=\"item.content\"></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".x-description{margin:0;padding:0}.x-description-header{display:flex;align-items:center}.x-description-title{font-weight:700}.x-description-grid{display:grid;grid-auto-flow:row}.x-description-item{display:flex;align-items:baseline}.x-description-item.x-flex{display:flex}.x-description-item.x-justify-start{justify-content:flex-start}.x-description-item.x-justify-center{justify-content:center}.x-description-item.x-justify-end{justify-content:flex-end}.x-description-item.x-justify-space-between{justify-content:space-between}.x-description-item.x-justify-space-around{justify-content:space-around}.x-description-item.x-align-start{align-items:flex-start}.x-description-item.x-align-center{align-items:center}.x-description-item.x-align-end{align-items:flex-end}.x-description-item.x-direction-column{flex-direction:column}.x-description-item.x-direction-column-reverse{flex-direction:column-reverse}.x-description-item.x-direction-row{flex-direction:row}.x-description-item.x-direction-row-reverse{flex-direction:row-reverse}.x-description-item-heading{background-color:var(--x-background-a100)}.x-description-bordered .x-description-item{border:var(--x-border-width) var(--x-border-style) var(--x-border);margin-left:-1px;margin-top:-1px}.x-description-big .x-description-header{padding:var(--x-padding-big) 0}.x-description-big .x-description-item{padding:calc(var(--x-padding-big) / 2) 0}.x-description-big.x-description-bordered .x-description-item{padding:var(--x-padding-big)}.x-description-large .x-description-header{padding:var(--x-padding-large) 0}.x-description-large .x-description-item{padding:calc(var(--x-padding-large) / 2) 0}.x-description-large.x-description-bordered .x-description-item{padding:var(--x-padding-large)}.x-description-medium .x-description-header{padding:var(--x-padding-medium) 0}.x-description-medium .x-description-item{padding:calc(var(--x-padding-medium) / 2) 0}.x-description-medium.x-description-bordered .x-description-item{padding:var(--x-padding-medium)}.x-description-small .x-description-header{padding:var(--x-padding-small) 0}.x-description-small .x-description-item{padding:calc(var(--x-padding-small) / 2) 0}.x-description-small.x-description-bordered .x-description-item{padding:var(--x-padding-small)}.x-description-mini .x-description-header{padding:var(--x-padding-mini) 0}.x-description-mini .x-description-item{padding:calc(var(--x-padding-mini) / 2) 0}.x-description-mini.x-description-bordered .x-description-item{padding:var(--x-padding-mini)}\n"] }]
176
+ args: [{ selector: `${XDescriptionPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"x-description\" [class.x-description-bordered]=\"bordered\" [ngClass]=\"classMap\">\r\n <div class=\"x-description-header\" *ngIf=\"title\">\r\n <div class=\"x-description-title\" *xOutlet=\"title\">\r\n {{ title }}\r\n </div>\r\n </div>\r\n <div class=\"x-description-grid\" [style.grid-template-columns]=\"gridTemplateColumns\">\r\n <div\r\n *ngFor=\"let item of items; index as i\"\r\n class=\"x-description-item\"\r\n [style.grid-area]=\"item.gridArea ? item.gridArea : '1 / ' + (i + 1)\"\r\n [class.x-description-item-heading]=\"item.heading\"\r\n [ngClass]=\"setFlex(item)\"\r\n >\r\n <div class=\"x-description-item-label\">\r\n <ng-container *xOutlet=\"item.label\">{{ item.label }}</ng-container>\r\n </div>\r\n <div class=\"x-description-item-content\">\r\n <ng-template [ngTemplateOutlet]=\"item.content\"></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".x-description{margin:0;padding:0}.x-description-header{display:flex;align-items:center}.x-description-title{font-weight:700}.x-description-grid{display:grid;grid-auto-flow:row}.x-description-item{display:flex;align-items:baseline}.x-description-item.x-flex{display:flex}.x-description-item.x-justify-start{justify-content:flex-start}.x-description-item.x-justify-center{justify-content:center}.x-description-item.x-justify-end{justify-content:flex-end}.x-description-item.x-justify-space-between{justify-content:space-between}.x-description-item.x-justify-space-around{justify-content:space-around}.x-description-item.x-align-start{align-items:flex-start}.x-description-item.x-align-center{align-items:center}.x-description-item.x-align-end{align-items:flex-end}.x-description-item.x-direction-column{flex-direction:column}.x-description-item.x-direction-column-reverse{flex-direction:column-reverse}.x-description-item.x-direction-row{flex-direction:row}.x-description-item.x-direction-row-reverse{flex-direction:row-reverse}.x-description-item-heading{background-color:var(--x-background-a100)}.x-description-bordered .x-description-item{border:var(--x-border-width) var(--x-border-style) var(--x-border);margin-left:-1px;margin-top:-1px}.x-description-big .x-description-header{padding:var(--x-padding-big) 0}.x-description-big .x-description-item{padding:calc(var(--x-padding-big) / 2) 0}.x-description-big.x-description-bordered .x-description-item{padding:var(--x-padding-big)}.x-description-large .x-description-header{padding:var(--x-padding-large) 0}.x-description-large .x-description-item{padding:calc(var(--x-padding-large) / 2) 0}.x-description-large.x-description-bordered .x-description-item{padding:var(--x-padding-large)}.x-description-medium .x-description-header{padding:var(--x-padding-medium) 0}.x-description-medium .x-description-item{padding:calc(var(--x-padding-medium) / 2) 0}.x-description-medium.x-description-bordered .x-description-item{padding:var(--x-padding-medium)}.x-description-small .x-description-header{padding:var(--x-padding-small) 0}.x-description-small .x-description-item{padding:calc(var(--x-padding-small) / 2) 0}.x-description-small.x-description-bordered .x-description-item{padding:var(--x-padding-small)}.x-description-mini .x-description-header{padding:var(--x-padding-mini) 0}.x-description-mini .x-description-item{padding:calc(var(--x-padding-mini) / 2) 0}.x-description-mini.x-description-bordered .x-description-item{padding:var(--x-padding-mini)}\n"] }]
177
177
  }], ctorParameters: function () { return [{ type: i1.XConfigService }]; }, propDecorators: { items: [{
178
178
  type: ContentChildren,
179
179
  args: [XDescriptionItemComponent]
@@ -1 +1 @@
1
- {"version":3,"file":"ng-nest-ui-description.mjs","sources":["../../../../lib/ng-nest/ui/description/description.property.ts","../../../../lib/ng-nest/ui/description/description-item.component.ts","../../../../lib/ng-nest/ui/description/description.component.ts","../../../../lib/ng-nest/ui/description/description.component.html","../../../../lib/ng-nest/ui/description/description.module.ts","../../../../lib/ng-nest/ui/description/ng-nest-ui-description.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\r\nimport { XAlign, XBoolean, XDirection, XInputBoolean, XJustify, XProperty, XSize, XTemplate, XWithConfig } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Description\r\n * @selector x-description\r\n * @decorator component\r\n */\r\nexport const XDescriptionPrefix = 'x-description';\r\nconst X_CONFIG_NAME = 'description';\r\n\r\n/**\r\n * Description Property\r\n */\r\n@Component({ template: '' })\r\nexport class XDescriptionProperty extends XProperty {\r\n /**\r\n * @zh_CN 描述列表的标题,支持自定义模板\r\n * @en_US Describe the title of the list, support custom template\r\n */\r\n @Input() title?: XTemplate;\r\n /**\r\n * @zh_CN 是否展示边框\r\n * @en_US Whether to show column borders\r\n */\r\n @Input() @XWithConfig<XBoolean>(X_CONFIG_NAME, false) @XInputBoolean() bordered!: XBoolean;\r\n /**\r\n * @zh_CN grid 布局下定义列宽度\r\n * @en_US Define column width under grid layout\r\n */\r\n @Input() gridTemplateColumns?: string;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n @Input() @XWithConfig<XSize>(X_CONFIG_NAME, 'medium') size!: XSize;\r\n}\r\n\r\n/**\r\n * Description Item\r\n * @selector x-description-item\r\n * @decorator component\r\n */\r\nexport const XDescriptionItemPrefix = 'x-description-item';\r\n\r\n/**\r\n * Description Item Property\r\n */\r\n@Component({ template: '' })\r\nexport class XDescriptionItemProperty {\r\n /**\r\n * @zh_CN 使用 grid 布局\r\n * @en_US Use grid layout to merge cells\r\n */\r\n @Input() gridArea?: string;\r\n /**\r\n * @zh_CN 内容的描述,支持自定义模板\r\n * @en_US Description of content, support custom templates\r\n */\r\n @Input() label?: XTemplate;\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US Child element under the horizontal arrangement of the layout flex\r\n */\r\n @Input() justify?: XJustify = 'start';\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US Child element under the vertical layout flex arrangement\r\n */\r\n @Input() align?: XAlign = 'start';\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US Child element under the direction of arrangement of the layout flex\r\n */\r\n @Input() direction?: XDirection = 'row';\r\n /**\r\n * @zh_CN 宽度\r\n * @en_US Width\r\n */\r\n @Input() width?: string;\r\n /**\r\n * @zh_CN flex 比重\r\n * @en_US Flex proportion\r\n */\r\n @Input() flex?: number;\r\n /**\r\n * @zh_CN 是否是标题\r\n * @en_US Whether it is heading\r\n */\r\n @Input() @XInputBoolean() heading: XBoolean = false;\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, TemplateRef } from '@angular/core';\r\nimport { XDescriptionItemPrefix, XDescriptionItemProperty } from './description.property';\r\n\r\n@Component({\r\n selector: `${XDescriptionItemPrefix}`,\r\n template: `\r\n <ng-template>\r\n <ng-content></ng-content>\r\n </ng-template>\r\n `,\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XDescriptionItemComponent extends XDescriptionItemProperty {\r\n @ViewChild(TemplateRef, { static: true }) content!: TemplateRef<void>;\r\n constructor() {\r\n super();\r\n }\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChildren, QueryList, SimpleChanges } from '@angular/core';\r\nimport { XDescriptionPrefix, XDescriptionProperty } from './description.property';\r\nimport { XClearClass, XConfigService, XIsChange, XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XDescriptionItemComponent } from './description-item.component';\r\n\r\n@Component({\r\n selector: `${XDescriptionPrefix}`,\r\n templateUrl: './description.component.html',\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XDescriptionComponent extends XDescriptionProperty {\r\n @ContentChildren(XDescriptionItemComponent) items!: QueryList<XDescriptionItemComponent>;\r\n constructor(public configService: XConfigService) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.setClassMap();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { size } = changes;\r\n XIsChange(size) && this.setClassMap();\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.setMerge();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.classMap);\r\n this.classMap = {\r\n [`${XDescriptionPrefix}-${this.size}`]: !XIsEmpty(this.size)\r\n };\r\n }\r\n\r\n setFlex(item: XDescriptionItemComponent) {\r\n let classes: { [property: string]: boolean } = {};\r\n if (!XIsEmpty(item.justify)) classes[`x-justify-${item.justify}`] = true;\r\n if (!XIsEmpty(item.align)) classes[`x-align-${item.align}`] = true;\r\n if (!XIsEmpty(item.direction)) classes[`x-direction-${item.direction}`] = true;\r\n return classes;\r\n }\r\n\r\n setMerge() {\r\n if (this.gridTemplateColumns) return;\r\n let gridTemplateColumns: string[] = [];\r\n this.items.forEach((x) => {\r\n if (x.width) {\r\n gridTemplateColumns.push(x.width);\r\n } else if (x.flex) {\r\n gridTemplateColumns.push(`${x.flex}fr`);\r\n }\r\n });\r\n this.gridTemplateColumns = gridTemplateColumns.join(' ');\r\n }\r\n}\r\n","<div class=\"x-description\" [class.x-description-bordered]=\"bordered\" [ngClass]=\"classMap\">\r\n <div class=\"x-description-header\">\r\n <div class=\"x-description-title\" *xOutlet=\"title\">\r\n {{ title }}\r\n </div>\r\n </div>\r\n <div class=\"x-description-grid\" [style.grid-template-columns]=\"gridTemplateColumns\">\r\n <div\r\n *ngFor=\"let item of items; index as i\"\r\n class=\"x-description-item\"\r\n [style.grid-area]=\"item.gridArea ? item.gridArea : '1 / ' + (i + 1)\"\r\n [class.x-description-item-heading]=\"item.heading\"\r\n [ngClass]=\"setFlex(item)\"\r\n >\r\n <div class=\"x-description-item-label\">\r\n <ng-container *xOutlet=\"item.label\">{{ item.label }}</ng-container>\r\n </div>\r\n <div class=\"x-description-item-content\">\r\n <ng-template [ngTemplateOutlet]=\"item.content\"></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XDescriptionItemComponent } from './description-item.component';\r\nimport { XDescriptionComponent } from './description.component';\r\nimport { XDescriptionItemProperty, XDescriptionProperty } from './description.property';\r\n\r\n@NgModule({\r\n declarations: [XDescriptionComponent, XDescriptionProperty, XDescriptionItemComponent, XDescriptionItemProperty],\r\n exports: [XDescriptionComponent, XDescriptionItemComponent],\r\n imports: [CommonModule, XOutletModule]\r\n})\r\nexport class XDescriptionModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAGA;;;;AAIG;AACI,MAAM,kBAAkB,GAAG,gBAAgB;AAClD,MAAM,aAAa,GAAG,aAAa,CAAC;AAEpC;;AAEG;AAEG,MAAO,oBAAqB,SAAQ,SAAS,CAAA;;uJAAtC,oBAAoB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,sCAAA,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,uLADV,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,CAAA;AAWgD,UAAA,CAAA;AAA7D,IAAA,WAAW,CAAW,aAAa,EAAE,KAAK,CAAC;AAAE,IAAA,aAAa,EAAE;CAAqB,EAAA,oBAAA,CAAA,SAAA,EAAA,UAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAUrC,UAAA,CAAA;AAA5C,IAAA,WAAW,CAAQ,aAAa,EAAE,QAAQ,CAAC;CAAc,EAAA,oBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,KAAA,CAAA,CAAA,CAAA;2FApBxD,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,SAAS;mBAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAA;8BAMhB,KAAK,EAAA,CAAA;sBAAb,KAAK;gBAKiE,QAAQ,EAAA,CAAA;sBAA9E,KAAK;gBAKG,mBAAmB,EAAA,CAAA;sBAA3B,KAAK;gBAKgD,IAAI,EAAA,CAAA;sBAAzD,KAAK;;AAGR;;;;AAIG;AACI,MAAM,sBAAsB,GAAG,qBAAqB;AAE3D;;AAEG;MA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C,qBAAqB,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,wBAAwB,CAAC;AAChH,oBAAA,OAAO,EAAE,CAAC,qBAAqB,EAAE,yBAAyB,CAAC;AAC3D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;iBACvC,CAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-nest-ui-description.mjs","sources":["../../../../lib/ng-nest/ui/description/description.property.ts","../../../../lib/ng-nest/ui/description/description-item.component.ts","../../../../lib/ng-nest/ui/description/description.component.ts","../../../../lib/ng-nest/ui/description/description.component.html","../../../../lib/ng-nest/ui/description/description.module.ts","../../../../lib/ng-nest/ui/description/ng-nest-ui-description.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\r\nimport { XAlign, XBoolean, XDirection, XInputBoolean, XJustify, XProperty, XSize, XTemplate, XWithConfig } from '@ng-nest/ui/core';\r\n\r\n/**\r\n * Description\r\n * @selector x-description\r\n * @decorator component\r\n */\r\nexport const XDescriptionPrefix = 'x-description';\r\nconst X_CONFIG_NAME = 'description';\r\n\r\n/**\r\n * Description Property\r\n */\r\n@Component({ template: '' })\r\nexport class XDescriptionProperty extends XProperty {\r\n /**\r\n * @zh_CN 描述列表的标题,支持自定义模板\r\n * @en_US Describe the title of the list, support custom template\r\n */\r\n @Input() title?: XTemplate;\r\n /**\r\n * @zh_CN 是否展示边框\r\n * @en_US Whether to show column borders\r\n */\r\n @Input() @XWithConfig<XBoolean>(X_CONFIG_NAME, false) @XInputBoolean() bordered!: XBoolean;\r\n /**\r\n * @zh_CN grid 布局下定义列宽度\r\n * @en_US Define column width under grid layout\r\n */\r\n @Input() gridTemplateColumns?: string;\r\n /**\r\n * @zh_CN 尺寸\r\n * @en_US Size\r\n */\r\n @Input() @XWithConfig<XSize>(X_CONFIG_NAME, 'medium') size!: XSize;\r\n}\r\n\r\n/**\r\n * Description Item\r\n * @selector x-description-item\r\n * @decorator component\r\n */\r\nexport const XDescriptionItemPrefix = 'x-description-item';\r\n\r\n/**\r\n * Description Item Property\r\n */\r\n@Component({ template: '' })\r\nexport class XDescriptionItemProperty {\r\n /**\r\n * @zh_CN 使用 grid 布局\r\n * @en_US Use grid layout to merge cells\r\n */\r\n @Input() gridArea?: string;\r\n /**\r\n * @zh_CN 内容的描述,支持自定义模板\r\n * @en_US Description of content, support custom templates\r\n */\r\n @Input() label?: XTemplate;\r\n /**\r\n * @zh_CN flex 布局下的子元素水平排列方式\r\n * @en_US Child element under the horizontal arrangement of the layout flex\r\n */\r\n @Input() justify?: XJustify = 'start';\r\n /**\r\n * @zh_CN flex 布局下的子元素垂直排列方式\r\n * @en_US Child element under the vertical layout flex arrangement\r\n */\r\n @Input() align?: XAlign = 'start';\r\n /**\r\n * @zh_CN flex 布局下的子元素排列方向\r\n * @en_US Child element under the direction of arrangement of the layout flex\r\n */\r\n @Input() direction?: XDirection = 'row';\r\n /**\r\n * @zh_CN 宽度\r\n * @en_US Width\r\n */\r\n @Input() width?: string;\r\n /**\r\n * @zh_CN flex 比重\r\n * @en_US Flex proportion\r\n */\r\n @Input() flex?: number;\r\n /**\r\n * @zh_CN 是否是标题\r\n * @en_US Whether it is heading\r\n */\r\n @Input() @XInputBoolean() heading: XBoolean = false;\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, TemplateRef } from '@angular/core';\r\nimport { XDescriptionItemPrefix, XDescriptionItemProperty } from './description.property';\r\n\r\n@Component({\r\n selector: `${XDescriptionItemPrefix}`,\r\n template: `\r\n <ng-template>\r\n <ng-content></ng-content>\r\n </ng-template>\r\n `,\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XDescriptionItemComponent extends XDescriptionItemProperty {\r\n @ViewChild(TemplateRef, { static: true }) content!: TemplateRef<void>;\r\n constructor() {\r\n super();\r\n }\r\n}\r\n","import { Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChildren, QueryList, SimpleChanges } from '@angular/core';\r\nimport { XDescriptionPrefix, XDescriptionProperty } from './description.property';\r\nimport { XClearClass, XConfigService, XIsChange, XIsEmpty } from '@ng-nest/ui/core';\r\nimport { XDescriptionItemComponent } from './description-item.component';\r\n\r\n@Component({\r\n selector: `${XDescriptionPrefix}`,\r\n templateUrl: './description.component.html',\r\n styleUrls: ['./style/index.scss'],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class XDescriptionComponent extends XDescriptionProperty {\r\n @ContentChildren(XDescriptionItemComponent) items!: QueryList<XDescriptionItemComponent>;\r\n constructor(public configService: XConfigService) {\r\n super();\r\n }\r\n\r\n ngOnInit() {\r\n this.setClassMap();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const { size } = changes;\r\n XIsChange(size) && this.setClassMap();\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.setMerge();\r\n }\r\n\r\n setClassMap() {\r\n XClearClass(this.classMap);\r\n this.classMap = {\r\n [`${XDescriptionPrefix}-${this.size}`]: !XIsEmpty(this.size)\r\n };\r\n }\r\n\r\n setFlex(item: XDescriptionItemComponent) {\r\n let classes: { [property: string]: boolean } = {};\r\n if (!XIsEmpty(item.justify)) classes[`x-justify-${item.justify}`] = true;\r\n if (!XIsEmpty(item.align)) classes[`x-align-${item.align}`] = true;\r\n if (!XIsEmpty(item.direction)) classes[`x-direction-${item.direction}`] = true;\r\n return classes;\r\n }\r\n\r\n setMerge() {\r\n if (this.gridTemplateColumns) return;\r\n let gridTemplateColumns: string[] = [];\r\n this.items.forEach((x) => {\r\n if (x.width) {\r\n gridTemplateColumns.push(x.width);\r\n } else if (x.flex) {\r\n gridTemplateColumns.push(`${x.flex}fr`);\r\n }\r\n });\r\n this.gridTemplateColumns = gridTemplateColumns.join(' ');\r\n }\r\n}\r\n","<div class=\"x-description\" [class.x-description-bordered]=\"bordered\" [ngClass]=\"classMap\">\r\n <div class=\"x-description-header\" *ngIf=\"title\">\r\n <div class=\"x-description-title\" *xOutlet=\"title\">\r\n {{ title }}\r\n </div>\r\n </div>\r\n <div class=\"x-description-grid\" [style.grid-template-columns]=\"gridTemplateColumns\">\r\n <div\r\n *ngFor=\"let item of items; index as i\"\r\n class=\"x-description-item\"\r\n [style.grid-area]=\"item.gridArea ? item.gridArea : '1 / ' + (i + 1)\"\r\n [class.x-description-item-heading]=\"item.heading\"\r\n [ngClass]=\"setFlex(item)\"\r\n >\r\n <div class=\"x-description-item-label\">\r\n <ng-container *xOutlet=\"item.label\">{{ item.label }}</ng-container>\r\n </div>\r\n <div class=\"x-description-item-content\">\r\n <ng-template [ngTemplateOutlet]=\"item.content\"></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { XOutletModule } from '@ng-nest/ui/outlet';\r\nimport { XDescriptionItemComponent } from './description-item.component';\r\nimport { XDescriptionComponent } from './description.component';\r\nimport { XDescriptionItemProperty, XDescriptionProperty } from './description.property';\r\n\r\n@NgModule({\r\n declarations: [XDescriptionComponent, XDescriptionProperty, XDescriptionItemComponent, XDescriptionItemProperty],\r\n exports: [XDescriptionComponent, XDescriptionItemComponent],\r\n imports: [CommonModule, XOutletModule]\r\n})\r\nexport class XDescriptionModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAGA;;;;AAIG;AACI,MAAM,kBAAkB,GAAG,gBAAgB;AAClD,MAAM,aAAa,GAAG,aAAa,CAAC;AAEpC;;AAEG;AAEG,MAAO,oBAAqB,SAAQ,SAAS,CAAA;;uJAAtC,oBAAoB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,sCAAA,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA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按钮的事件
63
+ * @en_US Confirm button event
64
+ */
65
+ this.close = new EventEmitter();
61
66
  /**
62
67
  * @zh_CN 显示/隐藏改变事件
63
68
  * @en_US Show/hide change events
@@ -76,7 +81,7 @@ class XDialogProperty extends XAlertProperty {
76
81
  }
77
82
  }
78
83
  /** @nocollapse */ /** @nocollapse */ XDialogProperty.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: XDialogProperty, deps: null, target: i0.ɵɵFactoryTarget.Component });
79
- /** @nocollapse */ /** @nocollapse */ XDialogProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: XDialogProperty, selector: "ng-component", inputs: { visible: "visible", placement: "placement", offset: "offset", type: "type", width: "width", height: "height", minWidth: "minWidth", minHeight: "minHeight", effect: "effect", footer: "footer", showCancel: "showCancel", cancelText: "cancelText", showConfirm: "showConfirm", confirmText: "confirmText", backdropClose: "backdropClose", hasBackdrop: "hasBackdrop", className: "className", buttonsCenter: "buttonsCenter", draggable: "draggable", resizable: "resizable", maximize: "maximize", beforeClose: "beforeClose" }, outputs: { cancel: "cancel", confirm: "confirm", visibleChange: "visibleChange", showDone: "showDone", closeDone: "closeDone" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
84
+ /** @nocollapse */ /** @nocollapse */ XDialogProperty.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: XDialogProperty, selector: "ng-component", inputs: { visible: "visible", placement: "placement", offset: "offset", type: "type", width: "width", height: "height", minWidth: "minWidth", minHeight: "minHeight", effect: "effect", footer: "footer", showCancel: "showCancel", cancelText: "cancelText", showConfirm: "showConfirm", confirmText: "confirmText", backdropClose: "backdropClose", hasBackdrop: "hasBackdrop", className: "className", buttonsCenter: "buttonsCenter", draggable: "draggable", resizable: "resizable", maximize: "maximize", beforeClose: "beforeClose" }, outputs: { cancel: "cancel", confirm: "confirm", close: "close", visibleChange: "visibleChange", showDone: "showDone", closeDone: "closeDone" }, usesInheritance: true, ngImport: i0, template: '', isInline: true });
80
85
  __decorate([
81
86
  XInputBoolean()
82
87
  ], XDialogProperty.prototype, "visible", void 0);
@@ -93,7 +98,7 @@ __decorate([
93
98
  XWithConfig(X_DIALOG_CONFIG_NAME, '18rem')
94
99
  ], XDialogProperty.prototype, "minWidth", void 0);
95
100
  __decorate([
96
- XWithConfig(X_DIALOG_CONFIG_NAME, '9rem')
101
+ XWithConfig(X_DIALOG_CONFIG_NAME, '8rem')
97
102
  ], XDialogProperty.prototype, "minHeight", void 0);
98
103
  __decorate([
99
104
  XWithConfig(X_DIALOG_CONFIG_NAME, 'white')
@@ -186,6 +191,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImpor
186
191
  type: Output
187
192
  }], confirm: [{
188
193
  type: Output
194
+ }], close: [{
195
+ type: Output
189
196
  }], visibleChange: [{
190
197
  type: Output
191
198
  }], showDone: [{
@@ -213,6 +220,7 @@ class XDialogComponent extends XDialogProperty {
213
220
  this.contentBox = {};
214
221
  this.distance = { x: 0, y: 0 };
215
222
  this.viewInit = false;
223
+ this.action = null;
216
224
  this._unSubject = new Subject();
217
225
  this.scrollStrategy = this.protalService.overlay.scrollStrategies.block();
218
226
  }
@@ -256,8 +264,7 @@ class XDialogComponent extends XDialogProperty {
256
264
  this.create();
257
265
  }
258
266
  else {
259
- this.detach();
260
- // this.visibleChange.emit(false);
267
+ this.onClose('close', false);
261
268
  }
262
269
  }
263
270
  create() {
@@ -299,7 +306,7 @@ class XDialogComponent extends XDialogProperty {
299
306
  });
300
307
  }
301
308
  if (this.hasBackdrop && this.backdropClose && ((_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.overlayRef)) {
302
- this.backdropClick$ = this.dialogRef.overlayRef.backdropClick().subscribe(() => this.onClose());
309
+ this.backdropClick$ = this.dialogRef.overlayRef.backdropClick().subscribe(() => this.onClose('close'));
303
310
  }
304
311
  }
305
312
  setWidthHeight() {
@@ -312,26 +319,31 @@ class XDialogComponent extends XDialogProperty {
312
319
  this.maximize = false;
313
320
  }
314
321
  }
315
- detach() {
316
- var _a, _b;
317
- if (this.portalAttached()) {
318
- this.visible = false;
319
- this.visibleChange.emit(this.visible);
320
- (_b = (_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.overlayRef) === null || _b === void 0 ? void 0 : _b.detach();
321
- this.unsubscribe();
322
- this.close.emit();
323
- }
324
- }
325
322
  portalAttached() {
326
323
  var _a, _b;
327
324
  return (_b = (_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.overlayRef) === null || _b === void 0 ? void 0 : _b.hasAttached();
328
325
  }
329
- onClose() {
330
- if (XIsFunction(this.beforeClose)) {
331
- this.beforeClose();
326
+ onClose(action, execFunction = true) {
327
+ var _a, _b;
328
+ if (!this.portalAttached())
329
+ return;
330
+ if (XIsFunction(this.beforeClose) && execFunction) {
331
+ this.beforeClose(action);
332
+ this.action = action;
332
333
  }
333
334
  else {
334
- this.detach();
335
+ this.visible = false;
336
+ this.visibleChange.emit(this.visible);
337
+ (_b = (_a = this.dialogRef) === null || _a === void 0 ? void 0 : _a.overlayRef) === null || _b === void 0 ? void 0 : _b.detach();
338
+ this.unsubscribe();
339
+ if ([action, this.action].includes('confirm')) {
340
+ this.confirm.emit();
341
+ }
342
+ if ([action, this.action].includes('cancel')) {
343
+ this.cancel.emit();
344
+ }
345
+ this.action = null;
346
+ this.close.emit();
335
347
  }
336
348
  }
337
349
  onDragEnded($event) {
@@ -397,14 +409,6 @@ class XDialogComponent extends XDialogProperty {
397
409
  }
398
410
  }
399
411
  }
400
- onCancel() {
401
- this.onClose();
402
- this.cancel.emit();
403
- }
404
- onConfirm() {
405
- this.onClose();
406
- this.confirm.emit();
407
- }
408
412
  moveDone($event) {
409
413
  var _a, _b;
410
414
  if ($event.toState === 'void') {
@@ -431,10 +435,10 @@ class XDialogComponent extends XDialogProperty {
431
435
  }
432
436
  }
433
437
  /** @nocollapse */ /** @nocollapse */ XDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: XDialogComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }, { token: i1.XPortalService }, { token: i2.Overlay }, { token: i3.XI18nService }], target: i0.ɵɵFactoryTarget.Component });
434
- /** @nocollapse */ /** @nocollapse */ XDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: XDialogComponent, selector: "x-dialog", viewQueries: [{ propertyName: "dialogTpl", first: true, predicate: ["dialogTpl"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-template #dialogTpl>\r\n <div\r\n class=\"x-dialog\"\r\n [@x-move-box-animation]=\"placement\"\r\n (@x-move-box-animation.done)=\"moveDone($event)\"\r\n [class.x-dialog-maximize]=\"isMaximize\"\r\n [class.x-dialog-resizable]=\"resizable\"\r\n [class.x-dialog-default-maximize]=\"isDefaultMaximize\"\r\n >\r\n <x-alert\r\n [draggable]=\"draggable && dialogBox['draggable']\"\r\n [resizable]=\"resizable && dialogBox['resizable']\"\r\n [dragFreeDragPosition]=\"dialogBox['distance']\"\r\n [offsetLeft]=\"offsetLeft\"\r\n [offsetTop]=\"offsetTop\"\r\n [minWidth]=\"dialogBox['minWidth']\"\r\n [minHeight]=\"dialogBox['minHeight']\"\r\n [dragBoundary]=\"'.cdk-overlay-container'\"\r\n [title]=\"title\"\r\n [content]=\"contentTpl\"\r\n [type]=\"type\"\r\n [effect]=\"effect\"\r\n [hideClose]=\"hideClose\"\r\n [closeText]=\"closeText\"\r\n [operationTpl]=\"operationTpl\"\r\n (close)=\"onClose()\"\r\n (dragEnded)=\"onDragEnded($event)\"\r\n (resizing)=\"onResizing($event)\"\r\n showIcon=\"false\"\r\n duration=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #contentTpl>\r\n <div class=\"x-dialog-inner\">\r\n <div class=\"x-dialog-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"x-dialog-buttons\" [class.x-dialog-buttons-center]=\"buttonsCenter\">\r\n <ng-container *xOutlet=\"footer\">\r\n <x-buttons space=\"1\" *ngIf=\"showCancel || showConfirm\">\r\n <x-button *ngIf=\"showCancel\" (click)=\"onCancel()\">{{ getCancelText }}</x-button>\r\n <x-button *ngIf=\"showConfirm\" type=\"primary\" (click)=\"onConfirm()\">{{ getConfirmText }}</x-button>\r\n </x-buttons>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #operationTpl>\r\n <ng-container *ngIf=\"maximize || resizable\">\r\n <x-button size=\"small\" [icon]=\"isMaximize ? 'fto-minimize' : 'fto-maximize'\" [onlyIcon]=\"true\" (click)=\"onSize()\"></x-button>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [".x-dialog{margin:0;padding:0;width:100%;height:100%}.x-dialog>x-alert{height:100%}.x-dialog>x-alert .x-alert{min-height:100%;height:-moz-fit-content;height:fit-content;align-items:inherit;padding:0}.x-dialog>x-alert .x-alert-inner{min-height:100%;display:flex;flex-direction:column}.x-dialog>x-alert .x-alert-title{padding:1rem 1rem 0}.x-dialog>x-alert .x-alert-content{flex:1;display:flex;flex-direction:column;padding:0 1rem .5rem}.x-dialog-inner{display:flex;flex-direction:column;margin:.5rem 0;flex:1}.x-dialog-buttons{display:flex;justify-content:flex-end}.x-dialog-buttons>x-buttons{margin-top:1rem;align-self:flex-end}.x-dialog-buttons-center{justify-content:center}.x-dialog-content{display:inline-flex;flex-direction:column;flex:1;max-height:70vh;overflow:auto;min-height:2rem}.x-dialog-maximize>x-alert .x-alert{left:0!important;top:0!important}.x-dialog-maximize .x-dialog-content{max-height:calc(100vh - 7rem)!important;height:calc(100vh - 7rem)!important}.x-dialog-default-maximize .x-dialog-content{max-height:calc(100vh - 7rem)!important;height:calc(100vh - 7rem)!important;flex:initial}.x-dialog-container x-dialog{width:100%}\n"], components: [{ type: i4.XAlertComponent, selector: "x-alert" }, { type: i5.XButtonsComponent, selector: "x-buttons" }, { type: i5.XButtonComponent, selector: "x-button" }], directives: [{ type: i6.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [XMoveBoxAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
438
+ /** @nocollapse */ /** @nocollapse */ XDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: XDialogComponent, selector: "x-dialog", viewQueries: [{ propertyName: "dialogTpl", first: true, predicate: ["dialogTpl"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<ng-template #dialogTpl>\r\n <div\r\n class=\"x-dialog\"\r\n [@x-move-box-animation]=\"placement\"\r\n (@x-move-box-animation.done)=\"moveDone($event)\"\r\n [class.x-dialog-maximize]=\"isMaximize\"\r\n [class.x-dialog-resizable]=\"resizable\"\r\n [class.x-dialog-default-maximize]=\"isDefaultMaximize\"\r\n >\r\n <x-alert\r\n [draggable]=\"draggable && dialogBox['draggable']\"\r\n [resizable]=\"resizable && dialogBox['resizable']\"\r\n [dragFreeDragPosition]=\"dialogBox['distance']\"\r\n [offsetLeft]=\"offsetLeft\"\r\n [offsetTop]=\"offsetTop\"\r\n [minWidth]=\"dialogBox['minWidth']\"\r\n [minHeight]=\"dialogBox['minHeight']\"\r\n [dragBoundary]=\"'.cdk-overlay-container'\"\r\n [title]=\"title\"\r\n [content]=\"contentTpl\"\r\n [type]=\"type\"\r\n [effect]=\"effect\"\r\n [hideClose]=\"hideClose\"\r\n [closeText]=\"closeText\"\r\n [operationTpl]=\"operationTpl\"\r\n (close)=\"onClose('close')\"\r\n (dragEnded)=\"onDragEnded($event)\"\r\n (resizing)=\"onResizing($event)\"\r\n showIcon=\"false\"\r\n duration=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #contentTpl>\r\n <div class=\"x-dialog-inner\">\r\n <div class=\"x-dialog-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"x-dialog-buttons\" [class.x-dialog-buttons-center]=\"buttonsCenter\">\r\n <ng-container *xOutlet=\"footer\">\r\n <x-buttons space=\"1\" *ngIf=\"showCancel || showConfirm\">\r\n <x-button *ngIf=\"showCancel\" (click)=\"onClose('cancel')\">{{ getCancelText }}</x-button>\r\n <x-button *ngIf=\"showConfirm\" type=\"primary\" (click)=\"onClose('confirm')\">{{ getConfirmText }}</x-button>\r\n </x-buttons>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #operationTpl>\r\n <ng-container *ngIf=\"maximize || resizable\">\r\n <x-button size=\"small\" [icon]=\"isMaximize ? 'fto-minimize' : 'fto-maximize'\" [onlyIcon]=\"true\" (click)=\"onSize()\"></x-button>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [".x-dialog{margin:0;padding:0;width:100%;height:100%}.x-dialog>x-alert{height:100%}.x-dialog>x-alert .x-alert{min-height:100%;height:-moz-fit-content;height:fit-content;align-items:inherit;padding:0}.x-dialog>x-alert .x-alert-inner{min-height:100%;display:flex;flex-direction:column}.x-dialog>x-alert .x-alert-title{padding:1rem 1rem 0}.x-dialog>x-alert .x-alert-content{flex:1;display:flex;flex-direction:column;padding:0 1rem .5rem}.x-dialog-inner{display:flex;flex-direction:column;margin:.5rem 0;flex:1}.x-dialog-buttons{display:flex;justify-content:flex-end}.x-dialog-buttons>x-buttons{margin-top:1rem;align-self:flex-end}.x-dialog-buttons-center{justify-content:center}.x-dialog-content{display:inline-flex;flex-direction:column;flex:1;max-height:70vh;overflow:auto;min-height:2rem}.x-dialog-maximize>x-alert .x-alert{left:0!important;top:0!important}.x-dialog-maximize .x-dialog-content{max-height:calc(100vh - 7rem)!important;height:calc(100vh - 7rem)!important}.x-dialog-default-maximize .x-dialog-content{max-height:calc(100vh - 7rem)!important;height:calc(100vh - 7rem)!important;flex:initial}.x-dialog-container x-dialog{width:100%}\n"], components: [{ type: i4.XAlertComponent, selector: "x-alert" }, { type: i5.XButtonsComponent, selector: "x-buttons" }, { type: i5.XButtonComponent, selector: "x-button" }], directives: [{ type: i6.XOutletDirective, selector: "[xOutlet]", inputs: ["xOutletContext", "xOutlet"] }, { type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [XMoveBoxAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
435
439
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: XDialogComponent, decorators: [{
436
440
  type: Component,
437
- args: [{ selector: `${XDialogPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [XMoveBoxAnimation], template: "<ng-template #dialogTpl>\r\n <div\r\n class=\"x-dialog\"\r\n [@x-move-box-animation]=\"placement\"\r\n (@x-move-box-animation.done)=\"moveDone($event)\"\r\n [class.x-dialog-maximize]=\"isMaximize\"\r\n [class.x-dialog-resizable]=\"resizable\"\r\n [class.x-dialog-default-maximize]=\"isDefaultMaximize\"\r\n >\r\n <x-alert\r\n [draggable]=\"draggable && dialogBox['draggable']\"\r\n [resizable]=\"resizable && dialogBox['resizable']\"\r\n [dragFreeDragPosition]=\"dialogBox['distance']\"\r\n [offsetLeft]=\"offsetLeft\"\r\n [offsetTop]=\"offsetTop\"\r\n [minWidth]=\"dialogBox['minWidth']\"\r\n [minHeight]=\"dialogBox['minHeight']\"\r\n [dragBoundary]=\"'.cdk-overlay-container'\"\r\n [title]=\"title\"\r\n [content]=\"contentTpl\"\r\n [type]=\"type\"\r\n [effect]=\"effect\"\r\n [hideClose]=\"hideClose\"\r\n [closeText]=\"closeText\"\r\n [operationTpl]=\"operationTpl\"\r\n (close)=\"onClose()\"\r\n (dragEnded)=\"onDragEnded($event)\"\r\n (resizing)=\"onResizing($event)\"\r\n showIcon=\"false\"\r\n duration=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #contentTpl>\r\n <div class=\"x-dialog-inner\">\r\n <div class=\"x-dialog-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"x-dialog-buttons\" [class.x-dialog-buttons-center]=\"buttonsCenter\">\r\n <ng-container *xOutlet=\"footer\">\r\n <x-buttons space=\"1\" *ngIf=\"showCancel || showConfirm\">\r\n <x-button *ngIf=\"showCancel\" (click)=\"onCancel()\">{{ getCancelText }}</x-button>\r\n <x-button *ngIf=\"showConfirm\" type=\"primary\" (click)=\"onConfirm()\">{{ getConfirmText }}</x-button>\r\n </x-buttons>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #operationTpl>\r\n <ng-container *ngIf=\"maximize || resizable\">\r\n <x-button size=\"small\" [icon]=\"isMaximize ? 'fto-minimize' : 'fto-maximize'\" [onlyIcon]=\"true\" (click)=\"onSize()\"></x-button>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [".x-dialog{margin:0;padding:0;width:100%;height:100%}.x-dialog>x-alert{height:100%}.x-dialog>x-alert .x-alert{min-height:100%;height:-moz-fit-content;height:fit-content;align-items:inherit;padding:0}.x-dialog>x-alert .x-alert-inner{min-height:100%;display:flex;flex-direction:column}.x-dialog>x-alert .x-alert-title{padding:1rem 1rem 0}.x-dialog>x-alert .x-alert-content{flex:1;display:flex;flex-direction:column;padding:0 1rem .5rem}.x-dialog-inner{display:flex;flex-direction:column;margin:.5rem 0;flex:1}.x-dialog-buttons{display:flex;justify-content:flex-end}.x-dialog-buttons>x-buttons{margin-top:1rem;align-self:flex-end}.x-dialog-buttons-center{justify-content:center}.x-dialog-content{display:inline-flex;flex-direction:column;flex:1;max-height:70vh;overflow:auto;min-height:2rem}.x-dialog-maximize>x-alert .x-alert{left:0!important;top:0!important}.x-dialog-maximize .x-dialog-content{max-height:calc(100vh - 7rem)!important;height:calc(100vh - 7rem)!important}.x-dialog-default-maximize .x-dialog-content{max-height:calc(100vh - 7rem)!important;height:calc(100vh - 7rem)!important;flex:initial}.x-dialog-container x-dialog{width:100%}\n"] }]
441
+ args: [{ selector: `${XDialogPrefix}`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [XMoveBoxAnimation], template: "<ng-template #dialogTpl>\r\n <div\r\n class=\"x-dialog\"\r\n [@x-move-box-animation]=\"placement\"\r\n (@x-move-box-animation.done)=\"moveDone($event)\"\r\n [class.x-dialog-maximize]=\"isMaximize\"\r\n [class.x-dialog-resizable]=\"resizable\"\r\n [class.x-dialog-default-maximize]=\"isDefaultMaximize\"\r\n >\r\n <x-alert\r\n [draggable]=\"draggable && dialogBox['draggable']\"\r\n [resizable]=\"resizable && dialogBox['resizable']\"\r\n [dragFreeDragPosition]=\"dialogBox['distance']\"\r\n [offsetLeft]=\"offsetLeft\"\r\n [offsetTop]=\"offsetTop\"\r\n [minWidth]=\"dialogBox['minWidth']\"\r\n [minHeight]=\"dialogBox['minHeight']\"\r\n [dragBoundary]=\"'.cdk-overlay-container'\"\r\n [title]=\"title\"\r\n [content]=\"contentTpl\"\r\n [type]=\"type\"\r\n [effect]=\"effect\"\r\n [hideClose]=\"hideClose\"\r\n [closeText]=\"closeText\"\r\n [operationTpl]=\"operationTpl\"\r\n (close)=\"onClose('close')\"\r\n (dragEnded)=\"onDragEnded($event)\"\r\n (resizing)=\"onResizing($event)\"\r\n showIcon=\"false\"\r\n duration=\"0\"\r\n manual\r\n disabledAnimation\r\n ></x-alert>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #contentTpl>\r\n <div class=\"x-dialog-inner\">\r\n <div class=\"x-dialog-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div class=\"x-dialog-buttons\" [class.x-dialog-buttons-center]=\"buttonsCenter\">\r\n <ng-container *xOutlet=\"footer\">\r\n <x-buttons space=\"1\" *ngIf=\"showCancel || showConfirm\">\r\n <x-button *ngIf=\"showCancel\" (click)=\"onClose('cancel')\">{{ getCancelText }}</x-button>\r\n <x-button *ngIf=\"showConfirm\" type=\"primary\" (click)=\"onClose('confirm')\">{{ getConfirmText }}</x-button>\r\n </x-buttons>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #operationTpl>\r\n <ng-container *ngIf=\"maximize || resizable\">\r\n <x-button size=\"small\" [icon]=\"isMaximize ? 'fto-minimize' : 'fto-maximize'\" [onlyIcon]=\"true\" (click)=\"onSize()\"></x-button>\r\n </ng-container>\r\n</ng-template>\r\n", styles: [".x-dialog{margin:0;padding:0;width:100%;height:100%}.x-dialog>x-alert{height:100%}.x-dialog>x-alert .x-alert{min-height:100%;height:-moz-fit-content;height:fit-content;align-items:inherit;padding:0}.x-dialog>x-alert .x-alert-inner{min-height:100%;display:flex;flex-direction:column}.x-dialog>x-alert .x-alert-title{padding:1rem 1rem 0}.x-dialog>x-alert .x-alert-content{flex:1;display:flex;flex-direction:column;padding:0 1rem .5rem}.x-dialog-inner{display:flex;flex-direction:column;margin:.5rem 0;flex:1}.x-dialog-buttons{display:flex;justify-content:flex-end}.x-dialog-buttons>x-buttons{margin-top:1rem;align-self:flex-end}.x-dialog-buttons-center{justify-content:center}.x-dialog-content{display:inline-flex;flex-direction:column;flex:1;max-height:70vh;overflow:auto;min-height:2rem}.x-dialog-maximize>x-alert .x-alert{left:0!important;top:0!important}.x-dialog-maximize .x-dialog-content{max-height:calc(100vh - 7rem)!important;height:calc(100vh - 7rem)!important}.x-dialog-default-maximize .x-dialog-content{max-height:calc(100vh - 7rem)!important;height:calc(100vh - 7rem)!important;flex:initial}.x-dialog-container x-dialog{width:100%}\n"] }]
438
442
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }, { type: i1.XPortalService }, { type: i2.Overlay }, { type: i3.XI18nService }]; }, propDecorators: { dialogTpl: [{
439
443
  type: ViewChild,
440
444
  args: ['dialogTpl', { static: false }]
@@ -467,6 +471,11 @@ class XDialogPortalComponent extends BasePortalOutlet {
467
471
  }
468
472
  ngAfterViewInit() {
469
473
  let list = new QueryList();
474
+ if (this.dialogRef.dragHandleRefs.length === 0) {
475
+ this.dialogBox['draggable'] = false;
476
+ this.option.draggable = false;
477
+ return;
478
+ }
470
479
  for (let item of this.dialogRef.dragHandleRefs) {
471
480
  list.reset([...list.toArray(), new CdkDragHandle(item, this.dragRef)]);
472
481
  }
@@ -497,10 +506,10 @@ class XDialogPortalComponent extends BasePortalOutlet {
497
506
  }
498
507
  }
499
508
  /** @nocollapse */ /** @nocollapse */ XDialogPortalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: XDialogPortalComponent, deps: [{ token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
500
- /** @nocollapse */ /** @nocollapse */ XDialogPortalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: XDialogPortalComponent, selector: "x-dialog-portal", host: { listeners: { "@x-move-box-animation.done": "done($event)", "@x-move-box-animation.start": "start($event)" }, properties: { "@x-move-box-animation": "this.placement" } }, queries: [{ propertyName: "handles", predicate: CdkDragHandle, descendants: true }], viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }, { propertyName: "dragRef", first: true, predicate: CdkDrag, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"x-dialog-portal\"\r\n #dragRef\r\n cdkDrag\r\n [cdkDragDisabled]=\"!option.draggable && !dialogBox['draggable']\"\r\n [cdkDragBoundary]=\"'.cdk-overlay-container'\"\r\n [cdkDragFreeDragPosition]=\"dialogBox['distance']\"\r\n [xResizable]=\"option.resizable && dialogBox['resizable']!\"\r\n (resizing)=\"resizing($event)\"\r\n (cdkDragEnded)=\"onDragEnded($event)\"\r\n [offsetLeft]=\"offsetLeft\"\r\n [offsetTop]=\"offsetTop\"\r\n [style.minWidth]=\"dialogBox['minWidth']\"\r\n [style.minHeight]=\"dialogBox['minHeight']\"\r\n [class.x-dialog-portal-fullscreen]=\"dialogRef.fullscreen\"\r\n>\r\n <ng-template cdkPortalOutlet></ng-template>\r\n</div>\r\n", styles: [".x-dialog-portal{margin:0;padding:0;width:100%;height:100%;display:block;padding:1rem;box-sizing:border-box;min-height:inherit;max-height:inherit;background-color:var(--x-background);box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color);border:.0625rem solid transparent;border-radius:var(--x-border-radius)}.x-dialog-portal-title{font-weight:600;color:var(--x-text-300);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:3rem;line-height:3rem;display:block;align-items:center;margin:-1rem -1rem 0;padding:0 1rem}.x-dialog-portal-content{display:block;margin:0 -1rem;padding:0 1rem;max-height:70vh;overflow:auto;color:var(--x-text-300);font-size:calc(var(--x-font-size) - .0625rem);line-height:1.325rem}.x-dialog-portal-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;box-sizing:content-box;margin:0 -1rem -1rem;padding:0 1rem;height:4rem}.x-dialog-portal-actions[align=center]{justify-content:center}.x-dialog-portal-actions[align=start]{justify-content:flex-start}.x-dialog-portal-actions x-button:not(:first-child){margin-left:1rem}.x-dialog-portal-drag-handle{cursor:move}.x-dialog-portal-fullscreen{left:0!important;top:0!important}.x-dialog-portal-fullscreen .x-dialog-portal-content{max-height:calc(100vh - 7rem)!important;height:calc(100vh - 7rem)!important}x-dialog-portal{width:100%;height:100%}\n"], directives: [{ type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i2$1.XResizableDirective, selector: "[xResizable]" }, { type: i3$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [XMoveBoxAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
509
+ /** @nocollapse */ /** @nocollapse */ XDialogPortalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.2", type: XDialogPortalComponent, selector: "x-dialog-portal", host: { listeners: { "@x-move-box-animation.done": "done($event)", "@x-move-box-animation.start": "start($event)" }, properties: { "@x-move-box-animation": "this.placement" } }, queries: [{ propertyName: "handles", predicate: CdkDragHandle, descendants: true }], viewQueries: [{ propertyName: "portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }, { propertyName: "dragRef", first: true, predicate: CdkDrag, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div\r\n class=\"x-dialog-portal\"\r\n #dragRef\r\n cdkDrag\r\n [cdkDragDisabled]=\"!option.draggable && !dialogBox['draggable']\"\r\n [cdkDragBoundary]=\"'.cdk-overlay-container'\"\r\n [cdkDragFreeDragPosition]=\"dialogBox['distance']\"\r\n [xResizable]=\"option.resizable && dialogBox['resizable']!\"\r\n (resizing)=\"resizing($event)\"\r\n (cdkDragEnded)=\"onDragEnded($event)\"\r\n [offsetLeft]=\"offsetLeft\"\r\n [offsetTop]=\"offsetTop\"\r\n [style.minWidth]=\"dialogBox['minWidth']\"\r\n [style.minHeight]=\"dialogBox['minHeight']\"\r\n>\r\n <ng-template cdkPortalOutlet></ng-template>\r\n</div>\r\n", styles: [".x-dialog-portal{margin:0;padding:0;width:100%;height:100%;display:block;padding:1rem;box-sizing:border-box;min-height:inherit;max-height:inherit;background-color:var(--x-background);box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color);border:.0625rem solid transparent;border-radius:var(--x-border-radius)}.x-dialog-portal-title{font-weight:600;color:var(--x-text-300);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:3rem;line-height:3rem;display:block;align-items:center;margin:-1rem -1rem 0;padding:0 1rem}.x-dialog-portal-content{display:block;margin:0 -1rem;padding:0 1rem;max-height:70vh;overflow:auto;color:var(--x-text-300);font-size:calc(var(--x-font-size) - .0625rem);line-height:1.325rem}.x-dialog-portal-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;box-sizing:content-box;margin:0 -1rem -1rem;padding:0 1rem;height:4rem}.x-dialog-portal-actions[align=center]{justify-content:center}.x-dialog-portal-actions[align=start]{justify-content:flex-start}.x-dialog-portal-actions x-button:not(:first-child){margin-left:1rem}.x-dialog-portal-drag-handle{cursor:move}.x-dialog-portal-fullscreen{margin:0!important}.x-dialog-portal-fullscreen .x-dialog-portal{left:0!important;top:0!important}.x-dialog-portal-fullscreen .x-dialog-portal-content{max-height:calc(100vh - 7rem)!important;height:calc(100vh - 7rem)!important}x-dialog-portal{width:100%;height:100%}\n"], directives: [{ type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { type: i2$1.XResizableDirective, selector: "[xResizable]" }, { type: i3$1.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [XMoveBoxAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
501
510
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: XDialogPortalComponent, decorators: [{
502
511
  type: Component,
503
- args: [{ selector: 'x-dialog-portal', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [XMoveBoxAnimation], template: "<div\r\n class=\"x-dialog-portal\"\r\n #dragRef\r\n cdkDrag\r\n [cdkDragDisabled]=\"!option.draggable && !dialogBox['draggable']\"\r\n [cdkDragBoundary]=\"'.cdk-overlay-container'\"\r\n [cdkDragFreeDragPosition]=\"dialogBox['distance']\"\r\n [xResizable]=\"option.resizable && dialogBox['resizable']!\"\r\n (resizing)=\"resizing($event)\"\r\n (cdkDragEnded)=\"onDragEnded($event)\"\r\n [offsetLeft]=\"offsetLeft\"\r\n [offsetTop]=\"offsetTop\"\r\n [style.minWidth]=\"dialogBox['minWidth']\"\r\n [style.minHeight]=\"dialogBox['minHeight']\"\r\n [class.x-dialog-portal-fullscreen]=\"dialogRef.fullscreen\"\r\n>\r\n <ng-template cdkPortalOutlet></ng-template>\r\n</div>\r\n", styles: [".x-dialog-portal{margin:0;padding:0;width:100%;height:100%;display:block;padding:1rem;box-sizing:border-box;min-height:inherit;max-height:inherit;background-color:var(--x-background);box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color);border:.0625rem solid transparent;border-radius:var(--x-border-radius)}.x-dialog-portal-title{font-weight:600;color:var(--x-text-300);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:3rem;line-height:3rem;display:block;align-items:center;margin:-1rem -1rem 0;padding:0 1rem}.x-dialog-portal-content{display:block;margin:0 -1rem;padding:0 1rem;max-height:70vh;overflow:auto;color:var(--x-text-300);font-size:calc(var(--x-font-size) - .0625rem);line-height:1.325rem}.x-dialog-portal-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;box-sizing:content-box;margin:0 -1rem -1rem;padding:0 1rem;height:4rem}.x-dialog-portal-actions[align=center]{justify-content:center}.x-dialog-portal-actions[align=start]{justify-content:flex-start}.x-dialog-portal-actions x-button:not(:first-child){margin-left:1rem}.x-dialog-portal-drag-handle{cursor:move}.x-dialog-portal-fullscreen{left:0!important;top:0!important}.x-dialog-portal-fullscreen .x-dialog-portal-content{max-height:calc(100vh - 7rem)!important;height:calc(100vh - 7rem)!important}x-dialog-portal{width:100%;height:100%}\n"] }]
512
+ args: [{ selector: 'x-dialog-portal', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [XMoveBoxAnimation], template: "<div\r\n class=\"x-dialog-portal\"\r\n #dragRef\r\n cdkDrag\r\n [cdkDragDisabled]=\"!option.draggable && !dialogBox['draggable']\"\r\n [cdkDragBoundary]=\"'.cdk-overlay-container'\"\r\n [cdkDragFreeDragPosition]=\"dialogBox['distance']\"\r\n [xResizable]=\"option.resizable && dialogBox['resizable']!\"\r\n (resizing)=\"resizing($event)\"\r\n (cdkDragEnded)=\"onDragEnded($event)\"\r\n [offsetLeft]=\"offsetLeft\"\r\n [offsetTop]=\"offsetTop\"\r\n [style.minWidth]=\"dialogBox['minWidth']\"\r\n [style.minHeight]=\"dialogBox['minHeight']\"\r\n>\r\n <ng-template cdkPortalOutlet></ng-template>\r\n</div>\r\n", styles: [".x-dialog-portal{margin:0;padding:0;width:100%;height:100%;display:block;padding:1rem;box-sizing:border-box;min-height:inherit;max-height:inherit;background-color:var(--x-background);box-shadow:var(--x-box-shadow) var(--x-box-shadow-light-color);border:.0625rem solid transparent;border-radius:var(--x-border-radius)}.x-dialog-portal-title{font-weight:600;color:var(--x-text-300);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:3rem;line-height:3rem;display:block;align-items:center;margin:-1rem -1rem 0;padding:0 1rem}.x-dialog-portal-content{display:block;margin:0 -1rem;padding:0 1rem;max-height:70vh;overflow:auto;color:var(--x-text-300);font-size:calc(var(--x-font-size) - .0625rem);line-height:1.325rem}.x-dialog-portal-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;box-sizing:content-box;margin:0 -1rem -1rem;padding:0 1rem;height:4rem}.x-dialog-portal-actions[align=center]{justify-content:center}.x-dialog-portal-actions[align=start]{justify-content:flex-start}.x-dialog-portal-actions x-button:not(:first-child){margin-left:1rem}.x-dialog-portal-drag-handle{cursor:move}.x-dialog-portal-fullscreen{margin:0!important}.x-dialog-portal-fullscreen .x-dialog-portal{left:0!important;top:0!important}.x-dialog-portal-fullscreen .x-dialog-portal-content{max-height:calc(100vh - 7rem)!important;height:calc(100vh - 7rem)!important}x-dialog-portal{width:100%;height:100%}\n"] }]
504
513
  }], ctorParameters: function () { return [{ type: i0.Renderer2 }]; }, propDecorators: { placement: [{
505
514
  type: HostBinding,
506
515
  args: ['@x-move-box-animation']
@@ -561,6 +570,7 @@ class XDialogRef {
561
570
  if (this.option.draggable) {
562
571
  dialogBox['distance'] = { x: 0, y: 0 };
563
572
  }
573
+ this.renderer.addClass(overlayElement, 'x-dialog-portal-fullscreen');
564
574
  }
565
575
  else {
566
576
  dialogBox['minWidth'] = this.option.minWidth;
@@ -597,6 +607,7 @@ class XDialogRef {
597
607
  this.renderer.setStyle(overlayElement, 'margin-bottom', `${dialogBox['marginBottom']}`);
598
608
  }
599
609
  }
610
+ this.renderer.removeClass(overlayElement, 'x-dialog-portal-fullscreen');
600
611
  if (this._isFristFullscreen && defaultMaximize) {
601
612
  (_b = dialogRef.overlayRef) === null || _b === void 0 ? void 0 : _b.updatePositionStrategy(this.portalService.setPlace(this.option.placement, this.option.offset));
602
613
  this.renderer.addClass(hostElement, PortalResizablePrefix);
@@ -750,7 +761,7 @@ class XDialogService {
750
761
  offset: '1rem',
751
762
  width: '32rem',
752
763
  minWidth: '18rem',
753
- minHeight: '9rem',
764
+ minHeight: '8rem',
754
765
  backdropClose: true,
755
766
  hasBackdrop: true,
756
767
  draggable: false,
@@ -814,6 +825,9 @@ class XDialogService {
814
825
  instance.dialogBox = dialogBox;
815
826
  });
816
827
  }
828
+ if (defaultMaximize) {
829
+ this.renderer.addClass(overlayElement, 'x-dialog-portal-fullscreen');
830
+ }
817
831
  if (content instanceof TemplateRef) {
818
832
  instance.attachTemplatePortal(new TemplatePortal(content, option.viewContainerRef, { $implicit: option.data, dialogRef: dialogRef }));
819
833
  }