@progress/kendo-angular-schematics 13.5.0-develop.3 → 13.5.0-develop.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.
Files changed (134) hide show
  1. package/collection.json +9 -27
  2. package/e2e/utils.d.ts +17 -0
  3. package/e2e/utils.js +71 -0
  4. package/e2e/utils.js.map +1 -0
  5. package/package.json +5 -2
  6. package/src/chart/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.__style__.template +6 -0
  7. package/src/chart/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.html.template +1 -0
  8. package/src/chart/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template +21 -0
  9. package/src/chart/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template +34 -0
  10. package/src/chart/files/chart.html.include +103 -0
  11. package/src/{charts/circular → chart}/index.d.ts +2 -2
  12. package/src/chart/index.js +238 -0
  13. package/src/chart/index.js.map +1 -0
  14. package/src/chart/schema.d.ts +230 -0
  15. package/src/chart/schema.js +72 -0
  16. package/src/chart/schema.js.map +1 -0
  17. package/src/chart/schema.json +235 -0
  18. package/src/grid/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.__style__.template +6 -0
  19. package/src/grid/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.html.template +1 -0
  20. package/src/grid/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template +21 -0
  21. package/src/grid/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template +37 -0
  22. package/src/grid/files/__name@dasherize@if-flat__/__name@dasherize__.sample-data.ts.template +1233 -0
  23. package/src/grid/files/{html/__name@dasherize__/__name@dasherize__.component.html → grid.html.include} +4 -9
  24. package/src/grid/index.d.ts +2 -2
  25. package/src/grid/index.js +77 -61
  26. package/src/grid/index.js.map +1 -1
  27. package/src/grid/schema.d.ts +12 -11
  28. package/src/grid/schema.js +16 -5
  29. package/src/grid/schema.js.map +1 -1
  30. package/src/grid/schema.json +82 -37
  31. package/src/ngAdd/index.js +2 -1
  32. package/src/ngAdd/index.js.map +1 -1
  33. package/src/rules/index.js +2 -1
  34. package/src/rules/index.js.map +1 -1
  35. package/src/scheduler/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.__style__.template +6 -0
  36. package/src/scheduler/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.html.template +1 -0
  37. package/src/scheduler/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.spec.ts.template +21 -0
  38. package/src/scheduler/files/__name@dasherize@if-flat__/__name@dasherize__.__type@dasherize__.ts.template +26 -0
  39. package/src/scheduler/files/{events-utc.ts → __name@dasherize@if-flat__/__name@dasherize__.sample-data.ts.template} +0 -6
  40. package/src/scheduler/files/scheduler.html.include +7 -0
  41. package/src/scheduler/index.d.ts +2 -2
  42. package/src/scheduler/index.js +54 -32
  43. package/src/scheduler/index.js.map +1 -1
  44. package/src/scheduler/schema.d.ts +10 -2
  45. package/src/scheduler/schema.json +78 -2
  46. package/src/third_party/d3fc/d3fc-rebind/rebindAll.js +32 -0
  47. package/src/third_party/d3fc/day.js +61 -0
  48. package/src/third_party/d3fc/duration.js +34 -0
  49. package/src/third_party/d3fc/filter/skipWeekends.js +32 -0
  50. package/src/third_party/d3fc/financial.js +184 -0
  51. package/src/third_party/d3fc/fn.js +31 -0
  52. package/src/third_party/d3fc/geometricBrownianMotion.js +94 -0
  53. package/src/third_party/d3fc/interval.js +89 -0
  54. package/src/third_party/d3fc/randomNormal.js +49 -0
  55. package/src/third_party/d3fc/year.js +71 -0
  56. package/src/third_party/index.d.ts +28 -0
  57. package/src/third_party/index.js +40 -0
  58. package/src/third_party/index.js.map +1 -0
  59. package/src/third_party/index.v13.d.ts +13 -0
  60. package/src/third_party/index.v13.js +67 -0
  61. package/src/third_party/index.v13.js.map +1 -0
  62. package/src/utils/ast-utils.js +2 -1
  63. package/src/utils/ast-utils.js.map +1 -1
  64. package/src/utils/bootstrap-module.js +2 -1
  65. package/src/utils/bootstrap-module.js.map +1 -1
  66. package/src/{charts/scatter/schema.js → utils/parse-complex-options.d.ts} +1 -3
  67. package/src/utils/parse-complex-options.js +32 -0
  68. package/src/utils/parse-complex-options.js.map +1 -0
  69. package/src/charts/categorical/files/data.d.ts +0 -5
  70. package/src/charts/categorical/files/data.js +0 -29
  71. package/src/charts/categorical/files/data.js.map +0 -1
  72. package/src/charts/categorical/files/data.ts +0 -25
  73. package/src/charts/categorical/files/html/__name@dasherize__/__name@dasherize__.component.html +0 -46
  74. package/src/charts/categorical/files/html/__name@dasherize__/__name@dasherize__.component.ts +0 -25
  75. package/src/charts/categorical/files/inline/__name@dasherize__/__name@dasherize__.component.ts +0 -69
  76. package/src/charts/categorical/index.d.ts +0 -7
  77. package/src/charts/categorical/index.js +0 -124
  78. package/src/charts/categorical/index.js.map +0 -1
  79. package/src/charts/categorical/schema.d.ts +0 -92
  80. package/src/charts/categorical/schema.js +0 -54
  81. package/src/charts/categorical/schema.js.map +0 -1
  82. package/src/charts/categorical/schema.json +0 -253
  83. package/src/charts/circular/files/data.d.ts +0 -5
  84. package/src/charts/circular/files/data.js +0 -15
  85. package/src/charts/circular/files/data.js.map +0 -1
  86. package/src/charts/circular/files/data.ts +0 -11
  87. package/src/charts/circular/files/html/__name@dasherize__/__name@dasherize__.component.html +0 -27
  88. package/src/charts/circular/files/html/__name@dasherize__/__name@dasherize__.component.ts +0 -23
  89. package/src/charts/circular/files/inline/__name@dasherize__/__name@dasherize__.component.ts +0 -52
  90. package/src/charts/circular/index.js +0 -50
  91. package/src/charts/circular/index.js.map +0 -1
  92. package/src/charts/circular/schema.d.ts +0 -31
  93. package/src/charts/circular/schema.js +0 -7
  94. package/src/charts/circular/schema.js.map +0 -1
  95. package/src/charts/circular/schema.json +0 -175
  96. package/src/charts/scatter/files/data.d.ts +0 -5
  97. package/src/charts/scatter/files/data.js +0 -25
  98. package/src/charts/scatter/files/data.js.map +0 -1
  99. package/src/charts/scatter/files/data.ts +0 -21
  100. package/src/charts/scatter/files/html/__name@dasherize__/__name@dasherize__.component.html +0 -35
  101. package/src/charts/scatter/files/html/__name@dasherize__/__name@dasherize__.component.ts +0 -21
  102. package/src/charts/scatter/files/inline/__name@dasherize__/__name@dasherize__.component.ts +0 -58
  103. package/src/charts/scatter/index.d.ts +0 -7
  104. package/src/charts/scatter/index.js +0 -50
  105. package/src/charts/scatter/index.js.map +0 -1
  106. package/src/charts/scatter/schema.d.ts +0 -32
  107. package/src/charts/scatter/schema.js.map +0 -1
  108. package/src/charts/scatter/schema.json +0 -209
  109. package/src/charts/stock/files/data.d.ts +0 -5
  110. package/src/charts/stock/files/data.js +0 -418
  111. package/src/charts/stock/files/data.js.map +0 -1
  112. package/src/charts/stock/files/data.ts +0 -414
  113. package/src/charts/stock/files/html/__name@dasherize__/__name@dasherize__.component.html +0 -57
  114. package/src/charts/stock/files/html/__name@dasherize__/__name@dasherize__.component.ts +0 -23
  115. package/src/charts/stock/files/inline/__name@dasherize__/__name@dasherize__.component.ts +0 -83
  116. package/src/charts/stock/index.d.ts +0 -7
  117. package/src/charts/stock/index.js +0 -50
  118. package/src/charts/stock/index.js.map +0 -1
  119. package/src/charts/stock/schema.d.ts +0 -36
  120. package/src/charts/stock/schema.js +0 -7
  121. package/src/charts/stock/schema.js.map +0 -1
  122. package/src/charts/stock/schema.json +0 -285
  123. package/src/grid/files/data.d.ts +0 -5
  124. package/src/grid/files/data.js +0 -1241
  125. package/src/grid/files/data.js.map +0 -1
  126. package/src/grid/files/data.ts +0 -1237
  127. package/src/grid/files/html/__name@dasherize__/__name@dasherize__.component.ts +0 -29
  128. package/src/grid/files/inline/__name@dasherize__/__name@dasherize__.component.ts +0 -79
  129. package/src/scheduler/files/events-utc.d.ts +0 -5
  130. package/src/scheduler/files/events-utc.js +0 -846
  131. package/src/scheduler/files/events-utc.js.map +0 -1
  132. package/src/scheduler/files/html/__name@dasherize__/__name@dasherize__.component.html +0 -29
  133. package/src/scheduler/files/html/__name@dasherize__/__name@dasherize__.component.ts +0 -17
  134. package/src/scheduler/files/inline/__name@dasherize__/__name@dasherize__.component.ts +0 -48
