@scifeon/sdk 0.98.0 → 0.99.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/plugins/src/xlsx-types.d.ts +281 -0
  2. package/dist/{app → sdk/src/app}/app-generator.js +3 -0
  3. package/dist/sdk/src/app/interfaces/webpack-config.interface.js +2 -0
  4. package/dist/{unit-test-runner.js → sdk/src/unit-test-runner.js} +1 -0
  5. package/dist/{utils → sdk/src/utils}/test-helper.d.ts +1 -1
  6. package/dist/{webpack-app-config.js → sdk/src/webpack-app-config.js} +9 -1
  7. package/package.json +1 -1
  8. /package/dist/{app/interfaces/app-json.interface.js → plugins/src/xlsx-types.js} +0 -0
  9. /package/dist/{action-target.d.ts → sdk/src/action-target.d.ts} +0 -0
  10. /package/dist/{action-target.js → sdk/src/action-target.js} +0 -0
  11. /package/dist/{app → sdk/src/app}/app-generator.d.ts +0 -0
  12. /package/dist/{app → sdk/src/app}/app-persist.d.ts +0 -0
  13. /package/dist/{app → sdk/src/app}/app-persist.js +0 -0
  14. /package/dist/{app → sdk/src/app}/app-validator.d.ts +0 -0
  15. /package/dist/{app → sdk/src/app}/app-validator.js +0 -0
  16. /package/dist/{app → sdk/src/app}/interfaces/app-json.interface.d.ts +0 -0
  17. /package/dist/{app/interfaces/contributions/contributions-json.interface.js → sdk/src/app/interfaces/app-json.interface.js} +0 -0
  18. /package/dist/{app → sdk/src/app}/interfaces/app-type.enum.d.ts +0 -0
  19. /package/dist/{app → sdk/src/app}/interfaces/app-type.enum.js +0 -0
  20. /package/dist/{app → sdk/src/app}/interfaces/contributions/contributions-json.interface.d.ts +0 -0
  21. /package/dist/{app/interfaces/contributions/main-menu.interface.js → sdk/src/app/interfaces/contributions/contributions-json.interface.js} +0 -0
  22. /package/dist/{app → sdk/src/app}/interfaces/contributions/main-menu.interface.d.ts +0 -0
  23. /package/dist/{app/interfaces/contributions/menu-item.interface.js → sdk/src/app/interfaces/contributions/main-menu.interface.js} +0 -0
  24. /package/dist/{app → sdk/src/app}/interfaces/contributions/menu-item.interface.d.ts +0 -0
  25. /package/dist/{app/interfaces/contributions/page-menu-item.interface.js → sdk/src/app/interfaces/contributions/menu-item.interface.js} +0 -0
  26. /package/dist/{app → sdk/src/app}/interfaces/contributions/page-menu-item.interface.d.ts +0 -0
  27. /package/dist/{app/interfaces/contributions/page-menu.interface.js → sdk/src/app/interfaces/contributions/page-menu-item.interface.js} +0 -0
  28. /package/dist/{app → sdk/src/app}/interfaces/contributions/page-menu.interface.d.ts +0 -0
  29. /package/dist/{app/interfaces/package-json.interface.js → sdk/src/app/interfaces/contributions/page-menu.interface.js} +0 -0
  30. /package/dist/{app → sdk/src/app}/interfaces/package-json.interface.d.ts +0 -0
  31. /package/dist/{app/interfaces/webpack-config.interface.js → sdk/src/app/interfaces/package-json.interface.js} +0 -0
  32. /package/dist/{app → sdk/src/app}/interfaces/webpack-config.interface.d.ts +0 -0
  33. /package/dist/{cli → sdk/src/cli}/commands/app/build.d.ts +0 -0
  34. /package/dist/{cli → sdk/src/cli}/commands/app/build.js +0 -0
  35. /package/dist/{cli → sdk/src/cli}/commands/app/clean.d.ts +0 -0
  36. /package/dist/{cli → sdk/src/cli}/commands/app/clean.js +0 -0
  37. /package/dist/{cli → sdk/src/cli}/commands/app/debug.d.ts +0 -0
  38. /package/dist/{cli → sdk/src/cli}/commands/app/debug.js +0 -0
  39. /package/dist/{cli → sdk/src/cli}/commands/app/e2e-test.d.ts +0 -0
  40. /package/dist/{cli → sdk/src/cli}/commands/app/e2e-test.js +0 -0
  41. /package/dist/{cli → sdk/src/cli}/commands/app/new.d.ts +0 -0
  42. /package/dist/{cli → sdk/src/cli}/commands/app/new.js +0 -0
  43. /package/dist/{cli → sdk/src/cli}/commands/app/package.d.ts +0 -0
  44. /package/dist/{cli → sdk/src/cli}/commands/app/package.js +0 -0
  45. /package/dist/{cli → sdk/src/cli}/commands/app/post-process.d.ts +0 -0
  46. /package/dist/{cli → sdk/src/cli}/commands/app/post-process.js +0 -0
  47. /package/dist/{cli → sdk/src/cli}/commands/app/scaffold.d.ts +0 -0
  48. /package/dist/{cli → sdk/src/cli}/commands/app/scaffold.js +0 -0
  49. /package/dist/{cli → sdk/src/cli}/commands/app/unit-test.d.ts +0 -0
  50. /package/dist/{cli → sdk/src/cli}/commands/app/unit-test.js +0 -0
  51. /package/dist/{cli → sdk/src/cli}/commands/app/validate.d.ts +0 -0
  52. /package/dist/{cli → sdk/src/cli}/commands/app/validate.js +0 -0
  53. /package/dist/{cli → sdk/src/cli}/commands/app/version.d.ts +0 -0
  54. /package/dist/{cli → sdk/src/cli}/commands/app/version.js +0 -0
  55. /package/dist/{cli → sdk/src/cli}/commands/app/watch.d.ts +0 -0
  56. /package/dist/{cli → sdk/src/cli}/commands/app/watch.js +0 -0
  57. /package/dist/{cli → sdk/src/cli}/commands/scifeon/download.d.ts +0 -0
  58. /package/dist/{cli → sdk/src/cli}/commands/scifeon/download.js +0 -0
  59. /package/dist/{cli → sdk/src/cli}/commands/scifeon/run.d.ts +0 -0
  60. /package/dist/{cli → sdk/src/cli}/commands/scifeon/run.js +0 -0
  61. /package/dist/{cli → sdk/src/cli}/config.d.ts +0 -0
  62. /package/dist/{cli → sdk/src/cli}/config.js +0 -0
  63. /package/dist/{cli → sdk/src/cli}/index.d.ts +0 -0
  64. /package/dist/{cli → sdk/src/cli}/index.js +0 -0
  65. /package/dist/{cli → sdk/src/cli}/webpack-runner.d.ts +0 -0
  66. /package/dist/{cli → sdk/src/cli}/webpack-runner.js +0 -0
  67. /package/dist/{download-utils.d.ts → sdk/src/download-utils.d.ts} +0 -0
  68. /package/dist/{download-utils.js → sdk/src/download-utils.js} +0 -0
  69. /package/dist/{file-utils.d.ts → sdk/src/file-utils.d.ts} +0 -0
  70. /package/dist/{file-utils.js → sdk/src/file-utils.js} +0 -0
  71. /package/dist/{html-report.d.ts → sdk/src/html-report.d.ts} +0 -0
  72. /package/dist/{html-report.js → sdk/src/html-report.js} +0 -0
  73. /package/dist/{index.d.ts → sdk/src/index.d.ts} +0 -0
  74. /package/dist/{index.js → sdk/src/index.js} +0 -0
  75. /package/dist/{logger.d.ts → sdk/src/logger.d.ts} +0 -0
  76. /package/dist/{logger.js → sdk/src/logger.js} +0 -0
  77. /package/dist/{measurement-units.d.ts → sdk/src/measurement-units.d.ts} +0 -0
  78. /package/dist/{measurement-units.js → sdk/src/measurement-units.js} +0 -0
  79. /package/dist/{page-types.d.ts → sdk/src/page-types.d.ts} +0 -0
  80. /package/dist/{page-types.js → sdk/src/page-types.js} +0 -0
  81. /package/dist/{plugin-types.d.ts → sdk/src/plugin-types.d.ts} +0 -0
  82. /package/dist/{plugin-types.js → sdk/src/plugin-types.js} +0 -0
  83. /package/dist/{unit-test-runner.d.ts → sdk/src/unit-test-runner.d.ts} +0 -0
  84. /package/dist/{utils → sdk/src/utils}/test-helper.js +0 -0
  85. /package/dist/{webpack-app-config.d.ts → sdk/src/webpack-app-config.d.ts} +0 -0
  86. /package/dist/{webpack-utils.d.ts → sdk/src/webpack-utils.d.ts} +0 -0
  87. /package/dist/{webpack-utils.js → sdk/src/webpack-utils.js} +0 -0
