@progress/kendo-typescript-tasks 11.1.1-dev.1 → 11.1.1-dev.4

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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@progress/kendo-typescript-tasks",
3
3
  "description": "Kendo UI TypeScript package gulp tasks",
4
4
  "main": "gulp-tasks.js",
5
- "version": "11.1.1-dev.1+13824de",
5
+ "version": "11.1.1-dev.4+206f034",
6
6
  "author": "Telerik",
7
7
  "license": "Apache-2.0",
8
8
  "scripts": {
@@ -18,7 +18,7 @@
18
18
  "typescript": "^4.3.4"
19
19
  },
20
20
  "dependencies": {
21
- "@progress/kendo-common-tasks": "8.0.1-dev.3+13824de",
21
+ "@progress/kendo-common-tasks": "8.0.1-dev.6+206f034",
22
22
  "@typescript-eslint/eslint-plugin": "4.28.2",
23
23
  "@typescript-eslint/parser": "4.28.2",
24
24
  "core-js": "^3.18.0",
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "13824dee79a09d450983ffa714635da72d305121"
51
+ "gitHead": "206f034268b87abd606ca970d33a8fe905994586"
52
52
  }
@@ -2,12 +2,26 @@
2
2
 
3
3
  # {{name}}
4
4
  {{comment}}
