@visns-studio/visns-components 5.14.17 → 5.14.19

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/package.json CHANGED
@@ -12,8 +12,8 @@
12
12
  "@nivo/line": "^0.99.0",
13
13
  "@nivo/pie": "^0.99.0",
14
14
  "@tinymce/miniature": "^6.0.0",
15
- "@tinymce/tinymce-react": "^6.2.1",
16
- "@uiw/react-color": "^2.7.1",
15
+ "@tinymce/tinymce-react": "^6.3.0",
16
+ "@uiw/react-color": "^2.7.3",
17
17
  "@visns-studio/visns-datagrid-community": "1.1.0",
18
18
  "@visns-studio/visns-datagrid-enterprise": "1.1.0",
19
19
  "@vitejs/plugin-react": "^4.7.0",
@@ -24,13 +24,13 @@
24
24
  "dayjs": "^1.11.13",
25
25
  "fabric": "^6.7.1",
26
26
  "file-saver": "^2.0.5",
27
- "framer-motion": "^12.23.11",
27
+ "framer-motion": "^12.23.12",
28
28
  "html-react-parser": "^5.2.6",
29
29
  "lodash": "^4.17.21",
30
30
  "lodash.debounce": "^4.0.8",
31
- "lucide-react": "^0.532.0",
31
+ "lucide-react": "^0.536.0",
32
32
  "moment": "^2.30.1",
33
- "motion": "^12.23.11",
33
+ "motion": "^12.23.12",
34
34
  "numeral": "^2.0.6",
35
35
  "pluralize": "^8.0.0",
36
36
  "qrcode.react": "^4.2.0",
@@ -89,7 +89,7 @@
89
89
  "react-dom": "^17.0.0 || ^18.0.0"
90
90
  },
91
91
  "name": "@visns-studio/visns-components",
92
- "version": "5.14.17",
92
+ "version": "5.14.19",
93
93
  "description": "Various packages to assist in the development of our Custom Applications.",
94
94
  "main": "src/index.js",
95
95
  "files": [
@@ -274,7 +274,7 @@ const VisnsAutocomplete = memo((props) => {
274
274
  )}
275
275
  </div>
276
276
 
277
- {isFocused && !overwrite && (search.length > 1 || isLoading) && (
277
+ {isFocused && !overwrite && (search && search.length > 1 || isLoading) && (
278
278
  <ul
279
279
  ref={resultsRef}
280
280
  className={styles['AutocompletePlace-results']}
@@ -10,7 +10,7 @@ import CustomFetch from '../Fetch';
10
10
 
11
11
  import styles from '../styles/Login.module.scss';
12
12
 
13
- const Login = ({ logo, providers, setSystemAuth, setUserProfile }) => {
13
+ const Login = ({ logo, providers, setSystemAuth, setUserProfile, config = {} }) => {
14
14
  const location = useLocation();
15
15
  const navigate = useNavigate();
16
16
  const [isLoading, setIsLoading] = useState(false);
@@ -258,22 +258,24 @@ const Login = ({ logo, providers, setSystemAuth, setUserProfile }) => {
258
258
  Remember me
259
259
  </label>
260
260
  </div>
261
- <div>
262
- <Link
263
- to="/reset"
264
- style={{
265
- color: 'var(--primary-color, #4f46e5)',
266
- textDecoration: 'none',
267
- fontWeight: '500',
268
- fontSize: '0.875rem',
269
- }}
270
- className={
271
- styles.forgotPasswordLink
272
- }
273
- >
274
- Forgot password?
275
- </Link>
276
- </div>
261
+ {config.passwordReset !== false && (
262
+ <div>
263
+ <Link
264
+ to="/reset"
265
+ style={{
266
+ color: 'var(--primary-color, #4f46e5)',
267
+ textDecoration: 'none',
268
+ fontWeight: '500',
269
+ fontSize: '0.875rem',
270
+ }}
271
+ className={
272
+ styles.forgotPasswordLink
273
+ }
274
+ >
275
+ Forgot password?
276
+ </Link>
277
+ </div>
278
+ )}
277
279
  </div>
278
280
  </div>
279
281
  <div
@@ -65,6 +65,7 @@ const GenericAuth = ({
65
65
  themeType = 'primary',
66
66
  enforce2FA = false, // Default to not enforcing 2FA
67
67
  clientPortalConfig = null, // Configuration for client portal with component and URLs
68
+ config = {}, // Configuration object for auth features
68
69
  }) => {
69
70
  const navigate = useNavigate();
70
71
  const location = useLocation();
@@ -173,6 +174,7 @@ const GenericAuth = ({
173
174
  providers={providers}
174
175
  setIsAuthenticated={setIsAuthenticated}
175
176
  setUserProfile={setUserProfile}
177
+ config={config}
176
178
  />
177
179
  }
178
180
  />
@@ -320,13 +322,14 @@ const GenericAuth = ({
320
322
  };
321
323
 
322
324
  const LoginComponent = React.memo(
323
- ({ loginBg, logo, providers, setIsAuthenticated, setUserProfile }) => (
325
+ ({ loginBg, logo, providers, setIsAuthenticated, setUserProfile, config }) => (
324
326
  <Login
325
327
  loginBg={loginBg}
326
328
  logo={logo}
327
329
  providers={providers}
328
330
  setSystemAuth={setIsAuthenticated}
329
331
  setUserProfile={setUserProfile}
332
+ config={config}
330
333
  />
331
334
  )
332
335
  );