@@ -0,0 +1,281 @@
1
+ export declare type NumberFormat = string | number;
2
+ export interface Properties {
3
+ Title?: string;
4
+ Subject?: string;
5
+ Author?: string;
6
+ Manager?: string;
7
+ Company?: string;
8
+ Category?: string;
9
+ Keywords?: string;
10
+ Comments?: string;
11
+ LastAuthor?: string;
12
+ CreatedDate?: Date;
13
+ }
14
+ export interface FullProperties extends Properties {
15
+ ModifiedDate?: Date;
16
+ Application?: string;
17
+ AppVersion?: string;
18
+ DocSecurity?: string;
19
+ HyperlinksChanged?: boolean;
20
+ SharedDoc?: boolean;
21
+ LinksUpToDate?: boolean;
22
+ ScaleCrop?: boolean;
23
+ Worksheets?: number;
24
+ SheetNames?: string[];
25
+ ContentStatus?: string;
26
+ LastPrinted?: string;
27
+ Revision?: string | number;
28
+ Version?: string;
29
+ Identifier?: string;
30
+ Language?: string;
31
+ }
32
+ export interface CommonOptions {
33
+ WTF?: boolean;
34
+ bookVBA?: boolean;
35
+ cellDates?: boolean;
36
+ cellStyles?: boolean;
37
+ }
38
+ export interface DateNFOption {
39
+ dateNF?: NumberFormat;
40
+ }
41
+ export interface ParsingOptions extends CommonOptions {
42
+ type?: "base64" | "binary" | "buffer" | "file" | "array" | "string";
43
+ codepage?: number;
44
+ cellFormula?: boolean;
45
+ cellHTML?: boolean;
46
+ cellNF?: boolean;
47
+ cellText?: boolean;
48
+ dateNF?: string;
49
+ sheetStubs?: boolean;
50
+ sheetRows?: number;
51
+ bookDeps?: boolean;
52
+ bookFiles?: boolean;
53
+ bookProps?: boolean;
54
+ bookSheets?: boolean;
55
+ password?: string;
56
+ raw?: boolean;
57
+ dense?: boolean;
58
+ }
59
+ export interface WritingOptions extends CommonOptions {
60
+ type?: "base64" | "binary" | "buffer" | "file" | "array" | "string";
61
+ bookSST?: boolean;
62
+ bookType?: BookType;
63
+ sheet?: string;
64
+ compression?: boolean;
65
+ ignoreEC?: boolean;
66
+ Props?: Properties;
67
+ }
68
+ export interface WorkBook {
69
+ Sheets: {
70
+ [sheet: string]: WorkSheet;
71
+ };
72
+ SheetNames: string[];
73
+ Props?: FullProperties;
74
+ Custprops?: object;
75
+ Workbook?: WBProps;
76
+ vbaraw?: any;
77
+ }
78
+ export interface SheetProps {
79
+ Hidden?: 0 | 1 | 2;
80
+ CodeName?: string;
81
+ }
82
+ export interface DefinedName {
83
+ Name: string;
84
+ Ref: string;
85
+ Sheet?: number;
86
+ Comment?: string;
87
+ }
88
+ export interface WBProps {
89
+ Sheets?: SheetProps[];
90
+ Names?: DefinedName[];
91
+ Views?: WBView[];
92
+ WBProps?: WorkbookProperties;
93
+ }
94
+ export interface WBView {
95
+ RTL?: boolean;
96
+ }
97
+ export interface WorkbookProperties {
98
+ date1904?: boolean;
99
+ filterPrivacy?: boolean;
100
+ CodeName?: string;
101
+ }
102
+ export interface ColInfo {
103
+ hidden?: boolean;
104
+ width?: number;
105
+ wpx?: number;
106
+ wch?: number;
107
+ MDW?: number;
108
+ }
109
+ export interface RowInfo {
110
+ hidden?: boolean;
111
+ hpx?: number;
112
+ hpt?: number;
113
+ level?: number;
114
+ }
115
+ export interface ProtectInfo {
116
+ password?: string;
117
+ selectLockedCells?: boolean;
118
+ selectUnlockedCells?: boolean;
119
+ formatCells?: boolean;
120
+ formatColumns?: boolean;
121
+ formatRows?: boolean;
122
+ insertColumns?: boolean;
123
+ insertRows?: boolean;
124
+ insertHyperlinks?: boolean;
125
+ deleteColumns?: boolean;
126
+ deleteRows?: boolean;
127
+ sort?: boolean;
128
+ autoFilter?: boolean;
129
+ pivotTables?: boolean;
130
+ objects?: boolean;
131
+ scenarios?: boolean;
132
+ }
133
+ export interface MarginInfo {
134
+ left?: number;
135
+ right?: number;
136
+ top?: number;
137
+ bottom?: number;
138
+ header?: number;
139
+ footer?: number;
140
+ }
141
+ export declare type SheetType = "sheet" | "chart";
142
+ export declare type SheetKeys = string | MarginInfo | SheetType;
143
+ export interface Sheet {
144
+ [cell: string]: CellObject | SheetKeys | any;
145
+ "!type"?: SheetType;
146
+ "!ref"?: string;
147
+ "!margins"?: MarginInfo;
148
+ }
149
+ export interface AutoFilterInfo {
150
+ ref: string;
151
+ }
152
+ export declare type WSKeys = SheetKeys | ColInfo[] | RowInfo[] | Range[] | ProtectInfo | AutoFilterInfo;
153
+ export interface WorkSheet extends Sheet {
154
+ [cell: string]: CellObject | WSKeys | any;
155
+ "!cols"?: ColInfo[];
156
+ "!rows"?: RowInfo[];
157
+ "!merges"?: Range[];
158
+ "!protect"?: ProtectInfo;
159
+ "!autofilter"?: AutoFilterInfo;
160
+ }
161
+ export declare type ExcelDataType = "b" | "n" | "e" | "s" | "d" | "z";
162
+ export declare type BookType = "xlsx" | "xlsm" | "xlsb" | "xls" | "xla" | "biff8" | "biff5" | "biff2" | "xlml" | "ods" | "fods" | "csv" | "txt" | "sylk" | "html" | "dif" | "rtf" | "prn" | "eth";
163
+ export interface Comment {
164
+ a?: string;
165
+ t: string;
166
+ }
167
+ export interface Hyperlink {
168
+ Target: string;
169
+ Tooltip?: string;
170
+ }
171
+ export interface CellObject {
172
+ v?: string | number | boolean | Date;
173
+ w?: string;
174
+ t: ExcelDataType;
175
+ f?: string;
176
+ F?: string;
177
+ r?: any;
178
+ h?: string;
179
+ c?: Comment[];
180
+ z?: NumberFormat;
181
+ l?: Hyperlink;
182
+ s?: any;
183
+ }
184
+ export interface CellAddress {
185
+ c: number;
186
+ r: number;
187
+ }
188
+ export interface Range {
189
+ s: CellAddress;
190
+ e: CellAddress;
191
+ }
192
+ export interface Sheet2CSVOpts extends DateNFOption {
193
+ FS?: string;
194
+ RS?: string;
195
+ strip?: boolean;
196
+ blankrows?: boolean;
197
+ skipHidden?: boolean;
198
+ }
199
+ export interface OriginOption {
200
+ origin?: number | string | CellAddress;
201
+ }
202
+ export interface Sheet2HTMLOpts {
203
+ id?: string;
204
+ editable?: boolean;
205
+ header?: string;
206
+ footer?: string;
207
+ }
208
+ export interface Sheet2JSONOpts extends DateNFOption {
209
+ header?: "A" | number | string[];
210
+ range?: any;
211
+ blankrows?: boolean;
212
+ defval?: any;
213
+ raw?: boolean;
214
+ }
215
+ export interface AOA2SheetOpts extends CommonOptions, DateNFOption {
216
+ sheetStubs?: boolean;
217
+ }
218
+ export interface SheetAOAOpts extends AOA2SheetOpts, OriginOption {
219
+ }
220
+ export interface JSON2SheetOpts extends CommonOptions, DateNFOption {
221
+ header?: string[];
222
+ skipHeader?: boolean;
223
+ }
224
+ export interface SheetJSONOpts extends JSON2SheetOpts, OriginOption {
225
+ }
226
+ export interface Table2SheetOpts extends CommonOptions, DateNFOption {
227
+ raw?: boolean;
228
+ sheetRows?: number;
229
+ display?: boolean;
230
+ }
231
+ export interface XLSX$Utils {
232
+ consts: XLSX$Consts;
233
+ aoa_to_sheet<T>(data: T[][], opts?: AOA2SheetOpts): WorkSheet;
234
+ aoa_to_sheet(data: any[][], opts?: AOA2SheetOpts): WorkSheet;
235
+ json_to_sheet<T>(data: T[], opts?: JSON2SheetOpts): WorkSheet;
236
+ json_to_sheet(data: any[], opts?: JSON2SheetOpts): WorkSheet;
237
+ table_to_sheet(data: any, opts?: Table2SheetOpts): WorkSheet;
238
+ table_to_book(data: any, opts?: Table2SheetOpts): WorkBook;
239
+ sheet_to_json<T>(worksheet: WorkSheet, opts?: Sheet2JSONOpts): T[];
240
+ sheet_to_json(worksheet: WorkSheet, opts?: Sheet2JSONOpts): any[][];
241
+ sheet_to_json(worksheet: WorkSheet, opts?: Sheet2JSONOpts): any[];
242
+ sheet_to_csv(worksheet: WorkSheet, options?: Sheet2CSVOpts): string;
243
+ sheet_to_txt(worksheet: WorkSheet, options?: Sheet2CSVOpts): string;
244
+ sheet_to_html(worksheet: WorkSheet, options?: Sheet2HTMLOpts): string;
245
+ sheet_to_formulae(worksheet: WorkSheet): string[];
246
+ sheet_to_dif(worksheet: WorkSheet, options?: Sheet2HTMLOpts): string;
247
+ sheet_to_slk(worksheet: WorkSheet, options?: Sheet2HTMLOpts): string;
248
+ sheet_to_eth(worksheet: WorkSheet, options?: Sheet2HTMLOpts): string;
249
+ encode_cell(cell: CellAddress): string;
250
+ encode_row(row: number): string;
251
+ encode_col(col: number): string;
252
+ encode_range(s: CellAddress, e: CellAddress): string;
253
+ encode_range(r: Range): string;
254
+ decode_cell(address: string): CellAddress;
255
+ decode_row(row: string): number;
256
+ decode_col(col: string): number;
257
+ decode_range(range: string): Range;
258
+ format_cell(cell: CellObject, v?: any, opts?: any): string;
259
+ book_new(): WorkBook;
260
+ book_append_sheet(workbook: WorkBook, worksheet: WorkSheet, name?: string): void;
261
+ book_set_sheet_visibility(workbook: WorkBook, sheet: number | string, visibility: number): void;
262
+ cell_set_number_format(cell: CellObject, fmt: string | number): CellObject;
263
+ cell_set_hyperlink(cell: CellObject, target: string, tooltip?: string): CellObject;
264
+ cell_set_internal_link(cell: CellObject, target: string, tooltip?: string): CellObject;
265
+ cell_add_comment(cell: CellObject, text: string, author?: string): void;
266
+ sheet_set_array_formula(ws: WorkSheet, range: Range | string, formula: string): WorkSheet;
267
+ sheet_add_aoa<T>(ws: WorkSheet, data: T[][], opts?: SheetAOAOpts): WorkSheet;
268
+ sheet_add_aoa(ws: WorkSheet, data: any[][], opts?: SheetAOAOpts): WorkSheet;
269
+ sheet_add_json(ws: WorkSheet, data: any[], opts?: SheetJSONOpts): WorkSheet;
270
+ sheet_add_json<T>(ws: WorkSheet, data: T[], opts?: SheetJSONOpts): WorkSheet;
271
+ }
272
+ export interface XLSX$Consts {
273
+ SHEET_VISIBLE: 0;
274
+ SHEET_HIDDEN: 1;
275
+ SHEET_VERYHIDDEN: 2;
276
+ }
277
+ export interface StreamUtils {
278
+ to_csv(sheet: WorkSheet, opts?: Sheet2CSVOpts): any;
279
+ to_html(sheet: WorkSheet, opts?: Sheet2HTMLOpts): any;
280
+ to_json(sheet: WorkSheet, opts?: Sheet2JSONOpts): any;
281
+ }
@@ -410,6 +410,9 @@ class AppGenerator {
410
410
  description: descriptionMatch !== null ? descriptionMatch[1].slice(1, -1) : null,
411
411
  chunk: chunkMatch !== null ? chunkMatch[1].slice(1, -1) : null,
412
412
  };
