@dashadmin/dash-admin 1.3.26 → 1.3.28

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 CHANGED
@@ -0,0 +1,36 @@
1
+ # @dashadmin/dash-admin
2
+
3
+ > The Dash admin application shell — a batteries-included, react-admin based admin UI.
4
+
5
+ ## Overview
6
+
7
+ Top-level composition package that wires together state, auth, data providers, layout, theming and the auto-admin engine into a single mountable `DASHAdmin` component. This is the main entry point most applications consume.
8
+
9
+ ## Key exports & features
10
+
11
+ - `DASHAdmin` root component (resources, routing, layout, providers)
12
+ - Built-in `DashThemeProvider` / `useDashThemeContext` theming context
13
+ - Auth flows: login, recover password, verify account, change password
14
+ - Integrates `dash-admin-state`, `dash-auto-admin`, `dash-auth`, `dash-components`, `dash-dialog`, `dash-modal`
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ # From the public npm registry
20
+ npm install @dashadmin/dash-admin
21
+
22
+ # Or the local Verdaccio registry (unscoped)
23
+ npm install dash-admin --registry http://localhost:4873
24
+ ```
25
+
26
+ ## Internal Dash dependencies
27
+
28
+ `@dashadmin/dash-admin-state`, `@dashadmin/dash-auto-admin`, `@dashadmin/dash-constants`, `@dashadmin/dash-dialog`, `@dashadmin/dash-styles`, `@dashadmin/dash-modal`, `@dashadmin/dash-components`, `@dashadmin/dash-axios-hook`, `@dashadmin/dash-utils`, `@dashadmin/dash-auth`
29
+
30
+ ## Development & publishing
31
+
32
+ This package is part of the **dash-frontend-core** monorepo. See [`DEVELOPMENT.md`](../../DEVELOPMENT.md) for the source-modification workflow, local Verdaccio publishing, npm publishing and version-bump policy.
33
+
34
+ ---
35
+
36
+ _Part of the [Dash Framework](https://www.npmjs.com/org/dashadmin) · `@dashadmin` scope._
@@ -2,6 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { useEffect, useState, useRef } from "react";
3
3
  import { BrowserRouter, Route, Routes, useLocation } from "react-router-dom";
4
4
  import { AnimatePresence } from "framer-motion";
5
+ import { DASHAdminSystemConstants } from "dash-constants";
5
6
  import MotionWrapper from "./layout/MotionWrapper";
6
7
  const RoutingWrapper = ({
7
8
  Wrapper,
@@ -18,7 +19,7 @@ const RoutingWrapper = ({
18
19
  const AnimatedRoutesWrapper = ({ children }) => {
19
20
  const location = useLocation();
20
21
  let method = "wait";
21
- let transitionEnabled = true;
22
+ let transitionEnabled = DASHAdminSystemConstants.system.PAGE_TRANSITIONS;
22
23
  const pathParts = location.pathname.split("/");
23
24
  const lastPart = pathParts[pathParts.length - 1];
24
25
  const [show, setShow] = useState(true);
@@ -1,3 +1,4 @@
1
+ var _a;
1
2
  const getEnvironmentVariable = (environmentVariable) => {
2
3
  const unvalidatedEnvironmentVariable = process.env[environmentVariable];
3
4
  return unvalidatedEnvironmentVariable || null;
@@ -30,8 +31,9 @@ const system = {
30
31
  DEFAULT_PER_PAGE: Number(getEnv("DEFAULT_PER_PAGE")) || null,
31
32
  //URL_PREFIX: getEnv('DASH_ADMIN_URL_PREFIX') || '#/',
32
33
  URL_PREFIX: getEnv("DASH_ADMIN_URL_PREFIX") || "/",
33
- //PAGE_TRANSITIONS: JSON.parse(getEnv('PAGE_TRANSITIONS')) || false,
34
- PAGE_TRANSITIONS: false,
34
+ // Route/page transition animations. Disable via env for low-powered devices
35
+ // (Raspberry Pi). Defaults true when unset; only "false" turns it off.
36
+ PAGE_TRANSITIONS: String((_a = getEnv("PAGE_TRANSITIONS")) != null ? _a : "true").toLowerCase() !== "false",
35
37
  GOOGLE_SIGNUP: JSON.parse(getEnv("APP_GOOGLE_SIGNUP")) || false,
36
38
  RECAPTCHA_ENABLED: JSON.parse(getEnv("APP_RECAPTCHA_ENABLED")) || false,
37
39
  RECAPTCHA_TOKEN: getEnv("APP_RECAPTCHA_TOKEN") || "UNSET",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashadmin/dash-admin",
3
- "version": "1.3.26",
3
+ "version": "1.3.28",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -35,6 +35,11 @@
35
35
  "@rollup/plugin-node-resolve": "latest",
36
36
  "@rollup/plugin-replace": "latest",
37
37
  "@rollup/plugin-typescript": "latest",
38
+ "@dashadmin/dash-admin-state": "workspace:*",
39
+ "@dashadmin/dash-auto-admin": "workspace:*",
40
+ "@dashadmin/dash-constants": "workspace:*",
41
+ "@dashadmin/dash-dialog": "workspace:*",
42
+ "@dashadmin/dash-styles": "workspace:*",
38
43
  "framer-motion": "latest",
39
44
  "prop-types": "latest",
40
45
  "query-string": "latest",
@@ -54,11 +59,6 @@
54
59
  "rollup-plugin-dts": "latest",
55
60
  "rollup-plugin-peer-deps-external": "latest",
56
61
  "rollup-plugin-svg": "latest",
57
- "@dashadmin/dash-admin-state": "workspace:*",
58
- "@dashadmin/dash-auto-admin": "workspace:*",
59
- "@dashadmin/dash-constants": "workspace:*",
60
- "@dashadmin/dash-dialog": "workspace:*",
61
- "@dashadmin/dash-styles": "workspace:*",
62
62
  "@dashadmin/dash-modal": "workspace:*",
63
63
  "@dashadmin/dash-components": "workspace:*",
64
64
  "@dashadmin/dash-axios-hook": "workspace:*",
@@ -76,6 +76,8 @@
76
76
  "@types/react-dom": "latest",
77
77
  "@zerollup/ts-transform-paths": "latest",
78
78
  "babel-loader": "latest",
79
+ "@dashadmin/dash-eslint": "workspace:*",
80
+ "@dashadmin/dash-tsconfig": "workspace:*",
79
81
  "eslint": "latest",
80
82
  "eslint-config-airbnb": "latest",
81
83
  "eslint-config-airbnb-typescript": "latest",
@@ -89,6 +91,7 @@
89
91
  "eslint-plugin-prettier": "latest",
90
92
  "eslint-plugin-react": "latest",
91
93
  "eslint-plugin-react-hooks": "latest",
94
+ "@dashadmin/dash-prettier": "workspace:*",
92
95
  "query-string": "latest",
93
96
  "react-dom": "latest",
94
97
  "rollup": "latest",
@@ -103,10 +106,7 @@
103
106
  "tsc": "latest",
104
107
  "tsc-alias": "latest",
105
108
  "ttypescript": "latest",
106
- "typescript": "latest",
107
- "@dashadmin/dash-eslint": "workspace:*",
108
- "@dashadmin/dash-tsconfig": "workspace:*",
109
- "@dashadmin/dash-prettier": "workspace:*"
109
+ "typescript": "latest"
110
110
  },
111
111
  "eslintConfig": {
112
112
  "extends": "react-app"
@@ -2,6 +2,7 @@ import { PropsWithChildren, useEffect, useState, useRef } from "react";
2
2
  import { BrowserRouter, Route, Routes, useLocation } from "react-router-dom";
3
3
 
4
4
  import { AnimatePresence } from "framer-motion";
5
+ import { DASHAdminSystemConstants } from "dash-constants";
5
6
  import MotionWrapper from "./layout/MotionWrapper";
6
7
 
7
8
  /**
@@ -72,7 +73,10 @@ const RoutingWrapper: React.FC<IDASHRoutingWrapper> = ({
72
73
  export const AnimatedRoutesWrapper: React.FC<PropsWithChildren> = ({ children }) => {
73
74
  const location = useLocation();
74
75
  let method = "wait";
75
- let transitionEnabled = true;
76
+ // Driven by env: DASHAdminSystemConstants.system.PAGE_TRANSITIONS reads
77
+ // `<PREFIX>PAGE_TRANSITIONS` (default true). Set to false for Raspberry Pi
78
+ // / low-powered terminals to skip framer-motion route animations.
79
+ let transitionEnabled = DASHAdminSystemConstants.system.PAGE_TRANSITIONS;
76
80
  const pathParts = location.pathname.split('/');
77
81
  const lastPart = pathParts[pathParts.length - 1];
78
82
  const [show, setShow] = useState(true); // Initialize as true
@@ -53,8 +53,9 @@ const system = {
53
53
  DEFAULT_PER_PAGE: Number(getEnv('DEFAULT_PER_PAGE')) || null,
54
54
  //URL_PREFIX: getEnv('DASH_ADMIN_URL_PREFIX') || '#/',
55
55
  URL_PREFIX: getEnv('DASH_ADMIN_URL_PREFIX') || '/',
56
- //PAGE_TRANSITIONS: JSON.parse(getEnv('PAGE_TRANSITIONS')) || false,
57
- PAGE_TRANSITIONS: false,
56
+ // Route/page transition animations. Disable via env for low-powered devices
57
+ // (Raspberry Pi). Defaults true when unset; only "false" turns it off.
58
+ PAGE_TRANSITIONS: String(getEnv('PAGE_TRANSITIONS') ?? 'true').toLowerCase() !== 'false',
58
59
 
59
60
  GOOGLE_SIGNUP: JSON.parse(getEnv('APP_GOOGLE_SIGNUP')) || false,
60
61
  RECAPTCHA_ENABLED: JSON.parse(getEnv('APP_RECAPTCHA_ENABLED')) || false,