@bigbinary/neeto-commons-frontend 2.0.24 → 2.0.26

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.
@@ -0,0 +1,92 @@
1
+ module.exports = {
2
+ rules: {
3
+ // not-auto-fixable: Prevent missing props validation in a React component definition.
4
+ "react/prop-types": "off",
5
+ // not-auto-fixable: Detect unescaped HTML entities, which might represent malformed tags.
6
+ "react/no-unescaped-entities": "off",
7
+ // not-auto-fixable: Prevent missing displayName in a React component definition. Useful when using React extensions in browser and checking for component name.
8
+ "react/display-name": "error",
9
+ // not-auto-fixable: Reports when this.state is accessed within setState.
10
+ "react/no-access-state-in-setstate": "error",
11
+ // not-auto-fixable: Prevent usage of dangerous JSX props. Currently jam3 plugin will take care of handling this.
12
+ "react/no-danger": "off",
13
+ // not-auto-fixable: Report when a DOM element is using both children and dangerouslySetInnerHTML.
14
+ "react/no-danger-with-children": "warn",
15
+ // not-auto-fixable: Prevent definitions of unused prop types.
16
+ "react/no-unused-prop-types": "error",
17
+ // not-auto-fixable: Report missing key props in iterators/collection literals. Important rule!
18
+ "react/jsx-key": ["error", { checkFragmentShorthand: true }],
19
+ // not-auto-fixable: Enforce no duplicate props.
20
+ "react/jsx-no-duplicate-props": "error",
21
+ // not-auto-fixable: Disallow undeclared variables in JSX.
22
+ "react/jsx-no-undef": "error",
23
+ // not-auto-fixable: Enforce PascalCase for user-defined JSX components.
24
+ "react/jsx-pascal-case": ["error", { allowNamespace: true }],
25
+ // not-auto-fixable: Prevent React to be incorrectly marked as unused.
26
+ "react/jsx-uses-react": "error",
27
+ // not-auto-fixable: Prevent variables used in JSX to be marked as unused.
28
+ "react/jsx-uses-vars": "error",
29
+ // not-auto-fixable: Ensures https://reactjs.org/docs/hooks-rules.html.
30
+ "react-hooks/rules-of-hooks": "error",
31
+ // not-auto-fixable: Ensures https://reactjs.org/docs/hooks-rules.html - Checks effect dependencies.
32
+ "react-hooks/exhaustive-deps": "warn",
33
+ // auto-fixable: A fragment is redundant if it contains only one child, or if it is the child of a html element, and is not a keyed fragment.
34
+ "react/jsx-no-useless-fragment": ["error", { allowExpressions: true }],
35
+ // auto-fixable: Prefer arrow function expressions for component declaration.
36
+ "react/function-component-definition": [
37
+ "error",
38
+ {
39
+ namedComponents: "arrow-function",
40
+ unnamedComponents: "arrow-function",
41
+ },
42
+ ],
43
+ // auto-fixable: Components without children can be self-closed to avoid unnecessary extra closing tag.
44
+ "react/self-closing-comp": [
45
+ "error",
46
+ {
47
+ component: true,
48
+ html: true,
49
+ },
50
+ ],
51
+ // auto-fixable: Wrapping multiline JSX in parentheses can improve readability and/or convenience.
52
+ "react/jsx-wrap-multilines": [
53
+ "error",
54
+ {
55
+ declaration: "parens-new-line",
56
+ assignment: "parens-new-line",
57
+ return: "parens-new-line",
58
+ arrow: "parens-new-line",
59
+ condition: "parens-new-line",
60
+ logical: "parens-new-line",
61
+ prop: "ignore",
62
+ },
63
+ ],
64
+ // not-auto-fixable: Make sure files containing JSX is having .jsx extension.
65
+ "react/jsx-filename-extension": ["error", { allow: "as-needed" }],
66
+ // auto-fixable: Omit mentioning the "true" value if it can be implicitly understood in props.
67
+ "react/jsx-boolean-value": "error",
68
+ // auto-fixable: Partially fixable. Make sure the state and setter have symmertic naming.
69
+ "react/hook-use-state": "error",
70
+ // auto-fixable: Shorthand notations should always be at the top and also enforce props alphabetical sorting.
71
+ "react/jsx-sort-props": [
72
+ "error",
73
+ {
74
+ callbacksLast: true,
75
+ shorthandFirst: true,
76
+ multiline: "last",
77
+ reservedFirst: false,
78
+ locale: "auto",
79
+ },
80
+ ],
81
+ // auto-fixable: Disallow unnecessary curly braces in JSX props and/or children.
82
+ "react/jsx-curly-brace-presence": [
83
+ "error",
84
+ {
85
+ props: "never",
86
+ children: "never",
87
+ // JSX prop values that are JSX elements should be enclosed in braces.
88
+ propElementValues: "always",
89
+ },
90
+ ],
91
+ },
92
+ };
@@ -0,0 +1,16 @@
1
+ module.exports = {
2
+ tailwindConfig: "./tailwind.config.js",
3
+ trailingComma: "es5",
4
+ arrowParens: "avoid",
5
+ printWidth: 80,
6
+ tabWidth: 2,
7
+ useTabs: false,
8
+ semi: true,
9
+ quoteProps: "as-needed",
10
+ jsxSingleQuote: false,
11
+ singleQuote: false,
12
+ bracketSpacing: true,
13
+ bracketSameLine: false,
14
+ proseWrap: "always",
15
+ endOfLine: "lf",
16
+ };
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ important: true,
3
+ purge: {
4
+ enabled: process.env.NODE_ENV === "production",
5
+ content: [
6
+ "./app/javascript/**/*.{js,jsx}",
7
+ "./app/views/**/*.html.erb",
8
+ "./app/views/**/*.slim",
9
+ "./node_modules/@bigbinary/**/*.js",
10
+ ],
11
+ defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || [],
12
+ },
13
+ };
@@ -0,0 +1,57 @@
1
+ /*
2
+ Customize default webpack rules/loaders configuration.
3
+ A custom helpers till shakapacker introduces the feature.
4
+ Track the following the issues to get the status of feature development in shakapacker:
5
+ https://github.com/shakacode/shakapacker/issues/80
6
+ https://github.com/shakacode/shakapacker/issues/87
7
+ Usage:
8
+ const customizeWebpackDefaultRules = require("./helpers/customize-default-rules");
9
+ const defaultRules = {
10
+ "asset/resource": {
11
+ test: /\.(bmp|gif|jpe?g|png|tiff|ico|avif|webp|eot|otf|ttf|woff|woff2)$/
12
+ },
13
+ "asset/source": {
14
+ exclude: /\.(js|mjs|jsx|ts|tsx|js)$/,
15
+ },
16
+ };
17
+ const customWebpackConfig = customizeWebpackDefaultRules(webpackConfig, defaultRules);
18
+ NOTE:
19
+ - Check if the option to output default configuration is introduced or not before upgrading further.
20
+ - Update the defaultRuleType constant whenever shakapacker introduces a new default rule/loader.
21
+ */
22
+ const {
23
+ findBy,
24
+ findIndexBy,
25
+ } = require("@bigbinary/neeto-commons-frontend/pure");
26
+
27
+ const modifyDefaultRulesConfig = (webpackConfig, rules = {}) => {
28
+ const defaultRuleType = ["asset/resource", "asset/source"];
29
+
30
+ Object.keys(rules).forEach(ruleName => {
31
+ if (defaultRuleType.includes(ruleName)) {
32
+ const rule = findBy(
33
+ { type: "asset/resource" },
34
+ webpackConfig.module.rules
35
+ );
36
+
37
+ const rulePosition = findIndexBy(
38
+ { type: ruleName },
39
+ webpackConfig.module.rules
40
+ );
41
+
42
+ Object.keys(rules[ruleName]).forEach(attribute => {
43
+ if (rule[attribute] !== undefined) {
44
+ rule[attribute] = rules[ruleName][attribute];
45
+ }
46
+ });
47
+
48
+ webpackConfig.module.rules[rulePosition] = rule;
49
+ } else {
50
+ throw new Error("Invalid default rule type");
51
+ }
52
+ });
53
+
54
+ return webpackConfig;
55
+ };
56
+
57
+ module.exports = modifyDefaultRulesConfig;
@@ -0,0 +1,41 @@
1
+ const process = require("process");
2
+
3
+ const Dotenv = require("dotenv-webpack");
4
+ const { webpackConfig, merge } = require("shakapacker");
5
+ const webpack = require("webpack");
6
+
7
+ const customizeWebpackDefaultRules = require("./helpers/customize-default-rules");
8
+ const resolve = require("./resolve");
9
+ const rules = require("./rules");
10
+
11
+ const dotEnvFileSuffix =
12
+ process.env.NODE_ENV === "production" ? "" : `.${process.env.NODE_ENV}`;
13
+
14
+ const commonOptions = {
15
+ infrastructureLogging: { level: "warn" },
16
+ devtool: "source-map",
17
+ resolve,
18
+ module: { rules },
19
+ plugins: [
20
+ new webpack.ProvidePlugin({ process: "process/browser" }),
21
+ new Dotenv({
22
+ path: `./.env${dotEnvFileSuffix}`,
23
+ systemvars: true,
24
+ silent: true,
25
+ }),
26
+ ],
27
+ };
28
+
29
+ // This rule is causing issues to react-svg-loader
30
+ const defaultRules = {
31
+ "asset/resource": {
32
+ test: /\.(bmp|gif|jpe?g|png|tiff|ico|avif|webp|eot|otf|ttf|woff|woff2)$/,
33
+ },
34
+ };
35
+
36
+ const customWebpackConfig = customizeWebpackDefaultRules(
37
+ webpackConfig,
38
+ defaultRules
39
+ );
40
+
41
+ module.exports = merge(customWebpackConfig, commonOptions);
@@ -0,0 +1,47 @@
1
+ const path = require("path");
2
+
3
+ const absolutePath = basePath =>
4
+ path.resolve(__dirname, "../../../../../", `app/javascript/${basePath}`);
5
+
6
+ module.exports = {
7
+ alias: {
8
+ apis: absolutePath("src/apis"),
9
+ assets: absolutePath("src/assets"),
10
+ components: absolutePath("src/components"),
11
+ hooks: absolutePath("src/hooks"),
12
+ reducers: absolutePath("src/reducers"),
13
+ routes: absolutePath("src/routes"),
14
+ stores: absolutePath("src/stores"),
15
+ translations: absolutePath("src/translations"),
16
+ utils: absolutePath("src/utils"),
17
+ src: absolutePath("src"),
18
+ neetoui: "@bigbinary/neetoui",
19
+ neetocommons: "@bigbinary/neeto-commons-frontend",
20
+ neetoicons: "@bigbinary/neeto-icons",
21
+ neetoteam: "@bigbinary/neeto-team-members-frontend",
22
+ neetoeditor: "@bigbinary/neeto-editor",
23
+ neetofilters: "@bigbinary/neeto-filters-frontend",
24
+ images: path.resolve(__dirname, "../../../../../", "app/assets/images"),
25
+ },
26
+ extensions: [
27
+ ".ts",
28
+ ".mjs",
29
+ ".js",
30
+ ".sass",
31
+ ".scss",
32
+ ".css",
33
+ ".module.sass",
34
+ ".module.scss",
35
+ ".module.css",
36
+ ".png",
37
+ ".svg",
38
+ ".gif",
39
+ ".jpeg",
40
+ ".jpg",
41
+ ],
42
+ fallback: {
43
+ util: require.resolve("util/"),
44
+ url: require.resolve("url/"),
45
+ fs: false,
46
+ },
47
+ };
@@ -0,0 +1,43 @@
1
+ module.exports = [
2
+ {
3
+ test: /\.svg$/i,
4
+ use: [
5
+ {
6
+ loader: "@svgr/webpack",
7
+ options: {
8
+ svgoConfig: { plugins: ["preset-default"] },
9
+ },
10
+ },
11
+ ],
12
+ },
13
+ {
14
+ test: /\.ts$/,
15
+ exclude: /node_modules/,
16
+ use: {
17
+ loader: "babel-loader",
18
+ options: {
19
+ presets: ["@babel/preset-env", "@babel/preset-typescript"],
20
+ },
21
+ },
22
+ },
23
+ {
24
+ test: /\.mp3$/,
25
+ use: [
26
+ "babel-loader",
27
+ {
28
+ loader: "file-loader",
29
+ options: {
30
+ query: {
31
+ name: "static/media/[name].[hash:8].[ext]",
32
+ },
33
+ },
34
+ },
35
+ ],
36
+ },
37
+ {
38
+ test: /\.m?js$/,
39
+ resolve: {
40
+ fullySpecified: false, // allows webpack to ignore some package rules as the Strict EcmaScript Module mode.
41
+ },
42
+ },
43
+ ];
@@ -980,6 +980,81 @@ function initializeGlobalProps() {
980
980
  deepFreezeObject(window.globalProps);
981
981
  }
