@bigbinary/neeto-molecules 0.0.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.
Files changed (183) hide show
  1. package/README.md +60 -0
  2. package/dist/BrowserSupport.cjs.js +1727 -0
  3. package/dist/BrowserSupport.cjs.js.map +1 -0
  4. package/dist/BrowserSupport.js +1721 -0
  5. package/dist/BrowserSupport.js.map +1 -0
  6. package/dist/Columns.cjs.js +191 -0
  7. package/dist/Columns.cjs.js.map +1 -0
  8. package/dist/Columns.js +184 -0
  9. package/dist/Columns.js.map +1 -0
  10. package/dist/Container.cjs.js +1277 -0
  11. package/dist/Container.cjs.js.map +1 -0
  12. package/dist/Container.js +1271 -0
  13. package/dist/Container.js.map +1 -0
  14. package/dist/CopyToClipboardButton.cjs.js +78 -0
  15. package/dist/CopyToClipboardButton.cjs.js.map +1 -0
  16. package/dist/CopyToClipboardButton.js +72 -0
  17. package/dist/CopyToClipboardButton.js.map +1 -0
  18. package/dist/CustomDomain.cjs.js +680 -0
  19. package/dist/CustomDomain.cjs.js.map +1 -0
  20. package/dist/CustomDomain.js +654 -0
  21. package/dist/CustomDomain.js.map +1 -0
  22. package/dist/CustomDomainDashboard.cjs.js +2306 -0
  23. package/dist/CustomDomainDashboard.cjs.js.map +1 -0
  24. package/dist/CustomDomainDashboard.js +2279 -0
  25. package/dist/CustomDomainDashboard.js.map +1 -0
  26. package/dist/DateFormat.cjs.js +51 -0
  27. package/dist/DateFormat.cjs.js.map +1 -0
  28. package/dist/DateFormat.js +45 -0
  29. package/dist/DateFormat.js.map +1 -0
  30. package/dist/DateRangeFilter.cjs.js +236 -0
  31. package/dist/DateRangeFilter.cjs.js.map +1 -0
  32. package/dist/DateRangeFilter.js +229 -0
  33. package/dist/DateRangeFilter.js.map +1 -0
  34. package/dist/DynamicVariables.cjs.js +112 -0
  35. package/dist/DynamicVariables.cjs.js.map +1 -0
  36. package/dist/DynamicVariables.js +106 -0
  37. package/dist/DynamicVariables.js.map +1 -0
  38. package/dist/EmailPreview.cjs.js +102 -0
  39. package/dist/EmailPreview.cjs.js.map +1 -0
  40. package/dist/EmailPreview.js +96 -0
  41. package/dist/EmailPreview.js.map +1 -0
  42. package/dist/ErrorPage.cjs.js +208 -0
  43. package/dist/ErrorPage.cjs.js.map +1 -0
  44. package/dist/ErrorPage.js +184 -0
  45. package/dist/ErrorPage.js.map +1 -0
  46. package/dist/Header.cjs.js +219 -0
  47. package/dist/Header.cjs.js.map +1 -0
  48. package/dist/Header.js +213 -0
  49. package/dist/Header.js.map +1 -0
  50. package/dist/IconPicker.cjs.js +1307 -0
  51. package/dist/IconPicker.cjs.js.map +1 -0
  52. package/dist/IconPicker.js +1301 -0
  53. package/dist/IconPicker.js.map +1 -0
  54. package/dist/IntegrationCard.cjs.js +75 -0
  55. package/dist/IntegrationCard.cjs.js.map +1 -0
  56. package/dist/IntegrationCard.js +69 -0
  57. package/dist/IntegrationCard.js.map +1 -0
  58. package/dist/IntegrationDisconnectAlert.cjs.js +81 -0
  59. package/dist/IntegrationDisconnectAlert.cjs.js.map +1 -0
  60. package/dist/IntegrationDisconnectAlert.js +75 -0
  61. package/dist/IntegrationDisconnectAlert.js.map +1 -0
  62. package/dist/IntegrationWalkthroughModal.cjs.js +42 -0
  63. package/dist/IntegrationWalkthroughModal.cjs.js.map +1 -0
  64. package/dist/IntegrationWalkthroughModal.js +36 -0
  65. package/dist/IntegrationWalkthroughModal.js.map +1 -0
  66. package/dist/IpRestriction.cjs.js +3764 -0
  67. package/dist/IpRestriction.cjs.js.map +1 -0
  68. package/dist/IpRestriction.js +3738 -0
  69. package/dist/IpRestriction.js.map +1 -0
  70. package/dist/KeyboardShortcuts.cjs.js +2242 -0
  71. package/dist/KeyboardShortcuts.cjs.js.map +1 -0
  72. package/dist/KeyboardShortcuts.js +2235 -0
  73. package/dist/KeyboardShortcuts.js.map +1 -0
  74. package/dist/LoginPage.cjs.js +618 -0
  75. package/dist/LoginPage.cjs.js.map +1 -0
  76. package/dist/LoginPage.js +593 -0
  77. package/dist/LoginPage.js.map +1 -0
  78. package/dist/MenuBar.cjs.js +31044 -0
  79. package/dist/MenuBar.cjs.js.map +1 -0
  80. package/dist/MenuBar.js +31038 -0
  81. package/dist/MenuBar.js.map +1 -0
  82. package/dist/NeetoWidget.cjs.js +3369 -0
  83. package/dist/NeetoWidget.cjs.js.map +1 -0
  84. package/dist/NeetoWidget.js +3343 -0
  85. package/dist/NeetoWidget.js.map +1 -0
  86. package/dist/PageLoader.cjs.js +158 -0
  87. package/dist/PageLoader.cjs.js.map +1 -0
  88. package/dist/PageLoader.js +134 -0
  89. package/dist/PageLoader.js.map +1 -0
  90. package/dist/PhoneNumber.cjs.js +7021 -0
  91. package/dist/PhoneNumber.cjs.js.map +1 -0
  92. package/dist/PhoneNumber.js +6989 -0
  93. package/dist/PhoneNumber.js.map +1 -0
  94. package/dist/PublishBlock.cjs.js +189 -0
  95. package/dist/PublishBlock.cjs.js.map +1 -0
  96. package/dist/PublishBlock.js +183 -0
  97. package/dist/PublishBlock.js.map +1 -0
  98. package/dist/Rename.cjs.js +306 -0
  99. package/dist/Rename.cjs.js.map +1 -0
  100. package/dist/Rename.js +300 -0
  101. package/dist/Rename.js.map +1 -0
  102. package/dist/ResponsiveDevicePicker.cjs.js +260 -0
  103. package/dist/ResponsiveDevicePicker.cjs.js.map +1 -0
  104. package/dist/ResponsiveDevicePicker.js +254 -0
  105. package/dist/ResponsiveDevicePicker.js.map +1 -0
  106. package/dist/Schedule.cjs.js +952 -0
  107. package/dist/Schedule.cjs.js.map +1 -0
  108. package/dist/Schedule.js +921 -0
  109. package/dist/Schedule.js.map +1 -0
  110. package/dist/Scrollable.cjs.js +184 -0
  111. package/dist/Scrollable.cjs.js.map +1 -0
  112. package/dist/Scrollable.js +178 -0
  113. package/dist/Scrollable.js.map +1 -0
  114. package/dist/ShareViaEmail.cjs.js +2992 -0
  115. package/dist/ShareViaEmail.cjs.js.map +1 -0
  116. package/dist/ShareViaEmail.js +2966 -0
  117. package/dist/ShareViaEmail.js.map +1 -0
  118. package/dist/ShareViaLink.cjs.js +1385 -0
  119. package/dist/ShareViaLink.cjs.js.map +1 -0
  120. package/dist/ShareViaLink.js +1360 -0
  121. package/dist/ShareViaLink.js.map +1 -0
  122. package/dist/Sidebar.cjs.js +32222 -0
  123. package/dist/Sidebar.cjs.js.map +1 -0
  124. package/dist/Sidebar.js +32196 -0
  125. package/dist/Sidebar.js.map +1 -0
  126. package/dist/SubHeader.cjs.js +272 -0
  127. package/dist/SubHeader.cjs.js.map +1 -0
  128. package/dist/SubHeader.js +265 -0
  129. package/dist/SubHeader.js.map +1 -0
  130. package/dist/TableWrapper.cjs.js +87 -0
  131. package/dist/TableWrapper.cjs.js.map +1 -0
  132. package/dist/TableWrapper.js +81 -0
  133. package/dist/TableWrapper.js.map +1 -0
  134. package/dist/ThemeSidebar.cjs.js +13618 -0
  135. package/dist/ThemeSidebar.cjs.js.map +1 -0
  136. package/dist/ThemeSidebar.js +13593 -0
  137. package/dist/ThemeSidebar.js.map +1 -0
  138. package/dist/TimeFormat.cjs.js +53 -0
  139. package/dist/TimeFormat.cjs.js.map +1 -0
  140. package/dist/TimeFormat.js +47 -0
  141. package/dist/TimeFormat.js.map +1 -0
  142. package/dist/TimezoneMismatchModal.cjs.js +176 -0
  143. package/dist/TimezoneMismatchModal.cjs.js.map +1 -0
  144. package/dist/TimezoneMismatchModal.js +168 -0
  145. package/dist/TimezoneMismatchModal.js.map +1 -0
  146. package/package.json +185 -0
  147. package/src/translations/en.json +449 -0
  148. package/types/BrowserSupport.d.ts +86 -0
  149. package/types/Columns.d.ts +53 -0
  150. package/types/Container.d.ts +35 -0
  151. package/types/CopyToClipboardButton.d.ts +21 -0
  152. package/types/CustomDomain.d.ts +19 -0
  153. package/types/CustomDomainDashboard.d.ts +33 -0
  154. package/types/DateFormat.d.ts +18 -0
  155. package/types/DateRangeFilter.d.ts +52 -0
  156. package/types/DynamicVariables.d.ts +45 -0
  157. package/types/EmailPreview.d.ts +41 -0
  158. package/types/ErrorPage.d.ts +15 -0
  159. package/types/Header.d.ts +30 -0
  160. package/types/IconPicker.d.ts +43 -0
  161. package/types/IntegrationCard.d.ts +45 -0
  162. package/types/IntegrationDisconnectAlert.d.ts +37 -0
  163. package/types/IntegrationWalkthroughModal.d.ts +31 -0
  164. package/types/IpRestriction.d.ts +23 -0
  165. package/types/KeyboardShortcuts.d.ts +147 -0
  166. package/types/LoginPage.d.ts +43 -0
  167. package/types/MenuBar.d.ts +125 -0
  168. package/types/NeetoWidget.d.ts +41 -0
  169. package/types/PageLoader.d.ts +38 -0
  170. package/types/PhoneNumber.d.ts +106 -0
  171. package/types/PublishBlock.d.ts +84 -0
  172. package/types/Rename.d.ts +60 -0
  173. package/types/ResponsiveDevicePicker.d.ts +30 -0
  174. package/types/Schedule.d.ts +132 -0
  175. package/types/Scrollable.d.ts +28 -0
  176. package/types/ShareViaEmail.d.ts +99 -0
  177. package/types/ShareViaLink.d.ts +117 -0
  178. package/types/Sidebar.d.ts +63 -0
  179. package/types/SubHeader.d.ts +97 -0
  180. package/types/TableWrapper.d.ts +38 -0
  181. package/types/TimeFormat.d.ts +17 -0
  182. package/types/TimezoneMismatchModal.d.ts +39 -0
  183. package/types/themeSidebar.d.ts +80 -0
