@progress/kendo-angular-schematics 13.5.0-develop.2 → 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
@@ -0,0 +1,230 @@
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 enum DataSource {
6
+ /**
7
+ * An example data source will be added to the project with predefined column definitions.
8
+ * The data and column definitions can not be modified.
9
+ *
10
+ * This is the default.
11
+ */
12
+ "Example" = "Example",
13
+ /**
14
+ * The user is expected to provide column definitions.
15
+ * A mock data will be generated out of the column definitions.
16
+ */
17
+ "Mock Data" = "Mock Data",
18
+ /**
19
+ * The user can specify a basic module to bind to and provide column definitions,
20
+ * but in general the user will have to author some code to connect the data.
21
+ */
22
+ "Existing App Data" = "Existing App Data"
23
+ }
24
+ export interface Series {
25
+ type: CategoricalChartType;
26
+ categoryField: string;
27
+ currentField: string;
28
+ field: string;
29
+ name: string;
30
+ width: number;
31
+ }
32
+ export interface CategoryAxis {
33
+ name?: string;
34
+ title?: string;
35
+ type: CategoryAxisType;
36
+ }
37
+ export interface ValueAxis {
38
+ name?: string;
39
+ title?: string;
40
+ type: ValueAxisType;
41
+ }
42
+ export interface Schema {
43
+ renderAs?: 'canvas' | 'svg';
44
+ legend?: boolean;
45
+ legendTitleText?: string;
46
+ legendTitleAlign?: 'left' | 'right' | 'center';
47
+ legendTitlePosition?: 'top' | 'bottom';
48
+ legendAlign?: 'center' | 'start' | 'end';
49
+ legendOrientation?: 'vertical' | 'horizontal';
50
+ legendPosition?: 'top' | 'bottom' | 'left' | 'right' | 'custom';
51
+ dataSource: DataSource;
52
+ series?: Series[];
53
+ categoryAxis?: CategoryAxis[];
54
+ valueAxis?: ValueAxis[];
55
+ dataPath?: string;
56
+ dataName: string;
57
+ dataSourceType?: string;
58
+ dataSourceModule?: string;
59
+ dataSourceMember?: string;
60
+ dataSourceMethod?: string;
61
+ }
62
+ export interface SchemaCircular {
63
+ renderAs?: 'canvas' | 'svg';
64
+ series?: string;
65
+ showLabels?: boolean;
66
+ legend?: boolean;
67
+ legendTitleText?: string;
68
+ legendTitleAlign?: 'left' | 'right' | 'center';
69
+ legendTitlePosition?: 'top' | 'bottom';
70
+ legendAlign?: 'center' | 'start' | 'end';
71
+ legendOrientation?: 'vertical' | 'horizontal';
72
+ legendPosition?: 'top' | 'bottom' | 'left' | 'right' | 'custom';
73
+ dataPath?: string;
74
+ dataName: string;
75
+ mockedData?: boolean;
76
+ dataSourceType?: string;
77
+ dataSourceModule?: string;
78
+ dataSourceMember?: string;
79
+ dataSourceMethod?: string;
80
+ }
81
+ export interface SchemaStock {
82
+ renderAs?: 'canvas' | 'svg';
83
+ series?: string;
84
+ categoryAxis?: string;
85
+ valueAxis?: string;
86
+ legend?: boolean;
87
+ legendTitleText?: string;
88
+ legendTitleAlign?: 'left' | 'right' | 'center';
89
+ legendTitlePosition?: 'top' | 'bottom';
90
+ legendAlign?: 'center' | 'start' | 'end';
91
+ legendOrientation?: 'vertical' | 'horizontal';
92
+ legendPosition?: 'top' | 'bottom' | 'left' | 'right' | 'custom';
93
+ navigator?: boolean;
94
+ navigatorFrom?: string;
95
+ navigatorТо?: string;
96
+ navigatorSeries?: string;
97
+ dataPath?: string;
98
+ dataName: string;
99
+ mockedData?: boolean;
100
+ dataSourceType?: string;
101
+ dataSourceModule?: string;
102
+ dataSourceMember?: string;
103
+ dataSourceMethod?: string;
104
+ }
105
+ export interface SchemaScatter {
106
+ renderAs?: 'canvas' | 'svg';
107
+ series?: string;
108
+ categoryAxis?: string;
109
+ valueAxis?: string;
110
+ legend?: boolean;
111
+ legendTitleText?: string;
112
+ legendTitleAlign?: 'left' | 'right' | 'center';
113
+ legendTitlePosition?: 'top' | 'bottom';
114
+ legendAlign?: 'center' | 'start' | 'end';
115
+ legendOrientation?: 'vertical' | 'horizontal';
116
+ legendPosition?: 'top' | 'bottom' | 'left' | 'right' | 'custom';
117
+ dataPath?: string;
118
+ dataName: string;
119
+ mockedData?: boolean;
120
+ dataSourceType?: string;
121
+ dataSourceModule?: string;
122
+ dataSourceMember?: string;
123
+ dataSourceMethod?: string;
124
+ }
125
+ export interface AngularComponentSchema {
126
+ name: string;
127
+ path?: string;
128
+ project?: string;
129
+ module?: string;
130
+ selector?: string;
131
+ prefix: string;
132
+ style?: "css" | "scss" | "sass" | "less" | "none";
133
+ flat?: boolean;
134
+ type?: string;
135
+ displayBlock?: boolean;
136
+ inlineStyle: boolean;
137
+ inlineTemplate: boolean;
138
+ skipTests: boolean;
139
+ }
140
+ export interface KendoChartPageLayoutSchema {
141
+ title: boolean;
142
+ legend: boolean;
143
+ }
144
+ export declare enum CategoricalChartType {
145
+ "area" = "area",
146
+ "bar" = "bar",
147
+ "bullet" = "bullet",
148
+ "column" = "column",
149
+ "horizontalWaterfall" = "horizontalWaterfall",
150
+ "line" = "line",
151
+ "radarArea" = "radarArea",
152
+ "radarColumn" = "radarColumn",
153
+ "radarLine" = "radarLine",
154
+ "rangeArea" = "rangeArea",
155
+ "rangeBar" = "rangeBar",
156
+ "rangeColumn" = "rangeColumn",
157
+ "waterfall" = "waterfall"
158
+ }
159
+ export declare enum ValueAxisType {
160
+ "numeric" = "numeric",
161
+ "log" = "log"
162
+ }
163
+ export declare enum CategoryAxisType {
164
+ "category" = "category",
165
+ "date" = "date"
166
+ }
167
+ export interface CommonCategoricalChartSchema extends AngularComponentSchema, KendoChartPageLayoutSchema {
168
+ /**
169
+ * Time charts do not group in discrete categories but show data over continuous time range.
170
+ */
171
+ time: boolean;
172
+ /**
173
+ * Show time navigator for time charts.
174
+ */
175
+ navigator: boolean;
176
+ /**
177
+ * The category name of the single category axis chart.
178
+ */
179
+ category: string;
180
+ categories: string[];
181
+ /**
182
+ * Series for the single category.
183
+ */
184
+ series: string[];
185
+ /**
186
+ * Use logarithmic scale for the single value axis.
187
+ */
188
+ log: boolean;
189
+ renderAs: "svg" | "canvas";
190
+ /**
191
+ * Value name of a single axis categorical chart.
192
+ */
193
+ value: string;
194
+ }
195
+ export declare function isCategorical(chart: KendoAngularChartSchema): chart is CategoricalChartSchema;
196
+ export interface CategoricalChartSchema extends CommonCategoricalChartSchema {
197
+ chartType: "area" | "bar" | "bullet" | "column" | "horizontalWaterfall" | "line" | "radarArea" | "radarColumn" | "radarLine" | "waterfall";
198
+ }
199
+ export declare function isCategoricalRange(chart: KendoAngularChartSchema): chart is CategoricalRangeChartSchema;
200
+ export interface CategoricalRangeChartSchema extends CommonCategoricalChartSchema {
201
+ chartType: "rangeArea" | "rangeBar" | "rangeColumn";
202
+ }
203
+ export interface ScatterChartSchema extends AngularComponentSchema, KendoChartPageLayoutSchema {
204
+ chartType: "scatter";
205
+ }
206
+ export interface StockChartSchema extends CommonCategoricalChartSchema, KendoChartPageLayoutSchema {
207
+ chartType: "stock";
208
+ navigator: boolean;
209
+ navigatorFrom: string;
210
+ navigatorTo: string;
211
+ }
212
+ export interface CircularChartSchema extends AngularComponentSchema, KendoChartPageLayoutSchema {
213
+ }
214
+ export interface PieChartSchema extends CircularChartSchema {
215
+ chartType: "pie";
216
+ time: false;
217
+ value: string;
218
+ series: ["value"];
219
+ category: string;
220
+ categories: string[];
221
+ }
222
+ export interface DonutChartSchema extends CircularChartSchema {
223
+ chartType: "donut";
224
+ time: false;
225
+ value: string;
226
+ series: ["value"];
227
+ category: string;
228
+ categories: string[];
229
+ }
230
+ export declare type KendoAngularChartSchema = CategoricalChartSchema | CategoricalRangeChartSchema | ScatterChartSchema | StockChartSchema | PieChartSchema | DonutChartSchema;
@@ -0,0 +1,72 @@
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.isCategoricalRange = exports.isCategorical = exports.CategoryAxisType = exports.ValueAxisType = exports.CategoricalChartType = exports.DataSource = void 0;
8
+ var DataSource;
9
+ (function (DataSource) {
10
+ /**
11
+ * An example data source will be added to the project with predefined column definitions.
12
+ * The data and column definitions can not be modified.
13
+ *
14
+ * This is the default.
15
+ */
16
+ DataSource["Example"] = "Example";
17
+ /**
18
+ * The user is expected to provide column definitions.
19
+ * A mock data will be generated out of the column definitions.
20
+ */
21
+ DataSource["Mock Data"] = "Mock Data";
22
+ /**
23
+ * The user can specify a basic module to bind to and provide column definitions,
24
+ * but in general the user will have to author some code to connect the data.
25
+ */
26
+ DataSource["Existing App Data"] = "Existing App Data";
27
+ })(DataSource = exports.DataSource || (exports.DataSource = {}));
28
+ ;
29
+ var CategoricalChartType;
30
+ (function (CategoricalChartType) {
31
+ CategoricalChartType["area"] = "area";
32
+ CategoricalChartType["bar"] = "bar";
33
+ CategoricalChartType["bullet"] = "bullet";
34
+ CategoricalChartType["column"] = "column";
35
+ CategoricalChartType["horizontalWaterfall"] = "horizontalWaterfall";
36
+ CategoricalChartType["line"] = "line";
37
+ CategoricalChartType["radarArea"] = "radarArea";
38
+ CategoricalChartType["radarColumn"] = "radarColumn";
39
+ CategoricalChartType["radarLine"] = "radarLine";
40
+ CategoricalChartType["rangeArea"] = "rangeArea";
41
+ CategoricalChartType["rangeBar"] = "rangeBar";
42
+ CategoricalChartType["rangeColumn"] = "rangeColumn";
43
+ CategoricalChartType["waterfall"] = "waterfall";
44
+ })(CategoricalChartType = exports.CategoricalChartType || (exports.CategoricalChartType = {}));
45
+ var ValueAxisType;
46
+ (function (ValueAxisType) {
47
+ ValueAxisType["numeric"] = "numeric";
48
+ ValueAxisType["log"] = "log";
49
+ })(ValueAxisType = exports.ValueAxisType || (exports.ValueAxisType = {}));
50
+ var CategoryAxisType;
51
+ (function (CategoryAxisType) {
52
+ CategoryAxisType["category"] = "category";
53
+ CategoryAxisType["date"] = "date";
54
+ })(CategoryAxisType = exports.CategoryAxisType || (exports.CategoryAxisType = {}));
55
+ function isCategorical(chart) {
56
+ return chart.chartType == "area" ||
57
+ chart.chartType == "bar" ||
58
+ chart.chartType == "bullet" ||
59
+ chart.chartType == "column" ||
60
+ chart.chartType == "horizontalWaterfall" ||
61
+ chart.chartType == "line" ||
62
+ chart.chartType == "radarArea" ||
63
+ chart.chartType == "radarColumn" ||
64
+ chart.chartType == "radarLine" ||
65
+ chart.chartType == "waterfall";
66
+ }
67
+ exports.isCategorical = isCategorical;
68
+ function isCategoricalRange(chart) {
69
+ return chart.chartType == "rangeArea" || chart.chartType == "rangeBar" || chart.chartType == "rangeColumn";
70
+ }
71
+ exports.isCategoricalRange = isCategoricalRange;
72
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../../libs/schematics/src/chart/schema.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAoBX;AApBD,WAAY,UAAU;IAClB;;;;;OAKG;IACH,iCAAqB,CAAA;IAErB;;;OAGG;IACH,qCAAyB,CAAA;IAEzB;;;OAGG;IACH,qDAAyC,CAAA;AAC7C,CAAC,EApBW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAoBrB;AAmIA,CAAC;AAOF,IAAY,oBAcX;AAdD,WAAY,oBAAoB;IAC5B,qCAAe,CAAA;IACf,mCAAa,CAAA;IACb,yCAAmB,CAAA;IACnB,yCAAmB,CAAA;IACnB,mEAA6C,CAAA;IAC7C,qCAAe,CAAA;IACf,+CAAyB,CAAA;IACzB,mDAA6B,CAAA;IAC7B,+CAAyB,CAAA;IACzB,+CAAyB,CAAA;IACzB,6CAAuB,CAAA;IACvB,mDAA6B,CAAA;IAC7B,+CAAyB,CAAA;AAC7B,CAAC,EAdW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAc/B;AAED,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,oCAAqB,CAAA;IACrB,4BAAa,CAAA;AACjB,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,yCAAuB,CAAA;IACvB,iCAAe,CAAA;AACnB,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B;AAoCD,SAAgB,aAAa,CAAC,KAA8B;IACxD,OAAO,KAAK,CAAC,SAAS,IAAI,MAAM;QAC5B,KAAK,CAAC,SAAS,IAAI,KAAK;QACxB,KAAK,CAAC,SAAS,IAAI,QAAQ;QAC3B,KAAK,CAAC,SAAS,IAAI,QAAQ;QAC3B,KAAK,CAAC,SAAS,IAAI,qBAAqB;QACxC,KAAK,CAAC,SAAS,IAAI,MAAM;QACzB,KAAK,CAAC,SAAS,IAAI,WAAW;QAC9B,KAAK,CAAC,SAAS,IAAI,aAAa;QAChC,KAAK,CAAC,SAAS,IAAI,WAAW;QAC9B,KAAK,CAAC,SAAS,IAAI,WAAW,CAAC;AACvC,CAAC;AAXD,sCAWC;AAMD,SAAgB,kBAAkB,CAAC,KAA8B;IAC7D,OAAO,KAAK,CAAC,SAAS,IAAI,WAAW,IAAI,KAAK,CAAC,SAAS,IAAI,UAAU,IAAI,KAAK,CAAC,SAAS,IAAI,aAAa,CAAC;AAC/G,CAAC;AAFD,gDAEC"}
@@ -0,0 +1,235 @@
1
+ {
2
+ "progress:name": "Chart",
3
+ "progress:description": "Generate new Kendo UI for Angular Chart page",
4
+ "$schema": "http://json-schema.org/schema",
5
+ "$id": "KendoAngularChart",
6
+ "type": "object",
7
+ "properties": {
8
+ "path": {
9
+ "type": "string",
10
+ "format": "path",
11
+ "$default": {
12
+ "$source": "workingDirectory"
13
+ },
14
+ "description": "The path at which to create the component file, relative to the current workspace. Default is a folder with the same name as the component in the project root.",
15
+ "visible": false,
16
+ "progress:editorVisible": false
17
+ },
18
+ "project": {
19
+ "type": "string",
20
+ "description": "The name of the project.",
21
+ "$default": {
22
+ "$source": "projectName"
23
+ },
24
+ "progress:editorVisible": false
25
+ },
26
+ "name": {
27
+ "type": "string",
28
+ "description": "The name of the component.",
29
+ "$default": {
30
+ "$source": "argv",
31
+ "index": 0
32
+ },
33
+ "default": "Chart",
34
+ "x-prompt": "What name would you like to use for the component?"
35
+ },
36
+ "module": {
37
+ "type": "string",
38
+ "description": "The declaring NgModule.",
39
+ "alias": "m",
40
+ "progress:editorVisible": false
41
+ },
42
+ "selector": {
43
+ "type": "string",
44
+ "format": "html-selector",
45
+ "description": "The HTML selector to use for this component.",
46
+ "progress:editorVisible": false
47
+ },
48
+ "type": {
49
+ "type": "string",
50
+ "description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\".",
51
+ "default": "Component",
52
+ "progress:editorVisible": false
53
+ },
54
+ "displayBlock": {
55
+ "description": "Specifies if the style will contain `:host { display: block; }`.",
56
+ "type": "boolean",
57
+ "default": false,
58
+ "alias": "b",
59
+ "progress:editorVisible": false
60
+ },
61
+ "standalone": {
62
+ "description": "Whether the generated component is standalone.",
63
+ "type": "boolean",
64
+ "default": false,
65
+ "x-user-analytics": 15,
66
+ "progress:editorVisible": false
67
+ },
68
+ "changeDetection": {
69
+ "description": "The change detection strategy to use in the new component.",
70
+ "enum": ["Default", "OnPush"],
71
+ "type": "string",
72
+ "default": "Default",
73
+ "alias": "c",
74
+ "progress:editorVisible": false
75
+ },
76
+ "viewEncapsulation": {
77
+ "description": "The view encapsulation strategy to use in the new component.",
78
+ "enum": ["Emulated", "None", "ShadowDom"],
79
+ "type": "string",
80
+ "alias": "v",
81
+ "x-user-analytics": 11,
82
+ "progress:editorVisible": false
83
+ },
84
+ "skipSelector": {
85
+ "type": "boolean",
86
+ "default": false,
87
+ "description": "Specifies if the component should have a selector or not.",
88
+ "progress:editorVisible": false
89
+ },
90
+
91
+ "inlineTemplate": {
92
+ "progress:category": "Code Generation",
93
+ "progress:display-name": "Inline template",
94
+ "description": "Include template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file.",
95
+ "type": "boolean",
96
+ "default": false,
97
+ "alias": "t"
98
+ },
99
+ "style": {
100
+ "description": "The file extension or preprocessor to use for style files, or 'none' to skip generating the style file.",
101
+ "type": "string",
102
+ "default": "css",
103
+ "enum": ["css", "scss", "sass", "less", "none"],
104
+ "x-user-analytics": "ep.ng_style"
105
+ },
106
+ "inlineStyle": {
107
+ "progress:category": "Code Generation",
108
+ "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.",
109
+ "type": "boolean",
110
+ "default": false,
111
+ "alias": "s"
112
+ },
113
+ "skipTests": {
114
+ "progress:category": "Code Generation",
115
+ "type": "boolean",
116
+ "description": "Do not create \"spec.ts\" test files for the new component.",
117
+ "default": false
118
+ },
119
+ "chartType": {
120
+ "type": "string",
121
+ "displayName": "Chart Type",
122
+ "enum": [
123
+ "bar",
124
+ "area",
125
+ "scatter",
126
+ "stock",
127
+ "pie",
128
+ "donut",
129
+ "bullet",
130
+ "column",
131
+ "line",
132
+ "radarArea",
133
+ "radarColumn",
134
+ "radarLine",
135
+ "rangeArea",
136
+ "rangeBar",
137
+ "rangeColumn",
138
+ "waterfall",
139
+ "horizontalWaterfall"
140
+ ],
141
+ "default": "bar",
142
+ "description": "Choose your Chart type.",
143
+ "progress:attributes": [{ "type": "chartTypeEditorList" }]
144
+ },
145
+
146
+ "renderAs": {
147
+ "progress:category": "Chart Options",
148
+ "type": "string",
149
+ "enum": [ "svg", "canvas" ],
150
+ "default": "svg"
151
+ },
152
+
153
+ "title": {
154
+ "progress:category": "Chart Options",
155
+ "type": "boolean",
156
+ "default": true
157
+ },
158
+ "legend": {
159
+ "progress:category": "Chart Options",
160
+ "type": "boolean",
161
+ "default": true
162
+ },
163
+
164
+ "time": {
165
+ "progress:category": "Data",
166
+ "description": "Time charts do not group in discrete categories but show data over continuous time range.",
167
+ "type": "boolean",
168
+ "default": false,
169
+ "progress:attributes": [{ "type": "hideOnPropertyValue", "property": "chartType", "values": [ "stock", "scatter" ] }]
170
+ },
171
+ "navigator": {
172
+ "progress:category": "Data",
173
+ "description": "Time charts do not group in discrete categories but show data over continuous time range.",
174
+ "type": "boolean",
175
+ "default": true,
176
+ "progress:attributes": [{ "type": "hideOnPropertyValue", "property": "chartType", "values": [
177
+ "bar",
178
+ "area",
179
+ "scatter",
180
+ "pie",
181
+ "donut",
182
+ "bullet",
183
+ "column",
184
+ "line",
185
+ "radarArea",
186
+ "radarColumn",
187
+ "radarLine",
188
+ "rangeArea",
189
+ "rangeBar",
190
+ "rangeColumn",
191
+ "waterfall",
192
+ "horizontalWaterfall"
193
+ ]}]
194
+ },
195
+ "log": {
196
+ "progress:category": "Data",
197
+ "description": "Use logarithmic scale for the single value axis.",
198
+ "type": "boolean",
199
+ "default": false,
200
+ "progress:attributes": [{ "type": "hideOnPropertyValue", "property": "chartType", "values": [ "scatter" ] }]
201
+ },
202
+
203
+ "category": {
204
+ "progress:category": "Data",
205
+ "description": "The category name of the single category axis chart. Example: Products, Vehicles, Countries...",
206
+ "type": "string",
207
+ "progress:attributes": [{ "type": "hideOnPropertyValue", "property": "chartType", "values": [ "scatter" ] }]
208
+ },
209
+ "categories": {
210
+ "progress:category": "Data",
211
+ "type": "array",
212
+ "items": { "type": "string" },
213
+ "progress:attributes": [
214
+ { "type": "hideOnPropertyValue", "property": "time", "values": [ true ] },
215
+ { "type": "hideOnPropertyValue", "property": "chartType", "values": [ "stock", "scatter" ] }
216
+ ]
217
+ },
218
+ "series": {
219
+ "progress:category": "Data",
220
+ "type": "array",
221
+ "items": { "type": "string" },
222
+ "progress:attributes": [{ "type": "hideOnPropertyValue", "property": "chartType", "values": [ "scatter", "pie", "donut" ] }]
223
+ },
224
+
225
+ "value": {
226
+ "progress:category": "Data",
227
+ "description": "The value name of the single value axis chart. Example: Price, Sales, Temperature...",
228
+ "type": "string",
229
+ "progress:attributes": [{ "type": "hideOnPropertyValue", "property": "chartType", "values": [ "scatter" ] }]
230
+ }
231
+ },
232
+ "required": [
233
+ "name"
234
+ ]
235
+ }
@@ -0,0 +1,6 @@
1
+ <% if(displayBlock){ if(style != 'sass') { %>:host {
2
+ display: block;
3
+ }
4
+ <% } else { %>\:host
5
+ display: block;
6
+ <% }} %>
@@ -0,0 +1,21 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { <%= classify(name) %><%= classify(type) %> } from './<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %>';
4
+
5
+ describe('<%= classify(name) %><%= classify(type) %>', () => {
6
+ let component: <%= classify(name) %><%= classify(type) %>;
7
+ let fixture: ComponentFixture<<%= classify(name) %><%= classify(type) %>>;
8
+
9
+ beforeEach(() => {
10
+ TestBed.configureTestingModule({
11
+ <%= standalone ? 'imports' : 'declarations' %>: [<%= classify(name) %><%= classify(type) %>]
12
+ });
13
+ fixture = TestBed.createComponent(<%= classify(name) %><%= classify(type) %>);
14
+ component = fixture.componentInstance;
15
+ fixture.detectChanges();
16
+ });
17
+
18
+ it('should create', () => {
19
+ expect(component).toBeTruthy();
20
+ });
21
+ });
@@ -0,0 +1,37 @@
1
+ import { <% if(changeDetection !== 'Default') { %>ChangeDetectionStrategy, <% }%>Component<% if(!!viewEncapsulation) { %>, ViewEncapsulation<% }%> } from '@angular/core';<% if(standalone) {%>
2
+ import { CommonModule } from '@angular/common';<% } %><% if (dataSource === "Example") {%>
3
+ import { products } from './<%= dasherize(name) %>.sample-data'; <% } %><% if (dataSource === "Mock Data") {%>
4
+ import data from './<%= dasherize(name) %>.sample-data';<% } %><% if (editing) {%>
5
+ import { FormBuilder, FormGroup } from '@angular/forms';
6
+ import { CreateFormGroupArgs } from '@progress/kendo-angular-grid';<% } %>
7
+
8
+ @Component({<% if(!skipSelector) {%>
9
+ selector: '<%= selector %>',<%}%><% if(standalone) {%>
10
+ standalone: true,
11
+ imports: [CommonModule],<%}%><% if(inlineTemplate) { %>
12
+ template: `<%= include("grid.html.include") %>`<% } else { %>
13
+ templateUrl: './<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %>.html'<% } if(inlineStyle) { %>,
14
+ styles: [<% if(displayBlock){ %>
15
+ `
16
+ :host {
17
+ display: block;
18
+ }
19
+ `<% } %>
20
+ ]<% } else if (style !== 'none') { %>,
21
+ styleUrls: ['./<%= dasherize(name) %><%= type ? '.' + dasherize(type): '' %>.<%= style %>']<% } %><% if(!!viewEncapsulation) { %>,
22
+ encapsulation: ViewEncapsulation.<%= viewEncapsulation %><% } if (changeDetection !== 'Default') { %>,
23
+ changeDetection: ChangeDetectionStrategy.<%= changeDetection %><% } %>
24
+ })
25
+ export class <%= classify(name) %><%= classify(type) %> {
26
+ public gridData: any[] = <% if (dataSource === "Example") { %>products<% } else if (dataSource === "Mock Data") { %>data<% } else if (dataName) { %><%=dataName%><% } else { %>products<%} %>;<% if (paging) { %>
27
+ public pageSize: number = <%=pageSize%>;<% } %><% if (editing) {%>
28
+
29
+ constructor(private formBuilder: FormBuilder) { }
30
+
31
+ public createFormGroup = (args: CreateFormGroupArgs): FormGroup => {
32
+ // TODO: Implement default item factory.
33
+ const item = args.isNew ? Object.keys(this.gridData[0]).reduce((acc, curr) => (acc as any)[curr] = null || acc, {}) : args.dataItem;
34
+
35
+ return this.formBuilder.group(item);
36
+ };<% } %>
37
+ }