define(["require", "exports", "./enum"], function (require, exports, enum_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var CalculateCommon = (function () {
function CalculateCommon(parent) {
this.parent = parent;
}
CalculateCommon.prototype.getModuleName = function () {
return 'calc-common';
};
return CalculateCommon;
}());
exports.CalculateCommon = CalculateCommon;
function isUndefined(value) {
return ('undefined' === typeof value);
}
exports.isUndefined = isUndefined;
function getSkeletonVal(value) {
switch (value) {
case 'dd-MMM-yyyy':
case 'dd MMM yyyy':
value = 'medium';
break;
case 'MMM yyyy':
value = 'yMMM';
break;
case 'MM/dd/yyyy':
case 'dd/MM/yyyy':
case 'dd/MM/yy':
value = 'short';
break;
case 'dddd MMMM dd yyyy':
case 'dd MMMM yyyy':
value = 'long';
break;
case 'd MMMM yyyy':
value = 'yMMMd';
break;
case 'yyyy':
value = 'y';
break;
case 'h:mm':
value = 'Hm';
break;
case 'h:mm tt':
value = 'hm';
break;
case 'h':
value = 'H';
break;
case 'h tt':
value = 'h';
break;
case 'dddd':
value = 'E';
break;
case 'h:mm:ss tt':
value = 'hms';
break;
case 'h:mm:ss':
value = 'Hms';
break;
case 'd':
value = 'd';
break;
case 'd dddd':
value = 'Ed';
break;
case 'M':
value = 'M';
break;
case 'Md':
value = 'Md';
break;
case 'MMM':
value = 'MMM';
break;
case 'ddd MMM d':
value = 'MMMEd';
break;
case 'MMM d':
value = 'MMMd';
break;
case 'M/yyyy':
value = 'yM';
break;
case 'ddd':
value = 'E';
break;
default:
value = '';
break;
}
return value;
}
exports.getSkeletonVal = getSkeletonVal;
function isExternalFileLink(formula) {
var isExternalFile = false;
for (var format in enum_1.ExcelFileFormats) {
Iif (formula.indexOf('.' + format + ']') > -1) {
isExternalFile = true;
break;
}
}
return isExternalFile;
}
exports.isExternalFileLink = isExternalFileLink;
});
|