@sprucelabs/heartwood-view-controllers 117.2.29 → 118.0.1
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/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/barChart.schema.js +3 -3
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/cardSection.schema.js +7 -0
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/chartDataPoint.schema.d.ts +3 -0
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/{barChartDataPoint.schema.js → chartDataPoint.schema.js} +4 -4
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/chartDataSet.schema.d.ts +3 -0
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/{barChartDataSet.schema.js → chartDataSet.schema.js} +7 -7
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/lineGraph.schema.d.ts +3 -0
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/lineGraph.schema.js +36 -0
- package/build/.spruce/schemas/schemas.types.d.ts +231 -181
- package/build/controllerMap.d.ts +3 -2
- package/build/controllerMap.js +2 -1
- package/build/esm/.spruce/schemas/heartwoodViewControllers/v2021_02_11/barChart.schema.js +3 -3
- package/build/esm/.spruce/schemas/heartwoodViewControllers/v2021_02_11/cardSection.schema.js +7 -0
- package/build/esm/.spruce/schemas/heartwoodViewControllers/v2021_02_11/chartDataPoint.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/heartwoodViewControllers/v2021_02_11/{barChartDataPoint.schema.js → chartDataPoint.schema.js} +4 -4
- package/build/esm/.spruce/schemas/heartwoodViewControllers/v2021_02_11/chartDataSet.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/heartwoodViewControllers/v2021_02_11/{barChartDataSet.schema.js → chartDataSet.schema.js} +7 -7
- package/build/esm/.spruce/schemas/heartwoodViewControllers/v2021_02_11/lineGraph.schema.d.ts +3 -0
- package/build/esm/.spruce/schemas/heartwoodViewControllers/v2021_02_11/lineGraph.schema.js +31 -0
- package/build/esm/.spruce/schemas/schemas.types.d.ts +231 -181
- package/build/esm/controllerMap.d.ts +3 -2
- package/build/esm/controllerMap.js +3 -2
- package/build/esm/index.d.ts +6 -4
- package/build/esm/index.js +6 -4
- package/build/esm/schemas/v2021_02_11/barChart.builder.d.ts +1 -0
- package/build/esm/schemas/v2021_02_11/barChart.builder.js +3 -29
- package/build/esm/schemas/v2021_02_11/cards/card.builder.d.ts +59 -0
- package/build/esm/schemas/v2021_02_11/cards/cardBody.builder.d.ts +59 -0
- package/build/esm/schemas/v2021_02_11/cards/cardSection.builder.d.ts +59 -0
- package/build/esm/schemas/v2021_02_11/cards/cardSection.builder.js +8 -0
- package/build/esm/schemas/v2021_02_11/chartDataSet.builder.d.ts +30 -0
- package/build/esm/schemas/v2021_02_11/chartDataSet.builder.js +30 -0
- package/build/esm/schemas/v2021_02_11/dialog.builder.d.ts +59 -0
- package/build/esm/schemas/v2021_02_11/layout.builder.d.ts +59 -0
- package/build/esm/schemas/v2021_02_11/lineGraph.builder.d.ts +53 -0
- package/build/esm/schemas/v2021_02_11/lineGraph.builder.js +26 -0
- package/build/esm/schemas/v2021_02_11/lockScreen.builder.d.ts +59 -0
- package/build/esm/schemas/v2021_02_11/skillView.builder.d.ts +59 -0
- package/build/esm/schemas/v2021_02_11/toolBelt.builder.d.ts +59 -0
- package/build/esm/tests/utilities/chartAssert.d.ts +7 -0
- package/build/esm/tests/utilities/chartAssert.js +33 -0
- package/build/esm/types/heartwood.types.d.ts +10 -3
- package/build/esm/viewControllers/charts/BarChart.vc.d.ts +9 -0
- package/build/esm/viewControllers/{BarChart.vc.js → charts/BarChart.vc.js} +2 -2
- package/build/esm/viewControllers/charts/LineGraph.vc.d.ts +9 -0
- package/build/esm/viewControllers/charts/LineGraph.vc.js +19 -0
- package/build/index.d.ts +6 -4
- package/build/index.js +15 -11
- package/build/schemas/v2021_02_11/barChart.builder.d.ts +1 -0
- package/build/schemas/v2021_02_11/barChart.builder.js +6 -29
- package/build/schemas/v2021_02_11/cards/card.builder.d.ts +59 -0
- package/build/schemas/v2021_02_11/cards/cardBody.builder.d.ts +59 -0
- package/build/schemas/v2021_02_11/cards/cardSection.builder.d.ts +59 -0
- package/build/schemas/v2021_02_11/cards/cardSection.builder.js +8 -0
- package/build/schemas/v2021_02_11/chartDataSet.builder.d.ts +30 -0
- package/build/schemas/v2021_02_11/chartDataSet.builder.js +32 -0
- package/build/schemas/v2021_02_11/dialog.builder.d.ts +59 -0
- package/build/schemas/v2021_02_11/layout.builder.d.ts +59 -0
- package/build/schemas/v2021_02_11/lineGraph.builder.d.ts +53 -0
- package/build/schemas/v2021_02_11/lineGraph.builder.js +31 -0
- package/build/schemas/v2021_02_11/lockScreen.builder.d.ts +59 -0
- package/build/schemas/v2021_02_11/skillView.builder.d.ts +59 -0
- package/build/schemas/v2021_02_11/toolBelt.builder.d.ts +59 -0
- package/build/tests/utilities/chartAssert.d.ts +7 -0
- package/build/tests/utilities/chartAssert.js +38 -0
- package/build/types/heartwood.types.d.ts +10 -3
- package/build/viewControllers/charts/BarChart.vc.d.ts +9 -0
- package/build/viewControllers/{BarChart.vc.js → charts/BarChart.vc.js} +2 -2
- package/build/viewControllers/charts/LineGraph.vc.d.ts +9 -0
- package/build/viewControllers/charts/LineGraph.vc.js +27 -0
- package/package.json +14 -14
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/barChartDataPoint.schema.d.ts +0 -3
- package/build/.spruce/schemas/heartwoodViewControllers/v2021_02_11/barChartDataSet.schema.d.ts +0 -3
- package/build/esm/.spruce/schemas/heartwoodViewControllers/v2021_02_11/barChartDataPoint.schema.d.ts +0 -3
- package/build/esm/.spruce/schemas/heartwoodViewControllers/v2021_02_11/barChartDataSet.schema.d.ts +0 -3
- package/build/esm/tests/utilities/barChartAssert.d.ts +0 -7
- package/build/esm/tests/utilities/barChartAssert.js +0 -24
- package/build/esm/viewControllers/BarChart.vc.d.ts +0 -9
- package/build/tests/utilities/barChartAssert.d.ts +0 -7
- package/build/tests/utilities/barChartAssert.js +0 -29
- package/build/viewControllers/BarChart.vc.d.ts +0 -9
|
@@ -22320,6 +22320,65 @@ declare const _default: {
|
|
|
22320
22320
|
options: {
|
|
22321
22321
|
schema: {
|
|
22322
22322
|
id: string;
|
|
22323
|
+
name: string;
|
|
22324
|
+
fields: {
|
|
22325
|
+
label: {
|
|
22326
|
+
type: "text";
|
|
22327
|
+
};
|
|
22328
|
+
dataPoints: {
|
|
22329
|
+
type: "schema";
|
|
22330
|
+
isRequired: true;
|
|
22331
|
+
isArray: true;
|
|
22332
|
+
minArrayLength: number;
|
|
22333
|
+
options: {
|
|
22334
|
+
schema: {
|
|
22335
|
+
id: string;
|
|
22336
|
+
fields: {
|
|
22337
|
+
label: {
|
|
22338
|
+
type: "text";
|
|
22339
|
+
};
|
|
22340
|
+
value: {
|
|
22341
|
+
type: "number";
|
|
22342
|
+
isRequired: true;
|
|
22343
|
+
};
|
|
22344
|
+
};
|
|
22345
|
+
};
|
|
22346
|
+
};
|
|
22347
|
+
};
|
|
22348
|
+
};
|
|
22349
|
+
};
|
|
22350
|
+
};
|
|
22351
|
+
};
|
|
22352
|
+
};
|
|
22353
|
+
};
|
|
22354
|
+
};
|
|
22355
|
+
};
|
|
22356
|
+
lineGraph: {
|
|
22357
|
+
type: "schema";
|
|
22358
|
+
label: string;
|
|
22359
|
+
options: {
|
|
22360
|
+
schema: {
|
|
22361
|
+
id: string;
|
|
22362
|
+
name: string;
|
|
22363
|
+
fields: {
|
|
22364
|
+
id: {
|
|
22365
|
+
type: "id";
|
|
22366
|
+
};
|
|
22367
|
+
controller: {
|
|
22368
|
+
type: "raw";
|
|
22369
|
+
options: {
|
|
22370
|
+
valueType: string;
|
|
22371
|
+
};
|
|
22372
|
+
};
|
|
22373
|
+
dataSets: {
|
|
22374
|
+
type: "schema";
|
|
22375
|
+
isRequired: true;
|
|
22376
|
+
isArray: true;
|
|
22377
|
+
minArrayLength: number;
|
|
22378
|
+
options: {
|
|
22379
|
+
schema: {
|
|
22380
|
+
id: string;
|
|
22381
|
+
name: string;
|
|
22323
22382
|
fields: {
|
|
22324
22383
|
label: {
|
|
22325
22384
|
type: "text";
|
|
@@ -12,6 +12,7 @@ const countdownTimer_builder_1 = __importDefault(require("../countdownTimer.buil
|
|
|
12
12
|
const feed_builder_1 = __importDefault(require("../feed.builder"));
|
|
13
13
|
const bigForm_builder_1 = __importDefault(require("../forms/bigForm.builder"));
|
|
14
14
|
const form_builder_1 = __importDefault(require("../forms/form.builder"));
|
|
15
|
+
const lineGraph_builder_1 = __importDefault(require("../lineGraph.builder"));
|
|
15
16
|
const list_builder_1 = __importDefault(require("../list.builder"));
|
|
16
17
|
const map_builder_1 = __importDefault(require("../map.builder"));
|
|
17
18
|
const pager_builder_1 = __importDefault(require("../pager.builder"));
|
|
@@ -192,6 +193,13 @@ exports.default = (0, schema_1.buildSchema)({
|
|
|
192
193
|
schema: barChart_builder_1.default,
|
|
193
194
|
},
|
|
194
195
|
},
|
|
196
|
+
lineGraph: {
|
|
197
|
+
type: 'schema',
|
|
198
|
+
label: 'Line graph',
|
|
199
|
+
options: {
|
|
200
|
+
schema: lineGraph_builder_1.default,
|
|
201
|
+
},
|
|
202
|
+
},
|
|
195
203
|
shouldRenderContentsAsGrid: {
|
|
196
204
|
type: 'boolean',
|
|
197
205
|
label: 'Grid',
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
fields: {
|
|
5
|
+
label: {
|
|
6
|
+
type: "text";
|
|
7
|
+
};
|
|
8
|
+
dataPoints: {
|
|
9
|
+
type: "schema";
|
|
10
|
+
isRequired: true;
|
|
11
|
+
isArray: true;
|
|
12
|
+
minArrayLength: number;
|
|
13
|
+
options: {
|
|
14
|
+
schema: {
|
|
15
|
+
id: string;
|
|
16
|
+
fields: {
|
|
17
|
+
label: {
|
|
18
|
+
type: "text";
|
|
19
|
+
};
|
|
20
|
+
value: {
|
|
21
|
+
type: "number";
|
|
22
|
+
isRequired: true;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schema_1 = require("@sprucelabs/schema");
|
|
4
|
+
exports.default = (0, schema_1.buildSchema)({
|
|
5
|
+
id: 'chartDataSet',
|
|
6
|
+
name: 'Chart data set',
|
|
7
|
+
fields: {
|
|
8
|
+
label: {
|
|
9
|
+
type: 'text',
|
|
10
|
+
},
|
|
11
|
+
dataPoints: {
|
|
12
|
+
type: 'schema',
|
|
13
|
+
isRequired: true,
|
|
14
|
+
isArray: true,
|
|
15
|
+
minArrayLength: 0,
|
|
16
|
+
options: {
|
|
17
|
+
schema: (0, schema_1.buildSchema)({
|
|
18
|
+
id: 'chartDataPoint',
|
|
19
|
+
fields: {
|
|
20
|
+
label: {
|
|
21
|
+
type: 'text',
|
|
22
|
+
},
|
|
23
|
+
value: {
|
|
24
|
+
type: 'number',
|
|
25
|
+
isRequired: true,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
}),
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
});
|
|
@@ -29437,6 +29437,65 @@ declare const _default: {
|
|
|
29437
29437
|
options: {
|
|
29438
29438
|
schema: {
|
|
29439
29439
|
id: string;
|
|
29440
|
+
name: string;
|
|
29441
|
+
fields: {
|
|
29442
|
+
label: {
|
|
29443
|
+
type: "text";
|
|
29444
|
+
};
|
|
29445
|
+
dataPoints: {
|
|
29446
|
+
type: "schema";
|
|
29447
|
+
isRequired: true;
|
|
29448
|
+
isArray: true;
|
|
29449
|
+
minArrayLength: number;
|
|
29450
|
+
options: {
|
|
29451
|
+
schema: {
|
|
29452
|
+
id: string;
|
|
29453
|
+
fields: {
|
|
29454
|
+
label: {
|
|
29455
|
+
type: "text";
|
|
29456
|
+
};
|
|
29457
|
+
value: {
|
|
29458
|
+
type: "number";
|
|
29459
|
+
isRequired: true;
|
|
29460
|
+
};
|
|
29461
|
+
};
|
|
29462
|
+
};
|
|
29463
|
+
};
|
|
29464
|
+
};
|
|
29465
|
+
};
|
|
29466
|
+
};
|
|
29467
|
+
};
|
|
29468
|
+
};
|
|
29469
|
+
};
|
|
29470
|
+
};
|
|
29471
|
+
};
|
|
29472
|
+
};
|
|
29473
|
+
lineGraph: {
|
|
29474
|
+
type: "schema";
|
|
29475
|
+
label: string;
|
|
29476
|
+
options: {
|
|
29477
|
+
schema: {
|
|
29478
|
+
id: string;
|
|
29479
|
+
name: string;
|
|
29480
|
+
fields: {
|
|
29481
|
+
id: {
|
|
29482
|
+
type: "id";
|
|
29483
|
+
};
|
|
29484
|
+
controller: {
|
|
29485
|
+
type: "raw";
|
|
29486
|
+
options: {
|
|
29487
|
+
valueType: string;
|
|
29488
|
+
};
|
|
29489
|
+
};
|
|
29490
|
+
dataSets: {
|
|
29491
|
+
type: "schema";
|
|
29492
|
+
isRequired: true;
|
|
29493
|
+
isArray: true;
|
|
29494
|
+
minArrayLength: number;
|
|
29495
|
+
options: {
|
|
29496
|
+
schema: {
|
|
29497
|
+
id: string;
|
|
29498
|
+
name: string;
|
|
29440
29499
|
fields: {
|
|
29441
29500
|
label: {
|
|
29442
29501
|
type: "text";
|
|
@@ -29417,6 +29417,65 @@ declare const _default: {
|
|
|
29417
29417
|
options: {
|
|
29418
29418
|
schema: {
|
|
29419
29419
|
id: string;
|
|
29420
|
+
name: string;
|
|
29421
|
+
fields: {
|
|
29422
|
+
label: {
|
|
29423
|
+
type: "text";
|
|
29424
|
+
};
|
|
29425
|
+
dataPoints: {
|
|
29426
|
+
type: "schema";
|
|
29427
|
+
isRequired: true;
|
|
29428
|
+
isArray: true;
|
|
29429
|
+
minArrayLength: number;
|
|
29430
|
+
options: {
|
|
29431
|
+
schema: {
|
|
29432
|
+
id: string;
|
|
29433
|
+
fields: {
|
|
29434
|
+
label: {
|
|
29435
|
+
type: "text";
|
|
29436
|
+
};
|
|
29437
|
+
value: {
|
|
29438
|
+
type: "number";
|
|
29439
|
+
isRequired: true;
|
|
29440
|
+
};
|
|
29441
|
+
};
|
|
29442
|
+
};
|
|
29443
|
+
};
|
|
29444
|
+
};
|
|
29445
|
+
};
|
|
29446
|
+
};
|
|
29447
|
+
};
|
|
29448
|
+
};
|
|
29449
|
+
};
|
|
29450
|
+
};
|
|
29451
|
+
};
|
|
29452
|
+
};
|
|
29453
|
+
lineGraph: {
|
|
29454
|
+
type: "schema";
|
|
29455
|
+
label: string;
|
|
29456
|
+
options: {
|
|
29457
|
+
schema: {
|
|
29458
|
+
id: string;
|
|
29459
|
+
name: string;
|
|
29460
|
+
fields: {
|
|
29461
|
+
id: {
|
|
29462
|
+
type: "id";
|
|
29463
|
+
};
|
|
29464
|
+
controller: {
|
|
29465
|
+
type: "raw";
|
|
29466
|
+
options: {
|
|
29467
|
+
valueType: string;
|
|
29468
|
+
};
|
|
29469
|
+
};
|
|
29470
|
+
dataSets: {
|
|
29471
|
+
type: "schema";
|
|
29472
|
+
isRequired: true;
|
|
29473
|
+
isArray: true;
|
|
29474
|
+
minArrayLength: number;
|
|
29475
|
+
options: {
|
|
29476
|
+
schema: {
|
|
29477
|
+
id: string;
|
|
29478
|
+
name: string;
|
|
29420
29479
|
fields: {
|
|
29421
29480
|
label: {
|
|
29422
29481
|
type: "text";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
fields: {
|
|
5
|
+
id: {
|
|
6
|
+
type: "id";
|
|
7
|
+
};
|
|
8
|
+
controller: {
|
|
9
|
+
type: "raw";
|
|
10
|
+
options: {
|
|
11
|
+
valueType: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
dataSets: {
|
|
15
|
+
type: "schema";
|
|
16
|
+
isRequired: true;
|
|
17
|
+
isArray: true;
|
|
18
|
+
minArrayLength: number;
|
|
19
|
+
options: {
|
|
20
|
+
schema: {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
fields: {
|
|
24
|
+
label: {
|
|
25
|
+
type: "text";
|
|
26
|
+
};
|
|
27
|
+
dataPoints: {
|
|
28
|
+
type: "schema";
|
|
29
|
+
isRequired: true;
|
|
30
|
+
isArray: true;
|
|
31
|
+
minArrayLength: number;
|
|
32
|
+
options: {
|
|
33
|
+
schema: {
|
|
34
|
+
id: string;
|
|
35
|
+
fields: {
|
|
36
|
+
label: {
|
|
37
|
+
type: "text";
|
|
38
|
+
};
|
|
39
|
+
value: {
|
|
40
|
+
type: "number";
|
|
41
|
+
isRequired: true;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const schema_1 = require("@sprucelabs/schema");
|
|
7
|
+
const chartDataSet_builder_1 = __importDefault(require("./chartDataSet.builder"));
|
|
8
|
+
exports.default = (0, schema_1.buildSchema)({
|
|
9
|
+
id: 'lineGraph',
|
|
10
|
+
name: 'Line graph',
|
|
11
|
+
fields: {
|
|
12
|
+
id: {
|
|
13
|
+
type: 'id',
|
|
14
|
+
},
|
|
15
|
+
controller: {
|
|
16
|
+
type: 'raw',
|
|
17
|
+
options: {
|
|
18
|
+
valueType: 'HeartwoodTypes.ChartViewController<HeartwoodTypes.LineGraph>',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
dataSets: {
|
|
22
|
+
type: 'schema',
|
|
23
|
+
isRequired: true,
|
|
24
|
+
isArray: true,
|
|
25
|
+
minArrayLength: 0,
|
|
26
|
+
options: {
|
|
27
|
+
schema: chartDataSet_builder_1.default,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
});
|
|
@@ -29462,6 +29462,65 @@ declare const _default: {
|
|
|
29462
29462
|
options: {
|
|
29463
29463
|
schema: {
|
|
29464
29464
|
id: string;
|
|
29465
|
+
name: string;
|
|
29466
|
+
fields: {
|
|
29467
|
+
label: {
|
|
29468
|
+
type: "text";
|
|
29469
|
+
};
|
|
29470
|
+
dataPoints: {
|
|
29471
|
+
type: "schema";
|
|
29472
|
+
isRequired: true;
|
|
29473
|
+
isArray: true;
|
|
29474
|
+
minArrayLength: number;
|
|
29475
|
+
options: {
|
|
29476
|
+
schema: {
|
|
29477
|
+
id: string;
|
|
29478
|
+
fields: {
|
|
29479
|
+
label: {
|
|
29480
|
+
type: "text";
|
|
29481
|
+
};
|
|
29482
|
+
value: {
|
|
29483
|
+
type: "number";
|
|
29484
|
+
isRequired: true;
|
|
29485
|
+
};
|
|
29486
|
+
};
|
|
29487
|
+
};
|
|
29488
|
+
};
|
|
29489
|
+
};
|
|
29490
|
+
};
|
|
29491
|
+
};
|
|
29492
|
+
};
|
|
29493
|
+
};
|
|
29494
|
+
};
|
|
29495
|
+
};
|
|
29496
|
+
};
|
|
29497
|
+
};
|
|
29498
|
+
lineGraph: {
|
|
29499
|
+
type: "schema";
|
|
29500
|
+
label: string;
|
|
29501
|
+
options: {
|
|
29502
|
+
schema: {
|
|
29503
|
+
id: string;
|
|
29504
|
+
name: string;
|
|
29505
|
+
fields: {
|
|
29506
|
+
id: {
|
|
29507
|
+
type: "id";
|
|
29508
|
+
};
|
|
29509
|
+
controller: {
|
|
29510
|
+
type: "raw";
|
|
29511
|
+
options: {
|
|
29512
|
+
valueType: string;
|
|
29513
|
+
};
|
|
29514
|
+
};
|
|
29515
|
+
dataSets: {
|
|
29516
|
+
type: "schema";
|
|
29517
|
+
isRequired: true;
|
|
29518
|
+
isArray: true;
|
|
29519
|
+
minArrayLength: number;
|
|
29520
|
+
options: {
|
|
29521
|
+
schema: {
|
|
29522
|
+
id: string;
|
|
29523
|
+
name: string;
|
|
29465
29524
|
fields: {
|
|
29466
29525
|
label: {
|
|
29467
29526
|
type: "text";
|
|
@@ -29456,6 +29456,65 @@ declare const _default: {
|
|
|
29456
29456
|
options: {
|
|
29457
29457
|
schema: {
|
|
29458
29458
|
id: string;
|
|
29459
|
+
name: string;
|
|
29460
|
+
fields: {
|
|
29461
|
+
label: {
|
|
29462
|
+
type: "text";
|
|
29463
|
+
};
|
|
29464
|
+
dataPoints: {
|
|
29465
|
+
type: "schema";
|
|
29466
|
+
isRequired: true;
|
|
29467
|
+
isArray: true;
|
|
29468
|
+
minArrayLength: number;
|
|
29469
|
+
options: {
|
|
29470
|
+
schema: {
|
|
29471
|
+
id: string;
|
|
29472
|
+
fields: {
|
|
29473
|
+
label: {
|
|
29474
|
+
type: "text";
|
|
29475
|
+
};
|
|
29476
|
+
value: {
|
|
29477
|
+
type: "number";
|
|
29478
|
+
isRequired: true;
|
|
29479
|
+
};
|
|
29480
|
+
};
|
|
29481
|
+
};
|
|
29482
|
+
};
|
|
29483
|
+
};
|
|
29484
|
+
};
|
|
29485
|
+
};
|
|
29486
|
+
};
|
|
29487
|
+
};
|
|
29488
|
+
};
|
|
29489
|
+
};
|
|
29490
|
+
};
|
|
29491
|
+
};
|
|
29492
|
+
lineGraph: {
|
|
29493
|
+
type: "schema";
|
|
29494
|
+
label: string;
|
|
29495
|
+
options: {
|
|
29496
|
+
schema: {
|
|
29497
|
+
id: string;
|
|
29498
|
+
name: string;
|
|
29499
|
+
fields: {
|
|
29500
|
+
id: {
|
|
29501
|
+
type: "id";
|
|
29502
|
+
};
|
|
29503
|
+
controller: {
|
|
29504
|
+
type: "raw";
|
|
29505
|
+
options: {
|
|
29506
|
+
valueType: string;
|
|
29507
|
+
};
|
|
29508
|
+
};
|
|
29509
|
+
dataSets: {
|
|
29510
|
+
type: "schema";
|
|
29511
|
+
isRequired: true;
|
|
29512
|
+
isArray: true;
|
|
29513
|
+
minArrayLength: number;
|
|
29514
|
+
options: {
|
|
29515
|
+
schema: {
|
|
29516
|
+
id: string;
|
|
29517
|
+
name: string;
|
|
29459
29518
|
fields: {
|
|
29460
29519
|
label: {
|
|
29461
29520
|
type: "text";
|
|
@@ -29478,6 +29478,65 @@ declare const _default: {
|
|
|
29478
29478
|
options: {
|
|
29479
29479
|
schema: {
|
|
29480
29480
|
id: string;
|
|
29481
|
+
name: string;
|
|
29482
|
+
fields: {
|
|
29483
|
+
label: {
|
|
29484
|
+
type: "text";
|
|
29485
|
+
};
|
|
29486
|
+
dataPoints: {
|
|
29487
|
+
type: "schema";
|
|
29488
|
+
isRequired: true;
|
|
29489
|
+
isArray: true;
|
|
29490
|
+
minArrayLength: number;
|
|
29491
|
+
options: {
|
|
29492
|
+
schema: {
|
|
29493
|
+
id: string;
|
|
29494
|
+
fields: {
|
|
29495
|
+
label: {
|
|
29496
|
+
type: "text";
|
|
29497
|
+
};
|
|
29498
|
+
value: {
|
|
29499
|
+
type: "number";
|
|
29500
|
+
isRequired: true;
|
|
29501
|
+
};
|
|
29502
|
+
};
|
|
29503
|
+
};
|
|
29504
|
+
};
|
|
29505
|
+
};
|
|
29506
|
+
};
|
|
29507
|
+
};
|
|
29508
|
+
};
|
|
29509
|
+
};
|
|
29510
|
+
};
|
|
29511
|
+
};
|
|
29512
|
+
};
|
|
29513
|
+
};
|
|
29514
|
+
lineGraph: {
|
|
29515
|
+
type: "schema";
|
|
29516
|
+
label: string;
|
|
29517
|
+
options: {
|
|
29518
|
+
schema: {
|
|
29519
|
+
id: string;
|
|
29520
|
+
name: string;
|
|
29521
|
+
fields: {
|
|
29522
|
+
id: {
|
|
29523
|
+
type: "id";
|
|
29524
|
+
};
|
|
29525
|
+
controller: {
|
|
29526
|
+
type: "raw";
|
|
29527
|
+
options: {
|
|
29528
|
+
valueType: string;
|
|
29529
|
+
};
|
|
29530
|
+
};
|
|
29531
|
+
dataSets: {
|
|
29532
|
+
type: "schema";
|
|
29533
|
+
isRequired: true;
|
|
29534
|
+
isArray: true;
|
|
29535
|
+
minArrayLength: number;
|
|
29536
|
+
options: {
|
|
29537
|
+
schema: {
|
|
29538
|
+
id: string;
|
|
29539
|
+
name: string;
|
|
29481
29540
|
fields: {
|
|
29482
29541
|
label: {
|
|
29483
29542
|
type: "text";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ViewController, Card, BarChart, LineGraph, ChartDataSet } from '../../types/heartwood.types';
|
|
2
|
+
declare const chartAssert: {
|
|
3
|
+
cardRendersLineGraph(cardVc: ViewController<Card>, id?: string): any;
|
|
4
|
+
cardRendersBarChart(cardVc: ViewController<Card>, id?: string): any;
|
|
5
|
+
dataSetsEqual(chartVc: ViewController<BarChart> | ViewController<LineGraph>, dataSets: ChartDataSet[]): void;
|
|
6
|
+
};
|
|
7
|
+
export default chartAssert;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const schema_1 = require("@sprucelabs/schema");
|
|
7
|
+
const test_utils_1 = require("@sprucelabs/test-utils");
|
|
8
|
+
const render_utility_1 = __importDefault(require("../../utilities/render.utility"));
|
|
9
|
+
const assertSupport_1 = require("./assertSupport");
|
|
10
|
+
const chartAssert = {
|
|
11
|
+
cardRendersLineGraph(cardVc, id) {
|
|
12
|
+
return assertRendersCardRendersCart(cardVc, 'lineGraph', 'line graph', id);
|
|
13
|
+
},
|
|
14
|
+
cardRendersBarChart(cardVc, id) {
|
|
15
|
+
return assertRendersCardRendersCart(cardVc, 'barChart', 'bar chart', id);
|
|
16
|
+
},
|
|
17
|
+
dataSetsEqual(chartVc, dataSets) {
|
|
18
|
+
(0, schema_1.assertOptions)({ chartVc, dataSets }, ['chartVc', 'dataSets']);
|
|
19
|
+
const model = render_utility_1.default.render(chartVc);
|
|
20
|
+
test_utils_1.assert.isEqualDeep(model.dataSets, dataSets, `Your bar chart does not match the expected data sets!`);
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
exports.default = chartAssert;
|
|
24
|
+
function assertRendersCardRendersCart(cardVc, key, name, id) {
|
|
25
|
+
(0, schema_1.assertOptions)({ cardVc }, ['cardVc']);
|
|
26
|
+
const model = render_utility_1.default.render(cardVc);
|
|
27
|
+
const charts = (0, assertSupport_1.pluckAllFromView)(model, key);
|
|
28
|
+
test_utils_1.assert.isAbove(charts.length, 0, `Your card is not rendering a ${name} and should be!`);
|
|
29
|
+
let match = charts[0];
|
|
30
|
+
if (id) {
|
|
31
|
+
//@ts-ignore
|
|
32
|
+
match = charts.find((b) => b?.id === id);
|
|
33
|
+
test_utils_1.assert.isTruthy(match, `You are not rendering a ${name} with the id ${id}!`);
|
|
34
|
+
}
|
|
35
|
+
//@ts-ignore
|
|
36
|
+
const vc = match.controller;
|
|
37
|
+
return vc;
|
|
38
|
+
}
|