@churchapps/apphelper 0.7.3 → 0.7.5

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 (73) hide show
  1. package/dist/components/conversations/Conversations.d.ts +21 -0
  2. package/dist/components/conversations/Conversations.d.ts.map +1 -0
  3. package/dist/components/conversations/Conversations.js +92 -0
  4. package/dist/components/conversations/Conversations.js.map +1 -0
  5. package/dist/components/conversations/index.d.ts +2 -0
  6. package/dist/components/conversations/index.d.ts.map +1 -0
  7. package/dist/components/conversations/index.js +2 -0
  8. package/dist/components/conversations/index.js.map +1 -0
  9. package/dist/components/index.d.ts +1 -0
  10. package/dist/components/index.d.ts.map +1 -1
  11. package/dist/components/index.js +1 -0
  12. package/dist/components/index.js.map +1 -1
  13. package/dist/components/notes/AddNote.d.ts.map +1 -1
  14. package/dist/components/notes/AddNote.js +19 -1
  15. package/dist/components/notes/AddNote.js.map +1 -1
  16. package/dist/components/notes/Notes.d.ts.map +1 -1
  17. package/dist/components/notes/Notes.js +89 -74
  18. package/dist/components/notes/Notes.js.map +1 -1
  19. package/dist/components/notes/SubscriptionToggle.d.ts +38 -0
  20. package/dist/components/notes/SubscriptionToggle.d.ts.map +1 -0
  21. package/dist/components/notes/SubscriptionToggle.js +76 -0
  22. package/dist/components/notes/SubscriptionToggle.js.map +1 -0
  23. package/dist/components/notes/index.d.ts +1 -0
  24. package/dist/components/notes/index.d.ts.map +1 -1
  25. package/dist/components/notes/index.js +1 -0
  26. package/dist/components/notes/index.js.map +1 -1
  27. package/dist/components/wrapper/PrivateMessages.d.ts.map +1 -1
  28. package/dist/components/wrapper/PrivateMessages.js +12 -0
  29. package/dist/components/wrapper/PrivateMessages.js.map +1 -1
  30. package/dist/helpers/ConversationStore.d.ts +36 -0
  31. package/dist/helpers/ConversationStore.d.ts.map +1 -0
  32. package/dist/helpers/ConversationStore.js +238 -0
  33. package/dist/helpers/ConversationStore.js.map +1 -0
  34. package/dist/helpers/NotificationService.d.ts +3 -0
  35. package/dist/helpers/NotificationService.d.ts.map +1 -1
  36. package/dist/helpers/NotificationService.js +52 -13
  37. package/dist/helpers/NotificationService.js.map +1 -1
  38. package/dist/helpers/PresenceStore.d.ts +34 -0
  39. package/dist/helpers/PresenceStore.d.ts.map +1 -0
  40. package/dist/helpers/PresenceStore.js +93 -0
  41. package/dist/helpers/PresenceStore.js.map +1 -0
  42. package/dist/helpers/SocketHelper.d.ts +17 -0
  43. package/dist/helpers/SocketHelper.d.ts.map +1 -1
  44. package/dist/helpers/SocketHelper.js +70 -3
  45. package/dist/helpers/SocketHelper.js.map +1 -1
  46. package/dist/helpers/SubscriptionManager.d.ts +23 -0
  47. package/dist/helpers/SubscriptionManager.d.ts.map +1 -0
  48. package/dist/helpers/SubscriptionManager.js +118 -0
  49. package/dist/helpers/SubscriptionManager.js.map +1 -0
  50. package/dist/helpers/WebPushHelper.d.ts +36 -0
  51. package/dist/helpers/WebPushHelper.d.ts.map +1 -0
  52. package/dist/helpers/WebPushHelper.js +180 -0
  53. package/dist/helpers/WebPushHelper.js.map +1 -0
  54. package/dist/helpers/__tests__/WebPushHelper.test.d.ts +13 -0
  55. package/dist/helpers/__tests__/WebPushHelper.test.d.ts.map +1 -0
  56. package/dist/helpers/__tests__/WebPushHelper.test.js +99 -0
  57. package/dist/helpers/__tests__/WebPushHelper.test.js.map +1 -0
  58. package/dist/helpers/index.d.ts +5 -0
  59. package/dist/helpers/index.d.ts.map +1 -1
  60. package/dist/helpers/index.js +4 -0
  61. package/dist/helpers/index.js.map +1 -1
  62. package/dist/hooks/index.d.ts +2 -0
  63. package/dist/hooks/index.d.ts.map +1 -1
  64. package/dist/hooks/index.js +1 -0
  65. package/dist/hooks/index.js.map +1 -1
  66. package/dist/hooks/useConversation.d.ts +36 -0
  67. package/dist/hooks/useConversation.d.ts.map +1 -0
  68. package/dist/hooks/useConversation.js +152 -0
  69. package/dist/hooks/useConversation.js.map +1 -0
  70. package/dist/website/components/admin/DroppableArea.d.ts.map +1 -1
  71. package/dist/website/components/admin/DroppableArea.js +124 -88
  72. package/dist/website/components/admin/DroppableArea.js.map +1 -1
  73. package/package.json +18 -10
@@ -3,110 +3,146 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Icon } from "@mui/material";
4
4
  import { useEffect, useState } from "react";
5
5
  import { useDrop } from "react-dnd";
6
+ const FLOW_HEIGHT = 20; // fixed flow size, never changes (no layout shift)
7
+ const HIT_OVERSHOOT = 16; // how far the visible/hit pill extends beyond the gap during drag
8
+ const WRAPPER_IDLE = {
9
+ position: "relative",
10
+ width: "100%",
11
+ height: `${FLOW_HEIGHT}px`,
12
+ pointerEvents: "none",
13
+ boxSizing: "border-box"
14
+ };
15
+ const WRAPPER_ACTIVE = {
16
+ ...WRAPPER_IDLE,
17
+ pointerEvents: "auto"
18
+ };
19
+ const PILL_BASE = {
20
+ position: "absolute",
21
+ left: 0,
22
+ right: 0,
23
+ borderRadius: "8px",
24
+ alignItems: "center",
25
+ justifyContent: "center",
26
+ overflow: "hidden",
27
+ boxSizing: "border-box",
28
+ transition: "all 0.15s ease-out",
29
+ zIndex: 5
30
+ };
31
+ const PILL_HIDDEN = {
32
+ ...PILL_BASE,
33
+ top: 0,
34
+ bottom: 0,
35
+ display: "none"
36
+ };
37
+ const PILL_VISIBLE = {
38
+ ...PILL_BASE,
39
+ top: -HIT_OVERSHOOT,
40
+ bottom: -HIT_OVERSHOOT,
41
+ display: "flex"
42
+ };
43
+ const VARIANT_STYLES = {
44
+ justDropped: {
45
+ border: "2px solid rgba(76, 175, 80, 1)",
46
+ backgroundColor: "rgba(76, 175, 80, 0.95)",
47
+ boxShadow: "0 4px 16px rgba(76, 175, 80, 0.5)"
48
+ },
49
+ isOver: {
50
+ border: "2px solid rgba(25, 118, 210, 1)",
51
+ backgroundColor: "rgba(25, 118, 210, 0.95)",
52
+ boxShadow: "0 4px 20px rgba(25, 118, 210, 0.55)"
53
+ },
54
+ active: {
55
+ border: "2px dashed rgba(25, 118, 210, 0.9)",
56
+ backgroundColor: "rgba(25, 118, 210, 0.55)"
57
+ }
58
+ };
59
+ const LEGACY_HIDDEN = {
60
+ position: "absolute",
61
+ top: 0,
62
+ left: 0,
63
+ width: "100%",
64
+ height: "4px",
65
+ zIndex: 1,
66
+ border: "none",
67
+ backgroundColor: "transparent"
68
+ };
69
+ const LEGACY_ACTIVE_BASE = {
70
+ width: "100%",
71
+ height: `${FLOW_HEIGHT}px`,
72
+ padding: "0 10px",
73
+ borderRadius: "6px",
74
+ display: "flex",
75
+ alignItems: "center",
76
+ justifyContent: "center",
77
+ overflow: "hidden",
78
+ boxSizing: "border-box",
79
+ transition: "all 0.15s ease-out"
80
+ };
81
+ function getVariant(justDropped, isOver, canDrop) {
82
+ if (justDropped)
83
+ return "justDropped";
84
+ if (isOver)
85
+ return "isOver";
86
+ if (canDrop)
87
+ return "active";
88
+ return null;
89
+ }
6
90
  export function DroppableArea(props) {
7
91
  const { accept, onDrop, text, updateIsDragging, dndDeps, hideWhenInactive = true } = props;
8
- const [isDragging, setIsDragging] = useState(false);
9
92
  const [justDropped, setJustDropped] = useState(false);
10
93
  const [{ isOver, canDrop }, drop] = useDrop(() => ({
11
94
  accept,
12
95
  drop: (data) => {
13
96
  onDrop(data);
14
97
  setJustDropped(true);
15
- setTimeout(() => setJustDropped(false), 600);
16
98
  },
17
99
  collect: (monitor) => ({
18
100
  isOver: !!monitor.isOver(),
19
101
  canDrop: !!monitor.canDrop()
20
102
  })
21
103
  }), [dndDeps, onDrop]);
22
- // Update dragging state via effect to avoid state updates during render
23
- useEffect(() => {
24
- setIsDragging(canDrop);
25
- }, [canDrop]);
26
104
  useEffect(() => {
27
105
  if (updateIsDragging)
28
- updateIsDragging(isDragging);
29
- }, [isDragging, updateIsDragging]);
30
- // Enhanced droppable zone styling
31
- // IMPORTANT: Keep height consistent between active/inactive to prevent layout shifts.
32
- // Layout shifts would push draggable elements out from under the mouse, breaking drag.
33
- const getDroppableStyle = () => {
34
- const fixedHeight = "20px"; // Consistent height for spacing
35
- // When nothing is being dragged - invisible spacer
36
- if (hideWhenInactive && !canDrop) {
37
- return {
38
- width: "100%",
39
- height: fixedHeight,
40
- border: "none",
41
- backgroundColor: "transparent",
42
- pointerEvents: "none",
43
- boxSizing: "border-box"
44
- };
45
- }
46
- // Legacy behavior (when hideWhenInactive is false) - absolute positioning
47
- if (!hideWhenInactive && !canDrop) {
48
- return {
49
- position: "absolute",
50
- top: 0,
51
- left: 0,
52
- width: "100%",
53
- height: "4px",
54
- zIndex: 1,
55
- border: "none",
56
- backgroundColor: "transparent"
57
- };
58
- }
59
- // When dragging - same height, just show the styling
60
- const baseStyle = {
61
- width: "100%",
62
- height: fixedHeight,
63
- padding: "0 10px",
64
- borderRadius: "6px",
65
- display: "flex",
66
- alignItems: "center",
67
- justifyContent: "center",
68
- overflow: "hidden",
69
- boxSizing: "border-box",
70
- transition: "all 0.15s ease-out"
71
- };
72
- if (justDropped) {
73
- return {
74
- ...baseStyle,
75
- border: "2px solid rgba(76, 175, 80, 1)",
76
- backgroundColor: "rgba(76, 175, 80, 1)",
77
- boxShadow: "0 4px 12px rgba(76, 175, 80, 0.6)"
78
- };
79
- }
80
- if (isOver) {
81
- return {
82
- ...baseStyle,
83
- border: "3px solid rgba(25, 118, 210, 1)",
84
- backgroundColor: "rgba(25, 118, 210, 1)",
85
- boxShadow: "0 0 20px rgba(25, 118, 210, 0.9), 0 0 40px rgba(25, 118, 210, 0.5)",
86
- transform: "scaleY(1.3)",
87
- transition: "all 0.15s ease-out"
88
- };
89
- }
90
- return {
91
- ...baseStyle,
92
- border: "2px dashed rgba(25, 118, 210, 1)",
93
- backgroundColor: "rgba(25, 118, 210, 0.7)"
94
- };
95
- };
96
- // Display text based on state
106
+ updateIsDragging(canDrop);
107
+ }, [canDrop, updateIsDragging]);
108
+ useEffect(() => {
109
+ if (!justDropped)
110
+ return;
111
+ const t = setTimeout(() => setJustDropped(false), 600);
112
+ return () => clearTimeout(t);
113
+ }, [justDropped]);
97
114
  const displayText = text || "Drop here to add";
