@alauda-fe/dynamic-plugin-shared 0.0.4-alpha.20 → 0.0.4-alpha.21
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.
|
@@ -12681,11 +12681,11 @@ class K8sYamlDisplayDialogComponent {
|
|
|
12681
12681
|
this.data = inject(DIALOG_DATA);
|
|
12682
12682
|
}
|
|
12683
12683
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: K8sYamlDisplayDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12684
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: K8sYamlDisplayDialogComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<aui-dialog-header [divider]=\"false\">\n <div [class.ellipsis-dialog-header]=\"data.ellipsis\">\n <span [class.text-ellipsis]=\"data.ellipsis\">\n {{ data.title || ('view_yaml' | translate) }}\n </span>\n @if (data.extra) {\n <span class=\"extra\">{{ data.extra }}</span>\n }\n </div>\n</aui-dialog-header>\n<aui-dialog-content>\n <acl-resource-yaml-display\n [resource]=\"data.resource\"\n [hasWrapper]=\"false\"\n class=\"dialog-content\"\n ></acl-resource-yaml-display>\n</aui-dialog-content>\n", dependencies: [{ kind: "component", type: i1.DialogHeaderComponent, selector: "aui-dialog-header", inputs: ["divider", "closeable", "result"] }, { kind: "component", type: i1.DialogContentComponent, selector: "aui-dialog-content" }, { kind: "component", type: ResourceYamlDisplayComponent, selector: "acl-resource-yaml-display", inputs: ["hasWrapper", "showDebugInfo", "conciseEnable", "manageFieldActionEnable", "sidebarEnable", "schemaEnable", "exampleEnable", "autoFoldManagedFields", "schema", "resource", "minimap", "clusterName"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12684
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: K8sYamlDisplayDialogComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<aui-dialog-header [divider]=\"false\">\n <div [class.ellipsis-dialog-header]=\"data.ellipsis\">\n <span [class.text-ellipsis]=\"data.ellipsis\">\n {{ data.title || ('view_yaml' | translate) }}\n </span>\n @if (data.extra) {\n <span class=\"extra\">{{ data.extra }}</span>\n }\n </div>\n</aui-dialog-header>\n<aui-dialog-content>\n <acl-resource-yaml-display\n [resource]=\"data.resource\"\n [hasWrapper]=\"false\"\n [clusterName]=\"data.clusterName\"\n class=\"dialog-content\"\n ></acl-resource-yaml-display>\n</aui-dialog-content>\n", dependencies: [{ kind: "component", type: i1.DialogHeaderComponent, selector: "aui-dialog-header", inputs: ["divider", "closeable", "result"] }, { kind: "component", type: i1.DialogContentComponent, selector: "aui-dialog-content" }, { kind: "component", type: ResourceYamlDisplayComponent, selector: "acl-resource-yaml-display", inputs: ["hasWrapper", "showDebugInfo", "conciseEnable", "manageFieldActionEnable", "sidebarEnable", "schemaEnable", "exampleEnable", "autoFoldManagedFields", "schema", "resource", "minimap", "clusterName"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12685
12685
|
}
|
|
12686
12686
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: K8sYamlDisplayDialogComponent, decorators: [{
|
|
12687
12687
|
type: Component,
|
|
12688
|
-
args: [{ preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [DIALOG_MODULE, TranslatePipe, ResourceYamlDisplayComponent], template: "<aui-dialog-header [divider]=\"false\">\n <div [class.ellipsis-dialog-header]=\"data.ellipsis\">\n <span [class.text-ellipsis]=\"data.ellipsis\">\n {{ data.title || ('view_yaml' | translate) }}\n </span>\n @if (data.extra) {\n <span class=\"extra\">{{ data.extra }}</span>\n }\n </div>\n</aui-dialog-header>\n<aui-dialog-content>\n <acl-resource-yaml-display\n [resource]=\"data.resource\"\n [hasWrapper]=\"false\"\n class=\"dialog-content\"\n ></acl-resource-yaml-display>\n</aui-dialog-content>\n" }]
|
|
12688
|
+
args: [{ preserveWhitespaces: false, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [DIALOG_MODULE, TranslatePipe, ResourceYamlDisplayComponent], template: "<aui-dialog-header [divider]=\"false\">\n <div [class.ellipsis-dialog-header]=\"data.ellipsis\">\n <span [class.text-ellipsis]=\"data.ellipsis\">\n {{ data.title || ('view_yaml' | translate) }}\n </span>\n @if (data.extra) {\n <span class=\"extra\">{{ data.extra }}</span>\n }\n </div>\n</aui-dialog-header>\n<aui-dialog-content>\n <acl-resource-yaml-display\n [resource]=\"data.resource\"\n [hasWrapper]=\"false\"\n [clusterName]=\"data.clusterName\"\n class=\"dialog-content\"\n ></acl-resource-yaml-display>\n</aui-dialog-content>\n" }]
|
|
12689
12689
|
}] });
|
|
12690
12690
|
|
|
12691
12691
|
/**
|
|
@@ -13325,7 +13325,7 @@ class ResourceYamlSidebarComponent {
|
|
|
13325
13325
|
});
|
|
13326
13326
|
}
|
|
13327
13327
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ResourceYamlSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13328
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: ResourceYamlSidebarComponent, isStandalone: true, selector: "acl-resource-yaml-sidebar", inputs: { resource: "resource", schema: "schema", schemaEnable: "schemaEnable", exampleEnable: "exampleEnable", extraExamples: "extraExamples" }, outputs: { close: "close", tryYaml: "tryYaml" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"schema-header\">\n <span>{{ resourceKind }}</span>\n <aui-icon\n icon=\"xmark\"\n (click)=\"close.next()\"\n ></aui-icon>\n</div>\n<aui-tab-group type=\"card\">\n @if (schemaEnable && hasSchema) {\n <aui-tab>\n <ng-container *auiTabLabel> Schema </ng-container>\n <ng-container *auiTabContent>\n @if (schema) {\n <div class=\"schema-content\">\n <div class=\"schema-path\">\n @if (path.length) {\n <a\n href=\"javascript:\"\n (click)=\"refresh()\"\n >{{ resourceKind }}</a\n >\n }\n @for (p of path; track p; let i = $index; let isLast = $last) {\n @if (!isLast) {\n <span class=\"path-mark\">></span>\n <a\n href=\"javascript:\"\n (click)=\"navigateToPath(i)\"\n >{{ p }}</a\n >\n }\n @if (isLast) {\n <span class=\"path-mark\">></span>\n <span>{{ p }}</span>\n }\n }\n </div>\n @if (currentSchemaDescription) {\n <div\n class=\"schema-desc\"\n [innerHTML]=\"\n currentSchemaDescription\n | aclParseJsonTranslate\n | pure: processDescription\n \"\n ></div>\n }\n <div class=\"schema-list\">\n @for (item of properties | keyvalue; track item) {\n <div class=\"schema-item\">\n <h3>\n <span>{{ item.key }}</span>\n <span class=\"obj-type\">{{ item.value.type }}</span>\n </h3>\n <p\n [innerHTML]=\"\n item.value.description | pure: processDescription\n \"\n ></p>\n @if (item.value | pure: hasViewableContent) {\n <p>\n <a\n href=\"javascript:\"\n (click)=\"drillDownToProperty(item.key)\"\n >\n {{ 'view_detail' | translate }}\n </a>\n </p>\n }\n </div>\n }\n </div>\n </div>\n }\n </ng-container>\n </aui-tab>\n }\n @if (exampleEnable && hasExamples) {\n <aui-tab>\n <ng-container *auiTabLabel> Examples </ng-container>\n <ng-container *auiTabContent>\n <div class=\"example-list\">\n @for (example of examples; track example; let i = $index) {\n <div class=\"example-item\">\n <h3>\n {{ i + 1 }}. <span>{{ example.title }}</span>\n </h3>\n <p\n [innerHTML]=\"example.description | pure: processDescription\"\n ></p>\n <p class=\"example-actions\">\n <a\n href=\"javascript:\"\n (click)=\"tryExample(example)\"\n >\n <aui-icon\n icon=\"arrow_turn_up\"\n size=\"14\"\n margin=\"right\"\n ></aui-icon>\n <span>Try it</span>\n </a>\n <a\n href=\"javascript:\"\n (click)=\"downloadYaml(example)\"\n >\n <aui-icon\n icon=\"download\"\n size=\"14\"\n margin=\"right\"\n ></aui-icon>\n <span>Download YAML</span>\n </a>\n </p>\n </div>\n }\n </div>\n </ng-container>\n </aui-tab>\n }\n</aui-tab-group>\n", styles: [":host{display:block;box-sizing:border-box;min-width:360px;padding:16px;background-color:rgb(var(--aui-color-n-10));box-shadow:0 0 4px rgba(var(--aui-color-n-1),.16);margin-left:12px;overflow-y:scroll}:host::-webkit-scrollbar{width:8px;height:4px}:host::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgb(var(--aui-color-n-7))}:host::-webkit-scrollbar-thumb:hover{background-color:rgb(var(--aui-color-n-5))}:host::-webkit-scrollbar-corner{background-color:transparent}aui-tab-group{display:block;margin-top:5px}.schema-header{height:40px;display:flex;justify-content:space-between;align-items:center;font-size:18px}.schema-header aui-icon{font-size:16px;color:rgb(var(--aui-color-n-6));cursor:pointer}.schema-header aui-icon:hover{color:rgb(var(--aui-color-primary))}.schema-content{line-height:20px;overflow-y:auto;height:calc(100% - 40px)}.schema-content::-webkit-scrollbar{width:8px;height:4px}.schema-content::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgb(var(--aui-color-n-7))}.schema-content::-webkit-scrollbar-thumb:hover{background-color:rgb(var(--aui-color-n-5))}.schema-content::-webkit-scrollbar-corner{background-color:transparent}.schema-desc{margin-bottom:12px}.schema-desc a{color:#007bff;text-decoration:none}.schema-desc a:hover{text-decoration:underline}.schema-path{display:flex;flex-wrap:wrap}.schema-path *{margin-left:2px;word-break:break-all}.schema-path span:first-child{margin-right:2px}.schema-path .path-mark{margin:0 4px;color:rgb(var(--aui-color-n-6))}.schema-path{margin-bottom:12px}.schema-list .schema-item:not(:last-of-type),.schema-list .example-item:not(:last-of-type),.example-list .schema-item:not(:last-of-type),.example-list .example-item:not(:last-of-type){border-bottom:1px solid rgb(var(--aui-color-border));margin-bottom:12px}.schema-list .schema-item,.schema-list .example-item,.example-list .schema-item,.example-list .example-item{padding-left:16px}.schema-list .schema-item h3:before,.example-list .schema-item h3:before{content:\"\";display:block;width:6px;height:6px;border-radius:50%;background-color:rgb(var(--aui-color-n-6));position:absolute;left:-12px;top:8px}.schema-list h3,.example-list h3{position:relative;font-weight:500;margin-bottom:12px;word-break:break-word}.schema-list h3 span,.example-list h3 span{margin-right:4px}.schema-list h3 .obj-type,.example-list h3 .obj-type{color:rgb(var(--aui-color-n-4))}.schema-list p,.example-list p{margin-bottom:12px;word-break:break-word}.schema-list p a,.example-list p a{color:#007bff;text-decoration:none}.schema-list p a:hover,.example-list p a:hover{text-decoration:underline}.schema-examples{padding:16px}.examples-header{margin-bottom:16px}.examples-header h3{margin:0;font-size:18px;font-weight:600;color:#333}.examples-content .examples-list .example-item{margin-bottom:24px;border:1px solid #e1e5e9;border-radius:6px;overflow:hidden}.examples-content .examples-list .example-item:last-child{margin-bottom:0}.examples-content .examples-list .example-item .example-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background-color:#f8f9fa;border-bottom:1px solid #e1e5e9}.examples-content .examples-list .example-item .example-header .example-title{margin:0;font-size:16px;font-weight:600;color:#333}.examples-content .examples-list .example-item .example-header .example-actions{display:flex;gap:8px}.examples-content .examples-list .example-item .example-header .example-actions .btn{padding:4px 12px;font-size:12px;border-radius:4px;cursor:pointer;transition:all .2s ease}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-primary{color:#007bff;border:1px solid #007bff;background-color:transparent}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-primary:hover{color:#fff;background-color:#007bff}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-secondary{color:#6c757d;border:1px solid #6c757d;background-color:transparent}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-secondary:hover{color:#fff;background-color:#6c757d}.examples-content .examples-list .example-item .example-header .example-list .example-item .example-actions{display:flex;justify-content:space-between}.examples-content .examples-list .example-item .example-description{padding:12px 16px;color:#666;font-size:14px;line-height:1.5;border-bottom:1px solid #e1e5e9}.examples-content .examples-list .example-item .example-description a{color:#007bff;text-decoration:none}.examples-content .examples-list .example-item .example-description a:hover{text-decoration:underline}.examples-content .examples-list .example-item .example-yaml{background-color:#f8f9fa}.examples-content .examples-list .example-item .example-yaml pre{margin:0;padding:16px;background-color:transparent;border:none;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:13px;line-height:1.4;color:#333;overflow-x:auto}.examples-content .examples-list .example-item .example-yaml pre code{background-color:transparent;padding:0;color:inherit}\n"], dependencies: [{ kind: "ngmodule", type: IconModule }, { kind: "component", type: i1.IconComponent, selector: "aui-icon", inputs: ["icon", "light", "dark", "link", "margin", "size", "color", "background", "backgroundColor"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i1.TabGroupComponent, selector: "aui-tab-group", inputs: ["selectedIndex", "tab", "type", "title", "size", "lazy"], outputs: ["selectedIndexChange", "tabChange", "selectedTabChange", "focusChange"], exportAs: ["auiTabGroup"] }, { kind: "component", type: i1.TabComponent, selector: "aui-tab", inputs: ["name", "label", "closeable", "disabled"], outputs: ["close"], exportAs: ["auiTab"] }, { kind: "directive", type: i1.TabLabelDirective, selector: "[auiTabLabel]" }, { kind: "directive", type: i1.TabContentDirective, selector: "[auiTabContent]" }, { kind: "ngmodule", type: ButtonModule }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: ParseJsonTranslatePipe, name: "aclParseJsonTranslate" }, { kind: "pipe", type: PurePipe, name: "pure" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13328
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.1", type: ResourceYamlSidebarComponent, isStandalone: true, selector: "acl-resource-yaml-sidebar", inputs: { resource: "resource", schema: "schema", schemaEnable: "schemaEnable", exampleEnable: "exampleEnable", extraExamples: "extraExamples" }, outputs: { close: "close", tryYaml: "tryYaml" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"schema-header\">\n <span>{{ resourceKind }}</span>\n <aui-icon\n icon=\"xmark\"\n (click)=\"close.next()\"\n ></aui-icon>\n</div>\n<aui-tab-group type=\"card\">\n @if (schemaEnable && hasSchema) {\n <aui-tab>\n <ng-container *auiTabLabel> Schema </ng-container>\n <ng-container *auiTabContent>\n @if (schema) {\n <div class=\"schema-content\">\n <div class=\"schema-path\">\n @if (path.length) {\n <a\n href=\"javascript:\"\n (click)=\"refresh()\"\n >{{ resourceKind }}</a\n >\n }\n @for (p of path; track p; let i = $index; let isLast = $last) {\n @if (!isLast) {\n <span class=\"path-mark\">></span>\n <a\n href=\"javascript:\"\n (click)=\"navigateToPath(i)\"\n >{{ p }}</a\n >\n }\n @if (isLast) {\n <span class=\"path-mark\">></span>\n <span>{{ p }}</span>\n }\n }\n </div>\n @if (currentSchemaDescription) {\n <div\n class=\"schema-desc\"\n [innerHTML]=\"\n currentSchemaDescription\n | aclParseJsonTranslate\n | pure: processDescription\n \"\n ></div>\n }\n <div class=\"schema-list\">\n @for (item of properties | keyvalue; track item) {\n <div class=\"schema-item\">\n <h3>\n <span>{{ item.key }}</span>\n <span class=\"obj-type\">{{ item.value.type }}</span>\n </h3>\n <p\n [innerHTML]=\"\n item.value.description | pure: processDescription\n \"\n ></p>\n @if (item.value | pure: hasViewableContent) {\n <p>\n <a\n href=\"javascript:\"\n (click)=\"drillDownToProperty(item.key)\"\n >\n {{ 'view_detail' | translate }}\n </a>\n </p>\n }\n </div>\n }\n </div>\n </div>\n }\n </ng-container>\n </aui-tab>\n }\n @if (exampleEnable && hasExamples) {\n <aui-tab>\n <ng-container *auiTabLabel> Examples </ng-container>\n <ng-container *auiTabContent>\n <div class=\"example-list\">\n @for (example of examples; track example; let i = $index) {\n <div class=\"example-item\">\n <h3>\n {{ i + 1 }}. <span>{{ example.title }}</span>\n </h3>\n <p\n [innerHTML]=\"example.description | pure: processDescription\"\n ></p>\n <p class=\"example-actions\">\n <a\n href=\"javascript:\"\n (click)=\"tryExample(example)\"\n >\n <aui-icon\n icon=\"arrow_turn_up\"\n size=\"14\"\n margin=\"right\"\n ></aui-icon>\n <span>Try it</span>\n </a>\n <a\n href=\"javascript:\"\n (click)=\"downloadYaml(example)\"\n >\n <aui-icon\n icon=\"download\"\n size=\"14\"\n margin=\"right\"\n ></aui-icon>\n <span>Download YAML</span>\n </a>\n </p>\n </div>\n }\n </div>\n </ng-container>\n </aui-tab>\n }\n</aui-tab-group>\n", styles: [":host{display:block;box-sizing:border-box;min-width:360px;padding:16px;background-color:rgb(var(--aui-color-n-10));box-shadow:0 0 4px rgba(var(--aui-color-n-1),.16);margin-left:12px;overflow-y:scroll}:host::-webkit-scrollbar{width:8px;height:4px}:host::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgb(var(--aui-color-n-7))}:host::-webkit-scrollbar-thumb:hover{background-color:rgb(var(--aui-color-n-5))}:host::-webkit-scrollbar-corner{background-color:transparent}aui-tab-group{display:block;margin-top:5px}.schema-header{height:40px;display:flex;justify-content:space-between;align-items:center;font-size:18px}.schema-header aui-icon{font-size:16px;color:rgb(var(--aui-color-n-6));cursor:pointer}.schema-header aui-icon:hover{color:rgb(var(--aui-color-primary))}.schema-content{line-height:20px;overflow-y:auto;height:calc(100% - 40px)}.schema-content::-webkit-scrollbar{width:8px;height:4px}.schema-content::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgb(var(--aui-color-n-7))}.schema-content::-webkit-scrollbar-thumb:hover{background-color:rgb(var(--aui-color-n-5))}.schema-content::-webkit-scrollbar-corner{background-color:transparent}.schema-desc{margin-bottom:12px}.schema-desc a{color:#007bff;text-decoration:none}.schema-desc a:hover{text-decoration:underline}.schema-path{display:flex;flex-wrap:wrap}.schema-path *{margin-left:2px;word-break:break-all}.schema-path span:first-child{margin-right:2px}.schema-path .path-mark{margin:0 4px;color:rgb(var(--aui-color-n-6))}.schema-path{margin-bottom:12px}.schema-list .schema-item:not(:last-of-type),.schema-list .example-item:not(:last-of-type),.example-list .schema-item:not(:last-of-type),.example-list .example-item:not(:last-of-type){border-bottom:1px solid rgb(var(--aui-color-border));margin-bottom:12px}.schema-list .schema-item,.schema-list .example-item,.example-list .schema-item,.example-list .example-item{padding-left:16px}.schema-list .schema-item h3:before,.example-list .schema-item h3:before{content:\"\";display:block;width:6px;height:6px;border-radius:50%;background-color:rgb(var(--aui-color-n-6));position:absolute;left:-12px;top:8px}.schema-list .example-actions,.example-list .example-actions{display:flex;justify-content:space-between}.schema-list h3,.example-list h3{position:relative;font-weight:500;margin-bottom:12px;word-break:break-word}.schema-list h3 span,.example-list h3 span{margin-right:4px}.schema-list h3 .obj-type,.example-list h3 .obj-type{color:rgb(var(--aui-color-n-4))}.schema-list p,.example-list p{margin-bottom:12px;word-break:break-word}.schema-list p a,.example-list p a{color:#007bff;text-decoration:none}.schema-list p a:hover,.example-list p a:hover{text-decoration:underline}.schema-examples{padding:16px}.examples-header{margin-bottom:16px}.examples-header h3{margin:0;font-size:18px;font-weight:600;color:#333}.examples-content .examples-list .example-item{margin-bottom:24px;border:1px solid #e1e5e9;border-radius:6px;overflow:hidden}.examples-content .examples-list .example-item:last-child{margin-bottom:0}.examples-content .examples-list .example-item .example-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background-color:#f8f9fa;border-bottom:1px solid #e1e5e9}.examples-content .examples-list .example-item .example-header .example-title{margin:0;font-size:16px;font-weight:600;color:#333}.examples-content .examples-list .example-item .example-header .example-actions{display:flex;gap:8px}.examples-content .examples-list .example-item .example-header .example-actions .btn{padding:4px 12px;font-size:12px;border-radius:4px;cursor:pointer;transition:all .2s ease}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-primary{color:#007bff;border:1px solid #007bff;background-color:transparent}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-primary:hover{color:#fff;background-color:#007bff}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-secondary{color:#6c757d;border:1px solid #6c757d;background-color:transparent}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-secondary:hover{color:#fff;background-color:#6c757d}.examples-content .examples-list .example-item .example-header .example-list .example-item .example-actions{display:flex;justify-content:space-between}.examples-content .examples-list .example-item .example-description{padding:12px 16px;color:#666;font-size:14px;line-height:1.5;border-bottom:1px solid #e1e5e9}.examples-content .examples-list .example-item .example-description a{color:#007bff;text-decoration:none}.examples-content .examples-list .example-item .example-description a:hover{text-decoration:underline}.examples-content .examples-list .example-item .example-yaml{background-color:#f8f9fa}.examples-content .examples-list .example-item .example-yaml pre{margin:0;padding:16px;background-color:transparent;border:none;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:13px;line-height:1.4;color:#333;overflow-x:auto}.examples-content .examples-list .example-item .example-yaml pre code{background-color:transparent;padding:0;color:inherit}\n"], dependencies: [{ kind: "ngmodule", type: IconModule }, { kind: "component", type: i1.IconComponent, selector: "aui-icon", inputs: ["icon", "light", "dark", "link", "margin", "size", "color", "background", "backgroundColor"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i1.TabGroupComponent, selector: "aui-tab-group", inputs: ["selectedIndex", "tab", "type", "title", "size", "lazy"], outputs: ["selectedIndexChange", "tabChange", "selectedTabChange", "focusChange"], exportAs: ["auiTabGroup"] }, { kind: "component", type: i1.TabComponent, selector: "aui-tab", inputs: ["name", "label", "closeable", "disabled"], outputs: ["close"], exportAs: ["auiTab"] }, { kind: "directive", type: i1.TabLabelDirective, selector: "[auiTabLabel]" }, { kind: "directive", type: i1.TabContentDirective, selector: "[auiTabContent]" }, { kind: "ngmodule", type: ButtonModule }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: ParseJsonTranslatePipe, name: "aclParseJsonTranslate" }, { kind: "pipe", type: PurePipe, name: "pure" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
13329
13329
|
}
|
|
13330
13330
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ResourceYamlSidebarComponent, decorators: [{
|
|
13331
13331
|
type: Component,
|
|
@@ -13337,7 +13337,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
13337
13337
|
TabsModule,
|
|
13338
13338
|
ButtonModule,
|
|
13339
13339
|
PurePipe,
|
|
13340
|
-
], template: "<div class=\"schema-header\">\n <span>{{ resourceKind }}</span>\n <aui-icon\n icon=\"xmark\"\n (click)=\"close.next()\"\n ></aui-icon>\n</div>\n<aui-tab-group type=\"card\">\n @if (schemaEnable && hasSchema) {\n <aui-tab>\n <ng-container *auiTabLabel> Schema </ng-container>\n <ng-container *auiTabContent>\n @if (schema) {\n <div class=\"schema-content\">\n <div class=\"schema-path\">\n @if (path.length) {\n <a\n href=\"javascript:\"\n (click)=\"refresh()\"\n >{{ resourceKind }}</a\n >\n }\n @for (p of path; track p; let i = $index; let isLast = $last) {\n @if (!isLast) {\n <span class=\"path-mark\">></span>\n <a\n href=\"javascript:\"\n (click)=\"navigateToPath(i)\"\n >{{ p }}</a\n >\n }\n @if (isLast) {\n <span class=\"path-mark\">></span>\n <span>{{ p }}</span>\n }\n }\n </div>\n @if (currentSchemaDescription) {\n <div\n class=\"schema-desc\"\n [innerHTML]=\"\n currentSchemaDescription\n | aclParseJsonTranslate\n | pure: processDescription\n \"\n ></div>\n }\n <div class=\"schema-list\">\n @for (item of properties | keyvalue; track item) {\n <div class=\"schema-item\">\n <h3>\n <span>{{ item.key }}</span>\n <span class=\"obj-type\">{{ item.value.type }}</span>\n </h3>\n <p\n [innerHTML]=\"\n item.value.description | pure: processDescription\n \"\n ></p>\n @if (item.value | pure: hasViewableContent) {\n <p>\n <a\n href=\"javascript:\"\n (click)=\"drillDownToProperty(item.key)\"\n >\n {{ 'view_detail' | translate }}\n </a>\n </p>\n }\n </div>\n }\n </div>\n </div>\n }\n </ng-container>\n </aui-tab>\n }\n @if (exampleEnable && hasExamples) {\n <aui-tab>\n <ng-container *auiTabLabel> Examples </ng-container>\n <ng-container *auiTabContent>\n <div class=\"example-list\">\n @for (example of examples; track example; let i = $index) {\n <div class=\"example-item\">\n <h3>\n {{ i + 1 }}. <span>{{ example.title }}</span>\n </h3>\n <p\n [innerHTML]=\"example.description | pure: processDescription\"\n ></p>\n <p class=\"example-actions\">\n <a\n href=\"javascript:\"\n (click)=\"tryExample(example)\"\n >\n <aui-icon\n icon=\"arrow_turn_up\"\n size=\"14\"\n margin=\"right\"\n ></aui-icon>\n <span>Try it</span>\n </a>\n <a\n href=\"javascript:\"\n (click)=\"downloadYaml(example)\"\n >\n <aui-icon\n icon=\"download\"\n size=\"14\"\n margin=\"right\"\n ></aui-icon>\n <span>Download YAML</span>\n </a>\n </p>\n </div>\n }\n </div>\n </ng-container>\n </aui-tab>\n }\n</aui-tab-group>\n", styles: [":host{display:block;box-sizing:border-box;min-width:360px;padding:16px;background-color:rgb(var(--aui-color-n-10));box-shadow:0 0 4px rgba(var(--aui-color-n-1),.16);margin-left:12px;overflow-y:scroll}:host::-webkit-scrollbar{width:8px;height:4px}:host::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgb(var(--aui-color-n-7))}:host::-webkit-scrollbar-thumb:hover{background-color:rgb(var(--aui-color-n-5))}:host::-webkit-scrollbar-corner{background-color:transparent}aui-tab-group{display:block;margin-top:5px}.schema-header{height:40px;display:flex;justify-content:space-between;align-items:center;font-size:18px}.schema-header aui-icon{font-size:16px;color:rgb(var(--aui-color-n-6));cursor:pointer}.schema-header aui-icon:hover{color:rgb(var(--aui-color-primary))}.schema-content{line-height:20px;overflow-y:auto;height:calc(100% - 40px)}.schema-content::-webkit-scrollbar{width:8px;height:4px}.schema-content::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgb(var(--aui-color-n-7))}.schema-content::-webkit-scrollbar-thumb:hover{background-color:rgb(var(--aui-color-n-5))}.schema-content::-webkit-scrollbar-corner{background-color:transparent}.schema-desc{margin-bottom:12px}.schema-desc a{color:#007bff;text-decoration:none}.schema-desc a:hover{text-decoration:underline}.schema-path{display:flex;flex-wrap:wrap}.schema-path *{margin-left:2px;word-break:break-all}.schema-path span:first-child{margin-right:2px}.schema-path .path-mark{margin:0 4px;color:rgb(var(--aui-color-n-6))}.schema-path{margin-bottom:12px}.schema-list .schema-item:not(:last-of-type),.schema-list .example-item:not(:last-of-type),.example-list .schema-item:not(:last-of-type),.example-list .example-item:not(:last-of-type){border-bottom:1px solid rgb(var(--aui-color-border));margin-bottom:12px}.schema-list .schema-item,.schema-list .example-item,.example-list .schema-item,.example-list .example-item{padding-left:16px}.schema-list .schema-item h3:before,.example-list .schema-item h3:before{content:\"\";display:block;width:6px;height:6px;border-radius:50%;background-color:rgb(var(--aui-color-n-6));position:absolute;left:-12px;top:8px}.schema-list h3,.example-list h3{position:relative;font-weight:500;margin-bottom:12px;word-break:break-word}.schema-list h3 span,.example-list h3 span{margin-right:4px}.schema-list h3 .obj-type,.example-list h3 .obj-type{color:rgb(var(--aui-color-n-4))}.schema-list p,.example-list p{margin-bottom:12px;word-break:break-word}.schema-list p a,.example-list p a{color:#007bff;text-decoration:none}.schema-list p a:hover,.example-list p a:hover{text-decoration:underline}.schema-examples{padding:16px}.examples-header{margin-bottom:16px}.examples-header h3{margin:0;font-size:18px;font-weight:600;color:#333}.examples-content .examples-list .example-item{margin-bottom:24px;border:1px solid #e1e5e9;border-radius:6px;overflow:hidden}.examples-content .examples-list .example-item:last-child{margin-bottom:0}.examples-content .examples-list .example-item .example-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background-color:#f8f9fa;border-bottom:1px solid #e1e5e9}.examples-content .examples-list .example-item .example-header .example-title{margin:0;font-size:16px;font-weight:600;color:#333}.examples-content .examples-list .example-item .example-header .example-actions{display:flex;gap:8px}.examples-content .examples-list .example-item .example-header .example-actions .btn{padding:4px 12px;font-size:12px;border-radius:4px;cursor:pointer;transition:all .2s ease}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-primary{color:#007bff;border:1px solid #007bff;background-color:transparent}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-primary:hover{color:#fff;background-color:#007bff}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-secondary{color:#6c757d;border:1px solid #6c757d;background-color:transparent}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-secondary:hover{color:#fff;background-color:#6c757d}.examples-content .examples-list .example-item .example-header .example-list .example-item .example-actions{display:flex;justify-content:space-between}.examples-content .examples-list .example-item .example-description{padding:12px 16px;color:#666;font-size:14px;line-height:1.5;border-bottom:1px solid #e1e5e9}.examples-content .examples-list .example-item .example-description a{color:#007bff;text-decoration:none}.examples-content .examples-list .example-item .example-description a:hover{text-decoration:underline}.examples-content .examples-list .example-item .example-yaml{background-color:#f8f9fa}.examples-content .examples-list .example-item .example-yaml pre{margin:0;padding:16px;background-color:transparent;border:none;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:13px;line-height:1.4;color:#333;overflow-x:auto}.examples-content .examples-list .example-item .example-yaml pre code{background-color:transparent;padding:0;color:inherit}\n"] }]
|
|
13340
|
+
], template: "<div class=\"schema-header\">\n <span>{{ resourceKind }}</span>\n <aui-icon\n icon=\"xmark\"\n (click)=\"close.next()\"\n ></aui-icon>\n</div>\n<aui-tab-group type=\"card\">\n @if (schemaEnable && hasSchema) {\n <aui-tab>\n <ng-container *auiTabLabel> Schema </ng-container>\n <ng-container *auiTabContent>\n @if (schema) {\n <div class=\"schema-content\">\n <div class=\"schema-path\">\n @if (path.length) {\n <a\n href=\"javascript:\"\n (click)=\"refresh()\"\n >{{ resourceKind }}</a\n >\n }\n @for (p of path; track p; let i = $index; let isLast = $last) {\n @if (!isLast) {\n <span class=\"path-mark\">></span>\n <a\n href=\"javascript:\"\n (click)=\"navigateToPath(i)\"\n >{{ p }}</a\n >\n }\n @if (isLast) {\n <span class=\"path-mark\">></span>\n <span>{{ p }}</span>\n }\n }\n </div>\n @if (currentSchemaDescription) {\n <div\n class=\"schema-desc\"\n [innerHTML]=\"\n currentSchemaDescription\n | aclParseJsonTranslate\n | pure: processDescription\n \"\n ></div>\n }\n <div class=\"schema-list\">\n @for (item of properties | keyvalue; track item) {\n <div class=\"schema-item\">\n <h3>\n <span>{{ item.key }}</span>\n <span class=\"obj-type\">{{ item.value.type }}</span>\n </h3>\n <p\n [innerHTML]=\"\n item.value.description | pure: processDescription\n \"\n ></p>\n @if (item.value | pure: hasViewableContent) {\n <p>\n <a\n href=\"javascript:\"\n (click)=\"drillDownToProperty(item.key)\"\n >\n {{ 'view_detail' | translate }}\n </a>\n </p>\n }\n </div>\n }\n </div>\n </div>\n }\n </ng-container>\n </aui-tab>\n }\n @if (exampleEnable && hasExamples) {\n <aui-tab>\n <ng-container *auiTabLabel> Examples </ng-container>\n <ng-container *auiTabContent>\n <div class=\"example-list\">\n @for (example of examples; track example; let i = $index) {\n <div class=\"example-item\">\n <h3>\n {{ i + 1 }}. <span>{{ example.title }}</span>\n </h3>\n <p\n [innerHTML]=\"example.description | pure: processDescription\"\n ></p>\n <p class=\"example-actions\">\n <a\n href=\"javascript:\"\n (click)=\"tryExample(example)\"\n >\n <aui-icon\n icon=\"arrow_turn_up\"\n size=\"14\"\n margin=\"right\"\n ></aui-icon>\n <span>Try it</span>\n </a>\n <a\n href=\"javascript:\"\n (click)=\"downloadYaml(example)\"\n >\n <aui-icon\n icon=\"download\"\n size=\"14\"\n margin=\"right\"\n ></aui-icon>\n <span>Download YAML</span>\n </a>\n </p>\n </div>\n }\n </div>\n </ng-container>\n </aui-tab>\n }\n</aui-tab-group>\n", styles: [":host{display:block;box-sizing:border-box;min-width:360px;padding:16px;background-color:rgb(var(--aui-color-n-10));box-shadow:0 0 4px rgba(var(--aui-color-n-1),.16);margin-left:12px;overflow-y:scroll}:host::-webkit-scrollbar{width:8px;height:4px}:host::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgb(var(--aui-color-n-7))}:host::-webkit-scrollbar-thumb:hover{background-color:rgb(var(--aui-color-n-5))}:host::-webkit-scrollbar-corner{background-color:transparent}aui-tab-group{display:block;margin-top:5px}.schema-header{height:40px;display:flex;justify-content:space-between;align-items:center;font-size:18px}.schema-header aui-icon{font-size:16px;color:rgb(var(--aui-color-n-6));cursor:pointer}.schema-header aui-icon:hover{color:rgb(var(--aui-color-primary))}.schema-content{line-height:20px;overflow-y:auto;height:calc(100% - 40px)}.schema-content::-webkit-scrollbar{width:8px;height:4px}.schema-content::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgb(var(--aui-color-n-7))}.schema-content::-webkit-scrollbar-thumb:hover{background-color:rgb(var(--aui-color-n-5))}.schema-content::-webkit-scrollbar-corner{background-color:transparent}.schema-desc{margin-bottom:12px}.schema-desc a{color:#007bff;text-decoration:none}.schema-desc a:hover{text-decoration:underline}.schema-path{display:flex;flex-wrap:wrap}.schema-path *{margin-left:2px;word-break:break-all}.schema-path span:first-child{margin-right:2px}.schema-path .path-mark{margin:0 4px;color:rgb(var(--aui-color-n-6))}.schema-path{margin-bottom:12px}.schema-list .schema-item:not(:last-of-type),.schema-list .example-item:not(:last-of-type),.example-list .schema-item:not(:last-of-type),.example-list .example-item:not(:last-of-type){border-bottom:1px solid rgb(var(--aui-color-border));margin-bottom:12px}.schema-list .schema-item,.schema-list .example-item,.example-list .schema-item,.example-list .example-item{padding-left:16px}.schema-list .schema-item h3:before,.example-list .schema-item h3:before{content:\"\";display:block;width:6px;height:6px;border-radius:50%;background-color:rgb(var(--aui-color-n-6));position:absolute;left:-12px;top:8px}.schema-list .example-actions,.example-list .example-actions{display:flex;justify-content:space-between}.schema-list h3,.example-list h3{position:relative;font-weight:500;margin-bottom:12px;word-break:break-word}.schema-list h3 span,.example-list h3 span{margin-right:4px}.schema-list h3 .obj-type,.example-list h3 .obj-type{color:rgb(var(--aui-color-n-4))}.schema-list p,.example-list p{margin-bottom:12px;word-break:break-word}.schema-list p a,.example-list p a{color:#007bff;text-decoration:none}.schema-list p a:hover,.example-list p a:hover{text-decoration:underline}.schema-examples{padding:16px}.examples-header{margin-bottom:16px}.examples-header h3{margin:0;font-size:18px;font-weight:600;color:#333}.examples-content .examples-list .example-item{margin-bottom:24px;border:1px solid #e1e5e9;border-radius:6px;overflow:hidden}.examples-content .examples-list .example-item:last-child{margin-bottom:0}.examples-content .examples-list .example-item .example-header{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background-color:#f8f9fa;border-bottom:1px solid #e1e5e9}.examples-content .examples-list .example-item .example-header .example-title{margin:0;font-size:16px;font-weight:600;color:#333}.examples-content .examples-list .example-item .example-header .example-actions{display:flex;gap:8px}.examples-content .examples-list .example-item .example-header .example-actions .btn{padding:4px 12px;font-size:12px;border-radius:4px;cursor:pointer;transition:all .2s ease}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-primary{color:#007bff;border:1px solid #007bff;background-color:transparent}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-primary:hover{color:#fff;background-color:#007bff}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-secondary{color:#6c757d;border:1px solid #6c757d;background-color:transparent}.examples-content .examples-list .example-item .example-header .example-actions .btn.btn-outline-secondary:hover{color:#fff;background-color:#6c757d}.examples-content .examples-list .example-item .example-header .example-list .example-item .example-actions{display:flex;justify-content:space-between}.examples-content .examples-list .example-item .example-description{padding:12px 16px;color:#666;font-size:14px;line-height:1.5;border-bottom:1px solid #e1e5e9}.examples-content .examples-list .example-item .example-description a{color:#007bff;text-decoration:none}.examples-content .examples-list .example-item .example-description a:hover{text-decoration:underline}.examples-content .examples-list .example-item .example-yaml{background-color:#f8f9fa}.examples-content .examples-list .example-item .example-yaml pre{margin:0;padding:16px;background-color:transparent;border:none;font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:13px;line-height:1.4;color:#333;overflow-x:auto}.examples-content .examples-list .example-item .example-yaml pre code{background-color:transparent;padding:0;color:inherit}\n"] }]
|
|
13341
13341
|
}], propDecorators: { resource: [{
|
|
13342
13342
|
type: Input
|
|
13343
13343
|
}], schema: [{
|
|
@@ -13391,16 +13391,20 @@ class ResourceYamlEditorComponent {
|
|
|
13391
13391
|
this.hasFolded = false;
|
|
13392
13392
|
/**
|
|
13393
13393
|
* 自动获取的 schema,当没有手动提供 schema 时使用
|
|
13394
|
+
/**
|
|
13395
|
+
*
|
|
13396
|
+
*
|
|
13397
|
+
* @memberof ResourceYamlEditorComponent
|
|
13394
13398
|
*/
|
|
13395
|
-
this.autoSchema$ = this.resource
|
|
13396
|
-
if (!resource) {
|
|
13399
|
+
this.autoSchema$ = combineLatest([this.resource$, this.clusterName$]).pipe(switchMap(([resource, clusterName]) => {
|
|
13400
|
+
if (!resource || !clusterName) {
|
|
13397
13401
|
return of(null);
|
|
13398
13402
|
}
|
|
13399
13403
|
const firstResource = (Array.isArray(resource) ? resource[0] : resource);
|
|
13400
13404
|
if (!firstResource?.apiVersion || !firstResource?.kind) {
|
|
13401
13405
|
return of(null);
|
|
13402
13406
|
}
|
|
13403
|
-
return this.schemaService.getResourceSchema(firstResource.apiVersion, firstResource.kind,
|
|
13407
|
+
return this.schemaService.getResourceSchema(firstResource.apiVersion, firstResource.kind, clusterName);
|
|
13404
13408
|
}), publishRef());
|
|
13405
13409
|
/**
|
|
13406
13410
|
* 最终使用的 schema,优先使用手动提供的,否则使用自动获取的
|
|
@@ -13591,6 +13595,10 @@ __decorate([
|
|
|
13591
13595
|
ObservableInput(),
|
|
13592
13596
|
__metadata("design:type", Observable)
|
|
13593
13597
|
], ResourceYamlEditorComponent.prototype, "schema$", void 0);
|
|
13598
|
+
__decorate([
|
|
13599
|
+
ObservableInput(),
|
|
13600
|
+
__metadata("design:type", Observable)
|
|
13601
|
+
], ResourceYamlEditorComponent.prototype, "clusterName$", void 0);
|
|
13594
13602
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImport: i0, type: ResourceYamlEditorComponent, decorators: [{
|
|
13595
13603
|
type: Component,
|
|
13596
13604
|
args: [{ selector: 'acl-resource-yaml-editor', preserveWhitespaces: false, standalone: true, imports: [
|
|
@@ -13645,7 +13653,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
|
|
|
13645
13653
|
type: Input
|
|
13646
13654
|
}], clusterName: [{
|
|
13647
13655
|
type: Input
|
|
13648
|
-
}], namespace: [{
|
|
13656
|
+
}], clusterName$: [], namespace: [{
|
|
13649
13657
|
type: Input
|
|
13650
13658
|
}] } });
|
|
13651
13659
|
|