@wix/himalaya-cli 0.1441.0 → 0.1443.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/dev-server/src/app-config.d.ts +30 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/state/src/index.d.ts +7 -0
- package/dist/cli.mjs +627 -389
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/hhp.md +4 -0
- package/guides/himi-json-output.md +1 -1
- package/guides/himi-test.md +3 -2
- package/guides/sdk-reference.json +1 -1
- package/package.json +2 -2
- package/templates/beauty-salon/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/beauty-salon/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/beauty-salon-owner/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/beauty-salon-owner/tier5-src/_shared/owner-editor-value.ts +10 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-manage/index.ts +18 -3
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-post/index.ts +2 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -4
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-product/index.ts +2 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-product-form/index.ts +10 -4
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-search/index.ts +11 -0
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-search/logic.ts +35 -1
- package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-service-form/index.ts +2 -1
- package/templates/branded-lite/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/branded-lite/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/community-club/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/community-club/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/community-club-owner/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/community-club-owner/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/community-club-owner/tier5-src/_shared/owner-editor-value.ts +10 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-event/index.ts +2 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -1
- package/templates/community-club-owner/tier5-src/himi-owner-lite-manage/index.ts +18 -3
- package/templates/community-club-owner/tier5-src/himi-owner-lite-post/index.ts +2 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -4
- package/templates/community-club-owner/tier5-src/himi-owner-lite-product/index.ts +2 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-product-form/index.ts +10 -4
- package/templates/community-club-owner/tier5-src/himi-owner-lite-search/index.ts +11 -0
- package/templates/community-club-owner/tier5-src/himi-owner-lite-search/logic.ts +35 -1
- package/templates/events-meetups/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/events-meetups/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/events-meetups-owner/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/events-meetups-owner/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/events-meetups-owner/tier5-src/_shared/owner-editor-value.ts +10 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-event/index.ts +2 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -1
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-manage/index.ts +18 -3
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-post/index.ts +2 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -4
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-search/index.ts +11 -0
- package/templates/events-meetups-owner/tier5-src/himi-owner-lite-search/logic.ts +35 -1
- package/templates/gym-fitness/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/gym-fitness/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/gym-fitness-owner/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/gym-fitness-owner/tier5-src/_shared/owner-editor-value.ts +10 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-event/index.ts +2 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -1
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-manage/index.ts +18 -3
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-post/index.ts +2 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -4
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-product/index.ts +2 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-product-form/index.ts +10 -4
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-search/index.ts +11 -0
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-search/logic.ts +35 -1
- package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-service-form/index.ts +2 -1
- package/templates/nonprofit-cause/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/nonprofit-cause/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/nonprofit-cause-owner/tier5-src/_shared/owner-editor-value.ts +10 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-event/index.ts +2 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -1
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-manage/index.ts +18 -3
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-post/index.ts +2 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -4
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-search/index.ts +11 -0
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-search/logic.ts +35 -1
- package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-service-form/index.ts +2 -1
- package/templates/owner-lite/dev/index.ts +8 -2
- package/templates/owner-lite/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/owner-lite/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/owner-lite/tier5-src/_shared/owner-editor-value.ts +10 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-event/index.ts +2 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-event-form/index.ts +4 -1
- package/templates/owner-lite/tier5-src/himi-owner-lite-faq-category-form/index.ts +5 -1
- package/templates/owner-lite/tier5-src/himi-owner-lite-faq-question-form/index.ts +9 -3
- package/templates/owner-lite/tier5-src/himi-owner-lite-manage/index.ts +18 -3
- package/templates/owner-lite/tier5-src/himi-owner-lite-post/index.ts +2 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-post-form/index.ts +10 -4
- package/templates/owner-lite/tier5-src/himi-owner-lite-product/index.ts +2 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-product-form/index.ts +10 -4
- package/templates/owner-lite/tier5-src/himi-owner-lite-search/index.ts +11 -0
- package/templates/owner-lite/tier5-src/himi-owner-lite-search/logic.ts +35 -1
- package/templates/owner-lite/tier5-src/himi-owner-lite-service-form/index.ts +2 -1
- package/templates/podcast-creator/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/podcast-creator/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/podcast-creator-owner/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/podcast-creator-owner/tier5-src/_shared/owner-editor-value.ts +10 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-event/index.ts +2 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -1
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-manage/index.ts +18 -3
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-post/index.ts +2 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -4
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-product/index.ts +2 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-product-form/index.ts +10 -4
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-search/index.ts +11 -0
- package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-search/logic.ts +35 -1
- package/templates/portfolio-creative/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/portfolio-creative/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/portfolio-creative-owner/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/portfolio-creative-owner/tier5-src/_shared/owner-editor-value.ts +10 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-manage/index.ts +18 -3
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-post/index.ts +2 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -4
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-product/index.ts +2 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-product-form/index.ts +10 -4
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-search/index.ts +11 -0
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-search/logic.ts +35 -1
- package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-service-form/index.ts +2 -1
- package/templates/restaurant/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/restaurant/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/restaurant-owner/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/restaurant-owner/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/restaurant-owner/tier5-src/_shared/owner-editor-value.ts +10 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-event/index.ts +2 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -1
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-manage/index.ts +18 -3
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-post/index.ts +2 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -4
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-product/index.ts +2 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-product-form/index.ts +10 -4
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-search/index.ts +11 -0
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-search/logic.ts +35 -1
- package/templates/restaurant-owner/tier5-src/himi-owner-lite-service-form/index.ts +2 -1
- package/templates/retail-store/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/retail-store/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/retail-store-owner/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/retail-store-owner/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/retail-store-owner/tier5-src/_shared/owner-editor-value.ts +10 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-manage/index.ts +18 -3
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-post/index.ts +2 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -4
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-product/index.ts +2 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-product-form/index.ts +10 -4
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-search/index.ts +11 -0
- package/templates/retail-store-owner/tier5-src/himi-owner-lite-search/logic.ts +35 -1
- package/templates/yoga-studio/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/yoga-studio/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-query.ts +32 -5
- package/templates/yoga-studio-owner/tier5-src/_shared/collection-service.ts +2 -1
- package/templates/yoga-studio-owner/tier5-src/_shared/owner-editor-value.ts +10 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-event/index.ts +2 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-event-form/index.ts +4 -1
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-manage/index.ts +18 -3
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-post/index.ts +2 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-post-form/index.ts +10 -4
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-search/index.ts +11 -0
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-search/logic.ts +35 -1
- package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-service-form/index.ts +2 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// screen (himiOwnerLitePost.publish). Bound by buildForm ($service:himiOwnerLitePostForm.*).
|
|
5
5
|
|
|
6
6
|
import { postBodyText, plainPostBody, postCoverUrl } from "../_shared/owner-post-content.js";
|
|
7
|
-
import { editorSubmitValue, queuedDocument, editorChanged, editorRunKeys, resetHydratedEditorOnOlderRuntime, editorAfterSave, liveState, settleOverLive } from "../_shared/owner-editor-value.js";
|
|
7
|
+
import { editorSubmitValue, queuedDocument, editorChanged, editorRunKeys, resetHydratedEditorOnOlderRuntime, editorAfterSave, liveState, settleOverLive, holdsLoadedForm } from "../_shared/owner-editor-value.js";
|
|
8
8
|
import { ricosUploadService } from "@himalaya/wix-rich-content-editor";
|
|
9
9
|
import { wixCall } from "@himalaya/wix-site-media";
|
|
10
10
|
import { wixMediaUrl, WIX_DETAIL_IMAGE } from "../_shared/himi-store.js";
|
|
@@ -165,18 +165,24 @@ const svc = defineService<PostFormState, {
|
|
|
165
165
|
bodyChanged: (s: PostFormState, arg?: unknown) => PostFormState;
|
|
166
166
|
submit: (s: PostFormState, values?: Record<string, unknown>) => Promise<PostFormState>;
|
|
167
167
|
}>("himiOwnerLitePostForm", {
|
|
168
|
-
|
|
168
|
+
// The editor stays hidden until this run's load lands, however the form was opened (an id as input or in the params).
|
|
169
|
+
state: shape({ mode: startMode, id: initialInput.id ?? "", bodyPending: true }),
|
|
169
170
|
// [rico] #3644 — this run's editor state and UI: a cold boot takes these from `state`, never from
|
|
170
171
|
// the persisted snapshot (the editor seeds once; last run's sheet is not this run's).
|
|
171
172
|
notHydrated: [...editorRunKeys("body"), "detailsOpen"],
|
|
173
|
+
// perVisit: a cached embed's warm return starts this run fresh, as a cold boot does (`__resetRunState`).
|
|
174
|
+
perVisit: [...editorRunKeys("body"), "detailsOpen"],
|
|
172
175
|
actions: {
|
|
173
176
|
load: async (s, arg) => {
|
|
174
177
|
stashCopy(arg); // absorb the descriptor's onAppear copy-pack param
|
|
175
178
|
// WS-C — nav-param input is PRIMARY (the canonical create-or-edit shell
|
|
176
179
|
// bakes no id/mode); the onAppear `id` param is the #570 suffixed-build
|
|
177
180
|
// fallback. An id ⇒ edit; no id anywhere ⇒ the create shell.
|
|
178
|
-
|
|
179
|
-
|
|
181
|
+
// The held id is for the host's bare refresh only (no argument): an onAppear without an id is a create screen.
|
|
182
|
+
const id = navInputId() || idFrom(arg, arg === undefined ? s.id : "");
|
|
183
|
+
if (holdsLoadedForm(s, { id, mode: id ? "edit" : "create" }, "body")) return s;
|
|
184
|
+
// A form that held a record (the one just saved) opens blank.
|
|
185
|
+
if (!id) return shape({ ...(s.id ? {} : s), ...BODY_LOADED, mode: "create", id: "", bodyJson: "", status: "idle", error: "", demoNote: isOwnerPreviewDemo() ? copyParam("ownerCommon.demoSaveNote", DEMO_SAVE_NOTE) : "" });
|
|
180
186
|
if (isOwnerPreviewDemo()) {
|
|
181
187
|
const d = DEMO_POSTS.find((x) => x.id === id);
|
|
182
188
|
if (d) {
|
|
@@ -254,6 +254,8 @@ const IDLE: State = {
|
|
|
254
254
|
|
|
255
255
|
/** Rebuilt on `load`, because the allowlist arrives with the descriptor. */
|
|
256
256
|
let coordinator: ReturnType<typeof createGroupedSearch> | undefined;
|
|
257
|
+
/** The allowlist the coordinator was built for. */
|
|
258
|
+
let coordinatorSources = "";
|
|
257
259
|
let published: State = IDLE;
|
|
258
260
|
const memory = localPreferences("ownerSearch", normalizeMemory);
|
|
259
261
|
|
|
@@ -279,6 +281,15 @@ const svc = defineService<State, {
|
|
|
279
281
|
actions: {
|
|
280
282
|
load: async (_state, arg) => {
|
|
281
283
|
stashCopy(arg);
|
|
284
|
+
// The screen coming back re-runs its search behind what it shows: a warm worker's refresh calls `load` bare (no allowlist),
|
|
285
|
+
// and its onAppear repeats the allowlist the coordinator was built for.
|
|
286
|
+
const sources = str(arg, "sources");
|
|
287
|
+
if (coordinator && (!sources || sources === coordinatorSources)) {
|
|
288
|
+
await coordinator.revalidate();
|
|
289
|
+
remember();
|
|
290
|
+
return published;
|
|
291
|
+
}
|
|
292
|
+
coordinatorSources = sources;
|
|
282
293
|
const allowed = (() => {
|
|
283
294
|
try {
|
|
284
295
|
return JSON.parse(str(arg, "sources") || "[]");
|
|
@@ -446,7 +446,13 @@ export function createGroupedSearch(
|
|
|
446
446
|
};
|
|
447
447
|
};
|
|
448
448
|
|
|
449
|
-
|
|
449
|
+
/** The revalidation running behind the shown rows (0: none): its snapshots are held back until it is done. */
|
|
450
|
+
let holding = 0, holds = 0;
|
|
451
|
+
/** The depth the running revalidation restores, so one that overlaps it starts from the owner's depth, not
|
|
452
|
+
* from its reset; and the revalidation itself, which a "look further" tapped meanwhile waits for. */
|
|
453
|
+
let heldDepth: Record<string, number> = {};
|
|
454
|
+
let revalidation: Promise<void> | undefined;
|
|
455
|
+
const emit = () => { if (!disposed && !holding) publish(snapshot()); };
|
|
450
456
|
|
|
451
457
|
/** Identity merge: a re-fetched row REPLACES its predecessor in place, so a
|
|
452
458
|
* refresh cannot reorder the list under the user's finger or duplicate a row
|
|
@@ -604,6 +610,7 @@ export function createGroupedSearch(
|
|
|
604
610
|
* the wrong result set. */
|
|
605
611
|
async search(raw: unknown): Promise<void> {
|
|
606
612
|
if (disposed) return;
|
|
613
|
+
holding = 0;
|
|
607
614
|
const next = normalizeQuery(raw);
|
|
608
615
|
query = next;
|
|
609
616
|
for (const id of order) {
|
|
@@ -627,6 +634,7 @@ export function createGroupedSearch(
|
|
|
627
634
|
*/
|
|
628
635
|
async restore(raw: unknown, depth: Record<string, number> = {}): Promise<void> {
|
|
629
636
|
if (disposed) return;
|
|
637
|
+
holding = 0;
|
|
630
638
|
const next = normalizeQuery(raw);
|
|
631
639
|
query = next;
|
|
632
640
|
for (const id of order) {
|
|
@@ -637,8 +645,34 @@ export function createGroupedSearch(
|
|
|
637
645
|
if (!next) return;
|
|
638
646
|
await fanOut(order, depth);
|
|
639
647
|
},
|
|
648
|
+
/** A returning screen (a cached embed's warm worker): the same search re-run to the depth each group
|
|
649
|
+
* shows, behind the rows it shows, and published once. Rows are a live claim about records, so they
|
|
650
|
+
* are re-fetched, never repainted; a search typed meanwhile takes over at once. */
|
|
651
|
+
async revalidate(): Promise<void> {
|
|
652
|
+
if (disposed || !query) return;
|
|
653
|
+
const depth: Record<string, number> = holding ? { ...heldDepth } : {};
|
|
654
|
+
for (const id of order) { const pages = groups.get(id)?.pages ?? 0; if (pages > Math.max(1, depth[id] ?? 0)) depth[id] = pages; }
|
|
655
|
+
heldDepth = depth;
|
|
656
|
+
const held = ++holds;
|
|
657
|
+
holding = held;
|
|
658
|
+
for (const id of order) {
|
|
659
|
+
groups.set(id, idleGroup(byId.get(id)!));
|
|
660
|
+
sourceGeneration.set(id, (sourceGeneration.get(id) ?? 0) + 1);
|
|
661
|
+
}
|
|
662
|
+
const run = (async () => {
|
|
663
|
+
try {
|
|
664
|
+
await fanOut(order, depth);
|
|
665
|
+
} finally {
|
|
666
|
+
if (holding === held) { holding = 0; heldDepth = {}; emit(); }
|
|
667
|
+
}
|
|
668
|
+
})();
|
|
669
|
+
revalidation = run;
|
|
670
|
+
await run;
|
|
671
|
+
},
|
|
640
672
|
/** One group's next page. */
|
|
641
673
|
async loadMore(id: unknown): Promise<void> {
|
|
674
|
+
// Tapped while a revalidation re-fetches behind the shown rows: page on from what it lands.
|
|
675
|
+
while (holding && revalidation) await revalidation;
|
|
642
676
|
const adapter = typeof id === "string" ? byId.get(id) : undefined;
|
|
643
677
|
if (!adapter || disposed || !query) return;
|
|
644
678
|
await runSource(adapter, true);
|
|
@@ -117,7 +117,8 @@ const svc = defineService<ServiceFormState, {
|
|
|
117
117
|
stashCopy(arg); // absorb the descriptor's onAppear copy-pack param
|
|
118
118
|
// WS-C — nav-param input is PRIMARY (the canonical form bakes no id); the
|
|
119
119
|
// onAppear `id` param is the #570 suffixed-build fallback.
|
|
120
|
-
|
|
120
|
+
// The held id is for the host's bare refresh only (no argument): an onAppear without an id is a create screen.
|
|
121
|
+
const id = navInputId() || idFrom(arg, arg === undefined ? s.id : "");
|
|
121
122
|
if (!id) return shape({ ...s, status: "error", error: copyParam("ownerServiceForm.errorNoService", "No service to edit.") });
|
|
122
123
|
if (isOwnerPreviewDemo()) {
|
|
123
124
|
const d = DEMO_SERVICES.find((x) => x.id === id);
|