mnfst 0.5.281 → 0.5.282
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/lib/manifest.data.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
(function () {
|
|
4
4
|
|
|
5
|
-
const MANIFEST_BUILD_VERSION = '0.5.
|
|
5
|
+
const MANIFEST_BUILD_VERSION = '0.5.282';
|
|
6
6
|
|
|
7
7
|
/* Manifest Data Sources - Configuration */
|
|
8
8
|
|
|
@@ -3382,7 +3382,9 @@ async function executeMutation(mutationConfig) {
|
|
|
3382
3382
|
if (type === 'create') {
|
|
3383
3383
|
// Generate temporary ID if not provided
|
|
3384
3384
|
const tempId = data.$id || `temp_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
|
|
3385
|
-
|
|
3385
|
+
// Provisional timestamps so the placeholder sorts as the newest row; the server's replace them
|
|
3386
|
+
const now = new Date().toISOString();
|
|
3387
|
+
optimisticData = { $createdAt: now, $updatedAt: now, ...data, $id: tempId };
|
|
3386
3388
|
resolvedEntryId = tempId;
|
|
3387
3389
|
|
|
3388
3390
|
// Set creating state
|
|
@@ -3470,8 +3472,15 @@ async function executeMutation(mutationConfig) {
|
|
|
3470
3472
|
clearSourceCaches(dataSourceName);
|
|
3471
3473
|
} else if (store && arr) {
|
|
3472
3474
|
if (index !== -1) {
|
|
3475
|
+
// The server row takes its own sort position (its values may differ from the placeholder's)
|
|
3473
3476
|
const ds = window.ManifestDataStore;
|
|
3474
|
-
|
|
3477
|
+
const created = ds.createReactiveReferences(result, dataSourceName);
|
|
3478
|
+
if (window.ManifestDataMain?.orderFor?.(dataSourceName)) {
|
|
3479
|
+
store[dataSourceName].splice(index, 1);
|
|
3480
|
+
ds.insertRow(store, dataSourceName, created);
|
|
3481
|
+
} else {
|
|
3482
|
+
store[dataSourceName].splice(index, 1, created); // unsorted: keeps its place
|
|
3483
|
+
}
|
|
3475
3484
|
ds.touchSource(dataSourceName);
|
|
3476
3485
|
clearSourceCaches(dataSourceName);
|
|
3477
3486
|
} else {
|
|
@@ -9662,6 +9671,8 @@ function sourceArrayView(dataSourceName, array, build) {
|
|
|
9662
9671
|
return view;
|
|
9663
9672
|
}
|
|
9664
9673
|
|
|
9674
|
+
const APPWRITE_EARLY_METHODS = new Set(['$query', '$create', '$update', '$delete', '$duplicate']);
|
|
9675
|
+
|
|
9665
9676
|
// Loading proxy for Appwrite sources (CRUD + state/files/upload/pagination methods)
|
|
9666
9677
|
function createAppwriteLoadingProxy(dataSourceName, reloadDataSource) {
|
|
9667
9678
|
const createLoadingProxy = window.ManifestDataProxiesCore?.createLoadingProxy;
|
|
@@ -9924,6 +9935,18 @@ function registerXMagicMethod(loadDataSource) {
|
|
|
9924
9935
|
if (key === '$saving') return window.ManifestDataProxiesMagic.createSavingMethod(prop);
|
|
9925
9936
|
if (key === '$more') return () => window.ManifestDataMain.loadMore(prop);
|
|
9926
9937
|
if (key === '$reload') return () => window.ManifestDataMain.reloadSource(prop);
|
|
9938
|
+
if (key === '$first' || key === '$next' || key === '$prev' || key === '$page') {
|
|
9939
|
+
return window.ManifestDataProxiesMagic.createPaginationMethod(key, prop);
|
|
9940
|
+
}
|
|
9941
|
+
// Appwrite methods work before the first load ($query on open)
|
|
9942
|
+
if (APPWRITE_EARLY_METHODS.has(key)) {
|
|
9943
|
+
const manifest = window.ManifestComponentsRegistry?.manifest || window.__manifestLoaded;
|
|
9944
|
+
const config = manifest?.data?.[prop];
|
|
9945
|
+
// Manifest not loaded yet: route anyway (the handler awaits it and refuses non-Appwrite sources)
|
|
9946
|
+
const handler = (!manifest || (config && window.ManifestDataConfig?.isAppwriteCollection?.(config)))
|
|
9947
|
+
&& window.ManifestDataProxiesAppwrite?.createAppwriteMethodsHandler?.(prop, window.ManifestDataMain?.reloadDataSource);
|
|
9948
|
+
if (handler) return handler.bind(null, key);
|
|
9949
|
+
}
|
|
9927
9950
|
return target[key];
|
|
9928
9951
|
}
|
|
9929
9952
|
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest.appwrite.auth.js": "sha384-gWLSeVPqCLMiUZB8MU7GqMg3x2yULFUsp8nTTZrPp/9Dlkix42rBn9yIimvwrHqZ",
|
|
3
|
-
"manifest.appwrite.data.js": "sha384-
|
|
3
|
+
"manifest.appwrite.data.js": "sha384-GWMQqxFSIrenZpip0UPl52ryWKoBXNsQdXij2EiuyAN1dQWP/6nue114JNeDKbxM",
|
|
4
4
|
"manifest.appwrite.presences.js": "sha384-LINPhIPTCK+rA8zd+HPUzMSEgH6Sl2vQMEyItT97bnEE2FYGYKqjXX+CWdt6nl9z",
|
|
5
5
|
"manifest.bindings.js": "sha384-lPtMf8Ykaic9gNVZKq8Scia1881ZeMAyxer3WCIkUNwwrgzGBWto1OXADUwjvORF",
|
|
6
6
|
"manifest.charts.js": "sha384-AFbP7mQnigy7DU1s+YE30yKTeQAKfgNazhbfSNbfd9ZpLgeulZKaPi/fAq3gJHDO",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"manifest.combobox.js": "sha384-/lJo6vaxKjgnBSRs/dzkhK1dzGk3GBw8FISoNJZB70mwAVwu1k5veZyBXjOb4keS",
|
|
12
12
|
"manifest.components.js": "sha384-1el5WMdgmzu/2ocaYN21OjLi/lfjllvA8aju1J3knYuOizw+XFfJU1+rvGqYW7qk",
|
|
13
13
|
"manifest.computed.js": "sha384-GYML/e81gQfN+iDbqhPUgny8bINCyL+SrbTofoGk4hlCnLLjv51mCv42JMqq+ku5",
|
|
14
|
-
"manifest.data.js": "sha384-
|
|
14
|
+
"manifest.data.js": "sha384-LFG+IQqJye5+ccjj2xefyvsSvqnsLS7rgm2zAcCIEC41wopKzPNXmd2dB35zqrlt",
|
|
15
15
|
"manifest.datepicker.js": "sha384-EzlMwvIxlla/0BuyhAEqxN0M8TGcWIWgEIg840V0akKQQK1uY648wPWMkobvtq/o",
|
|
16
16
|
"manifest.defer.js": "sha384-PRp7+dCZHnnl55rX2xrHutLrQnszHo7o5o9Tq28M/yjLZPuXDzcwQNxCdvbtCYSz",
|
|
17
17
|
"manifest.device.js": "sha384-YeQaS56L8IILqrQNBSeAOLwIh5DuAOrE60cYLK1+46qJtUrXlAvqGe2j5mbV4Vq7",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"manifest.status.js": "sha384-ofu7nBnVIGZ1U1o2R9d2H3V8aEMPUCVbl5FO3gIToXqi0oa36fTviEdh5UU7Kitw",
|
|
30
30
|
"manifest.submissions.js": "sha384-v9eS47ytAfTGIKAyVnbd0QWegucVS7yduvigqfsxxoqXmbaEoy0M2y+BiI4xeZBd",
|
|
31
31
|
"manifest.svg.js": "sha384-qr/8H9+2cIhSXNbRWRtIdrDlTOxKlNJqwEefHvCYoiBNW/kKhPTFa109Orv/EBnb",
|
|
32
|
-
"manifest.sw.js": "sha384
|
|
32
|
+
"manifest.sw.js": "sha384-VawgDkXO4cfbM93u/jxsqW9f1tBIbZKy5W8KcirjltPLIzB8cDSUNOe5Ijaj/RdV",
|
|
33
33
|
"manifest.tabs.js": "sha384-otU09H7jnawVKQdLAYpMCd3jx00tgyPVr42D2hLIBzN5dG4se505YesavdnMqEi1",
|
|
34
34
|
"manifest.tailwind.js": "sha384-yuP3LEvWU+QVjxjkZ0YhErtC9RrGmhOmHjjFjhS9obqZbp5/KTIEnSR0CXDvHE0B",
|
|
35
35
|
"manifest.toasts.js": "sha384-UpOz9fAdGeGUhL0NamBg5iPepEfIy73p9HYdcxfOQC5b7CVsl7Our0skdZzaLNcC",
|
package/lib/manifest.sw.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
// Build stamps the published version here; unstamped (dev) falls back to the
|
|
18
18
|
// registration URL's `v`, then 'dev'.
|
|
19
|
-
const BUILD_VERSION = '0.5.
|
|
19
|
+
const BUILD_VERSION = '0.5.282';
|
|
20
20
|
const CACHE_PREFIX = 'mnfst-sw:';
|
|
21
21
|
const META_CACHE = CACHE_PREFIX + 'meta';
|
|
22
22
|
// Sized to hold a full precache.json warm-up (PRECACHE_MAX_ENTRIES server-side)
|