@progress/kendo-common-tasks 8.0.7-dev.0 → 8.0.7-dev.18

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 (66) hide show
  1. package/README.md +2 -3
  2. package/index.js +5 -50
  3. package/package.json +13 -52
  4. package/docs-layout.hbs +0 -51
  5. package/docs-public/bootstrap.css +0 -6759
  6. package/docs-public/bootstrap.min.js +0 -7
  7. package/docs-public/codemirror/clike.min.js +0 -1
  8. package/docs-public/codemirror/codemirror.min.js +0 -5
  9. package/docs-public/codemirror/css.min.js +0 -1
  10. package/docs-public/codemirror/htmlmixed.min.js +0 -1
  11. package/docs-public/codemirror/javascript.min.js +0 -1
  12. package/docs-public/codemirror/jsx.min.js +0 -1
  13. package/docs-public/codemirror/php.min.js +0 -1
  14. package/docs-public/codemirror/runmode.min.js +0 -1
  15. package/docs-public/codemirror/xml.min.js +0 -1
  16. package/docs-public/docs.css +0 -208
  17. package/docs-public/docs.scss +0 -253
  18. package/docs-public/editor/angular/app/app.component.ts +0 -3
  19. package/docs-public/editor/angular/app/app.module.ts +0 -14
  20. package/docs-public/editor/angular/index.html +0 -32
  21. package/docs-public/editor/angular/main.ts +0 -15
  22. package/docs-public/editor/angular/polyfills.ts +0 -73
  23. package/docs-public/editor/angular/styles.css +0 -13
  24. package/docs-public/editor/builder/app/app.component.html +0 -1
  25. package/docs-public/editor/builder/app/app.component.ts +0 -17
  26. package/docs-public/editor/builder/app/app.css +0 -449
  27. package/docs-public/editor/builder/app/app.module.ts +0 -53
  28. package/docs-public/editor/builder/app/core/core.module.ts +0 -19
  29. package/docs-public/editor/builder/app/core/data/data-services.exports.ts +0 -71
  30. package/docs-public/editor/builder/app/core/data/data.service.ts +0 -183
  31. package/docs-public/editor/builder/app/core/data/odata-service-factory.ts +0 -23
  32. package/docs-public/editor/builder/app/core/data/odata.service.ts +0 -88
  33. package/docs-public/editor/builder/app/core/module.config.ts +0 -19
  34. package/docs-public/editor/builder/app/data/odata-provider/customer.config.ts +0 -17
  35. package/docs-public/editor/builder/app/data/odata-provider/customer.model.ts +0 -17
  36. package/docs-public/editor/builder/app/grid-demo.base.component.ts +0 -107
  37. package/docs-public/editor/builder/app/grid-demo.component.html +0 -37
  38. package/docs-public/editor/builder/app/grid-demo.component.ts +0 -1
  39. package/docs-public/editor/builder/app/shared/components/grid/grid.component.html +0 -5
  40. package/docs-public/editor/builder/app/shared/components/grid/grid.component.ts +0 -243
  41. package/docs-public/editor/builder/app/shared/services/grid-incell-editing.service.ts +0 -120
  42. package/docs-public/editor/builder/app/topSection.html +0 -12
  43. package/docs-public/editor/builder/app/topSection.ts +0 -25
  44. package/docs-public/editor/builder/assets/themes/metro.css +0 -18877
  45. package/docs-public/editor/builder/index.html +0 -14
  46. package/docs-public/editor/builder/main.ts +0 -14
  47. package/docs-public/editor/builder/polyfills.ts +0 -67
  48. package/docs-public/editor/builder/styles.css +0 -1
  49. package/docs-public/editor/builder/tsconfig.app.json +0 -13
  50. package/docs-public/editor/builder/typings.d.ts +0 -5
  51. package/docs-public/editor/react/app/main.jsx +0 -6
  52. package/docs-public/editor/react/index.html +0 -32
  53. package/docs-public/editor/vue/app/main.js +0 -5
  54. package/docs-public/editor/vue/index.html +0 -29
  55. package/docs-public/example-runner.js +0 -802
  56. package/docs-public/github.css +0 -99
  57. package/docs-public/snippets.js +0 -1722
  58. package/docs-public/tomorrow-night.css +0 -75
  59. package/docs-server.js +0 -152
  60. package/lint-slugs.js +0 -25
  61. package/markdown-serve/index.js +0 -10
  62. package/markdown-serve/parser.js +0 -234
  63. package/markdown-serve/resolver.js +0 -86
  64. package/markdown-serve/server.js +0 -370
  65. package/test/jest-setup.js +0 -2
  66. package/test/snippets.test.js +0 -373
