@player-ui/player 0.4.0-next.3 → 0.4.0-next.5
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/dist/index.cjs.js +48 -23
- package/dist/index.d.ts +16 -1
- package/dist/index.esm.js +48 -24
- package/dist/player.dev.js +11968 -0
- package/dist/player.prod.js +2 -0
- package/package.json +3 -3
- package/src/expressions/evaluator.ts +2 -2
- package/src/expressions/index.ts +1 -0
- package/src/expressions/parser.ts +53 -27
- package/src/expressions/types.ts +6 -0
- package/src/player.ts +2 -2
- package/src/view/parser/index.ts +7 -1
package/src/expressions/types.ts
CHANGED
|
@@ -81,6 +81,12 @@ export interface BaseNode<T> {
|
|
|
81
81
|
|
|
82
82
|
/** The location of the node in the source expression string */
|
|
83
83
|
location?: NodeLocation;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The error that occurred while parsing this node
|
|
87
|
+
* This is only set if the parsing mode is set to non-strict
|
|
88
|
+
*/
|
|
89
|
+
error?: Error;
|
|
84
90
|
}
|
|
85
91
|
|
|
86
92
|
/** A helper interface for nodes that container left and right children */
|
package/src/player.ts
CHANGED
|
@@ -30,8 +30,8 @@ import type {
|
|
|
30
30
|
import { NOT_STARTED_STATE } from './types';
|
|
31
31
|
|
|
32
32
|
// Variables injected at build time
|
|
33
|
-
const PLAYER_VERSION = '0.4.0-next.
|
|
34
|
-
const COMMIT = '
|
|
33
|
+
const PLAYER_VERSION = '0.4.0-next.5';
|
|
34
|
+
const COMMIT = 'a7957331b94ce0a7d50709a0d636a406b033300f';
|
|
35
35
|
|
|
36
36
|
export interface PlayerPlugin {
|
|
37
37
|
/**
|
package/src/view/parser/index.ts
CHANGED
|
@@ -120,7 +120,13 @@ export class Parser {
|
|
|
120
120
|
|
|
121
121
|
const objEntries = Array.isArray(localObj)
|
|
122
122
|
? localObj.map((v, i) => [i, v])
|
|
123
|
-
:
|
|
123
|
+
: [
|
|
124
|
+
...Object.entries(localObj),
|
|
125
|
+
...Object.getOwnPropertySymbols(localObj).map((s) => [
|
|
126
|
+
s,
|
|
127
|
+
(localObj as any)[s],
|
|
128
|
+
]),
|
|
129
|
+
];
|
|
124
130
|
|
|
125
131
|
const defaultValue: NestedObj = {
|
|
126
132
|
children: [],
|