mirror of https://github.com/abpframework/abp.git
174 changed files with 15351 additions and 2507 deletions
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 83 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,8 @@ |
|||
import { Directive, TemplateRef } from '@angular/core'; |
|||
|
|||
@Directive({ |
|||
selector: '[abpTreeExpandedIconTemplate],[abp-tree-expanded-icon-template]', |
|||
}) |
|||
export class ExpandedIconTemplateDirective { |
|||
constructor(public template: TemplateRef<any>) {} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
import { Directive, TemplateRef } from '@angular/core'; |
|||
|
|||
@Directive({ |
|||
selector: '[abpTreeNodeTemplate],[abp-tree-node-template]', |
|||
}) |
|||
export class TreeNodeTemplateDirective { |
|||
constructor(public template: TemplateRef<any>) {} |
|||
} |
|||
@ -1,12 +1,18 @@ |
|||
import { CommonModule } from '@angular/common'; |
|||
import { NgModule } from '@angular/core'; |
|||
import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; |
|||
import { NzTreeModule } from 'ng-zorro-antd/tree'; |
|||
import { TreeComponent } from './components/tree.component'; |
|||
import { CommonModule } from '@angular/common'; |
|||
import { TreeNodeTemplateDirective } from './templates/tree-node-template.directive'; |
|||
import { ExpandedIconTemplateDirective } from './templates/expanded-icon-template.directive'; |
|||
|
|||
const templates = [TreeNodeTemplateDirective, ExpandedIconTemplateDirective]; |
|||
|
|||
const exported = [...templates, TreeComponent]; |
|||
|
|||
@NgModule({ |
|||
imports: [CommonModule, NzTreeModule, NgbDropdownModule], |
|||
exports: [TreeComponent], |
|||
declarations: [TreeComponent], |
|||
exports: [...exported], |
|||
declarations: [...exported], |
|||
}) |
|||
export class TreeModule {} |
|||
|
|||
@ -1,3 +1,5 @@ |
|||
export * from './lib/tree.module'; |
|||
export * from './lib/components/tree.component'; |
|||
export * from './lib/utils/nz-tree-adapter'; |
|||
export * from './lib/templates/tree-node-template.directive'; |
|||
export * from './lib/templates/expanded-icon-template.directive'; |
|||
|
|||
@ -0,0 +1,20 @@ |
|||
export function downloadBlob(blob: Blob, filename: string) { |
|||
const blobUrl = URL.createObjectURL(blob); |
|||
|
|||
const link = document.createElement('a'); |
|||
|
|||
link.href = blobUrl; |
|||
link.download = filename; |
|||
|
|||
document.body.appendChild(link); |
|||
|
|||
link.dispatchEvent( |
|||
new MouseEvent('click', { |
|||
bubbles: true, |
|||
cancelable: true, |
|||
view: window, |
|||
}), |
|||
); |
|||
|
|||
document.body.removeChild(link); |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
# Proxy Generation Output |
|||
|
|||
This directory includes the output of the latest proxy generation. |
|||
The files and folders in it will be overwritten when proxy generation is run again. |
|||
Therefore, please do not place your own content in this folder. |
|||
|
|||
In addition, `generate-proxy.json` works like a lock file. |
|||
It includes information used by the proxy generator, so please do not delete or modify it. |
|||
|
|||
Finally, the name of the files and folders should not be changed for two reasons: |
|||
- Proxy generator will keep creating them at those paths and you will have multiple copies of the same content. |
|||
- ABP Suite generates files which include imports from this folder. |
|||
|
|||
@ -0,0 +1,29 @@ |
|||
import type { GetFeatureListResultDto, UpdateFeaturesDto } from './models'; |
|||
import { RestService } from '@abp/ng.core'; |
|||
import { Injectable } from '@angular/core'; |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root', |
|||
}) |
|||
export class FeaturesService { |
|||
apiName = 'AbpFeatureManagement'; |
|||
|
|||
get = (providerName: string, providerKey: string) => |
|||
this.restService.request<any, GetFeatureListResultDto>({ |
|||
method: 'GET', |
|||
url: '/api/feature-management/features', |
|||
params: { providerName, providerKey }, |
|||
}, |
|||
{ apiName: this.apiName }); |
|||
|
|||
update = (providerName: string, providerKey: string, input: UpdateFeaturesDto) => |
|||
this.restService.request<any, void>({ |
|||
method: 'PUT', |
|||
url: '/api/feature-management/features', |
|||
params: { providerName, providerKey }, |
|||
body: input, |
|||
}, |
|||
{ apiName: this.apiName }); |
|||
|
|||
constructor(private restService: RestService) {} |
|||
} |
|||
@ -0,0 +1,2 @@ |
|||
export * from './features.service'; |
|||
export * from './models'; |
|||
@ -0,0 +1,36 @@ |
|||
import type { IStringValueType } from '../validation/string-values/models'; |
|||
|
|||
export interface FeatureDto { |
|||
name: string; |
|||
displayName: string; |
|||
value: string; |
|||
provider: FeatureProviderDto; |
|||
description: string; |
|||
valueType: IStringValueType; |
|||
depth: number; |
|||
parentName: string; |
|||
} |
|||
|
|||
export interface FeatureGroupDto { |
|||
name: string; |
|||
displayName: string; |
|||
features: FeatureDto[]; |
|||
} |
|||
|
|||
export interface FeatureProviderDto { |
|||
name: string; |
|||
key: string; |
|||
} |
|||
|
|||
export interface GetFeatureListResultDto { |
|||
groups: FeatureGroupDto[]; |
|||
} |
|||
|
|||
export interface UpdateFeatureDto { |
|||
name: string; |
|||
value: string; |
|||
} |
|||
|
|||
export interface UpdateFeaturesDto { |
|||
features: UpdateFeatureDto[]; |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,2 @@ |
|||
export * as FeatureManagement from './feature-management'; |
|||
export * as Validation from './validation'; |
|||
@ -0,0 +1 @@ |
|||
export * as StringValues from './string-values'; |
|||
@ -0,0 +1 @@ |
|||
export * from './models'; |
|||
@ -0,0 +1,13 @@ |
|||
|
|||
export interface IStringValueType { |
|||
name: string; |
|||
item: object; |
|||
properties: Record<string, object>; |
|||
validator: IValueValidator; |
|||
} |
|||
|
|||
export interface IValueValidator { |
|||
name: string; |
|||
item: object; |
|||
properties: Record<string, object>; |
|||
} |
|||
@ -1,3 +1,5 @@ |
|||
export * from './lib/feature-management.module'; |
|||
export * from './lib/components'; |
|||
export * from './lib/enums/components'; |
|||
export * from './lib/proxy/feature-management'; |
|||
export * from './lib/proxy/validation/string-values'; |
|||
|
|||
@ -1,17 +1,8 @@ |
|||
{ |
|||
"extends": "../../tslint.json", |
|||
"rules": { |
|||
"directive-selector": [ |
|||
true, |
|||
"attribute", |
|||
"abp", |
|||
"camelCase" |
|||
], |
|||
"component-selector": [ |
|||
true, |
|||
"element", |
|||
"abp", |
|||
"kebab-case" |
|||
] |
|||
"interface-name": false, |
|||
"directive-selector": [true, "attribute", "abp", "camelCase"], |
|||
"component-selector": [true, "element", "abp", "kebab-case"] |
|||
} |
|||
} |
|||
|
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue