ekms 8.9.0-beta.20 → 8.9.0-beta.21
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/common/wp.js +8 -1
- package/common/wp.test.json +3844 -4082
- package/package.json +2 -2
package/common/wp.js
CHANGED
@@ -82,12 +82,19 @@ let config = {
|
|
82
82
|
const changeState = ({api, isA, context, toArray, element, state}) => {
|
83
83
|
let unit = root(context.element.marker)
|
84
84
|
let scope
|
85
|
+
let conditions = []
|
85
86
|
if (isA(context.element, 'everything')) {
|
86
87
|
scope = 'all'
|
88
|
+
} else if (context.element.condition) {
|
89
|
+
const condition = context.element.condition
|
90
|
+
if (condition.marker == 'start_wp') {
|
91
|
+
const letters = condition.letters.letters.text
|
92
|
+
conditions.push({ comparision: 'prefix', letters })
|
93
|
+
}
|
87
94
|
} else {
|
88
95
|
scope = context.element.quantity.quantity
|
89
96
|
}
|
90
|
-
const update = { unit, scope }
|
97
|
+
const update = { unit, scope, conditions }
|
91
98
|
setUpdate(isA, update, toArray(context.state))
|
92
99
|
api.changeState(update)
|
93
100
|
}
|