| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | 1× 1× 1× 1× 1× 1× 1× 1× 1× 1× 51× 2× 2× 1× 1× 3× 3× 3× 3× 1× 1× 1× 1× 2× 2× 2× 2× 1× 1× 1× 1× 1× 1× 2× 2× 2× 2× 1× 1× 1× 1× 1× 1× 1× 1× 1× 1× 1× 1× 1× 1× 1× 1× 1× 1× 20× 20× 51× 1× 1× 9698× 9698× 155168× 9698× 1× | 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;
});
|