@player-ui/player
Advanced tools
Comparing version 0.1.1-next.13 to 0.1.1-next.14
@@ -979,8 +979,2 @@ 'use strict'; | ||
call: (nextState) => { | ||
var _a; | ||
const currentState = () => player.getState(); | ||
const currentFlowState = (_a = currentState().controllers.flow.current) == null ? void 0 : _a.currentState; | ||
if (currentFlowState == null ? void 0 : currentFlowState.value.onEnd) { | ||
handleEval(currentFlowState.value.onEnd); | ||
} | ||
if (nextState == null ? void 0 : nextState.onStart) { | ||
@@ -1040,4 +1034,4 @@ handleEval(nextState.onStart); | ||
}; | ||
const PLAYER_VERSION = "0.1.1-next.13"; | ||
const COMMIT = "fe7b34927e7d5444ea9e17a2c3ec3bcc67d04598"; | ||
const PLAYER_VERSION = "0.1.1-next.14"; | ||
const COMMIT = "abcd080ee22b7b600620418ef1b6a20c4073cbf4"; | ||
const _Player = class { | ||
@@ -1075,2 +1069,6 @@ constructor(config) { | ||
} | ||
getPlugins() { | ||
var _a; | ||
return (_a = this.config.plugins) != null ? _a : []; | ||
} | ||
findPlugin(symbol) { | ||
@@ -1166,2 +1164,9 @@ var _a; | ||
flow.hooks.beforeTransition.tap("player", (state, transitionVal) => { | ||
if (state.onEnd && (state.transitions[transitionVal] || state.transitions["*"])) { | ||
if (typeof state.onEnd === "object" && "exp" in state.onEnd) { | ||
expressionEvaluator == null ? void 0 : expressionEvaluator.evaluate(state.onEnd.exp); | ||
} else { | ||
expressionEvaluator == null ? void 0 : expressionEvaluator.evaluate(state.onEnd); | ||
} | ||
} | ||
if (!("transitions" in state) || !state.transitions[transitionVal]) { | ||
@@ -1168,0 +1173,0 @@ return state; |
@@ -17,2 +17,3 @@ import * as _player_ui_types from '@player-ui/types'; | ||
export * from '@player-ui/string-resolver'; | ||
import * as _player_ui_validator from '@player-ui/validator'; | ||
import { ValidatorRegistry, ValidationResponse, ValidatorContext, ValidationObject, WarningValidationResponse, ErrorValidationResponse } from '@player-ui/validator'; | ||
@@ -179,3 +180,3 @@ export * from '@player-ui/validator'; | ||
private get activeBindings(); | ||
private getValidator; | ||
getValidator(type: string): _player_ui_validator.ValidatorFunction<unknown> | undefined; | ||
getBindings(): Set<BindingInstance>; | ||
@@ -400,2 +401,4 @@ /** Executes all known validations for the tracked bindings using the given model */ | ||
constructor(config?: PlayerConfigOptions); | ||
/** Returns currently registered plugins */ | ||
getPlugins(): PlayerPlugin[]; | ||
/** Find instance of [Plugin] that has been registered to Player */ | ||
@@ -402,0 +405,0 @@ findPlugin<Plugin extends PlayerPlugin>(symbol: symbol): Plugin | undefined; |
@@ -979,8 +979,2 @@ export * from '@player-ui/types'; | ||
call: (nextState) => { | ||
var _a; | ||
const currentState = () => player.getState(); | ||
const currentFlowState = (_a = currentState().controllers.flow.current) == null ? void 0 : _a.currentState; | ||
if (currentFlowState == null ? void 0 : currentFlowState.value.onEnd) { | ||
handleEval(currentFlowState.value.onEnd); | ||
} | ||
if (nextState == null ? void 0 : nextState.onStart) { | ||
@@ -1040,4 +1034,4 @@ handleEval(nextState.onStart); | ||
}; | ||
const PLAYER_VERSION = "0.1.1-next.13"; | ||
const COMMIT = "fe7b34927e7d5444ea9e17a2c3ec3bcc67d04598"; | ||
const PLAYER_VERSION = "0.1.1-next.14"; | ||
const COMMIT = "abcd080ee22b7b600620418ef1b6a20c4073cbf4"; | ||
const _Player = class { | ||
@@ -1075,2 +1069,6 @@ constructor(config) { | ||
} | ||
getPlugins() { | ||
var _a; | ||
return (_a = this.config.plugins) != null ? _a : []; | ||
} | ||
findPlugin(symbol) { | ||
@@ -1166,2 +1164,9 @@ var _a; | ||
flow.hooks.beforeTransition.tap("player", (state, transitionVal) => { | ||
if (state.onEnd && (state.transitions[transitionVal] || state.transitions["*"])) { | ||
if (typeof state.onEnd === "object" && "exp" in state.onEnd) { | ||
expressionEvaluator == null ? void 0 : expressionEvaluator.evaluate(state.onEnd.exp); | ||
} else { | ||
expressionEvaluator == null ? void 0 : expressionEvaluator.evaluate(state.onEnd); | ||
} | ||
} | ||
if (!("transitions" in state) || !state.transitions[transitionVal]) { | ||
@@ -1168,0 +1173,0 @@ return state; |
{ | ||
"name": "@player-ui/player", | ||
"version": "0.1.1-next.13", | ||
"version": "0.1.1-next.14", | ||
"private": false, | ||
@@ -10,15 +10,15 @@ "publishConfig": { | ||
"dependencies": { | ||
"@player-ui/binding": "0.1.1-next.13", | ||
"@player-ui/constants": "0.1.1-next.13", | ||
"@player-ui/data": "0.1.1-next.13", | ||
"@player-ui/expressions": "0.1.1-next.13", | ||
"@player-ui/flow": "0.1.1-next.13", | ||
"@player-ui/logger": "0.1.1-next.13", | ||
"@player-ui/partial-match-registry": "0.1.1-next.13", | ||
"@player-ui/schema": "0.1.1-next.13", | ||
"@player-ui/string-resolver": "0.1.1-next.13", | ||
"@player-ui/types": "0.1.1-next.13", | ||
"@player-ui/utils": "0.1.1-next.13", | ||
"@player-ui/validator": "0.1.1-next.13", | ||
"@player-ui/view": "0.1.1-next.13", | ||
"@player-ui/binding": "0.1.1-next.14", | ||
"@player-ui/constants": "0.1.1-next.14", | ||
"@player-ui/data": "0.1.1-next.14", | ||
"@player-ui/expressions": "0.1.1-next.14", | ||
"@player-ui/flow": "0.1.1-next.14", | ||
"@player-ui/logger": "0.1.1-next.14", | ||
"@player-ui/partial-match-registry": "0.1.1-next.14", | ||
"@player-ui/schema": "0.1.1-next.14", | ||
"@player-ui/string-resolver": "0.1.1-next.14", | ||
"@player-ui/types": "0.1.1-next.14", | ||
"@player-ui/utils": "0.1.1-next.14", | ||
"@player-ui/validator": "0.1.1-next.14", | ||
"@player-ui/view": "0.1.1-next.14", | ||
"babel-plugin-preval": "^5.0.0", | ||
@@ -25,0 +25,0 @@ "dequal": "^2.0.2", |
@@ -30,4 +30,4 @@ import { SyncHook, SyncWaterfallHook } from 'tapable-ts'; | ||
// Variables injected at build time | ||
const PLAYER_VERSION = '0.1.1-next.13'; | ||
const COMMIT = 'fe7b34927e7d5444ea9e17a2c3ec3bcc67d04598'; | ||
const PLAYER_VERSION = '0.1.1-next.14'; | ||
const COMMIT = 'abcd080ee22b7b600620418ef1b6a20c4073cbf4'; | ||
@@ -134,2 +134,7 @@ export interface PlayerPlugin { | ||
/** Returns currently registered plugins */ | ||
public getPlugins(): PlayerPlugin[] { | ||
return this.config.plugins ?? []; | ||
} | ||
/** Find instance of [Plugin] that has been registered to Player */ | ||
@@ -283,2 +288,13 @@ public findPlugin<Plugin extends PlayerPlugin>( | ||
flow.hooks.beforeTransition.tap('player', (state, transitionVal) => { | ||
if ( | ||
state.onEnd && | ||
(state.transitions[transitionVal] || state.transitions['*']) | ||
) { | ||
if (typeof state.onEnd === 'object' && 'exp' in state.onEnd) { | ||
expressionEvaluator?.evaluate(state.onEnd.exp); | ||
} else { | ||
expressionEvaluator?.evaluate(state.onEnd); | ||
} | ||
} | ||
if (!('transitions' in state) || !state.transitions[transitionVal]) { | ||
@@ -285,0 +301,0 @@ return state; |
@@ -50,13 +50,2 @@ import type { | ||
call: (nextState: NavigationFlowState) => { | ||
/** Get the current state of Player */ | ||
const currentState = () => player.getState() as InProgressState; | ||
/** Get the current flow state */ | ||
const currentFlowState = | ||
currentState().controllers.flow.current?.currentState; | ||
if (currentFlowState?.value.onEnd) { | ||
handleEval(currentFlowState.value.onEnd); | ||
} | ||
if (nextState?.onStart) { | ||
@@ -63,0 +52,0 @@ handleEval(nextState.onStart); |
@@ -556,3 +556,3 @@ import type { BindingInstance, BindingFactory } from '@player-ui/binding'; | ||
private getValidator(type: string) { | ||
public getValidator(type: string) { | ||
if (this.validatorRegistry) { | ||
@@ -559,0 +559,0 @@ return this.validatorRegistry.get(type); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
187402
834
5016
294
30
5
166
18
+ Added@player-ui/binding@0.1.1-next.14(transitive)
+ Added@player-ui/binding-grammar@0.1.1-next.14(transitive)
+ Added@player-ui/constants@0.1.1-next.14(transitive)
+ Added@player-ui/data@0.1.1-next.14(transitive)
+ Added@player-ui/expressions@0.1.1-next.14(transitive)
+ Added@player-ui/flow@0.1.1-next.14(transitive)
+ Added@player-ui/logger@0.1.1-next.14(transitive)
+ Added@player-ui/partial-match-registry@0.1.1-next.14(transitive)
+ Added@player-ui/schema@0.1.1-next.14(transitive)
+ Added@player-ui/string-resolver@0.1.1-next.14(transitive)
+ Added@player-ui/types@0.1.1-next.14(transitive)
+ Added@player-ui/utils@0.1.1-next.14(transitive)
+ Added@player-ui/validator@0.1.1-next.14(transitive)
+ Added@player-ui/view@0.1.1-next.14(transitive)
+ Addedis-core-module@2.16.1(transitive)
- Removed@player-ui/binding@0.1.1-next.13(transitive)
- Removed@player-ui/binding-grammar@0.1.1-next.13(transitive)
- Removed@player-ui/constants@0.1.1-next.13(transitive)
- Removed@player-ui/data@0.1.1-next.13(transitive)
- Removed@player-ui/expressions@0.1.1-next.13(transitive)
- Removed@player-ui/flow@0.1.1-next.13(transitive)
- Removed@player-ui/logger@0.1.1-next.13(transitive)
- Removed@player-ui/partial-match-registry@0.1.1-next.13(transitive)
- Removed@player-ui/schema@0.1.1-next.13(transitive)
- Removed@player-ui/string-resolver@0.1.1-next.13(transitive)
- Removed@player-ui/types@0.1.1-next.13(transitive)
- Removed@player-ui/utils@0.1.1-next.13(transitive)
- Removed@player-ui/validator@0.1.1-next.13(transitive)
- Removed@player-ui/view@0.1.1-next.13(transitive)
- Removedis-core-module@2.16.0(transitive)