@@ -1,802 +0,0 @@
1
- /* eslint no-var: 0 */
2
- window.ExampleRunner = (function() {
3
- function endsWith(content, search) {
4
- var position = content.length - search.length;
5
- var lastIndex = content.indexOf(search, position);
6
- return lastIndex !== -1 && lastIndex === position;
7
- }
8
-
9
- function withoutExtension(filename) {
10
- return filename.split('.').slice(0, -1).join('.');
11
- }
12
-
13
- /**
14
- * Add legacy Kendo UI configuration to the SystemJs config. This is used in the React wrappers demos.
15
- */
16
- var jqueryConfiguration = {
17
- module: "jquery",
18
- path: "https://unpkg.com/jquery@3.2.1/dist/jquery.min.js"
19
- };
20
-
21
- var jszipConfiguration = {
22
- module: "jszip",
23
- path: "https://cdnjs.cloudflare.com/ajax/libs/jszip/2.4.0/jszip.min.js"
24
- };
25
-
26
- var kendoConfiguration = {
27
- module: "@progress/kendo-ui",
28
- path: "https://unpkg.com/@progress/kendo-ui@2021.1.119/"
29
- };
30
-
31
- /**
32
- * SystemJS config for jsx/js demos.
33
- */
34
- function addBabelConfiguration(config, language) {
35
- config.transpiler = "plugin-babel";
36
- config.meta['*.jsx'] = {
37
- babelOptions: {
38
- react: true
39
- }
40
- };
41
-
42
- config.packages['app'] = {
43
- main: './main.' + language,
44
- defaultExtension: false
45
- };
46
-
47
- config.map['plugin-babel'] = "https://unpkg.com/systemjs-plugin-babel@0.0.25/plugin-babel.js";
48
- config.map['systemjs-babel-build'] = 'https://unpkg.com/systemjs-plugin-babel@0.0.25/systemjs-babel-browser.js';
49
- }
50
-
51
- /**
52
- * SystemJS config for ts demos.
53
- */
54
- function addTSConfiguration(config) {
55
- config.transpiler = 'ts';
56
- config.typescriptOptions = {
57
- target: 'es5',
58
- module: 'system',
59
- moduleResolution: 'node',
60
- sourceMap: true,
61
- jsx: "react",
62
- emitDecoratorMetadata: true,
63
- experimentalDecorators: true,
64
- removeComments: false,
65
- noImplicitAny: true,
66
- suppressImplicitAnyIndexErrors: true
67
- };
68
- config.meta['typescript'] = {
69
- 'exports': 'ts'
70
- };
71
- config.packages['app'] = {
72
- main: './main.ts',
73
- defaultExtension: 'ts'
74
- };
75
-
76
- config.map['ts'] = "https://unpkg.com/plugin-typescript@5.3.3/lib/plugin.js";
77
- config.map['tslib'] = "https://unpkg.com/tslib@1.9.3/tslib.js";
78
- config.map['typescript'] = 'https://unpkg.com/typescript@2.4.2/lib/typescript.js';
79
- }
80
-
81
- /**
82
- * SystemJS config for tsx demos.
83
- */
84
- function addReactTSConfiguration(config) {
85
- config.transpiler = 'ts';
86
- config.typescriptOptions = {
87
- target: 'es2015',
88
- module: 'system',
89
- moduleResolution: 'node',
90
- sourceMap: true,
91
- jsx: "react",
92
- removeComments: false,
93
- suppressImplicitAnyIndexErrors: true
94
- };
95
- config.meta['typescript'] = {
96
- 'exports': 'ts'
97
- };
98
-
99
- config.packages['app'] = {
100
- main: './main.tsx',
101
- defaultExtension: false
102
- };
103
-
104
- config.map['ts'] = "https://unpkg.com/plugin-typescript@8.0.0/lib/plugin.js";
105
- config.map['tslib'] = "https://unpkg.com/tslib@1.9.3/tslib.js";
106
- config.map['typescript'] = 'https://unpkg.com/typescript@3.9.9/lib/typescript.js';
107
- }
108
-
109
- var systemjsConfig = {
110
- vue: function(options) {
111
- var npmUrl = options.npmUrl;
112
- var modules = options.modules;
113
- var trackjs = options.trackjs;
114
- var config = {
115
- transpiler: "plugin-babel",
116
-
117
- meta: {
118
- '*.json': {
119
- loader: 'systemjs-json-plugin'
120
- }
121
- },
122
-
123
- packages: {
124
- 'app': {
125
- main: './main.js',
126
- defaultExtension: 'js'
127
- }
128
- },
129
-
130
- map: {
131
- "app": "app",
132
- 'systemjs-json-plugin': 'https://unpkg.com/systemjs-plugin-json@0.3.0/json.js',
133
- //Babel transpiler
134
- "plugin-babel": "https://unpkg.com/systemjs-plugin-babel@0.0.25/plugin-babel.js",
135
- 'systemjs-babel-build': 'https://unpkg.com/systemjs-plugin-babel@0.0.25/systemjs-babel-browser.js',
136
- //Vue packages
137
- "vue": "https://unpkg.com/vue@2.6.10/dist/vue.min.js",
138
- // api-ai-javascript package for chat
139
- "api-ai-javascript": "https://unpkg.com/api-ai-javascript",
140
- // d3-scale-chromatic for chart demos
141
- 'd3-scale-chromatic': 'https://unpkg.com/d3-scale-chromatic@3.0.0/dist/d3-scale-chromatic.min.js',
142
- 'd3-interpolate': 'https://unpkg.com/d3-interpolate@3.0.1/dist/d3-interpolate.min.js',
143
- 'd3-color': 'https://unpkg.com/d3-color@3.0.1/dist/d3-color.min.js',
144
- // Misc packages used by the kendo-vue-* packages
145
- 'tslib': 'https://unpkg.com/tslib@1.9.3/tslib.js',
146
- //Inhouse pacakges
147
- 'cldr-core': npmUrl + '/cldr-core',
148
- 'cldr-dates-full': npmUrl + '/cldr-dates-full',
149
- 'cldr-numbers-full': npmUrl + '/cldr-numbers-full',
150
- '@telerik': npmUrl + '/@telerik',
151
- '@progress': npmUrl + '/@progress'
152
- }
153
- };
154
-
155
- /* Add Kendo Packages */
156
- modules.forEach(function(kendoPackage) {
157
- /* Only include legacy Kendo UI configuration when it is included into the auto imports */
158
- if (kendoPackage.module === '@progress/kendo-ui') {
159
- /* Map kendo-ui && add package configuration */
160
- config.map[kendoConfiguration.module] = kendoConfiguration.path;
161
-
162
- config.packages[kendoConfiguration.module] = {
163
- main: kendoPackage.main || 'js/kendo.all.js',
164
- defaultExtension: 'js'
165
- };
166
- } else if (kendoPackage.module === 'jquery') {
167
- /* Map jQuery */
168
- config.map[jqueryConfiguration.module] = jqueryConfiguration.path;
169
- } else if (kendoPackage.module === 'jszip') {
170
- /* Map JSZip */
171
- config.map[jszipConfiguration.module] = jszipConfiguration.path;
172
- } else {
173
- config.packages[kendoPackage.module] = {
174
- main: kendoPackage.main || 'dist/cdn/'.concat(kendoPackage.module.replace(/(@progress\/|@telerik\/)/, ''), '.min.js'),
175
- defaultExtension: kendoPackage.defaultExtension || 'js'
176
- };
177
- }
178
- });
179
-
180
- if (trackjs) {
181
- config.packages['raven-js'] = {
182
- main: 'dist/raven.js'
183
- };
184
-
185
- config.paths = {
186
- 'raven-js': npmUrl + "/raven-js"
187
- };
188
- }
189
-
190
- return config;
191
- },
192
- react: function(options) {
193
- var npmUrl = options.npmUrl;
194
- var modules = options.modules;
195
- var trackjs = options.trackjs;
196
- var language = options.language;
197
-
198
- var config = {
199
- meta: {
200
- '*.json': {
201
- loader: 'systemjs-json-plugin'
202
- }
203
- },
204
-
205
- packages: {
206
- pako: {
207
- defaultExtension: 'js',
208
- main: './index.js'
209
- },
210
- '@progress/pako-esm': {
211
- defaultExtension: 'js',
212
- main: './dist/pako.js'
213
- },
214
- '@progress/jszip-esm': {
215
- defaultExtension: 'js',
216
- main: './dist/jszip.js'
217
- },
218
- '@progress/kendo-licensing': {
219
- main: 'dist/index-esm.js'
220
- },
221
- '@progress/kendo-drawing': {
222
- main: 'dist/systemjs/main.js'
223
- }
224
- },
225
-
226
- bundles: {},
227
-
228
- map: {
229
- "app": "app",
230
- 'systemjs-json-plugin': 'https://unpkg.com/systemjs-plugin-json@0.3.0/json.js',
231
- //React packages
232
- "react": "https://unpkg.com/react@16.8.2/umd/react.production.min.js",
233
- "react-dom": "https://unpkg.com/react-dom@16.8.2/umd/react-dom.production.min.js",
234
- "react-dom/server": "https://unpkg.com/react-dom@16.8.2/umd/react-dom-server.browser.production.min.js",
235
- "redux": "https://unpkg.com/redux@3.7.2/dist/redux.min.js",
236
- "react-redux": "https://unpkg.com/react-redux@5.0.6/dist/react-redux.min.js",
237
- "react-router": "https://unpkg.com/react-router@4.2.0/umd/react-router.min.js",
238
- "react-router-dom": "https://unpkg.com/react-router-dom@4.2.2/umd/react-router-dom.min.js",
239
- "react-transition-group": "https://unpkg.com/react-transition-group@2.2.1/dist/react-transition-group.min.js",
240
- "prop-types": "https://unpkg.com/prop-types@15.6.0/prop-types.js",
241
- // Misc packages used by the kendo-react-* packages
242
- 'tslib': 'https://unpkg.com/tslib@1.9.3/tslib.js',
243
- 'hammerjs': 'https://unpkg.com/hammerjs@2.0.8/hammer.min.js',
244
- "pako": "https://unpkg.com/pako@1.0.5",
245
- 'cldr-core': npmUrl + '/cldr-core',
246
- 'cldr-dates-full': npmUrl + '/cldr-dates-full',
247
- 'cldr-numbers-full': npmUrl + '/cldr-numbers-full',
248
- 'api-ai-javascript': 'https://unpkg.com/api-ai-javascript@2.0.0-beta.21/index.js',
249
- 'adaptivecards': 'https://unpkg.com/adaptivecards@1.0.0/lib/adaptivecards.js',
250
- 'botframework-directlinejs': 'https://unpkg.com/botframework-directlinejs@0.9.15/directLine.js',
251
- 'marked': 'https://unpkg.com/marked@0.3.19/lib/marked.js',
252
- // d3-scale-chromatic for chart demos
253
- 'd3-scale-chromatic': 'https://unpkg.com/d3-scale-chromatic@3.0.0/dist/d3-scale-chromatic.min.js',
254
- 'd3-interpolate': 'https://unpkg.com/d3-interpolate@3.0.1/dist/d3-interpolate.min.js',
255
- 'd3-color': 'https://unpkg.com/d3-color@3.0.1/dist/d3-color.min.js',
256
- //Inhouse pacakges
257
- '@telerik': npmUrl + '/@telerik',
258
- '@progress': npmUrl + '/@progress'
259
- }
260
- };
261
-
262
- /* Use appropriate configuration based on demo language */
263
- if (language === 'ts') {
264
- addTSConfiguration(config);
265
- } else if (language === 'tsx') {
266
- addReactTSConfiguration(config, language);
267
- } else {
268
- /* Support both js and jsx */
269
- addBabelConfiguration(config, language);
270
- }
271
-
272
- /* Add Kendo Packages */
273
- modules.forEach(function(kendoPackage) {
274
- /* Only include legacy Kendo UI configuration when it is included into the auto imports */
275
- if (kendoPackage.module === '@progress/kendo-ui') {
276
- /* Map kendo-ui && add package configuration */
277
- config.map[kendoConfiguration.module] = kendoConfiguration.path;
278
-
279
- config.packages[kendoConfiguration.module] = {
280
- main: kendoPackage.main || 'js/kendo.all.js',
281
- defaultExtension: 'js'
282
- };
283
- } else if (kendoPackage.module === 'jquery') {
284
- /* Map jQuery */
285
- config.map[jqueryConfiguration.module] = jqueryConfiguration.path;
286
- } else {
287
- config.packages[kendoPackage.module] = {
288
- main: kendoPackage.main || 'dist/cdn/js/'.concat(kendoPackage.module.replace(/(@progress\/|@telerik\/)/, ''), '.js'),
289
- defaultExtension: kendoPackage.defaultExtension || 'js'
290
- };
291
- }
292
- });
293
-
294
- if (trackjs) {
295
- config.packages['raven-js'] = {
296
- main: 'dist/raven.js'
297
- };
298
-
299
- config.paths = {
300
- 'raven-js': npmUrl + "/raven-js"
301
- };
302
- }
303
-
304
- return config;
305
- },
306
- angular: function(options) {
307
- var npmUrl = options.npmUrl;
308
- var modules = options.modules;
309
- var trackjs = options.trackjs;
310
- var ngVer = '@8.2.14'; // lock in the angular package version; do not let it float to current!
311
- var SYSTEM_BUNDLES = [ {
312
- name: "@progress/kendo-common",
313
- file: "kendo-common.js"
314
- }, {
315
- name: "@progress/kendo-charts",
316
- file: "kendo-charts.js"
317
- }, {
318
- name: "@progress/kendo-drawing",
319
- file: "kendo-drawing.js",
320
- modules: true
321
- }, {
322
- name: "@progress/kendo-draggable",
323
- file: "kendo-draggable.js"
324
- }, {
325
- name: "@progress/kendo-angular-charts",
326
- file: "kendo-angular-charts.js"
327
- }, {
328
- name: "@progress/kendo-angular-common",
329
- file: "kendo-angular-common.js"
330
- }, {
331
- name: "@progress/kendo-angular-gauges",
332
- file: "kendo-angular-gauges.js"
333
- }, {
334
- name: "@progress/kendo-angular-intl",
335
- file: "kendo-angular-intl.js",
336
- map: true
337
- }, {
338
- name: "@progress/kendo-intl",
339
- file: "kendo-intl.js"
340
- }, {
341
- name: "@progress/kendo-inputs-common",
342
- file: "kendo-inputs-common.js"
343
- } ];
344
-
345
- var config = {
346
- transpiler: 'ts',
347
- typescriptOptions: {
348
- target: 'es5',
349
- module: 'system',
350
- moduleResolution: 'node',
351
- sourceMap: true,
352
- emitDecoratorMetadata: true,
353
- experimentalDecorators: true,
354
- removeComments: false,
355
- noImplicitAny: true,
356
- suppressImplicitAnyIndexErrors: true
357
- },
358
- bundles: {
359
- "https://unpkg.com/rxjs-system-bundle@6.3.3/Rx.system.min.js": [
360
- "rxjs",
361
- "rxjs/*",
362
- "rxjs/operators/*"
363
- ]
364
- },
365
- meta: {
366
- 'typescript': {
367
- 'exports': 'ts'
368
- },
369
- '*.json': {
370
- loader: 'systemjs-json-plugin'
371
- }
372
- }
373
- };
374
-
375
- // map tells the System loader where to look for things
376
- var map = {
377
- 'app': 'app',
378
- 'systemjs-json-plugin': 'https://unpkg.com/systemjs-plugin-json@0.3.0/json.js',
379
- '@telerik': npmUrl + '/@telerik',
380
- '@progress': npmUrl + '/@progress',
381
- 'cldr-data': npmUrl + '/cldr-data',
382
- '@angular': 'https://unpkg.com/@angular', // sufficient if we didn't pin the version
383
- 'angular2-in-memory-web-api': 'https://unpkg.com/angular2-in-memory-web-api', // get latest
384
- 'api-ai-javascript': 'https://unpkg.com/api-ai-javascript@2.0.0-beta.21/index.js',
385
- 'marked': 'https://unpkg.com/marked@0.3.19/lib/marked.js',
386
- 'hammerjs': 'https://unpkg.com/hammerjs@2.0.8/hammer.min.js',
387
- 'pako': 'https://unpkg.com/pako@1.0.5',
388
- 'ts': 'https://unpkg.com/plugin-typescript@8.0.0/lib/plugin.js',
389
- 'tslib': 'https://unpkg.com/tslib@1.9.3/tslib.js',
390
- 'typescript': 'https://unpkg.com/typescript@2.9.2/lib/typescript.js',
391
- 'adaptivecards': 'https://unpkg.com/adaptivecards@1.0.0/lib/adaptivecards.js',
392
- 'botframework-directlinejs': 'https://unpkg.com/botframework-directlinejs-tmp@1.0.6/directLine.js',
393
- // d3-scale-chromatic for chart demos
394
- 'd3-scale-chromatic': 'https://unpkg.com/d3-scale-chromatic@3.0.0/dist/d3-scale-chromatic.min.js',
395
- 'd3-interpolate': 'https://unpkg.com/d3-interpolate@3.0.1/dist/d3-interpolate.min.js',
396
- 'd3-color': 'https://unpkg.com/d3-color@3.0.1/dist/d3-color.min.js',
397
-
398
- // explicitly add subpackages
399
- '@angular/common/http': 'https://unpkg.com/@angular/common' + ngVer + '/bundles/common-http.umd.js',
400
- '@angular/platform-browser/animations': 'https://unpkg.com/@angular/platform-browser' + ngVer + '/bundles/platform-browser-animations.umd.js',
401
- '@angular/animations/browser': 'https://unpkg.com/@angular/animations' + ngVer + '/bundles/animations-browser.umd.js',
402
- 'prosemirror-commands': npmUrl + '/prosemirror-commands',
403
- 'prosemirror-history': npmUrl + '/prosemirror-history',
404
- 'prosemirror-view': npmUrl + '/prosemirror-view',
405
- 'prosemirror-state': npmUrl + '/prosemirror-state',
406
- 'prosemirror-keymap': npmUrl + '/prosemirror-keymap',
407
- 'prosemirror-inputrules': npmUrl + '/prosemirror-inputrules',
408
- 'prosemirror-schema-list': npmUrl + '/prosemirror-schema-list',
409
- 'prosemirror-model': npmUrl + '/prosemirror-model',
410
- 'prosemirror-transform': npmUrl + '/prosemirror-transform',
411
- 'prosemirror-tables': npmUrl + '/prosemirror-tables',
412
- 'rope-sequence': npmUrl + '/rope-sequence',
413
- 'w3c-keyname': npmUrl + '/w3c-keyname',
414
- 'orderedmap': npmUrl + '/orderedmap'
415
- };
416
-
417
- var packages = {
418
- 'app': {
419
- main: './main.ts',
420
- defaultExtension: 'ts'
421
- },
422
- rxjs: {
423
- defaultExtension: false
424
- },
425
- pako: {
426
- defaultExtension: 'js',
427
- main: './index.js'
428
- },
429
- 'prosemirror-commands': {
430
- main: 'dist/commands.js'
431
- },
432
- 'prosemirror-history': {
433
- main: 'dist/history.js'
434
- },
435
- 'prosemirror-view': {
436
- main: 'dist/index.js'
437
- },
438
- 'prosemirror-state': {
439
- main: 'dist/index.js'
440
- },
441
- 'prosemirror-keymap': {
442
- main: 'dist/keymap.js'
443
- },
444
- 'prosemirror-inputrules': {
445
- main: 'dist/index.js'
446
- },
447
- 'prosemirror-schema-list': {
448
- main: 'dist/index.js'
449
- },
450
- 'prosemirror-transform': {
451
- main: 'dist/index.js'
452
- },
453
- 'prosemirror-model': {
454
- main: 'dist/index.js'
455
- },
456
- 'prosemirror-tables': {
457
- main: 'dist/index.js'
458
- },
459
- 'orderedmap': {
460
- main: 'index.js'
461
- },
462
- 'w3c-keyname': {
463
- main: 'index.js'
464
- },
465
- 'rope-sequence': {
466
- main: 'dist/index.js'
467
- },
468
- '@progress/jszip-esm': {
469
- main: 'dist/jszip.min.js'
470
- },
471
- '@progress/pako-esm': {
472
- main: 'dist/pako.min.js'
473
- },
474
- '@progress/kendo-licensing': {
475
- main: 'dist/index-esm.js'
476
- }
477
- };
478
-
479
- if (trackjs) {
480
- packages['raven-js'] = {
481
- main: 'dist/raven.js'
482
- };
483
-
484
- config.paths = {
485
- 'raven-js': npmUrl + "/raven-js"
486
- };
487
- }
488
-
489
- var ngPackageNames = [
490
- 'animations',
491
- 'common',
492
- 'compiler',
493
- 'forms',
494
- 'core',
495
- 'platform-browser',
496
- 'platform-browser-dynamic',
497
- 'router',
498
- 'upgrade'
499
- ];
500
-
501
- // Add map entries for each angular package
502
- // only because we're pinning the version with `ngVer`.
503
- ngPackageNames.forEach(function(pkgName) {
504
- map['@angular/' + pkgName] = 'https://unpkg.com/@angular/' + pkgName + ngVer;
505
- });
506
-
507
- // Add package entries for angular packages
508
- ngPackageNames.forEach(function(pkgName) {
509
- packages['@angular/' + pkgName] = { main: 'bundles/' + pkgName + '.umd.js' };
510
- });
511
-
512
- modules.forEach(function(directive) {
513
- if (!SYSTEM_BUNDLES.filter(function(bundle) { return bundle.name === directive.module; }).length) {
514
- packages[directive.module] = {
515
- main: directive.main || 'dist/npm/js/main.js',
516
- defaultExtension: directive.defaultExtension || 'js'
517
- };
518
- }
519
- });
520
-
521
- SYSTEM_BUNDLES.forEach(function(bundle) {
522
- var paths = [ bundle.name ];
523
- if (bundle.modules) {
524
- paths.push(bundle.name + '/*');
525
- }
526
- config.bundles[npmUrl + "/" + bundle.name + "/dist/systemjs/" + bundle.file] = paths;
527
-
528
- if (bundle.map) {
529
- packages[bundle.name] = {
530
- defaultExtension: 'js'
531
- };
532
- }
533
- });
534
-
535
- config.map = map;
536
- config.packages = packages;
537
-
538
- return config;
539
- },
540
- builder: function(options) {
541
- var npmUrl = options.npmUrl;
542
- var modules = options.modules;
543
- var trackjs = options.trackjs;
544
- var ngVer = '@7.2.14'; // lock in the angular package version; do not let it float to current!
545
- var SYSTEM_BUNDLES = [ {
546
- name: "@progress/kendo-drawing",
547
- file: "kendo-drawing.js",
548
- modules: true
549
- }, {
550
- name: "@progress/kendo-charts",
551
- file: "kendo-charts.js"
552
- }, {
553
- name: "@progress/kendo-angular-charts",
554
- file: "kendo-angular-charts.js"
555
- }, {
556
- name: "@progress/kendo-angular-gauges",
557
- file: "kendo-angular-gauges.js"
558
- }, {
559
- name: "@progress/kendo-angular-gauges",
560
- file: "kendo-angular-gauges.js"
561
- }, {
562
- name: "@progress/kendo-angular-resize-sensor",
563
- file: "kendo-angular-resize-sensor.js"
564
- }, {
565
- name: "@telerik/kendo-intl",
566
- file: "kendo-intl.js"
567
- }, {
568
- name: "@progress/kendo-angular-intl",
569
- file: "kendo-angular-intl.js",
570
- map: true
571
- } ];
572
-
573
- var config = {
574
- transpiler: 'ts',
575
- typescriptOptions: {
576
- target: 'es5',
577
- module: 'system',
578
- moduleResolution: 'node',
579
- sourceMap: true,
580
- emitDecoratorMetadata: true,
581
- experimentalDecorators: true,
582
- removeComments: false,
583
- noImplicitAny: true,
584
- suppressImplicitAnyIndexErrors: true
585
- },
586
- bundles: {
587
- "https://unpkg.com/rxjs-system-bundle@5.5.6/Rx.system.min.js": [
588
- "rxjs",
589
- "rxjs/*",
590
- "rxjs/operator/*",
591
- "rxjs/operators/*",
592
- "rxjs/observable/*",
593
- "rxjs/scheduler/*",
594
- "rxjs/symbol/*",
595
- "rxjs/add/operator/*",
596
- "rxjs/add/observable/*",
597
- "rxjs/util/*"
598
- ]
599
- },
600
- meta: {
601
- 'typescript': {
602
- 'exports': 'ts'
603
- },
604
- '*.json': {
605
- loader: 'systemjs-json-plugin'
606
- },
607
- '*.html': {
608
- loader: 'systemjs-plugin-text'
609
- },
610
- '*.css': {
611
- loader: 'systemjs-plugin-css'
612
- }
613
-
614
- }
615
- };
616
-
617
- // map tells the System loader where to look for things
618
- var map = {
619
- 'app': '',
620
- 'systemjs-json-plugin': 'https://unpkg.com/systemjs-plugin-json@0.3.0',
621
- '@telerik': npmUrl + '/@telerik',
622
- '@progress': npmUrl + '/@progress',
623
- 'cldr-data': npmUrl + '/cldr-data',
624
- '@angular': 'https://unpkg.com/@angular', // sufficient if we didn't pin the version
625
- 'angular2-in-memory-web-api': 'https://unpkg.com/angular2-in-memory-web-api', // get latest
626
- 'hammerjs': 'https://unpkg.com/hammerjs@2.0.8/hammer.min.js',
627
- 'pako': 'https://unpkg.com/pako@1.0.5',
628
- 'ts': 'https://unpkg.com/plugin-typescript@5.3.3/lib/plugin.js',
629
- 'tslib': 'https://unpkg.com/tslib@1.9.3/tslib.js',
630
- 'typescript': 'https://unpkg.com/typescript@2.4.2/lib/typescript.js',
631
- 'systemjs-plugin-text': 'https://unpkg.com/systemjs-plugin-text@0.0.11',
632
- 'systemjs-plugin-css': 'https://unpkg.com/systemjs-plugin-css@0.1.37/css.js',
633
-
634
- // explicitly add subpackages
635
- '@angular/common/http': 'https://unpkg.com/@angular/common' + ngVer + '/bundles/common-http.umd.js',
636
- '@angular/platform-browser/animations': 'https://unpkg.com/@angular/platform-browser' + ngVer + '/bundles/platform-browser-animations.umd.js',
637
- '@angular/animations/browser': 'https://unpkg.com/@angular/animations' + ngVer + '/bundles/animations-browser.umd.js'
638
- };
639
-
640
- var packages = {
641
- rxjs: {
642
- defaultExtension: false
643
- },
644
- pako: {
645
- defaultExtension: 'js',
646
- main: './index.js'
647
- },
648
- builder: {
649
- main: './main.ts',
650
- defaultExtension: 'ts'
651
- }
652
- };
653
-
654
- if (trackjs) {
655
- packages['raven-js'] = {
656
- main: 'dist/raven.js'
657
- };
658
-
659
- config.paths = {
660
- 'raven-js': npmUrl + "/raven-js"
661
- };
662
- }
663
-
664
- var ngPackageNames = [
665
- 'common',
666
- 'compiler',
667
- 'forms',
668
- 'core',
669
- 'router',
670
- 'platform-browser',
671
- 'platform-browser-dynamic',
672
- 'upgrade'
673
- ];
674
-
675
- // Add map entries for each angular package
676
- // only because we're pinning the version with `ngVer`.
677
- ngPackageNames.forEach(function(pkgName) {
678
- map['@angular/' + pkgName] = 'https://unpkg.com/@angular/' + pkgName + ngVer;
679
- });
680
-
681
- // Add package entries for angular packages
682
- ngPackageNames.concat([ 'forms', 'animations' ]).forEach(function(pkgName) {
683
- packages['@angular/' + pkgName] = { main: 'bundles/' + pkgName + '.umd.js' };
684
- });
685
-
686
- modules.forEach(function(directive) {
687
- if (!SYSTEM_BUNDLES.filter(function(bundle) { return bundle.name === directive.module; }).length) {
688
- packages[directive.module] = {
689
- main: directive.main || 'dist/npm/js/main.js',
690
- defaultExtension: directive.defaultExtension || 'js'
691
- };
692
- }
693
- });
694
-
695
- SYSTEM_BUNDLES.forEach(function(bundle) {
696
- var paths = [ bundle.name ];
697
- if (bundle.modules) {
698
- paths.push(bundle.name + '/*');
699
- }
700
- config.bundles[npmUrl + "/" + bundle.name + "/dist/systemjs/" + bundle.file] = paths;
701
-
702
- if (bundle.map) {
703
- packages[bundle.name] = {
704
- defaultExtension: 'js'
705
- };
706
- }
707
- });
708
-
709
- config.map = map;
710
- config.packages = packages;
711
- return config;
712
- }
713
- };
714
-
715
- function ExampleRunner(platform) {
716
- this.platform = platform;
717
- }
718
-
719
- function isRelativeImport(file) {
720
- return /(\.)+[\/](.*)/g.test(file);
721
- }
722
-
723
- let extensions = [
724
- "ts", "tsx", "js","jsx","css","json", "vue"
725
- ];
726
-
727
- function hasExtensions(file) {
728
- const extension = file.split('.').pop();
729
- return extensions.includes(extension);
730
- }
731
-
732
- ExampleRunner.prototype = {
733
- configure: function(system, options) {
734
- const config = systemjsConfig[this.platform](options);
735
- system.config(config);
736
- // allow mocking of files via custom fetch function
737
- this.files = {};
738
- this.fileExtensions = {};
739
-
740
- var files = this.files;
741
- var fileExtensions = this.fileExtensions;
742
-
743
- var systemFetch = system.fetch;
744
- var systemRegister = system.register;
745
-
746
- if (!config.packages.app.defaultExtension) {
747
- system.register = function(registerFiles, ...other) {
748
- var newRegisterFiles = (
749
- Array.isArray(registerFiles)
750
- ? registerFiles
751
- : [ registerFiles ]
752
- ).map((file) => {
753
- if (isRelativeImport(file)) {
754
- const fileName = file.substring(file.indexOf('/') + 1);
755
- if (!hasExtensions(fileName) && fileExtensions[fileName]) {
756
- return file.replace(fileName, `${fileName}.${fileExtensions[fileName]}`);
757
- }
758
- }
759
-
760
- return file;
761
- });
762
-
763
- return systemRegister.apply(this, Array.prototype.slice.call([ newRegisterFiles, ...other ]));
764
- };
765
- }
766
-
767
- system.fetch = function(metadata) {
768
- var requestedFile = metadata.name;
769
-
770
- for (var mockedFile in files) {
771
- if (!files.hasOwnProperty(mockedFile)) {
772
- continue;
773
- }
774
-
775
- if (endsWith(requestedFile, withoutExtension(mockedFile))
776
- || endsWith(withoutExtension(requestedFile), withoutExtension(mockedFile))) {
777
- return files[mockedFile];
778
- }
779
- }
780
-
781
- return systemFetch.apply(this, Array.prototype.slice.call(arguments));
782
- };
783
- },
784
- register: function(path, file, content) {
785
- var extensions = file.split('.').pop();
786
- var fileName = file.substring(0, file.length - extensions.length - 1);
787
-
788
- this.fileExtensions[fileName] = extensions;
789
- this.files[path + file] = content;
790
- },
791
- /* eslint no-console: 0 */
792
- start: function(system) {
793
- system.import('app').catch(console.error.bind(console));
794
- }
795
- };
796
-
797
- ExampleRunner.systemjsConfig = function(platform) {
798
- return systemjsConfig[platform];
799
- };
800
-
801
- return ExampleRunner;
802
- })();