@bigbinary/neeto-molecules 1.0.12 → 1.0.14

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.
Files changed (49) hide show
  1. package/README.md +1 -0
  2. package/dist/Columns.cjs.js +1 -1
  3. package/dist/Columns.js +1 -1
  4. package/dist/CustomDomain.cjs.js +2 -2
  5. package/dist/CustomDomain.js +2 -2
  6. package/dist/DateRangeFilter.cjs.js +1 -1
  7. package/dist/DateRangeFilter.js +1 -1
  8. package/dist/IpRestriction.cjs.js +1 -1
  9. package/dist/IpRestriction.js +1 -1
  10. package/dist/LoginPage.cjs.js +1 -1
  11. package/dist/LoginPage.js +1 -1
  12. package/dist/MenuBar.cjs.js +9 -9
  13. package/dist/MenuBar.js +9 -9
  14. package/dist/NeetoWidget.cjs.js +3 -3
  15. package/dist/NeetoWidget.js +3 -3
  16. package/dist/Schedule.cjs.js +1 -1
  17. package/dist/Schedule.js +1 -1
  18. package/dist/Scrollable.cjs.js +6 -0
  19. package/dist/Scrollable.js +6 -0
  20. package/dist/Sidebar.cjs.js +1 -30
  21. package/dist/Sidebar.js +1 -30
  22. package/dist/TimeFormat.cjs.js +1 -1
  23. package/dist/TimeFormat.js +1 -1
  24. package/dist/TimezoneMismatchModal.cjs.js +1 -1
  25. package/dist/TimezoneMismatchModal.js +1 -1
  26. package/package.json +8 -5
  27. package/src/translations/en.json +24 -1
  28. package/types/BrowserSupport.d.ts +40 -3
  29. package/types/Columns.d.ts +66 -3
  30. package/types/Container.d.ts +31 -3
  31. package/types/CustomDomain.d.ts +30 -4
  32. package/types/DateRangeFilter.d.ts +40 -5
  33. package/types/DynamicVariables.d.ts +32 -5
  34. package/types/EmailPreview.d.ts +37 -3
  35. package/types/ErrorPage.d.ts +14 -3
  36. package/types/IpRestriction.d.ts +21 -3
  37. package/types/KeyboardShortcuts.d.ts +84 -5
  38. package/types/LoginPage.d.ts +36 -3
  39. package/types/MenuBar.d.ts +116 -8
  40. package/types/NeetoWidget.d.ts +24 -5
  41. package/types/PageLoader.d.ts +35 -4
  42. package/types/PublishBlock.d.ts +57 -5
  43. package/types/Schedule.d.ts +126 -3
  44. package/types/Scrollable.d.ts +28 -0
  45. package/types/ShareViaEmail.d.ts +73 -4
  46. package/types/ShareViaLink.d.ts +63 -3
  47. package/types/Sidebar.d.ts +27 -4
  48. package/types/TimeFormat.d.ts +14 -2
  49. package/types/TimezoneMismatchModal.d.ts +34 -3
@@ -1,5 +1,71 @@
1
1
  import React from "react";
