all files / spreadsheet/common/ module.js

100% Statements 71/71
100% Branches 58/58
100% Functions 3/3
100% Lines 71/71
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 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168   3224× 3224× 3224× 3224×   3224× 3206×         3224× 3213×         3224× 3198×         3224× 3208×       3208×         3224× 3216×         3224× 3217×         3224× 3216×         3224× 3214×   3224× 3218×         3224× 3214×         3224× 3215×         3224× 3221×         3224× 3221×         3224× 3220×         3224× 3216×   3224× 3216×         3224×       3224×       3224×       3224× 3217×         3224× 3223×         3224× 3217×         3224× 3212×   3224× 3217×   3224× 3207×   3224× 3211×   3224× 3216×   3224× 3217×   3224× 3221×   3224× 3217×   3224× 3210×   3224× 3212×        
define(["require", "exports", "../../workbook/common/module"], function (require, exports, module_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    function getRequiredModules(context) {
        var modules = [];
        pushBasicModules(context, modules);
        module_1.getWorkbookRequiredModules(context, modules);
        return modules;
    }
    exports.getRequiredModules = getRequiredModules;
    function pushBasicModules(context, modules) {
        if (context.showRibbon) {
            modules.push({
                member: 'ribbon',
                args: [context]
            });
        }
        if (context.showFormulaBar) {
            modules.push({
                member: 'formulaBar',
                args: [context]
            });
        }
        if (context.showSheetTabs) {
            modules.push({
                member: 'sheetTabs',
                args: [context]
            });
        }
        if (context.allowEditing) {
            modules.push({
                member: 'edit',
                args: [context]
            });
            modules.push({
                member: 'formula',
                args: [context]
            });
        }
        if (context.allowOpen) {
            modules.push({
                member: 'open',
                args: [context]
            });
        }
        if (context.allowSave) {
            modules.push({
                member: 'save',
                args: [context]
            });
        }
        if (context.enableContextMenu) {
            modules.push({
                member: 'contextMenu',
                args: [context]
            });
        }
        if (context.allowAutoFill) {
            modules.push({ member: 'autofill', args: [context] });
        }
        if (context.selectionSettings.mode !== 'None') {
            modules.push({
                member: 'selection',
                args: [context]
            });
        }
        if (context.enableKeyboardNavigation) {
            modules.push({
                member: 'keyboardNavigation',
                args: [context]
            });
        }
        if (context.allowNumberFormatting) {
            modules.push({
                member: 'numberFormat',
                args: [context]
            });
        }
        if (context.enableKeyboardShortcut) {
            modules.push({
                member: 'keyboardShortcut',
                args: [context]
            });
        }
        if (context.enableClipboard) {
            modules.push({
                member: 'clipboard',
                args: [context]
            });
        }
        if (context.allowCellFormatting) {
            modules.push({
                member: 'cellformat',
                args: [context]
            });
        }
        if (context.allowSorting) {
            modules.push({ member: 'sort', args: [context] });
        }
        if (context.allowResizing) {
            modules.push({
                member: 'resize',
                args: [context]
            });
        }
        modules.push({
            member: 'protectSheet',
            args: [context]
        });
        modules.push({
            member: 'workbookFormula',
            args: [context]
        });
        modules.push({
            member: 'workbookEdit',
            args: [context]
        });
        if (context.allowHyperlink) {
            modules.push({
                member: 'spreadsheetHyperlink',
                args: [context]
            });
        }
        if (context.enableNotes) {
            modules.push({
                member: 'spreadsheetNote',
                args: [context]
            });
        }
        if (context.allowUndoRedo) {
            modules.push({
                member: 'undoredo',
                args: [context]
            });
        }
        if (context.allowFiltering) {
            modules.push({ member: 'filter', args: [context] });
        }
        if (context.allowWrap) {
            modules.push({ member: 'wrapText', args: [context] });
        }
        if (context.allowInsert) {
            modules.push({ member: 'insert', args: [context] });
        }
        if (context.allowDelete) {
            modules.push({ member: 'delete', args: [context] });
        }
        if (context.allowDataValidation) {
            modules.push({ member: 'dataValidation', args: [context] });
        }
        if (context.allowFindAndReplace) {
            modules.push({ member: 'findAndReplace', args: [context] });
        }
        if (context.allowMerge) {
            modules.push({ member: 'merge', args: [context] });
        }
        if (context.allowConditionalFormat) {
            modules.push({ member: 'conditionalFormatting', args: [context] });
        }
        if (context.allowImage) {
            modules.push({ member: 'spreadsheetImage', args: [context] });
        }
        if (context.allowChart) {
            modules.push({ member: 'spreadsheetChart', args: [context] });
        }
    }
});