98
- return (_jsx("div", { ref: drop, style: getDroppableStyle(), "data-testid": "droppable-area", "aria-label": canDrop ? `Drop zone: ${displayText}` : "", role: canDrop ? "region" : undefined, children: canDrop && (_jsxs("div", { style: {
99
- display: "flex",
100
- alignItems: "center",
101
- justifyContent: "center",
102
- gap: "6px",
103
- color: "#fff",
104
- fontSize: "0.75rem",
105
- fontWeight: 600
106
- }, children: [_jsx(Icon, { style: {
107
- fontSize: "1rem",
108
- transition: "transform 0.2s ease",
109
- transform: isOver ? "scale(1.1)" : "scale(1)"
110
- }, children: isOver ? "add_circle" : "add_circle_outline" }), _jsx("span", { children: displayText })] })) }));
115
+ const variant = getVariant(justDropped, isOver, canDrop);
116
+ if (!hideWhenInactive) {
117
+ const legacyStyle = variant
118
+ ? { ...LEGACY_ACTIVE_BASE, ...VARIANT_STYLES[variant] }
119
+ : LEGACY_HIDDEN;
120
+ return (_jsx("div", { ref: drop, style: legacyStyle, "data-testid": "droppable-area", "aria-label": canDrop ? `Drop zone: ${displayText}` : "", role: canDrop ? "region" : undefined, children: canDrop && _jsx(PillContents, { isOver: isOver, displayText: displayText }) }));
121
+ }
122
+ const pillStyle = variant
123
+ ? { ...PILL_VISIBLE, ...VARIANT_STYLES[variant] }
124
+ : PILL_HIDDEN;
125
+ return (_jsx("div", { style: canDrop ? WRAPPER_ACTIVE : WRAPPER_IDLE, children: _jsx("div", { ref: drop, style: pillStyle, "data-testid": "droppable-area", "aria-label": canDrop ? `Drop zone: ${displayText}` : "", role: canDrop ? "region" : undefined, children: canDrop && _jsx(PillContents, { isOver: isOver, displayText: displayText }) }) }));
126
+ }
127
+ const PILL_CONTENTS_STYLE = {
128
+ display: "flex",
129
+ alignItems: "center",
130
+ justifyContent: "center",
131
+ gap: "8px",
132
+ color: "#fff",
133
+ fontSize: "0.85rem",
134
+ fontWeight: 600,
135
+ textShadow: "0 1px 2px rgba(0, 0, 0, 0.15)"
136
+ };
137
+ const ICON_BASE_STYLE = {
138
+ fontSize: "1.25rem",
139
+ transition: "transform 0.2s ease"
140
+ };
141
+ const ICON_SCALED_STYLE = {
142
+ ...ICON_BASE_STYLE,
143
+ transform: "scale(1.15)"
144
+ };
145
+ function PillContents({ isOver, displayText }) {
146
+ return (_jsxs("div", { style: PILL_CONTENTS_STYLE, children: [_jsx(Icon, { style: isOver ? ICON_SCALED_STYLE : ICON_BASE_STYLE, children: isOver ? "add_circle" : "add_circle_outline" }), _jsx("span", { children: displayText })] }));
111
147
  }