5
+
5
6
  {{#if props}}
6
7
 
8
+ <table class="api-table api-table-properties">
9
+ <thead>
10
+ <tr>
11
+ <th class="th-name">NAME</th>
12
+ <th class="th-type">TYPE</th>
13
+ <th class="th-default">DEFAULT</th>
14
+ <th class="th-desc">DESCRIPTION</th>
15
+ </tr>
16
+ </thead>
17
+ <tbody class="api-table-body">
7
18
  {{#each props}}
8
19
  {{> property this }}
9
-
10
20
  {{/each}}
21
+ </tbody>
22
+ </table>
23
+
11
24
  {{/if}}
25
+
12
26
  {{> constructor}}
13
27
  {{> methods}}
@@ -1 +1 @@
1
- <span class='code'>{{ this }}</span>
1
+ {{ this }}
@@ -12,29 +12,89 @@ Accessible in templates as `#{{exportName}}="{{exportAs}}"`
12
12
  {{/if}}
13
13
 
14
14
  {{#if inputs}}
15
+
15
16
  ## Inputs
16
17
 
18
+ <table class="api-table api-table-inputs">
19
+ <thead>
20
+ <tr>
21
+ <th class="th-name">NAME</th>
22
+ <th class="th-type">TYPE</th>
23
+ <th class="th-default">DEFAULT</th>
24
+ <th class="th-desc">DESCRIPTION</th>
25
+ </tr>
26
+ </thead>
27
+ <tbody class="api-table-body">
17
28
  {{#each inputs}}
18
29
  {{> property this }}
19
-
20
30
  {{/each}}
31
+ </tbody>
32
+ </table>
33
+
21
34
  {{/if}}
35
+
22
36
  {{#if fields}}
23
37
 
24
38
  ## Fields
25
39
 
40
+ <table class="api-table api-table-fields">
41
+ <thead>
42
+ <tr>
43
+ <th class="th-name">NAME</th>
44
+ <th class="th-type">TYPE</th>
45
+ <th class="th-default">DEFAULT</th>
46
+ <th class="th-desc">DESCRIPTION</th>
47
+ </tr>
48
+ </thead>
49
+ <tbody class="api-table-body">
26
50
  {{#each fields}}
27
51
  {{> property this }}
28
-
29
52
  {{/each}}
53
+ </tbody>
54
+ </table>
55
+
30
56
  {{/if}}
57
+
31
58
  {{#if events}}
59
+
32
60
  ## Events
33
61
 
62
+ <table class="api-table api-table-events">
63
+ <thead>
64
+ <tr>
65
+ <th class="th-name">NAME</th>
66
+ <th class="th-type">TYPE</th>
67
+ <th class="th-desc">DESCRIPTION</th>
68
+ </tr>
69
+ </thead>
70
+ <tbody class="api-table-body">
34
71
  {{#each events}}
35
- ### {{name}} {{> code_block type }}
72
+ <tr>
73
+ <td class="table-cell-name">
74
+
75
+
76
+ {{name}}
77
+
78
+
79
+ </td>
80
+ <td type class="table-cell-type">
81
+
82
+
83
+ {{> code_block type }}
84
+
85
+
86
+ </td>
87
+ <td class="table-cell-comment">
88
+
36
89
  {{comment}}
37
90
 
91
+
92
+ </td>
93
+ </tr>
38
94
  {{/each}}
95
+ </tbody>
96
+ </table>
97
+
39
98
  {{/if}}
99
+
40
100
  {{> methods}}
@@ -65,4 +65,3 @@ const componentPage = (component, meta) => {
65
65
  };
66
66
 
67
67
  module.exports = componentPage;
68
-
@@ -4,13 +4,20 @@ page_title: {{platform}} {{friendlyName}} API | Kendo UI{{#if platform}} for {{p
4
4
  description: "Learn how to build custom functionality of the {{platform}} {{friendlyName}} by Kendo UI with the help of the options available in the API."
5
5
  slug: {{slug}}
6
6
  api_reference: true
7
+ type: index_api
7
8
  position: 1
8
9
  ---
9
10
 
11
+ <span class="api-text">
12
+
13
+
10
14
  # {{friendlyName}} API
11
15
 
16
+
17
+ </span>
18
+
12
19
  {{#each modules}}
13
- <h2 class="module-name">
20
+ <h2 class="api-module-name">
14
21
  {{#if @key}}
15
22
  {{@key}}
16
23
  {{else}}
@@ -18,25 +25,29 @@ position: 1
18
25
  {{/if}}
19
26
  </h2>
20
27
 
21
- <div class="api-index row auto-clear mt-20 pb-20 mb-40">
28
+ <div class="api-index">
22
29
 
23
30
  {{#each this}}
24
- <div class="mb-30 col-xs-w col-sm-6 col-md-6 col-lg-3">
25
- <div class="component-item">
26
- <h2 class="mt-0 mb-5">
27
- <span class="component-icon symbol symbol-{{@key}}" title=""></span>
28
- {{{ capitalize @key }}}
29
- </h2>
30
-
31
- <ul class="list-unstyled">
31
+ <div class="api-index-section">
32
+
33
+
34
+ <span class="section-key">
35
+
36
+
37
+ ## {{{ capitalize @key }}}
38
+
39
+
40
+ </span>
41
+
42
+
43
+ <ul class="api-item-list">
32
44
  {{#each this}}
33
- <li>
45
+ <li class="api-item">
34
46
  <a href="{% slug {{slug}} %}">{{name}}</a>
35
47
  </li>
36
48
  {{/each}}
37
49
  </ul>
38
50
  </div>
39
- </div>
40
51
  {{/each}}
41
52
 
42
53
  </div>
@@ -2,5 +2,6 @@
2
2
  title: {{name}}
3
3
  description: "Learn how to build custom functionality when working with the {{platform}} {{friendlyName}} by Kendo UI with the help of the {{name}}."
4
4
  api_reference: true
5
+ type: inner_api
5
6
  slug: {{slug}}
6
7
  ---
@@ -3,22 +3,110 @@
3
3
  ## Methods
4
4
 
5
5
  {{#each methods}}
6
- ### {{name}}
6
+ <table class="api-table api-table-methods">
7
+ <thead class="api-table-methods-head">
8
+ <tr>
9
+ <th>
10
+
11
+
12
+ {{name}}
13
+
14
+
15
+ </th>
16
+ </tr>
17
+ </thead>
18
+ <tbody class="api-table-body">
19
+ <tr>
20
+ <td>
21
+
22
+
7
23
  {{comment}}
8
24
 
25
+
26
+ </td>
27
+ </tr>
9
28
  {{#if params}}
10
- #### Parameters
29
+ <table class="api-table api-table-parameters">
30
+ <thead class="api-table-parameters-head">
31
+ <tr>
32
+ <th class="th-name">
33
+
34
+
35
+ ##### Parameters
36
+
37
+
38
+ </th>
39
+ <th class="th-type"></th>
40
+ <th class="th-desc"></th>
41
+ </tr>
42
+ </thead>
43
+ <tbody class="api-table-body">
11
44
  {{#each params}}
12
- ##### {{name}} {{> code_block type }}
45
+ <tr>
46
+ <td>
47
+
48
+
49
+ {{name}}
50
+
51
+
52
+ </td>
53
+ <td type>
54
+
55
+ {{> code_block type }}
56
+
57
+
58
+ </td>
59
+ <td>
60
+
61
+
13
62
  {{comment}}
14
63
 
64
+
65
+ </td>
66
+ </tr>
15
67
  {{/each}}
68
+ </tbody>
69
+ </table>
16
70
  {{/if}}
71
+
17
72
  {{#if returns}}
18
- #### Returns
19
- {{> code_block returns.type }}{{#if returns.comment}} {{returns.comment}}{{/if}}
73
+ <table class="api-table api-table-returns">
74
+ <thead class="api-table-returns-head">
75
+ <tr>
76
+ <th class="th-type">
77
+
78
+
79
+ ##### Returns
80
+
81
+
82
+ </th>
83
+ <th class="th-desc"></th>
84
+ </tr>
85
+ </thead>
86
+ <tbody class="api-table-body">
87
+ <tr>
88
+ <td type>
89
+
90
+
91
+ {{> code_block returns.type }}
92
+
93
+
94
+ </td>
95
+ <td>
96
+
97
+
98
+ {{returns.comment}}
99
+
100
+
101
+ </td>
102
+ </tr>
103
+ </tbody>
104
+ </table>
20
105
  {{/if}}
106
+ </tbody>
107
+ </table>
21
108
 
22
109
  {{/each}}
110
+
23
111
  {{/if}}
24
112
 
@@ -1,6 +1,30 @@
1
- ### {{name}} {{> code_block type }}{{defaultValue}}
2
- {{#if comment}}
1
+ <tr>
2
+ <td class="table-cell-name">
3
+
4
+
5
+ {{name}}
6
+
7
+
8
+ </td>
9
+ <td type class="table-cell-type">
10
+
11
+
12
+ {{> code_block type }}
13
+
14
+
15
+ </td>
16
+ <td class="table-cell-default">
17
+
18
+
19
+ {{defaultValue}}
20
+
21
+
22
+ </td>
23
+ <td class="table-cell-comment">
24
+
25
+
3
26
  {{comment}}
4
- {{else}}
5
- <br />
6
- {{/if}}
27
+
28
+
29
+ </td>
30
+ </tr>
@@ -5,10 +5,22 @@
5
5
 
6
6
  {{#if properties}}
7
7
 
8
+ <table class="api-table api-table-properties">
9
+ <thead>
10
+ <tr>
11
+ <th class="th-name">NAME</th>
12
+ <th class="th-type">TYPE</th>
13
+ <th class="th-default">DEFAULT</th>
14
+ <th class="th-desc">DESCRIPTION</th>
15
+ </tr>
16
+ </thead>
17
+ <tbody class="api-table-body">
8
18
  {{#each properties}}
9
19
  {{> property this }}
10
-
11
20
  {{/each}}
21
+ </tbody>
22
+ </table>
23
+
12
24
  {{/if}}
13
25
 
14
26
  {{> methods}}
package/test/api.js CHANGED
@@ -103,12 +103,12 @@ describe('API generation', () => {
103
103
 
104
104
  it('adds constructor docs', () => {
105
105
  expect(page).toContain('## Constructors');
106
- expect(page).toContain('### Shape&lt;T&gt; <span class=\'code\'>(options?: any)</span>');
106
+ expect(page).toContain('### Shape&lt;T&gt; (options?: any)');
107
107
  });
108
108
 
109
109
  it('adds methods', () => {
110
- expect(page).toContain('## Methods');
111
- expect(page).toContain('### get');
110
+ const pageContent = `## Methods\n\n<table class="api-table api-table-methods">\n<thead class="api-table-methods-head">\n<tr>\n<th>\n\n\nget\n\n\n</th>\n</tr>\n</thead>\n<tbody class="api-table-body">\n<tr>\n<td>\n\n\nGets the value of the specified option.\n\n\n</td>\n</tr>\n\n<table class="api-table api-table-returns">\n<thead class="api-table-returns-head">\n<tr>\n<th class="th-type">\n\n\n##### Returns\n\n\n</th>\n<th class="th-desc"></th>\n</tr>\n</thead>\n<tbody class="api-table-body">\n<tr>\n<td type>\n\n\nany\n\n\n</td>\n<td>\n\n\nThe current option value.\n\n\n</td>\n</tr>\n</tbody>\n</table>\n</tbody>\n</table>`;
111
+ expect(page).toContain(pageContent);
112
112
  });
113
113
 
114
114
  it('render default value', () => {
@@ -269,15 +269,15 @@ describe('API generation', () => {
269
269
  it('render fields without decorators, but with comment', () => {
270
270
 
271
271
  const page = componentPage(fieldsData.withComment, packageInfo);
272
-
273
- expect(page).toContain('Fields\n\n### bar');
272
+ const pageContent = `## Fields\n\n<table class="api-table api-table-fields">\n<thead>\n<tr>\n<th class="th-name">NAME</th>\n<th class="th-type">TYPE</th>\n<th class="th-default">DEFAULT</th>\n<th class="th-desc">DESCRIPTION</th>\n</tr>\n</thead>\n<tbody class="api-table-body">\n<tr>\n<td class="table-cell-name">\n\n\nbar\n\n\n</td>\n<td type class="table-cell-type">\n\n\nQueryList&lt;string&gt;\n\n\n</td>\n<td class="table-cell-default">\n\n\n\n\n\n</td>\n<td class="table-cell-comment">\n\n\nsome comment\n\nlong text\n\n\n</td>\n</tr>\n</tbody>\n</table>`;
273
+ expect(page).toContain(pageContent);
274
274
  });
275
275
 
276
276
  it('render fields with decorators and comment', () => {
277
277
 
278
278
  const page = componentPage(fieldsData.withCommentAndDecorator, packageInfo);
279
-
280
- expect(page).toContain('Fields\n\n### bar');
279
+ const pageContent = `## Fields\n\n<table class="api-table api-table-fields">\n<thead>\n<tr>\n<th class="th-name">NAME</th>\n<th class="th-type">TYPE</th>\n<th class="th-default">DEFAULT</th>\n<th class="th-desc">DESCRIPTION</th>\n</tr>\n</thead>\n<tbody class="api-table-body">\n<tr>\n<td class="table-cell-name">\n\n\nbar\n\n\n</td>\n<td type class="table-cell-type">\n\n\nQueryList&lt;string&gt;\n\n\n</td>\n<td class="table-cell-default">\n\n\n\n\n\n</td>\n<td class="table-cell-comment">\n\n\nsome comment\n\nlong text\n\n\n</td>\n</tr>\n</tbody>\n</table>`;
280
+ expect(page).toContain(pageContent);
281
281
  });
282
282
  });
283
283
 
@@ -287,16 +287,15 @@ describe('API generation', () => {
287
287
  it('render inputs name and type', () => {
288
288
 
289
289
  const page = componentPage(inputsData.withoutNameMapping, packageInfo);
290
-
291
- expect(page).toContain('Inputs\n\n### bar');
292
- expect(page).toContain('boolean');
290
+ const pageContent = `## Inputs\n\n<table class="api-table api-table-inputs">\n<thead>\n<tr>\n<th class="th-name">NAME</th>\n<th class="th-type">TYPE</th>\n<th class="th-default">DEFAULT</th>\n<th class="th-desc">DESCRIPTION</th>\n</tr>\n</thead>\n<tbody class="api-table-body">\n<tr>\n<td class="table-cell-name">\n\n\nbar\n\n\n</td>\n<td type class="table-cell-type">\n\n\nboolean\n\n\n</td>\n<td class="table-cell-default">\n\n\n\n\n\n</td>\n<td class="table-cell-comment">\n\n\n\n\n\n</td>\n</tr>\n</tbody>\n</table>`;
291
+ expect(page).toContain(pageContent);
293
292
  });
294
293
 
295
294
  it('render fields with mapped name', () => {
296
295
 
297
296
  const page = componentPage(inputsData.withNameMapping, packageInfo);
298
-
299
- expect(page).toContain('Inputs\n\n### foo');
297
+ const pageContent = `## Inputs\n\n<table class="api-table api-table-inputs">\n<thead>\n<tr>\n<th class="th-name">NAME</th>\n<th class="th-type">TYPE</th>\n<th class="th-default">DEFAULT</th>\n<th class="th-desc">DESCRIPTION</th>\n</tr>\n</thead>\n<tbody class="api-table-body">\n<tr>\n<td class="table-cell-name">\n\n\nfoo\n\n\n</td>\n<td type class="table-cell-type">\n\n\nboolean\n\n\n</td>\n<td class="table-cell-default">\n\n\n\n\n\n</td>\n<td class="table-cell-comment">\n\n\n\n\n\n</td>\n</tr>\n</tbody>\n</table>`;
298
+ expect(page).toContain(pageContent);
300
299
  });
301
300
  });
302
301
 
@@ -312,15 +311,14 @@ describe('API generation', () => {
312
311
 
313
312
  it('render event with type', () => {
314
313
  const page = componentPage(eventsData.withoutNameMapping, packageInfo);
315
-
316
- expect(page).toContain('Events\n\n### valueChange');
317
- expect(page).toContain('EventEmitter');
314
+ const pageContent = `## Events\n\n<table class="api-table api-table-events">\n<thead>\n<tr>\n<th class="th-name">NAME</th>\n<th class="th-type">TYPE</th>\n<th class="th-desc">DESCRIPTION</th>\n</tr>\n</thead>\n<tbody class="api-table-body">\n<tr>\n<td class="table-cell-name">\n\n\nvalueChange\n\n\n</td>\n<td type class="table-cell-type">\n\n\nEventEmitter&lt;any&gt;\n\n\n</td>\n<td class="table-cell-comment">\n\nFires each time the user selects a new value.\n\n\n</td>\n</tr>\n</tbody>\n</table>`;
315
+ expect(page).toContain(pageContent);
318
316
  });
319
317
 
320
318
  it('render event binding name if available', () => {
321
319
  const page = componentPage(eventsData.withNameMapping, packageInfo);
322
-
323
- expect(page).toContain('Events\n\n### focus');
320
+ const pageContent = `## Events\n\n<table class="api-table api-table-events">\n<thead>\n<tr>\n<th class="th-name">NAME</th>\n<th class="th-type">TYPE</th>\n<th class="th-desc">DESCRIPTION</th>\n</tr>\n</thead>\n<tbody class="api-table-body">\n<tr>\n<td class="table-cell-name">\n\n\nfocus\n\n\n</td>\n<td type class="table-cell-type">\n\n\nEventEmitter&lt;any&gt;\n\n\n</td>\n<td class="table-cell-comment">\n\nFires each time the user focuses the input element.\n\n\n</td>\n</tr>\n</tbody>\n</table>`;
321
+ expect(page).toContain(pageContent);
324
322
  });
325
323
 
326
324
  it('should not throw when no decorators are available', () => {
@@ -354,7 +352,7 @@ describe('API generation', () => {
354
352
  });
355
353
 
356
354
  const assertModule = name => {
357
- expect(new RegExp(`<h2 class="module-name">\\s*${name}\\s*<\\/h2>`).test(page)).toBeTruthy();
355
+ expect(new RegExp(`<h2 class="api-module-name">\\s*${name}\\s*<\\/h2>`).test(page)).toBeTruthy();
358
356
  };
359
357
 
360
358
  it('renders default group', () => {