@hotwired/turbo 7.0.0-rc.5 → 7.1.0-rc.2
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/CHANGELOG.md +3 -0
- package/README.md +0 -2
- package/dist/turbo.es2017-esm.js +272 -70
- package/dist/turbo.es2017-umd.js +273 -70
- package/dist/types/core/drive/form_submission.d.ts +3 -0
- package/dist/types/core/drive/page_view.d.ts +2 -2
- package/dist/types/core/drive/visit.d.ts +6 -0
- package/dist/types/core/frames/frame_controller.d.ts +8 -3
- package/dist/types/core/frames/frame_redirector.d.ts +1 -0
- package/dist/types/core/index.d.ts +1 -0
- package/dist/types/core/renderer.d.ts +2 -1
- package/dist/types/core/session.d.ts +1 -1
- package/dist/types/core/url.d.ts +2 -0
- package/dist/types/elements/frame_element.d.ts +2 -0
- package/dist/types/polyfills/index.d.ts +1 -0
- package/dist/types/tests/functional/drive_disabled_tests.d.ts +2 -0
- package/dist/types/tests/functional/drive_tests.d.ts +1 -0
- package/dist/types/tests/functional/form_submission_tests.d.ts +29 -3
- package/dist/types/tests/functional/frame_tests.d.ts +23 -1
- package/dist/types/tests/functional/navigation_tests.d.ts +4 -2
- package/dist/types/util.d.ts +3 -0
- package/package.json +7 -2
- package/dist/turbo.es2017-esm.js.map +0 -1
- package/dist/turbo.es2017-umd.js.map +0 -1
- package/dist/turbo.es5-umd.js +0 -3954
- package/dist/turbo.es5-umd.js.map +0 -1
|
@@ -36,6 +36,7 @@ export declare class FormSubmission {
|
|
|
36
36
|
readonly mustRedirect: boolean;
|
|
37
37
|
state: FormSubmissionState;
|
|
38
38
|
result?: FormSubmissionResult;
|
|
39
|
+
static confirmMethod(message: string, element: HTMLFormElement): boolean;
|
|
39
40
|
constructor(delegate: FormSubmissionDelegate, formElement: HTMLFormElement, submitter?: HTMLElement, mustRedirect?: boolean);
|
|
40
41
|
get method(): FetchMethod;
|
|
41
42
|
get action(): string;
|
|
@@ -44,6 +45,8 @@ export declare class FormSubmission {
|
|
|
44
45
|
get enctype(): FormEnctype;
|
|
45
46
|
get isIdempotent(): boolean;
|
|
46
47
|
get stringFormData(): [string, string][];
|
|
48
|
+
get confirmationMessage(): string | null;
|
|
49
|
+
get needsConfirmation(): boolean;
|
|
47
50
|
start(): Promise<void | FetchResponse>;
|
|
48
51
|
stop(): true | undefined;
|
|
49
52
|
prepareHeadersForRequest(headers: FetchRequestHeaders, request: FetchRequest): void;
|
|
@@ -10,10 +10,10 @@ declare type PageViewRenderer = PageRenderer | ErrorRenderer;
|
|
|
10
10
|
export declare class PageView extends View<Element, PageSnapshot, PageViewRenderer, PageViewDelegate> {
|
|
11
11
|
readonly snapshotCache: SnapshotCache;
|
|
12
12
|
lastRenderedLocation: URL;
|
|
13
|
-
renderPage(snapshot: PageSnapshot, isPreview?: boolean): Promise<void>;
|
|
13
|
+
renderPage(snapshot: PageSnapshot, isPreview?: boolean, willRender?: boolean): Promise<void>;
|
|
14
14
|
renderError(snapshot: PageSnapshot): Promise<void>;
|
|
15
15
|
clearSnapshotCache(): void;
|
|
16
|
-
cacheSnapshot(): Promise<
|
|
16
|
+
cacheSnapshot(): Promise<PageSnapshot | undefined>;
|
|
17
17
|
getCachedSnapshotForLocation(location: URL): PageSnapshot | undefined;
|
|
18
18
|
get snapshot(): PageSnapshot;
|
|
19
19
|
get shouldCacheSnapshot(): boolean;
|
|
@@ -2,6 +2,7 @@ import { Adapter } from "../native/adapter";
|
|
|
2
2
|
import { FetchRequest, FetchRequestDelegate } from "../../http/fetch_request";
|
|
3
3
|
import { FetchResponse } from "../../http/fetch_response";
|
|
4
4
|
import { History } from "./history";
|
|
5
|
+
import { Snapshot } from "../snapshot";
|
|
5
6
|
import { PageSnapshot } from "./page_snapshot";
|
|
6
7
|
import { Action } from "../types";
|
|
7
8
|
import { PageView } from "./page_view";
|
|
@@ -36,9 +37,12 @@ export declare type VisitOptions = {
|
|
|
36
37
|
referrer?: URL;
|
|
37
38
|
snapshotHTML?: string;
|
|
38
39
|
response?: VisitResponse;
|
|
40
|
+
visitCachedSnapshot(snapshot: Snapshot): void;
|
|
41
|
+
willRender: boolean;
|
|
39
42
|
};
|
|
40
43
|
export declare type VisitResponse = {
|
|
41
44
|
statusCode: number;
|
|
45
|
+
redirected: boolean;
|
|
42
46
|
responseHTML?: string;
|
|
43
47
|
};
|
|
44
48
|
export declare enum SystemStatusCode {
|
|
@@ -53,6 +57,8 @@ export declare class Visit implements FetchRequestDelegate {
|
|
|
53
57
|
readonly action: Action;
|
|
54
58
|
readonly referrer?: URL;
|
|
55
59
|
readonly timingMetrics: TimingMetrics;
|
|
60
|
+
readonly visitCachedSnapshot: (snapshot: Snapshot) => void;
|
|
61
|
+
readonly willRender: boolean;
|
|
56
62
|
followedRedirect: boolean;
|
|
57
63
|
frame?: number;
|
|
58
64
|
historyChanged: boolean;
|
|
@@ -16,6 +16,8 @@ export declare class FrameController implements AppearanceObserverDelegate, Fetc
|
|
|
16
16
|
readonly formInterceptor: FormInterceptor;
|
|
17
17
|
currentURL?: string | null;
|
|
18
18
|
formSubmission?: FormSubmission;
|
|
19
|
+
fetchResponseLoaded: (fetchResponse: FetchResponse) => void;
|
|
20
|
+
private currentFetchRequest;
|
|
19
21
|
private resolveVisitPromise;
|
|
20
22
|
private connected;
|
|
21
23
|
private hasBeenLoaded;
|
|
@@ -31,7 +33,7 @@ export declare class FrameController implements AppearanceObserverDelegate, Fetc
|
|
|
31
33
|
elementAppearedInViewport(element: Element): void;
|
|
32
34
|
shouldInterceptLinkClick(element: Element, url: string): boolean;
|
|
33
35
|
linkClickIntercepted(element: Element, url: string): void;
|
|
34
|
-
shouldInterceptFormSubmission(element: HTMLFormElement, submitter?:
|
|
36
|
+
shouldInterceptFormSubmission(element: HTMLFormElement, submitter?: HTMLElement): boolean;
|
|
35
37
|
formSubmissionIntercepted(element: HTMLFormElement, submitter?: HTMLElement): void;
|
|
36
38
|
prepareHeadersForRequest(headers: FetchRequestHeaders, request: FetchRequest): void;
|
|
37
39
|
requestStarted(request: FetchRequest): void;
|
|
@@ -40,18 +42,20 @@ export declare class FrameController implements AppearanceObserverDelegate, Fetc
|
|
|
40
42
|
requestFailedWithResponse(request: FetchRequest, response: FetchResponse): void;
|
|
41
43
|
requestErrored(request: FetchRequest, error: Error): void;
|
|
42
44
|
requestFinished(request: FetchRequest): void;
|
|
43
|
-
formSubmissionStarted(
|
|
45
|
+
formSubmissionStarted({ formElement }: FormSubmission): void;
|
|
44
46
|
formSubmissionSucceededWithResponse(formSubmission: FormSubmission, response: FetchResponse): void;
|
|
45
47
|
formSubmissionFailedWithResponse(formSubmission: FormSubmission, fetchResponse: FetchResponse): void;
|
|
46
48
|
formSubmissionErrored(formSubmission: FormSubmission, error: Error): void;
|
|
47
|
-
formSubmissionFinished(
|
|
49
|
+
formSubmissionFinished({ formElement }: FormSubmission): void;
|
|
48
50
|
allowsImmediateRender(snapshot: Snapshot, resume: (value: any) => void): boolean;
|
|
49
51
|
viewRenderedSnapshot(snapshot: Snapshot, isPreview: boolean): void;
|
|
50
52
|
viewInvalidated(): void;
|
|
51
53
|
private visit;
|
|
52
54
|
private navigateFrame;
|
|
55
|
+
private proposeVisitIfNavigatedWithAction;
|
|
53
56
|
private findFrameElement;
|
|
54
57
|
extractForeignFrameElement(container: ParentNode): Promise<FrameElement>;
|
|
58
|
+
private formActionIsVisitable;
|
|
55
59
|
private shouldInterceptNavigation;
|
|
56
60
|
get id(): string;
|
|
57
61
|
get enabled(): boolean;
|
|
@@ -62,4 +66,5 @@ export declare class FrameController implements AppearanceObserverDelegate, Fetc
|
|
|
62
66
|
get loadingStyle(): FrameLoadingStyle;
|
|
63
67
|
get isLoading(): boolean;
|
|
64
68
|
get isActive(): boolean;
|
|
69
|
+
get rootLocation(): URL;
|
|
65
70
|
}
|
|
@@ -11,6 +11,7 @@ export declare class FrameRedirector implements LinkInterceptorDelegate, FormInt
|
|
|
11
11
|
linkClickIntercepted(element: Element, url: string): void;
|
|
12
12
|
shouldInterceptFormSubmission(element: HTMLFormElement, submitter?: HTMLElement): boolean;
|
|
13
13
|
formSubmissionIntercepted(element: HTMLFormElement, submitter?: HTMLElement): void;
|
|
14
|
+
private shouldSubmit;
|
|
14
15
|
private shouldRedirect;
|
|
15
16
|
private findFrameElement;
|
|
16
17
|
}
|
|
@@ -17,3 +17,4 @@ export declare function disconnectStreamSource(source: StreamSource): void;
|
|
|
17
17
|
export declare function renderStreamMessage(message: StreamMessage | string): void;
|
|
18
18
|
export declare function clearCache(): void;
|
|
19
19
|
export declare function setProgressBarDelay(delay: number): void;
|
|
20
|
+
export declare function setConfirmMethod(confirmMethod: (message: string, element: HTMLFormElement) => boolean): void;
|
|
@@ -3,9 +3,10 @@ export declare abstract class Renderer<E extends Element, S extends Snapshot<E>
|
|
|
3
3
|
readonly currentSnapshot: S;
|
|
4
4
|
readonly newSnapshot: S;
|
|
5
5
|
readonly isPreview: boolean;
|
|
6
|
+
readonly willRender: boolean;
|
|
6
7
|
readonly promise: Promise<void>;
|
|
7
8
|
private resolvingFunctions?;
|
|
8
|
-
constructor(currentSnapshot: S, newSnapshot: S, isPreview: boolean);
|
|
9
|
+
constructor(currentSnapshot: S, newSnapshot: S, isPreview: boolean, willRender?: boolean);
|
|
9
10
|
get shouldRender(): boolean;
|
|
10
11
|
prepareToRender(): void;
|
|
11
12
|
abstract render(): Promise<void>;
|
|
@@ -82,6 +82,6 @@ export declare class Session implements FormSubmitObserverDelegate, HistoryDeleg
|
|
|
82
82
|
notifyApplicationAfterFrameRender(fetchResponse: FetchResponse, frame: FrameElement): CustomEvent<any>;
|
|
83
83
|
elementDriveEnabled(element?: Element): boolean;
|
|
84
84
|
getActionForLink(link: Element): Action;
|
|
85
|
-
|
|
85
|
+
getTargetFrameForLink(link: Element): string | undefined;
|
|
86
86
|
get snapshot(): PageSnapshot;
|
|
87
87
|
}
|
package/dist/types/core/url.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export declare type Locatable = URL | string;
|
|
2
2
|
export declare function expandURL(locatable: Locatable): URL;
|
|
3
3
|
export declare function getAnchor(url: URL): string | undefined;
|
|
4
|
+
export declare function getAction(form: HTMLFormElement, submitter?: HTMLElement): URL;
|
|
4
5
|
export declare function getExtension(url: URL): string;
|
|
5
6
|
export declare function isHTML(url: URL): boolean;
|
|
6
7
|
export declare function isPrefixedBy(baseURL: URL, url: URL): boolean;
|
|
8
|
+
export declare function locationIsVisitable(location: URL, rootLocation: URL): boolean;
|
|
7
9
|
export declare function getRequestURL(url: URL): string;
|
|
8
10
|
export declare function toCacheKey(url: URL): string;
|
|
9
11
|
export declare function urlsAreEqual(left: string, right: string): boolean;
|
|
@@ -10,7 +10,9 @@ export interface FrameElementDelegate {
|
|
|
10
10
|
sourceURLChanged(): void;
|
|
11
11
|
disabledChanged(): void;
|
|
12
12
|
formSubmissionIntercepted(element: HTMLFormElement, submitter?: HTMLElement): void;
|
|
13
|
+
linkClickIntercepted(element: Element, url: string): void;
|
|
13
14
|
loadResponse(response: FetchResponse): void;
|
|
15
|
+
fetchResponseLoaded: (fetchResponse: FetchResponse) => void;
|
|
14
16
|
isLoading: boolean;
|
|
15
17
|
}
|
|
16
18
|
export declare class FrameElement extends HTMLElement {
|
|
@@ -4,4 +4,6 @@ export declare class DriveDisabledTests extends TurboDriveTestCase {
|
|
|
4
4
|
setup(): Promise<void>;
|
|
5
5
|
"test drive disabled by default; click normal link"(): Promise<void>;
|
|
6
6
|
"test drive disabled by default; click link inside data-turbo='true'"(): Promise<void>;
|
|
7
|
+
"test drive disabled by default; submit form inside data-turbo='true'"(): Promise<void>;
|
|
8
|
+
get formSubmitted(): Promise<boolean>;
|
|
7
9
|
}
|
|
@@ -3,5 +3,6 @@ export declare class DriveTests extends TurboDriveTestCase {
|
|
|
3
3
|
path: string;
|
|
4
4
|
setup(): Promise<void>;
|
|
5
5
|
"test drive enabled by default; click normal link"(): Promise<void>;
|
|
6
|
+
"test drive to external link"(): Promise<void>;
|
|
6
7
|
"test drive enabled by default; click link inside data-turbo='false'"(): Promise<void>;
|
|
7
8
|
}
|
|
@@ -2,9 +2,16 @@ import { TurboDriveTestCase } from "../helpers/turbo_drive_test_case";
|
|
|
2
2
|
export declare class FormSubmissionTests extends TurboDriveTestCase {
|
|
3
3
|
setup(): Promise<void>;
|
|
4
4
|
"test standard form submission renders a progress bar"(): Promise<void>;
|
|
5
|
+
"test form submission with confirmation confirmed"(): Promise<void>;
|
|
6
|
+
"test form submission with confirmation cancelled"(): Promise<void>;
|
|
7
|
+
"test from submission with confirmation overriden"(): Promise<void>;
|
|
5
8
|
"test standard form submission does not render a progress bar before expiring the delay"(): Promise<void>;
|
|
6
9
|
"test standard form submission with redirect response"(): Promise<void>;
|
|
10
|
+
"test standard POST form submission events"(): Promise<void>;
|
|
11
|
+
"test standard POST form submission toggles submitter [disabled] attribute"(): Promise<void>;
|
|
7
12
|
"test standard GET form submission"(): Promise<void>;
|
|
13
|
+
"test standard GET form submission events"(): Promise<void>;
|
|
14
|
+
"test standard GET form submission toggles submitter [disabled] attribute"(): Promise<void>;
|
|
8
15
|
"test standard GET form submission appending keys"(): Promise<void>;
|
|
9
16
|
"test standard form submission with empty created response"(): Promise<void>;
|
|
10
17
|
"test standard form submission with empty no-content response"(): Promise<void>;
|
|
@@ -25,11 +32,15 @@ export declare class FormSubmissionTests extends TurboDriveTestCase {
|
|
|
25
32
|
"test submitter POST submission from submitter with data-turbo-frame"(): Promise<void>;
|
|
26
33
|
"test frame form GET submission from submitter with data-turbo-frame=_top"(): Promise<void>;
|
|
27
34
|
"test frame form POST submission from submitter with data-turbo-frame=_top"(): Promise<void>;
|
|
35
|
+
"test frame POST form targetting frame submission"(): Promise<void>;
|
|
36
|
+
"test frame POST form targetting frame toggles submitter's [disabled] attribute"(): Promise<void>;
|
|
37
|
+
"test frame GET form targetting frame submission"(): Promise<void>;
|
|
38
|
+
"test frame GET form targetting frame toggles submitter's [disabled] attribute"(): Promise<void>;
|
|
28
39
|
"test frame form GET submission from submitter referencing another frame"(): Promise<void>;
|
|
29
40
|
"test frame form POST submission from submitter referencing another frame"(): Promise<void>;
|
|
30
41
|
"test frame form submission with redirect response"(): Promise<void>;
|
|
31
|
-
"test frame form submission toggles the ancestor frame's [busy] attribute"(): Promise<void>;
|
|
32
|
-
"test frame form submission toggles the target frame's [busy] attribute"(): Promise<void>;
|
|
42
|
+
"test frame form submission toggles the ancestor frame's [aria-busy] attribute"(): Promise<void>;
|
|
43
|
+
"test frame form submission toggles the target frame's [aria-busy] attribute"(): Promise<void>;
|
|
33
44
|
"test frame form submission with empty created response"(): Promise<void>;
|
|
34
45
|
"test frame form submission with empty no-content response"(): Promise<void>;
|
|
35
46
|
"test frame form submission within a frame submits the Turbo-Frame header"(): Promise<void>;
|
|
@@ -43,11 +54,26 @@ export declare class FormSubmissionTests extends TurboDriveTestCase {
|
|
|
43
54
|
"test form submission with [data-turbo=false] on the submitter"(): Promise<void>;
|
|
44
55
|
"test form submission skipped within method=dialog"(): Promise<void>;
|
|
45
56
|
"test form submission skipped with submitter formmethod=dialog"(): Promise<void>;
|
|
57
|
+
"test form submission targetting frame skipped within method=dialog"(): Promise<void>;
|
|
58
|
+
"test form submission targetting frame skipped with submitter formmethod=dialog"(): Promise<void>;
|
|
46
59
|
"test form submission targets disabled frame"(): Promise<void>;
|
|
47
60
|
"test form submission targeting a frame submits the Turbo-Frame header"(): Promise<void>;
|
|
48
61
|
"test link method form submission inside frame"(): Promise<void>;
|
|
62
|
+
"test link method form submission inside frame with data-turbo-frame=_top"(): Promise<void>;
|
|
63
|
+
"test link method form submission inside frame with data-turbo-frame target"(): Promise<void>;
|
|
64
|
+
"test stream link method form submission inside frame"(): Promise<void>;
|
|
65
|
+
"test link method form submission within form inside frame"(): Promise<void>;
|
|
66
|
+
"test link method form submission inside frame with confirmation confirmed"(): Promise<void>;
|
|
67
|
+
"test link method form submission inside frame with confirmation cancelled"(): Promise<void>;
|
|
49
68
|
"test link method form submission outside frame"(): Promise<void>;
|
|
69
|
+
"test stream link method form submission outside frame"(): Promise<void>;
|
|
70
|
+
"test link method form submission within form outside frame"(): Promise<void>;
|
|
71
|
+
"test stream link method form submission within form outside frame"(): Promise<void>;
|
|
50
72
|
"test turbo:before-fetch-request fires on the form element"(): Promise<void>;
|
|
51
73
|
"test turbo:before-fetch-response fires on the form element"(): Promise<void>;
|
|
52
|
-
|
|
74
|
+
"test POST to external action ignored"(): Promise<void>;
|
|
75
|
+
"test POST to external action within frame ignored"(): Promise<void>;
|
|
76
|
+
"test POST to external action targetting frame ignored"(): Promise<void>;
|
|
77
|
+
get formSubmitStarted(): Promise<boolean>;
|
|
78
|
+
get formSubmitEnded(): Promise<boolean>;
|
|
53
79
|
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { TurboDriveTestCase } from "../helpers/turbo_drive_test_case";
|
|
2
2
|
export declare class FrameTests extends TurboDriveTestCase {
|
|
3
3
|
setup(): Promise<void>;
|
|
4
|
+
"test navigating a frame a second time does not leak event listeners"(): Promise<void>;
|
|
4
5
|
"test following a link preserves the current <turbo-frame> element's attributes"(): Promise<void>;
|
|
5
6
|
"test a frame whose src references itself does not infinitely loop"(): Promise<void>;
|
|
6
|
-
"test following a link driving a frame toggles the [busy] attribute"(): Promise<void>;
|
|
7
|
+
"test following a link driving a frame toggles the [aria-busy=true] attribute"(): Promise<void>;
|
|
7
8
|
"test following a link to a page without a matching frame results in an empty frame"(): Promise<void>;
|
|
8
9
|
"test following a link within a frame with a target set navigates the target frame"(): Promise<void>;
|
|
10
|
+
"test following a link in rapid succession cancels the previous request"(): Promise<void>;
|
|
9
11
|
"test following a link within a descendant frame whose ancestor declares a target set navigates the descendant frame"(): Promise<void>;
|
|
10
12
|
"test following a link that declares data-turbo-frame within a frame whose ancestor respects the override"(): Promise<void>;
|
|
13
|
+
"test following a form within a nested frame with form target top"(): Promise<void>;
|
|
14
|
+
"test following a form within a nested frame with child frame target top"(): Promise<void>;
|
|
11
15
|
"test following a link within a frame with target=_top navigates the page"(): Promise<void>;
|
|
12
16
|
"test following a link that declares data-turbo-frame='_self' within a frame with target=_top navigates the frame itself"(): Promise<void>;
|
|
13
17
|
"test following a link to a page with a <turbo-frame recurse> which lazily loads a matching frame"(): Promise<void>;
|
|
@@ -17,14 +21,32 @@ export declare class FrameTests extends TurboDriveTestCase {
|
|
|
17
21
|
"test does not evaluate data-turbo-eval=false scripts"(): Promise<void>;
|
|
18
22
|
"test redirecting in a form is still navigatable after redirect"(): Promise<void>;
|
|
19
23
|
"test 'turbo:frame-render' is triggered after frame has finished rendering"(): Promise<void>;
|
|
24
|
+
"test navigating a frame fires events"(): Promise<void>;
|
|
20
25
|
"test following inner link reloads frame on every click"(): Promise<void>;
|
|
21
26
|
"test following outer link reloads frame on every click"(): Promise<void>;
|
|
22
27
|
"test following outer form reloads frame on every submit"(): Promise<void>;
|
|
23
28
|
"test an inner/outer link reloads frame on every click"(): Promise<void>;
|
|
24
29
|
"test an inner/outer form reloads frame on every submit"(): Promise<void>;
|
|
25
30
|
"test reconnecting after following a link does not reload the frame"(): Promise<void>;
|
|
31
|
+
"test navigating pushing URL state from a frame navigation fires events"(): Promise<void>;
|
|
32
|
+
"test navigating a frame with a form[method=get] that does not redirect still updates the [src]"(): Promise<void>;
|
|
33
|
+
"test navigating turbo-frame[data-turbo-action=advance] from within pushes URL state"(): Promise<void>;
|
|
34
|
+
"test navigating turbo-frame[data-turbo-action=advance] to the same URL clears the [aria-busy] and [data-turbo-preview] state"(): Promise<void>;
|
|
35
|
+
"test navigating a turbo-frame with an a[data-turbo-action=advance] preserves page state"(): Promise<void>;
|
|
36
|
+
"test a turbo-frame that has been driven by a[data-turbo-action] can be navigated normally"(): Promise<void>;
|
|
37
|
+
"test navigating turbo-frame from within with a[data-turbo-action=advance] pushes URL state"(): Promise<void>;
|
|
38
|
+
"test navigating frame with a[data-turbo-action=advance] pushes URL state"(): Promise<void>;
|
|
39
|
+
"test navigating frame with form[method=get][data-turbo-action=advance] pushes URL state"(): Promise<void>;
|
|
40
|
+
"test navigating frame with form[method=get][data-turbo-action=advance] to the same URL clears the [aria-busy] and [data-turbo-preview] state"(): Promise<void>;
|
|
41
|
+
"test navigating frame with form[method=post][data-turbo-action=advance] pushes URL state"(): Promise<void>;
|
|
42
|
+
"test navigating frame with form[method=post][data-turbo-action=advance] to the same URL clears the [aria-busy] and [data-turbo-preview] state"(): Promise<void>;
|
|
43
|
+
"test navigating frame with button[data-turbo-action=advance] pushes URL state"(): Promise<void>;
|
|
44
|
+
"test navigating back after pushing URL state from a turbo-frame[data-turbo-action=advance] restores the frames previous contents"(): Promise<void>;
|
|
45
|
+
"test navigating back then forward after pushing URL state from a turbo-frame[data-turbo-action=advance] restores the frames next contents"(): Promise<void>;
|
|
26
46
|
"test turbo:before-fetch-request fires on the frame element"(): Promise<void>;
|
|
27
47
|
"test turbo:before-fetch-response fires on the frame element"(): Promise<void>;
|
|
48
|
+
withoutChangingEventListenersCount(callback: () => void): Promise<void>;
|
|
49
|
+
fillInSelector(selector: string, value: string): Promise<void>;
|
|
28
50
|
get frameScriptEvaluationCount(): Promise<number | undefined>;
|
|
29
51
|
}
|
|
30
52
|
declare global {
|
|
@@ -8,8 +8,10 @@ export declare class NavigationTests extends TurboDriveTestCase {
|
|
|
8
8
|
"test following a same-origin unannotated custom element link"(): Promise<void>;
|
|
9
9
|
"test following a same-origin unannotated form[method=GET]"(): Promise<void>;
|
|
10
10
|
"test following a same-origin data-turbo-action=replace link"(): Promise<void>;
|
|
11
|
-
"test following a same-origin data-turbo-action=replace
|
|
12
|
-
"test following a same-origin form
|
|
11
|
+
"test following a same-origin GET form[data-turbo-action=replace]"(): Promise<void>;
|
|
12
|
+
"test following a same-origin GET form button[data-turbo-action=replace]"(): Promise<void>;
|
|
13
|
+
"test following a same-origin POST form[data-turbo-action=replace]"(): Promise<void>;
|
|
14
|
+
"test following a same-origin POST form button[data-turbo-action=replace]"(): Promise<void>;
|
|
13
15
|
"test following a same-origin data-turbo=false link"(): Promise<void>;
|
|
14
16
|
"test following a same-origin unannotated link inside a data-turbo=false container"(): Promise<void>;
|
|
15
17
|
"test following a same-origin data-turbo=true link inside a data-turbo=false container"(): Promise<void>;
|
package/dist/types/util.d.ts
CHANGED
|
@@ -10,3 +10,6 @@ export declare function nextMicrotask(): Promise<void>;
|
|
|
10
10
|
export declare function parseHTMLDocument(html?: string): Document;
|
|
11
11
|
export declare function unindent(strings: TemplateStringsArray, ...values: any[]): string;
|
|
12
12
|
export declare function uuid(): string;
|
|
13
|
+
export declare function getAttribute(attributeName: string, ...elements: (Element | undefined)[]): string | null;
|
|
14
|
+
export declare function markAsBusy(...elements: Element[]): void;
|
|
15
|
+
export declare function clearBusyState(...elements: Element[]): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hotwired/turbo",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.1.0-rc.2",
|
|
4
4
|
"description": "The speed of a single-page web application without having to write any JavaScript",
|
|
5
5
|
"module": "dist/turbo.es2017-esm.js",
|
|
6
6
|
"main": "dist/turbo.es2017-umd.js",
|
|
@@ -20,7 +20,12 @@
|
|
|
20
20
|
"browser",
|
|
21
21
|
"pushstate"
|
|
22
22
|
],
|
|
23
|
-
"author": "
|
|
23
|
+
"author": "Basecamp, LLC",
|
|
24
|
+
"contributors": [
|
|
25
|
+
"Jeffrey Hardy <jeff@basecamp.com>",
|
|
26
|
+
"Javan Makhmali <javan@javan.us>",
|
|
27
|
+
"Sam Stephenson <sstephenson@gmail.com>"
|
|
28
|
+
],
|
|
24
29
|
"license": "MIT",
|
|
25
30
|
"bugs": {
|
|
26
31
|
"url": "https://github.com/hotwired/turbo/issues"
|