@pontive/pontkit-core 1.31.0 → 1.32.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-member-management/components/members-panel.d.ts +6 -1
- package/dist/components/widgets/pont-member-management/components/role-options.d.ts +11 -0
- package/dist/components/widgets/pont-member-management/errors.d.ts +10 -2
- package/dist/i18n/messages.d.ts +1 -1
- package/dist/index.js +244 -243
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1144 -1116
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { Member } from '../../../../types';
|
|
2
|
+
import { AssignableRole, Member } from '../../../../types';
|
|
3
3
|
export type MemberFilters = {
|
|
4
4
|
roles: string[];
|
|
5
5
|
};
|
|
@@ -20,6 +20,11 @@ export declare class MemberManagementMembersPanel extends LitElement {
|
|
|
20
20
|
rowsPerPage: number;
|
|
21
21
|
/** Whether the session may change roles and remove members. */
|
|
22
22
|
canManage: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The organization's roles, each marked with whether the caller may assign
|
|
25
|
+
* or remove it: what decides which rows offer which actions.
|
|
26
|
+
*/
|
|
27
|
+
assignableRoles: AssignableRole[];
|
|
23
28
|
/** The signed-in user, whose own roles are not theirs to change. */
|
|
24
29
|
currentUserId: string;
|
|
25
30
|
private _searchDebounceTimer;
|
|
@@ -7,3 +7,14 @@ import { AssignableRole } from '../../../../types';
|
|
|
7
7
|
* which is exactly what the server would refuse (role_ceiling).
|
|
8
8
|
*/
|
|
9
9
|
export declare function roleOptions(roles: AssignableRole[]): BadgeOption[];
|
|
10
|
+
/** Whether the caller may assign or remove any of the organization's roles. */
|
|
11
|
+
export declare function mayAssignAny(roles: AssignableRole[]): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Whether the caller may remove a member holding `memberRoles`. Removing a
|
|
14
|
+
* member takes every role they hold, each held to the same ceiling as a role
|
|
15
|
+
* change (pontive-spec 41 §6), so one role the caller may not remove — `owner`
|
|
16
|
+
* without the right to transfer ownership, or one carrying permissions they do
|
|
17
|
+
* not hold — keeps the member. A role missing from `roles` is left to the
|
|
18
|
+
* server.
|
|
19
|
+
*/
|
|
20
|
+
export declare function mayRemoveMember(memberRoles: string[], roles: AssignableRole[]): boolean;
|
|
@@ -18,7 +18,15 @@ export declare function memberScopesRequested(): boolean;
|
|
|
18
18
|
* console.
|
|
19
19
|
*/
|
|
20
20
|
export declare function describeLoadError(error: unknown): LoadProblem;
|
|
21
|
-
/**
|
|
22
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Why an action failed, in the person's words; `fallback` when no better one.
|
|
23
|
+
*
|
|
24
|
+
* A 403 the widget has no message for is "You don't have permission to manage
|
|
25
|
+
* this organization's members" only when the session indeed holds no member
|
|
26
|
+
* write scope (`mayWrite`, read from the management token when not given).
|
|
27
|
+
* Someone who can manage members was refused this one change, so they are
|
|
28
|
+
* told that instead (member_change_refused).
|
|
29
|
+
*/
|
|
30
|
+
export declare function describeActionError(error: unknown, fallback: MessageCode, mayWrite?: boolean): string;
|
|
23
31
|
/** The server refused a role change because the roles moved meanwhile. */
|
|
24
32
|
export declare function isRolesChanged(error: unknown): boolean;
|
package/dist/i18n/messages.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
|
17
17
|
* the catalog's English; the catalog wins wherever they differ, since that is
|
|
18
18
|
* what arrives.
|
|
19
19
|
*/
|
|
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" | "member_management_title" | "member_management_subtitle" | "tab_members" | "tab_invitations" | "members_unavailable" | "members_forbidden" | "members_load_failed" | "members_no_organization" | "action_retry" | "action_refresh" | "search_members" | "search_invitations" | "search_roles" | "field_roles" | "all_roles" | "clear_filters" | "column_name" | "column_joined" | "column_invited_by" | "column_sent" | "column_expires" | "members_empty" | "invitations_empty" | "rows_per_page" | "actions_menu" | "unknown_user" | "manage_roles" | "manage_roles_subtitle" | "roles_locked_hint" | "roles_required" | "update_roles_failed" | "self_role_change" | "role_ceiling" | "member_roles_changed" | "remove_member" | "remove_member_confirm" | "remove_member_warning" | "remove_member_failed" | "resend_invitation" | "resend_invitation_confirm" | "resend_invitation_failed" | "revoke_invitation" | "revoke_invitation_confirm" | "revoke_invitation_warning" | "revoke_invitation_failed" | "invite_members" | "invite_members_subtitle" | "invite_emails_label" | "invite_emails_placeholder" | "invite_emails_required" | "invite_roles_hint" | "invite_message_label" | "invite_message_placeholder" | "send_invitations" | "sending_invitations" | "invite_failed";
|
|
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" | "member_management_title" | "member_management_subtitle" | "tab_members" | "tab_invitations" | "members_unavailable" | "members_forbidden" | "members_load_failed" | "members_no_organization" | "action_retry" | "action_refresh" | "search_members" | "search_invitations" | "search_roles" | "field_roles" | "all_roles" | "clear_filters" | "column_name" | "column_joined" | "column_invited_by" | "column_sent" | "column_expires" | "members_empty" | "invitations_empty" | "rows_per_page" | "actions_menu" | "unknown_user" | "manage_roles" | "manage_roles_subtitle" | "roles_locked_hint" | "roles_required" | "update_roles_failed" | "self_role_change" | "role_ceiling" | "member_roles_changed" | "owner_transfer_required" | "leave_disabled" | "member_change_refused" | "remove_member" | "remove_member_confirm" | "remove_member_warning" | "remove_member_failed" | "resend_invitation" | "resend_invitation_confirm" | "resend_invitation_failed" | "revoke_invitation" | "revoke_invitation_confirm" | "revoke_invitation_warning" | "revoke_invitation_failed" | "invite_members" | "invite_members_subtitle" | "invite_emails_label" | "invite_emails_placeholder" | "invite_emails_required" | "invite_roles_hint" | "invite_message_label" | "invite_message_placeholder" | "send_invitations" | "sending_invitations" | "invite_failed";
|
|
21
21
|
/**
|
|
22
22
|
* Record a set the server sent: a flow response's (sign-in text) or the
|
|
23
23
|
* widget-messages read (the signed-in widgets' text). Sets merge, since the two
|