{{ model.statName || model.variableName }}
diff --git a/app/imports/client/ui/properties/components/attributes/SpellSlotListTile.vue b/app/imports/client/ui/properties/components/attributes/SpellSlotListTile.vue
index f21ac420..4cf7f107 100644
--- a/app/imports/client/ui/properties/components/attributes/SpellSlotListTile.vue
+++ b/app/imports/client/ui/properties/components/attributes/SpellSlotListTile.vue
@@ -8,7 +8,7 @@
@@ -18,7 +18,10 @@
>
{{ model.value }}
-
diff --git a/app/imports/client/ui/properties/shared/PropertyViewer.vue b/app/imports/client/ui/properties/shared/PropertyViewer.vue
index de7777b0..cd0280f6 100644
--- a/app/imports/client/ui/properties/shared/PropertyViewer.vue
+++ b/app/imports/client/ui/properties/shared/PropertyViewer.vue
@@ -199,5 +199,7 @@ export default {
diff --git a/app/imports/parser/grammar.js b/app/imports/parser/grammar.js
index 8f513674..2ef69a71 100644
--- a/app/imports/parser/grammar.js
+++ b/app/imports/parser/grammar.js
@@ -1,4 +1,4 @@
-// Generated automatically by nearley, version 2.20.1
+// Generated automatically by nearley, version 2.16.0
// http://github.com/Hardmath123/nearley
function id(x) { return x[0]; }
@@ -93,7 +93,7 @@ let ParserRules = [
d => [d[2], ...d[3]]
},
{"name": "arguments", "symbols": [{"literal":"("}, "_", {"literal":")"}], "postprocess": d => []},
- {"name": "indexExpression", "symbols": ["arrayExpression", {"literal":"["}, "_", "expression", "_", {"literal":"]"}], "postprocess": d => node.index.create({array: d[0], index: d[3]})},
+ {"name": "indexExpression", "symbols": ["indexExpression", {"literal":"["}, "_", "expression", "_", {"literal":"]"}], "postprocess": d => node.index.create({array: d[0], index: d[3]})},
{"name": "indexExpression", "symbols": ["arrayExpression"], "postprocess": id},
{"name": "arrayExpression$subexpression$1", "symbols": ["expression"], "postprocess": d => d[0]},
{"name": "arrayExpression$ebnf$1", "symbols": []},
diff --git a/app/imports/parser/grammar.ne b/app/imports/parser/grammar.ne
index e008ac54..39407980 100644
--- a/app/imports/parser/grammar.ne
+++ b/app/imports/parser/grammar.ne
@@ -125,7 +125,7 @@ arguments ->
| "(" _ ")" {% d => [] %}
indexExpression ->
- arrayExpression "[" _ expression _ "]" {% d => node.index.create({array: d[0], index: d[3]}) %}
+ indexExpression "[" _ expression _ "]" {% d => node.index.create({array: d[0], index: d[3]}) %}
| arrayExpression {% id %}
arrayExpression ->
diff --git a/app/imports/server/publications/slotFillers.js b/app/imports/server/publications/slotFillers.js
index 207ba336..e6a47e6d 100644
--- a/app/imports/server/publications/slotFillers.js
+++ b/app/imports/server/publications/slotFillers.js
@@ -7,6 +7,58 @@ import getCreatureLibraryIds from '/imports/api/library/getCreatureLibraryIds.js
import { LIBRARY_NODE_TREE_FIELDS } from '/imports/server/publications/library.js';
import escapeRegex from '/imports/api/utility/escapeRegex.js';
+// Publish docs the user has already selected so they don't disappear when searching
+Meteor.publish('selectedFillers', function (slotId, nodeIds, isDummySlot) {
+ let autorun = this.autorun;
+ autorun(function () {
+ let userId = this.userId;
+ if (!userId) {
+ return [];
+ }
+
+ // Get the slot from the right collection
+ let slot;
+ if (isDummySlot) {
+ slot = LibraryNodes.findOne(slotId);
+ } else {
+ slot = CreatureProperties.findOne(slotId);
+ }
+
+ if (!slot) return [];
+
+ // Get all the ids of libraries the user can access
+ const creatureId = slot.ancestors[0].id;
+ const libraryIds = getCreatureLibraryIds(creatureId, userId);
+ const libraries = Libraries.find({
+ $or: [
+ { owner: userId },
+ { writers: userId },
+ { readers: userId },
+ { _id: { $in: libraryIds }, public: true },
+ ]
+ }, {
+ sort: { name: 1 }
+ });
+
+ let filter = { _id: { $in: nodeIds } };
+ // Get the limit of the documents the user can fetch
+ let options = {
+ sort: {
+ name: 1,
+ order: 1,
+ },
+ limit: 100,
+ fields: LIBRARY_NODE_TREE_FIELDS,
+ };
+ autorun(function () {
+ return [
+ LibraryNodes.find(filter, options),
+ libraries
+ ];
+ });
+ });
+});
+
Meteor.publish('slotFillers', function (slotId, searchTerm, isDummySlot) {
if (searchTerm) check(searchTerm, String);
@@ -50,6 +102,7 @@ Meteor.publish('slotFillers', function (slotId, searchTerm, isDummySlot) {
let options = undefined;
if (searchTerm) {
+ if (!filter.$and) filter.$and = [];
filter.$and.push({
$or: [
{ name: { $regex: escapeRegex(searchTerm), '$options': 'i' } },
diff --git a/app/packages/redis-oplog b/app/packages/redis-oplog
deleted file mode 160000
index 83e302c1..00000000
--- a/app/packages/redis-oplog
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 83e302c15456d6744047c50fc8d1add9e739b001