112
148
  //# sourceMappingURL=DroppableArea.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DroppableArea.js","sourceRoot":"","sources":["../../../../src/website/components/admin/DroppableArea.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAc,EAAiB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,MAAM,UAAU,aAAa,CAAC,KAAY;IACxC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAC3F,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEtD,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,GAAG,OAAO,CACzC,GAAG,EAAE,CAAC,CAAC;QACL,MAAM;QACN,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE;YACb,MAAM,CAAC,IAAI,CAAC,CAAC;YACb,cAAc,CAAC,IAAI,CAAC,CAAC;YACrB,UAAU,CAAC,GAAG,EAAE,CAAC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AAc,EAAE,QAAQ;gBACxB,GAAG,EAAE,KAAK;gBACV,KAAK,EAAE,MAAM;gBACb,QAAQ,EAAE,SAAS;gBACnB,UAAU,EAAE,GAAG;aAChB,aACC,KAAC,IAAI,IAAC,KAAK,EAAE;wBACX,QAAQ,EAAE,MAAM;wBAChB,UAAU,EAAE,qBAAqB;wBACjC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,UAAU;qBAC9C,YACE,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,oBAAoB,GACxC,EACP,yBAAO,WAAW,GAAQ,IACtB,CACP,GACG,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"DroppableArea.js","sourceRoot":"","sources":["../../../../src/website/components/admin/DroppableArea.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAc,EAAiB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,MAAM,WAAW,GAAG,EAAE,CAAC,CAAC,mDAAmD;AAC3E,MAAM,aAAa,GAAG,EAAE,CAAC,CAAC,kEAAkE;AAE5F,MAAM,YAAY,GAAkB;IAClC,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,GAAG,WAAW,IAAI;IAC1B,aAAa,EAAE,MAAM;IACrB,SAAS,EAAE,YAAY;CACxB,CAAC;AAEF,MAAM,cAAc,GAAkB;IACpC,GAAG,YAAY;IACf,aAAa,EAAE,MAAM;CACtB,CAAC;AAEF,MAAM,SAAS,GAAkB;IAC/B,QAAQ,EAAE,UAAU;IACpB,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,YAAY,EAAE,KAAK;IACnB,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;IACxB,QAAQ,E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Y,IAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,GAAI,GAClE,GACF,CACP,CAAC;AACJ,CAAC;AAED,MAAM,mBAAmB,GAAkB;IACzC,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,cAAc,EAAE,QAAQ;IACxB,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE,GAAG;IACf,UAAU,EAAE,+BAA+B;CAC5C,CAAC;AAEF,MAAM,eAAe,GAAkB;IACrC,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE,qBAAqB;CAClC,CAAC;AAEF,MAAM,iBAAiB,GAAkB;IACvC,GAAG,eAAe;IAClB,SAAS,EAAE,aAAa;CACzB,CAAC;AAEF,SAAS,YAAY,CAAC,EAAE,MAAM,EAAE,WAAW,EAA4C;IACrF,OAAO,CACL,eAAK,KAAK,EAAE,mBAAmB,aAC7B,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,eAAe,YACtD,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,oBAAoB,GACxC,EACP,yBAAO,WAAW,GAAQ,IACtB,CACP,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@churchapps/apphelper",
