@o3r/rules-engine 14.0.0-prerelease.3 → 14.0.0-prerelease.30
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/README.md
CHANGED
|
@@ -74,7 +74,7 @@ Otter framework provides a set of code generators based on [Angular schematics](
|
|
|
74
74
|
| operators | Generate an operator | `ng g operator` |
|
|
75
75
|
|
|
76
76
|
## Debug
|
|
77
|
-
A whole section of the [Otter Chrome Devtool extension](https://chromewebstore.google.com/detail/otter-devtools/
|
|
77
|
+
A whole section of the [Otter Chrome Devtool extension](https://chromewebstore.google.com/detail/otter-devtools/cgbnjkegcpddliemjooeiomcdnacbdol) is dedicated to the debug of the rules engine with
|
|
78
78
|
a visual representation of your Rulesets and a history of the run, conditions met and actions applied.
|
|
79
79
|
|
|
80
80
|
Find more information on the tool in the [Otter Chrome Devtool extension documentation](https://github.com/AmadeusITGroup/otter/blob/main/docs/dev-tools/chrome-devtools.md)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe, input, signal, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, Input, inject, ChangeDetectorRef,
|
|
2
|
+
import { Pipe, input, signal, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, Input, inject, ChangeDetectorRef, InjectionToken, Injectable, NgModule, DestroyRef } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import * as i1$1 from '@angular/common';
|
|
@@ -8,7 +8,7 @@ import { Subject, of, from, ReplaySubject, Observable, debounceTime, combineLate
|
|
|
8
8
|
import { switchMap, delay, startWith, mergeMap, map, catchError, withLatestFrom, concatMap, tap, share, shareReplay, pairwise, distinctUntilChanged, takeUntil, filter, scan } from 'rxjs/operators';
|
|
9
9
|
import * as i1$2 from '@ngrx/store';
|
|
10
10
|
import { createAction, props, on, createReducer, StoreModule, createFeatureSelector, createSelector, Store, select } from '@ngrx/store';
|
|
11
|
-
import { LoggerService,
|
|
11
|
+
import { LoggerService, provideLogger } from '@o3r/logger';
|
|
12
12
|
import { asyncProps, fromApiEffectSwitchMap, asyncStoreItemAdapter, computeItemIdentifier, sendOtterMessage, filterMessageContent } from '@o3r/core';
|
|
13
13
|
import * as i2 from '@ngrx/effects';
|
|
14
14
|
import { Actions, createEffect, ofType, EffectsModule } from '@ngrx/effects';
|
|
@@ -357,28 +357,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
357
357
|
type: Input
|
|
358
358
|
}] } });
|
|
359
359
|
|
|
360
|
-
/**
|
|
361
|
-
* @deprecated The Components and Pipes are now standalone, this module will be removed in v14
|
|
362
|
-
*/
|
|
363
|
-
class RulesetHistoryPresModule {
|
|
364
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RulesetHistoryPresModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
365
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: RulesetHistoryPresModule, imports: [JsonPipe,
|
|
366
|
-
RulesetHistoryPresComponent,
|
|
367
|
-
RuleConditionPresComponent], exports: [RulesetHistoryPresComponent] }); }
|
|
368
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RulesetHistoryPresModule, imports: [RulesetHistoryPresComponent] }); }
|
|
369
|
-
}
|
|
370
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RulesetHistoryPresModule, decorators: [{
|
|
371
|
-
type: NgModule,
|
|
372
|
-
args: [{
|
|
373
|
-
imports: [
|
|
374
|
-
JsonPipe,
|
|
375
|
-
RulesetHistoryPresComponent,
|
|
376
|
-
RuleConditionPresComponent
|
|
377
|
-
],
|
|
378
|
-
exports: [RulesetHistoryPresComponent]
|
|
379
|
-
}]
|
|
380
|
-
}] });
|
|
381
|
-
|
|
382
360
|
const isRulesEngineMessage = (message) => {
|
|
383
361
|
return message && (message.dataType === 'rulesEngineEvents'
|
|
384
362
|
|| message.dataType === 'requestMessages'
|
|
@@ -2144,6 +2122,7 @@ class RulesEngineRunnerModule {
|
|
|
2144
2122
|
return {
|
|
2145
2123
|
ngModule: RulesEngineRunnerModule,
|
|
2146
2124
|
providers: [
|
|
2125
|
+
provideLogger(),
|
|
2147
2126
|
{ provide: RULES_ENGINE_OPTIONS, useValue: opts },
|
|
2148
2127
|
RulesEngineRunnerService
|
|
2149
2128
|
]
|
|
@@ -2151,19 +2130,16 @@ class RulesEngineRunnerModule {
|
|
|
2151
2130
|
}
|
|
2152
2131
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RulesEngineRunnerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2153
2132
|
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: RulesEngineRunnerModule, imports: [StoreModule,
|
|
2154
|
-
RulesetsStoreModule
|
|
2155
|
-
LoggerModule] }); }
|
|
2133
|
+
RulesetsStoreModule] }); }
|
|
2156
2134
|
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RulesEngineRunnerModule, imports: [StoreModule,
|
|
2157
|
-
RulesetsStoreModule
|
|
2158
|
-
LoggerModule] }); }
|
|
2135
|
+
RulesetsStoreModule] }); }
|
|
2159
2136
|
}
|
|
2160
2137
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: RulesEngineRunnerModule, decorators: [{
|
|
2161
2138
|
type: NgModule,
|
|
2162
2139
|
args: [{
|
|
2163
2140
|
imports: [
|
|
2164
2141
|
StoreModule,
|
|
2165
|
-
RulesetsStoreModule
|
|
2166
|
-
LoggerModule
|
|
2142
|
+
RulesetsStoreModule
|
|
2167
2143
|
]
|
|
2168
2144
|
}]
|
|
2169
2145
|
}] });
|
|
@@ -2534,6 +2510,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
2534
2510
|
|
|
2535
2511
|
/** Abstract fact set service */
|
|
2536
2512
|
class FactsService {
|
|
2513
|
+
#isRegistered = false;
|
|
2514
|
+
/** Get the registered state */
|
|
2515
|
+
get isRegistered() {
|
|
2516
|
+
return this.#isRegistered;
|
|
2517
|
+
}
|
|
2537
2518
|
constructor(rulesEngine) {
|
|
2538
2519
|
this.rulesEngine = rulesEngine;
|
|
2539
2520
|
}
|
|
@@ -2541,6 +2522,7 @@ class FactsService {
|
|
|
2541
2522
|
register() {
|
|
2542
2523
|
this.rulesEngine.upsertFacts(Object.entries(this.facts)
|
|
2543
2524
|
.map(([id, factValue]) => ({ id, value$: factValue })));
|
|
2525
|
+
this.#isRegistered = true;
|
|
2544
2526
|
}
|
|
2545
2527
|
}
|
|
2546
2528
|
|
|
@@ -2572,5 +2554,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
2572
2554
|
* Generated bundle index. Do not edit.
|
|
2573
2555
|
*/
|
|
2574
2556
|
|
|
2575
|
-
export { CurrentTimeFactsService, DEFAULT_RULES_ENGINE_OPTIONS, EngineDebugger, FactsService, FactsSnapshotComponent, O3rFallbackToPipe, O3rJsonOrStringPipe, OTTER_RULES_ENGINE_DEVTOOLS_DEFAULT_OPTIONS, OTTER_RULES_ENGINE_DEVTOOLS_OPTIONS, OtterRulesEngineDevtools, RULESETS_REDUCER_TOKEN, RULESETS_STORE_NAME, RULES_ENGINE_OPTIONS, RulesEngine, RulesEngineDevtoolsConsoleService, RulesEngineDevtoolsMessageService, RulesEngineDevtoolsModule, RulesEngineRunnerModule, RulesEngineRunnerService, RulesetHistoryPresComponent,
|
|
2557
|
+
export { CurrentTimeFactsService, DEFAULT_RULES_ENGINE_OPTIONS, EngineDebugger, FactsService, FactsSnapshotComponent, O3rFallbackToPipe, O3rJsonOrStringPipe, OTTER_RULES_ENGINE_DEVTOOLS_DEFAULT_OPTIONS, OTTER_RULES_ENGINE_DEVTOOLS_OPTIONS, OtterRulesEngineDevtools, RULESETS_REDUCER_TOKEN, RULESETS_STORE_NAME, RULES_ENGINE_OPTIONS, RulesEngine, RulesEngineDevtoolsConsoleService, RulesEngineDevtoolsMessageService, RulesEngineDevtoolsModule, RulesEngineRunnerModule, RulesEngineRunnerService, RulesetHistoryPresComponent, RulesetsEffect, RulesetsStoreModule, allEqual, allGreater, allIn, allLower, allMatch, allNotIn, allRangeNumber, arrayBasedOperators, arrayContains, basicOperators, cancelRulesetsRequest, clearRulesetsEntities, dateAfter, dateBasedOperators, dateBefore, dateEquals, dateInNextMinutes, dateNotEquals, dateNotInNextMinutes, equals, executeOperator, failRulesetsEntities, getDefaultRulesetsReducer, getStatus, greaterThan, greaterThanOrEqual, inArray, inRangeDate, inString, isAllConditions, isAnyConditions, isConditionProperties, isDefined, isNotCondition, isOperandFact, isOperandLiteral, isOperandRuntimeFact, isRangeNumber, isRulesEngineMessage, isString, isSupportedSimpleTypes, isUndefined, isValidDate, isValidDateInput, isValidDateRange, isValidTimeInput, isValidTimeRange, lengthEquals, lengthGreaterThan, lengthGreaterThanOrEquals, lengthLessThan, lengthLessThanOrEquals, lengthNotEquals, lessOrEqual, lessThan, matchesPattern, notArrayContains, notEquals, notInArray, notInString, notStringContains, numberBasedOperators, numberValidator, oneEquals, oneGreater, oneIn, oneLower, oneMatches, oneRangeNumber, operatorList, parseRegExp, resetRulesets, rulesetReportToHistory, rulesetsAdapter, rulesetsInitialState, rulesetsReducer, rulesetsReducerFeatures, rulesetsStorageDeserializer, rulesetsStorageSerializer, rulesetsStorageSync, selectActiveRuleSets, selectAllRulesets, selectComponentsLinkedToRuleset, selectRuleSetsInRange, selectRulesetsEntities, selectRulesetsIds, selectRulesetsState, selectRulesetsStorePendingStatus, selectRulesetsTotal, setRulesets, setRulesetsEntities, setRulesetsEntitiesFromApi, stringContains, updateRulesets, upsertRulesetsEntities, upsertRulesetsEntitiesFromApi };
|
|
2576
2558
|
//# sourceMappingURL=o3r-rules-engine.mjs.map
|