ngx-rs-ant 1.4.2 → 1.4.5
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.
- package/data-grid/file-cell-template/file-cell-template.component.d.ts +1 -1
- package/esm2020/data-grid/file-cell-template/file-cell-template.component.mjs +19 -6
- package/fesm2015/ngx-rs-ant.mjs +18 -5
- package/fesm2015/ngx-rs-ant.mjs.map +1 -1
- package/fesm2020/ngx-rs-ant.mjs +18 -5
- package/fesm2020/ngx-rs-ant.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ export declare class FileCellTemplateComponent {
|
|
|
13
13
|
loading: boolean;
|
|
14
14
|
constructor(service: DataGridService, domSanitizer: DomSanitizer);
|
|
15
15
|
ngOnInit(): void;
|
|
16
|
-
preview(): void;
|
|
16
|
+
preview(tooltip: any): void;
|
|
17
17
|
download(): void;
|
|
18
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<FileCellTemplateComponent, never>;
|
|
19
19
|
static ɵcmp: i0.ɵɵComponentDeclaration<FileCellTemplateComponent, "rs-file-cell-template", never, { "table": "table"; "oid": "oid"; }, {}, never, never, false, never>;
|
|
@@ -40,7 +40,7 @@ export class FileCellTemplateComponent {
|
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
preview() {
|
|
43
|
+
preview(tooltip) {
|
|
44
44
|
if (!window.coast.tabManager) {
|
|
45
45
|
notify_warning('此操作仅能在coast-web项目中执行,type:preview');
|
|
46
46
|
return;
|
|
@@ -50,10 +50,23 @@ export class FileCellTemplateComponent {
|
|
|
50
50
|
id: 'preview:' + this.oid,
|
|
51
51
|
title: this.filename,
|
|
52
52
|
config: {
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
config: {
|
|
54
|
+
direction: "row",
|
|
55
|
+
list: [{
|
|
56
|
+
type: "plugin",
|
|
57
|
+
style: {},
|
|
58
|
+
config: {
|
|
59
|
+
name: "coast-file-preview",
|
|
60
|
+
pluginConfig: {
|
|
61
|
+
id: this.oid,
|
|
62
|
+
name: this.filename
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}]
|
|
66
|
+
}
|
|
55
67
|
}
|
|
56
68
|
});
|
|
69
|
+
tooltip.instance.hide();
|
|
57
70
|
}
|
|
58
71
|
download() {
|
|
59
72
|
this.loading = true;
|
|
@@ -65,13 +78,13 @@ export class FileCellTemplateComponent {
|
|
|
65
78
|
}
|
|
66
79
|
}
|
|
67
80
|
FileCellTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FileCellTemplateComponent, deps: [{ token: i1.DataGridService }, { token: i2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
68
|
-
FileCellTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: FileCellTemplateComponent, selector: "rs-file-cell-template", inputs: { table: "table", oid: "oid" }, ngImport: i0, template: "<dx-button #fileBtn type=\"default\" stylingMode=\"text\">\n <i class=\"coast-icon-file-{{icon}}\" style=\"padding-right: 4px;\"></i>\n {{ filename }}\n <dx-tooltip [target]=\"fileBtn.instance.element()\"\n [position]=\"'top'\"\n [visible]=\"false\"\n [showEvent]=\"'click'\">\n <div *dxTemplate=\"let data of 'content'\">\n <div [innerHTML]=\"content\"></div>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-file\" text=\"\u9884\u89C8\"\n (onClick)=\"preview()\" [disabled]=\"loading\"></dx-button>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-download\" text=\"\u4E0B\u8F7D\"\n (onClick)=\"download()\" [disabled]=\"loading\"></dx-button>\n </div>\n </dx-tooltip>\n</dx-button><br/>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i4.DxButtonComponent, selector: "dx-button", inputs: ["accessKey", "activeStateEnabled", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "icon", "rtlEnabled", "stylingMode", "tabIndex", "template", "text", "type", "useSubmitBehavior", "validationGroup", "visible", "width"], outputs: ["onClick", "onContentReady", "onDisposing", "onInitialized", "onOptionChanged", "accessKeyChange", "activeStateEnabledChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "iconChange", "rtlEnabledChange", "stylingModeChange", "tabIndexChange", "templateChange", "textChange", "typeChange", "useSubmitBehaviorChange", "validationGroupChange", "visibleChange", "widthChange"] }, { kind: "component", type: i5.DxTooltipComponent, selector: "dx-tooltip", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showEvent", "target", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showEventChange", "targetChange", "visibleChange", "widthChange", "wrapperAttrChange"] }] });
|
|
81
|
+
FileCellTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: FileCellTemplateComponent, selector: "rs-file-cell-template", inputs: { table: "table", oid: "oid" }, ngImport: i0, template: "<dx-button #fileBtn type=\"default\" stylingMode=\"text\">\n <i class=\"coast-icon-file-{{icon}}\" style=\"padding-right: 4px;\"></i>\n {{ filename }}\n <dx-tooltip #tooltip\n [target]=\"fileBtn.instance.element()\"\n [position]=\"'top'\"\n [visible]=\"false\"\n [showEvent]=\"'click'\">\n <div *dxTemplate=\"let data of 'content'\">\n <div [innerHTML]=\"content\"></div>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-file\" text=\"\u9884\u89C8\"\n (onClick)=\"preview(tooltip)\" [disabled]=\"loading\"></dx-button>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-download\" text=\"\u4E0B\u8F7D\"\n (onClick)=\"download()\" [disabled]=\"loading\"></dx-button>\n </div>\n </dx-tooltip>\n</dx-button><br/>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i4.DxButtonComponent, selector: "dx-button", inputs: ["accessKey", "activeStateEnabled", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "icon", "rtlEnabled", "stylingMode", "tabIndex", "template", "text", "type", "useSubmitBehavior", "validationGroup", "visible", "width"], outputs: ["onClick", "onContentReady", "onDisposing", "onInitialized", "onOptionChanged", "accessKeyChange", "activeStateEnabledChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "iconChange", "rtlEnabledChange", "stylingModeChange", "tabIndexChange", "templateChange", "textChange", "typeChange", "useSubmitBehaviorChange", "validationGroupChange", "visibleChange", "widthChange"] }, { kind: "component", type: i5.DxTooltipComponent, selector: "dx-tooltip", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showEvent", "target", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showEventChange", "targetChange", "visibleChange", "widthChange", "wrapperAttrChange"] }] });
|
|
69
82
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FileCellTemplateComponent, decorators: [{
|
|
70
83
|
type: Component,
|
|
71
|
-
args: [{ selector: 'rs-file-cell-template', template: "<dx-button #fileBtn type=\"default\" stylingMode=\"text\">\n <i class=\"coast-icon-file-{{icon}}\" style=\"padding-right: 4px;\"></i>\n {{ filename }}\n <dx-tooltip [target]=\"fileBtn.instance.element()\"\n [position]=\"'top'\"\n [visible]=\"false\"\n [showEvent]=\"'click'\">\n <div *dxTemplate=\"let data of 'content'\">\n <div [innerHTML]=\"content\"></div>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-file\" text=\"\u9884\u89C8\"\n (onClick)=\"preview()\" [disabled]=\"loading\"></dx-button>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-download\" text=\"\u4E0B\u8F7D\"\n (onClick)=\"download()\" [disabled]=\"loading\"></dx-button>\n </div>\n </dx-tooltip>\n</dx-button><br/>\n" }]
|
|
84
|
+
args: [{ selector: 'rs-file-cell-template', template: "<dx-button #fileBtn type=\"default\" stylingMode=\"text\">\n <i class=\"coast-icon-file-{{icon}}\" style=\"padding-right: 4px;\"></i>\n {{ filename }}\n <dx-tooltip #tooltip\n [target]=\"fileBtn.instance.element()\"\n [position]=\"'top'\"\n [visible]=\"false\"\n [showEvent]=\"'click'\">\n <div *dxTemplate=\"let data of 'content'\">\n <div [innerHTML]=\"content\"></div>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-file\" text=\"\u9884\u89C8\"\n (onClick)=\"preview(tooltip)\" [disabled]=\"loading\"></dx-button>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-download\" text=\"\u4E0B\u8F7D\"\n (onClick)=\"download()\" [disabled]=\"loading\"></dx-button>\n </div>\n </dx-tooltip>\n</dx-button><br/>\n" }]
|
|
72
85
|
}], ctorParameters: function () { return [{ type: i1.DataGridService }, { type: i2.DomSanitizer }]; }, propDecorators: { table: [{
|
|
73
86
|
type: Input
|
|
74
87
|
}], oid: [{
|
|
75
88
|
type: Input
|
|
76
89
|
}] } });
|
|
77
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
90
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZS1jZWxsLXRlbXBsYXRlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1ycy1hbnQvc3JjL2RhdGEtZ3JpZC9maWxlLWNlbGwtdGVtcGxhdGUvZmlsZS1jZWxsLXRlbXBsYXRlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1ycy1hbnQvc3JjL2RhdGEtZ3JpZC9maWxlLWNlbGwtdGVtcGxhdGUvZmlsZS1jZWxsLXRlbXBsYXRlLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxTQUFTLEVBQUUsS0FBSyxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBRy9DLE9BQU8sRUFBQyxhQUFhLEVBQUUsY0FBYyxFQUFFLGdCQUFnQixFQUFFLGNBQWMsRUFBQyxNQU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mb3JtYXRfZmlsZV9zaXplKHRoaXMuZmlsZS5maWxlU2l6ZSl9PC90ZD5cclxuICAgICAgICAgICAgICAgICAgICA8L3RyPlxyXG4gICAgICAgICAgICAgICAgICAgIDx0cj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPHRkIHN0eWxlPVwidGV4dC1hbGlnbjogcmlnaHQ7XCI+5pe26Ze077yaPC90ZD5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPHRkIHN0eWxlPVwidGV4dC1hbGlnbjogbGVmdDtcIj4ke3RoaXMuZmlsZS5tb2RpZnlUaW1lfTwvdGQ+XHJcbiAgICAgICAgICAgICAgICAgICAgPC90cj5cclxuICAgICAgICAgICAgICAgIDwvdGFibGU+XHJcbiAgICAgIGApO1xyXG4gICAgICB0aGlzLmljb24gPSBmaWxlX3R5cGVfaWNvbih0aGlzLmZpbGVuYW1lKTtcclxuICAgICAgLy8g6YeN57uY6KGo5qC85a696auYXHJcbiAgICAgIHNldFRpbWVvdXQoKCkgPT4ge1xyXG4gICAgICAgIC8vdGhpcy50YWJsZS5yZXNpemUoKTtcclxuICAgICAgICB0aGlzLnNlcnZpY2UuY2VsbFRlbXBsYXRlTG9hZGVkJC5lbWl0KCk7XHJcbiAgICAgIH0pO1xyXG4gICAgfSk7XHJcbiAgfVxyXG5cclxuICBwcmV2aWV3KHRvb2x0aXA6IGFueSkge1xyXG4gICAgaWYgKCEod2luZG93IGFzIGFueSkuY29hc3QudGFiTWFuYWdlcikge1xyXG4gICAgICBub3RpZnlfd2FybmluZygn5q2k5pON5L2c5LuF6IO95ZyoY29hc3Qtd2Vi6aG555uu5Lit5omn6KGM77yMdHlwZe+8mnByZXZpZXcnKTtcclxuICAgICAgcmV0dXJuO1xyXG4gICAgfVxyXG4gICAgKHdpbmRvdyBhcyBhbnkpLmNvYXN0LnRhYk1hbmFnZXIuYWRkLm5leHQoe1xyXG4gICAgICB0eXBlOiAncHJldmlldycsXHJcbiAgICAgIGlkOiAncHJldmlldzonICsgdGhpcy5vaWQsXHJcbiAgICAgIHRpdGxlOiB0aGlzLmZpbGVuYW1lLFxyXG4gICAgICBjb25maWc6IHtcclxuICAgICAgICBjb25maWc6IHtcclxuICAgICAgICAgIGRpcmVjdGlvbjogXCJyb3dcIixcclxuICAgICAgICAgIGxpc3Q6IFt7XHJcbiAgICAgICAgICAgIHR5cGU6IFwicGx1Z2luXCIsXHJcbiAgICAgICAgICAgIHN0eWxlOiB7fSxcclxuICAgICAgICAgICAgY29uZmlnOiB7XHJcbiAgICAgICAgICAgICAgbmFtZTogXCJjb2FzdC1maWxlLXByZXZpZXdcIixcclxuICAgICAgICAgICAgICBwbHVnaW5Db25maWc6IHtcclxuICAgICAgICAgICAgICAgIGlkOiB0aGlzLm9pZCxcclxuICAgICAgICAgICAgICAgIG5hbWU6IHRoaXMuZmlsZW5hbWVcclxuICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgIH1dXHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9KTtcclxuICAgIHRvb2x0aXAuaW5zdGFuY2UuaGlkZSgpO1xyXG4gIH1cclxuXHJcbiAgZG93bmxvYWQoKSB7XHJcbiAgICB0aGlzLmxvYWRpbmcgPSB0cnVlO1xyXG4gICAgdGhpcy5zZXJ2aWNlLmRvd25sb2FkQXR0YWNobWVudCh0aGlzLm9pZCkuc3Vic2NyaWJlKGJsb2IgPT4ge1xyXG4gICAgICBkb3dubG9hZF9maWxlKGJsb2IsIHRoaXMuZmlsZW5hbWUsICgpID0+IHtcclxuICAgICAgICB0aGlzLmxvYWRpbmcgPSBmYWxzZTtcclxuICAgICAgfSk7XHJcbiAgICB9KTtcclxuICB9XHJcbn1cclxuIiwiPGR4LWJ1dHRvbiAjZmlsZUJ0biB0eXBlPVwiZGVmYXVsdFwiIHN0eWxpbmdNb2RlPVwidGV4dFwiPlxuICA8aSBjbGFzcz1cImNvYXN0LWljb24tZmlsZS17e2ljb259fVwiIHN0eWxlPVwicGFkZGluZy1yaWdodDogNHB4O1wiPjwvaT5cbiAge3sgZmlsZW5hbWUgfX1cbiAgPGR4LXRvb2x0aXAgI3Rvb2x0aXBcbiAgICAgICAgICAgICAgW3RhcmdldF09XCJmaWxlQnRuLmluc3RhbmNlLmVsZW1lbnQoKVwiXG4gICAgICAgICAgICAgIFtwb3NpdGlvbl09XCIndG9wJ1wiXG4gICAgICAgICAgICAgIFt2aXNpYmxlXT1cImZhbHNlXCJcbiAgICAgICAgICAgICAgW3Nob3dFdmVudF09XCInY2xpY2snXCI+XG4gICAgPGRpdiAqZHhUZW1wbGF0ZT1cImxldCBkYXRhIG9mICdjb250ZW50J1wiPlxuICAgICAgPGRpdiBbaW5uZXJIVE1MXT1cImNvbnRlbnRcIj48L2Rpdj5cbiAgICAgIDxkeC1idXR0b24gdHlwZT1cImRlZmF1bHRcIiBzdHlsaW5nTW9kZT1cInRleHRcIiBpY29uPVwiY29hc3QtaWNvbiBjb2FzdC1pY29uLWZpbGVcIiB0ZXh0PVwi6aKE6KeIXCJcbiAgICAgICAgICAgICAgICAgKG9uQ2xpY2spPVwicHJldmlldyh0b29sdGlwKVwiIFtkaXNhYmxlZF09XCJsb2FkaW5nXCI+PC9keC1idXR0b24+XG4gICAgICA8ZHgtYnV0dG9uIHR5cGU9XCJkZWZhdWx0XCIgc3R5bGluZ01vZGU9XCJ0ZXh0XCIgaWNvbj1cImNvYXN0LWljb24gY29hc3QtaWNvbi1kb3dubG9hZFwiIHRleHQ9XCLkuIvovb1cIlxuICAgICAgICAgICAgICAgICAob25DbGljayk9XCJkb3dubG9hZCgpXCIgW2Rpc2FibGVkXT1cImxvYWRpbmdcIj48L2R4LWJ1dHRvbj5cbiAgICA8L2Rpdj5cbiAgPC9keC10b29sdGlwPlxuPC9keC1idXR0b24+PGJyLz5cbiJdfQ==
|
package/fesm2015/ngx-rs-ant.mjs
CHANGED
|
@@ -2631,7 +2631,7 @@ class FileCellTemplateComponent {
|
|
|
2631
2631
|
});
|
|
2632
2632
|
});
|
|
2633
2633
|
}
|
|
2634
|
-
preview() {
|
|
2634
|
+
preview(tooltip) {
|
|
2635
2635
|
if (!window.coast.tabManager) {
|
|
2636
2636
|
notify_warning('此操作仅能在coast-web项目中执行,type:preview');
|
|
2637
2637
|
return;
|
|
@@ -2641,10 +2641,23 @@ class FileCellTemplateComponent {
|
|
|
2641
2641
|
id: 'preview:' + this.oid,
|
|
2642
2642
|
title: this.filename,
|
|
2643
2643
|
config: {
|
|
2644
|
-
|
|
2645
|
-
|
|
2644
|
+
config: {
|
|
2645
|
+
direction: "row",
|
|
2646
|
+
list: [{
|
|
2647
|
+
type: "plugin",
|
|
2648
|
+
style: {},
|
|
2649
|
+
config: {
|
|
2650
|
+
name: "coast-file-preview",
|
|
2651
|
+
pluginConfig: {
|
|
2652
|
+
id: this.oid,
|
|
2653
|
+
name: this.filename
|
|
2654
|
+
}
|
|
2655
|
+
}
|
|
2656
|
+
}]
|
|
2657
|
+
}
|
|
2646
2658
|
}
|
|
2647
2659
|
});
|
|
2660
|
+
tooltip.instance.hide();
|
|
2648
2661
|
}
|
|
2649
2662
|
download() {
|
|
2650
2663
|
this.loading = true;
|
|
@@ -2656,10 +2669,10 @@ class FileCellTemplateComponent {
|
|
|
2656
2669
|
}
|
|
2657
2670
|
}
|
|
2658
2671
|
FileCellTemplateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FileCellTemplateComponent, deps: [{ token: DataGridService }, { token: i2$2.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
|
|
2659
|
-
FileCellTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: FileCellTemplateComponent, selector: "rs-file-cell-template", inputs: { table: "table", oid: "oid" }, ngImport: i0, template: "<dx-button #fileBtn type=\"default\" stylingMode=\"text\">\n <i class=\"coast-icon-file-{{icon}}\" style=\"padding-right: 4px;\"></i>\n {{ filename }}\n <dx-tooltip [target]=\"fileBtn.instance.element()\"\n [position]=\"'top'\"\n [visible]=\"false\"\n [showEvent]=\"'click'\">\n <div *dxTemplate=\"let data of 'content'\">\n <div [innerHTML]=\"content\"></div>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-file\" text=\"\u9884\u89C8\"\n (onClick)=\"preview()\" [disabled]=\"loading\"></dx-button>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-download\" text=\"\u4E0B\u8F7D\"\n (onClick)=\"download()\" [disabled]=\"loading\"></dx-button>\n </div>\n </dx-tooltip>\n</dx-button><br/>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i4.DxButtonComponent, selector: "dx-button", inputs: ["accessKey", "activeStateEnabled", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "icon", "rtlEnabled", "stylingMode", "tabIndex", "template", "text", "type", "useSubmitBehavior", "validationGroup", "visible", "width"], outputs: ["onClick", "onContentReady", "onDisposing", "onInitialized", "onOptionChanged", "accessKeyChange", "activeStateEnabledChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "iconChange", "rtlEnabledChange", "stylingModeChange", "tabIndexChange", "templateChange", "textChange", "typeChange", "useSubmitBehaviorChange", "validationGroupChange", "visibleChange", "widthChange"] }, { kind: "component", type: i5.DxTooltipComponent, selector: "dx-tooltip", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showEvent", "target", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showEventChange", "targetChange", "visibleChange", "widthChange", "wrapperAttrChange"] }] });
|
|
2672
|
+
FileCellTemplateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: FileCellTemplateComponent, selector: "rs-file-cell-template", inputs: { table: "table", oid: "oid" }, ngImport: i0, template: "<dx-button #fileBtn type=\"default\" stylingMode=\"text\">\n <i class=\"coast-icon-file-{{icon}}\" style=\"padding-right: 4px;\"></i>\n {{ filename }}\n <dx-tooltip #tooltip\n [target]=\"fileBtn.instance.element()\"\n [position]=\"'top'\"\n [visible]=\"false\"\n [showEvent]=\"'click'\">\n <div *dxTemplate=\"let data of 'content'\">\n <div [innerHTML]=\"content\"></div>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-file\" text=\"\u9884\u89C8\"\n (onClick)=\"preview(tooltip)\" [disabled]=\"loading\"></dx-button>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-download\" text=\"\u4E0B\u8F7D\"\n (onClick)=\"download()\" [disabled]=\"loading\"></dx-button>\n </div>\n </dx-tooltip>\n</dx-button><br/>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "component", type: i4.DxButtonComponent, selector: "dx-button", inputs: ["accessKey", "activeStateEnabled", "disabled", "elementAttr", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "icon", "rtlEnabled", "stylingMode", "tabIndex", "template", "text", "type", "useSubmitBehavior", "validationGroup", "visible", "width"], outputs: ["onClick", "onContentReady", "onDisposing", "onInitialized", "onOptionChanged", "accessKeyChange", "activeStateEnabledChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "heightChange", "hintChange", "hoverStateEnabledChange", "iconChange", "rtlEnabledChange", "stylingModeChange", "tabIndexChange", "templateChange", "textChange", "typeChange", "useSubmitBehaviorChange", "validationGroupChange", "visibleChange", "widthChange"] }, { kind: "component", type: i5.DxTooltipComponent, selector: "dx-tooltip", inputs: ["animation", "closeOnOutsideClick", "container", "contentTemplate", "copyRootClassesToWrapper", "deferRendering", "disabled", "elementAttr", "height", "hideEvent", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "rtlEnabled", "shading", "shadingColor", "showEvent", "target", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onShowing", "onShown", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "copyRootClassesToWrapperChange", "deferRenderingChange", "disabledChange", "elementAttrChange", "heightChange", "hideEventChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showEventChange", "targetChange", "visibleChange", "widthChange", "wrapperAttrChange"] }] });
|
|
2660
2673
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: FileCellTemplateComponent, decorators: [{
|
|
2661
2674
|
type: Component,
|
|
2662
|
-
args: [{ selector: 'rs-file-cell-template', template: "<dx-button #fileBtn type=\"default\" stylingMode=\"text\">\n <i class=\"coast-icon-file-{{icon}}\" style=\"padding-right: 4px;\"></i>\n {{ filename }}\n <dx-tooltip [target]=\"fileBtn.instance.element()\"\n [position]=\"'top'\"\n [visible]=\"false\"\n [showEvent]=\"'click'\">\n <div *dxTemplate=\"let data of 'content'\">\n <div [innerHTML]=\"content\"></div>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-file\" text=\"\u9884\u89C8\"\n (onClick)=\"preview()\" [disabled]=\"loading\"></dx-button>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-download\" text=\"\u4E0B\u8F7D\"\n (onClick)=\"download()\" [disabled]=\"loading\"></dx-button>\n </div>\n </dx-tooltip>\n</dx-button><br/>\n" }]
|
|
2675
|
+
args: [{ selector: 'rs-file-cell-template', template: "<dx-button #fileBtn type=\"default\" stylingMode=\"text\">\n <i class=\"coast-icon-file-{{icon}}\" style=\"padding-right: 4px;\"></i>\n {{ filename }}\n <dx-tooltip #tooltip\n [target]=\"fileBtn.instance.element()\"\n [position]=\"'top'\"\n [visible]=\"false\"\n [showEvent]=\"'click'\">\n <div *dxTemplate=\"let data of 'content'\">\n <div [innerHTML]=\"content\"></div>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-file\" text=\"\u9884\u89C8\"\n (onClick)=\"preview(tooltip)\" [disabled]=\"loading\"></dx-button>\n <dx-button type=\"default\" stylingMode=\"text\" icon=\"coast-icon coast-icon-download\" text=\"\u4E0B\u8F7D\"\n (onClick)=\"download()\" [disabled]=\"loading\"></dx-button>\n </div>\n </dx-tooltip>\n</dx-button><br/>\n" }]
|
|
2663
2676
|
}], ctorParameters: function () { return [{ type: DataGridService }, { type: i2$2.DomSanitizer }]; }, propDecorators: { table: [{
|
|
2664
2677
|
type: Input
|
|
2665
2678
|
}], oid: [{
|