@progress/kendo-angular-spreadsheet
Version:
A Spreadsheet Component for Angular
71 lines (70 loc) • 3.78 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { InjectionToken } from "@angular/core";
import { commandIcons, commandSVGIcons } from './command-icons';
const DEFAULT_FONT_FAMILY = 'Arial';
const DEFAULT_FONT_SIZE = 12;
/**
* @hidden
*/
export const DEFAULT_FONT_VALUES = {
fontSize: DEFAULT_FONT_SIZE,
fontFamily: DEFAULT_FONT_FAMILY
};
/**
* @hidden
*/
export const FONT_FAMILIES = ['Arial', 'Courier New', 'Georgia', 'Times New Roman', 'Trebuchet MS', 'Verdana'];
/**
* @hidden
*/
export const FONT_SIZES = [8, 9, 10, 11, 12, 13, 14, 16, 18, 20, 22, 24, 26, 28, 36, 48, 72];
/**
* @hidden
*/
export const FONT_DATA = {
fontFamily: FONT_FAMILIES,
fontSize: FONT_SIZES
};
/**
* @hidden
*/
export const FORMATS = [
{ text: 'Automatic', value: null },
{ text: 'Text', value: '@' },
{ text: 'Number', value: '#,0.00' },
{ text: 'Percent', value: '0.00%' },
{ text: 'Financial', value: '_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)' },
{ text: 'Currency', value: '$#,##0.00;[Red]$#,##0.00' },
{ text: 'Date', value: 'm/d/yyyy' },
{ text: 'Time', value: 'h:mm:ss AM/PM' },
{ text: 'Date time', value: 'm/d/yyyy h:mm' },
{ text: 'Duration', value: '[h]:mm:ss' }
];
/**
* @hidden
*/
export const ALIGNS = [
{ icon: commandIcons.alignLeft, svgIcon: commandSVGIcons.alignLeft, textKey: 'Align Left', commandName: 'textAlign', value: 'left', cssClass: '', commandId: 'alignLeft' },
{ icon: commandIcons.alignCenter, svgIcon: commandSVGIcons.alignCenter, textKey: 'Align Center', commandName: 'textAlign', value: 'center', cssClass: '', commandId: 'alignCenter' },
{ icon: commandIcons.alignRight, svgIcon: commandSVGIcons.alignRight, textKey: 'Align Right', commandName: 'textAlign', value: 'right', cssClass: '', commandId: 'alignRight' },
{ icon: commandIcons.alignJustify, svgIcon: commandSVGIcons.alignJustify, textKey: 'Align Justify', commandName: 'textAlign', value: 'justify', cssClass: '', commandId: 'alignJustify' },
{ icon: commandIcons.alignTop, svgIcon: commandSVGIcons.alignTop, textKey: 'Align Top', commandName: 'verticalAlign', value: 'top', cssClass: '', commandId: 'alignTop' },
{ icon: commandIcons.alignMiddle, svgIcon: commandSVGIcons.alignMiddle, textKey: 'Align Middle', commandName: 'verticalAlign', value: 'center', cssClass: '', commandId: 'alignMiddle' },
{ icon: commandIcons.alignBottom, svgIcon: commandSVGIcons.alignBottom, textKey: 'Align Bottom', commandName: 'verticalAlign', value: 'bottom', cssClass: '', commandId: 'alignBottom' }
];
/**
* @hidden
*/
export const MERGE = [
{ icon: commandIcons.mergeAll, svgIcon: commandSVGIcons.mergeAll, textKey: 'Merge all', commandName: 'cells', value: 'cells', disabled: false, commandId: 'mergeAll' },
{ icon: commandIcons.mergeHorizontally, svgIcon: commandSVGIcons.mergeHorizontally, textKey: 'Merge horizontally', commandName: 'horizontally', value: 'horizontally', disabled: false, commandId: 'mergeHorizontally' },
{ icon: commandIcons.mergeVertically, svgIcon: commandSVGIcons.mergeVertically, textKey: 'Merge vertically', commandName: 'vertically', value: 'vertically', disabled: false, commandId: 'mergeVertically' },
{ icon: commandIcons.unmerge, svgIcon: commandSVGIcons.unmerge, textKey: 'Unmerge', commandName: 'unmerge', value: 'unmerge', disabled: false, commandId: 'unmerge' }
];
/**
* @hidden
*/
export const MY_TOKEN = new InjectionToken('COMMAND_TOKEN');