@lotics/app-sdk 0.113.0 → 0.113.1

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -30529,21 +30529,15 @@ function compareFieldValues(aValue, bValue, field, blankPosition = "bottom", ord
30529
30529
 
30530
30530
  // ../shared/src/formula_references.ts
30531
30531
  var FIELD_REF_TOKEN = /\{([^{}]+)\}/g;
30532
- function buildRefIndex(fields) {
30533
- const index = /* @__PURE__ */ new Map();
30534
- for (const field of fields) index.set(field.name, field.key);
30535
- for (const field of fields) index.set(field.key, field.key);
30536
- return index;
30537
- }
30538
30532
  function prepareFormulaExpression(expression, fields) {
30539
- const index = buildRefIndex(fields);
30533
+ const keys2 = new Set(fields.map((field) => field.key));
30540
30534
  const referencedKeys = [];
30541
30535
  const unresolved = [];
30542
30536
  const seenKeys = /* @__PURE__ */ new Set();
30543
30537
  const seenRefs = /* @__PURE__ */ new Set();
30544
30538
  const lowered = expression.replace(FIELD_REF_TOKEN, (_raw, inner) => {
30545
30539
  const ref = inner.trim();
30546
- const key = index.get(ref);
30540
+ const key = keys2.has(ref) ? ref : void 0;
30547
30541
  if (key === void 0) {
30548
30542
  if (!seenRefs.has(ref)) {
30549
30543
  seenRefs.add(ref);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/app-sdk",
3
- "version": "0.113.0",
3
+ "version": "0.113.1",
4
4
  "description": "The SDK a Lotics custom-code app reads and writes through \u2014 typed hooks over the host bridge, cell readers, mount() and AppRouter",
5
5
  "type": "module",
6
6
  "exports": {