@variamosple/variamos-components 0.2.4 → 0.3.0

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 (53) hide show
  1. package/README.md +27 -42
  2. package/dist/Common/Events.d.ts +3 -2
  3. package/dist/Common/Events.js +18 -11
  4. package/dist/Common/fieldOf.d.ts +2 -0
  5. package/dist/Common/fieldOf.js +7 -0
  6. package/dist/Common/isAllowedFor.d.ts +7 -0
  7. package/dist/Common/isAllowedFor.js +9 -0
  8. package/dist/Components/AuthWrapper/addressWithoutToken.d.ts +9 -0
  9. package/dist/Components/AuthWrapper/addressWithoutToken.js +7 -0
  10. package/dist/Components/AuthWrapper/index.js +18 -17
  11. package/dist/Components/ConfirmationModal/index.js +3 -3
  12. package/dist/Components/Footer/index.js +1 -1
  13. package/dist/Components/Header/BugFormModal.d.ts +2 -0
  14. package/dist/Components/Header/BugFormModal.js +39 -37
  15. package/dist/Components/Header/HeaderOptions.js +80 -86
  16. package/dist/Components/Header/MenuItem.js +24 -34
  17. package/dist/Components/Header/SubHeader.js +17 -29
  18. package/dist/Components/Header/index.js +25 -13
  19. package/dist/Components/Header/submitBugReport.d.ts +15 -0
  20. package/dist/Components/Header/submitBugReport.js +23 -0
  21. package/dist/Components/NotAuthorized/index.js +1 -1
  22. package/dist/Components/Notifications/NotificationBell.js +10 -10
  23. package/dist/Components/Notifications/NotificationCard.d.ts +9 -0
  24. package/dist/Components/Notifications/NotificationCard.js +81 -0
  25. package/dist/Components/Notifications/NotificationDrawer.js +139 -191
  26. package/dist/Components/Notifications/NotificationSettings.js +32 -28
  27. package/dist/Components/Notifications/mutedEventTypes.js +9 -9
  28. package/dist/Components/Notifications/notificationText.d.ts +7 -0
  29. package/dist/Components/Notifications/notificationText.js +38 -0
  30. package/dist/Components/Paginator/index.js +22 -22
  31. package/dist/Components/ProtectedRoute/index.js +18 -18
  32. package/dist/Components/index.d.ts +1 -1
  33. package/dist/Components/index.js +10 -10
  34. package/dist/Context/AnalyticsContext.d.ts +2 -2
  35. package/dist/Context/AnalyticsContext.js +15 -15
  36. package/dist/Context/MenuContext.js +39 -47
  37. package/dist/Context/NotificationContext.d.ts +2 -14
  38. package/dist/Context/NotificationContext.js +393 -458
  39. package/dist/Context/SessionContext.js +74 -81
  40. package/dist/Context/index.d.ts +1 -1
  41. package/dist/Context/index.js +11 -11
  42. package/dist/Context/notificationAccessToken.js +13 -13
  43. package/dist/Context/notificationApi.d.ts +43 -0
  44. package/dist/Context/notificationApi.js +83 -0
  45. package/dist/Context/useNotificationState.d.ts +35 -0
  46. package/dist/Context/useNotificationState.js +92 -0
  47. package/dist/Hooks/useDebouncedValue.js +20 -16
  48. package/dist/Hooks/usePaginatedQuery.js +14 -20
  49. package/dist/Hooks/useQuery.js +6 -6
  50. package/dist/Model/ResponseModel.d.ts +2 -2
  51. package/dist/Model/ResponseModel.js +9 -4
  52. package/dist/main.js +21 -21
  53. package/package.json +22 -15
