mnfst 0.5.103 → 0.5.104

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.
@@ -8742,6 +8742,29 @@ function registerXMagicMethod(loadDataSource) {
8742
8742
  if (key in target && typeof target[key] === 'function') {
8743
8743
  return target[key].bind(target);
8744
8744
  }
8745
+ // Appwrite sources intentionally skip the client-side
8746
+ // $query attachment (see attachArrayMethods comment:
8747
+ // "Appwrite sources will get their $query from the
8748
+ // Appwrite plugin"). Delegate to the Appwrite methods
8749
+ // handler so the click hits the backend instead of
8750
+ // silently falling through to `undefined` or, in some
8751
+ // proxy paths, a no-op `() => []`. Without this, demo
8752
+ // sort/query buttons appear to do nothing — no console
8753
+ // error, no network request — because the call resolves
8754
+ // to the chaining fallback's stub `queryFn`.
8755
+ if (key === '$query' || key === '$search') {
8756
+ const createAppwriteMethodsHandler = window.ManifestDataProxiesAppwrite?.createAppwriteMethodsHandler;
8757
+ if (createAppwriteMethodsHandler) {
8758
+ try {
8759
+ const manifest = window.ManifestComponentsRegistry?.manifest || null;
8760
+ const dataSource = manifest?.data?.[prop] || manifest?.appwrite?.[prop];
8761
+ if (dataSource && window.ManifestDataConfig?.isAppwriteCollection?.(dataSource)) {
8762
+ const methodsHandler = createAppwriteMethodsHandler(prop, loadDataSource);
8763
+ return methodsHandler.bind(null, key);
8764
+ }
8765
+ } catch { /* fall through */ }
8766
+ }
8767
+ }
8745
8768
  }
8746
8769
  // Forward all other property access to the target array
8747
8770
  const value = target[key];
@@ -9059,6 +9082,22 @@ function registerXMagicMethod(loadDataSource) {
9059
9082
  if (target && typeof target === 'object' && key in target && typeof target[key] === 'function') {
9060
9083
  return target[key].bind(target);
9061
9084
  }
9085
+ // Appwrite-source delegation: $query is intentionally
9086
+ // not attached to Appwrite arrays by attachArrayMethods
9087
+ // (it requires a backend round-trip). Route to the
9088
+ // Appwrite methods handler instead of the no-op fallback
9089
+ // so sort/query/search buttons actually fire requests.
9090
+ const createAppwriteMethodsHandler = window.ManifestDataProxiesAppwrite?.createAppwriteMethodsHandler;
9091
+ if (createAppwriteMethodsHandler) {
9092
+ try {
9093
+ const manifest = window.ManifestComponentsRegistry?.manifest || null;
9094
+ const dataSource = manifest?.data?.[prop] || manifest?.appwrite?.[prop];
9095
+ if (dataSource && window.ManifestDataConfig?.isAppwriteCollection?.(dataSource)) {
9096
+ const methodsHandler = createAppwriteMethodsHandler(prop, loadDataSource);
9097
+ return methodsHandler.bind(null, key);
9098
+ }
9099
+ } catch { /* fall through */ }
9100
+ }
9062
9101
  // Fallback: return safe function that returns empty array
9063
9102
  return function () {
9064
9103
  return [];
@@ -6,7 +6,7 @@
6
6
  "manifest.color.js": "sha384-Z9G/lzt0vVMxjz4wkPuGG1X9mmQAJR15aOoGX3ephf7r2wnlUWet5GLgkUMtT4vt",
7
7
  "manifest.colorpicker.js": "sha384-0EVn+Ha06h7FIvOxc6WjZYnKYXzi+zba08yKvczSEGTRkWRxyKN2TFrZHI1SDCXu",
8
8
  "manifest.components.js": "sha384-3dCTD5EwCZTiX+1obYtDNM3WWwPh2JDQUQQsdRUUK3gs6FXjse1ShkKaT/2jsNaI",
9
- "manifest.data.js": "sha384-A/BGk/9lX8RxKBBs/6lHQWoQYlDrKI6Of7fnrvv4ZQJRpSkdwISOTtb4NISnTuCL",
9
+ "manifest.data.js": "sha384-xdeTXOfmvxTc6M4Fl+bAjGfi3XulV2iPFGvRcKyK0ml4dwHAqSy3X9ZC/UJzpDk2",
10
10
  "manifest.dropdowns.js": "sha384-WMrFoSpKfJuo81dyrwhVrDO8rq+rDwh2x8x4nH01BY5ZHkvjE+/SaT2gWCI0zOn+",
11
11
  "manifest.export.js": "sha384-qvdGz1TiGEDOeWJ5os1z03RURdKX+ezZEQ1KyV+9iC7X0esLK83mtY87t4MQv45t",
12
12
  "manifest.icons.js": "sha384-uOkboYrovjCpl22eey3Jaxpey+pOnot5NDnRRumcRxiR7IOVaRh1i20gYnWXR5dW",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnfst",
3
- "version": "0.5.103",
3
+ "version": "0.5.104",
4
4
  "private": false,
5
5
  "workspaces": [
6
6
  "templates/starter",