-
Notifications
You must be signed in to change notification settings - Fork 155
/
Copy pathmodule.ts
98 lines (97 loc) · 2.86 KB
/
module.ts
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
import { ModuleDeclaration } from '@syncfusion/ej2-base';
import { Workbook } from '../base/index';
/**
* To get Workbook required modules.
*
* @hidden
* @param {Workbook} context - Specifies the context.
* @param {ModuleDeclaration[]} modules - Specifies the modules.
* @returns {ModuleDeclaration[]} - To get Workbook required modules.
*/
export function getWorkbookRequiredModules(context: Workbook, modules: ModuleDeclaration[] = []): ModuleDeclaration[] {
modules.push({
member: 'dataBind',
args: [context]
});
modules.push({
member: 'workbookProtectSheet',
args: [context]
});
if (context.allowSave) {
modules.push({
member: 'workbookSave',
args: [context]
});
}
if (context.allowPrint) {
modules.push({
member: 'print',
args: [context]
});
}
if (context.allowOpen) {
modules.push({
member: 'workbookOpen',
args: [context]
});
}
if (context.allowEditing) {
modules.push({
member: 'workbookEdit',
args: [context]
});
modules.push({
member: 'workbookFormula',
args: [context]
});
}
if (context.allowNumberFormatting) {
modules.push({
member: 'workbookNumberFormat',
args: [context]
});
}
if (context.allowCellFormatting) {
modules.push({
member: 'workbookcellformat',
args: [context]
});
}
if (context.allowSorting) {
modules.push({ member: 'workbookSort', args: [context] });
}
if (context.allowHyperlink) {
modules.push({ member: 'workbookHyperlink', args: [context] });
}
if (context.allowFiltering) {
modules.push({ member: 'workbookFilter', args: [context] });
}
if (context.allowFindAndReplace) {
modules.push({ member: 'workbookfindAndReplace', args: [context] });
}
if (context.allowInsert) {
modules.push({ member: 'workbookinsert', args: [context] });
}
if (context.allowDelete) {
modules.push({ member: 'workbookdelete', args: [context] });
}
if (context.allowDataValidation) {
modules.push({ member: 'workbookDataValidation', args: [context] });
}
if (context.allowMerge) {
modules.push({ member: 'workbookmerge', args: [context] });
}
if (context.allowCellFormatting) {
modules.push({ member: 'workbookConditionalFormatting', args: [context] });
}
if (context.allowImage) {
modules.push({ member: 'workbookImage', args: [context] });
}
if (context.allowChart) {
modules.push({ member: 'workbookChart', args: [context] });
}
if (context.allowAutoFill) {
modules.push({ member: 'workbookautofill', args: [context] });
}
return modules;
}