@@ -1,6 +1,11 @@
1
- class a {
2
- constructor(t, s, r, e, i) {
3
- this.transactionId = t, this.errorCode = s, this.message = r, this.totalCount = e, this.data = i;
1
+ var i = Object.defineProperty;
2
+ var h = (r, t, s) => t in r ? i(r, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[t] = s;
3
+ var e = (r, t, s) => h(r, typeof t != "symbol" ? t + "" : t, s);
4
+ class d {
5
+ // The data is set with withData: a fifth parameter was never passed
6
+ constructor(t, s, o, a) {
7
+ e(this, "data");
8
+ this.transactionId = t, this.errorCode = s, this.message = o, this.totalCount = a;
4
9
  }
5
10
  withData(t) {
6
11
  return this.data = t, this;
@@ -10,5 +15,5 @@ class a {
10
15
  }
11
16
  }
12
17
  export {
13
- a as ResponseModel
18
+ d as ResponseModel
14
19
  };
package/dist/main.js CHANGED
@@ -4,16 +4,16 @@ import { confirmationModalDefaultProps as p } from "./Components/ConfirmationMod
4
4
  import { Footer as m } from "./Components/Footer/index.js";
5
5
  import { Header as a } from "./Components/Header/index.js";
6
6
  import { NotAuthorized as u } from "./Components/NotAuthorized/index.js";
7
- import { Paginator as l } from "./Components/Paginator/index.js";
8
- import { ProtectedRoute as c } from "./Components/ProtectedRoute/index.js";
9
- import { NotificationBell as N } from "./Components/Notifications/NotificationBell.js";
10
- import { NotificationDrawer as M } from "./Components/Notifications/NotificationDrawer.js";
11
- import { NotificationSettings as y } from "./Components/Notifications/NotificationSettings.js";
7
+ import { NotificationBell as l } from "./Components/Notifications/NotificationBell.js";
8
+ import { NotificationDrawer as c } from "./Components/Notifications/NotificationDrawer.js";
9
+ import { NotificationSettings as N } from "./Components/Notifications/NotificationSettings.js";
10
+ import { Paginator as M } from "./Components/Paginator/index.js";
11
+ import { ProtectedRoute as y } from "./Components/ProtectedRoute/index.js";
12
12
  import { AnalyticsContext as R, AnalyticsProvider as V, PAGE_VISIT_EVENT as b } from "./Context/AnalyticsContext.js";
13
13
  import { MenuContext as E, MenuContextProvider as S, useMenu as T } from "./Context/MenuContext.js";
14
- import { RouterContext as w, getBasePath as B, isAbsoluteUrl as I, useRouter as Q } from "./Context/RouterContext.js";
15
- import { SessionProvider as W, useSession as _ } from "./Context/SessionContext.js";
16
- import { NotificationProvider as F, useNotifications as G } from "./Context/NotificationContext.js";
14
+ import { NotificationProvider as w, useNotifications as B } from "./Context/NotificationContext.js";
15
+ import { RouterContext as Q, getBasePath as U, isAbsoluteUrl as W, useRouter as _ } from "./Context/RouterContext.js";
16
+ import { SessionProvider as F, useSession as G } from "./Context/SessionContext.js";
17
17
  import { withPageVisit as j } from "./HOC/WithPageVisit.js";
18
18
  import { useDebouncedValue as q } from "./Hooks/useDebouncedValue.js";
19
19
  import { usePageVisibility as K } from "./Hooks/usePageVisibility.js";
@@ -35,29 +35,29 @@ export {
35
35
  E as MenuContext,
36
36
  S as MenuContextProvider,
37
37
  u as NotAuthorized,
38
- N as NotificationBell,
39
- M as NotificationDrawer,
40
- F as NotificationProvider,
41
- y as NotificationSettings,
38
+ l as NotificationBell,
39
+ c as NotificationDrawer,
40
+ w as NotificationProvider,
41
+ N as NotificationSettings,
42
42
  b as PAGE_VISIT_EVENT,
43
43
  eo as PagedModel,
44
- l as Paginator,
45
- c as ProtectedRoute,
44
+ M as Paginator,
45
+ y as ProtectedRoute,
46
46
  to as ResponseModel,
47
- w as RouterContext,
48
- W as SessionProvider,
47
+ Q as RouterContext,
48
+ F as SessionProvider,
49
49
  xo as UserRegistration,
50
50
  p as confirmationModalDefaultProps,
51
- B as getBasePath,
52
- I as isAbsoluteUrl,
51
+ U as getBasePath,
52
+ W as isAbsoluteUrl,
53
53
  fo as mapToWebTarget,
54
54
  q as useDebouncedValue,
55
55
  T as useMenu,
56
- G as useNotifications,
56
+ B as useNotifications,
57
57
  K as usePageVisibility,
58
58
  O as usePaginatedQuery,
59
59
  Y as useQuery,
60
- Q as useRouter,
61
- _ as useSession,
60
+ _ as useRouter,
61
+ G as useSession,
62
62
  j as withPageVisit
63
63
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@variamosple/variamos-components",
3
3
  "private": false,
4
- "version": "0.2.4",
4
+ "version": "0.3.0",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -14,10 +14,16 @@
14
14
  "scripts": {
15
15
  "dev": "vite",
16
16
  "build": "tsc --p ./tsconfig.lib.json && vite build",
17
- "lint": "eslint .",
17
+ "check-package": "node scripts/check-package.mjs && publint --strict",
18
+ "typecheck": "tsc --noEmit -p tsconfig.app.json && tsc --noEmit -p tsconfig.lib.json && tsc --noEmit -p tsconfig.node.json",
19
+ "lint": "biome check --error-on-warnings . && node scripts/check-suppressions.mjs",
20
+ "format": "biome format --write .",
21
+ "find-deadcode": "knip",
18
22
  "preview": "vite preview",
19
23
  "test": "vitest run",
20
- "prepack": "npm run build"
24
+ "prepack": "npm run build",
25
+ "spell": "cspell --no-progress --dot --gitignore \"**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs,json,jsonc,css,md,yml,yaml,sh}\"",
26
+ "prepare": "husky"
21
27
  },
22
28
  "peerDependencies": {
23
29
  "react": "^18.3.1 || ^19.0.0",
@@ -29,25 +35,26 @@
29
35
  "socket.io-client": "^4.8.1"
30
36
  },
31
37
  "devDependencies": {
32
- "@eslint/js": "^9.19.0",
33
- "@types/node": "^22.13.4",
38
+ "@biomejs/biome": "^2.6.7",
39
+ "@commitlint/cli": "^21.2.4",
40
+ "@commitlint/config-conventional": "^21.2.4",
41
+ "@types/node": "^26.6.6",
34
42
  "@types/react": "^19.2.18",
35
- "@types/react-bootstrap": "^0.32.37",
36
43
  "@types/react-dom": "^19.2.4",
37
44
  "@vitejs/plugin-react": "^4.3.4",
38
- "eslint": "^9.19.0",
39
- "eslint-plugin-react-hooks": "^5.0.0",
40
- "eslint-plugin-react-refresh": "^0.4.18",
41
- "glob": "^11.0.1",
42
- "globals": "^15.14.0",
45
+ "cspell": "^10.5.0",
46
+ "glob": "^14.0.4",
47
+ "husky": "^9.1.7",
48
+ "knip": "^6.45.1",
49
+ "lint-staged": "^17.6.0",
50
+ "publint": "^0.3.25",
43
51
  "react": "^19.2.8",
44
52
  "react-dom": "^19.2.8",
45
- "typescript": "~5.7.2",
46
- "typescript-eslint": "^8.22.0",
47
- "vite": "^6.1.0",
53
+ "typescript": "^6.0.3",
54
+ "vite": "^6.4.5",
48
55
  "vite-plugin-dts": "^5.1.2",
49
56
  "vite-plugin-lib-inject-css": "^2.2.1",
50
- "vitest": "^4.1.11"
57
+ "vitest": "^4.1.12"
51
58
  },
52
59
  "allowScripts": {
53
60
  "esbuild@0.25.12": true