@pontive/pontkit-core 1.23.0 → 1.24.1
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/catalog.json +1 -1
- package/custom-elements.json +1 -1
- package/dist/components/widgets/pont-account-menu/pont-account-menu.d.ts +1 -0
- package/dist/components/widgets/pont-account-settings/pont-account-settings.d.ts +1 -0
- package/dist/components/widgets/pont-account-settings/profile/components/account-info.d.ts +1 -0
- package/dist/components/widgets/pont-account-settings/profile/components/location-info.d.ts +1 -0
- package/dist/components/widgets/pont-account-settings/profile/components/personal-info.d.ts +1 -0
- package/dist/components/widgets/pont-account-settings/profile/components/urls-info.d.ts +1 -0
- package/dist/components/widgets/pont-account-settings/security-settings/security-settings.d.ts +1 -0
- package/dist/components/widgets/pont-account-settings/sidebar/sidebar.d.ts +1 -0
- package/dist/components/widgets/pont-organization-switcher/pont-organization-switcher.d.ts +1 -0
- package/dist/components/wrappers/pont-provider/pont-provider.d.ts +6 -0
- package/dist/i18n/messages.d.ts +35 -4
- package/dist/index.js +624 -625
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6012 -5900
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +10 -0
- package/package.json +1 -1
|
@@ -29,6 +29,7 @@ export declare class PontUserSnippet extends LitElement {
|
|
|
29
29
|
render(): TemplateResult<1>;
|
|
30
30
|
}
|
|
31
31
|
export declare class PontAccountMenu extends LitElement {
|
|
32
|
+
private readonly _messages;
|
|
32
33
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
33
34
|
accountSettingsPath: string;
|
|
34
35
|
menuItems: MenuItem[];
|
|
@@ -2,6 +2,7 @@ import { LitElement } from 'lit';
|
|
|
2
2
|
import { USER_ACCOUNT_SETTINGS_MODE, USER_ACCOUNT_SETTINGS_ORIENTATION, USER_ACCOUNT_SETTINGS_SIDEBAR_DISPLAY_TYPE, USER_ACCOUNT_SETTINGS_WIDGETS_LAYOUT, IProfileContentCustomizations } from '../../../types';
|
|
3
3
|
import { AuthState } from '../../../context';
|
|
4
4
|
export declare class PontAccountSettings extends LitElement {
|
|
5
|
+
private readonly _messages;
|
|
5
6
|
showAvatarMenu: boolean;
|
|
6
7
|
orientation: USER_ACCOUNT_SETTINGS_ORIENTATION;
|
|
7
8
|
mobileDisplay: USER_ACCOUNT_SETTINGS_SIDEBAR_DISPLAY_TYPE;
|
|
@@ -5,6 +5,7 @@ export interface SidebarConfig {
|
|
|
5
5
|
modalIcon?: TemplateResult;
|
|
6
6
|
}
|
|
7
7
|
export declare class PontProfileSidebar extends LitElement {
|
|
8
|
+
private readonly _messages;
|
|
8
9
|
orientation: USER_ACCOUNT_SETTINGS_ORIENTATION;
|
|
9
10
|
displayType: USER_ACCOUNT_SETTINGS_SIDEBAR_DISPLAY_TYPE;
|
|
10
11
|
mode: USER_ACCOUNT_SETTINGS_MODE;
|
|
@@ -28,6 +28,7 @@ export interface OrganizationChangedDetail {
|
|
|
28
28
|
* reads the new access token from the cookie on the next request.
|
|
29
29
|
*/
|
|
30
30
|
export declare class PontOrganizationSwitcher extends LitElement {
|
|
31
|
+
private readonly _messages;
|
|
31
32
|
protected createRenderRoot(): HTMLElement | DocumentFragment;
|
|
32
33
|
/** Reload the page after a successful switch. */
|
|
33
34
|
reloadOnSwitch: boolean;
|
|
@@ -20,6 +20,12 @@ export declare class PontProvider extends LitElement {
|
|
|
20
20
|
private loadBrandingCss;
|
|
21
21
|
private configureAuth;
|
|
22
22
|
private updateLocaleAndAuth;
|
|
23
|
+
/**
|
|
24
|
+
* The signed-in widgets' own text, in the language negotiated for this
|
|
25
|
+
* instance (GET /auth/v1/widget-messages). Asked once per configuration,
|
|
26
|
+
* signed in or not: a widget mounted later reads what has already arrived.
|
|
27
|
+
*/
|
|
28
|
+
private loadWidgetText;
|
|
23
29
|
updated(changedProperties: PropertyValues): void;
|
|
24
30
|
private handleAuthStateChange;
|
|
25
31
|
/**
|
package/dist/i18n/messages.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
1
2
|
/**
|
|
2
3
|
* What the widget says in its own words — text no widget's markup carries, so
|
|
3
4
|
* no copy overlay can reach it: a connection error, "Start again", an aria
|
|
@@ -16,14 +17,44 @@
|
|
|
16
17
|
* the catalog's English; the catalog wins wherever they differ, since that is
|
|
17
18
|
* what arrives.
|
|
18
19
|
*/
|
|
19
|
-
export type MessageCode = "connection_failed" | "too_many_attempts" | "server_error" | "generic_error" | "flow_ended" | "passkey_cancelled" | "start_again" | "continued_elsewhere_title" | "continued_elsewhere_subtitle" | "continue_here" | "show_password" | "hide_password" | "loading";
|
|
20
|
+
export type MessageCode = "connection_failed" | "too_many_attempts" | "server_error" | "generic_error" | "flow_ended" | "passkey_cancelled" | "start_again" | "continued_elsewhere_title" | "continued_elsewhere_subtitle" | "continue_here" | "show_password" | "hide_password" | "loading" | "account_settings" | "log_out" | "tab_profile" | "tab_security" | "not_added" | "field_email" | "field_phone" | "field_photo" | "field_photo_url" | "avatar_alt" | "change_photo" | "login_info" | "personal_info" | "location_section" | "links_section" | "field_username" | "field_first_name" | "field_middle_name" | "field_last_name" | "field_nickname" | "field_gender" | "field_bio" | "field_location" | "field_timezone" | "field_website" | "select_gender" | "gender_male" | "gender_female" | "gender_other" | "select_timezone" | "timezone_hint" | "username_hint" | "url_hint" | "url_scheme_invalid" | "action_save" | "action_saving" | "action_cancel" | "action_edit" | "action_submit" | "action_submitting" | "photo_update_failed" | "personal_update_failed" | "location_update_failed" | "website_update_failed" | "security_title" | "security_coming_soon" | "security_loading" | "select_organization" | "organization_switch_failed";
|
|
20
21
|
/**
|
|
21
|
-
* Record
|
|
22
|
-
*
|
|
22
|
+
* Record a set the server sent: a flow response's (sign-in text) or the
|
|
23
|
+
* widget-messages read (the signed-in widgets' text). Sets merge, since the two
|
|
24
|
+
* carry different codes for the same language. An empty or missing set changes
|
|
25
|
+
* nothing: a response that carries none (an error, a poll) says nothing about
|
|
23
26
|
* the language having changed.
|
|
24
27
|
*/
|
|
25
|
-
export declare function setMessages(messages?: Record<string, string
|
|
28
|
+
export declare function setMessages(messages?: Record<string, string>, locale?: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* The language the page was last served in, for formatting dates and numbers;
|
|
31
|
+
* undefined until the server has said, which lets Intl use the browser's.
|
|
32
|
+
*/
|
|
33
|
+
export declare function currentLocale(): string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Be told when the server's text arrives, so a widget rendered before it can
|
|
36
|
+
* render again. Returns the unsubscribe.
|
|
37
|
+
*/
|
|
38
|
+
export declare function onMessagesChanged(listener: () => void): () => void;
|
|
26
39
|
/** The text for a code, in the language the page was last served in. */
|
|
27
40
|
export declare function msg(code: MessageCode): string;
|
|
28
41
|
/** Forget what the server sent. For tests. */
|
|
29
42
|
export declare function resetMessages(): void;
|
|
43
|
+
/**
|
|
44
|
+
* Re-renders its host whenever the server's text arrives. Add it to any element
|
|
45
|
+
* that renders msg(): text fetched after the element first rendered would
|
|
46
|
+
* otherwise never reach it.
|
|
47
|
+
*/
|
|
48
|
+
export declare class MessagesController implements ReactiveController {
|
|
49
|
+
private readonly host;
|
|
50
|
+
private unsubscribe?;
|
|
51
|
+
constructor(host: ReactiveControllerHost);
|
|
52
|
+
hostConnected(): void;
|
|
53
|
+
hostDisconnected(): void;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Fetch the signed-in widgets' text for this instance, in the language
|
|
57
|
+
* negotiated from `locales` and the browser's, and record it. Failures are
|
|
58
|
+
* quiet: the widgets keep the text they have.
|
|
59
|
+
*/
|
|
60
|
+
export declare function loadWidgetMessages(authBaseUrl: string, locales?: string): Promise<void>;
|