@forestadmin/datasource-customizer
Advanced tools
Comparing version 1.3.0 to 1.4.0
import { CollectionSchema, Operator } from '@forestadmin/datasource-toolkit'; | ||
import { ActionDefinition } from './decorators/actions/types/actions'; | ||
import { CollectionChartDefinition } from './decorators/chart/types'; | ||
import { ComputedDefinition } from './decorators/computed/types'; | ||
@@ -77,2 +78,15 @@ import { HookHandler, HookPosition, HookType, HooksContext } from './decorators/hook/types'; | ||
/** | ||
* Create a new API chart | ||
* @param name name of the chart | ||
* @param definition definition of the chart | ||
* @example | ||
* .addChart('numCustomers', { | ||
* type: 'Value', | ||
* render: (context, resultBuilder) => { | ||
* return resultBuilder.value(123); | ||
* } | ||
* }) | ||
*/ | ||
addChart(name: string, definition: CollectionChartDefinition<S, N>): this; | ||
/** | ||
* Add a new field on the collection. | ||
@@ -79,0 +93,0 @@ * @param name the name of the field |
@@ -100,2 +100,19 @@ "use strict"; | ||
/** | ||
* Create a new API chart | ||
* @param name name of the chart | ||
* @param definition definition of the chart | ||
* @example | ||
* .addChart('numCustomers', { | ||
* type: 'Value', | ||
* render: (context, resultBuilder) => { | ||
* return resultBuilder.value(123); | ||
* } | ||
* }) | ||
*/ | ||
addChart(name, definition) { | ||
return this.pushCustomization(async () => { | ||
this.stack.chart.getCollection(this.name).addChart(name, definition); | ||
}); | ||
} | ||
/** | ||
* Add a new field on the collection. | ||
@@ -396,2 +413,2 @@ * @param name the name of the field | ||
exports.default = CollectionCustomizer; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGVjdGlvbi1jdXN0b21pemVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2NvbGxlY3Rpb24tY3VzdG9taXplci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLHdFQU15QztBQWN6Qyw0RkFBa0U7QUFDbEUsMEVBQWlEO0FBRWpELE1BQXFCLG9CQUFvQjtJQVl2QyxZQUFZL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UFDLFdBQVcsQ0FBQyxJQUFJLEVBQUUsVUFBVSxDQUFDLENBQUM7UUFDN0UsQ0FBQyxDQUFDLENBQUM7SUFDTCxDQUFDO0lBRU8saUJBQWlCLENBQUMsYUFBa0M7UUFDMUQsSUFBSSxDQUFDLEtBQUssQ0FBQyxrQkFBa0IsQ0FBQyxhQUFhLENBQUMsQ0FBQztRQUU3QyxPQUFPLElBQUksQ0FBQztJQUNkLENBQUM7Q0FDRjtBQXhkRCx1Q0F3ZEMifQ== |
import { DataSource, DataSourceFactory, DataSourceSchema, Logger } from '@forestadmin/datasource-toolkit'; | ||
import { ChartDefinition } from './decorators/chart/types'; | ||
import { DataSourceChartDefinition } from './decorators/chart/types'; | ||
import { DataSourceOptions, Plugin } from './types'; | ||
@@ -46,3 +46,3 @@ import { TCollectionName, TSchema } from './templates'; | ||
*/ | ||
addChart(name: string, definition: ChartDefinition<S>): this; | ||
addChart(name: string, definition: DataSourceChartDefinition<S>): this; | ||
/** | ||
@@ -49,0 +49,0 @@ * Allow to interact with a decorated collection |
@@ -125,2 +125,2 @@ "use strict"; | ||
exports.default = DataSourceCustomizer; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YXNvdXJjZS1jdXN0b21pemVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2RhdGFzb3VyY2UtY3VzdG9taXplci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQVdBLG9GQUEyRDtBQUMzRCw2RkFBb0U7QUFDcEUscUZBQTREO0FBQzVELGdHQUFzRztBQUN0RywyRkFBNEY7QUFDNUYsMEVBQWlEO0FBRWpEOzs7Ozs7Ozs7R0FTRztBQUNILE1BQXFCLG9CQUFvQjtJQWtCdkM7UUFDRSxJQUFJLENBQUMsbUJBQW1CLEdBQUcsSUFBSSw4QkFBbUIsRUFBYyxDQUFDO1FBQ2pFLElBQUksQ0FBQyxLQUF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JQUFJLENBQUMsS0FBSyxDQUFDLGtCQUFrQixDQUFDLEtBQUssSUFBSSxFQUFFO1lBQ3ZDLE1BQU0sTUFBTSxDQUFDLElBQUksRUFBRSxJQUFJLEVBQUUsT0FBTyxDQUFDLENBQUM7UUFDcEMsQ0FBQyxDQUFDLENBQUM7UUFFSCxPQUFPLElBQUksQ0FBQztJQUNkLENBQUM7SUFFRCxLQUFLLENBQUMsYUFBYSxDQUFDLE1BQWM7UUFDaEMsTUFBTSxJQUFJLENBQUMsS0FBSyxDQUFDLHlCQUF5QixDQUFDLE1BQU0sQ0FBQyxDQUFDO1FBRW5ELE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxVQUFVLENBQUM7SUFDL0IsQ0FBQztJQUVELFVBQVU7UUFDUixPQUFPLEtBQUssRUFBRSxNQUFjLEVBQUUsRUFBRSxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDOUQsQ0FBQztJQUVELEtBQUssQ0FBQyx1QkFBdUIsQ0FBQyxXQUFtQixFQUFFLGVBQXVCO1FBQ3hFLE9BQU8sMEJBQWUsQ0FBQyx1QkFBdUIsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLElBQUksRUFBRSxXQUFXLEVBQUUsZUFBZSxDQUFDLENBQUM7SUFDaEcsQ0FBQztDQUNGO0FBN0hELHVDQTZIQyJ9 |
import { Caller, Chart, DataSource, DataSourceSchema } from '@forestadmin/datasource-toolkit'; | ||
import { ChartDefinition } from './types'; | ||
import { DataSourceChartDefinition } from './types'; | ||
import ChartCollectionDecorator from './collection'; | ||
import DataSourceDecorator from '../datasource-decorator'; | ||
export default class ChartDataSourceDecorator extends DataSourceDecorator { | ||
export default class ChartDataSourceDecorator extends DataSourceDecorator<ChartCollectionDecorator> { | ||
private charts; | ||
get schema(): DataSourceSchema; | ||
constructor(childDataSource: DataSource); | ||
addChart(name: string, definition: ChartDefinition): void; | ||
addChart(name: string, definition: DataSourceChartDefinition): void; | ||
renderChart(caller: Caller, name: string): Promise<Chart>; | ||
} | ||
//# sourceMappingURL=datasource.d.ts.map |
@@ -7,3 +7,3 @@ "use strict"; | ||
const agent_context_1 = __importDefault(require("../../context/agent-context")); | ||
const collection_decorator_1 = __importDefault(require("../collection-decorator")); | ||
const collection_1 = __importDefault(require("./collection")); | ||
const datasource_decorator_1 = __importDefault(require("../datasource-decorator")); | ||
@@ -13,3 +13,3 @@ const result_builder_1 = __importDefault(require("./result-builder")); | ||
constructor(childDataSource) { | ||
super(childDataSource, collection_decorator_1.default); | ||
super(childDataSource, collection_1.default); | ||
this.charts = {}; | ||
@@ -40,2 +40,2 @@ } | ||
exports.default = ChartDataSourceDecorator; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YXNvdXJjZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9kZWNvcmF0b3JzL2NoYXJ0L2RhdGFzb3VyY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFHQSxnRkFBb0U7QUFDcEUsbUZBQTBEO0FBQzFELG1GQUEwRDtBQUMxRCxzRUFBNkM7QUFFN0MsTUFBcUIsd0JBQXlCLFNBQVEsOEJBQW1CO0lBYXZFLFlBQVksZUFBMkI7UUFDckMsS0FBSyxDQUFDLGVBQWUsRUFBRSw4QkFBbUIsQ0FBQyxDQUFDO1FBYnRDLFdBQU0sR0FBb0MsRUFBRSxDQUFDO0lBY3JELENBQUM7SUFaRCxJQUFhLE1BQU07UUFDakIsTUFBTSxRQUFRLEdBQUcsTUFBTSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLENBQUM7UUFDMUMsTUFBTSxXQUFXLEdBQUcsSUFBSSxDQUFDLGVBQWUsQ0FBQyxNQUFNLENBQUMsTUFBTSxDQUFDO1FBRXZELE1BQU0sU0FBUyxHQUFHLFFBQ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ZLEVBQUUsVUFBcUM7UUFDMUQsSUFBSSxJQUFJLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLEVBQUU7WUFDckMsTUFBTSxJQUFJLEtBQUssQ0FBQyxVQUFVLElBQUksbUJBQW1CLENBQUMsQ0FBQztTQUNwRDtRQUVELElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLEdBQUcsVUFBVSxDQUFDO0lBQ2pDLENBQUM7SUFFUSxLQUFLLENBQUMsV0FBVyxDQUFDLE1BQWMsRUFBRSxJQUFZO1FBQ3JELE1BQU0sZUFBZSxHQUFHLElBQUksQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLENBQUM7UUFFMUMsSUFBSSxlQUFlLEVBQUU7WUFDbkIsT0FBTyxlQUFlLENBQUMsSUFBSSx1QkFBeUIsQ0FBQyxJQUFJLEVBQUUsTUFBTSxDQUFDLEVBQUUsSUFBSSx3QkFBYSxFQUFFLENBQUMsQ0FBQztTQUMxRjtRQUVELE9BQU8sS0FBSyxDQUFDLFdBQVcsQ0FBQyxNQUFNLEVBQUUsSUFBSSxDQUFDLENBQUM7SUFDekMsQ0FBQztDQUNGO0FBbENELDJDQWtDQyJ9 |
import { Chart } from '@forestadmin/datasource-toolkit'; | ||
import { TSchema } from '../../templates'; | ||
import { TCollectionName, TSchema } from '../../templates'; | ||
import AgentCustomizationContext from '../../context/agent-context'; | ||
import CollectionChartContext from './context'; | ||
import ResultBuilder from './result-builder'; | ||
export declare type ChartDefinition<S extends TSchema = TSchema> = (context: AgentCustomizationContext<S>, resultBuilder: ResultBuilder) => Promise<Chart> | Chart; | ||
export declare type DataSourceChartDefinition<S extends TSchema = TSchema> = (context: AgentCustomizationContext<S>, resultBuilder: ResultBuilder) => Promise<Chart> | Chart; | ||
export declare type CollectionChartDefinition<S extends TSchema = TSchema, N extends TCollectionName<S> = TCollectionName<S>> = (context: CollectionChartContext<S, N>, resultBuilder: ResultBuilder) => Promise<Chart> | Chart; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { ActionField, ActionResult, AggregateResult, Aggregation, Caller, Collection, CollectionSchema, DataSource, Filter, PaginatedFilter, Projection, RecordData } from '@forestadmin/datasource-toolkit'; | ||
import { ActionField, ActionResult, AggregateResult, Aggregation, Caller, Chart, Collection, CollectionSchema, CompositeId, DataSource, Filter, PaginatedFilter, Projection, RecordData } from '@forestadmin/datasource-toolkit'; | ||
export default class CollectionDecorator implements Collection { | ||
@@ -17,2 +17,3 @@ readonly dataSource: DataSource; | ||
aggregate(caller: Caller, filter: Filter, aggregation: Aggregation, limit?: number): Promise<AggregateResult[]>; | ||
renderChart(caller: Caller, name: string, recordId: CompositeId): Promise<Chart>; | ||
protected markSchemaAsDirty(): void; | ||
@@ -19,0 +20,0 @@ protected refineFilter(caller: Caller, filter?: PaginatedFilter): Promise<PaginatedFilter>; |
@@ -46,2 +46,5 @@ "use strict"; | ||
} | ||
async renderChart(caller, name, recordId) { | ||
return this.childCollection.renderChart(caller, name, recordId); | ||
} | ||
markSchemaAsDirty() { | ||
@@ -58,2 +61,2 @@ this.lastSchema = null; | ||
exports.default = CollectionDecorator; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29sbGVjdGlvbi1kZWNvcmF0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvZGVjb3JhdG9ycy9jb2xsZWN0aW9uLWRlY29yYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQWVBLE1BQXFCLG1CQUFtQjtJQXNCdEMsWUFBWSxlQUEyQixFQUFFLFVBQXNCO1FBQzdELElBQUksQ0FBQyxlQUFlLEdBQUcsZUFBZSxDQUFDO1FBQ3ZDLElBQUksQ0FBQyxVQUFVLEdBQUcsVUFBVSxDQUFDO0lBQy9CLENBQUM7SUFsQkQsSUFBSSxNQUFNO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FNBQVMsQ0FBQyxNQUFNLEVBQUUsYUFBYSxFQUFFLFdBQVcsRUFBRSxLQUFLLENBQUMsQ0FBQztJQUNuRixDQUFDO0lBRUQsS0FBSyxDQUFDLFdBQVcsQ0FBQyxNQUFjLEVBQUUsSUFBWSxFQUFFLFFBQXFCO1FBQ25FLE9BQU8sSUFBSSxDQUFDLGVBQWUsQ0FBQyxXQUFXLENBQUMsTUFBTSxFQUFFLElBQUksRUFBRSxRQUFRLENBQUMsQ0FBQztJQUNsRSxDQUFDO0lBRVMsaUJBQWlCO1FBQ3pCLElBQUksQ0FBQyxVQUFVLEdBQUcsSUFBSSxDQUFDO0lBQ3pCLENBQUM7SUFFUyxLQUFLLENBQUMsWUFBWSxDQUFDLE1BQWMsRUFBRSxNQUF3QjtRQUNuRSxPQUFPLE1BQU0sQ0FBQztJQUNoQixDQUFDO0lBRVMsWUFBWSxDQUFDLFNBQTJCO1FBQ2hELE9BQU8sU0FBUyxDQUFDO0lBQ25CLENBQUM7Q0FDRjtBQXJHRCxzQ0FxR0MifQ== |
@@ -6,3 +6,3 @@ export { default as CollectionCustomizer } from './collection-customizer'; | ||
export * from './decorators/actions/types/actions'; | ||
export { ChartDefinition } from './decorators/chart/types'; | ||
export { DataSourceChartDefinition } from './decorators/chart/types'; | ||
export { ComputedDefinition } from './decorators/computed/types'; | ||
@@ -9,0 +9,0 @@ export { OperatorDefinition } from './decorators/operators-emulate/types'; |
{ | ||
"name": "@forestadmin/datasource-customizer", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"main": "dist/index.js", | ||
@@ -32,3 +32,3 @@ "license": "GPL-3.0", | ||
"dependencies": { | ||
"@forestadmin/datasource-toolkit": "1.0.1", | ||
"@forestadmin/datasource-toolkit": "1.1.0", | ||
"luxon": "^2.3.0", | ||
@@ -35,0 +35,0 @@ "object-hash": "^3.0.0", |
421589
129
4881
+ Added@forestadmin/datasource-toolkit@1.1.0(transitive)
- Removed@forestadmin/datasource-toolkit@1.0.1(transitive)