@@ -1,253 +0,0 @@
1
- {
2
- "progress:name": "Categorical Chart",
3
- "progress:icon": "barcharts",
4
- "progress:description": "Generate new Kendo UI for Angular Chart page",
5
- "$schema": "http://json-schema.org/schema",
6
- "$id": "Schema",
7
- "type": "object",
8
- "properties": {
9
- "path": {
10
- "type": "string",
11
- "format": "path",
12
- "progress:editorVisible": false
13
- },
14
- "name": {
15
- "type": "string",
16
- "$default": {
17
- "$source": "argv",
18
- "index": 0
19
- },
20
- "default": "ChartPage"
21
- },
22
-
23
- "inlineTemplate": {
24
- "progress:category": "Code Generation",
25
- "progress:display-name": "Inline template",
26
- "description": "Include template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file.",
27
- "type": "boolean",
28
- "default": false,
29
- "alias": "t"
30
- },
31
- "inlineStyle": {
32
- "progress:category": "Code Generation",
33
- "description": "Include styles inline in the component.ts file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts file.",
34
- "type": "boolean",
35
- "default": false,
36
- "alias": "s"
37
- },
38
- "skipTests": {
39
- "progress:category": "Code Generation",
40
- "type": "boolean",
41
- "description": "Do not create \"spec.ts\" test files for the new component.",
42
- "default": false
43
- },
44
-
45
- "titleText": {
46
- "progress:category": "Title",
47
- "progress:displayName": "Text",
48
- "type": "string"
49
- },
50
- "titlePosition": {
51
- "progress:category": "Title",
52
- "progress:displayName": "Position",
53
- "type": "string",
54
- "enum": [ "top", "bottom" ],
55
- "progress:attributes": [
56
- { "type": "hideOnPropertyValue", "property": "titleText", "values": [ "" ] }
57
- ]
58
- },
59
- "titleAlign": {
60
- "progress:category": "Title",
61
- "progress:displayName": "Align",
62
- "type": "string",
63
- "enum": [ "left", "right", "center" ],
64
- "progress:attributes": [
65
- { "type": "hideOnPropertyValue", "property": "titleText", "values": [ "" ] }
66
- ]
67
- },
68
-
69
- "legend": {
70
- "progress:category": "Legend",
71
- "description": "Determines whether the Chart legend will be rendered",
72
- "type": "boolean"
73
- },
74
- "legendAlign": {
75
- "progress:category": "Legend",
76
- "description": "The legend alignment",
77
- "type": "string",
78
- "enum": [ "center", "start", "end" ],
79
- "progress:attributes": [
80
- { "type": "hideOnPropertyValue", "property": "legend", "values": [ false ] }
81
- ]
82
- },
83
- "legendPosition": {
84
- "progress:category": "Legend",
85
- "description": "The legend position",
86
- "type": "string",
87
- "enum": [ "top", "bottom", "left", "right", "custom" ],
88
- "progress:attributes": [
89
- { "type": "hideOnPropertyValue", "property": "legend", "values": [ false ] }
90
- ]
91
- },
92
- "legendOrientation": {
93
- "progress:category": "Legend",
94
- "description": "The legend orientation",
95
- "type": "string",
96
- "enum": [ "vertical", "horizontal" ],
97
- "progress:attributes": [
98
- { "type": "hideOnPropertyValue", "property": "legend", "values": [ false ] }
99
- ]
100
- },
101
- "legendTitleText": {
102
- "progress:category": "Legend",
103
- "description": "The legend title",
104
- "type": "string",
105
- "progress:attributes": [
106
- { "type": "hideOnPropertyValue", "property": "legend", "values": [ false ] }
107
- ]
108
- },
109
- "legendTitleAlign": {
110
- "progress:category": "Legend",
111
- "description": "The legend title alignment",
112
- "type": "string",
113
- "enum": [ "left", "right", "center" ],
114
- "progress:attributes": [
115
- { "type": "hideOnPropertyValue", "property": "legend", "values": [ false ] },
116
- { "type": "hideOnPropertyValue", "property": "legendTitleText", "values": [ "" ] }
117
- ]
118
- },
119
- "legendTitlePosition": {
120
- "progress:category": "Legend",
121
- "description": "The legend title alignment",
122
- "type": "string",
123
- "enum": [ "top", "bottom" ],
124
- "progress:attributes": [
125
- { "type": "hideOnPropertyValue", "property": "legend", "values": [ false ] },
126
- { "type": "hideOnPropertyValue", "property": "legendTitleText", "values": [ "" ] }
127
- ]
128
- },
129
-
130
- "renderAs": {
131
- "progress:category": "Rendering",
132
- "type": "string",
133
- "enum": [ "svg", "canvas" ]
134
- },
135
-
136
- "dataSource": {
137
- "progress:category": "Data Source",
138
- "description": "Select grid data source generation strategy",
139
- "type": "string",
140
- "default": "Example",
141
- "enum": [ "Example", "Mock Data", "Existing App Data" ],
142
- "progress:enum": [{
143
- "name": "Example", "description": "An example data source will be added to the project, with predefined chart series."
144
- }, {
145
- "name": "Mock Data", "description": "Specify chart series, from which mock data will be generated and added to the project."
146
- }, {
147
- "name": "Existing App Data", "description": "Provide import path. If the data module does not exist in your project, you will have to generate it by hand."
148
- }]
149
- },
150
-
151
- "dataPath": {
152
- "progress:category": "Data Source",
153
- "description": "Sets a path to the local data file",
154
- "type": "string",
155
- "progress:attributes": [
156
- { "type": "hideOnPropertyValue", "property": "dataSource", "values": [ "Example", "Mock Data" ] }
157
- ]
158
- },
159
- "dataName": {
160
- "progress:category": "Data Source",
161
- "description": "Sets a name to the local data property",
162
- "type": "string",
163
- "progress:attributes": [
164
- { "type": "hideOnPropertyValue", "property": "dataSource", "values": [ "Example", "Mock Data" ] }
165
- ]
166
- },
167
-
168
- "series": {
169
- "progress:category": "Chart Series",
170
- "progress:type": "array",
171
- "hidden": true,
172
- "description": "Configures the series in the Chart",
173
- "type": "string",
174
- "progress:attributes": [
175
- { "type": "hideOnPropertyValue", "property": "dataSource", "values": [ "Example" ] }
176
- ],
177
- "items": {
178
- "type": "object",
179
- "properties": {
180
- "type": {
181
- "type": "string",
182
- "enum": [
183
- "area",
184
- "bar",
185
- "bullet",
186
- "column",
187
- "horizontalWaterfall",
188
- "line",
189
- "radarArea",
190
- "radarColumn",
191
- "radarLine",
192
- "rangeArea",
193
- "rangeBar",
194
- "rangeColumn",
195
- "waterfall"
196
- ],
197
- "default": "line"
198
- },
199
- "categoryField": {"type": "string"},
200
- "currentField": {"type": "string"},
201
- "field": {"type": "string"},
202
- "name": {"type": "string"},
203
- "width": {"type": "number"}
204
- }
205
- }
206
- },
207
- "categoryAxis": {
208
- "progress:category": "Chart Axis",
209
- "progress:type": "array",
210
- "hidden": true,
211
- "description": "Configures the category axis items in the Chart",
212
- "type": "string",
213
- "progress:attributes": [
214
- { "type": "hideOnPropertyValue", "property": "dataSource", "values": [ "Example" ] }
215
- ],
216
- "items": {
217
- "type": "object",
218
- "properties": {
219
- "name": {"type": "string"},
220
- "title": {"type": "string"},
221
- "type": {
222
- "type": "string",
223
- "enum": [ "category", "date" ]
224
- }
225
- }
226
- }
227
- },
228
- "valueAxis": {
229
- "progress:category": "Chart Axis",
230
- "progress:type": "array",
231
- "hidden": true,
232
- "description": "Configures the value axis items in the Chart",
233
- "type": "string",
234
- "progress:attributes": [
235
- { "type": "hideOnPropertyValue", "property": "dataSource", "values": [ "Example" ] }
236
- ],
237
- "items": {
238
- "type": "object",
239
- "properties": {
240
- "name": {"type": "string"},
241
- "title": {"type": "string"},
242
- "type": {
243
- "type": "string",
244
- "enum": [ "numeric", "log" ]
245
- }
246
- }
247
- }
248
- }
249
- },
250
- "required": [
251
- "name"
252
- ]
253
- }
@@ -1,5 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export declare const seriesData = "[\n { category: '0-14', value: 0.2545 },\n { category: '15-24', value: 0.1552 },\n { category: '25-54', value: 0.4059 },\n { category: '55-64', value: 0.0911 },\n { category: '65+', value: 0.0933 }\n]";
@@ -1,15 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.seriesData = void 0;
8
- exports.seriesData = `[
9
- { category: '0-14', value: 0.2545 },
10
- { category: '15-24', value: 0.1552 },
11
- { category: '25-54', value: 0.4059 },
12
- { category: '55-64', value: 0.0911 },
13
- { category: '65+', value: 0.0933 }
14
- ]`;
15
- //# sourceMappingURL=data.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data.js","sourceRoot":"","sources":["../../../../../../../libs/schematics/src/charts/circular/files/data.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG;;;;;;EAMxB,CAAC"}
@@ -1,11 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export const seriesData = `[
6
- { category: '0-14', value: 0.2545 },
7
- { category: '15-24', value: 0.1552 },
8
- { category: '25-54', value: 0.4059 },
9
- { category: '55-64', value: 0.0911 },
10
- { category: '65+', value: 0.0933 }
11
- ]`;
@@ -1,27 +0,0 @@
1
- <kendo-chart<% if (renderAs) {%>renderAs="<%=renderAs%>"<% } %>><% if (titleText) {%>
2
- <kendo-chart-title
3
- text="<%=titleText %>" <% if (titlePosition) {%>
4
- position="<%=titlePosition%>" <% } %><% if (titleAlign) {%>
5
- align="<%=titleAlign%>"<% } %>></kendo-chart-title><% }%><% if (legend) {%>
6
- <kendo-chart-legend<% if (legendAlign) {%>
7
- align="<%=legendAlign%>"<% } %><% if (legendPosition) {%>
8
- position="<%=legendPosition%>"<% } %><% if (legendOrientation) {%>
9
- orientation="<%=legendOrientation%>"<% } %><% if (legendTitleText || legendTitleAlign || legendTitlePosition) {%>
10
- [title]="legendTitle"<% } %>></kendo-chart-legend><% }%>
11
- <kendo-chart-series><% if (series.length) {%><% for (let item of series) {%>
12
- <kendo-chart-series-item<% if (item.categoryField) {%>
13
- categoryField="<%=item.categoryField%>"<% } %><% if (item.currentField) {%>
14
- currentField="<%=item.currentField%>"<% } %>
15
- [data]="seriesData"<% if (item.field) {%>
16
- field="<%=item.field%>"<% } %><% if (item.name) {%>
17
- name="<%=item.name%>"<% } %><% if (item.type) {%>
18
- type="<%=item.type%>"<% } %><% if (item.holeSize || item.holeSize === 0) {%>
19
- [holeSize]="<%=item.holeSize%>"<% } %><% if (item.size || item.size === 0) {%>
20
- [size]="<%=item.size%>"<% } %><% if (item.startAngle || item.startAngle === 0) {%>
21
- [startAngle]="<%=item.startAngle%>"<% } %>><% if (showLabels) {%>
22
- <kendo-chart-series-item-labels
23
- [visible]="true"
24
- [content]="labelContent"></kendo-chart-series-item-labels><% } %>
25
- </kendo-chart-series-item><% } %><% } %>
26
- </kendo-chart-series>
27
- </kendo-chart>
@@ -1,23 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Component } from '@angular/core';<% if (mockedData) {%>
6
- import { seriesData } from './data'; <% } %><% if (showLabels) {%>
7
- import { SeriesLabelsContentArgs } from '@progress/kendo-angular-charts';<% } %><% if (legendTitleText || legendTitleAlign || legendTitlePosition) {%>
8
- import { LegendTitle } from '@progress/kendo-angular-charts';<% } %>
9
-
10
- @Component({
11
- selector: '<%= dasherize(name) %>-component',
12
- templateUrl: './<%= dasherize(name) %>.component.html',
13
- <% if (!inlineStyle) {%>styleUrls: ['./<%= dasherize(name) %>.component.css']<% } else {%>styles: [``]<% } %>
14
- })
15
- export class <%= classify(name) %>Component {
16
- <% if (mockedData) { %>public seriesData: any[] = seriesData;<%}%><% if (showLabels) {%>
17
- public labelContent: (args: SeriesLabelsContentArgs) => string = (args: SeriesLabelsContentArgs) => args.category;<% } %><% if (legendTitleText || legendTitleAlign || legendTitlePosition) {%>
18
- public legendTitle: LegendTitle = {<% if (legendTitleText) {%>
19
- text: '<%=legendTitleText%>',<% } %><% if (legendTitleAlign) {%>
20
- align: '<%=legendTitleAlign%>',<% } %><% if (legendTitlePosition) {%>
21
- position: '<%=legendTitlePosition%>'<% } %>
22
- };<% } %>
23
- }
@@ -1,52 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Component } from '@angular/core';<% if (mockedData) {%>
6
- import { seriesData } from './data'; <% } %><% if (showLabels) {%>
7
- import { SeriesLabelsContentArgs } from '@progress/kendo-angular-charts';<% } %><% if (legendTitleText || legendTitleAlign || legendTitlePosition) {%>
8
- import { LegendTitle } from '@progress/kendo-angular-charts';<% } %>
9
-
10
- @Component({
11
- selector: '<%= dasherize(name) %>-component',
12
- template: `
13
- <kendo-chart<% if (renderAs) {%>renderAs="<%=renderAs%>"<% } %>><% if (titleText) {%>
14
- <kendo-chart-title
15
- text="<%=titleText %>" <% if (titlePosition) {%>
16
- position="<%=titlePosition%>" <% } %><% if (titleAlign) {%>
17
- align="<%=titleAlign%>"<% } %>></kendo-chart-title><% }%><% if (legend) {%>
18
- <kendo-chart-legend<% if (legendAlign) {%>
19
- align="<%=legendAlign%>"<% } %><% if (legendPosition) {%>
20
- position="<%=legendPosition%>"<% } %><% if (legendOrientation) {%>
21
- orientation="<%=legendOrientation%>"<% } %><% if (legendTitleText || legendTitleAlign || legendTitlePosition) {%>
22
- [title]="legendTitle"<% } %>></kendo-chart-legend><% }%>
23
- <kendo-chart-series><% if (series.length) {%><% for (let item of series) {%>
24
- <kendo-chart-series-item<% if (item.categoryField) {%>
25
- categoryField="<%=item.categoryField%>"<% } %><% if (item.currentField) {%>
26
- currentField="<%=item.currentField%>"<% } %>
27
- [data]="seriesData"<% if (item.field) {%>
28
- field="<%=item.field%>"<% } %><% if (item.name) {%>
29
- name="<%=item.name%>"<% } %><% if (item.type) {%>
30
- type="<%=item.type%>"<% } %><% if (item.holeSize || item.holeSize === 0) {%>
31
- [holeSize]="<%=item.holeSize%>"<% } %><% if (item.size || item.size === 0) {%>
32
- [size]="<%=item.size%>"<% } %><% if (item.startAngle || item.startAngle === 0) {%>
33
- [startAngle]="<%=item.startAngle%>"<% } %>><% if (showLabels) {%>
34
- <kendo-chart-series-item-labels
35
- [visible]="true"
36
- [content]="labelContent"></kendo-chart-series-item-labels><% } %>
37
- </kendo-chart-series-item><% } %><% } %>
38
- </kendo-chart-series>
39
- </kendo-chart>
40
- `,<% if (inlineStyle) {%>
41
- styles: [``]<% } else {%>
42
- styleUrls: ['./<%= dasherize(name) %>.component.css']<% } %>
43
- })
44
- export class <%= classify(name) %>Component {
45
- <% if (mockedData) { %>public seriesData: any[] = seriesData;<%}%><% if (showLabels) {%>
46
- public labelContent: (args: SeriesLabelsContentArgs) => string = (args: SeriesLabelsContentArgs) => args.category;<% } %><% if (legendTitleText || legendTitleAlign || legendTitlePosition) {%>
47
- public legendTitle: LegendTitle = {<% if (legendTitleText) {%>
48
- text: '<%=legendTitleText%>',<% } %><% if (legendTitleAlign) {%>
49
- align: '<%=legendTitleAlign%>',<% } %><% if (legendTitlePosition) {%>
50
- position: '<%=legendTitlePosition%>'<% } %>
51
- };<% } %>
52
- }
@@ -1,50 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.chart = void 0;
8
- const core_1 = require("@angular-devkit/core");
9
- const strings_1 = require("@angular-devkit/core/src/utils/strings");
10
- const schematics_1 = require("@angular-devkit/schematics");
11
- const path_1 = require("path");
12
- const utils_1 = require("../../utils");
13
- const data_1 = require("./files/data");
14
- function chart(_options) {
15
- return (_tree, _context) => {
16
- _options.name = (0, path_1.basename)(_options.name);
17
- let path = (0, path_1.normalize)('/' + (0, path_1.dirname)((_options.path + '/' + _options.name)));
18
- if (process.platform == "win32") {
19
- path = path.replace(/\\/g, '/');
20
- }
21
- const parsedComplexOptions = (0, utils_1.parseComplexOptions)(['series'], _options);
22
- const templateSource = (0, schematics_1.apply)((0, schematics_1.url)(_options.inlineTemplate ? './files/inline' : './files/html'), [
23
- (0, schematics_1.template)({
24
- classify: core_1.strings.classify,
25
- dasherize: core_1.strings.dasherize,
26
- arrayify(args) {
27
- return args.map(s => `'${s}'`).join(", ");
28
- },
29
- ...Object.assign({}, _options, parsedComplexOptions)
30
- }),
31
- (0, schematics_1.move)(_options.path),
32
- ]);
33
- const angularComponentOptions = {
34
- path: _options.path,
35
- name: _options.name,
36
- inlineTemplate: _options.inlineTemplate,
37
- inlineStyle: _options.inlineStyle,
38
- skipTests: _options.skipTests
39
- };
40
- if (_options.mockedData) {
41
- _tree.create(`${_options.path}/${(0, strings_1.dasherize)(_options.name)}/data.ts`, `export const seriesData = ${data_1.seriesData}`);
42
- }
43
- return (0, schematics_1.chain)([
44
- (0, schematics_1.externalSchematic)('@schematics/angular', 'component', angularComponentOptions),
45
- (0, schematics_1.mergeWith)(templateSource, schematics_1.MergeStrategy.Overwrite)
46
- ]);
47
- };
48
- }
49
- exports.chart = chart;
50
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/schematics/src/charts/circular/index.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,oEAAmE;AACnE,2DAYoC;AAEpC,+BAAoD;AACpD,uCAAkD;AAElD,uCAA0C;AAE1C,SAAgB,KAAK,CAAC,QAAwB;IAC7C,OAAO,CAAC,KAAW,EAAE,QAA0B,EAAE,EAAE;QAClD,QAAQ,CAAC,IAAI,GAAG,IAAA,eAAQ,EAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAExC,IAAI,IAAI,GAAI,IAAA,gBAAS,EAAC,GAAG,GAAG,IAAA,cAAO,EAAC,CAAC,QAAQ,CAAC,IAAI,GAAG,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5E,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,EAAE;YAChC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;SAChC;QAEK,MAAM,oBAAoB,GAAG,IAAA,2BAAmB,EAAC,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;QAE7E,MAAM,cAAc,GAAG,IAAA,kBAAK,EAC3B,IAAA,gBAAG,EAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,cAAc,CAAC,EAAE;YACjE,IAAA,qBAAQ,EAAC;gBACR,QAAQ,EAAE,cAAO,CAAC,QAAQ;gBAC1B,SAAS,EAAE,cAAO,CAAC,SAAS;gBAC5B,QAAQ,CAAC,IAAc;oBACtB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC3C,CAAC;gBACc,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,QAAQ,EAAE,oBAAoB,CAAC;aACnE,CAAC;YACF,IAAA,iBAAI,EAAC,QAAQ,CAAC,IAAI,CAAC;SACnB,CACD,CAAC;QAEI,MAAM,uBAAuB,GAAG;YACrC,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,cAAc,EAAE,QAAQ,CAAC,cAAc;YACvC,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,SAAS,EAAE,QAAQ,CAAC,SAAS;SAC7B,CAAC;QAEF,IAAG,QAAQ,CAAC,UAAU,EAAE;YACvB,KAAK,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,IAAI,IAAI,IAAA,mBAAS,EAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,6BAA6B,iBAAU,EAAE,CAAC,CAAC;SAChH;QAED,OAAO,IAAA,kBAAK,EAAC;YACZ,IAAA,8BAAiB,EAAC,qBAAqB,EAAE,WAAW,EAAE,uBAAuB,CAAC;YAC9E,IAAA,sBAAS,EAAC,cAAc,EAAE,0BAAa,CAAC,SAAS,CAAC;SAClD,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC;AA1CD,sBA0CC"}
@@ -1,31 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- export interface SchemaCircular {
6
- path?: string;
7
- name: string;
8
- inlineStyle: boolean;
9
- inlineTemplate: boolean;
10
- skipTests: boolean;
11
- titleText?: string;
12
- titlePosition?: 'top' | 'bottom';
13
- titleAlign?: 'left' | 'right' | 'center';
14
- renderAs?: 'canvas' | 'svg';
15
- series?: string;
16
- showLabels?: boolean;
17
- legend?: boolean;
18
- legendTitleText?: string;
19
- legendTitleAlign?: 'left' | 'right' | 'center';
20
- legendTitlePosition?: 'top' | 'bottom';
21
- legendAlign?: 'center' | 'start' | 'end';
22
- legendOrientation?: 'vertical' | 'horizontal';
23
- legendPosition?: 'top' | 'bottom' | 'left' | 'right' | 'custom';
24
- dataPath?: string;
25
- dataName: string;
26
- mockedData?: boolean;
27
- dataSourceType?: string;
28
- dataSourceModule?: string;
29
- dataSourceMember?: string;
30
- dataSourceMethod?: string;
31
- }
@@ -1,7 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- "use strict";
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- //# sourceMappingURL=schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../../libs/schematics/src/charts/circular/schema.ts"],"names":[],"mappings":""}