@cakemail-org/ui-components-v2 2.2.102 → 2.2.104
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/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/scopePicker/index.d.ts +8 -0
- package/dist/cjs/components/scopePicker/scopeGroups.d.ts +21 -0
- package/dist/cjs/components/scopePicker/types.d.ts +1 -0
- package/dist/cjs/components/textField/types.d.ts +1 -1
- package/dist/cjs/data/theme/MuiTextField.d.ts +27 -0
- package/dist/cjs/factories/index.d.ts +1 -0
- package/dist/cjs/factories/personalAccessTokens/index.d.ts +22 -0
- package/dist/cjs/factories/personalAccessTokens/types.d.ts +1 -0
- package/dist/cjs/index.js +470 -4
- package/dist/cjs/models/index.d.ts +1 -0
- package/dist/cjs/models/personalAccessToken/index.d.ts +21 -0
- package/dist/cjs/models/personalAccessToken/types.d.ts +10 -0
- package/dist/cjs/services/index.d.ts +1 -0
- package/dist/cjs/services/personalAccessTokens/index.d.ts +24 -0
- package/dist/cjs/services/personalAccessTokens/types.d.ts +1 -0
- package/dist/cjs/utils/posthog.d.ts +5 -1
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/scopePicker/index.d.ts +8 -0
- package/dist/esm/components/scopePicker/scopeGroups.d.ts +21 -0
- package/dist/esm/components/scopePicker/types.d.ts +1 -0
- package/dist/esm/components/textField/types.d.ts +1 -1
- package/dist/esm/data/theme/MuiTextField.d.ts +27 -0
- package/dist/esm/factories/index.d.ts +1 -0
- package/dist/esm/factories/personalAccessTokens/index.d.ts +22 -0
- package/dist/esm/factories/personalAccessTokens/types.d.ts +1 -0
- package/dist/esm/index.js +464 -6
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/personalAccessToken/index.d.ts +21 -0
- package/dist/esm/models/personalAccessToken/types.d.ts +10 -0
- package/dist/esm/services/index.d.ts +1 -0
- package/dist/esm/services/personalAccessTokens/index.d.ts +24 -0
- package/dist/esm/services/personalAccessTokens/types.d.ts +1 -0
- package/dist/esm/utils/posthog.d.ts +5 -1
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type TScopePicker = {
|
|
3
|
+
value: string[];
|
|
4
|
+
onChange: (scopes: string[]) => void;
|
|
5
|
+
isPartner?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function ScopePicker({ value, onChange, isPartner, disabled }: TScopePicker): React.JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type TScopeAction = "read" | "write" | "delete" | "send" | "import" | "export" | "admin";
|
|
2
|
+
export type TScopeResource = {
|
|
3
|
+
resource: string;
|
|
4
|
+
label: string;
|
|
5
|
+
actions: TScopeAction[];
|
|
6
|
+
};
|
|
7
|
+
export type TScopeCategory = {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
adminOnly: boolean;
|
|
11
|
+
resources: TScopeResource[];
|
|
12
|
+
};
|
|
13
|
+
export declare const SCOPE_IMPLICATIONS: Record<string, string[]>;
|
|
14
|
+
export declare const SCOPE_CATEGORIES: TScopeCategory[];
|
|
15
|
+
export type TScopePreset = {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
scopes: string[];
|
|
19
|
+
};
|
|
20
|
+
export declare function getCategoryScopes(categoryId: string): string[];
|
|
21
|
+
export declare const SCOPE_PRESETS: TScopePreset[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TScopePicker } from ".";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseTextFieldProps } from "@mui/material";
|
|
2
2
|
import { ChangeEventHandler } from "react";
|
|
3
3
|
import { TIconName } from "../icon/types";
|
|
4
|
-
export interface TTextField extends Omit<BaseTextFieldProps, "onMouseUp" | "FormHelperTextProps" | "fullWidth" | "select" | "margin" | "component" | "InputLabelProps" | "SelectProps" | "classes" | "
|
|
4
|
+
export interface TTextField extends Omit<BaseTextFieldProps, "onMouseUp" | "FormHelperTextProps" | "fullWidth" | "select" | "margin" | "component" | "InputLabelProps" | "SelectProps" | "classes" | "color"> {
|
|
5
5
|
onChange?: TTextFieldChange;
|
|
6
6
|
labelTooltipText?: string;
|
|
7
7
|
useBareBoneInput?: boolean;
|
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
import { Theme } from "@mui/material";
|
|
2
2
|
export default function getMuiTextField(theme: Theme): {
|
|
3
|
+
variants: ({
|
|
4
|
+
props: {
|
|
5
|
+
size: string;
|
|
6
|
+
};
|
|
7
|
+
style: {
|
|
8
|
+
".MuiInputBase-root > input, .MuiInputBase-root > textarea": {
|
|
9
|
+
padding: string;
|
|
10
|
+
fontSize: import("csstype").Property.FontSize<string | number> | undefined;
|
|
11
|
+
lineHeight: import("csstype").Property.LineHeight<string | number> | undefined;
|
|
12
|
+
};
|
|
13
|
+
".MuiSvgIcon-root": {
|
|
14
|
+
top: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
} | {
|
|
18
|
+
props: {
|
|
19
|
+
size: string;
|
|
20
|
+
};
|
|
21
|
+
style: {
|
|
22
|
+
".MuiInputBase-root > input, .MuiInputBase-root > textarea": {
|
|
23
|
+
padding: string;
|
|
24
|
+
fontSize?: undefined;
|
|
25
|
+
lineHeight?: undefined;
|
|
26
|
+
};
|
|
27
|
+
".MuiSvgIcon-root"?: undefined;
|
|
28
|
+
};
|
|
29
|
+
})[];
|
|
3
30
|
styleOverrides: {
|
|
4
31
|
root: {
|
|
5
32
|
".MuiInputLabel-root": {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PersonalAccessTokenModel } from "../../models/personalAccessToken";
|
|
2
|
+
import { TGenericListReturn } from "../../types";
|
|
3
|
+
export declare class PersonalAccessTokensFactory {
|
|
4
|
+
static list({ page, perPage, status }?: {
|
|
5
|
+
page?: number;
|
|
6
|
+
perPage?: number;
|
|
7
|
+
status?: string;
|
|
8
|
+
}): Promise<TGenericListReturn<PersonalAccessTokenModel>>;
|
|
9
|
+
static get({ keyPrefix }: {
|
|
10
|
+
keyPrefix: string;
|
|
11
|
+
}): Promise<PersonalAccessTokenModel>;
|
|
12
|
+
static create({ name, scopes, expiresAt, allowedAccountIds }: {
|
|
13
|
+
name: string;
|
|
14
|
+
scopes: string[];
|
|
15
|
+
expiresAt?: number | null;
|
|
16
|
+
allowedAccountIds?: string[] | null;
|
|
17
|
+
}): Promise<{
|
|
18
|
+
pat: PersonalAccessTokenModel;
|
|
19
|
+
plaintext: string;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
22
|
+
export * from "./types";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|