413
+ if (plugin.types.some(t => !t)) {
414
+ throw new Error(`A plugin type was not recognized in '${file.src}': ${types}. Maybe you need to update the SDK or change the platform branch?`);
415
+ }
413
416
  this.contributionsJson.plugins.push(plugin);
414
417
  }
415
418
  }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -48,6 +48,7 @@ function unitTestRunner(options, config, appType = "sdk") {
48
48
  for (const manifest of config.manifests) {
49
49
  global[transformBundleName(manifest)] = require(path.resolve(config.wwwDir, manifest + ".bundle"));
50
50
  }
51
+ global["scifeon_vendor"] = require(path.resolve(config.wwwDir, "vendor.bundle.js"));
51
52
  nodeHook.unhook(".js");
52
53
  const mocha = new Mocha();
53
54
  mocha.addFile(path.resolve(config.tempDir, "test-bundle.js"));
@@ -1,4 +1,4 @@
1
- import { ParsingOptions, WorkBook } from "@scifeon/plugins/src/xlsx-types";
1
+ import { ParsingOptions, WorkBook } from "../../../plugins/src/xlsx-types";
2
2
  export declare class TestHelper {
3
3
  static XLSX(): Promise<any>;
4
4
  static fileToXLSX(filename: string, options?: ParsingOptions): Promise<WorkBook>;
@@ -132,7 +132,15 @@ function webpackAppConfig(env, config, appType = "sdk") {
132
132
  output,
133
133
  module: {
134
134
  rules: [
135
- { test: /\.html$/i, use: "html-loader" },
135
+ {
136
+ test: /\.html$/i,
137
+ loader: "html-loader",
138
+ options: {
139
+ minimize: {
140
+ removeComments: false,
141
+ },
142
+ },
143
+ },
136
144
  {
137
145
  test: /\.ts$/i,
138
146
  exclude: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scifeon/sdk",
3
- "version": "0.98.0",
3
+ "version": "0.99.0",
4
4
  "description": "A tool for developing Apps for Scifeon.",
5
5
  "author": {
6
6
  "name": "Scifeon",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes