@circle-vibe/shared 1.1.52 → 1.1.54
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/build/index.js +1 -1
- package/build/src/components/dropdown/dropdown.d.ts +1 -0
- package/build/src/components/dropdown/dropdown.js +2 -1
- package/build/src/components/dropdown/dropdown.js.map +1 -1
- package/build/src/components/menu/menu.d.ts +1 -0
- package/build/src/components/menu/menu.js +2 -2
- package/build/src/components/menu/menu.js.map +1 -1
- package/build/src/models/chat-invite.d.ts +8 -0
- package/build/src/models/chat-invite.js +3 -0
- package/build/src/models/chat-invite.js.map +1 -0
- package/build/src/models/index.d.ts +1 -0
- package/build/src/models/index.js +1 -0
- package/build/src/models/index.js.map +1 -1
- package/build/src/models/user-shortest.d.ts +6 -0
- package/build/src/models/user-shortest.js +3 -0
- package/build/src/models/user-shortest.js.map +1 -0
- package/build/src/models/user.d.ts +3 -1
- package/build/src/utils/compose-avatar-fallback/compose-avatar-fallback.js +1 -1
- package/build/src/utils/compose-avatar-fallback/compose-avatar-fallback.js.map +1 -1
- package/build/src/utils/get-user-full-name/get-user-full-name.d.ts +6 -0
- package/build/src/utils/get-user-full-name/get-user-full-name.js +12 -0
- package/build/src/utils/get-user-full-name/get-user-full-name.js.map +1 -0
- package/build/src/utils/get-user-full-name/index.d.ts +1 -0
- package/build/src/utils/get-user-full-name/index.js +18 -0
- package/build/src/utils/get-user-full-name/index.js.map +1 -0
- package/build/src/utils/index.d.ts +1 -0
- package/build/src/utils/index.js +1 -0
- package/build/src/utils/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ interface DropdownProps {
|
|
|
8
8
|
readonly transitionStyles?: StyleHTMLAttributes<HTMLDivElement>;
|
|
9
9
|
readonly dropdownProps?: Record<string, unknown>;
|
|
10
10
|
readonly zIndex?: number;
|
|
11
|
+
readonly backgroundColor?: string;
|
|
11
12
|
readonly fullDropdownWidth?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export declare const Dropdown: ExtendedReactFunctionalComponent<DropdownProps>;
|
|
@@ -7,7 +7,7 @@ exports.Dropdown = void 0;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const dropdown_portal_1 = require("./dropdown-portal/dropdown-portal");
|
|
9
9
|
require("./dropdown.scss");
|
|
10
|
-
const Dropdown = ({ open, children, dropdownProps, transitionStyles, useOverlayDarkenBackground, zIndex = 10, fullDropdownWidth = false, ...props }) => {
|
|
10
|
+
const Dropdown = ({ open, children, dropdownProps, transitionStyles, useOverlayDarkenBackground, backgroundColor = 'var(--cv-light)', zIndex = 10, fullDropdownWidth = false, ...props }) => {
|
|
11
11
|
if (!open) {
|
|
12
12
|
return null;
|
|
13
13
|
}
|
|
@@ -15,6 +15,7 @@ const Dropdown = ({ open, children, dropdownProps, transitionStyles, useOverlayD
|
|
|
15
15
|
react_1.default.createElement("div", { style: {
|
|
16
16
|
zIndex: open ? zIndex : 1,
|
|
17
17
|
width: fullDropdownWidth ? '100%' : 'auto',
|
|
18
|
+
backgroundColor,
|
|
18
19
|
...transitionStyles,
|
|
19
20
|
}, ...props, ...dropdownProps },
|
|
20
21
|
react_1.default.createElement("div", { className: "dropdown p-3 flex" }, children))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../../../src/components/dropdown/dropdown.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAmD;AACnD,uEAAmE;AAGnE,2BAAyB;
|
|
1
|
+
{"version":3,"file":"dropdown.js","sourceRoot":"","sources":["../../../../src/components/dropdown/dropdown.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAmD;AACnD,uEAAmE;AAGnE,2BAAyB;AAalB,MAAM,QAAQ,GAAoD,CAAC,EACxE,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,0BAA0B,EAC1B,eAAe,GAAG,iBAAiB,EACnC,MAAM,GAAG,EAAE,EACX,iBAAiB,GAAG,KAAK,EACzB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,8BAAC,gCAAc,IAAC,0BAA0B,EAAE,0BAA0B;QACpE,uCACE,KAAK,EAAE;gBACL,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBACzB,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;gBAC1C,eAAe;gBACf,GAAG,gBAAgB;aACpB,KACG,KAAK,KACL,aAAa;YAEjB,uCAAK,SAAS,EAAC,mBAAmB,IAAE,QAAQ,CAAO,CAC/C,CACS,CAClB,CAAC;AACJ,CAAC,CAAC;AA/BW,QAAA,QAAQ,YA+BnB"}
|
|
@@ -9,6 +9,7 @@ interface DropdownMenuProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
9
9
|
readonly onOpenChange?: (open: boolean) => void;
|
|
10
10
|
readonly dropdownPlacement?: Placement;
|
|
11
11
|
readonly zIndex?: number;
|
|
12
|
+
readonly backgroundColorOfContent?: string;
|
|
12
13
|
readonly strategy?: "fixed" | "absolute";
|
|
13
14
|
}
|
|
14
15
|
export declare const Menu: ExtendedReactFunctionalComponent<DropdownMenuProps>;
|
|
@@ -9,7 +9,7 @@ const classnames_1 = __importDefault(require("classnames"));
|
|
|
9
9
|
const menu_context_1 = require("./menu.context");
|
|
10
10
|
const hooks_1 = require("src/hooks");
|
|
11
11
|
const dropdown_1 = require("../dropdown");
|
|
12
|
-
const Menu = ({ button, isOpen, fullDropdownWidth = false, onOpenChange, dropdownPlacement = "bottom-end", zIndex = 10, strategy = "absolute", children, ...divAttributes }) => {
|
|
12
|
+
const Menu = ({ button, isOpen, fullDropdownWidth = false, onOpenChange, dropdownPlacement = "bottom-end", zIndex = 10, backgroundColorOfContent = 'var(--cv-light)', strategy = "absolute", children, ...divAttributes }) => {
|
|
13
13
|
const { referenceProps, open, contentProps, setStatus, transitionStyles } = (0, hooks_1.useDropdown)({
|
|
14
14
|
...(isOpen !== undefined && onOpenChange
|
|
15
15
|
? { open: isOpen, onOpenChange }
|
|
@@ -26,7 +26,7 @@ const Menu = ({ button, isOpen, fullDropdownWidth = false, onOpenChange, dropdow
|
|
|
26
26
|
react_1.default.createElement("div", { className: "cursor-pointer", ...referenceProps }, button({
|
|
27
27
|
active: open,
|
|
28
28
|
})),
|
|
29
|
-
react_1.default.createElement(dropdown_1.Dropdown, { open: open, dropdownProps: contentProps, transitionStyles: transitionStyles, zIndex: zIndex, fullDropdownWidth: fullDropdownWidth }, children))));
|
|
29
|
+
react_1.default.createElement(dropdown_1.Dropdown, { open: open, dropdownProps: contentProps, transitionStyles: transitionStyles, zIndex: zIndex, backgroundColor: backgroundColorOfContent, fullDropdownWidth: fullDropdownWidth }, children))));
|
|
30
30
|
};
|
|
31
31
|
exports.Menu = Menu;
|
|
32
32
|
//# sourceMappingURL=menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../../../../src/components/menu/menu.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4DAAoC;AAIpC,iDAA6C;AAC7C,qCAAwC;AACxC,0CAAuC;
|
|
1
|
+
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../../../../src/components/menu/menu.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,4DAAoC;AAIpC,iDAA6C;AAC7C,qCAAwC;AACxC,0CAAuC;AAchC,MAAM,IAAI,GAAwD,CAAC,EACxE,MAAM,EACN,MAAM,EACN,iBAAiB,GAAG,KAAK,EACzB,YAAY,EACZ,iBAAiB,GAAG,YAAY,EAChC,MAAM,GAAG,EAAE,EACX,wBAAwB,GAAG,iBAAiB,EAC5C,QAAQ,GAAG,UAAU,EACrB,QAAQ,EACR,GAAG,aAAa,EACjB,EAAE,EAAE;IACH,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,GACvE,IAAA,mBAAW,EAAC;QACV,GAAG,CAAC,MAAM,KAAK,SAAS,IAAI,YAAY;YACtC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE;YAChC,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAC;IAEL,MAAM,SAAS,GAAG,GAAG,EAAE;QACrB,IAAI,CAAC,YAAY,EAAE;YACjB,OAAO;SACR;QAED,SAAS,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO,CACL,8BAAC,0BAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,SAAS,EAAE;QACxC,uCACE,SAAS,EAAE,IAAA,oBAAU,EAAC,UAAU,EAAE,GAAG,CAAC,aAAa,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC,KAClE,aAAa;YAEjB,uCAAK,SAAS,EAAC,gBAAgB,KAAK,cAAc,IAC/C,MAAM,CAAC;gBACN,MAAM,EAAE,IAAI;aACb,CAAC,CACE;YAEN,8BAAC,mBAAQ,IACP,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,YAAY,EAC3B,gBAAgB,EAAE,gBAAgB,EAClC,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,wBAAwB,EACzC,iBAAiB,EAAE,iBAAiB,IAEnC,QAAQ,CACA,CACP,CACe,CACxB,CAAC;AACJ,CAAC,CAAC;AApDW,QAAA,IAAI,QAoDf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-invite.js","sourceRoot":"","sources":["../../../src/models/chat-invite.ts"],"names":[],"mappings":""}
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./user"), exports);
|
|
18
|
+
__exportStar(require("./user-shortest"), exports);
|
|
18
19
|
__exportStar(require("./file"), exports);
|
|
19
20
|
__exportStar(require("./message"), exports);
|
|
20
21
|
__exportStar(require("./chat"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,yCAAuB;AACvB,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,uDAAqC;AACrC,qDAAmC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,kDAAgC;AAChC,yCAAuB;AACvB,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,uDAAqC;AACrC,qDAAmC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-shortest.js","sourceRoot":"","sources":["../../../src/models/user-shortest.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { UserChatStatus, UserRole, UserType } from
|
|
1
|
+
import { UserChatStatus, UserRole, UserType } from 'src/enums';
|
|
2
2
|
export interface User {
|
|
3
3
|
id: number;
|
|
4
4
|
username: string;
|
|
5
|
+
firstname: string;
|
|
5
6
|
surname: string;
|
|
6
7
|
birthDate: Date;
|
|
7
8
|
password: string;
|
|
8
9
|
avatarUrl: string;
|
|
9
10
|
avatarUrlOptimized: string;
|
|
10
11
|
isHiddenContactInfo: boolean;
|
|
12
|
+
isAllowedToSearch: boolean;
|
|
11
13
|
country: string;
|
|
12
14
|
city: string;
|
|
13
15
|
email: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.composeAvatarFallback = void 0;
|
|
4
|
-
const composeAvatarFallback = (user) => [user.
|
|
4
|
+
const composeAvatarFallback = (user) => [user.firstname, user.surname]
|
|
5
5
|
.filter(Boolean)
|
|
6
6
|
.map((line) => line.charAt(0))
|
|
7
7
|
.join("")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compose-avatar-fallback.js","sourceRoot":"","sources":["../../../../src/utils/compose-avatar-fallback/compose-avatar-fallback.ts"],"names":[],"mappings":";;;AAEO,MAAM,qBAAqB,GAAG,CAAC,IAAU,EAAE,EAAE,CAClD,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"compose-avatar-fallback.js","sourceRoot":"","sources":["../../../../src/utils/compose-avatar-fallback/compose-avatar-fallback.ts"],"names":[],"mappings":";;;AAEO,MAAM,qBAAqB,GAAG,CAAC,IAAU,EAAE,EAAE,CAClD,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC;KAC3B,MAAM,CAAC,OAAO,CAAC;KACf,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KAC7B,IAAI,CAAC,EAAE,CAAC;KACR,WAAW,EAAE,CAAC;AALN,QAAA,qBAAqB,yBAKf"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUserFullName = void 0;
|
|
4
|
+
const getUserFullName = (user) => {
|
|
5
|
+
if (!user) {
|
|
6
|
+
return '';
|
|
7
|
+
}
|
|
8
|
+
const { firstname, surname } = user;
|
|
9
|
+
return [firstname, surname].filter(Boolean).join(" ");
|
|
10
|
+
};
|
|
11
|
+
exports.getUserFullName = getUserFullName;
|
|
12
|
+
//# sourceMappingURL=get-user-full-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-user-full-name.js","sourceRoot":"","sources":["../../../../src/utils/get-user-full-name/get-user-full-name.ts"],"names":[],"mappings":";;;AAKO,MAAM,eAAe,GAAG,CAAC,IAAmB,EAAE,EAAE;IACrD,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,EAAE,CAAC;KACX;IAED,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAEpC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxD,CAAC,CAAA;AARY,QAAA,eAAe,mBAQ3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-user-full-name';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-user-full-name"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utils/get-user-full-name/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC"}
|
package/build/src/utils/index.js
CHANGED
|
@@ -19,4 +19,5 @@ __exportStar(require("./is-formik-field-required"), exports);
|
|
|
19
19
|
__exportStar(require("./get-formik-form-control-error"), exports);
|
|
20
20
|
__exportStar(require("./is-token-expired"), exports);
|
|
21
21
|
__exportStar(require("./compose-avatar-fallback"), exports);
|
|
22
|
+
__exportStar(require("./get-user-full-name"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,6DAA2C;AAC3C,kEAAgD;AAChD,qDAAmC;AACnC,4DAA0C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,6DAA2C;AAC3C,kEAAgD;AAChD,qDAAmC;AACnC,4DAA0C;AAC1C,uDAAqC"}
|