@farris/bef
Advanced tools
Comparing version 0.0.8-201810310900 to 0.0.9-20181105
@@ -0,0 +0,0 @@ function __export(m) { |
@@ -0,0 +0,0 @@ export * from './services/types'; |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"version": "0.0.8-201810310900", | ||
"version": "0.0.9-20181105", | ||
"license": "MIT", | ||
"author": { | ||
"name": "Witt, Lucus" | ||
"name": "疯狂秀才 && 平台季维涛" | ||
}, | ||
@@ -20,3 +20,3 @@ "name": "@farris/bef", | ||
}, | ||
"_id": "@farris/bef@0.0.1" | ||
"_id": "@farris/bef@0.0.9-20181105" | ||
} |
@@ -0,0 +0,0 @@ import { Type } from '@angular/core'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,9 +1,12 @@ | ||
import { Repository } from '@farris/devkit'; | ||
import { Observable } from 'rxjs/Observable'; | ||
import { ILookupHttpService, RemoteParams, LookupGridResult } from '@farris/ui'; | ||
import { BefRestService } from './bef_rest_service'; | ||
/** | ||
* 帮助Rest取数服务 | ||
*/ | ||
export declare class BefLookupRestService extends BefRestService implements ILookupHttpService { | ||
export declare class BefLookupRestService implements ILookupHttpService { | ||
private befRepository; | ||
constructor(repository: Repository<any>); | ||
getData(helpMetadataId: string, data?: RemoteParams): Observable<LookupGridResult>; | ||
private convert2TreeDataWithPathCode(data, layer?, parentPathCode?); | ||
} |
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var devkit_1 = require("@farris/devkit"); | ||
var core_1 = require("@angular/core"); | ||
var bef_rest_service_1 = require("./bef_rest_service"); | ||
/** | ||
* 帮助Rest取数服务 | ||
*/ | ||
var BefLookupRestService = /** @class */ (function (_super) { | ||
__extends(BefLookupRestService, _super); | ||
function BefLookupRestService() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
var BefLookupRestService = /** @class */ (function () { | ||
function BefLookupRestService(repository) { | ||
this.befRepository = repository; | ||
} | ||
BefLookupRestService.prototype.getData = function (helpMetadataId, data) { | ||
var url = this.baseUri + "/" + helpMetadataId; | ||
return this.request(url, 'GET', data); | ||
var tableName = helpMetadataId.split(',')[0]; | ||
var labelId = helpMetadataId.split(',')[1]; | ||
var url = this.befRepository.restService.baseUri + "/elementhelps/" + labelId; | ||
data = data || {}; | ||
return this.befRepository.restService.request(url, 'GET', { nodeCode: tableName, queryParam: JSON.stringify(data) }); | ||
}; | ||
BefLookupRestService.prototype.convert2TreeDataWithPathCode = function (data, layer, parentPathCode) { | ||
var _this = this; | ||
if (layer === void 0) { layer = 1; } | ||
if (parentPathCode === void 0) { parentPathCode = '01'; } | ||
var nodes = data.filter(function (d) { return d.layer === layer && d.pathcode === parentPathCode; }); | ||
if (layer > 1) { | ||
nodes = data.filter(function (d) { return d.layer === layer && d.pathcode.substr(0, (layer - 1) * 2) === parentPathCode; }); | ||
} | ||
if (nodes.length) { | ||
var treeNodes = nodes.map(function (n) { | ||
return { | ||
data: n, | ||
children: [] | ||
}; | ||
}); | ||
treeNodes.forEach(function (tn) { | ||
var _tns = _this.convert2TreeDataWithPathCode(data, tn.data.layer + 1, tn.data.pathcode); | ||
(_a = tn.children).push.apply(_a, _tns); | ||
var _a; | ||
}); | ||
return treeNodes; | ||
} | ||
}; | ||
BefLookupRestService.decorators = [ | ||
{ type: core_1.Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
BefLookupRestService.ctorParameters = function () { return [ | ||
{ type: devkit_1.Repository, }, | ||
]; }; | ||
return BefLookupRestService; | ||
}(bef_rest_service_1.BefRestService)); | ||
}()); | ||
exports.BefLookupRestService = BefLookupRestService; | ||
//# sourceMappingURL=bef_lookup.service.js.map |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":4,"metadata":{"BefLookupRestService":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"./bef_rest_service","name":"BefRestService","line":9,"character":42},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":8,"character":1}}],"members":{"getData":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":4,"metadata":{"BefLookupRestService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":9,"character":1}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@farris/devkit","name":"Repository","line":14,"character":28,"arguments":[{"__symbolic":"reference","name":"any"}]}]}],"getData":[{"__symbolic":"method"}],"convert2TreeDataWithPathCode":[{"__symbolic":"method"}]}}}}] |
@@ -0,0 +0,0 @@ import { HttpClient } from '@angular/common/http'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { HttpClient } from '@angular/common/http'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { HttpClient } from '@angular/common/http'; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ declare class EntityUtil { |
@@ -0,0 +0,0 @@ "use strict"; |
import { InjectionToken } from '@angular/core'; | ||
declare const BE_SERVER_URI_TOKEN: InjectionToken<string>; | ||
export { BE_SERVER_URI_TOKEN }; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ "use strict"; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2686724
20537
11