@@ -0,0 +1,86 @@
1
+ import React from "react";
2
+ type VersionLimits = {
3
+ softLimit?: number;
4
+ hardLimit?: number;
5
+ };
6
+ /**
7
+ *
8
+ * A wrapper that displays a callout message for partially supported browsers
9
+ *
10
+ * (below a soft limit) along with the site content. If the browser is an
11
+ *
12
+ * unsupported version (below a hard limit), it shows a full-page message to update
13
+ *
14
+ * the browser and does not display the site content. If the browser is in the list
15
+ *
16
+ * of unsupported browsers, it displays a full-page message that the browser is
17
+ *
18
+ * unsupported and does not display the site content.
19
+ *
20
+ * @example
21
+ *
22
+ * import BrowserSupport from "@bigbinary/neeto-molecules/BrowserSupport";
23
+ *
24
+ * const App = () => (
25
+ * <BrowserSupport>
26
+ * {children}
27
+ * </BrowserSupport>
28
+ * <Main />
29
+ * )
30
+ * @endexample
31
+ * Minimum supported browser version of a specific browser can be changed using the
32
+ *
33
+ * overrides prop like so:
34
+ *
35
+ * @example
36
+ *
37
+ * <BrowserSupport
38
+ * overrides={{
39
+ * Chrome: { softLimit: 80, hardLimit: 60 },
40
+ * Safari: { softLimit: 14.1, hardLimit: 13.5 },
41
+ * }}
42
+ * unsupportedBrowsers={["Firefox"]}
43
+ * />
44
+ * @endexample
45
+ * In the above code we have changed the minimum supported versions of Chrome &
46
+ *
47
+ * Safari. Now if a user has accessed the site using Chrome < 80 or Safari < 14.1
48
+ *
49
+ * the callout message will be displayed. If a user has accessed the site using
50
+ *
51
+ * Chrome < 60 or Safari < 13.5, a message will be displayed to update the browser
52
+ *
53
+ * and page contents will not be shown. If a user has accessed the site using any
54
+ *
55
+ * version of Firefox, a message will be displayed that the browser is unsupported
56
+ *
57
+ * and page contents will not be shown.
58
+ *
59
+ * The default supported browser names and their versions are given below:
60
+ *
61
+ * The default unsupported browsers are given below:
62
+ *
63
+ * Any other browser which is not in the above lists will be considered as unknown
64
+ *
65
+ * and a corresponding callout will be shown.
66
+ *
67
+ */
68
+ const BrowserSupport: React.FC<{
69
+ overrides?: {
70
+ Chrome?: VersionLimits;
71
+ MicrosoftEdge?: VersionLimits;
72
+ Firefox?: VersionLimits;
73
+ IE?: VersionLimits;
74
+ Opera?: VersionLimits;
75
+ Safari?: VersionLimits;
76
+ AndroidBrowser?: VersionLimits;
77
+ OperaMini?: VersionLimits;
78
+ ChromeMobile?: VersionLimits;
79
+ FirefoxMobile?: VersionLimits;
80
+ UCBrowser?: VersionLimits;
81
+ SamsungInternet?: VersionLimits;
82
+ };
83
+ unsupportedBrowsers?: string[];
84
+ children?: React.ReactNode | React.ReactNode[];
85
+ }>;
86
+ export default BrowserSupport;
@@ -0,0 +1,53 @@
1
+ import React from "react";
2
+ import { CheckboxProps, DropdownProps, InputProps } from "@bigbinary/neetoui";
3
+ /**
4
+ *
5
+ * It is a helper component that can be used along with the table component to hide
6
+ *
7
+ * and show columns.
8
+ *
9
+ * ![image](https://user-images.githubusercontent.com/32426070/195069324-3cbb4c70-f62b-4080-b4ae-bdeabb449b23.png|height=200|width=300)
10
+ *
11
+ * @example
12
+ *
13
+ * import React, { useState } from "react";
14
+ *
15
+ * import { Table } from "@bigbinary/neetoui";
16
+ * import Columns from "@bigbinary/neeto-molecules/Columns";
17
+ *
18
+ * import { DEFAULT_COLUMNS_DATA, DEFAULT_ROW_DATA } from "./constants";
19
+ *
20
+ * const App = () => {
21
+ * const [columns, setColumns] = useState(DEFAULT_COLUMNS_DATA);
22
+ *
23
+ * return (
24
+ * <div>
25
+ * <Columns
26
+ * columnData={DEFAULT_COLUMNS_DATA}
27
+ * localStorageKey="NEETO_APP_FEATURE_HIDDEN_COLUMNS"
28
+ * onChange={setColumns}
29
+ * />
30
+ * <Table rowData={DEFAULT_ROW_DATA} columnData={columns} />
31
+ * </div>
32
+ * );
33
+ * };
34
+ * @endexample
35
+ */
36
+ const Columns: React.FC<{
37
+ actionBlock?: React.ReactNode;
38
+ checkboxProps?: CheckboxProps;
39
+ columnData: {
40
+ title: string;
41
+ dataIndex: string;
42
+ key: string;
43
+ [key: string]: any;
44
+ }[];
45
+ dropdownProps?: DropdownProps;
46
+ fixedColumns?: string[];
47
+ isSearchable?: boolean;
48
+ localStorageKey: string;
49
+ noColumnMessage?: string;
50
+ onChange: (columns: any[]) => any[];
51
+ searchProps?: InputProps;
52
+ }>;
53
+ export default Columns;
@@ -0,0 +1,35 @@
1
+ import React from "react";
2
+ /**
3
+ *
4
+ * A container component to be used as a wrapper for the page content.
5
+ *
6
+ * @example
7
+ *
8
+ * import Container from "@bigbinary/neeto-molecules/Container";
9
+ *
10
+ * const App = () => (
11
+ * <Container>
12
+ * <div>Page content</div>
13
+ * </Container>
14
+ * );
15
+ * @endexample
16
+ * When we are using the container with the header we can use the isHeaderFixed
17
+ *
18
+ * prop to remove the side padding.
19
+ *
20
+ * @example
21
+ *
22
+ * import Container from "@bigbinary/neeto-molecules/Container";
23
+ *
24
+ * const App = () => (
25
+ * <Container isHeaderFixed>
26
+ * <Header title="Title" />
27
+ * <div>Page content</div>
28
+ * </Container>
29
+ * );
30
+ * @endexample
31
+ */
32
+ const Container: React.FC<{
33
+ isHeaderFixed?: boolean;
34
+ }>;
35
+ export default Container;
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ /**
3
+ *
4
+ * A button that copies the given value to the clipboard.
5
+ *
6
+ * @example
7
+ *
8
+ * import CopyToClipboardButton from "@bigbinary/neeto-molecules/CopyToClipboardButton";
9
+ *
10
+ * const CopyToClipboardDemo = ({ value }) => (
11
+ * <CopyToClipboardButton label="Copy text" value={value} />
12
+ * );
13
+ * @endexample
14
+ */
15
+ const CopyToClipboardButton: React.FC<{
16
+ className?: string;
17
+ icon?: string | any;
18
+ label?: string;
19
+ value: string;
20
+ }>;
21
+ export default CopyToClipboardButton;
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ /**
3
+ *
4
+ * A common component for managing custom domain. This component can be used when
5
+ *
6
+ * you have a single custom domain.
7
+ *
8
+ * @example
9
+ *
10
+ * import CustomDomain from "@bigbinary/neeto-molecules/CustomDomain";
11
+ *
12
+ * <CustomDomain url="api/v1/admin/custom_domain" iconOnly />;
13
+ * @endexample
14
+ */
15
+ const CustomDomain: React.FC<{
16
+ url: string;
17
+ iconOnly: boolean;
18
+ }>;
19
+ export default CustomDomain;
@@ -0,0 +1,33 @@
1
+ import React from "react";
2
+ /**
3
+ *
4
+ * A full page common component for managing custom domains. This component can be
5
+ *
6
+ * used when you have multiple associated custom domains.
7
+ *
8
+ * @example
9
+ *
10
+ * import CustomDomainDashboard from "@bigbinary/neeto-molecules/CustomDomainDashboard";
11
+ *
12
+ * const SETTINGS_BREADCRUMBS = [
13
+ * {
14
+ * text: "Settings",
15
+ * link: "/admin/settings",
16
+ * },
17
+ * ];
18
+ *
19
+ * <CustomDomainDashboard
20
+ * headerProps={{ breadcrumbs: SETTINGS_BREADCRUMBS }}
21
+ * url="api/v1/admin/custom_domains"
22
+ * />;
23
+ * @endexample
24
+ * ![Screenshot](https://user-images.githubusercontent.com/47141466/198322719-80cccd00-7bc3-44b6-845b-b3ad61e2635a.png|height=200|width=300)
25
+ *
26
+ */
27
+ const CustomDomainDashboard: React.FC<{
28
+ headerProps: {
29
+ [key: string]: any;
30
+ };
31
+ url: string;
32
+ }>;
33
+ export default CustomDomainDashboard;
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+
3
+ import { TooltipProps, TypographyProps } from "@bigbinary/neetoui";
4
+ import {
5
+ timeFormat,
6
+ DateTimeType,
7
+ } from "@bigbinary/neeto-commons-frontend/utils";
8
+
9
+ const DateFormat: {
10
+ [key in Capitalize<keyof typeof timeFormat>]: React.FC<{
11
+ date: DateTimeType;
12
+ timerInterval?: number;
13
+ typographyProps?: Partial<TypographyProps>;
14
+ tooltipProps?: Partial<TooltipProps>;
15
+ }>;
16
+ };
17
+
18
+ export default DateFormat;
@@ -0,0 +1,52 @@
1
+ import React from "react";
2
+ import { Dayjs } from "dayjs";
3
+ interface TimePeriodType {
4
+ startDate: Dayjs;
5
+ endDate: Dayjs;
6
+ rangeType: string;
7
+ }
8
+ /**
9
+ *
10
+ * A common component to manage your date range filters.
11
+ *
12
+ * ![Screenshot](https://user-images.githubusercontent.com/45137335/221573730-3195ac05-6cf2-4b45-bfe9-427b077cec07.png|height=200|width=300)
13
+ *
14
+ * ![Screenshot](https://user-images.githubusercontent.com/45137335/221578791-74b1c235-9287-4650-9d9b-6774df1d689d.png|height=200|width=300)
15
+ *
16
+ * @example
17
+ *
18
+ * import DateRangeFilter from "@bigbinary/neeto-molecules/DateRangeFilter";
19
+ * const DateRangeFilterActionBlock = (
20
+ * {
21
+ * //pass the necessary props
22
+ * }
23
+ * ) => {
24
+ * const [timePeriod, setTimePeriod] = useState(INITIAL_TIME_PERIOD_VALUE);
25
+ * //INITIAL_TIME_PERIOD_VALUE will be an object with label,value and rangeType as keys
26
+ * return (
27
+ * <DateRangeFilter
28
+ * timePeriod={timePeriod}
29
+ * setTimePeriod={setTimePeriod}
30
+ * timePeriodOptions={[
31
+ * {
32
+ * label: "New filter label",
33
+ * value: {startDate: pass dayjs object , endDate: pass dayjs object , rangeType: "new_range_type"},
34
+ * },
35
+ * ]} // pass this prop only if you want to override default filters available
36
+ * />
37
+ * );
38
+ * };
39
+ * @endexample
40
+ * Note: The value of timePeriod state will contain the startDate, endDate and
41
+ *
42
+ * range_type of the selected filter. This can be passed into the filterParams of
43
+ *
44
+ * your API.
45
+ *
46
+ */
47
+ const DateRangeFilter: React.FC<{
48
+ timePeriod: TimePeriodType;
49
+ setTimePeriod: React.Dispatch<React.SetStateAction<TimePeriodType>>;
50
+ timePeriodOptions: TimePeriodType[];
51
+ }>;
52
+ export default DateRangeFilter;
@@ -0,0 +1,45 @@
1
+ import React from "react";
2
+ import { DropdownProps } from "@bigbinary/neetoui";
3
+ interface Variable {
4
+ label?: string;
5
+ key?: string;
6
+ value?: string;
7
+ category?: string;
8
+ variables?: Omit<Variable, "variables">[];
9
+ }
10
+ /**
11
+ *
12
+ * A common component for using dynamic variables.
13
+ *
14
+ * ![Screenshot](https://user-images.githubusercontent.com/70290286/223332469-21106919-637f-48b5-abec-a57306ca7005.png|height=200|width=300)
15
+ *
16
+ * @example
17
+ *
18
+ * import DynamicVariables from "@bigbinary/neeto-molecules/DynamicVariables";
19
+ * import { Input } from "neetoui/formik";
20
+ *
21
+ * const DynamicVariablesDemo = () => {
22
+ * return (
23
+ * <Input
24
+ * label="Input with DynamicVariables"
25
+ * name="subject"
26
+ * suffix={
27
+ * <DynamicVariables
28
+ * dropdownProps={{ buttonStyle: "text" }}
29
+ * variables={EDITOR_VARIABLES}
30
+ * onVariableClick={variable => {
31
+ * console.log(variable);
32
+ * }}
33
+ * />
34
+ * }
35
+ * />
36
+ * );
37
+ * };
38
+ * @endexample
39
+ */
40
+ const DynamicVariables: React.FC<{
41
+ onVariableClick?: (variable: Variable) => void;
42
+ variables: Variable[];
43
+ dropdownProps?: DropdownProps;
44
+ }>;
45
+ export default DynamicVariables;
@@ -0,0 +1,41 @@
1
+ import React from "react";
2
+ /**
3
+ *
4
+ * A common component to preview emails.
5
+ *
6
+ * ![EmailPreview](https://user-images.githubusercontent.com/66865722/222370228-cda4ac74-8ec9-4288-ab88-a49b21cab284.png|height=200|width=300)
7
+ *
8
+ * @example
9
+ *
10
+ * import React from "react";
11
+ * import { useFormikContext } from "formik";
12
+ * import EmailPreview from "@bigbinary/neeto-molecules/EmailPreview";
13
+ * const EmailShare = () => {
14
+ * const { values } = useFormikContext();
15
+ * return (
16
+ * <div>
17
+ * <EmailPreview
18
+ * actionButtonText={values.startSurveyButtonText}
19
+ * body={values.emailBody}
20
+ * subject={values.emailSubject}
21
+ * logo={values.logo}
22
+ * to={values.notifyEmails}
23
+ * from={values.emailsFrom}
24
+ * productName="Form"
25
+ * />
26
+ * </div>
27
+ * );
28
+ * };
29
+ * export default EmailShare;
30
+ * @endexample
31
+ */
32
+ const EmailPreview: React.FC<{
33
+ to?: string[];
34
+ subject?: string;
35
+ body?: string;
36
+ from?: string;
37
+ logo?: string;
38
+ productName?: string;
39
+ actionButtonText?: string;
40
+ }>;
41
+ export default EmailPreview;
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ /**
3
+ *
4
+ * A fallback page for handling 404, 403 and 500 errors.
5
+ *
6
+ * The component also has a "contact us" link that opens the chat widget for
7
+ *
8
+ * further communication.
9
+ *
10
+ */
11
+ const ErrorPage: React.FC<{
12
+ homeUrl?: string;
13
+ status?: number;
14
+ }>;
15
+ export default ErrorPage;
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+ import { DropdownProps } from "neetoui";
3
+ /**
4
+ *
5
+ * The Header component can be used to display the page title and an action block
6
+ *
7
+ * to perform the main operations on the page.
8
+ *
9
+ * @example
10
+ *
11
+ * import Header from "@bigbinary/neeto-molecules/Header";
12
+ *
13
+ * const App = () => (
14
+ * <Header title="Heading" actionBlock={<Button label="Primary action" />} />
15
+ * );
16
+ * @endexample
17
+ */
18
+ const Header: React.FC<{
19
+ title?: React.ReactNode;
20
+ className?: string;
21
+ actionBlock?: React.ReactNode;
22
+ searchProps?: object;
23
+ breadcrumbs?: {
24
+ text: string;
25
+ link: string;
26
+ }[];
27
+ dropdownProps?: DropdownProps;
28
+ menuBarToggle?: (...args: any[]) => any;
29
+ }>;
30
+ export default Header;
@@ -0,0 +1,43 @@
1
+ import React from "react";
2
+ /**
3
+ *
4
+ * A dropdown component that allows you to select an icon from a list of
5
+ *
6
+ * Google icons.
7
+ *
8
+ * ![image](https://user-images.githubusercontent.com/35304653/243669467-148585f0-5499-4914-ba84-4284bda8e2d8.png|height=200|width=300)
9
+ *
10
+ * We make use of a feature called ligatures that convert the snake cased name of
11
+ *
12
+ * an icon to an actual icon. It is achieved like so. Note that the classname
13
+ *
14
+ * "material-symbols-rounded" is necessary for this conversion to work.
15
+ *
16
+ * @example
17
+ *
18
+ * <span className="material-symbols-rounded">icon_name</span>
19
+ * @endexample
20
+ * @example
21
+ *
22
+ * import IconPicker from "@bigbinary/neeto-molecules/IconPicker";
23
+ *
24
+ * const App = () => {
25
+ * const [value, setValue] = useState("home");
26
+ * return (
27
+ * <IconPicker
28
+ * value={value}
29
+ * label="Select an icon"
30
+ * onClick={value => setValue(value)}
31
+ * />
32
+ * );
33
+ * };
34
+ * @endexample
35
+ */
36
+ const IconPicker: React.FC<{
37
+ filled?: boolean;
38
+ value?: string;
39
+ label?: string;
40
+ onClick?: Function;
41
+ className?: string;
42
+ }>;
43
+ export default IconPicker;
@@ -0,0 +1,45 @@
1
+ import { IconProps } from "neetoicons";
2
+ import React, { ReactElement } from "react";
3
+ /**
4
+ *
5
+ * A common component used for integrations across neeto products.
6
+ *
7
+ * ![Integrations](https://user-images.githubusercontent.com/49012815/237155224-582fe3b3-2b63-484b-bc08-6898fb8c1ce2.png|height=200|width=300)
8
+ *
9
+ * @example
10
+ *
11
+ * import IntegrationCard from "@bigbinary/neeto-molecules/IntegrationCard";
12
+ *
13
+ * return (
14
+ * <IntegrationCard
15
+ * Icon={SlackIcon}
16
+ * description="Integrate with Slack"
17
+ * isConnected={isConnected}
18
+ * label="Slack"
19
+ * customDropdown={
20
+ * <Dropdown buttonStyle="text" icon={MenuVertical}>
21
+ * <Menu>
22
+ * <MenuItem.Button>Custom Option</MenuItem.Button>
23
+ * </Menu>
24
+ * </Dropdown>
25
+ * }
26
+ * onConnect={handleConnect}
27
+ * onDisconnect={handleDisconnect}
28
+ * onManage={handleManage}
29
+ * />
30
+ * );
31
+ * @endexample
32
+ */
33
+ const IntegrationCard: React.FC<{
34
+ label: string;
35
+ description: string;
36
+ Icon: React.FC<IconProps>;
37
+ className?: string;
38
+ isConnected: boolean;
39
+ isStatusLoading?: boolean;
40
+ customDropdown?: React.ReactNode;
41
+ onDisconnect?: (...args: any[]) => any;
42
+ onConnect: (...args: any[]) => any;
43
+ onManage?: (...args: any[]) => any;
44
+ }>;
45
+ export default IntegrationCard;
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ /**
3
+ *
4
+ * A common component used for disconnect UI of integrations across neeto products.
5
+ *
6
+ * ![Integration](https://github.com/bigbinary/neeto-molecules/assets/49012815/864c1407-a6c8-4b53-ab01-364db42d2a80|height=200|width=300)
7
+ *
8
+ * @example
9
+ *
10
+ * import IntegrationDisconnectAlert from "@bigbinary/neeto-molecules/IntegrationDisconnectAlert";
11
+ *
12
+ * const Integration = () => {
13
+ * const [isOpen, setIsOpen] = useState(false);
14
+ * const [isDisconnecting, setIsDisconnecting] = useState(false);
15
+ *
16
+ * return (
17
+ * <IntegrationDisconnectAlert
18
+ * isOpen={isOpen}
19
+ * isDisconnecting={isDisconnecting}
20
+ * title="Disconnect Slack"
21
+ * message="You will be disconnected from Slack."
22
+ * onClose={() => setIsOpen(false)}
23
+ * onDisconnect={() => console.log("Disconnect the integration")}
24
+ * />
25
+ * );
26
+ * };
27
+ * @endexample
28
+ */
29
+ const IntegrationDisconnectAlert: React.FC<{
30
+ isOpen: boolean;
31
+ isDisconnecting: boolean;
32
+ title: string;
33
+ message?: string;
34
+ onClose: (...args: any[]) => any;
35
+ onDisconnect: (...args: any[]) => any;
36
+ }>;
37
+ export default IntegrationDisconnectAlert;
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ /**
3
+ *
4
+ * A component used to display walkthrough video of integration.
5
+ *
6
+ * ![IntegrationWalkthroughModal](https://user-images.githubusercontent.com/89389135/243562250-9cdd99cf-ee7e-42b5-b578-ca57db5fc94a.png|height=200|width=300)
7
+ *
8
+ * @example
9
+ *
10
+ * import React, { useState } from "react";
11
+ * import IntegrationWalkthroughModal from "@bigbinary/neeto-molecules/IntegrationWalkthroughModal";
12
+ *
13
+ * const Finish = () => {
14
+ * const [isModalOpen, setIsModalOpen] = useState(true);
15
+ *
16
+ * return (
17
+ * <IntegrationWalkthroughModal
18
+ * isOpen={isModalOpen}
19
+ * onClose={() => setIsModalOpen(false)}
20
+ * videoUrl="https://user-images.githubusercontent.com/39831309/232906732-43e139ac-4af8-4a59-9f4f-e96ebf436f75.mov"
21
+ * />
22
+ * );
23
+ * };
24
+ * @endexample
25
+ */
26
+ const IntegrationWalkthroughModal: React.FC<{
27
+ videoUrl: string;
28
+ isOpen: boolean;
29
+ onClose: Function;
30
+ }>;
31
+ export default IntegrationWalkthroughModal;
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ /**
3
+ *
4
+ * A common component to restrict IPs in neeto applications.
5
+ *
6
+ * ![Ip](https://user-images.githubusercontent.com/49012815/246818619-209f616c-cfc4-4e98-b137-96d305a71bd8.png|height=200|width=300)
7
+ *
8
+ * @example
9
+ *
10
+ * import IpRestriction from "@bigbinary/neeto-molecules/IpRestriction";
11
+ *
12
+ * const IpRestrictionSetting = () => (
13
+ * <Container isHeaderFixed className="w-full">
14
+ * <Header title="IP Restrictions" />
15
+ * <Scrollable className="w-full">
16
+ * <IpRestriction />
17
+ * </Scrollable>
18
+ * </Container>
19
+ * );
20
+ * @endexample
21
+ */
22
+ const IpRestriction: React.FC<{}>;
23
+ export default IpRestriction;