@wix/himalaya-cli 0.1943.0 → 0.1945.0
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/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +5 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/ecom/src/extensions.d.ts +27 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +6 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-ecom.mjs +16 -0
- package/dist/cli.mjs +1186 -644
- package/fixtures/wix-canned.json +6 -0
- package/guides/himi-json-output.md +8 -6
- package/guides/one-app-section-mappings.md +2 -2
- package/guides/one-app-to-himi-app.md +13 -4
- package/guides/release-notes.md +8 -0
- package/guides/sdk-reference.json +56 -1
- package/guides/splash-screens.md +14 -2
- package/package.json +2 -2
- package/templates/bare-fashion/dev/index.ts +3 -1
- package/templates/bare-fashion/tier5-src/_shared/bare-fashion-product-card.ts +5 -4
- package/templates/bare-fashion/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/bare-fashion/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/bare-fashion/tier5-src/himi-bare-fashion-cart/index.ts +19 -12
- package/templates/bare-fashion/tier5-src/himi-bare-fashion-collection/index.ts +9 -4
- package/templates/bare-fashion/tier5-src/himi-bare-fashion-home/index.ts +10 -4
- package/templates/bare-fashion/tier5-src/himi-bare-fashion-product/index.ts +17 -8
- package/templates/bare-fashion/tier5-src/himi-bare-fashion-products/index.ts +8 -4
- package/templates/bare-fashion/tier5-src/himi-bare-fashion-saved/index.ts +31 -12
- package/templates/bare-fashion/tier5-src/himi-bare-fashion-search/index.ts +8 -4
- package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/beauty-salon/tier5-src/_shared/himi-store-facets.ts +4 -4
- package/templates/beauty-salon/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/beauty-salon/tier5-src/himi-branded-lite-cart/index.ts +13 -7
- package/templates/beauty-salon/tier5-src/himi-branded-lite-category/index.ts +6 -1
- package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +6 -5
- package/templates/beauty-salon/tier5-src/himi-branded-lite-shop/index.ts +9 -3
- package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +7 -5
- package/templates/beauty-salon/tier5-src/himi-store-saved/index.ts +31 -12
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/branded-lite/recipes/wishlist-grid.json +1 -1
- package/templates/branded-lite/tier5-src/_shared/collection-service.ts +42 -19
- package/templates/branded-lite/tier5-src/_shared/himi-store-facets.ts +4 -4
- package/templates/branded-lite/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/branded-lite/tier5-src/_shared/saved-products-section.ts +14 -8
- package/templates/branded-lite/tier5-src/himi-branded-lite-cart/index.ts +13 -7
- package/templates/branded-lite/tier5-src/himi-branded-lite-category/index.ts +6 -1
- package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +6 -5
- package/templates/branded-lite/tier5-src/himi-branded-lite-shop/index.ts +9 -3
- package/templates/branded-lite/tier5-src/himi-store-product/index.ts +32 -15
- package/templates/branded-lite/tier5-src/himi-store-saved/index.ts +31 -12
- package/templates/brandy/tier5-src/_shared/collection-service.ts +42 -19
- package/templates/brandy/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/brandy/tier5-src/himi-branded-lite-cart/index.ts +13 -7
- package/templates/community-club/l10n/ar.json +5 -0
- package/templates/community-club/l10n/cs.json +5 -0
- package/templates/community-club/l10n/da.json +5 -0
- package/templates/community-club/l10n/de.json +5 -0
- package/templates/community-club/l10n/el.json +5 -0
- package/templates/community-club/l10n/es.json +5 -0
- package/templates/community-club/l10n/fi.json +5 -0
- package/templates/community-club/l10n/fr.json +5 -0
- package/templates/community-club/l10n/he.json +4 -0
- package/templates/community-club/l10n/hu.json +5 -0
- package/templates/community-club/l10n/id.json +5 -0
- package/templates/community-club/l10n/it.json +5 -0
- package/templates/community-club/l10n/ja.json +5 -0
- package/templates/community-club/l10n/ko.json +5 -0
- package/templates/community-club/l10n/lt.json +5 -0
- package/templates/community-club/l10n/nl.json +5 -0
- package/templates/community-club/l10n/no.json +5 -0
- package/templates/community-club/l10n/pl.json +5 -0
- package/templates/community-club/l10n/pt.json +5 -0
- package/templates/community-club/l10n/ru.json +5 -0
- package/templates/community-club/l10n/sv.json +5 -0
- package/templates/community-club/l10n/th.json +5 -0
- package/templates/community-club/l10n/tr.json +5 -0
- package/templates/community-club/l10n/uk.json +5 -0
- package/templates/community-club/l10n/vi.json +5 -0
- package/templates/community-club/l10n/zh.json +5 -0
- package/templates/community-club/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/community-club/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +6 -5
- package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/conference/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/events-meetups/l10n/ar.json +5 -0
- package/templates/events-meetups/l10n/cs.json +5 -0
- package/templates/events-meetups/l10n/da.json +5 -0
- package/templates/events-meetups/l10n/de.json +5 -0
- package/templates/events-meetups/l10n/el.json +5 -0
- package/templates/events-meetups/l10n/es.json +5 -0
- package/templates/events-meetups/l10n/fi.json +5 -0
- package/templates/events-meetups/l10n/fr.json +5 -0
- package/templates/events-meetups/l10n/he.json +4 -0
- package/templates/events-meetups/l10n/hu.json +5 -0
- package/templates/events-meetups/l10n/id.json +5 -0
- package/templates/events-meetups/l10n/it.json +5 -0
- package/templates/events-meetups/l10n/ja.json +5 -0
- package/templates/events-meetups/l10n/ko.json +5 -0
- package/templates/events-meetups/l10n/lt.json +5 -0
- package/templates/events-meetups/l10n/nl.json +5 -0
- package/templates/events-meetups/l10n/no.json +5 -0
- package/templates/events-meetups/l10n/pl.json +5 -0
- package/templates/events-meetups/l10n/pt.json +5 -0
- package/templates/events-meetups/l10n/ru.json +5 -0
- package/templates/events-meetups/l10n/sv.json +5 -0
- package/templates/events-meetups/l10n/th.json +5 -0
- package/templates/events-meetups/l10n/tr.json +5 -0
- package/templates/events-meetups/l10n/uk.json +5 -0
- package/templates/events-meetups/l10n/vi.json +5 -0
- package/templates/events-meetups/l10n/zh.json +5 -0
- package/templates/events-meetups/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/events-meetups/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +6 -5
- package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/fitness-gym/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/gym-fitness/tier5-src/_shared/himi-store-facets.ts +4 -4
- package/templates/gym-fitness/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/gym-fitness/tier5-src/himi-branded-lite-cart/index.ts +13 -7
- package/templates/gym-fitness/tier5-src/himi-branded-lite-category/index.ts +6 -1
- package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +6 -5
- package/templates/gym-fitness/tier5-src/himi-branded-lite-shop/index.ts +9 -3
- package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +7 -5
- package/templates/gym-fitness/tier5-src/himi-store-saved/index.ts +31 -12
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/medical-services/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/nonprofit-cause/l10n/ar.json +5 -0
- package/templates/nonprofit-cause/l10n/cs.json +5 -0
- package/templates/nonprofit-cause/l10n/da.json +5 -0
- package/templates/nonprofit-cause/l10n/de.json +5 -0
- package/templates/nonprofit-cause/l10n/el.json +5 -0
- package/templates/nonprofit-cause/l10n/es.json +5 -0
- package/templates/nonprofit-cause/l10n/fi.json +5 -0
- package/templates/nonprofit-cause/l10n/fr.json +5 -0
- package/templates/nonprofit-cause/l10n/he.json +4 -0
- package/templates/nonprofit-cause/l10n/hu.json +5 -0
- package/templates/nonprofit-cause/l10n/id.json +5 -0
- package/templates/nonprofit-cause/l10n/it.json +5 -0
- package/templates/nonprofit-cause/l10n/ja.json +5 -0
- package/templates/nonprofit-cause/l10n/ko.json +5 -0
- package/templates/nonprofit-cause/l10n/lt.json +5 -0
- package/templates/nonprofit-cause/l10n/nl.json +5 -0
- package/templates/nonprofit-cause/l10n/no.json +5 -0
- package/templates/nonprofit-cause/l10n/pl.json +5 -0
- package/templates/nonprofit-cause/l10n/pt.json +5 -0
- package/templates/nonprofit-cause/l10n/ru.json +5 -0
- package/templates/nonprofit-cause/l10n/sv.json +5 -0
- package/templates/nonprofit-cause/l10n/th.json +5 -0
- package/templates/nonprofit-cause/l10n/tr.json +5 -0
- package/templates/nonprofit-cause/l10n/uk.json +5 -0
- package/templates/nonprofit-cause/l10n/vi.json +5 -0
- package/templates/nonprofit-cause/l10n/zh.json +5 -0
- package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/nonprofit-cause/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +6 -5
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/owner-lite/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/personal-fitness-trainer/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/podcast-creator/l10n/ar.json +5 -0
- package/templates/podcast-creator/l10n/cs.json +5 -0
- package/templates/podcast-creator/l10n/da.json +5 -0
- package/templates/podcast-creator/l10n/de.json +5 -0
- package/templates/podcast-creator/l10n/el.json +5 -0
- package/templates/podcast-creator/l10n/es.json +5 -0
- package/templates/podcast-creator/l10n/fi.json +5 -0
- package/templates/podcast-creator/l10n/fr.json +5 -0
- package/templates/podcast-creator/l10n/he.json +4 -0
- package/templates/podcast-creator/l10n/hu.json +5 -0
- package/templates/podcast-creator/l10n/id.json +5 -0
- package/templates/podcast-creator/l10n/it.json +5 -0
- package/templates/podcast-creator/l10n/ja.json +5 -0
- package/templates/podcast-creator/l10n/ko.json +5 -0
- package/templates/podcast-creator/l10n/lt.json +5 -0
- package/templates/podcast-creator/l10n/nl.json +5 -0
- package/templates/podcast-creator/l10n/no.json +5 -0
- package/templates/podcast-creator/l10n/pl.json +5 -0
- package/templates/podcast-creator/l10n/pt.json +5 -0
- package/templates/podcast-creator/l10n/ru.json +5 -0
- package/templates/podcast-creator/l10n/sv.json +5 -0
- package/templates/podcast-creator/l10n/th.json +5 -0
- package/templates/podcast-creator/l10n/tr.json +5 -0
- package/templates/podcast-creator/l10n/uk.json +5 -0
- package/templates/podcast-creator/l10n/vi.json +5 -0
- package/templates/podcast-creator/l10n/zh.json +5 -0
- package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/podcast-creator/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +6 -5
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/portfolio-creative/tier5-src/_shared/himi-store-facets.ts +4 -4
- package/templates/portfolio-creative/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-cart/index.ts +13 -7
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-category/index.ts +6 -1
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +6 -5
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-shop/index.ts +9 -3
- package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +7 -5
- package/templates/portfolio-creative/tier5-src/himi-store-saved/index.ts +31 -12
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/professional-services/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/restaurant/l10n/ar.json +5 -0
- package/templates/restaurant/l10n/cs.json +5 -0
- package/templates/restaurant/l10n/da.json +5 -0
- package/templates/restaurant/l10n/de.json +5 -0
- package/templates/restaurant/l10n/el.json +5 -0
- package/templates/restaurant/l10n/es.json +5 -0
- package/templates/restaurant/l10n/fi.json +5 -0
- package/templates/restaurant/l10n/fr.json +5 -0
- package/templates/restaurant/l10n/he.json +4 -0
- package/templates/restaurant/l10n/hu.json +5 -0
- package/templates/restaurant/l10n/id.json +5 -0
- package/templates/restaurant/l10n/it.json +5 -0
- package/templates/restaurant/l10n/ja.json +5 -0
- package/templates/restaurant/l10n/ko.json +5 -0
- package/templates/restaurant/l10n/lt.json +5 -0
- package/templates/restaurant/l10n/nl.json +5 -0
- package/templates/restaurant/l10n/no.json +5 -0
- package/templates/restaurant/l10n/pl.json +5 -0
- package/templates/restaurant/l10n/pt.json +5 -0
- package/templates/restaurant/l10n/ru.json +5 -0
- package/templates/restaurant/l10n/sv.json +5 -0
- package/templates/restaurant/l10n/th.json +5 -0
- package/templates/restaurant/l10n/tr.json +5 -0
- package/templates/restaurant/l10n/uk.json +5 -0
- package/templates/restaurant/l10n/vi.json +5 -0
- package/templates/restaurant/l10n/zh.json +5 -0
- package/templates/restaurant/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/restaurant/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +6 -5
- package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/retail-store/tier5-src/_shared/collection-service.ts +42 -19
- package/templates/retail-store/tier5-src/_shared/himi-store-facets.ts +4 -4
- package/templates/retail-store/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/retail-store/tier5-src/himi-branded-lite-cart/index.ts +13 -7
- package/templates/retail-store/tier5-src/himi-branded-lite-category/index.ts +6 -1
- package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +6 -5
- package/templates/retail-store/tier5-src/himi-branded-lite-shop/index.ts +9 -3
- package/templates/retail-store/tier5-src/himi-store-product/index.ts +32 -15
- package/templates/retail-store/tier5-src/himi-store-saved/index.ts +31 -12
- package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/salon-spa/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/wholesale-store/dev/index.ts +2 -2
- package/templates/wholesale-store/tier5-src/_shared/collection-service.ts +42 -19
- package/templates/wholesale-store/tier5-src/_shared/himi-store-collection.ts +7 -3
- package/templates/wholesale-store/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/wholesale-store/tier5-src/himi-branded-lite-cart/index.ts +13 -7
- package/templates/wholesale-store/tier5-src/himi-store-product/index.ts +32 -15
- package/templates/wholesale-store/tier5-src/himi-store-saved/index.ts +31 -12
- package/templates/wholesale-store/tier5-src/himi-wholesale-home/index.ts +19 -8
- package/templates/yoga-studio/l10n/ar.json +5 -0
- package/templates/yoga-studio/l10n/cs.json +5 -0
- package/templates/yoga-studio/l10n/da.json +5 -0
- package/templates/yoga-studio/l10n/de.json +5 -0
- package/templates/yoga-studio/l10n/el.json +5 -0
- package/templates/yoga-studio/l10n/es.json +5 -0
- package/templates/yoga-studio/l10n/fi.json +5 -0
- package/templates/yoga-studio/l10n/fr.json +5 -0
- package/templates/yoga-studio/l10n/he.json +4 -0
- package/templates/yoga-studio/l10n/hu.json +5 -0
- package/templates/yoga-studio/l10n/id.json +5 -0
- package/templates/yoga-studio/l10n/it.json +5 -0
- package/templates/yoga-studio/l10n/ja.json +5 -0
- package/templates/yoga-studio/l10n/ko.json +5 -0
- package/templates/yoga-studio/l10n/lt.json +5 -0
- package/templates/yoga-studio/l10n/nl.json +5 -0
- package/templates/yoga-studio/l10n/no.json +5 -0
- package/templates/yoga-studio/l10n/pl.json +5 -0
- package/templates/yoga-studio/l10n/pt.json +5 -0
- package/templates/yoga-studio/l10n/ru.json +5 -0
- package/templates/yoga-studio/l10n/sv.json +5 -0
- package/templates/yoga-studio/l10n/th.json +5 -0
- package/templates/yoga-studio/l10n/tr.json +5 -0
- package/templates/yoga-studio/l10n/uk.json +5 -0
- package/templates/yoga-studio/l10n/vi.json +5 -0
- package/templates/yoga-studio/l10n/zh.json +5 -0
- package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +35 -15
- package/templates/yoga-studio/tier5-src/_shared/himi-store-saved.ts +275 -13
- package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +6 -5
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +35 -15
|
@@ -15,7 +15,10 @@ type MemberAvatarFactory = (changed: () => void) => {
|
|
|
15
15
|
|
|
16
16
|
export interface CollectionSaving {
|
|
17
17
|
read(): string[];
|
|
18
|
-
|
|
18
|
+
/** May settle later (an account write); a rejection restores the selection and says so. */
|
|
19
|
+
write(ids: string[], rows: Record<string, unknown>[]): void | Promise<void>;
|
|
20
|
+
/** Re-read the saved ids `read` answers (an account list), before a load or refresh reads them. */
|
|
21
|
+
refresh?(): Promise<void>;
|
|
19
22
|
}
|
|
20
23
|
type State = Record<string, unknown>;
|
|
21
24
|
interface BackendCollection {
|
|
@@ -263,19 +266,33 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
263
266
|
const criteriaBefore = criteriaKey();
|
|
264
267
|
const before = [...prefs.savedIds], undoBefore = lastUndo;
|
|
265
268
|
update(arg, s);
|
|
269
|
+
const failed = () => {
|
|
270
|
+
prefs.savedIds = before; lastUndo = undoBefore;
|
|
271
|
+
saveMessage = copyParam('collection.saveError', 'Could not save this change. Try again.');
|
|
272
|
+
};
|
|
273
|
+
const finish = (settledLater: boolean) => {
|
|
274
|
+
persisted.write(prefs);
|
|
275
|
+
if (backend && config.backendQuery && criteriaBefore !== criteriaKey()) return backend.controller.query(criteria()).then(() => undefined);
|
|
276
|
+
// A write that settled later lands on the rows as they are now, not as they were when it began.
|
|
277
|
+
return derive(settledLater && backend ? backend.apply(s, backend.controller.getState()) : s);
|
|
278
|
+
};
|
|
266
279
|
if (saving && JSON.stringify(before) !== JSON.stringify(prefs.savedIds)) {
|
|
280
|
+
let written: void | Promise<void>;
|
|
267
281
|
try {
|
|
268
|
-
saving.write(prefs.savedIds, Array.isArray(s[config.rows]) ? s[config.rows] as CollectionRow[] : []);
|
|
269
|
-
saveMessage = '';
|
|
282
|
+
written = saving.write(prefs.savedIds, Array.isArray(s[config.rows]) ? s[config.rows] as CollectionRow[] : []);
|
|
270
283
|
} catch {
|
|
271
|
-
|
|
272
|
-
|
|
284
|
+
failed();
|
|
285
|
+
return finish(false);
|
|
286
|
+
}
|
|
287
|
+
if (written && typeof written.then === 'function') {
|
|
288
|
+
return written.then(() => { saveMessage = ''; return finish(true); }, () => { failed(); return finish(true); });
|
|
273
289
|
}
|
|
290
|
+
saveMessage = '';
|
|
274
291
|
}
|
|
275
|
-
|
|
276
|
-
if (backend && config.backendQuery && criteriaBefore !== criteriaKey()) return backend.controller.query(criteria()).then(() => undefined);
|
|
277
|
-
return derive(s);
|
|
292
|
+
return finish(false);
|
|
278
293
|
};
|
|
294
|
+
/** Runs `then` once the saved ids are re-read (an account list); at once, in the same turn, when there is nothing to re-read. */
|
|
295
|
+
const afterSavingRefresh = (then: () => Promise<undefined>): Promise<undefined> => saving?.refresh ? saving.refresh().catch(() => undefined).then(then) : then();
|
|
279
296
|
/** Filter and sort in ONE criteria change, so a tab that sets both runs one query, not two. */
|
|
280
297
|
const setCriteria = (arg: unknown): void => {
|
|
281
298
|
const input = object(arg);
|
|
@@ -329,15 +346,18 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
329
346
|
if (backend) {
|
|
330
347
|
actions.collectionDataChanged = s => derive(backend.apply(s, backend.controller.getState()));
|
|
331
348
|
actions.load = (_s, arg) => {
|
|
332
|
-
stashCopy(arg);
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
349
|
+
stashCopy(arg);
|
|
350
|
+
return afterSavingRefresh(() => {
|
|
351
|
+
syncSaved(); applyNavigationCriteria(arg, _s);
|
|
352
|
+
const reset = backend.onLoad?.(arg);
|
|
353
|
+
if (reset) { setCriteria(reset); persisted.write(prefs); }
|
|
354
|
+
// A load of what the screen already shows is the screen coming back: it revalidates behind its rows.
|
|
355
|
+
return backend.controller.query(criteria(), backend.restorePagesOnLoad, true).then(() => undefined);
|
|
356
|
+
});
|
|
337
357
|
};
|
|
338
358
|
actions.refresh = (_s, arg) => {
|
|
339
|
-
stashCopy(arg);
|
|
340
|
-
return backend.controller.query(criteria()).then(() => undefined);
|
|
359
|
+
stashCopy(arg);
|
|
360
|
+
return afterSavingRefresh(() => { syncSaved(); return backend.controller.query(criteria()).then(() => undefined); });
|
|
341
361
|
};
|
|
342
362
|
actions.loadMore = () => backend.controller.loadMore().then(() => undefined);
|
|
343
363
|
actions.retry = actions.collectionRetry = () => backend.controller.retry().then(() => undefined);
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "محدد",
|
|
2373
2373
|
"origin": "machine"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "المنتج",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "إخفاء",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "vybráno",
|
|
2373
2373
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Produkt",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Skrýt",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "valgt",
|
|
2373
2373
|
"origin": "machine"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Produkt",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Skjul",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "ausgewählt",
|
|
2373
2373
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Produkt",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Ausblenden",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "επιλέχθηκαν",
|
|
2373
2373
|
"origin": "machine"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Προϊόν",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Απόκρυψη",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "seleccionados",
|
|
2373
2373
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Producto",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Ocultar",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "valittu",
|
|
2373
2373
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Tuote",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Piilota",
|
|
@@ -2352,6 +2352,11 @@
|
|
|
2352
2352
|
"translation": "sélectionné(s)",
|
|
2353
2353
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2354
2354
|
},
|
|
2355
|
+
"h_dd3b86d1ef21": {
|
|
2356
|
+
"source": "Product",
|
|
2357
|
+
"translation": "Article",
|
|
2358
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2359
|
+
},
|
|
2355
2360
|
"h_34d8b60fe253": {
|
|
2356
2361
|
"source": "Hide",
|
|
2357
2362
|
"translation": "Masquer",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "kijelölve",
|
|
2373
2373
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Termék",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Elrejtés",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "dipilih",
|
|
2373
2373
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Produk",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Sembunyikan",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "selezionato",
|
|
2373
2373
|
"origin": "machine"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Prodotto",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Nascondi",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "選択中",
|
|
2373
2373
|
"origin": "one-app:mobile-apps-inbox:ARIA_BUSINESS_SELECTOR_SELECTED"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "商品",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "非表示",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "선택됨",
|
|
2373
2373
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "제품",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "비공개",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "pasirinkta",
|
|
2373
2373
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Produktas",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Slėpti",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "geselecteerd",
|
|
2373
2373
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Product",
|
|
2378
|
+
"origin": "machine"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Verbergen",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "valgte",
|
|
2373
2373
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Produkt",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Skjul",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "wybrano",
|
|
2373
2373
|
"origin": "machine"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Produkt",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Ukryj",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "selecionado",
|
|
2373
2373
|
"origin": "machine"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Produto",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Ocultar",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "выбрано",
|
|
2373
2373
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Товар",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Скрыть",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "valda",
|
|
2373
2373
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Produkt",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Dölj",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "เลือกแล้ว",
|
|
2373
2373
|
"origin": "one-app:mobile-apps-inbox:ARIA_BUSINESS_SELECTOR_SELECTED"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "สินค้า",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "ซ่อน",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "seçili",
|
|
2373
2373
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Ürün",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Gizle",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "обрано",
|
|
2373
2373
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Товар",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Приховати",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "đã chọn",
|
|
2373
2373
|
"origin": "one-app:wix-one-app-forms:FORMS_FIELD_COMPOSER_SELECTED_ITEMS"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "Sản phẩm",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "Ẩn",
|
|
@@ -2372,6 +2372,11 @@
|
|
|
2372
2372
|
"translation": "已選擇",
|
|
2373
2373
|
"origin": "one-app:mobile-apps-inbox:ARIA_BUSINESS_SELECTOR_SELECTED"
|
|
2374
2374
|
},
|
|
2375
|
+
"h_dd3b86d1ef21": {
|
|
2376
|
+
"source": "Product",
|
|
2377
|
+
"translation": "產品",
|
|
2378
|
+
"origin": "one-app:wix-one-app-ecom-platform:merchant.ordersList.filters.products.heading"
|
|
2379
|
+
},
|
|
2375
2380
|
"h_34d8b60fe253": {
|
|
2376
2381
|
"source": "Hide",
|
|
2377
2382
|
"translation": "隱藏",
|
|
@@ -15,7 +15,10 @@ type MemberAvatarFactory = (changed: () => void) => {
|
|
|
15
15
|
|
|
16
16
|
export interface CollectionSaving {
|
|
17
17
|
read(): string[];
|
|
18
|
-
|
|
18
|
+
/** May settle later (an account write); a rejection restores the selection and says so. */
|
|
19
|
+
write(ids: string[], rows: Record<string, unknown>[]): void | Promise<void>;
|
|
20
|
+
/** Re-read the saved ids `read` answers (an account list), before a load or refresh reads them. */
|
|
21
|
+
refresh?(): Promise<void>;
|
|
19
22
|
}
|
|
20
23
|
type State = Record<string, unknown>;
|
|
21
24
|
interface BackendCollection {
|
|
@@ -263,19 +266,33 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
263
266
|
const criteriaBefore = criteriaKey();
|
|
264
267
|
const before = [...prefs.savedIds], undoBefore = lastUndo;
|
|
265
268
|
update(arg, s);
|
|
269
|
+
const failed = () => {
|
|
270
|
+
prefs.savedIds = before; lastUndo = undoBefore;
|
|
271
|
+
saveMessage = copyParam('collection.saveError', 'Could not save this change. Try again.');
|
|
272
|
+
};
|
|
273
|
+
const finish = (settledLater: boolean) => {
|
|
274
|
+
persisted.write(prefs);
|
|
275
|
+
if (backend && config.backendQuery && criteriaBefore !== criteriaKey()) return backend.controller.query(criteria()).then(() => undefined);
|
|
276
|
+
// A write that settled later lands on the rows as they are now, not as they were when it began.
|
|
277
|
+
return derive(settledLater && backend ? backend.apply(s, backend.controller.getState()) : s);
|
|
278
|
+
};
|
|
266
279
|
if (saving && JSON.stringify(before) !== JSON.stringify(prefs.savedIds)) {
|
|
280
|
+
let written: void | Promise<void>;
|
|
267
281
|
try {
|
|
268
|
-
saving.write(prefs.savedIds, Array.isArray(s[config.rows]) ? s[config.rows] as CollectionRow[] : []);
|
|
269
|
-
saveMessage = '';
|
|
282
|
+
written = saving.write(prefs.savedIds, Array.isArray(s[config.rows]) ? s[config.rows] as CollectionRow[] : []);
|
|
270
283
|
} catch {
|
|
271
|
-
|
|
272
|
-
|
|
284
|
+
failed();
|
|
285
|
+
return finish(false);
|
|
286
|
+
}
|
|
287
|
+
if (written && typeof written.then === 'function') {
|
|
288
|
+
return written.then(() => { saveMessage = ''; return finish(true); }, () => { failed(); return finish(true); });
|
|
273
289
|
}
|
|
290
|
+
saveMessage = '';
|
|
274
291
|
}
|
|
275
|
-
|
|
276
|
-
if (backend && config.backendQuery && criteriaBefore !== criteriaKey()) return backend.controller.query(criteria()).then(() => undefined);
|
|
277
|
-
return derive(s);
|
|
292
|
+
return finish(false);
|
|
278
293
|
};
|
|
294
|
+
/** Runs `then` once the saved ids are re-read (an account list); at once, in the same turn, when there is nothing to re-read. */
|
|
295
|
+
const afterSavingRefresh = (then: () => Promise<undefined>): Promise<undefined> => saving?.refresh ? saving.refresh().catch(() => undefined).then(then) : then();
|
|
279
296
|
/** Filter and sort in ONE criteria change, so a tab that sets both runs one query, not two. */
|
|
280
297
|
const setCriteria = (arg: unknown): void => {
|
|
281
298
|
const input = object(arg);
|
|
@@ -329,15 +346,18 @@ export function decorateCollection(name: string, def: { state: State; actions?:
|
|
|
329
346
|
if (backend) {
|
|
330
347
|
actions.collectionDataChanged = s => derive(backend.apply(s, backend.controller.getState()));
|
|
331
348
|
actions.load = (_s, arg) => {
|
|
332
|
-
stashCopy(arg);
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
349
|
+
stashCopy(arg);
|
|
350
|
+
return afterSavingRefresh(() => {
|
|
351
|
+
syncSaved(); applyNavigationCriteria(arg, _s);
|
|
352
|
+
const reset = backend.onLoad?.(arg);
|
|
353
|
+
if (reset) { setCriteria(reset); persisted.write(prefs); }
|
|
354
|
+
// A load of what the screen already shows is the screen coming back: it revalidates behind its rows.
|
|
355
|
+
return backend.controller.query(criteria(), backend.restorePagesOnLoad, true).then(() => undefined);
|
|
356
|
+
});
|
|
337
357
|
};
|
|
338
358
|
actions.refresh = (_s, arg) => {
|
|
339
|
-
stashCopy(arg);
|
|
340
|
-
return backend.controller.query(criteria()).then(() => undefined);
|
|
359
|
+
stashCopy(arg);
|
|
360
|
+
return afterSavingRefresh(() => { syncSaved(); return backend.controller.query(criteria()).then(() => undefined); });
|
|
341
361
|
};
|
|
342
362
|
actions.loadMore = () => backend.controller.loadMore().then(() => undefined);
|
|
343
363
|
actions.retry = actions.collectionRetry = () => backend.controller.retry().then(() => undefined);
|