本文整理汇总了TypeScript中ag-grid-community._类的典型用法代码示例。如果您正苦于以下问题:TypeScript _类的具体用法?TypeScript _怎么用?TypeScript _使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了_类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1:
const buildSharedString = (textNode: string): XmlElement => ({
name: 'si',
children: [{
name: 't',
textNode: _.utf8_encode(_.escape(textNode.toString()))
}]
});
开发者ID:Hyeong-jin,项目名称:ag-grid,代码行数:7,代码来源:sharedStrings.ts
示例2: populateWithRenderer
private populateWithRenderer(value: any, valueFormatted: string): boolean {
let promise:Promise<ICellRendererComp> = this.cellRendererService.useRichSelectCellRenderer(this.columnDef, this.getGui(), {value: value, valueFormatted: valueFormatted});
let foundRenderer = _.exists(promise);
if (foundRenderer) {
promise.then(childComponent => {
if (childComponent && childComponent.destroy) {
this.addDestroyFunc(childComponent.destroy.bind(childComponent));
}
});
return true;
} else {
return false;
}
}
开发者ID:Hyeong-jin,项目名称:ag-grid,代码行数:15,代码来源:richSelectRow.ts
示例3: getMenuItems
private getMenuItems(node: RowNode, column: Column, value: any): (MenuItemDef|string)[] {
let defaultMenuOptions: string[];
if (Utils.exists(node)) {
defaultMenuOptions = [];
if (column) {
// only makes sense if column exists, could have originated from a row
defaultMenuOptions = ['copy','copyWithHeaders','paste', 'separator'];
}
// if user clicks a cell
let suppressExcel = this.gridOptionsWrapper.isSuppressExcelExport();
let suppressCsv = this.gridOptionsWrapper.isSuppressCsvExport();
let onIPad = _.isUserAgentIPad();
let anyExport: boolean = !onIPad && (!suppressExcel || !suppressCsv);
if (anyExport) {
defaultMenuOptions.push('export');
}
} else {
// if user clicks outside of a cell (eg below the rows, or not rows present)
// nothing to show, perhaps tool panels???
}
if (this.gridOptionsWrapper.getContextMenuItemsFunc()) {
let userFunc: GetContextMenuItems = this.gridOptionsWrapper.getContextMenuItemsFunc();
let params: GetContextMenuItemsParams = {
node: node,
column: column,
value: value,
defaultItems: defaultMenuOptions,
api: this.gridOptionsWrapper.getApi(),
columnApi: this.gridOptionsWrapper.getColumnApi(),
context: this.gridOptionsWrapper.getContext()
};
let menuItemsFromUser = userFunc(params);
return menuItemsFromUser;
} else {
return defaultMenuOptions;
}
}
开发者ID:Hyeong-jin,项目名称:ag-grid,代码行数:40,代码来源:contextMenu.ts
示例4: getPropertyVal
const getEffectStyle = (shadow?: [string, string, string, string, string]): XmlElement => {
const children: XmlElement[] = [];
if (shadow) {
const [blurRad, dist, dir, algn, rotWithShape] = shadow;
children.push({
name: 'a:outerShdw',
properties: {
rawMap: { blurRad, dist, dir, algn, rotWithShape }
},
children: [
getPropertyVal('srgbClr', '000000', [getPropertyVal('alpha', '63000')])
]
});
}
return {
name: 'a:effectStyle',
children: [_.assign({}, {
name: 'a:effectLst'
}, children.length ? {children} : {})]
};
};
开发者ID:Hyeong-jin,项目名称:ag-grid,代码行数:23,代码来源:formatScheme.ts
示例5: getTemplate
import {ExcelOOXMLTemplate, _} from 'ag-grid-community';
import xfFactory, {Xf} from './xf';
const cellStylesXfsFactory: ExcelOOXMLTemplate = {
getTemplate(xf: Xf[]) {
return {
name: "cellStyleXfs",
properties: {
rawMap: {
count: xf.length
}
},
children: _.map(xf, xfFactory.getTemplate)
};
}
};
export default cellStylesXfsFactory;
开发者ID:Hyeong-jin,项目名称:ag-grid,代码行数:18,代码来源:cellStyleXfs.ts
示例6: getTemplate
import {ExcelOOXMLTemplate, _} from 'ag-grid-community';
import sheetFactory from './sheet';
const sheetsFactory: ExcelOOXMLTemplate = {
getTemplate(names: string[]) {
return {
name: "sheets",
children: _.map(names, sheetFactory.getTemplate)
};
}
};
export default sheetsFactory;
开发者ID:Hyeong-jin,项目名称:ag-grid,代码行数:13,代码来源:sheets.ts
示例7: getTemplate
import {ExcelOOXMLTemplate, _} from 'ag-grid-community';
import fontFactory, {Font} from './font';
const fontsFactory: ExcelOOXMLTemplate = {
getTemplate(fonts: Font[]) {
return {
name: "fonts",
properties: {
rawMap: {
count: fonts.length
}
},
children: _.map(fonts, fontFactory.getTemplate)
};
}
};
export default fontsFactory;
开发者ID:Hyeong-jin,项目名称:ag-grid,代码行数:18,代码来源:fonts.ts
示例8: getTemplate
import {ExcelOOXMLTemplate, _} from 'ag-grid-community';
import fillFactory, {Fill} from './fill';
const fillsFactory: ExcelOOXMLTemplate = {
getTemplate(fills: Fill[]) {
return {
name: "fills",
properties: {
rawMap: {
count: fills.length
}
},
children: _.map(fills, fillFactory.getTemplate)
};
}
};
export default fillsFactory;
开发者ID:Hyeong-jin,项目名称:ag-grid,代码行数:18,代码来源:fills.ts
示例9: getExcelColumnName
if (pos < tableWidth) return fromCharCode(startCode + pos - 1) + fromCharCode(startCode + tableIdx - 1);
return getExcelColumnName(pos) + fromCharCode(startCode + tableIdx - 1);
};
const worksheetFactory: ExcelOOXMLTemplate = {
getTemplate(config: ExcelWorksheet) {
const {table} = config;
const {rows, columns} = table;
const mergedCells = getMergedCells(rows, columns);
const children = [].concat(
columns.length ? {
name: 'cols',
children: _.map(columns, columnFactory.getTemplate)
} : []
).concat(
rows.length ? {
name: 'sheetData',
children: _.map(rows, rowFactory.getTemplate)
} : []
).concat(
mergedCells.length ? {
name: 'mergeCells',
properties: {
rawMap: {
count: mergedCells.length
}
},
children: _.map(mergedCells, mergeCell.getTemplate)
开发者ID:Hyeong-jin,项目名称:ag-grid,代码行数:31,代码来源:worksheet.ts
示例10: getTemplate
import {ExcelOOXMLTemplate, ExcelRow, _} from 'ag-grid-community';
import cellFactory from './cell';
const rowFactory: ExcelOOXMLTemplate = {
getTemplate(config: ExcelRow) {
const {index, collapsed, hidden, height, outlineLevel, s, cells = []} = config;
const children = _.map(cells, cellFactory.getTemplate);
return {
name: "row",
properties: {
rawMap: {
r: index,
collapsed,
hidden: hidden ? '1' : '0',
ht: height,
customHeight: height != null ? '1' : '0',
s,
customFormat: s != null ? '1' : '0'
}
},
children
};
}
};
export default rowFactory;
开发者ID:Hyeong-jin,项目名称:ag-grid,代码行数:26,代码来源:row.ts
注:本文中的ag-grid-community._类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论