@bigbinary/neeto-molecules 1.0.54 → 1.0.55
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/README.md +1 -0
- package/dist/IpRestriction.cjs.js +8 -2
- package/dist/IpRestriction.cjs.js.map +1 -1
- package/dist/IpRestriction.js +9 -3
- package/dist/IpRestriction.js.map +1 -1
- package/dist/ThemeSidebar.cjs.js +13566 -0
- package/dist/ThemeSidebar.cjs.js.map +1 -0
- package/dist/ThemeSidebar.js +13541 -0
- package/dist/ThemeSidebar.js.map +1 -0
- package/package.json +4 -1
- package/src/translations/en.json +67 -6
- package/types/BrowserSupport.d.ts +12 -4
- package/types/CustomDomain.d.ts +4 -5
- package/types/CustomDomainDashboard.d.ts +3 -1
- package/types/IconPicker.d.ts +8 -2
- package/types/IntegrationDisconnectAlert.d.ts +2 -2
- package/types/themeSidebar.d.ts +76 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"description": "A package of reusable molecular components for neeto products.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-molecules.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"@bigbinary/neetoui": "^5.0.9",
|
|
57
57
|
"@faker-js/faker": "7.6.0",
|
|
58
58
|
"@honeybadger-io/react": "2.0.1",
|
|
59
|
+
"@rails/activestorage": "^7.0.5",
|
|
59
60
|
"@rollup/plugin-alias": "^3.1.9",
|
|
60
61
|
"@rollup/plugin-babel": "^5.3.1",
|
|
61
62
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
@@ -103,6 +104,7 @@
|
|
|
103
104
|
"eslint-plugin-react-hooks": "4.5.0",
|
|
104
105
|
"eslint-plugin-unused-imports": "2.0.0",
|
|
105
106
|
"formik": "^2.2.9",
|
|
107
|
+
"framer-motion": "^4.1.17",
|
|
106
108
|
"husky": "^7.0.4",
|
|
107
109
|
"i18next": "^22.5.1",
|
|
108
110
|
"ip-num": "^1.5.0",
|
|
@@ -129,6 +131,7 @@
|
|
|
129
131
|
"raw-loader": "^4.0.2",
|
|
130
132
|
"react": "^17.0.2",
|
|
131
133
|
"react-dom": "17.0.2",
|
|
134
|
+
"react-dropzone": "^11.2.4",
|
|
132
135
|
"react-helmet": "^6.1.0",
|
|
133
136
|
"react-hotkeys-hook": "3.3.2",
|
|
134
137
|
"react-i18next": "^12.3.1",
|
package/src/translations/en.json
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"save": "Save",
|
|
9
9
|
"edit": "Edit",
|
|
10
10
|
"delete": "Delete",
|
|
11
|
+
"apply": "Apply",
|
|
11
12
|
"add": "Add {{entity}}",
|
|
12
13
|
"editTitle": "Edit {{entity}}",
|
|
13
14
|
"addNew": "Add new {{entity}}",
|
|
@@ -29,12 +30,11 @@
|
|
|
29
30
|
},
|
|
30
31
|
"status": "status",
|
|
31
32
|
"deleteAlert": {
|
|
32
|
-
"title": "Delete {{entity}}?"
|
|
33
|
-
"yes": "Yes, delete",
|
|
34
|
-
"no": "No, cancel"
|
|
33
|
+
"title": "Delete {{entity}}?"
|
|
35
34
|
},
|
|
36
35
|
"download": "Download",
|
|
37
|
-
"filter": "Filter"
|
|
36
|
+
"filter": "Filter",
|
|
37
|
+
"somethingWentWrong": "Something went wrong. Please try again."
|
|
38
38
|
},
|
|
39
39
|
"columns": {
|
|
40
40
|
"columns": "Columns",
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
"dnsStatus": "<p>Typically, it will take 2 hours to 24 hours for the new custom domain to start working.</p><br><p> An email will be sent when the custom domain starts working.</p><br>If, after 24 hours, your custom domain is still not working, then please send an email to ",
|
|
192
192
|
"cnameAddedTime": " You added CNAME records {{time}}"
|
|
193
193
|
},
|
|
194
|
-
"alertMessage": "You
|
|
194
|
+
"alertMessage": "You are permanently deleting the custom domain <strong>{{hostname}}</strong> and will no longer point to your default domain. This can't be undone.",
|
|
195
195
|
"formikValidation": {
|
|
196
196
|
"required": "Custom domain is required",
|
|
197
197
|
"valid": "Please add valid custom domain"
|
|
@@ -272,7 +272,8 @@
|
|
|
272
272
|
"ipStart": "IP start",
|
|
273
273
|
"ipEnd": "IP end",
|
|
274
274
|
"actions": "Actions",
|
|
275
|
-
"
|
|
275
|
+
"allowedIpRangeConfirmationTitle": "allowed IP range",
|
|
276
|
+
"allowedIpRangeConfirmation": "You are permanently deleting IP range <strong>{{ipStart}}</strong> to <strong>{{ipEnd}}</strong>. This can't be undone.",
|
|
276
277
|
"validations": {
|
|
277
278
|
"invalidIp": "Invalid IP address format",
|
|
278
279
|
"ipEndGreaterThanIpStart": "IP end should be greater than or equal to IP start",
|
|
@@ -396,6 +397,66 @@
|
|
|
396
397
|
"noResults": "No results",
|
|
397
398
|
"removeButton": "Remove"
|
|
398
399
|
}
|
|
400
|
+
},
|
|
401
|
+
"themeSidebar": {
|
|
402
|
+
"theme_one": "theme",
|
|
403
|
+
"theme_other": "themes",
|
|
404
|
+
"active": "Active",
|
|
405
|
+
"defaultThemeName": "My theme",
|
|
406
|
+
"addNewTheme": "Add new theme",
|
|
407
|
+
"deleteTheme": "Are you sure you want to delete this theme?",
|
|
408
|
+
"searchThemes": "Search themes",
|
|
409
|
+
"systemThemes": "System themes",
|
|
410
|
+
"customThemes": "Custom themes",
|
|
411
|
+
"customThemesList": {},
|
|
412
|
+
"systemThemesList": {},
|
|
413
|
+
"backToThemes": "Back to themes",
|
|
414
|
+
"name": "Name",
|
|
415
|
+
"thankYouTextAlignment": "Thank you text alignment",
|
|
416
|
+
"welcomeTextAlignment": "Welcome text alignment",
|
|
417
|
+
"questionsTextAlignment": "Questions text alignment",
|
|
418
|
+
"backgroundOverlay": "Background overlay",
|
|
419
|
+
"enableDominantBackgroundColor": "Enable dominant background color",
|
|
420
|
+
"backgroundPosition": "Background position",
|
|
421
|
+
"backgroundColor": "Background color",
|
|
422
|
+
"enableContentBackground": "Enable content background",
|
|
423
|
+
"formBackgroundColor": "Form background color",
|
|
424
|
+
"backgroundImage": "Background image",
|
|
425
|
+
"buttonBorderRadius": "Button border radius",
|
|
426
|
+
"buttonText": "Button text",
|
|
427
|
+
"buttons": "Buttons",
|
|
428
|
+
"answerColor": "Answer color",
|
|
429
|
+
"questions": "Questions",
|
|
430
|
+
"font": "Font",
|
|
431
|
+
"left": "Left",
|
|
432
|
+
"style": "Style",
|
|
433
|
+
"fileRequirements": "Only .jpeg, .jpg, .png, .svg and .gif files are supported. Maximum allowed file size {{maxSize}}MB.",
|
|
434
|
+
"logoPosition": "Logo position",
|
|
435
|
+
"logo": "Logo",
|
|
436
|
+
"themeOptions": {
|
|
437
|
+
"clone": "Clone",
|
|
438
|
+
"delete": "Delete"
|
|
439
|
+
},
|
|
440
|
+
"themeCard": {
|
|
441
|
+
"question": "Question",
|
|
442
|
+
"answer": "Answer"
|
|
443
|
+
},
|
|
444
|
+
"editTheme": {
|
|
445
|
+
"title": "Edit theme",
|
|
446
|
+
"imageUpload": "Drag and drop or <span>Browse</span> a file"
|
|
447
|
+
},
|
|
448
|
+
"createTheme": {
|
|
449
|
+
"title": "New theme"
|
|
450
|
+
},
|
|
451
|
+
"alignmentOptions": {
|
|
452
|
+
"left": "Left align",
|
|
453
|
+
"center": "Center align"
|
|
454
|
+
},
|
|
455
|
+
"error": {
|
|
456
|
+
"somethingWentWrong": "Something went wrong. Please try again.",
|
|
457
|
+
"fileSizeLimitExceeded": "Your file is larger than {{maxSizeInReadableUnits}}. Please try again with a smaller file.",
|
|
458
|
+
"fileTypeError": "Please upload a file with one of the following file types: {{acceptedTypes}}."
|
|
459
|
+
}
|
|
399
460
|
}
|
|
400
461
|
}
|
|
401
462
|
}
|
|
@@ -5,9 +5,17 @@ type VersionLimits = {
|
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
7
7
|
*
|
|
8
|
-
* A wrapper that displays a callout message for partially supported browsers
|
|
8
|
+
* A wrapper that displays a callout message for partially supported browsers
|
|
9
9
|
*
|
|
10
|
-
* a
|
|
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.
|
|
11
19
|
*
|
|
12
20
|
* @example
|
|
13
21
|
*
|
|
@@ -52,9 +60,9 @@ type VersionLimits = {
|
|
|
52
60
|
*
|
|
53
61
|
* The default unsupported browsers are given below:
|
|
54
62
|
*
|
|
55
|
-
* Any other browser which is not in the above lists will be considered as
|
|
63
|
+
* Any other browser which is not in the above lists will be considered as unknown
|
|
56
64
|
*
|
|
57
|
-
*
|
|
65
|
+
* and a corresponding callout will be shown.
|
|
58
66
|
*
|
|
59
67
|
*/
|
|
60
68
|
const BrowserSupport: React.FC<{
|
package/types/CustomDomain.d.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
|
-
* A common component for managing custom domain. This component can be used when
|
|
4
|
+
* A common component for managing custom domain. This component can be used when
|
|
5
|
+
*
|
|
6
|
+
* you have a single custom domain.
|
|
5
7
|
*
|
|
6
8
|
* @example
|
|
7
9
|
*
|
|
8
10
|
* import CustomDomain from "@bigbinary/neeto-molecules/CustomDomain";
|
|
9
11
|
*
|
|
10
|
-
* <CustomDomain
|
|
11
|
-
* url="api/v1/admin/custom_domain"
|
|
12
|
-
* iconOnly
|
|
13
|
-
* />;
|
|
12
|
+
* <CustomDomain url="api/v1/admin/custom_domain" iconOnly />;
|
|
14
13
|
* @endexample
|
|
15
14
|
*/
|
|
16
15
|
const CustomDomain: React.FC<{
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
|
-
* A full page common component for managing custom domains. This component can be
|
|
4
|
+
* A full page common component for managing custom domains. This component can be
|
|
5
|
+
*
|
|
6
|
+
* used when you have multiple associated custom domains.
|
|
5
7
|
*
|
|
6
8
|
* @example
|
|
7
9
|
*
|
package/types/IconPicker.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
|
-
* A dropdown component that allows you to select an icon from a list of
|
|
4
|
+
* A dropdown component that allows you to select an icon from a list of
|
|
5
|
+
*
|
|
6
|
+
* Google icons.
|
|
5
7
|
*
|
|
6
8
|
* 
|
|
7
9
|
*
|
|
8
|
-
* We make use of a feature called ligatures that convert the snake cased name of
|
|
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.
|
|
9
15
|
*
|
|
10
16
|
* @example
|
|
11
17
|
*
|
|
@@ -17,8 +17,8 @@ import React from "react";
|
|
|
17
17
|
* <IntegrationDisconnectAlert
|
|
18
18
|
* isOpen={isOpen}
|
|
19
19
|
* isDisconnecting={isDisconnecting}
|
|
20
|
-
* title="Disconnect Slack
|
|
21
|
-
* message="
|
|
20
|
+
* title="Disconnect Slack"
|
|
21
|
+
* message="You will be disconnected from Slack."
|
|
22
22
|
* onClose={() => setIsOpen(false)}
|
|
23
23
|
* onDisconnect={() => console.log("Disconnect the integration")}
|
|
24
24
|
* />
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface ColorScheme {
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
questionColor: string;
|
|
5
|
+
buttonBackgroundColor: string;
|
|
6
|
+
buttonTextColor: string;
|
|
7
|
+
answerColor: string;
|
|
8
|
+
answerTextColor: string;
|
|
9
|
+
}
|
|
10
|
+
;
|
|
11
|
+
interface BackgroundImage {
|
|
12
|
+
url: string;
|
|
13
|
+
dominantColor: string;
|
|
14
|
+
backgroundColor: string;
|
|
15
|
+
backgroundOverlayOpacity: number;
|
|
16
|
+
backgroundPosition: string;
|
|
17
|
+
isDominantBackgroundColorEnabled: boolean;
|
|
18
|
+
}
|
|
19
|
+
interface FontOptions {
|
|
20
|
+
fontFamily: string;
|
|
21
|
+
}
|
|
22
|
+
interface ButtonOptions {
|
|
23
|
+
buttonBorderRadius: number;
|
|
24
|
+
}
|
|
25
|
+
interface Layout {
|
|
26
|
+
isContentBackgroundEnabled: boolean;
|
|
27
|
+
contentBackgroundColor: string;
|
|
28
|
+
welcomeTextAlignment: string;
|
|
29
|
+
thankYouTextAlignment: string;
|
|
30
|
+
questionsTextAlignment: string;
|
|
31
|
+
logo: {
|
|
32
|
+
url: string;
|
|
33
|
+
size: number;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
interface Theme {
|
|
37
|
+
name: string;
|
|
38
|
+
colorScheme: ColorScheme;
|
|
39
|
+
backgroundImage: BackgroundImage;
|
|
40
|
+
fontOptions: FontOptions;
|
|
41
|
+
buttonOptions: ButtonOptions;
|
|
42
|
+
layout: Layout;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* ThemeSidebar allows us to configure the themes of entities like forms, quizzes and knowledge bases.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
*
|
|
50
|
+
* import ThemeSidebar from "@bigbinary/neeto-molecules/ThemeSidebar";
|
|
51
|
+
*
|
|
52
|
+
* const ThemesSidebarDemo = () => (
|
|
53
|
+
* <ThemeSidebar
|
|
54
|
+
* defaultThemes={defaultThemes}
|
|
55
|
+
* customThemes={customThemes}
|
|
56
|
+
* currentTheme={currentTheme}
|
|
57
|
+
* createTheme={createTheme}
|
|
58
|
+
* deleteTheme={deleteTheme}
|
|
59
|
+
* editTheme={editTheme}
|
|
60
|
+
* applyTheme={applyTheme}
|
|
61
|
+
* isLoadingThemes={isLoadingThemes}
|
|
62
|
+
* />
|
|
63
|
+
* );
|
|
64
|
+
* @endexample
|
|
65
|
+
*/
|
|
66
|
+
const ThemeSidebar: React.FC<{
|
|
67
|
+
defaultThemes: Theme[];
|
|
68
|
+
customThemes: Theme[];
|
|
69
|
+
currentTheme: Theme;
|
|
70
|
+
createTheme: (value: Theme) => void;
|
|
71
|
+
deleteTheme: (value: Theme) => void;
|
|
72
|
+
editTheme: (value: Theme) => void;
|
|
73
|
+
applyTheme: (value: Theme) => void;
|
|
74
|
+
isLoadingThemes: boolean;
|
|
75
|
+
}>;
|
|
76
|
+
export default ThemeSidebar;
|