3
- "version": "0.7.3",
3
+ "version": "0.7.5",
4
4
  "description": "Library of helper functions, components, and feature modules (donations/forms/login/markdown/website) for React and NextJS ChurchApps",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -40,7 +40,7 @@
40
40
  "dist"
41
41
  ],
42
42
  "scripts": {
43
- "test": "echo \"Error: no test specified\" && exit 1",
43
+ "test": "vitest run --config vitest.config.ts",
44
44
  "clean": "rimraf dist",
45
45
  "tsc": "tsc",
46
46
  "copy-locales": "copyfiles -a public/** dist",
@@ -69,17 +69,23 @@
69
69
  },
70
70
  "homepage": "https://github.com/ChurchApps/Packages#readme",
71
71
  "peerDependencies": {
72
- "react": "^18.0.0 || ^19.0.0",
73
- "react-dom": "^18.0.0 || ^19.0.0",
74
- "react-router-dom": "^7.6.3",
75
72
  "@stripe/react-stripe-js": "^3.5.2",
76
73
  "@stripe/stripe-js": "^7.4.0",
77
- "react-google-recaptcha": "^3.1.0"
74
+ "react": "^18.0.0 || ^19.0.0",
75
+ "react-dom": "^18.0.0 || ^19.0.0",
76
+ "react-google-recaptcha": "^3.1.0",
77
+ "react-router-dom": "^7.6.3"
78
78
  },
79
79
  "peerDependenciesMeta": {
80
- "@stripe/react-stripe-js": { "optional": true },
81
- "@stripe/stripe-js": { "optional": true },
82
- "react-google-recaptcha": { "optional": true }
80
+ "@stripe/react-stripe-js": {
81
+ "optional": true
82
+ },
83
+ "@stripe/stripe-js": {
84
+ "optional": true
85
+ },
86
+ "react-google-recaptcha": {
87
+ "optional": true
88
+ }
83
89
  },
84
90
  "dependencies": {
85
91
  "@churchapps/helpers": "^1.3.0",
@@ -144,6 +150,7 @@
144
150
  "eslint": "^9.28.0",
145
151
  "eslint-plugin-unused-imports": "^4.4.1",
146
152
  "globals": "^16.2.0",
153
+ "jsdom": "^25.0.1",
147
154
  "npm-run-all2": "^8.0.4",
148
155
  "react": "^19.1.0",
149
156
  "react-dom": "^19.1.0",
@@ -152,6 +159,7 @@
152
159
  "rimraf": "^6.0.1",
153
160
  "typescript": "^5.9.2",
154
161
  "typescript-eslint": "^8.35.0",
155
- "vite": "^7.0.6"
162
+ "vite": "^7.0.6",
163
+ "vitest": "^2.1.9"
156
164
  }
157
165
  }