hazo_notes 1.0.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.
- package/README.md +661 -0
- package/SETUP_CHECKLIST.md +453 -0
- package/dist/api/create_files_handler.d.ts +42 -0
- package/dist/api/create_files_handler.d.ts.map +1 -0
- package/dist/api/create_files_handler.js +213 -0
- package/dist/api/create_files_handler.js.map +1 -0
- package/dist/api/create_notes_handler.d.ts +50 -0
- package/dist/api/create_notes_handler.d.ts.map +1 -0
- package/dist/api/create_notes_handler.js +242 -0
- package/dist/api/create_notes_handler.js.map +1 -0
- package/dist/api/index.d.ts +9 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/index.js +8 -0
- package/dist/api/index.js.map +1 -0
- package/dist/components/hazo_notes_entry.d.ts +6 -0
- package/dist/components/hazo_notes_entry.d.ts.map +1 -0
- package/dist/components/hazo_notes_entry.js +69 -0
- package/dist/components/hazo_notes_entry.js.map +1 -0
- package/dist/components/hazo_notes_file_preview.d.ts +16 -0
- package/dist/components/hazo_notes_file_preview.d.ts.map +1 -0
- package/dist/components/hazo_notes_file_preview.js +77 -0
- package/dist/components/hazo_notes_file_preview.js.map +1 -0
- package/dist/components/hazo_notes_icon.d.ts +6 -0
- package/dist/components/hazo_notes_icon.d.ts.map +1 -0
- package/dist/components/hazo_notes_icon.js +208 -0
- package/dist/components/hazo_notes_icon.js.map +1 -0
- package/dist/components/hazo_notes_panel.d.ts +6 -0
- package/dist/components/hazo_notes_panel.d.ts.map +1 -0
- package/dist/components/hazo_notes_panel.js +197 -0
- package/dist/components/hazo_notes_panel.js.map +1 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +8 -0
- package/dist/components/index.js.map +1 -0
- package/dist/hooks/index.d.ts +8 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +6 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use_notes.d.ts +46 -0
- package/dist/hooks/use_notes.d.ts.map +1 -0
- package/dist/hooks/use_notes.js +146 -0
- package/dist/hooks/use_notes.js.map +1 -0
- package/dist/hooks/use_notes_file_upload.d.ts +52 -0
- package/dist/hooks/use_notes_file_upload.d.ts.map +1 -0
- package/dist/hooks/use_notes_file_upload.js +125 -0
- package/dist/hooks/use_notes_file_upload.js.map +1 -0
- package/dist/index.client.d.ts +16 -0
- package/dist/index.client.d.ts.map +1 -0
- package/dist/index.client.js +18 -0
- package/dist/index.client.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/config.d.ts +31 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +123 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/index.d.ts +6 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +6 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/logger/context.d.ts +49 -0
- package/dist/logger/context.d.ts.map +1 -0
- package/dist/logger/context.js +45 -0
- package/dist/logger/context.js.map +1 -0
- package/dist/logger/index.d.ts +9 -0
- package/dist/logger/index.d.ts.map +1 -0
- package/dist/logger/index.js +7 -0
- package/dist/logger/index.js.map +1 -0
- package/dist/logger/server.d.ts +27 -0
- package/dist/logger/server.d.ts.map +1 -0
- package/dist/logger/server.js +36 -0
- package/dist/logger/server.js.map +1 -0
- package/dist/logger/types.d.ts +20 -0
- package/dist/logger/types.d.ts.map +1 -0
- package/dist/logger/types.js +15 -0
- package/dist/logger/types.js.map +1 -0
- package/dist/types/index.d.ts +267 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/cn.d.ts +16 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +19 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/file_utils.d.ts +51 -0
- package/dist/utils/file_utils.d.ts.map +1 -0
- package/dist/utils/file_utils.js +128 -0
- package/dist/utils/file_utils.js.map +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/index.js.map +1 -0
- package/migrations/001_create_hazo_notes_table.sql +77 -0
- package/package.json +119 -0
- package/templates/config/hazo_notes_config.ini +43 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HazoNotesFilePreview - Renders file attachments in notes
|
|
3
|
+
*
|
|
4
|
+
* Displays embedded images inline or renders download links for attachments
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { HazoNotesFilePreviewProps, NoteFile } from '../types/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Render a file preview based on display mode and file type
|
|
10
|
+
*/
|
|
11
|
+
export declare function HazoNotesFilePreview({ file, display_mode, }: HazoNotesFilePreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
/**
|
|
13
|
+
* Parse note text and render with inline file previews
|
|
14
|
+
*/
|
|
15
|
+
export declare function render_note_with_files(note_text: string, note_files?: NoteFile[]): React.ReactNode;
|
|
16
|
+
//# sourceMappingURL=hazo_notes_file_preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hazo_notes_file_preview.d.ts","sourceRoot":"","sources":["../../src/components/hazo_notes_file_preview.tsx"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,yBAAyB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7E;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,YAAY,GACb,EAAE,yBAAyB,2CAgD3B;AA8CD;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,QAAQ,EAAE,GACtB,KAAK,CAAC,SAAS,CAuDjB"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from '../utils/cn.js';
|
|
4
|
+
import { format_file_size, is_image_file } from '../utils/file_utils.js';
|
|
5
|
+
/**
|
|
6
|
+
* Render a file preview based on display mode and file type
|
|
7
|
+
*/
|
|
8
|
+
export function HazoNotesFilePreview({ file, display_mode, }) {
|
|
9
|
+
const is_image = is_image_file(file.filename);
|
|
10
|
+
// For embedded images
|
|
11
|
+
if (display_mode === 'embed' && is_image) {
|
|
12
|
+
const src = file.filedata.startsWith('/')
|
|
13
|
+
? file.filedata // Filesystem path
|
|
14
|
+
: `data:${file.mime_type || 'image/png'};base64,${file.filedata}`; // Base64
|
|
15
|
+
return (_jsxs("div", { className: "cls_hazo_notes_file_embed my-2", children: [_jsx("img", { src: src, alt: file.filename, className: "max-w-full max-h-64 rounded-md border border-yellow-300", loading: "lazy" }), _jsx("p", { className: "text-xs text-yellow-700 mt-1", children: file.filename })] }));
|
|
16
|
+
}
|
|
17
|
+
// For attachments or non-image embeds
|
|
18
|
+
return (_jsx("div", { className: "cls_hazo_notes_file_attachment my-2 overflow-hidden", children: _jsxs("a", { href: file.filedata.startsWith('/')
|
|
19
|
+
? file.filedata
|
|
20
|
+
: `data:${file.mime_type || 'application/octet-stream'};base64,${file.filedata}`, download: file.filename, className: cn('flex items-center gap-2 px-3 py-2 rounded-md text-sm max-w-full', 'bg-yellow-200 hover:bg-yellow-300 text-yellow-900', 'border border-yellow-400 transition-colors'), children: [_jsx(FileIcon, { mime_type: file.mime_type }), _jsx("span", { className: "font-medium truncate min-w-0 flex-1", children: file.filename }), file.file_size && (_jsxs("span", { className: "text-yellow-700 text-xs whitespace-nowrap flex-shrink-0", children: ["(", format_file_size(file.file_size), ")"] }))] }) }));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* File icon based on MIME type
|
|
24
|
+
*/
|
|
25
|
+
function FileIcon({ mime_type }) {
|
|
26
|
+
const type = mime_type || 'application/octet-stream';
|
|
27
|
+
// PDF icon
|
|
28
|
+
if (type.includes('pdf')) {
|
|
29
|
+
return (_jsx("svg", { className: "w-4 h-4", fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z", clipRule: "evenodd" }) }));
|
|
30
|
+
}
|
|
31
|
+
// Image icon
|
|
32
|
+
if (type.startsWith('image/')) {
|
|
33
|
+
return (_jsx("svg", { className: "w-4 h-4", fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z", clipRule: "evenodd" }) }));
|
|
34
|
+
}
|
|
35
|
+
// Default document icon
|
|
36
|
+
return (_jsx("svg", { className: "w-4 h-4", fill: "currentColor", viewBox: "0 0 20 20", children: _jsx("path", { fillRule: "evenodd", d: "M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4z", clipRule: "evenodd" }) }));
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Parse note text and render with inline file previews
|
|
40
|
+
*/
|
|
41
|
+
export function render_note_with_files(note_text, note_files) {
|
|
42
|
+
if (!note_files || note_files.length === 0) {
|
|
43
|
+
return note_text;
|
|
44
|
+
}
|
|
45
|
+
// Create a map of file_no to file
|
|
46
|
+
const file_map = new Map(note_files.map((f) => [f.file_no, f]));
|
|
47
|
+
// Split text by file references
|
|
48
|
+
const parts = [];
|
|
49
|
+
let last_index = 0;
|
|
50
|
+
let key = 0;
|
|
51
|
+
// Match <<embed:0001>> and <<attach:0001>> patterns
|
|
52
|
+
const regex = /<<(embed|attach):(\d+)>>/g;
|
|
53
|
+
let match;
|
|
54
|
+
while ((match = regex.exec(note_text)) !== null) {
|
|
55
|
+
// Add text before the match
|
|
56
|
+
if (match.index > last_index) {
|
|
57
|
+
parts.push(_jsx("span", { children: note_text.slice(last_index, match.index) }, key++));
|
|
58
|
+
}
|
|
59
|
+
// Add file preview
|
|
60
|
+
const [, type, file_no] = match;
|
|
61
|
+
const file = file_map.get(file_no);
|
|
62
|
+
if (file) {
|
|
63
|
+
parts.push(_jsx(HazoNotesFilePreview, { file: file, display_mode: type }, key++));
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
// File not found - show placeholder
|
|
67
|
+
parts.push(_jsxs("span", { className: "text-yellow-600 italic", children: ["[File not found: ", file_no, "]"] }, key++));
|
|
68
|
+
}
|
|
69
|
+
last_index = match.index + match[0].length;
|
|
70
|
+
}
|
|
71
|
+
// Add remaining text
|
|
72
|
+
if (last_index < note_text.length) {
|
|
73
|
+
parts.push(_jsx("span", { children: note_text.slice(last_index) }, key++));
|
|
74
|
+
}
|
|
75
|
+
return _jsx(_Fragment, { children: parts });
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=hazo_notes_file_preview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hazo_notes_file_preview.js","sourceRoot":"","sources":["../../src/components/hazo_notes_file_preview.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAUb,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEzE;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACnC,IAAI,EACJ,Y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,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,IAAnC,GAAG,EAAE,CAAsC,CAAC,CAAC;IACrE,CAAC;IAED,OAAO,4BAAG,KAAK,GAAI,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HazoNotesIconProps } from '../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Main notes icon component
|
|
4
|
+
*/
|
|
5
|
+
export declare function HazoNotesIcon({ ref_id, label, has_notes: has_notes_prop, note_count: note_count_prop, notes: controlled_notes, on_notes_change, current_user, panel_style, save_mode, background_color, enable_files, max_files_per_note, allowed_file_types, max_file_size_mb, on_open, on_close, disabled, className, }: HazoNotesIconProps): import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
//# sourceMappingURL=hazo_notes_icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hazo_notes_icon.d.ts","sourceRoot":"","sources":["../../src/components/hazo_notes_icon.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAyC,MAAM,mBAAmB,CAAC;AAwBnG;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,KAAe,EACf,SAAS,EAAE,cAAc,EACzB,UAAU,EAAE,eAAe,EAC3B,KAAK,EAAE,gBAAgB,EACvB,eAAe,EACf,YAAY,EACZ,WAAuB,EACvB,SAAsB,EACtB,gBAAkC,EAClC,YAAmB,EACnB,kBAAsB,EACtB,kBAAwE,EACxE,gBAAqB,EACrB,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,GACV,EAAE,kBAAkB,kDAgQpB"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* HazoNotesIcon - Main trigger component for notes panel
|
|
5
|
+
*
|
|
6
|
+
* Displays a notes icon that opens either a popover or slide panel
|
|
7
|
+
* Supports both controlled and uncontrolled modes
|
|
8
|
+
*/
|
|
9
|
+
import React, { useState, useEffect } from 'react';
|
|
10
|
+
import { cn } from '../utils/cn.js';
|
|
11
|
+
import { use_logger } from '../logger/context.js';
|
|
12
|
+
import { use_notes } from '../hooks/use_notes.js';
|
|
13
|
+
// Default IoDocumentText icon (inline SVG to avoid hard dependency on react-icons)
|
|
14
|
+
function DocumentIcon({ className }) {
|
|
15
|
+
return (_jsxs("svg", { className: className, stroke: "currentColor", fill: "currentColor", strokeWidth: "0", viewBox: "0 0 512 512", height: "1em", width: "1em", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { d: "M428 224H288a48 48 0 01-48-48V36a4 4 0 00-4-4h-92a64 64 0 00-64 64v320a64 64 0 0064 64h224a64 64 0 0064-64V228a4 4 0 00-4-4zm-92 160H176a16 16 0 010-32h160a16 16 0 010 32zm0-80H176a16 16 0 010-32h160a16 16 0 010 32z" }), _jsx("path", { d: "M419.22 188.59L275.41 44.78a2 2 0 00-3.41 1.41V176a16 16 0 0016 16h129.81a2 2 0 001.41-3.41z" })] }));
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Main notes icon component
|
|
19
|
+
*/
|
|
20
|
+
export function HazoNotesIcon({ ref_id, label = 'Notes', has_notes: has_notes_prop, note_count: note_count_prop, notes: controlled_notes, on_notes_change, current_user, panel_style = 'popover', save_mode = 'explicit', background_color = 'bg-yellow-100', enable_files = true, max_files_per_note = 5, allowed_file_types = ['pdf', 'png', 'jpg', 'jpeg', 'gif', 'doc', 'docx'], max_file_size_mb = 10, on_open, on_close, disabled, className, }) {
|
|
21
|
+
const logger = use_logger();
|
|
22
|
+
const [is_open, set_is_open] = useState(false);
|
|
23
|
+
const [fetched_user, set_fetched_user] = useState(null);
|
|
24
|
+
// Dynamic UI components
|
|
25
|
+
const [PopoverComponents, setPopoverComponents] = useState(null);
|
|
26
|
+
const [SheetComponents, setSheetComponents] = useState(null);
|
|
27
|
+
const [ProfileStampComponent, setProfileStampComponent] = useState(null);
|
|
28
|
+
const [HazoNotesPanelComponent, setHazoNotesPanelComponent] = useState(null);
|
|
29
|
+
// Use the notes hook for uncontrolled mode
|
|
30
|
+
const { notes: fetched_notes, note_count, add_note, loading, error, } = use_notes(ref_id, {
|
|
31
|
+
skip: !!controlled_notes,
|
|
32
|
+
});
|
|
33
|
+
const notes = controlled_notes ?? fetched_notes;
|
|
34
|
+
const has_notes = has_notes_prop ?? (notes.length > 0);
|
|
35
|
+
const display_count = note_count_prop ?? note_count;
|
|
36
|
+
// Fetch user info if not provided
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
if (!current_user) {
|
|
39
|
+
const fetch_user = async () => {
|
|
40
|
+
try {
|
|
41
|
+
const response = await fetch('/api/hazo_auth/me', {
|
|
42
|
+
credentials: 'include',
|
|
43
|
+
});
|
|
44
|
+
if (response.ok) {
|
|
45
|
+
const data = await response.json();
|
|
46
|
+
if (data.authenticated) {
|
|
47
|
+
set_fetched_user({
|
|
48
|
+
id: data.user_id || data.id,
|
|
49
|
+
name: data.user_name || data.name || 'User',
|
|
50
|
+
email: data.user_email || data.email || '',
|
|
51
|
+
profile_image: data.profile_image || data.avatar_url || data.profile_picture_url,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
logger.debug('[HazoNotesIcon] Error fetching user', {
|
|
58
|
+
error: error instanceof Error ? error.message : String(error),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
fetch_user();
|
|
63
|
+
}
|
|
64
|
+
}, [current_user, logger]);
|
|
65
|
+
// Load Popover components
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
if (panel_style === 'popover') {
|
|
68
|
+
const loadComponents = async () => {
|
|
69
|
+
try {
|
|
70
|
+
// @ts-expect-error - Module provided by consuming app
|
|
71
|
+
const popoverModule = await import('@/components/ui/popover').catch(() => null);
|
|
72
|
+
if (popoverModule) {
|
|
73
|
+
setPopoverComponents({
|
|
74
|
+
Popover: popoverModule.Popover,
|
|
75
|
+
PopoverTrigger: popoverModule.PopoverTrigger,
|
|
76
|
+
PopoverContent: popoverModule.PopoverContent,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
logger.debug('[HazoNotesIcon] Popover components not available');
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
loadComponents();
|
|
85
|
+
}
|
|
86
|
+
}, [panel_style, logger]);
|
|
87
|
+
// Load Sheet components for slide_panel
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
if (panel_style === 'slide_panel') {
|
|
90
|
+
const loadComponents = async () => {
|
|
91
|
+
try {
|
|
92
|
+
// @ts-expect-error - Module provided by consuming app
|
|
93
|
+
const sheetModule = await import('@/components/ui/sheet').catch(() => null);
|
|
94
|
+
if (sheetModule) {
|
|
95
|
+
setSheetComponents({
|
|
96
|
+
Sheet: sheetModule.Sheet,
|
|
97
|
+
SheetTrigger: sheetModule.SheetTrigger,
|
|
98
|
+
SheetContent: sheetModule.SheetContent,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
logger.debug('[HazoNotesIcon] Sheet components not available');
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
loadComponents();
|
|
107
|
+
}
|
|
108
|
+
}, [panel_style, logger]);
|
|
109
|
+
// Load ProfileStamp from hazo_auth
|
|
110
|
+
useEffect(() => {
|
|
111
|
+
const loadProfileStamp = async () => {
|
|
112
|
+
try {
|
|
113
|
+
const modulePath = 'hazo_auth/client';
|
|
114
|
+
const hazoAuthModule = await import(/* webpackIgnore: true */ modulePath).catch(() => null);
|
|
115
|
+
if (hazoAuthModule?.ProfileStamp) {
|
|
116
|
+
setProfileStampComponent(() => hazoAuthModule.ProfileStamp);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
catch {
|
|
120
|
+
logger.debug('[HazoNotesIcon] ProfileStamp not available');
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
loadProfileStamp();
|
|
124
|
+
}, [logger]);
|
|
125
|
+
// Load HazoNotesPanel
|
|
126
|
+
useEffect(() => {
|
|
127
|
+
const loadPanel = async () => {
|
|
128
|
+
const { HazoNotesPanel } = await import('./hazo_notes_panel.js');
|
|
129
|
+
setHazoNotesPanelComponent(() => HazoNotesPanel);
|
|
130
|
+
};
|
|
131
|
+
loadPanel();
|
|
132
|
+
}, []);
|
|
133
|
+
const effective_user = current_user || fetched_user;
|
|
134
|
+
// Handle open/close
|
|
135
|
+
const handle_open_change = (open) => {
|
|
136
|
+
set_is_open(open);
|
|
137
|
+
if (open) {
|
|
138
|
+
on_open?.();
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
on_close?.();
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
// Handle add note
|
|
145
|
+
const handle_add_note = async (note_input) => {
|
|
146
|
+
if (on_notes_change) {
|
|
147
|
+
// Controlled mode - let parent handle
|
|
148
|
+
const new_note = {
|
|
149
|
+
userid: effective_user?.id || '',
|
|
150
|
+
user_name: effective_user?.name || 'Unknown',
|
|
151
|
+
user_email: effective_user?.email || '',
|
|
152
|
+
user_avatar: effective_user?.profile_image,
|
|
153
|
+
created_at: new Date().toISOString(),
|
|
154
|
+
note_text: note_input.note_text,
|
|
155
|
+
note_files: note_input.note_files,
|
|
156
|
+
};
|
|
157
|
+
on_notes_change([...notes, new_note]);
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
// Uncontrolled mode - use hook
|
|
161
|
+
await add_note(note_input.note_text, note_input.note_files);
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
// Don't render if disabled
|
|
165
|
+
if (disabled) {
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
// Render trigger button
|
|
169
|
+
const trigger_button = (_jsx("button", { type: "button", className: cn('cls_hazo_notes_icon flex h-9 w-9 items-center justify-center rounded-md border border-input bg-transparent text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring', has_notes && 'bg-amber-100 border-amber-500', className), "aria-label": `Notes for ${label}`, title: `Notes for ${label}${has_notes ? ` (${display_count})` : ''}`, children: _jsx(DocumentIcon, { className: cn('h-5 w-5', has_notes && 'text-amber-600') }) }));
|
|
170
|
+
// Panel props
|
|
171
|
+
const panel_props = {
|
|
172
|
+
ref_id,
|
|
173
|
+
label,
|
|
174
|
+
notes,
|
|
175
|
+
on_add_note: handle_add_note,
|
|
176
|
+
on_close: () => handle_open_change(false),
|
|
177
|
+
current_user: effective_user,
|
|
178
|
+
save_mode,
|
|
179
|
+
background_color,
|
|
180
|
+
loading,
|
|
181
|
+
error,
|
|
182
|
+
enable_files,
|
|
183
|
+
max_files_per_note,
|
|
184
|
+
allowed_file_types,
|
|
185
|
+
max_file_size_mb,
|
|
186
|
+
ProfileStampComponent,
|
|
187
|
+
};
|
|
188
|
+
// Render with popover
|
|
189
|
+
if (panel_style === 'popover' && PopoverComponents) {
|
|
190
|
+
const { Popover, PopoverTrigger, PopoverContent } = PopoverComponents;
|
|
191
|
+
return (_jsx("div", { className: "cls_hazo_notes_icon_wrapper", children: _jsxs(Popover, { open: is_open, onOpenChange: handle_open_change, children: [_jsx(PopoverTrigger, { asChild: true, children: trigger_button }), _jsx(PopoverContent, { className: "w-80 p-0", align: "end", side: "bottom", sideOffset: 5, collisionPadding: 16, avoidCollisions: true, children: HazoNotesPanelComponent && _jsx(HazoNotesPanelComponent, { ...panel_props }) })] }) }));
|
|
192
|
+
}
|
|
193
|
+
// Render with slide panel (sheet)
|
|
194
|
+
if (panel_style === 'slide_panel' && SheetComponents) {
|
|
195
|
+
const { Sheet, SheetTrigger, SheetContent } = SheetComponents;
|
|
196
|
+
return (_jsx("div", { className: "cls_hazo_notes_icon_wrapper", children: _jsxs(Sheet, { open: is_open, onOpenChange: handle_open_change, children: [_jsx(SheetTrigger, { asChild: true, children: trigger_button }), _jsx(SheetContent, { className: "w-96 p-0 sm:max-w-md", children: HazoNotesPanelComponent && _jsx(HazoNotesPanelComponent, { ...panel_props }) })] }) }));
|
|
197
|
+
}
|
|
198
|
+
// Fallback when components not loaded - still clickable but shows tooltip
|
|
199
|
+
return (_jsx("div", { className: "cls_hazo_notes_icon_wrapper", children: React.cloneElement(trigger_button, {
|
|
200
|
+
onClick: () => {
|
|
201
|
+
logger.warn('[HazoNotesIcon] UI components not loaded. Install @radix-ui/react-popover or @radix-ui/react-dialog');
|
|
202
|
+
},
|
|
203
|
+
title: panel_style === 'popover'
|
|
204
|
+
? 'Notes unavailable - install @radix-ui/react-popover'
|
|
205
|
+
: 'Notes unavailable - install @radix-ui/react-dialog',
|
|
206
|
+
}) }));
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=hazo_notes_icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hazo_notes_icon.js","sourceRoot":"","sources":["../../src/components/hazo_notes_icon.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,mFAAmF;AACnF,SAAS,YAAY,CAAC,EAAE,SAAS,EAA0B;IACzD,OAAO,CACL,eACE,SAAS,EAAE,SAAS,EACpB,MAAM,EAAC,cAAc,EACrB,IAAI,EAAC,cAAc,EACnB,WAAW,EAAC,GAAG,EACf,OAAO,EAAC,aAAa,EACrB,MAAM,EAAC,KAAK,EACZ,KAAK,EAAC,KAAK,EACX,KAAK,EAAC,4BAA4B,aAElC,eAA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,IAAC,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,kBAAkB,aACpD,KAAC,YAAY,IAAC,OAAO,kBAAE,cAAc,GAAgB,EACrD,KAAC,YAAY,IAAC,SAAS,EAAC,sBAAsB,YAC3C,uBAAuB,IAAI,KAAC,uBAAuB,OAAK,WAAW,GAAI,GAC3D,IACT,GACJ,CACP,CAAC;IACJ,CAAC;IAED,0EAA0E;IAC1E,OAAO,CACL,cAAK,SAAS,EAAC,6BAA6B,YACzC,KAAK,CAAC,YAAY,CAAC,cAAc,EAAE;YAClC,OAAO,EAAE,GAAG,EAAE;gBACZ,MAAM,CAAC,IAAI,CAAC,qGAAqG,CAAC,CAAC;YACrH,CAAC;YACD,KAAK,EAAE,WAAW,KAAK,SAAS;gBAC9B,CAAC,CAAC,qDAAqD;gBACvD,CAAC,CAAC,oDAAoD;SACzD,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HazoNotesPanelProps } from '../types/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Notes panel component
|
|
4
|
+
*/
|
|
5
|
+
export declare function HazoNotesPanel({ ref_id, label, notes, on_add_note, on_close, current_user, save_mode, background_color, loading, error, enable_files, max_files_per_note, allowed_file_types, max_file_size_mb, ProfileStampComponent, }: HazoNotesPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=hazo_notes_panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hazo_notes_panel.d.ts","sourceRoot":"","sources":["../../src/components/hazo_notes_panel.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,mBAAmB,EAAY,MAAM,mBAAmB,CAAC;AAiCvE;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,KAAe,EACf,KAAK,EACL,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,OAAe,EACf,KAAK,EACL,YAAmB,EACnB,kBAAsB,EACtB,kBAAwE,EACxE,gBAAqB,EACrB,qBAAqB,GACtB,EAAE,mBAAmB,2CAoVrB"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* HazoNotesPanel - Notes display and input panel
|
|
5
|
+
*
|
|
6
|
+
* Shows existing notes and provides input for new notes
|
|
7
|
+
*/
|
|
8
|
+
import { useState, useRef } from 'react';
|
|
9
|
+
import { cn } from '../utils/cn.js';
|
|
10
|
+
import { HazoNotesEntry } from './hazo_notes_entry.js';
|
|
11
|
+
import { use_notes_file_upload } from '../hooks/use_notes_file_upload.js';
|
|
12
|
+
import { create_file_reference, format_file_size } from '../utils/file_utils.js';
|
|
13
|
+
/**
|
|
14
|
+
* Get initials from name for avatar
|
|
15
|
+
*/
|
|
16
|
+
function get_initials(name) {
|
|
17
|
+
const parts = name.trim().split(/\s+/);
|
|
18
|
+
if (parts.length >= 2) {
|
|
19
|
+
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
20
|
+
}
|
|
21
|
+
return name.substring(0, 2).toUpperCase();
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Generate consistent hex color from name for avatar background
|
|
25
|
+
*/
|
|
26
|
+
function get_avatar_color(name) {
|
|
27
|
+
const colors = [
|
|
28
|
+
'#ef4444', '#f97316', '#d97706', '#22c55e',
|
|
29
|
+
'#14b8a6', '#3b82f6', '#6366f1', '#a855f7',
|
|
30
|
+
'#ec4899', '#f43f5e',
|
|
31
|
+
];
|
|
32
|
+
let hash = 0;
|
|
33
|
+
for (let i = 0; i < name.length; i++) {
|
|
34
|
+
hash = name.charCodeAt(i) + ((hash << 5) - hash);
|
|
35
|
+
}
|
|
36
|
+
return colors[Math.abs(hash) % colors.length];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Notes panel component
|
|
40
|
+
*/
|
|
41
|
+
export function HazoNotesPanel({ ref_id, label = 'Notes', notes, on_add_note, on_close, current_user, save_mode, background_color, loading = false, error, enable_files = true, max_files_per_note = 5, allowed_file_types = ['pdf', 'png', 'jpg', 'jpeg', 'gif', 'doc', 'docx'], max_file_size_mb = 10, ProfileStampComponent, }) {
|
|
42
|
+
const [new_note_text, set_new_note_text] = useState('');
|
|
43
|
+
const [is_saving, set_is_saving] = useState(false);
|
|
44
|
+
const file_input_ref = useRef(null);
|
|
45
|
+
// File upload hook
|
|
46
|
+
const { pending_files, upload_file, remove_file, clear_files, uploading, error: upload_error, } = use_notes_file_upload({
|
|
47
|
+
ref_id,
|
|
48
|
+
max_file_size_mb,
|
|
49
|
+
allowed_file_types,
|
|
50
|
+
});
|
|
51
|
+
// Handle save note
|
|
52
|
+
const handle_save = async () => {
|
|
53
|
+
if (!new_note_text.trim() && pending_files.length === 0)
|
|
54
|
+
return;
|
|
55
|
+
set_is_saving(true);
|
|
56
|
+
try {
|
|
57
|
+
// Build note text with file references
|
|
58
|
+
let final_note_text = new_note_text.trim();
|
|
59
|
+
// Append file references if not already in text
|
|
60
|
+
for (const file of pending_files) {
|
|
61
|
+
const ref = create_file_reference(file.file_no, file.embed_type);
|
|
62
|
+
if (!final_note_text.includes(ref)) {
|
|
63
|
+
final_note_text += `\n${ref}`;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
await on_add_note({
|
|
67
|
+
note_text: final_note_text,
|
|
68
|
+
note_files: pending_files.length > 0 ? pending_files : undefined,
|
|
69
|
+
});
|
|
70
|
+
// Clear inputs on success
|
|
71
|
+
set_new_note_text('');
|
|
72
|
+
clear_files();
|
|
73
|
+
}
|
|
74
|
+
finally {
|
|
75
|
+
set_is_saving(false);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
// Handle auto-save on blur (if enabled)
|
|
79
|
+
const handle_blur = () => {
|
|
80
|
+
if (save_mode === 'auto' && (new_note_text.trim() || pending_files.length > 0)) {
|
|
81
|
+
handle_save();
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
// Handle file selection
|
|
85
|
+
const handle_file_select = async (e) => {
|
|
86
|
+
const files = e.target.files;
|
|
87
|
+
if (!files)
|
|
88
|
+
return;
|
|
89
|
+
for (const file of Array.from(files)) {
|
|
90
|
+
if (pending_files.length >= max_files_per_note) {
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
await upload_file(file);
|
|
94
|
+
}
|
|
95
|
+
// Reset input
|
|
96
|
+
if (file_input_ref.current) {
|
|
97
|
+
file_input_ref.current.value = '';
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
// Handle paste event for images
|
|
101
|
+
const handle_paste = async (e) => {
|
|
102
|
+
if (!enable_files)
|
|
103
|
+
return;
|
|
104
|
+
if (pending_files.length >= max_files_per_note)
|
|
105
|
+
return;
|
|
106
|
+
const items = e.clipboardData?.items;
|
|
107
|
+
if (!items)
|
|
108
|
+
return;
|
|
109
|
+
for (const item of Array.from(items)) {
|
|
110
|
+
if (item.type.startsWith('image/')) {
|
|
111
|
+
e.preventDefault();
|
|
112
|
+
const file = item.getAsFile();
|
|
113
|
+
if (file) {
|
|
114
|
+
// Get cursor position before async operation
|
|
115
|
+
const textarea = e.currentTarget;
|
|
116
|
+
const cursor_pos = textarea.selectionStart;
|
|
117
|
+
// Create a named file from the blob
|
|
118
|
+
const extension = item.type.split('/')[1] || 'png';
|
|
119
|
+
const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
|
|
120
|
+
const named_file = new File([file], `pasted-image-${timestamp}.${extension}`, {
|
|
121
|
+
type: item.type,
|
|
122
|
+
});
|
|
123
|
+
// Upload and get the file reference
|
|
124
|
+
const uploaded = await upload_file(named_file, 'embed');
|
|
125
|
+
if (uploaded) {
|
|
126
|
+
// Insert the file reference at cursor position
|
|
127
|
+
const ref = create_file_reference(uploaded.file_no, 'embed');
|
|
128
|
+
set_new_note_text((prev) => {
|
|
129
|
+
const before = prev.slice(0, cursor_pos);
|
|
130
|
+
const after = prev.slice(cursor_pos);
|
|
131
|
+
return `${before}${ref}${after}`;
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
// Render current user avatar
|
|
140
|
+
const render_current_user_avatar = () => {
|
|
141
|
+
if (!current_user)
|
|
142
|
+
return null;
|
|
143
|
+
if (ProfileStampComponent) {
|
|
144
|
+
return (_jsx(ProfileStampComponent, { size: "sm", show_name: false, show_email: false }));
|
|
145
|
+
}
|
|
146
|
+
if (current_user.profile_image) {
|
|
147
|
+
return (_jsx("img", { src: current_user.profile_image, alt: current_user.name, title: current_user.name, className: "w-7 h-7 rounded-full object-cover flex-shrink-0" }));
|
|
148
|
+
}
|
|
149
|
+
return (_jsx("span", { className: "w-7 h-7 rounded-full inline-flex items-center justify-center text-xs font-bold flex-shrink-0", style: {
|
|
150
|
+
backgroundColor: get_avatar_color(current_user.name),
|
|
151
|
+
color: '#ffffff',
|
|
152
|
+
}, title: current_user.name, children: get_initials(current_user.name) }));
|
|
153
|
+
};
|
|
154
|
+
// Derive a darker shade class for the header based on background_color
|
|
155
|
+
const get_header_class = () => {
|
|
156
|
+
if (!background_color)
|
|
157
|
+
return 'bg-yellow-200';
|
|
158
|
+
// Extract color name and make it darker (e.g., bg-green-50 -> bg-green-200)
|
|
159
|
+
const match = background_color.match(/bg-(\w+)-(\d+)/);
|
|
160
|
+
if (match) {
|
|
161
|
+
const [, color] = match;
|
|
162
|
+
return `bg-${color}-200`;
|
|
163
|
+
}
|
|
164
|
+
return background_color;
|
|
165
|
+
};
|
|
166
|
+
// Get text color class based on background
|
|
167
|
+
const get_text_class = () => {
|
|
168
|
+
if (!background_color)
|
|
169
|
+
return { primary: 'text-yellow-900', secondary: 'text-yellow-700' };
|
|
170
|
+
const match = background_color.match(/bg-(\w+)-/);
|
|
171
|
+
if (match) {
|
|
172
|
+
const [, color] = match;
|
|
173
|
+
return { primary: `text-${color}-900`, secondary: `text-${color}-700` };
|
|
174
|
+
}
|
|
175
|
+
return { primary: 'text-yellow-900', secondary: 'text-yellow-700' };
|
|
176
|
+
};
|
|
177
|
+
// Get border color class based on background
|
|
178
|
+
const get_border_class = () => {
|
|
179
|
+
if (!background_color)
|
|
180
|
+
return 'border-yellow-300';
|
|
181
|
+
const match = background_color.match(/bg-(\w+)-/);
|
|
182
|
+
if (match) {
|
|
183
|
+
const [, color] = match;
|
|
184
|
+
return `border-${color}-300`;
|
|
185
|
+
}
|
|
186
|
+
return 'border-yellow-300';
|
|
187
|
+
};
|
|
188
|
+
const header_class = get_header_class();
|
|
189
|
+
const text_class = get_text_class();
|
|
190
|
+
const border_class = get_border_class();
|
|
191
|
+
return (_jsxs("div", { className: cn('cls_hazo_notes_panel flex flex-col max-h-[500px]', background_color), children: [_jsxs("div", { className: cn('cls_hazo_notes_panel_header px-4 py-3 border-b flex-shrink-0', header_class, border_class), children: [_jsx("h4", { className: cn('font-medium text-sm', text_class.primary), children: label }), _jsxs("p", { className: cn('text-xs mt-1', text_class.secondary), children: [notes.length, " note", notes.length !== 1 ? 's' : ''] })] }), (error || upload_error) && (_jsx("div", { className: "px-4 py-2 bg-red-100 text-red-700 text-sm border-b border-red-200", children: error || upload_error })), loading && (_jsx("div", { className: cn('px-4 py-6 text-center text-sm', text_class.secondary), children: "Loading notes..." })), !loading && (_jsx("div", { className: cn('cls_hazo_notes_list flex-1 overflow-y-auto min-h-0', background_color || 'bg-yellow-50'), children: notes.length === 0 ? (_jsx("div", { className: cn('px-4 py-6 text-center text-sm', text_class.secondary), children: "No notes yet." })) : (_jsx("div", { className: cn('divide-y', border_class.replace('border-', 'divide-')), children: notes.map((note, index) => (_jsx(HazoNotesEntry, { note: note, ProfileStampComponent: ProfileStampComponent }, `${note.created_at}-${index}`))) })) })), _jsxs("div", { className: cn('cls_hazo_notes_new_note border-t px-4 py-3 flex-shrink-0', border_class, background_color), children: [_jsxs("div", { className: "flex items-center gap-2 mb-2", children: [current_user && render_current_user_avatar(), _jsx("label", { className: cn('text-xs font-medium', text_class.primary), children: "Add a new note" })] }), _jsx("textarea", { value: new_note_text, onChange: (e) => set_new_note_text(e.target.value), onBlur: handle_blur, onPaste: handle_paste, className: cn('cls_hazo_notes_textarea w-full min-h-[80px] rounded-md border bg-white px-3 py-2 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 resize-y', border_class.replace('border-', 'border-').replace('-300', '-400'), `placeholder:${text_class.secondary.replace('text-', 'text-').replace('-700', '-500')}`, `focus-visible:ring-${border_class.replace('border-', '').replace('-300', '-500')}`), placeholder: current_user ? (enable_files ? 'Type your note here... (paste images directly)' : 'Type your note here...') : 'Please log in to add notes', disabled: !current_user || is_saving }), pending_files.length > 0 && (_jsx("div", { className: "mt-2 space-y-1", children: pending_files.map((file) => (_jsxs("div", { className: cn('flex items-center justify-between px-2 py-1 rounded text-xs', header_class), children: [_jsxs("span", { className: "truncate flex-1", children: [file.filename, " (", format_file_size(file.file_size || 0), ")"] }), _jsx("button", { type: "button", onClick: () => remove_file(file.file_no), className: cn('ml-2 hover:opacity-80', text_class.secondary), title: "Remove file", children: "\u00D7" })] }, file.file_no))) })), current_user && (_jsxs("div", { className: "flex items-center justify-between mt-2", children: [enable_files && (_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("input", { ref: file_input_ref, type: "file", onChange: handle_file_select, accept: allowed_file_types.map(t => `.${t}`).join(','), className: "hidden", multiple: true, disabled: pending_files.length >= max_files_per_note || uploading }), _jsx("button", { type: "button", onClick: () => file_input_ref.current?.click(), disabled: pending_files.length >= max_files_per_note || uploading, className: cn('px-2 py-1 text-xs rounded border', pending_files.length >= max_files_per_note
|
|
192
|
+
? 'border-gray-300 text-gray-400 cursor-not-allowed'
|
|
193
|
+
: cn(border_class.replace('-300', '-400'), text_class.secondary, `hover:${header_class}`)), title: `Attach file (${pending_files.length}/${max_files_per_note})`, children: uploading ? 'Uploading...' : 'Attach' })] })), save_mode === 'explicit' && (_jsx("button", { type: "button", onClick: handle_save, disabled: is_saving || (!new_note_text.trim() && pending_files.length === 0), className: cn('px-3 py-1 text-xs font-medium rounded', is_saving || (!new_note_text.trim() && pending_files.length === 0)
|
|
194
|
+
? 'bg-gray-200 text-gray-400 cursor-not-allowed'
|
|
195
|
+
: cn(header_class.replace('-200', '-500'), 'text-white', `hover:${header_class.replace('-200', '-600')}`)), children: is_saving ? 'Saving...' : 'Save' }))] })), !current_user && (_jsx("p", { className: "text-xs text-red-600 mt-1", children: "Please log in to add notes." }))] })] }));
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=hazo_notes_panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hazo_notes_panel.js","sourceRoot":"","sources":["../../src/components/hazo_notes_panel.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb;;;;GAIG;AAEH,OAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEjF;;GAEG;AACH,SAAS,YAAY,CAAC,IAAY;IAChC,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACvC,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;QACtB,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;IAClE,CAAC;IACD,OAAO,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,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,CAC5G,YAEA,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,GAC1B,CACV,IACG,CACP,EAEA,CAAC,YAAY,IAAI,CAChB,YAAG,SAAS,EAAC,2BAA2B,4CAEpC,CACL,IACG,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React components for hazo_notes
|
|
3
|
+
*/
|
|
4
|
+
export { HazoNotesIcon } from './hazo_notes_icon.js';
|
|
5
|
+
export { HazoNotesPanel } from './hazo_notes_panel.js';
|
|
6
|
+
export { HazoNotesEntry } from './hazo_notes_entry.js';
|
|
7
|
+
export { HazoNotesFilePreview, render_note_with_files } from './hazo_notes_file_preview.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React components for hazo_notes
|
|
3
|
+
*/
|
|
4
|
+
export { HazoNotesIcon } from './hazo_notes_icon.js';
|
|
5
|
+
export { HazoNotesPanel } from './hazo_notes_panel.js';
|
|
6
|
+
export { HazoNotesEntry } from './hazo_notes_entry.js';
|
|
7
|
+
export { HazoNotesFilePreview, render_note_with_files } from './hazo_notes_file_preview.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React hooks for hazo_notes
|
|
3
|
+
*/
|
|
4
|
+
export { use_notes } from './use_notes.js';
|
|
5
|
+
export type { UseNotesOptions, UseNotesResult } from './use_notes.js';
|
|
6
|
+
export { use_notes_file_upload } from './use_notes_file_upload.js';
|
|
7
|
+
export type { UseNotesFileUploadOptions, UseNotesFileUploadResult } from './use_notes_file_upload.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,YAAY,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC"}
|