UNPKG

@gsp-cmp/ccmp-ui

Version:

CCMP UI Component Library for Angular

929 lines (910 loc) 39.7 kB
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@gsp-cmp/common-component'), require('@gsp-cmp/wscmp-models'), require('@angular/common'), require('@farris/ui-dialog'), require('@farris/ui-messager'), require('@farris/ui-notify'), require('@farris/ui-datagrid'), require('@farris/ui-modal'), require('@angular/common/http'), require('rxjs/operators'), require('@farris/rtf'), require('@angular/core')) : typeof define === 'function' && define.amd ? define('@gsp-cmp/ccmp-ui', ['exports', '@gsp-cmp/common-component', '@gsp-cmp/wscmp-models', '@angular/common', '@farris/ui-dialog', '@farris/ui-messager', '@farris/ui-notify', '@farris/ui-datagrid', '@farris/ui-modal', '@angular/common/http', 'rxjs/operators', '@farris/rtf', '@angular/core'], factory) : (factory((global['gsp-cmp'] = global['gsp-cmp'] || {}, global['gsp-cmp']['ccmp-ui'] = {}),global.commonComponent,global.wscmpModels,global.ng.common,global.uiDialog,global.i1,global.i2,global.uiDatagrid,global.i2$1,global.ng.common.http,global.rxjs.operators,global.rtf,global.ng.core)); }(this, (function (exports,commonComponent,wscmpModels,common,uiDialog,i1,i2,uiDatagrid,i2$1,i3,operators,rtf,i0) { 'use strict'; /** * @fileoverview added by tsickle * Generated from: lib/i18n/assets/en.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** @type {?} */ var EnI18nSource = { 'operation_code': 'Operation Code', 'operation_name': 'Operation Name', 'operation_list': 'Operation List', 'operation_choose': 'Please select a widget action', 'confirm': 'OK', 'cancel': 'Cancel' }; /** * @fileoverview added by tsickle * Generated from: lib/i18n/assets/zh-CHS.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** @type {?} */ var ZHCHSI18nSource = { 'operation_code': '操作编号', 'operation_name': '操作名称', 'operation_list': '操作列表', 'operation_choose': '请选择构件操作', 'confirm': '确定', 'cancel': '取消' }; /** * @fileoverview added by tsickle * Generated from: lib/i18n/assets/zh-CHT.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** @type {?} */ var ZHCHTI18nSource = { 'operation_code': '操作編號', 'operation_name': '操作名稱', 'operation_list': '操作列表', 'operation_choose': '請選擇構件操作', 'confirm': '確定', 'cancel': '取消' }; /** * @fileoverview added by tsickle * Generated from: lib/i18n/i18n-translate-service.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var LangCode = /** @class */ (function () { function LangCode() { } LangCode.en = 'en'; LangCode.zhCHS = 'zh-CHS'; LangCode.zhCHT = 'zh-CHT'; return LangCode; }()); var I18nTranslateService = /** @class */ (function () { function I18nTranslateService(notify) { this.notify = notify; this.i18nSource = new Map(); /** @type {?} */ var localLang = notify.localeService.localeId; this.langCode = localLang ? localLang : LangCode.zhCHS; this.i18nSource.set(LangCode.en, EnI18nSource); this.i18nSource.set(LangCode.zhCHS, ZHCHSI18nSource); this.i18nSource.set(LangCode.zhCHT, ZHCHTI18nSource); } /** * @param {?} value * @return {?} */ I18nTranslateService.prototype.instant = /** * @param {?} value * @return {?} */ function (value) { if (!value) { return ''; } /** @type {?} */ var i18nValue = this.getI18nValue(value); // 未获取到则返回传入的值 if (!i18nValue) { return value; } return i18nValue; }; /** * 读取配置文件中的国际化资源,未获取到则返回'' */ /** * 读取配置文件中的国际化资源,未获取到则返回'' * @private * @param {?} value * @return {?} */ I18nTranslateService.prototype.getI18nValue = /** * 读取配置文件中的国际化资源,未获取到则返回'' * @private * @param {?} value * @return {?} */ function (value) { /** @type {?} */ var i18nSource = this.i18nSource.get(this.langCode); return i18nSource ? i18nSource[value] : ''; }; return I18nTranslateService; }()); /** * @fileoverview added by tsickle * Generated from: lib/view-utils/view-utils.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var ViewUtils = /** @class */ (function () { function ViewUtils(messagerService, notify) { this.messagerService = messagerService; this.notify = notify; this.translateService = new I18nTranslateService(notify); } /** * 获取模态框配置信息 * @param btnRef 按钮模板引用 * @param title 模态框标题 * @param options 配置项,暂未使用 */ /** * 获取模态框配置信息 * @param {?} btnRef 按钮模板引用 * @param {?=} options 配置项,暂未使用 * @return {?} */ ViewUtils.prototype.getModalConfig = /** * 获取模态框配置信息 * @param {?} btnRef 按钮模板引用 * @param {?=} options 配置项,暂未使用 * @return {?} */ function (btnRef, options) { return { title: (options && options.title) ? options.title : this.translateService.instant('operation_list'), width: (options && options.width) ? options.width : 450, height: (options && options.height) ? options.width : 500, resizable: (options && options.resizable) ? options.resizable : true, showButtons: true, showMaxButton: false, enableScroll: false, buttons: btnRef }; }; /** * @param {?} data * @return {?} */ ViewUtils.prototype.showObseleteDialog = /** * @param {?} data * @return {?} */ function (data) { this.messagerService.show('warning', "\u901A\u7528\u6784\u4EF6" + data.code + "\u5DF2\u8FC7\u65F6\uFF01\n \u5347\u7EA7\u6B65\u9AA4\uFF1A\n 1. \u91CD\u65B0\u5B9A\u4E49\u901A\u7528\u6784\u4EF6\u5143\u6570\u636E;\n 2. \u5F00\u53D1\u65B0\u7248\u672C\u6784\u4EF6\u4EE3\u7801\u3002\n \u8BF7\u53C2\u8003GSPCloud\u5F00\u53D1\u6587\u6863->\u9AD8\u7EA7\u5F00\u53D1->\u6784\u4EF6\u5F00\u53D1->\u901A\u7528\u6784\u4EF6\u5F00\u53D1", { safeHtml: false }); }; /** * @param {?} message * @param {?} infoType * @param {?} title * @param {?} timeout * @return {?} */ ViewUtils.prototype.showInfo = /** * @param {?} message * @param {?} infoType * @param {?} title * @param {?} timeout * @return {?} */ function (message, infoType, title, timeout) { this.notify.config.position = 'top-center'; if (infoType == 'success') { this.notify.success(( /** @type {?} */({ title: title, msg: message, timeout: timeout }))); } else if (infoType == 'info') { this.notify.info(( /** @type {?} */({ title: title, msg: message, timeout: timeout }))); } else if (infoType == 'warning') { this.notify.warning(( /** @type {?} */({ title: title, msg: message, timeout: timeout }))); } else if (infoType == 'error') { this.notify.error(( /** @type {?} */({ title: title, msg: message, timeout: timeout }))); } }; ViewUtils.decorators = [ { type: i0.Injectable, args: [{ providedIn: 'root' },] } ]; /** @nocollapse */ ViewUtils.ctorParameters = function () { return [ { type: i1.MessagerService }, { type: i2.NotifyService } ]; }; /** @nocollapse */ ViewUtils.ngInjectableDef = i0.defineInjectable({ factory: function ViewUtils_Factory() { return new ViewUtils(i0.inject(i1.MessagerService), i0.inject(i2.NotifyService)); }, token: ViewUtils, providedIn: "root" }); return ViewUtils; }()); /** * @fileoverview added by tsickle * Generated from: lib/convertor/convertor.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var ComponentConvertor = /** @class */ (function () { function ComponentConvertor() { } /** * @param {?} entity * @param {?} ctx * @return {?} */ ComponentConvertor.prototype.convertorToObject = /** * @param {?} entity * @param {?} ctx * @return {?} */ function (entity, ctx) { /** @type {?} */ var covertor = new commonComponent.GspComponentConvertor(); /** @type {?} */ var obj = new Object(); covertor.convertToObject(obj, entity, ctx); return obj; }; /** * @param {?} obj * @param {?} ctx * @return {?} */ ComponentConvertor.prototype.initFromObject = /** * @param {?} obj * @param {?} ctx * @return {?} */ function (obj, ctx) { /** @type {?} */ var covertor = new commonComponent.GspComponentConvertor(); /** @type {?} */ var entity = new commonComponent.GspComponent(); covertor.initFromObject(entity, obj, ctx); return entity; }; return ComponentConvertor; }()); /** * @fileoverview added by tsickle * Generated from: lib/params/component-info.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var ComponentInfo = /** @class */ (function () { function ComponentInfo() { } /** * @param {?} obj * @return {?} */ ComponentInfo.prototype.init = /** * @param {?} obj * @return {?} */ function (obj) { this.id = obj['id']; this.obselete = obj['obselete']; this.code = obj['code']; this.name = obj['name']; this.nameSpace = obj['nameSpace']; this.fileName = obj['fileName']; this.type = obj['type']; this.bizobjectID = obj['bizobjectID']; this.language = obj['language']; if (obj['metadata']) { /** @type {?} */ var convertor = new ComponentConvertor(); switch (this.type) { case 'CommonComponent': /** @type {?} */ var ctx = new commonComponent.DefaultGspComponentSerializeContext(); this.metadata = convertor.initFromObject(obj['metadata'], ctx); break; case 'WebServiceComponent': /** @type {?} */ var ctx1 = new wscmpModels.WebServiceComponentSerializerContext(); this.metadata = convertor.initFromObject(obj['metadata'], ctx1); break; default: throw new Error('不支持的构件类型' + this.type); } } }; return ComponentInfo; }()); /** * @fileoverview added by tsickle * Generated from: lib/ccmp-selector/common-component-selector.component.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var CommonComponentSelectorComponent = /** @class */ (function () { function CommonComponentSelectorComponent(utils) { this.utils = utils; this.selectedIds = []; this.columns = []; this.multiSelection = false; this.confirmEmitter = new i0.EventEmitter(); this.closeEmitter = new i0.EventEmitter(); } Object.defineProperty(CommonComponentSelectorComponent.prototype, "componentInfo", { set: /** * @param {?} _componentInfo * @return {?} */ function (_componentInfo) { this._componentInfo = _componentInfo; switch (this._componentInfo.type) { case 'CommonComponent': this.CommonComponentInit(this._componentInfo); break; case 'WebServiceComponent': this.WebServiceComponentInit(this._componentInfo); break; default: throw new Error('不支持的构件类型' + this._componentInfo.type); } }, enumerable: true, configurable: true }); Object.defineProperty(CommonComponentSelectorComponent.prototype, "_options", { set: /** * @param {?} options * @return {?} */ function (options) { this.multiSelection = options && options.multiSelection || false; }, enumerable: true, configurable: true }); /** * @return {?} */ CommonComponentSelectorComponent.prototype.ngOnInit = /** * @return {?} */ function () { this._componentInfo = this._componentInfo || new ComponentInfo(); this.columnsInit(); }; /** * @return {?} */ CommonComponentSelectorComponent.prototype.columnsInit = /** * @return {?} */ function () { this.columns = [ { field: 'code', width: 100, title: this.utils.translateService.instant('operation_code') }, { field: 'name', width: 100, title: this.utils.translateService.instant('operation_name') }, ]; }; /** * @param {?} _componentInfo * @return {?} */ CommonComponentSelectorComponent.prototype.CommonComponentInit = /** * @param {?} _componentInfo * @return {?} */ function (_componentInfo) { /** @type {?} */ var convertor = new ComponentConvertor(); /** @type {?} */ var ctx = new commonComponent.DefaultGspComponentSerializeContext(); this.metadata = convertor.initFromObject(convertor.convertorToObject(_componentInfo.metadata, ctx), ctx); this.metadata.operations = new Array(); }; /** * @param {?} _componentInfo * @return {?} */ CommonComponentSelectorComponent.prototype.WebServiceComponentInit = /** * @param {?} _componentInfo * @return {?} */ function (_componentInfo) { /** @type {?} */ var convertor = new ComponentConvertor(); /** @type {?} */ var ctx = new wscmpModels.WebServiceComponentSerializerContext(); this.metadata = convertor.initFromObject(convertor.convertorToObject(_componentInfo.metadata, ctx), ctx); this.metadata.operations = new Array(); }; /** * @return {?} */ CommonComponentSelectorComponent.prototype.confirm = /** * @return {?} */ function () { var _this = this; if (this.selectedIds.length <= 0) { this.utils.showInfo(this.utils.translateService.instant('operation_choose'), 'info', '', 1500); return; } this.metadata.operations = []; this.selectedIds.map(( /** * @param {?} x * @return {?} */function (x) { /** @type {?} */ var operation = _this._componentInfo.metadata.operations.find(( /** * @param {?} op * @return {?} */function (op) { return op.code === x; })); if (operation) { _this.metadata.operations.push(operation); } })); if (this.dialog) { this.dialog.close(); } this.confirmEmitter.emit(this.metadata); this.selectedIds = []; }; /** * @return {?} */ CommonComponentSelectorComponent.prototype.close = /** * @return {?} */ function () { if (this.dialog) { this.dialog.close(); } this.closeEmitter.emit(); }; /** * @param {?} row * @return {?} */ CommonComponentSelectorComponent.prototype.checkedHandler = /** * @param {?} row * @return {?} */ function (row) { /** @type {?} */ var index = this.selectedIds.findIndex(( /** * @param {?} x * @return {?} */function (x) { return x === row.id; })); if (index == (-1)) { this.selectedIds.push(row.id); } }; /** * @param {?} row * @return {?} */ CommonComponentSelectorComponent.prototype.unCheckedHandler = /** * @param {?} row * @return {?} */ function (row) { /** @type {?} */ var index = this.selectedIds.findIndex(( /** * @param {?} x * @return {?} */function (x) { return x === row.id; })); if (index !== (-1)) { this.selectedIds.splice(index, 1); } }; /** * @param {?} rows * @return {?} */ CommonComponentSelectorComponent.prototype.checkAllHandler = /** * @param {?} rows * @return {?} */ function (rows) { var _this = this; if (rows && rows.length > 0) { rows.forEach(( /** * @param {?} row * @return {?} */function (row) { /** @type {?} */ var index = _this.selectedIds.findIndex(( /** * @param {?} x * @return {?} */function (x) { return x === row.id; })); if (index == (-1)) { _this.selectedIds.push(row.id); } })); } }; /** * @param {?} rows * @return {?} */ CommonComponentSelectorComponent.prototype.unCheckAllHandler = /** * @param {?} rows * @return {?} */ function (rows) { var _this = this; if (rows && rows.length > 0) { rows.forEach(( /** * @param {?} row * @return {?} */function (row) { /** @type {?} */ var index = _this.selectedIds.findIndex(( /** * @param {?} x * @return {?} */function (x) { return x === row.id; })); if (index !== (-1)) { _this.selectedIds.splice(index, 1); } })); } }; CommonComponentSelectorComponent.decorators = [ { type: i0.Component, args: [{ selector: 'common-component-selector', template: "<div class=\"d-flex\" style=\"position: absolute;top: 0;bottom: 0;left: 0;right: 0;\">\r\n <div class=\"f-utils-fill selector-modal\">\r\n <farris-datagrid #dg=\"datagrid\" [showLineNumber]=\"true\" [fit]=\"true\" [pagination]=\"true\" [virtualized]=\"false\"\r\n [fitColumns]=\"true\" [showAllCheckbox]=\"true\" [selectOnCheck]=\"true\" [showCheckbox]=\"true\" [idField]=\"'code'\"\r\n [multiSelect]=\"multiSelection\" [showPageList]=\"true\" [onlySelectSelf]=\"true\" [columns]=\"columns\" [data]=\"_componentInfo.metadata.operations\"\r\n (checkAll)=\"checkAllHandler($event)\" (unCheckAll)=\"unCheckAllHandler($event)\" (checked)=\"checkedHandler($event)\" (unChecked)=\"unCheckedHandler($event)\">\r\n </farris-datagrid>\r\n </div>\r\n</div>\r\n\r\n\r\n<ng-template #btnRef>\r\n <div style=\"width: 100%;line-height: 50px; text-align: center;min-width: 140px;\"> \r\n <button class=\"btn btn-primary\" (click)=confirm() style=\"float:right;margin-right: 5px\">{{'confirm'|i18n}}</button>\r\n <button class=\"btn btn-secondary\" (click)=\"close()\" style=\"float:right;margin-right: 5px\">{{'cancel'|i18n}}</button>\r\n </div>\r\n</ng-template>", styles: [".selector-modal{padding:0 8px;width:100%;display:flex}"] }] } ]; /** @nocollapse */ CommonComponentSelectorComponent.ctorParameters = function () { return [ { type: ViewUtils } ]; }; CommonComponentSelectorComponent.propDecorators = { componentInfo: [{ type: i0.Input }], dg: [{ type: i0.ViewChild, args: ['dg',] }], btnRef: [{ type: i0.ViewChild, args: ['btnRef',] }], confirmEmitter: [{ type: i0.Output }], closeEmitter: [{ type: i0.Output }] }; return CommonComponentSelectorComponent; }()); /** * @fileoverview added by tsickle * Generated from: lib/ccmp-ui.rt-service.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var CommonComponentUiRTService = /** @class */ (function () { function CommonComponentUiRTService(resolver, injector, util, modalService, http) { this.resolver = resolver; this.injector = injector; this.util = util; this.modalService = modalService; this.http = http; } /** * 通用构件操作选择器 * @param metadataId 通用构件元数据 * @param sessionId 功能sessionId * @param options UI可选配置参数 */ /** * 通用构件操作选择器 * @param {?} metadataId 通用构件元数据 * @param {?} sessionId 功能sessionId * @param {?=} options UI可选配置参数 * @return {?} */ CommonComponentUiRTService.prototype.openSelector = /** * 通用构件操作选择器 * @param {?} metadataId 通用构件元数据 * @param {?} sessionId 功能sessionId * @param {?=} options UI可选配置参数 * @return {?} */ function (metadataId, sessionId, options) { var _this = this; return this.getComponentInfo(metadataId, sessionId).pipe(operators.map(( /** * @param {?} data * @return {?} */function (data) { if (data.obselete) { _this.util.showObseleteDialog(data); return { confirmEvent: new i0.EventEmitter(), closeEvent: new i0.EventEmitter() }; } else { return _this.create(data, options); } }))); }; /** * 获取构件信息 * @param metadataId 构件元数据ID * @param sessionId 功能sessionid */ /** * 获取构件信息 * @param {?} metadataId 构件元数据ID * @param {?} sessionId 功能sessionid * @return {?} */ CommonComponentUiRTService.prototype.getComponentInfo = /** * 获取构件信息 * @param {?} metadataId 构件元数据ID * @param {?} sessionId 功能sessionid * @return {?} */ function (metadataId, sessionId) { /** @type {?} */ var headers = new i3.HttpHeaders(); headers.set("sessionId", sessionId); /** @type {?} */ var url = "/api/runtime/sys/v1.0/common-component/component-info/" + metadataId; return this.http.get(rtf.BasePathService.convertPath(url), { headers: headers }).pipe(operators.map(( /** * @param {?} data * @return {?} */function (data) { if (data) { /** @type {?} */ var cmpInfo = new ComponentInfo(); cmpInfo.init(data); return cmpInfo; } }))); }; /** * @private * @param {?} componentInfo * @param {?} options * @return {?} */ CommonComponentUiRTService.prototype.create = /** * @private * @param {?} componentInfo * @param {?} options * @return {?} */ function (componentInfo, options) { /** @type {?} */ var fac = this.resolver.resolveComponentFactory(CommonComponentSelectorComponent); /** @type {?} */ var cmpRef = fac.create(this.injector); cmpRef.instance.componentInfo = componentInfo; cmpRef.instance._options = options; /** @type {?} */ var modalConfig = this.util.getModalConfig(cmpRef.instance.btnRef, options); /** @type {?} */ var dialog = this.modalService.show(cmpRef, modalConfig); cmpRef.instance.dialog = dialog; return { confirmEvent: cmpRef.instance.confirmEmitter, closeEvent: cmpRef.instance.closeEmitter }; }; CommonComponentUiRTService.decorators = [ { type: i0.Injectable, args: [{ providedIn: 'root' },] } ]; /** @nocollapse */ CommonComponentUiRTService.ctorParameters = function () { return [ { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: ViewUtils }, { type: i2$1.BsModalService }, { type: i3.HttpClient } ]; }; /** @nocollapse */ CommonComponentUiRTService.ngInjectableDef = i0.defineInjectable({ factory: function CommonComponentUiRTService_Factory() { return new CommonComponentUiRTService(i0.inject(i0.ComponentFactoryResolver), i0.inject(i0.INJECTOR), i0.inject(ViewUtils), i0.inject(i2$1.BsModalService), i0.inject(i3.HttpClient)); }, token: CommonComponentUiRTService, providedIn: "root" }); return CommonComponentUiRTService; }()); /** * @fileoverview added by tsickle * Generated from: lib/ccmp-ui.dt-service.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var CommonComponentUiDTService = /** @class */ (function () { function CommonComponentUiDTService(resolver, injector, util, modalService, http) { this.resolver = resolver; this.injector = injector; this.util = util; this.modalService = modalService; this.http = http; } /** * 通用构件操作选择器 * @param metadataId 通用构件元数据 * @param sessionId 功能sessionId * @param options UI可选配置参数 */ /** * 通用构件操作选择器 * @param {?} metadataId 通用构件元数据 * @param {?} sessionId 功能sessionId * @param {?=} options UI可选配置参数 * @return {?} */ CommonComponentUiDTService.prototype.openSelector = /** * 通用构件操作选择器 * @param {?} metadataId 通用构件元数据 * @param {?} sessionId 功能sessionId * @param {?=} options UI可选配置参数 * @return {?} */ function (metadataId, sessionId, options) { var _this = this; return this.getComponentInfo(metadataId, sessionId).pipe(operators.map(( /** * @param {?} data * @return {?} */function (data) { if (data.obselete) { _this.util.showObseleteDialog(data); return { confirmEvent: new i0.EventEmitter(), closeEvent: new i0.EventEmitter() }; } else { return _this.create(data, options); } }))); }; /** * 获取构件信息 * @param metadataId 构件元数据ID * @param sessionId 功能sessionid */ /** * 获取构件信息 * @param {?} metadataId 构件元数据ID * @param {?} sessionId 功能sessionid * @return {?} */ CommonComponentUiDTService.prototype.getComponentInfo = /** * 获取构件信息 * @param {?} metadataId 构件元数据ID * @param {?} sessionId 功能sessionid * @return {?} */ function (metadataId, sessionId) { /** @type {?} */ var headers = new i3.HttpHeaders(); headers.set("sessionId", sessionId); /** @type {?} */ var url = "/api/dev/main/v1.0/common-component/component-info/" + metadataId; return this.http.get(rtf.BasePathService.convertPath(url), { headers: headers }).pipe(operators.map(( /** * @param {?} data * @return {?} */function (data) { if (data) { /** @type {?} */ var cmpInfo = new ComponentInfo(); cmpInfo.init(data); return cmpInfo; } }))); }; /** * @private * @param {?} componentInfo * @param {?} options * @return {?} */ CommonComponentUiDTService.prototype.create = /** * @private * @param {?} componentInfo * @param {?} options * @return {?} */ function (componentInfo, options) { /** @type {?} */ var fac = this.resolver.resolveComponentFactory(CommonComponentSelectorComponent); /** @type {?} */ var cmpRef = fac.create(this.injector); cmpRef.instance._options = options; cmpRef.instance.componentInfo = componentInfo; /** @type {?} */ var modalConfig = this.util.getModalConfig(cmpRef.instance.btnRef, options); /** @type {?} */ var dialog = this.modalService.show(cmpRef, modalConfig); cmpRef.instance.dialog = dialog; return { confirmEvent: cmpRef.instance.confirmEmitter, closeEvent: cmpRef.instance.closeEmitter }; }; CommonComponentUiDTService.decorators = [ { type: i0.Injectable, args: [{ providedIn: 'root' },] } ]; /** @nocollapse */ CommonComponentUiDTService.ctorParameters = function () { return [ { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: ViewUtils }, { type: i2$1.BsModalService }, { type: i3.HttpClient } ]; }; /** @nocollapse */ CommonComponentUiDTService.ngInjectableDef = i0.defineInjectable({ factory: function CommonComponentUiDTService_Factory() { return new CommonComponentUiDTService(i0.inject(i0.ComponentFactoryResolver), i0.inject(i0.INJECTOR), i0.inject(ViewUtils), i0.inject(i2$1.BsModalService), i0.inject(i3.HttpClient)); }, token: CommonComponentUiDTService, providedIn: "root" }); return CommonComponentUiDTService; }()); /** * @fileoverview added by tsickle * Generated from: lib/i18n/i18n-tranalate.pipe.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var I18nTranslatePipe = /** @class */ (function () { function I18nTranslatePipe(utils) { this.utils = utils; } /** * @param {?} value * @return {?} */ I18nTranslatePipe.prototype.transform = /** * @param {?} value * @return {?} */ function (value) { /** @type {?} */ var i18nValue = this.utils.translateService.instant(value); return i18nValue; }; I18nTranslatePipe.decorators = [ { type: i0.Pipe, args: [{ name: 'i18n' },] } ]; /** @nocollapse */ I18nTranslatePipe.ctorParameters = function () { return [ { type: ViewUtils } ]; }; return I18nTranslatePipe; }()); /** * @fileoverview added by tsickle * Generated from: lib/ccmp-ui.module.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ var CommonComponentUiModule = /** @class */ (function () { function CommonComponentUiModule() { } CommonComponentUiModule.decorators = [ { type: i0.NgModule, args: [{ declarations: [ CommonComponentSelectorComponent, I18nTranslatePipe ], imports: [ i2.NotifyModule, common.CommonModule, i3.HttpClientModule, i2$1.ModalModule.forRoot(), uiDialog.FarrisDialogModule, uiDatagrid.DatagridModule, i1.MessagerModule.forRoot(), ], entryComponents: [CommonComponentSelectorComponent], providers: [ CommonComponentUiRTService, CommonComponentUiDTService, ViewUtils ], exports: [CommonComponentSelectorComponent] },] } ]; return CommonComponentUiModule; }()); /** * @fileoverview added by tsickle * Generated from: lib/params/selector-result.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * 选择器返回结果 */ var /** * 选择器返回结果 */ SelectorResult = /** @class */ (function () { function SelectorResult() { } return SelectorResult; }()); /** * @fileoverview added by tsickle * Generated from: public-api.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ /** * @fileoverview added by tsickle * Generated from: gsp-cmp-ccmp-ui.ts * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc */ exports.CommonComponentUiModule = CommonComponentUiModule; exports.CommonComponentSelectorComponent = CommonComponentSelectorComponent; exports.CommonComponentUiRTService = CommonComponentUiRTService; exports.CommonComponentUiDTService = CommonComponentUiDTService; exports.SelectorResult = SelectorResult; exports.ɵb = I18nTranslatePipe; exports.ɵa = ViewUtils; Object.defineProperty(exports, '__esModule', { value: true }); }))); //# sourceMappingURL=gsp-cmp-ccmp-ui.umd.js.map