2
-
2
+ /**
3
+ *
4
+ * A common component to share entities via email.
5
+ *
6
+ * ![ShareViaLink](https://user-images.githubusercontent.com/66865722/223617875-02359942-e008-4612-b64c-867673545d0e.png|height=200|width=300)
7
+ *
8
+ * Simple:
9
+ *
10
+ * @example
11
+ *
12
+ * import React from "react";
13
+ * import ShareViaEmail from "@bigbinary/neeto-molecules/ShareViaEmail";
14
+ * import { Scrollable } from "@bigbinary/neetoui/layouts";
15
+ *
16
+ * const ShareViaEmail = () => {
17
+ * const handleSubmit = () => {
18
+ * //api call
19
+ * };
20
+ *
21
+ * return (
22
+ * <Scrollable className="flex w-full flex-col p-0">
23
+ * <ShareViaEmail
24
+ * backToUrl="/home/share"
25
+ * handleSubmit={handleSubmit}
26
+ * description="Share form via email"
27
+ * />
28
+ * </Scrollable>
29
+ * );
30
+ * };
31
+ * export default ShareViaEmail;
32
+ * @endexample
33
+ * With children and EmailPreview props:
34
+ *
35
+ * @example
36
+ *
37
+ * import React, {useState} from "react";
38
+ * import ShareViaEmail from "@bigbinary/neeto-molecules/ShareViaEmail";
39
+ * import { Scrollable } from "@bigbinary/neetoui/layouts";
40
+ *
41
+ * const ShareViaEmail = () => {
42
+ * const [startButtonText, setStartButtonText] = useState("")
43
+ *
44
+ * const handleSubmit = () => {
45
+ * //custom validations and API call
46
+ * };
47
+ *
48
+ * const StartButtonText => (
49
+ * //input field
50
+ * )
51
+ *
52
+ * return (
53
+ * <Scrollable className="flex w-full flex-col p-0">
54
+ * <ShareViaEmail
55
+ * backToUrl="/home/share"
56
+ * handleSubmit={handleSubmit}
57
+ * actionButtonText={startButtonText}
58
+ * productName="Form"
59
+ * >
60
+ * <StartButtonText />
61
+ * {other children components}
62
+ * </ShareViaEmail>
63
+ * </Scrollable>
64
+ * );
65
+ * };
66
+ * export default ShareViaEmail;
67
+ * @endexample
68
+ */
3
69
  const ShareViaEmail: React.FC<{
4
70
  backToUrl?: string;
5
71
  children?: React.ReactNode;
@@ -13,7 +79,11 @@ const ShareViaEmail: React.FC<{
13
79
  handleSubmit: (data: {
14
80
  sendFromEmail: string;
15
81
  replyToEmail: string;
16
- notifyEmails: { label: string; value: string; valid: boolean }[];
82
+ notifyEmails: {
83
+ label: string;
84
+ value: string;
85
+ valid: boolean;
86
+ }[];
17
87
  emailSubject: string;
18
88
  emailBody: string;
19
89
  isSendLaterEnabled: boolean;
@@ -21,5 +91,4 @@ const ShareViaEmail: React.FC<{
21
91
  category: string;
22
92
  }) => void;
23
93
  }>;
24
-
25
- export default ShareViaEmail;
94
+ export default ShareViaEmail;
@@ -1,5 +1,66 @@
1
1
  import React from "react";
2
-
2
+ /**
3
+ *
4
+ * A common component to share the link in multiple ways.
5
+ *
6
+ * ![ShareViaLink](https://user-images.githubusercontent.com/54279092/220558650-b00669cf-1b59-4fff-8b21-10d12f801939.png|height=200|width=300)
7
+ *
8
+ * Regenerate URL enabled
9
+ *
10
+ * @example
11
+ *
12
+ * import { useRegenerateUrl } from "hooks/reactQuery/useQuizzesApi";
13
+ * import ShareViaLink from "@bigbinary/neeto-molecules/ShareViaLink";
14
+ *
15
+ * const Share = ({ quiz }) => {
16
+ * const { mutate: regenerateURL, isLoading: isRegenerating } =
17
+ * useRegenerateUrl();
18
+ *
19
+ * return (
20
+ * <ShareViaLink
21
+ * enableRegenerateUrl
22
+ * entity={quiz}
23
+ * entityName="quiz"
24
+ * handleRegenerate={regenerateURL}
25
+ * isRegenerating={isRegenerating}
26
+ * socialMediaPostTitle="Hi, can you please attend this quiz?"
27
+ * url={quizUrl}
28
+ * />
29
+ * );
30
+ * };
31
+ * @endexample
32
+ * Regenerate URL disabled
33
+ *
34
+ * @example
35
+ *
36
+ * import ShareViaLink from "@bigbinary/neeto-molecules/ShareViaLink";
37
+ *
38
+ * const Share = ({ quiz }) => (
39
+ * <ShareViaLink
40
+ * entity={quiz}
41
+ * entityName="quiz"
42
+ * socialMediaPostTitle="Hi, can you please attend this quiz?"
43
+ * url={quizUrl}
44
+ * />
45
+ * );
46
+ * @endexample
47
+ * With preview URL
48
+ *
49
+ * @example
50
+ *
51
+ * import ShareViaLink from "@bigbinary/neeto-molecules/ShareViaLink";
52
+ *
53
+ * const Share = ({ quiz }) => (
54
+ * <ShareViaLink
55
+ * entity={quiz}
56
+ * entityName="quiz"
57
+ * previewUrl={quizPreviewUrl}
58
+ * socialMediaPostTitle="Hi, can you please attend this quiz?"
59
+ * url={quizUrl}
60
+ * />
61
+ * );
62
+ * @endexample
63
+ */
3
64
  const ShareViaLink: React.FC<{
4
65
  isRegenerating?: boolean;
5
66
  enableRegenerateUrl?: boolean;
@@ -13,5 +74,4 @@ const ShareViaLink: React.FC<{
13
74
  socialMediaPostTitle: string;
14
75
  url: string;
15
76
  }>;
16
-
17
- export default ShareViaLink;
77
+ export default ShareViaLink;
@@ -1,8 +1,32 @@
1
1
  import React from "react";
2
-
3
2
  import { AvatarProps } from "@bigbinary/neetoui";
4
3
  import { LinkType, NavLinkItemType } from "@bigbinary/neetoui/layouts";
5
-
4
+ /**
5
+ *
6
+ * Used in neeto products for showing options like: settings, profile, whats new,
7
+ *
8
+ * app switcher etc. App switcher UI & Changelog display UI are all implemented
9
+ *
10
+ * internally in this component.
11
+ *
12
+ * ![image](https://user-images.githubusercontent.com/29166133/220422846-7cb06cd1-396c-4f5e-b493-531c96c70e43.png|height=200|width=300)
13
+ *
14
+ * @example
15
+ *
16
+ * import Sidebar from "@bigbinary/neeto-molecules/Sidebar";
17
+ * import { SIDEBAR_LINKS } from "components/constants";
18
+ *
19
+ * const SidebarContainer = ({ children }) => {
20
+ * // custom app logic
21
+ * return (
22
+ * <div>
23
+ * <Sidebar appName="invisible" navLinks={SIDEBAR_LINKS} />
24
+ * {children}
25
+ * </div>
26
+ * );
27
+ * };
28
+ * @endexample
29
+ */
6
30
  const Sidebar: React.FC<{
7
31
  navLinks: NavLinkItemType[];
8
32
  appName: string;
@@ -24,5 +48,4 @@ const Sidebar: React.FC<{
24
48
  extraTopLinks?: LinkType[];
25
49
  showAppSwitcher?: boolean;
26
50
  }>;
27
-
28
- export default Sidebar;
51
+ export default Sidebar;
@@ -1,5 +1,17 @@
1
- import DateFormat from "@bigbinary/neeto-molecules/DateFormat";
1
+ import React from "react";
2
2
 
3
- const TimeFormat = DateFormat;
3
+ import { TooltipProps, TypographyProps } from "@bigbinary/neetoui";
4
+ import {
5
+ timeFormat,
6
+ DateTimeType,
7
+ } from "@bigbinary/neeto-commons-frontend/utils";
8
+
9
+ const TimeFormat: {
10
+ [key in Capitalize<keyof typeof timeFormat>]: React.FC<{
11
+ date: DateTimeType;
12
+ typographyProps?: Partial<TypographyProps>;
13
+ tooltipProps?: Partial<TooltipProps>;
14
+ }>;
15
+ };
4
16
 
5
17
  export default TimeFormat;
@@ -1,8 +1,39 @@
1
1
  import React from "react";
2
-
2
+ /**
3
+ *
4
+ * A modal to show when the user's timezone is different from the timezone of the
5
+ *
6
+ * browser. The user can choose to continue with the users timezone or update the
7
+ *
8
+ * user timezone to the browsers's timezone.
9
+ *
10
+ * @example
11
+ *
12
+ * import TimezoneMismatchModal from "@bigbinary/neeto-molecules/TimezoneMismatchModal";
13
+ *
14
+ * const App = () => (
15
+ * <div>
16
+ * <TimezoneMismatchModal />
17
+ * </div>
18
+ * );
19
+ * @endexample
20
+ * To control the visibility of the modal, use the isOpen prop. You can also pass
21
+ *
22
+ * a callback to the onClose prop to be called when the modal is closed. Usage:
23
+ *
24
+ * @example
25
+ *
26
+ * import TimezoneMismatchModal from "@bigbinary/neeto-molecules/TimezoneMismatchModal";
27
+ *
28
+ * const App = () => (
29
+ * <div>
30
+ * <TimezoneMismatchModal isOpen={true} onClose={() => {}} />
31
+ * </div>
32
+ * );
33
+ * @endexample
34
+ */
3
35
  const TimezoneMismatchModal: React.FC<{
4
36
  isOpen?: boolean;
5
37
  onClose?: Function;
6
38
  }>;
7
-
8
- export default TimezoneMismatchModal;
39
+ export default TimezoneMismatchModal;