982
982
 
983
+ var generic = {
984
+ error: "Something went wrong. Please try again later."
985
+ };
986
+ var authentication = {
987
+ notLoggedIn: "Could not authenticate, please login to continue!",
988
+ couldNotAuth: "Could not authenticate with the provided %{parameter}.",
989
+ incorrectPassword: "Current password is incorrect. Please try again.",
990
+ incorrectEmailPassword: "Incorrect email or password. Please try again."
991
+ };
992
+ var authorization = {
993
+ unauthorized: "You are not authorized to perform this action."
994
+ };
995
+ var resource = {
996
+ add_one: "{{entity}} has been added successfully.",
997
+ add_other: "{{entity}} have been added successfully.",
998
+ save: "{{entity}} has been saved successfully.",
999
+ update: "{{entity}} has been updated successfully.",
1000
+ delete_one: "{{entity}} has been deleted successfully.",
1001
+ delete_other: "{{entity}} have been deleted successfully.",
1002
+ clone: "{{entity}} has been cloned successfully.",
1003
+ notFound: "{{entity}} does not exist.",
1004
+ remove_one: "{{entity}} successfully removed",
1005
+ remove_other: "{{entity}}s successfully removed",
1006
+ sent: "{{entity}} sent successfully."
1007
+ };
1008
+ var otp = {
1009
+ sent: "OTP has been sent successfully.",
1010
+ invalid: "Invalid OTP",
1011
+ verified: "OTP has been verified successfully."
1012
+ };
1013
+ var upload = {
1014
+ error: "An error occured while uploading the file"
1015
+ };
1016
+ var image = {
1017
+ profile: {
1018
+ removalFailed: "Failed to remove profile picture",
1019
+ removalSuccess: "Profile picture successfully removed"
1020
+ },
1021
+ contentTypeInvalid: "Other than jpg, png, svg are not supported",
1022
+ sizeOutOfRange: "Should not be more than {{maxSize, number}} MB"
1023
+ };
1024
+ var userRole = {
1025
+ deactivateActiveAdmin: "You cannot deactivate active admin from the organization!"
1026
+ };
1027
+ var activeRecord = {
1028
+ error: {
1029
+ blankName: "Name can't be blank",
1030
+ blankDescription: "Description can't be blank",
1031
+ blankValue: "Value can't be blank",
1032
+ prefixType: "Prefix type {{value}} is not valid",
1033
+ minimumEntryLimit: "Minimum entry limit must be less than or equal to {{maximumEntryLimit, number}}",
1034
+ maximumEntryLimit: "Maximum entry limit must be greater than or equal to {{minimumEntryLimit, number}}"
1035
+ }
1036
+ };
1037
+ var sessions = {
1038
+ expiry: "Your session has expired. Please login again."
1039
+ };
1040
+ var payment = {
1041
+ error: {
1042
+ incomplete: "Your payment could not be completed"
1043
+ }
1044
+ };
1045
+ var invitations = {
1046
+ deleted_one: "Invitation has been deleted successfully",
1047
+ deleted_other: "{{count, number}} Invitations have been deleted successfully",
1048
+ sent_one: "Invitation has been sent successfully",
1049
+ sent_other: "{{count, number}} Invitations have been sent successfully",
1050
+ notFound: "{{email}} was not invited to test this website."
1051
+ };
1052
+ var github = {
1053
+ error: {
1054
+ webhookPermissionDenied: "Permission denied. Ensure you have permission to create webhooks for the repository.",
1055
+ primaryNonDeletable: "Primary Github account cannot be deleted."
1056
+ }
1057
+ };
983
1058
  var neetoCommons = {
984
1059
  errorPage: {
985
1060
  cantBeFound: "The page you're looking for <br /> can't be found.",
@@ -1067,9 +1142,9 @@ var neetoCommons = {
1067
1142
  },
1068
1143
  body: {
1069
1144
  values: {
1070
- embedCode: "<p>Hi,</p> <p>We are going to use {{selectedWidgets}}. Please find the code snippet for the installation of the {{selectedWidgets}} widget. You can find the documentation regarding this at <configureLink>{{neetoKbUrl}}</configureLink>.</p> <p>If you still need help then send an email to <mail>{{helpEmail}}</mail>.</p>",
1071
- userIdentity: "Hey there. This is the object structure that you can use to specify the user identity for neetoWidget. You can find the documentation at - {{userIdentityKbUrl}}.",
1072
- sessionContext: "Hey there. This is the object structure that you can use to specify the contextual values for neetoReplay sessions. You can find the documentation at - {{sessionContextKbUrl}}."
1145
+ embedCode: "<p>Hi,</p> <p>We are going to use {{selectedWidgets}}.</p> <p>Please find the code snippet for the installation of the {{selectedWidgets}} widget.</p> <p>You can find the documentation regarding this at <configureLink>{{neetoKbUrl}}</configureLink>.</p> <p>If you still need help then send an email to <mail>{{helpEmail}}</mail>.</p>",
1146
+ userIdentity: "<p>Hi,</p> <p>This is the object structure that you can use to specify the user identity for neetoWidget.</p> <p>You can find the documentation at <configureLink>{{userIdentityKbUrl}}</configureLink>.</p>",
1147
+ sessionContext: "<p>Hi,</p> <p>This is the object structure that you can use to specify the contextual values for neetoReplay sessions.</p> <p>You can find the documentation at <configureLink>{{sessionContextKbUrl}}</configureLink>.</p>"
1073
1148
  }
1074
1149
  },
1075
1150
  actions: {
@@ -1155,9 +1230,37 @@ var neetoCommons = {
1155
1230
  buttonLabel: "Contact us"
1156
1231
  },
1157
1232
  unknownBrowserMsg: "an unknown browser"
1233
+ },
1234
+ ipRestriction: {
1235
+ switchLabel: "Enable IP restriction",
1236
+ description: "Restrict access to only trusted locations and networks by defining the range of allowed IP addresses",
1237
+ allowedIpRangeTitle: "Allowed IP range",
1238
+ ipStart: "IP start",
1239
+ ipEnd: "IP end",
1240
+ actions: "Actions",
1241
+ allowedIpRangeConfirmation: "This can't be undone. Confirm deletion of IP range {{ipStart}} to {{ipEnd}}",
1242
+ validations: {
1243
+ invalidIp: "Invalid IPv4 address format",
1244
+ ipEndGreaterThanIpStart: "IP end should be greater than or equal to IP start"
1245
+ },
1246
+ currentIpTitle: "Your current IP is",
1247
+ currentIpDescription: "Your current IP will be added to the allowed IP range by default. You will not be able to save the IP settings without your current IP address on the list"
1158
1248
  }
1159
1249
  };
1160
1250
  var en = {
1251
+ generic: generic,
1252
+ authentication: authentication,
1253
+ authorization: authorization,
1254
+ resource: resource,
1255
+ otp: otp,
1256
+ upload: upload,
1257
+ image: image,
1258
+ userRole: userRole,
1259
+ activeRecord: activeRecord,
1260
+ sessions: sessions,
1261
+ payment: payment,
1262
+ invitations: invitations,
1263
+ github: github,
1161
1264
  neetoCommons: neetoCommons
1162
1265
  };
1163
1266
 
package/initializers.js CHANGED
@@ -968,6 +968,81 @@ function initializeGlobalProps() {
968
968
  deepFreezeObject(window.globalProps);
969
969
  }
970
970
 
971
+ var generic = {
972
+ error: "Something went wrong. Please try again later."
973
+ };
974
+ var authentication = {
975
+ notLoggedIn: "Could not authenticate, please login to continue!",
976
+ couldNotAuth: "Could not authenticate with the provided %{parameter}.",
977
+ incorrectPassword: "Current password is incorrect. Please try again.",
978
+ incorrectEmailPassword: "Incorrect email or password. Please try again."
979
+ };
980
+ var authorization = {
981
+ unauthorized: "You are not authorized to perform this action."
982
+ };
983
+ var resource = {
984
+ add_one: "{{entity}} has been added successfully.",
985
+ add_other: "{{entity}} have been added successfully.",
986
+ save: "{{entity}} has been saved successfully.",
987
+ update: "{{entity}} has been updated successfully.",
988
+ delete_one: "{{entity}} has been deleted successfully.",
989
+ delete_other: "{{entity}} have been deleted successfully.",
990
+ clone: "{{entity}} has been cloned successfully.",
991
+ notFound: "{{entity}} does not exist.",
992
+ remove_one: "{{entity}} successfully removed",
993
+ remove_other: "{{entity}}s successfully removed",
994
+ sent: "{{entity}} sent successfully."
995
+ };
996
+ var otp = {
997
+ sent: "OTP has been sent successfully.",
998
+ invalid: "Invalid OTP",
999
+ verified: "OTP has been verified successfully."
1000
+ };
1001
+ var upload = {
1002
+ error: "An error occured while uploading the file"
1003
+ };
1004
+ var image = {
1005
+ profile: {
1006
+ removalFailed: "Failed to remove profile picture",
1007
+ removalSuccess: "Profile picture successfully removed"
1008
+ },
1009
+ contentTypeInvalid: "Other than jpg, png, svg are not supported",
1010
+ sizeOutOfRange: "Should not be more than {{maxSize, number}} MB"
1011
+ };
1012
+ var userRole = {
1013
+ deactivateActiveAdmin: "You cannot deactivate active admin from the organization!"
1014
+ };
1015
+ var activeRecord = {
1016
+ error: {
1017
+ blankName: "Name can't be blank",
1018
+ blankDescription: "Description can't be blank",
1019
+ blankValue: "Value can't be blank",
1020
+ prefixType: "Prefix type {{value}} is not valid",
1021
+ minimumEntryLimit: "Minimum entry limit must be less than or equal to {{maximumEntryLimit, number}}",
1022
+ maximumEntryLimit: "Maximum entry limit must be greater than or equal to {{minimumEntryLimit, number}}"
1023
+ }
1024
+ };
1025
+ var sessions = {
1026
+ expiry: "Your session has expired. Please login again."
1027
+ };
1028
+ var payment = {
1029
+ error: {
1030
+ incomplete: "Your payment could not be completed"
1031
+ }
1032
+ };
1033
+ var invitations = {
1034
+ deleted_one: "Invitation has been deleted successfully",
1035
+ deleted_other: "{{count, number}} Invitations have been deleted successfully",
1036
+ sent_one: "Invitation has been sent successfully",
1037
+ sent_other: "{{count, number}} Invitations have been sent successfully",
1038
+ notFound: "{{email}} was not invited to test this website."
1039
+ };
1040
+ var github = {
1041
+ error: {
1042
+ webhookPermissionDenied: "Permission denied. Ensure you have permission to create webhooks for the repository.",
1043
+ primaryNonDeletable: "Primary Github account cannot be deleted."
1044
+ }
1045
+ };
971
1046
  var neetoCommons = {
972
1047
  errorPage: {
973
1048
  cantBeFound: "The page you're looking for <br /> can't be found.",
@@ -1055,9 +1130,9 @@ var neetoCommons = {
1055
1130
  },
1056
1131
  body: {
1057
1132
  values: {
1058
- embedCode: "<p>Hi,</p> <p>We are going to use {{selectedWidgets}}. Please find the code snippet for the installation of the {{selectedWidgets}} widget. You can find the documentation regarding this at <configureLink>{{neetoKbUrl}}</configureLink>.</p> <p>If you still need help then send an email to <mail>{{helpEmail}}</mail>.</p>",
1059
- userIdentity: "Hey there. This is the object structure that you can use to specify the user identity for neetoWidget. You can find the documentation at - {{userIdentityKbUrl}}.",
1060
- sessionContext: "Hey there. This is the object structure that you can use to specify the contextual values for neetoReplay sessions. You can find the documentation at - {{sessionContextKbUrl}}."
1133
+ embedCode: "<p>Hi,</p> <p>We are going to use {{selectedWidgets}}.</p> <p>Please find the code snippet for the installation of the {{selectedWidgets}} widget.</p> <p>You can find the documentation regarding this at <configureLink>{{neetoKbUrl}}</configureLink>.</p> <p>If you still need help then send an email to <mail>{{helpEmail}}</mail>.</p>",
1134
+ userIdentity: "<p>Hi,</p> <p>This is the object structure that you can use to specify the user identity for neetoWidget.</p> <p>You can find the documentation at <configureLink>{{userIdentityKbUrl}}</configureLink>.</p>",
1135
+ sessionContext: "<p>Hi,</p> <p>This is the object structure that you can use to specify the contextual values for neetoReplay sessions.</p> <p>You can find the documentation at <configureLink>{{sessionContextKbUrl}}</configureLink>.</p>"
1061
1136
  }
1062
1137
  },
1063
1138
  actions: {
@@ -1143,9 +1218,37 @@ var neetoCommons = {
1143
1218
  buttonLabel: "Contact us"
1144
1219
  },
1145
1220
  unknownBrowserMsg: "an unknown browser"
1221
+ },
1222
+ ipRestriction: {
1223
+ switchLabel: "Enable IP restriction",
1224
+ description: "Restrict access to only trusted locations and networks by defining the range of allowed IP addresses",
1225
+ allowedIpRangeTitle: "Allowed IP range",
1226
+ ipStart: "IP start",
1227
+ ipEnd: "IP end",
1228
+ actions: "Actions",
1229
+ allowedIpRangeConfirmation: "This can't be undone. Confirm deletion of IP range {{ipStart}} to {{ipEnd}}",
1230
+ validations: {
1231
+ invalidIp: "Invalid IPv4 address format",
1232
+ ipEndGreaterThanIpStart: "IP end should be greater than or equal to IP start"
1233
+ },
1234
+ currentIpTitle: "Your current IP is",
1235
+ currentIpDescription: "Your current IP will be added to the allowed IP range by default. You will not be able to save the IP settings without your current IP address on the list"
1146
1236
  }
1147
1237
  };
1148
1238
  var en = {
1239
+ generic: generic,
1240
+ authentication: authentication,
1241
+ authorization: authorization,
1242
+ resource: resource,
1243
+ otp: otp,
1244
+ upload: upload,
1245
+ image: image,
1246
+ userRole: userRole,
1247
+ activeRecord: activeRecord,
1248
+ sessions: sessions,
1249
+ payment: payment,
1250
+ invitations: invitations,
1251
+ github: github,
1149
1252
  neetoCommons: neetoCommons
1150
1253
  };
1151
1254
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-commons-frontend",
3
- "version": "2.0.24",
3
+ "version": "2.0.26",
4
4
  "description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
5
5
  "repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",
@@ -16,7 +16,8 @@
16
16
  "initializers.*",
17
17
  "react-utils.*",
18
18
  "utils.*",
19
- "pure.*"
19
+ "pure.*",
20
+ "configs"
20
21
  ],
21
22
  "lint-staged": {
22
23
  "**/*.{js,jsx,json}": [
@@ -39,7 +40,8 @@
39
40
  "./initializers": {
40
41
  "import": "./initializers.js",
41
42
  "require": "./initializers.cjs.js"
42
- }
43
+ },
44
+ "./configs/*": "./configs/*"
43
45
  },
44
46
  "devDependencies": {
45
47
  "@babel/eslint-parser": "^7.18.2",
@@ -47,7 +49,7 @@
47
49
  "@babel/preset-env": "^7.17.10",
48
50
  "@babel/preset-react": "^7.16.7",
49
51
  "@bigbinary/neeto-icons": "^1.8.35",
50
- "@bigbinary/neetoui": "^4.1.1",
52
+ "@bigbinary/neetoui": "^4.1.33",
51
53
  "@honeybadger-io/react": "2.0.1",
52
54
  "@rollup/plugin-alias": "^3.1.9",
53
55
  "@rollup/plugin-babel": "^5.3.1",
@@ -60,9 +62,10 @@
60
62
  "@testing-library/react-hooks": "^8.0.0",
61
63
  "@testing-library/user-event": "13.5.0",
62
64
  "antd": "4.18.7",
63
- "autoprefixer": "^10.4.7",
65
+ "autoprefixer": "^10.4.13",
64
66
  "axios": "^0.27.2",
65
67
  "babel-jest": "27.0.6",
68
+ "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
66
69
  "dayjs": "1.11.1",
67
70
  "eslint": "^8.15.0",
68
71
  "eslint-config-prettier": "^8.5.0",
@@ -78,6 +81,7 @@
78
81
  "formik": "^2.2.9",
79
82
  "husky": "^7.0.4",
80
83
  "i18next": "21.7.0",
84
+ "ip-num": "^1.5.0",
81
85
  "jest": "27.5.1",
82
86
  "js-logger": "^1.6.1",
83
87
  "lint-staged": "^12.3.7",
@@ -99,21 +103,26 @@
99
103
  "rollup-plugin-cleaner": "^1.0.0",
100
104
  "rollup-plugin-peer-deps-external": "^2.2.4",
101
105
  "yup": "^0.32.11",
102
- "zustand": "^4.1.2",
103
- "babel-plugin-transform-react-remove-prop-types": "^0.4.24"
106
+ "zustand": "^4.1.2"
104
107
  },
105
108
  "dependencies": {},
106
109
  "peerDependencies": {
107
110
  "@bigbinary/neeto-icons": "^1.8.35",
108
111
  "@bigbinary/neetoui": "^4.1.1",
109
112
  "@honeybadger-io/react": "2.0.1",
113
+ "@svgr/webpack": "^6.5.1",
110
114
  "antd": "4.18.7",
115
+ "autoprefixer": "^10.4.13",
111
116
  "axios": "^0.27.2",
112
117
  "dayjs": "1.11.1",
118
+ "dotenv-webpack": "^8.0.1",
113
119
  "formik": "^2.2.9",
114
120
  "i18next": "21.7.0",
115
121
  "js-logger": "^1.6.1",
116
122
  "mixpanel-browser": "^2.45.0",
123
+ "postcss-flexbugs-fixes": "^5.0.2",
124
+ "postcss-import": "^15.1.0",
125
+ "postcss-preset-env": "^7.8.3",
117
126
  "ramda": "^0.28.0",
118
127
  "react": "^17.0.2",
119
128
  "react-helmet": "^6.1.0",
@@ -121,6 +130,9 @@
121
130
  "react-query": "^3.39.2",
122
131
  "react-router-dom": "^5.2.0",
123
132
  "react-toastify": "^9.0.8",
133
+ "shakapacker": "^6.5.5",
134
+ "tailwindcss": "^3.2.4",
135
+ "webpack": "^5.75.0",
124
136
  "yup": "^0.32.11"
125
137
  }
126
138
  }