@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
|
@@ -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,33 @@
|
|
|
1
|
+
import { assertOptions } from '@sprucelabs/schema';
|
|
2
|
+
import { assert } from '@sprucelabs/test-utils';
|
|
3
|
+
import renderUtil from '../../utilities/render.utility.js';
|
|
4
|
+
import { pluckAllFromView } from './assertSupport.js';
|
|
5
|
+
const chartAssert = {
|
|
6
|
+
cardRendersLineGraph(cardVc, id) {
|
|
7
|
+
return assertRendersCardRendersCart(cardVc, 'lineGraph', 'line graph', id);
|
|
8
|
+
},
|
|
9
|
+
cardRendersBarChart(cardVc, id) {
|
|
10
|
+
return assertRendersCardRendersCart(cardVc, 'barChart', 'bar chart', id);
|
|
11
|
+
},
|
|
12
|
+
dataSetsEqual(chartVc, dataSets) {
|
|
13
|
+
assertOptions({ chartVc, dataSets }, ['chartVc', 'dataSets']);
|
|
14
|
+
const model = renderUtil.render(chartVc);
|
|
15
|
+
assert.isEqualDeep(model.dataSets, dataSets, `Your bar chart does not match the expected data sets!`);
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export default chartAssert;
|
|
19
|
+
function assertRendersCardRendersCart(cardVc, key, name, id) {
|
|
20
|
+
assertOptions({ cardVc }, ['cardVc']);
|
|
21
|
+
const model = renderUtil.render(cardVc);
|
|
22
|
+
const charts = pluckAllFromView(model, key);
|
|
23
|
+
assert.isAbove(charts.length, 0, `Your card is not rendering a ${name} and should be!`);
|
|
24
|
+
let match = charts[0];
|
|
25
|
+
if (id) {
|
|
26
|
+
//@ts-ignore
|
|
27
|
+
match = charts.find((b) => (b === null || b === void 0 ? void 0 : b.id) === id);
|
|
28
|
+
assert.isTruthy(match, `You are not rendering a ${name} with the id ${id}!`);
|
|
29
|
+
}
|
|
30
|
+
//@ts-ignore
|
|
31
|
+
const vc = match.controller;
|
|
32
|
+
return vc;
|
|
33
|
+
}
|
|
@@ -10,13 +10,14 @@ import LockScreenSkillViewController, { LockScreenSkillViewControllerOptions } f
|
|
|
10
10
|
import { UniversalViewOptionFields } from '../utilities/removeUniversalViewOptions';
|
|
11
11
|
import ActiveRecordCardViewController, { ActiveRecordCardViewControllerOptions } from '../viewControllers/activeRecord/ActiveRecordCard.vc';
|
|
12
12
|
import ActiveRecordListViewController, { ActiveRecordListViewControllerOptions } from '../viewControllers/activeRecord/ActiveRecordList.vc';
|
|
13
|
-
import { BarChartViewControllerOptions } from '../viewControllers/BarChart.vc';
|
|
14
13
|
import BigFormViewControllerImpl, { BigFormViewControllerOptions } from '../viewControllers/BigForm.vc';
|
|
15
14
|
import ButtonBarViewController, { ButtonBarViewControllerOptions } from '../viewControllers/ButtonBar.vc';
|
|
16
15
|
import ButtonGroupViewController, { ButtonGroupViewControllerOptions } from '../viewControllers/ButtonGroup.vc';
|
|
17
16
|
import CalendarViewController, { CalendarViewControllerOptions } from '../viewControllers/Calendar.vc';
|
|
18
17
|
import CalendarEventViewController from '../viewControllers/CalendarEvent.vc';
|
|
19
18
|
import CardViewControllerImpl, { CardViewControllerOptions } from '../viewControllers/card/Card.vc';
|
|
19
|
+
import { BarChartViewControllerOptions } from '../viewControllers/charts/BarChart.vc';
|
|
20
|
+
import LineGraphViewController, { LineGraphViewControllerOptions } from '../viewControllers/charts/LineGraph.vc';
|
|
20
21
|
import ConfirmViewController, { ConfirmViewControllerOptions } from '../viewControllers/Confirm.vc';
|
|
21
22
|
import CountdownTimerViewController, { CountdownTimerViewControllerOptions } from '../viewControllers/countdownTimer/CountdownTimer.vc';
|
|
22
23
|
import DialogViewController, { DialogViewControllerOptions } from '../viewControllers/Dialog.vc';
|
|
@@ -244,8 +245,9 @@ export type Progress = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Progre
|
|
|
244
245
|
export type PolarArea = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.PolarArea;
|
|
245
246
|
export type PolarAreaDataItem = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.PolarAreaDataItem;
|
|
246
247
|
export type BarChart = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.BarChart;
|
|
247
|
-
export type
|
|
248
|
-
export type
|
|
248
|
+
export type LineGraph = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.LineGraph;
|
|
249
|
+
export type ChartDataSet = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.ChartDataSet;
|
|
250
|
+
export type ChartDataPoint = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.ChartDataPoint;
|
|
249
251
|
export type Form<S extends Schema = any> = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Form<S>;
|
|
250
252
|
export type NavigationRoute = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.NavigationRoute;
|
|
251
253
|
export type LayoutStyle = NonNullable<SpruceSchemas.HeartwoodViewControllers.v2021_02_11.SkillView['layout']>;
|
|
@@ -379,6 +381,7 @@ export interface ViewControllerMap {
|
|
|
379
381
|
'polar-area': PolarAreaViewController;
|
|
380
382
|
pager: PagerViewController;
|
|
381
383
|
'bar-chart': BarChartViewController;
|
|
384
|
+
'line-graph': LineGraphViewController;
|
|
382
385
|
'lock-screen': LockScreenSkillViewController;
|
|
383
386
|
}
|
|
384
387
|
export interface ViewControllerOptionsMap {
|
|
@@ -422,6 +425,7 @@ export interface ViewControllerOptionsMap {
|
|
|
422
425
|
'polar-area': PolarAreaViewControllerOptions;
|
|
423
426
|
pager: PagerViewControllerOptions;
|
|
424
427
|
'bar-chart': BarChartViewControllerOptions;
|
|
428
|
+
'line-graph': LineGraphViewControllerOptions;
|
|
425
429
|
'lock-screen': LockScreenSkillViewControllerOptions;
|
|
426
430
|
}
|
|
427
431
|
export interface SkillViewControllerMap {
|
|
@@ -618,3 +622,6 @@ export interface AppControllerLoadOptions {
|
|
|
618
622
|
scope: Scope;
|
|
619
623
|
themes: ThemeManager;
|
|
620
624
|
}
|
|
625
|
+
export interface ChartViewController<ViewModel extends Record<string, any>> extends ViewController<ViewModel> {
|
|
626
|
+
setDataSets(dataSets: ChartDataSet[]): void;
|
|
627
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BarChart, ChartDataSet, ChartViewController, ViewControllerOptions } from '../../types/heartwood.types';
|
|
2
|
+
import AbstractViewController from '../Abstract.vc';
|
|
3
|
+
export default class BarChartViewController extends AbstractViewController<BarChart> implements ChartViewController<BarChart> {
|
|
4
|
+
private model;
|
|
5
|
+
constructor(options: ViewControllerOptions & BarChartViewControllerOptions);
|
|
6
|
+
setDataSets(dataSets: ChartDataSet[]): void;
|
|
7
|
+
render(): BarChart;
|
|
8
|
+
}
|
|
9
|
+
export type BarChartViewControllerOptions = Partial<BarChart>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { assertOptions } from '@sprucelabs/schema';
|
|
2
|
-
import removeUniversalViewOptions from '
|
|
3
|
-
import AbstractViewController from '
|
|
2
|
+
import removeUniversalViewOptions from '../../utilities/removeUniversalViewOptions.js';
|
|
3
|
+
import AbstractViewController from '../Abstract.vc.js';
|
|
4
4
|
export default class BarChartViewController extends AbstractViewController {
|
|
5
5
|
constructor(options) {
|
|
6
6
|
var _a;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChartDataSet, ChartViewController, LineGraph, ViewControllerOptions } from '../../types/heartwood.types';
|
|
2
|
+
import AbstractViewController from '../Abstract.vc';
|
|
3
|
+
export default class LineGraphViewController extends AbstractViewController<LineGraph> implements ChartViewController<LineGraph> {
|
|
4
|
+
private model;
|
|
5
|
+
constructor(options: ViewControllerOptions & LineGraphViewControllerOptions);
|
|
6
|
+
setDataSets(dataSets: ChartDataSet[]): void;
|
|
7
|
+
render(): LineGraph;
|
|
8
|
+
}
|
|
9
|
+
export type LineGraphViewControllerOptions = Partial<LineGraph>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { assertOptions } from '@sprucelabs/schema';
|
|
2
|
+
import removeUniversalViewOptions from '../../utilities/removeUniversalViewOptions.js';
|
|
3
|
+
import AbstractViewController from '../Abstract.vc.js';
|
|
4
|
+
export default class LineGraphViewController extends AbstractViewController {
|
|
5
|
+
constructor(options) {
|
|
6
|
+
var _a;
|
|
7
|
+
super(options);
|
|
8
|
+
const model = removeUniversalViewOptions(options);
|
|
9
|
+
this.model = Object.assign(Object.assign({}, model), { dataSets: (_a = model.dataSets) !== null && _a !== void 0 ? _a : [] });
|
|
10
|
+
}
|
|
11
|
+
setDataSets(dataSets) {
|
|
12
|
+
assertOptions({ dataSets }, ['dataSets']);
|
|
13
|
+
this.model.dataSets = dataSets;
|
|
14
|
+
this.triggerRender();
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return Object.assign(Object.assign({}, this.model), { controller: this });
|
|
18
|
+
}
|
|
19
|
+
}
|
package/build/index.d.ts
CHANGED
|
@@ -19,7 +19,8 @@ export { default as ListRowViewController } from './viewControllers/list/ListRow
|
|
|
19
19
|
export { default as ListCellViewController } from './viewControllers/list/ListCell.vc';
|
|
20
20
|
export { default as FormViewControllerImpl } from './viewControllers/form/Form.vc';
|
|
21
21
|
export { default as ToolBeltViewController } from './viewControllers/ToolBelt.vc';
|
|
22
|
-
export { default as BarChartViewController } from './viewControllers/BarChart.vc';
|
|
22
|
+
export { default as BarChartViewController } from './viewControllers/charts/BarChart.vc';
|
|
23
|
+
export { default as LineGraphViewController } from './viewControllers/charts/LineGraph.vc';
|
|
23
24
|
export * from './viewControllers/ToolBelt.vc';
|
|
24
25
|
export * from './viewControllers/form/Form.vc';
|
|
25
26
|
export { default as LoginViewController } from './viewControllers/Login.vc';
|
|
@@ -173,7 +174,7 @@ export { default as calendarInteractor } from './tests/utilities/calendarInterac
|
|
|
173
174
|
export { default as countdownTimerAssert } from './tests/utilities/countdownTimerAssert';
|
|
174
175
|
export { default as countdownTimerInteractor } from './tests/utilities/countdownTimerInteractor';
|
|
175
176
|
export { default as progressNavigatorAssert } from './tests/utilities/progressNavigatorAssert';
|
|
176
|
-
export { default as
|
|
177
|
+
export { default as chartAssert } from './tests/utilities/chartAssert';
|
|
177
178
|
export { default as interactionUtil } from './tests/utilities/interaction.utility';
|
|
178
179
|
export { default as calendarSeeder } from './tests/utilities/calendarSeeder';
|
|
179
180
|
export { default as confirmTestPatcher } from './tests/utilities/confirmTestPatcher';
|
|
@@ -196,8 +197,9 @@ export { default as progressNavigatorSchema } from './.spruce/schemas/heartwoodV
|
|
|
196
197
|
export { default as progressNavigatorStepSchema } from './.spruce/schemas/heartwoodViewControllers/v2021_02_11/progressNavigatorStep.schema';
|
|
197
198
|
export { default as progressDetailsSchema } from './.spruce/schemas/heartwoodViewControllers/v2021_02_11/progressDetails.schema';
|
|
198
199
|
export { default as barChartSchema } from './.spruce/schemas/heartwoodViewControllers/v2021_02_11/barChart.schema';
|
|
199
|
-
export { default as
|
|
200
|
-
export { default as
|
|
200
|
+
export { default as lineGraphSchema } from './.spruce/schemas/heartwoodViewControllers/v2021_02_11/lineGraph.schema';
|
|
201
|
+
export { default as chartDataPointSchema } from './.spruce/schemas/heartwoodViewControllers/v2021_02_11/chartDataPoint.schema';
|
|
202
|
+
export { default as chartDataSetSchema } from './.spruce/schemas/heartwoodViewControllers/v2021_02_11/chartDataSet.schema';
|
|
201
203
|
export { default as navigationButtonDropdownSchema } from './.spruce/schemas/heartwoodViewControllers/v2021_02_11/navigationButtonDropdown.schema';
|
|
202
204
|
export { default as navigationDropdownButtonSchema } from './.spruce/schemas/heartwoodViewControllers/v2021_02_11/navigationDropdownButton.schema';
|
|
203
205
|
export { default as routerDestinationSchema } from './.spruce/schemas/heartwoodViewControllers/v2021_02_11/routerDestination.schema';
|
package/build/index.js
CHANGED
|
@@ -17,10 +17,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.navigationRouteSchema = exports.routerDestinationSchema = exports.navigationDropdownButtonSchema = exports.navigationButtonDropdownSchema = exports.
|
|
20
|
+
exports.selectInputSchema = exports.skillViewSchema = exports.bigFormSchema = exports.calendarEventColorsSchema = exports.buildSkillView = exports.buildForm = exports.buildBigForm = exports.AuthenticatorImpl = exports.PolarAreaViewController = exports.SpyViewControllerExporter = exports.lockScreenAssert = exports.MockActiveRecordCard = exports.activeRecordCardAssert = exports.buildActiveRecordList = exports.buildActiveRecordCard = exports.AbstractInputViewController = exports.AutocompleteInputViewController = exports.AbstractCalendarEventViewController = exports.RatingsViewController = exports.ProgressViewController = exports.StatsViewController = exports.FeedViewController = exports.ActiveRecordListViewController = exports.ActiveRecordCardViewController = exports.TalkingSprucebotViewController = exports.ButtonBarViewController = exports.CalendarViewController = exports.SwipeCardViewControllerImpl = exports.SwipeViewControllerImpl = exports.PagerViewController = exports.ProgressNavigatorViewController = exports.CountdownTimerViewController = exports.FormBuilderCardViewControllerImpl = exports.LoginViewController = exports.LineGraphViewController = exports.BarChartViewController = exports.ToolBeltViewController = exports.FormViewControllerImpl = exports.ListCellViewController = exports.ListRowViewController = exports.ListViewController = exports.NavigationViewController = exports.LockScreenSkillViewController = exports.DialogViewController = exports.ConfirmViewController = exports.CardViewControllerImpl = exports.ButtonGroupViewController = exports.AbstractAppController = exports.AbstractViewController = exports.AbstractSkillViewController = void 0;
|
|
21
|
+
exports.statsSchema = exports.toggleInputSchema = exports.listToggleInputSchema = exports.addressInputSchema = exports.buttonBarButtonSchema = exports.buttonBarSchema = exports.toolBeltToolSchema = exports.toolBeltSchema = exports.calendarTimeSchema = exports.calendarPersonSchema = exports.calendarSchema = exports.themePropsSchema = exports.themeSchema = exports.cardFooterButtonSchema = exports.criticalErrorSchema = exports.sprucebotTypedMessageSentenceSchema = exports.sprucebotTypedMessageAvatarSchema = exports.selectInputChoiceSchema = exports.calendarEventColorOverrideSchema = exports.portalSchema = exports.listTextInputSchema = exports.listSelectInputSchema = exports.listCellButtonSchema = exports.dropdownButtonSchema = exports.bigFormSectionSchema = exports.textInputSchema = exports.phoneInputSchema = exports.inputSchema = exports.dropdownSchema = exports.sprucebotTypedMessageSchema = exports.talkingSprucebotSchema = exports.sprucebotAvatarSchema = exports.formBuilderImportExportObjectSchema = exports.listCellSchema = exports.listRowSchema = exports.listSchema = exports.layoutSchema = exports.cardSectionSchema = exports.cardHeaderSchema = exports.cardFooterSchema = exports.cardBodySchema = exports.cardSchema = exports.formSectionSchema = exports.formSchema = exports.textSchema = exports.lockScreenSchema = exports.dialogSchema = exports.buttonSchema = exports.lineIconSchema = exports.fancyIconSchema = void 0;
|
|
22
|
+
exports.interactor = exports.normalizeScopeFromVc = exports.autocompleteInteractor = exports.formAssert = exports.autocompleteAssert = exports.listAssert = exports.buttonAssert = exports.deviceAssert = exports.navigationAssert = exports.toolBeltAssert = exports.toastAssert = exports.vcPluginAssert = exports.vcDurationAssert = exports.pagerAssert = exports.vcAssert = exports.vcAssertUtil = exports.feedAssert = exports.feedInteractor = exports.normalizeFormSectionFieldNamesUtil = exports.ViewControllerError = exports.SpyDevice = exports.StubStorage = exports.ViewControllerFactory = exports.ViewControllerImporter = exports.ViewControllerExporter = exports.pagerSchema = exports.polarAreaDataItemSchema = exports.polarAreaSchema = exports.inputButtonSchema = exports.mapPinSchema = exports.mapSchema = exports.latLngSchema = exports.formBuilderImportExportPageSchema = exports.autocompleteSuggestionSchema = exports.autocompleteInputSchema = exports.feedSchema = exports.calendarShiftSchema = exports.receiptTotalSchema = exports.receiptSectionSchema = exports.receiptLineItemSchema = exports.receiptHeaderSchema = exports.receiptSchema = exports.listDateInputSchema = exports.calendarSelectedDateSchema = exports.calendarEventSchema = exports.ratingsInputSchema = exports.listRatingsInputSchema = exports.ratingsSchema = exports.progressSchema = exports.statsStatSchema = void 0;
|
|
23
|
+
exports.navigationRouteSchema = exports.routerDestinationSchema = exports.navigationDropdownButtonSchema = exports.navigationButtonDropdownSchema = exports.chartDataSetSchema = exports.chartDataPointSchema = exports.lineGraphSchema = exports.barChartSchema = exports.progressDetailsSchema = exports.progressNavigatorStepSchema = exports.progressNavigatorSchema = exports.countdownTimerSchema = exports.permissionContractReferenceSchema = exports.navigationButtonSchema = exports.navigationSchema = exports.ToolBeltStateMachine = exports.removeUniversalViewOptions = exports.buildSkillViewLayout = exports.splitCardsIntoLayouts = exports.listUtil = exports.mapInteractor = exports.mapAssert = exports.renderUtil = exports.routerTestPatcher = exports.dialogTestPatcher = exports.confirmTestPatcher = exports.calendarSeeder = exports.interactionUtil = exports.chartAssert = exports.progressNavigatorAssert = exports.countdownTimerInteractor = exports.countdownTimerAssert = exports.calendarInteractor = void 0;
|
|
24
24
|
__exportStar(require("./constants"), exports);
|
|
25
25
|
__exportStar(require("./types/heartwood.types"), exports);
|
|
26
26
|
__exportStar(require("./utilities/removeUniversalViewOptions"), exports);
|
|
@@ -56,8 +56,10 @@ var Form_vc_1 = require("./viewControllers/form/Form.vc");
|
|
|
56
56
|
Object.defineProperty(exports, "FormViewControllerImpl", { enumerable: true, get: function () { return __importDefault(Form_vc_1).default; } });
|
|
57
57
|
var ToolBelt_vc_1 = require("./viewControllers/ToolBelt.vc");
|
|
58
58
|
Object.defineProperty(exports, "ToolBeltViewController", { enumerable: true, get: function () { return __importDefault(ToolBelt_vc_1).default; } });
|
|
59
|
-
var BarChart_vc_1 = require("./viewControllers/BarChart.vc");
|
|
59
|
+
var BarChart_vc_1 = require("./viewControllers/charts/BarChart.vc");
|
|
60
60
|
Object.defineProperty(exports, "BarChartViewController", { enumerable: true, get: function () { return __importDefault(BarChart_vc_1).default; } });
|
|
61
|
+
var LineGraph_vc_1 = require("./viewControllers/charts/LineGraph.vc");
|
|
62
|
+
Object.defineProperty(exports, "LineGraphViewController", { enumerable: true, get: function () { return __importDefault(LineGraph_vc_1).default; } });
|
|
61
63
|
__exportStar(require("./viewControllers/ToolBelt.vc"), exports);
|
|
62
64
|
__exportStar(require("./viewControllers/form/Form.vc"), exports);
|
|
63
65
|
var Login_vc_1 = require("./viewControllers/Login.vc");
|
|
@@ -348,8 +350,8 @@ var countdownTimerInteractor_1 = require("./tests/utilities/countdownTimerIntera
|
|
|
348
350
|
Object.defineProperty(exports, "countdownTimerInteractor", { enumerable: true, get: function () { return __importDefault(countdownTimerInteractor_1).default; } });
|
|
349
351
|
var progressNavigatorAssert_1 = require("./tests/utilities/progressNavigatorAssert");
|
|
350
352
|
Object.defineProperty(exports, "progressNavigatorAssert", { enumerable: true, get: function () { return __importDefault(progressNavigatorAssert_1).default; } });
|
|
351
|
-
var
|
|
352
|
-
Object.defineProperty(exports, "
|
|
353
|
+
var chartAssert_1 = require("./tests/utilities/chartAssert");
|
|
354
|
+
Object.defineProperty(exports, "chartAssert", { enumerable: true, get: function () { return __importDefault(chartAssert_1).default; } });
|
|
353
355
|
var interaction_utility_1 = require("./tests/utilities/interaction.utility");
|
|
354
356
|
Object.defineProperty(exports, "interactionUtil", { enumerable: true, get: function () { return __importDefault(interaction_utility_1).default; } });
|
|
355
357
|
var calendarSeeder_1 = require("./tests/utilities/calendarSeeder");
|
|
@@ -393,10 +395,12 @@ var progressDetails_schema_1 = require("./.spruce/schemas/heartwoodViewControlle
|
|
|
393
395
|
Object.defineProperty(exports, "progressDetailsSchema", { enumerable: true, get: function () { return __importDefault(progressDetails_schema_1).default; } });
|
|
394
396
|
var barChart_schema_1 = require("./.spruce/schemas/heartwoodViewControllers/v2021_02_11/barChart.schema");
|
|
395
397
|
Object.defineProperty(exports, "barChartSchema", { enumerable: true, get: function () { return __importDefault(barChart_schema_1).default; } });
|
|
396
|
-
var
|
|
397
|
-
Object.defineProperty(exports, "
|
|
398
|
-
var
|
|
399
|
-
Object.defineProperty(exports, "
|
|
398
|
+
var lineGraph_schema_1 = require("./.spruce/schemas/heartwoodViewControllers/v2021_02_11/lineGraph.schema");
|
|
399
|
+
Object.defineProperty(exports, "lineGraphSchema", { enumerable: true, get: function () { return __importDefault(lineGraph_schema_1).default; } });
|
|
400
|
+
var chartDataPoint_schema_1 = require("./.spruce/schemas/heartwoodViewControllers/v2021_02_11/chartDataPoint.schema");
|
|
401
|
+
Object.defineProperty(exports, "chartDataPointSchema", { enumerable: true, get: function () { return __importDefault(chartDataPoint_schema_1).default; } });
|
|
402
|
+
var chartDataSet_schema_1 = require("./.spruce/schemas/heartwoodViewControllers/v2021_02_11/chartDataSet.schema");
|
|
403
|
+
Object.defineProperty(exports, "chartDataSetSchema", { enumerable: true, get: function () { return __importDefault(chartDataSet_schema_1).default; } });
|
|
400
404
|
var navigationButtonDropdown_schema_1 = require("./.spruce/schemas/heartwoodViewControllers/v2021_02_11/navigationButtonDropdown.schema");
|
|
401
405
|
Object.defineProperty(exports, "navigationButtonDropdownSchema", { enumerable: true, get: function () { return __importDefault(navigationButtonDropdown_schema_1).default; } });
|
|
402
406
|
var navigationDropdownButton_schema_1 = require("./.spruce/schemas/heartwoodViewControllers/v2021_02_11/navigationDropdownButton.schema");
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
const schema_1 = require("@sprucelabs/schema");
|
|
7
|
+
const chartDataSet_builder_1 = __importDefault(require("./chartDataSet.builder"));
|
|
4
8
|
exports.default = (0, schema_1.buildSchema)({
|
|
5
9
|
id: 'barChart',
|
|
6
10
|
name: 'Bar chart',
|
|
@@ -11,7 +15,7 @@ exports.default = (0, schema_1.buildSchema)({
|
|
|
11
15
|
controller: {
|
|
12
16
|
type: 'raw',
|
|
13
17
|
options: {
|
|
14
|
-
valueType: 'HeartwoodTypes.
|
|
18
|
+
valueType: 'HeartwoodTypes.ChartViewController<HeartwoodTypes.BarChart>',
|
|
15
19
|
},
|
|
16
20
|
},
|
|
17
21
|
dataSets: {
|
|
@@ -20,34 +24,7 @@ exports.default = (0, schema_1.buildSchema)({
|
|
|
20
24
|
isArray: true,
|
|
21
25
|
minArrayLength: 0,
|
|
22
26
|
options: {
|
|
23
|
-
schema:
|
|
24
|
-
id: 'barChartDataSet',
|
|
25
|
-
fields: {
|
|
26
|
-
label: {
|
|
27
|
-
type: 'text',
|
|
28
|
-
},
|
|
29
|
-
dataPoints: {
|
|
30
|
-
type: 'schema',
|
|
31
|
-
isRequired: true,
|
|
32
|
-
isArray: true,
|
|
33
|
-
minArrayLength: 0,
|
|
34
|
-
options: {
|
|
35
|
-
schema: (0, schema_1.buildSchema)({
|
|
36
|
-
id: 'barChartDataPoint',
|
|
37
|
-
fields: {
|
|
38
|
-
label: {
|
|
39
|
-
type: 'text',
|
|
40
|
-
},
|
|
41
|
-
value: {
|
|
42
|
-
type: 'number',
|
|
43
|
-
isRequired: true,
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
}),
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
}),
|
|
27
|
+
schema: chartDataSet_builder_1.default,
|
|
51
28
|
},
|
|
52
29
|
},
|
|
53
30
|
},
|
|
@@ -29406,6 +29406,65 @@ declare const _default: {
|
|
|
29406
29406
|
options: {
|
|
29407
29407
|
schema: {
|
|
29408
29408
|
id: string;
|
|
29409
|
+
name: string;
|
|
29410
|
+
fields: {
|
|
29411
|
+
label: {
|
|
29412
|
+
type: "text";
|
|
29413
|
+
};
|
|
29414
|
+
dataPoints: {
|
|
29415
|
+
type: "schema";
|
|
29416
|
+
isRequired: true;
|
|
29417
|
+
isArray: true;
|
|
29418
|
+
minArrayLength: number;
|
|
29419
|
+
options: {
|
|
29420
|
+
schema: {
|
|
29421
|
+
id: string;
|
|
29422
|
+
fields: {
|
|
29423
|
+
label: {
|
|
29424
|
+
type: "text";
|
|
29425
|
+
};
|
|
29426
|
+
value: {
|
|
29427
|
+
type: "number";
|
|
29428
|
+
isRequired: true;
|
|
29429
|
+
};
|
|
29430
|
+
};
|
|
29431
|
+
};
|
|
29432
|
+
};
|
|
29433
|
+
};
|
|
29434
|
+
};
|
|
29435
|
+
};
|
|
29436
|
+
};
|
|
29437
|
+
};
|
|
29438
|
+
};
|
|
29439
|
+
};
|
|
29440
|
+
};
|
|
29441
|
+
};
|
|
29442
|
+
lineGraph: {
|
|
29443
|
+
type: "schema";
|
|
29444
|
+
label: string;
|
|
29445
|
+
options: {
|
|
29446
|
+
schema: {
|
|
29447
|
+
id: string;
|
|
29448
|
+
name: string;
|
|
29449
|
+
fields: {
|
|
29450
|
+
id: {
|
|
29451
|
+
type: "id";
|
|
29452
|
+
};
|
|
29453
|
+
controller: {
|
|
29454
|
+
type: "raw";
|
|
29455
|
+
options: {
|
|
29456
|
+
valueType: string;
|
|
29457
|
+
};
|
|
29458
|
+
};
|
|
29459
|
+
dataSets: {
|
|
29460
|
+
type: "schema";
|
|
29461
|
+
isRequired: true;
|
|
29462
|
+
isArray: true;
|
|
29463
|
+
minArrayLength: number;
|
|
29464
|
+
options: {
|
|
29465
|
+
schema: {
|
|
29466
|
+
id: string;
|
|
29467
|
+
name: string;
|
|
29409
29468
|
fields: {
|
|
29410
29469
|
label: {
|
|
29411
29470
|
type: "text";
|
|
@@ -22370,6 +22370,65 @@ declare const _default: {
|
|
|
22370
22370
|
options: {
|
|
22371
22371
|
schema: {
|
|
22372
22372
|
id: string;
|
|
22373
|
+
name: string;
|
|
22374
|
+
fields: {
|
|
22375
|
+
label: {
|
|
22376
|
+
type: "text";
|
|
22377
|
+
};
|
|
22378
|
+
dataPoints: {
|
|
22379
|
+
type: "schema";
|
|
22380
|
+
isRequired: true;
|
|
22381
|
+
isArray: true;
|
|
22382
|
+
minArrayLength: number;
|
|
22383
|
+
options: {
|
|
22384
|
+
schema: {
|
|
22385
|
+
id: string;
|
|
22386
|
+
fields: {
|
|
22387
|
+
label: {
|
|
22388
|
+
type: "text";
|
|
22389
|
+
};
|
|
22390
|
+
value: {
|
|
22391
|
+
type: "number";
|
|
22392
|
+
isRequired: true;
|
|
22393
|
+
};
|
|
22394
|
+
};
|
|
22395
|
+
};
|
|
22396
|
+
};
|
|
22397
|
+
};
|
|
22398
|
+
};
|
|
22399
|
+
};
|
|
22400
|
+
};
|
|
22401
|
+
};
|
|
22402
|
+
};
|
|
22403
|
+
};
|
|
22404
|
+
};
|
|
22405
|
+
};
|
|
22406
|
+
lineGraph: {
|
|
22407
|
+
type: "schema";
|
|
22408
|
+
label: string;
|
|
22409
|
+
options: {
|
|
22410
|
+
schema: {
|
|
22411
|
+
id: string;
|
|
22412
|
+
name: string;
|
|
22413
|
+
fields: {
|
|
22414
|
+
id: {
|
|
22415
|
+
type: "id";
|
|
22416
|
+
};
|
|
22417
|
+
controller: {
|
|
22418
|
+
type: "raw";
|
|
22419
|
+
options: {
|
|
22420
|
+
valueType: string;
|
|
22421
|
+
};
|
|
22422
|
+
};
|
|
22423
|
+
dataSets: {
|
|
22424
|
+
type: "schema";
|
|
22425
|
+
isRequired: true;
|
|
22426
|
+
isArray: true;
|
|
22427
|
+
minArrayLength: number;
|
|
22428
|
+
options: {
|
|
22429
|
+
schema: {
|
|
22430
|
+
id: string;
|
|
22431
|
+
name: string;
|
|
22373
22432
|
fields: {
|
|
22374
22433
|
label: {
|
|
22375
22434
|
type: "text";
|