@o3r/rules-engine
Version:
This module provides a rule engine that can be executed on your Otter application to customize your application (translations, placeholders and configs) based on a json file generated by your CMS.
41 lines • 2.01 kB
TypeScript
import { ChangeDetectorRef } from '@angular/core';
import type { Ruleset, RulesetExecutionErrorEvent, RulesetExecutionEvent } from '../../../engine';
import * as i0 from "@angular/core";
export type RulesetExecutionStatus = 'Error' | 'Active' | 'Deactivated' | 'NoEffect';
/**
* Model of a RulesetExecution with more information for debug purpose
*/
export type RulesetExecutionDebug = (RulesetExecutionEvent | RulesetExecutionErrorEvent) & {
isActive: boolean;
status: RulesetExecutionStatus;
rulesetInformation: Ruleset | undefined;
};
export declare class RulesetHistoryPresComponent {
private readonly cd;
/**
* Reflects the state of each ruleset expanded elements.
* Each ruleset entry contains a list of subpanel that can be collapsed or expanded.
* Ruleset whole panel status is store the 'ruleset' entry.
* @example
* Expanded ruleset with rule overview collapsed:
* {'rulesetId': {'ruleset' : true, 'ruleOverview': false}}
* @note Collapsing a ruleset will not reset the subpanel expansion status
*/
expansionStatus: {
[key: string]: {
[subpanel: string]: boolean;
};
};
rulesetExecutions: RulesetExecutionDebug[];
executionDurationFormat: string;
constructor(cd: ChangeDetectorRef);
/**
* Toggle a ruleset subpanel
* @param ruleId
* @param subpanel element to collapse. 'ruleset' will toggle the whole panel but won't reset the subpanels states.
*/
toggleExpansion(ruleId: string, subpanel: string): void;
static ɵfac: i0.ɵɵFactoryDeclaration<RulesetHistoryPresComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<RulesetHistoryPresComponent, "o3r-ruleset-history-pres", never, { "rulesetExecutions": { "alias": "rulesetExecutions"; "required": false; }; "executionDurationFormat": { "alias": "executionDurationFormat"; "required": false; }; }, {}, never, never, true, never>;
}
//# sourceMappingURL=ruleset-history-pres.component.d.ts.map