@carlonicora/nextjs-jsonapi 1.7.6 → 1.8.1

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 (58) hide show
  1. package/dist/{BlockNoteEditor-CCOSI7TW.js → BlockNoteEditor-KSPPX6JO.js} +13 -13
  2. package/dist/{BlockNoteEditor-CCOSI7TW.js.map → BlockNoteEditor-KSPPX6JO.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-KH7WWHBK.mjs → BlockNoteEditor-N534QVBR.mjs} +3 -3
  4. package/dist/{chunk-3HL4VFJ4.js → chunk-7Z7FEMEB.js} +56 -36
  5. package/dist/chunk-7Z7FEMEB.js.map +1 -0
  6. package/dist/{chunk-KFON36OE.js → chunk-B426TLJC.js} +358 -358
  7. package/dist/{chunk-KFON36OE.js.map → chunk-B426TLJC.js.map} +1 -1
  8. package/dist/{chunk-2O7ODHTG.mjs → chunk-CK5KLBZV.mjs} +21 -1
  9. package/dist/chunk-CK5KLBZV.mjs.map +1 -0
  10. package/dist/{chunk-2TCBJO4B.mjs → chunk-TLBZWOCU.mjs} +3 -3
  11. package/dist/client/index.js +3 -3
  12. package/dist/client/index.mjs +2 -2
  13. package/dist/components/index.js +3 -3
  14. package/dist/components/index.mjs +2 -2
  15. package/dist/contexts/index.js +3 -3
  16. package/dist/contexts/index.mjs +2 -2
  17. package/dist/core/index.d.mts +10 -0
  18. package/dist/core/index.d.ts +10 -0
  19. package/dist/core/index.js +2 -2
  20. package/dist/core/index.mjs +1 -1
  21. package/dist/index.js +2 -2
  22. package/dist/index.mjs +1 -1
  23. package/dist/scripts/generate-web-module/templates/components/editor.template.js +118 -12
  24. package/dist/scripts/generate-web-module/templates/components/editor.template.js.map +1 -1
  25. package/dist/scripts/generate-web-module/templates/data/interface.template.js +15 -2
  26. package/dist/scripts/generate-web-module/templates/data/interface.template.js.map +1 -1
  27. package/dist/scripts/generate-web-module/templates/data/model.template.js +32 -4
  28. package/dist/scripts/generate-web-module/templates/data/model.template.js.map +1 -1
  29. package/dist/scripts/generate-web-module/transformers/i18n-generator.d.ts.map +1 -1
  30. package/dist/scripts/generate-web-module/transformers/i18n-generator.js +16 -3
  31. package/dist/scripts/generate-web-module/transformers/i18n-generator.js.map +1 -1
  32. package/dist/scripts/generate-web-module/transformers/relationship-resolver.d.ts +5 -2
  33. package/dist/scripts/generate-web-module/transformers/relationship-resolver.d.ts.map +1 -1
  34. package/dist/scripts/generate-web-module/transformers/relationship-resolver.js +17 -7
  35. package/dist/scripts/generate-web-module/transformers/relationship-resolver.js.map +1 -1
  36. package/dist/scripts/generate-web-module/types/json-schema.interface.d.ts +1 -0
  37. package/dist/scripts/generate-web-module/types/json-schema.interface.d.ts.map +1 -1
  38. package/dist/scripts/generate-web-module/types/template-data.interface.d.ts +6 -0
  39. package/dist/scripts/generate-web-module/types/template-data.interface.d.ts.map +1 -1
  40. package/dist/scripts/generate-web-module/utils/i18n-updater.d.ts.map +1 -1
  41. package/dist/scripts/generate-web-module/utils/i18n-updater.js +36 -13
  42. package/dist/scripts/generate-web-module/utils/i18n-updater.js.map +1 -1
  43. package/dist/server/index.js +3 -3
  44. package/dist/server/index.mjs +1 -1
  45. package/package.json +1 -1
  46. package/scripts/generate-web-module/templates/components/editor.template.ts +125 -13
  47. package/scripts/generate-web-module/templates/data/interface.template.ts +18 -2
  48. package/scripts/generate-web-module/templates/data/model.template.ts +40 -6
  49. package/scripts/generate-web-module/transformers/i18n-generator.ts +18 -3
  50. package/scripts/generate-web-module/transformers/relationship-resolver.ts +18 -7
  51. package/scripts/generate-web-module/types/json-schema.interface.ts +1 -0
  52. package/scripts/generate-web-module/types/template-data.interface.ts +9 -0
  53. package/scripts/generate-web-module/utils/i18n-updater.ts +42 -15
  54. package/src/core/abstracts/AbstractApiData.ts +34 -0
  55. package/dist/chunk-2O7ODHTG.mjs.map +0 -1
  56. package/dist/chunk-3HL4VFJ4.js.map +0 -1
  57. /package/dist/{BlockNoteEditor-KH7WWHBK.mjs.map → BlockNoteEditor-N534QVBR.mjs.map} +0 -0
  58. /package/dist/{chunk-2TCBJO4B.mjs.map → chunk-TLBZWOCU.mjs.map} +0 -0
@@ -3,14 +3,14 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkKFON36OEjs = require('./chunk-KFON36OE.js');
6
+ var _chunkB426TLJCjs = require('./chunk-B426TLJC.js');
7
7
  require('./chunk-AGWQ75PQ.js');
8
8
 
9
9
 
10
10
 
11
11
 
12
12
 
13
- var _chunk3HL4VFJ4js = require('./chunk-3HL4VFJ4.js');
13
+ var _chunk7Z7FEMEBjs = require('./chunk-7Z7FEMEB.js');
14
14
  require('./chunk-IBS6NI7D.js');
15
15
  require('./chunk-CKS6SVUK.js');
16
16
  require('./chunk-LXKSUWAV.js');
@@ -79,7 +79,7 @@ var createDiffActionsInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name
79
79
  const diffIds = props.inlineContent.props.diffIds;
80
80
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "diff-actions-container mx-2 inline-flex items-center gap-1 align-middle", children: [
81
81
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
82
- _chunkKFON36OEjs.Button,
82
+ _chunkB426TLJCjs.Button,
83
83
  {
84
84
  title: "Accept change",
85
85
  onClick: (e) => {
@@ -91,7 +91,7 @@ var createDiffActionsInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name
91
91
  }
92
92
  ),
93
93
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
94
- _chunkKFON36OEjs.Button,
94
+ _chunkB426TLJCjs.Button,
95
95
  {
96
96
  title: "Reject change",
97
97
  className: "mx-2 p-0",
@@ -121,7 +121,7 @@ function BlockNoteEditor({
121
121
  bordered
122
122
  }) {
123
123
  const t = _nextintl.useTranslations.call(void 0, );
124
- const { company } = _chunkKFON36OEjs.useCurrentUserContext.call(void 0, );
124
+ const { company } = _chunkB426TLJCjs.useCurrentUserContext.call(void 0, );
125
125
  const [acceptedChanges, setAcceptedChanges] = _react3.useState.call(void 0, /* @__PURE__ */ new Set());
126
126
  const [rejectedChanges, setRejectedChanges] = _react3.useState.call(void 0, /* @__PURE__ */ new Set());
127
127
  const editorRef = _react3.useRef.call(void 0, null);
@@ -157,7 +157,7 @@ function BlockNoteEditor({
157
157
  const uploadImage = _react3.useCallback.call(void 0,
158
158
  async (file) => {
159
159
  if (!company) {
160
- _chunkKFON36OEjs.errorToast.call(void 0, {
160
+ _chunkB426TLJCjs.errorToast.call(void 0, {
161
161
  title: t(`generic.errors.upload`),
162
162
  error: t(`generic.errors.upload_description`)
163
163
  });
@@ -165,7 +165,7 @@ function BlockNoteEditor({
165
165
  }
166
166
  const fileType = file.type;
167
167
  const key = `companies/${company.id}/${type}/${id}/${file.name}`;
168
- const s3 = await _chunk3HL4VFJ4js.S3Service.getPreSignedUrl({
168
+ const s3 = await _chunk7Z7FEMEBjs.S3Service.getPreSignedUrl({
169
169
  key,
170
170
  contentType: fileType,
171
171
  isPublic: true
@@ -175,7 +175,7 @@ function BlockNoteEditor({
175
175
  headers: s3.headers,
176
176
  body: file
177
177
  });
178
- const signedImage = await _chunk3HL4VFJ4js.S3Service.getSignedUrl({
178
+ const signedImage = await _chunk7Z7FEMEBjs.S3Service.getSignedUrl({
179
179
  key,
180
180
  isPublic: true
181
181
  });
@@ -204,8 +204,8 @@ function BlockNoteEditor({
204
204
  const processedContent = _react3.useMemo.call(void 0, () => {
205
205
  if (diffContent && initialContent) {
206
206
  try {
207
- const diffResult = _chunk3HL4VFJ4js.BlockNoteDiffUtil.diff(initialContent, diffContent);
208
- const renderedDiff = _chunk3HL4VFJ4js.BlockNoteWordDiffRendererUtil.renderWordDiffs(
207
+ const diffResult = _chunk7Z7FEMEBjs.BlockNoteDiffUtil.diff(initialContent, diffContent);
208
+ const renderedDiff = _chunk7Z7FEMEBjs.BlockNoteWordDiffRendererUtil.renderWordDiffs(
209
209
  diffResult.blocks,
210
210
  handleAcceptChange,
211
211
  handleRejectChange,
@@ -363,7 +363,7 @@ function BlockNoteEditor({
363
363
  },
364
364
  [editor]
365
365
  );
366
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: editorRef, className: _chunk3HL4VFJ4js.cn.call(void 0, bordered ? "rounded-md border" : "", "w-full"), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
366
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: editorRef, className: _chunk7Z7FEMEBjs.cn.call(void 0, bordered ? "rounded-md border" : "", "w-full"), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
367
367
  _shadcn.BlockNoteView,
368
368
  {
369
369
  editor,
@@ -371,7 +371,7 @@ function BlockNoteEditor({
371
371
  editable: onChange !== void 0,
372
372
  formattingToolbar: false,
373
373
  theme: "light",
374
- className: _chunk3HL4VFJ4js.cn.call(void 0, `BlockNoteView ${onChange ? "min-h-96 p-4" : ""}`, className, size === "sm" && "small"),
374
+ className: _chunk7Z7FEMEBjs.cn.call(void 0, `BlockNoteView ${onChange ? "min-h-96 p-4" : ""}`, className, size === "sm" && "small"),
375
375
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlockNoteEditorFormattingToolbar, {})
376
376
  }
377
377
  ) });
@@ -380,4 +380,4 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlockNoteEditor, "BlockNoteEditor");
380
380
 
381
381
 
382
382
  exports.default = BlockNoteEditor;
383
- //# sourceMappingURL=BlockNoteEditor-CCOSI7TW.js.map
383
+ //# sourceMappingURL=BlockNoteEditor-KSPPX6JO.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/BlockNoteEditor-CCOSI7TW.js","../src/components/editors/BlockNoteEditor.tsx","../src/components/editors/BlockNoteEditorFormattingToolbar.tsx"],"names":["jsxs","jsx"],"mappings":"AAAA,ylBAAY;AACZ;AACE;AACA;AACA;AACF,sDAA4B;AAC5B,+BAA4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AAOwC,IAAA;AACvB,MAAA;AACmB,MAAA;AAC1D,IAAA;AAC0B,EAAA;AAI6B,EAAA;AACzC,EAAA;AACoB,IAAA;AACU,IAAA;AACC,IAAA;AACK,IAAA;AACxB,IAAA;AACS,MAAA;AACjC,MAAA;AACF,IAAA;AACwE,IAAA;AACvC,IAAA;AACN,EAAA;AAGD,EAAA;AACL,IAAA;AACf,MAAA;AAEqD,QAAA;AACP,QAAA;AAC1B,UAAA;AACtB,QAAA;AAGkC,QAAA;AACpB,MAAA;AAC0C,QAAA;AAEpD,QAAA;AACoB,UAAA;AACC,UAAA;AACqB,YAAA;AACM,YAAA;AACd,YAAA;AACpC,UAAA;AACsB,QAAA;AAC2B,UAAA;AACnD,QAAA;AACF,MAAA;AACF,IAAA;AACO,IAAA;AACT,EAAA;AAGqC,EAAA;AAChC,IAAA;AAAA,IAAA;AACC,MAAA;AACU,MAAA;AACa,MAAA;AACJ,MAAA;AACb,MAAA;AACuD,MAAA;AAE5D,MAAA;AAAiC,IAAA;AAEtC,EAAA;AAEJ;AAtUwB;AD4S6C;AACA;AACA","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/BlockNoteEditor-CCOSI7TW.js","sourcesContent":[null,"\"use client\";\n\nimport { BlockNoteSchema, defaultInlineContentSpecs, PartialBlock } from \"@blocknote/core\";\nimport { createReactInlineContentSpec, useCreateBlockNote } from \"@blocknote/react\";\nimport { BlockNoteView } from \"@blocknote/shadcn\";\nimport \"@blocknote/shadcn/style.css\";\nimport { CheckIcon, XIcon } from \"lucide-react\";\nimport { useTranslations } from \"next-intl\";\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useCurrentUserContext } from \"../../contexts\";\nimport { S3Interface } from \"../../features/s3/data\";\nimport { UserInterface } from \"../../features/user/data\";\nimport { S3Service } from \"../../features/s3/data/s3.service\";\nimport { Button } from \"../../shadcnui\";\nimport { BlockNoteDiffUtil, BlockNoteWordDiffRendererUtil, cn } from \"../../utils\";\nimport { errorToast } from \"../errors\";\nimport { BlockNoteEditorFormattingToolbar } from \"./BlockNoteEditorFormattingToolbar\";\n\nexport type BlockNoteEditorProps = {\n id: string;\n type: string;\n initialContent?: PartialBlock[];\n onChange?: (content: any, isEmpty: boolean, hasUnresolvedDiff: boolean) => void;\n size?: \"sm\" | \"md\";\n className?: string;\n markdownContent?: string;\n diffContent?: PartialBlock[];\n placeholder?: string;\n bordered?: boolean;\n};\n\nconst createDiffActionsInlineContentSpec = (\n handleAcceptChange: (diffId: string) => void,\n handleRejectChange: (diffId: string) => void,\n) => {\n return createReactInlineContentSpec(\n {\n type: \"diffActions\",\n propSchema: {\n diffIds: {\n default: \"\",\n },\n },\n content: \"none\",\n },\n {\n render: (props) => {\n const diffIds = props.inlineContent.props.diffIds;\n\n return (\n <span className=\"diff-actions-container mx-2 inline-flex items-center gap-1 align-middle\">\n <Button\n title=\"Accept change\"\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n diffIds.split(\",\").forEach((id: string) => handleAcceptChange(id.trim()));\n }}\n >\n <CheckIcon className=\"h-3 w-3 text-green-600\" />\n </Button>\n <Button\n title=\"Reject change\"\n className=\"mx-2 p-0\"\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n diffIds.split(\",\").forEach((id: string) => handleRejectChange(id.trim()));\n }}\n >\n <XIcon className=\"h-3 w-3 text-red-600\" />\n </Button>\n </span>\n );\n },\n },\n );\n};\n\nexport default function BlockNoteEditor({\n id,\n type,\n initialContent,\n onChange,\n size,\n className,\n markdownContent,\n diffContent,\n placeholder,\n bordered,\n}: BlockNoteEditorProps): React.JSX.Element {\n const t = useTranslations();\n const { company } = useCurrentUserContext<UserInterface>();\n\n const [acceptedChanges, setAcceptedChanges] = useState<Set<string>>(new Set());\n const [rejectedChanges, setRejectedChanges] = useState<Set<string>>(new Set());\n\n const editorRef = useRef<HTMLDivElement>(null);\n\n const handleAcceptChange = useCallback((diffId: string) => {\n setAcceptedChanges((prev) => new Set([...prev, diffId]));\n setRejectedChanges((prev) => {\n const newSet = new Set(prev);\n newSet.delete(diffId);\n return newSet;\n });\n }, []);\n\n const handleRejectChange = useCallback((diffId: string) => {\n setRejectedChanges((prev) => new Set([...prev, diffId]));\n setAcceptedChanges((prev) => {\n const newSet = new Set(prev);\n newSet.delete(diffId);\n return newSet;\n });\n }, []);\n\n const DiffActionsInlineContent = useMemo(\n () => createDiffActionsInlineContentSpec(handleAcceptChange, handleRejectChange),\n [handleAcceptChange, handleRejectChange],\n );\n\n const schema = useMemo(\n () =>\n BlockNoteSchema.create({\n inlineContentSpecs: {\n ...defaultInlineContentSpecs,\n diffActions: DiffActionsInlineContent,\n },\n } as any),\n [DiffActionsInlineContent],\n );\n\n const uploadImage = useCallback(\n async (file: File): Promise<string> => {\n if (!company) {\n errorToast({\n title: t(`generic.errors.upload`),\n error: t(`generic.errors.upload_description`),\n });\n throw new Error(t(`generic.errors.upload`));\n }\n\n const fileType = file.type;\n const key = `companies/${company.id}/${type}/${id}/${file.name}`;\n\n const s3: S3Interface = await S3Service.getPreSignedUrl({\n key: key,\n contentType: fileType,\n isPublic: true,\n });\n\n await fetch(s3.url, {\n method: \"PUT\",\n headers: s3.headers,\n body: file,\n });\n\n const signedImage: S3Interface = await S3Service.getSignedUrl({\n key: key,\n isPublic: true,\n });\n\n return signedImage.url;\n },\n [company, id, t],\n );\n\n // Utility: Remove trailing empty blocks for read-only display\n const removeTrailingEmptyBlocks = useCallback(\n (blocks: PartialBlock[]): PartialBlock[] => {\n if (!blocks || blocks.length === 0) return blocks;\n\n // Only remove trailing empty blocks in read-only mode\n if (onChange !== undefined) return blocks;\n\n const result = [...blocks];\n\n // Remove trailing empty paragraph blocks, but keep at least one block\n while (result.length > 1) {\n const lastBlock = result[result.length - 1];\n\n // Check if it's an empty paragraph\n const isEmptyParagraph =\n lastBlock.type === \"paragraph\" &&\n (!lastBlock.content ||\n lastBlock.content.length === 0 ||\n (Array.isArray(lastBlock.content) && lastBlock.content.every((c: any) => !c.text || c.text.trim() === \"\")));\n\n if (isEmptyParagraph) {\n result.pop();\n } else {\n break;\n }\n }\n\n return result;\n },\n [onChange],\n );\n\n const processedContent = useMemo(() => {\n if (diffContent && initialContent) {\n try {\n const diffResult = BlockNoteDiffUtil.diff(initialContent, diffContent);\n const renderedDiff = BlockNoteWordDiffRendererUtil.renderWordDiffs(\n diffResult.blocks,\n handleAcceptChange,\n handleRejectChange,\n acceptedChanges,\n rejectedChanges,\n );\n return removeTrailingEmptyBlocks(renderedDiff);\n } catch (error) {\n return initialContent && Array.isArray(initialContent) && initialContent.length > 0\n ? removeTrailingEmptyBlocks(initialContent)\n : [];\n }\n }\n\n if (!initialContent) {\n return [];\n }\n\n if (!Array.isArray(initialContent)) {\n return [];\n }\n\n return initialContent.length > 0 ? removeTrailingEmptyBlocks(initialContent) : [];\n }, [\n initialContent,\n diffContent,\n handleAcceptChange,\n handleRejectChange,\n acceptedChanges,\n rejectedChanges,\n removeTrailingEmptyBlocks,\n ]);\n\n const validatedInitialContent = useMemo(() => {\n if (processedContent && Array.isArray(processedContent) && processedContent.length > 0) {\n const validatedContent = processedContent.filter((block) => {\n if (!block || typeof block !== \"object\") return false;\n if (!(block as any).type) return false;\n return true;\n });\n return validatedContent.length > 0 ? (validatedContent as PartialBlock[]) : undefined;\n }\n return undefined;\n }, [processedContent]);\n\n const editor = useCreateBlockNote(\n useMemo(\n () => ({\n placeholders: {\n emptyDocument: placeholder || t(`generic.blocknote.placeholder`),\n },\n schema,\n initialContent: validatedInitialContent,\n uploadFile: uploadImage,\n }),\n [placeholder, t, schema, validatedInitialContent, uploadImage],\n ),\n );\n\n const handleChange = useCallback(async () => {\n if (!onChange) return;\n const newBlocks = editor.document;\n\n const markdownFromBlocks = (await editor.blocksToMarkdownLossy(editor.document)).trim();\n\n function hasUnresolvedDiffsRecursive(block: any): boolean {\n if (!block || typeof block !== \"object\") return false;\n let diffId = undefined;\n if (block.props && block.props.diffId) diffId = block.props.diffId;\n if (!diffId && block.attrs && block.attrs.diffId) diffId = block.attrs.diffId;\n if (diffId && !acceptedChanges.has(diffId) && !rejectedChanges.has(diffId)) {\n return true;\n }\n\n if (block.content) {\n const contentArr = Array.isArray(block.content) ? block.content : [block.content];\n for (const inline of contentArr) {\n if (inline && typeof inline === \"object\") {\n if (inline.type === \"diffActions\" && inline.props && inline.props.diffIds) {\n const ids =\n typeof inline.props.diffIds === \"string\" ? inline.props.diffIds.split(\",\") : inline.props.diffIds;\n for (const id of ids) {\n const trimmed = (id || \"\").toString().trim();\n if (trimmed && !acceptedChanges.has(trimmed) && !rejectedChanges.has(trimmed)) {\n return true;\n }\n }\n }\n if (inline.props && inline.props.diffId) {\n const diffIdInline = inline.props.diffId;\n if (diffIdInline && !acceptedChanges.has(diffIdInline) && !rejectedChanges.has(diffIdInline)) {\n return true;\n }\n }\n if (inline.children && Array.isArray(inline.children)) {\n for (const child of inline.children) {\n if (hasUnresolvedDiffsRecursive(child)) return true;\n }\n }\n }\n }\n }\n if (Array.isArray(block.children)) {\n for (const child of block.children) {\n if (hasUnresolvedDiffsRecursive(child)) return true;\n }\n }\n return false;\n }\n\n let hasUnresolvedDiff = false;\n if (Array.isArray(newBlocks)) {\n hasUnresolvedDiff = newBlocks.some((block: any) => hasUnresolvedDiffsRecursive(block));\n }\n\n onChange(newBlocks, !markdownFromBlocks.length, hasUnresolvedDiff);\n }, [editor, onChange, id, acceptedChanges, rejectedChanges]);\n\n // Utility: deep equality for arrays of blocks\n const areBlocksEqual = (a: any[], b: any[]): boolean => {\n return JSON.stringify(a) === JSON.stringify(b);\n };\n\n // Only initialize from markdownContent once per value, and only if different\n const hasInitializedFromMarkdown = useRef<string | null>(null);\n useEffect(() => {\n const updateContent = async (markdown: string) => {\n const blocks = await editor.tryParseMarkdownToBlocks(markdown);\n if (!areBlocksEqual(blocks, editor.document)) {\n editor.replaceBlocks(editor.document, blocks);\n }\n };\n\n if (markdownContent && hasInitializedFromMarkdown.current !== markdownContent) {\n hasInitializedFromMarkdown.current = markdownContent;\n updateContent(markdownContent).then(() => handleChange());\n }\n }, [markdownContent, editor]);\n\n // Update editor content when diff content changes, but only if different\n // Prevent unnecessary replaceBlocks calls that reset scroll/cursor.\n const previousContentHashRef = useRef<string | null>(null);\n useEffect(() => {\n if (!processedContent || !editor) return;\n const hash = JSON.stringify(processedContent);\n if (previousContentHashRef.current === hash) return; // no changes\n const currentHash = JSON.stringify(editor.document);\n if (currentHash === hash) {\n previousContentHashRef.current = hash;\n return; // already in sync\n }\n editor.replaceBlocks(editor.document, processedContent as PartialBlock[]);\n previousContentHashRef.current = hash;\n }, [processedContent, editor]);\n\n // Handle audio received from whisper transcription\n const handleAudioReceived = useCallback(\n (message: string) => {\n try {\n // Ensure the editor has focus\n const editorElement = editorRef.current?.querySelector('[contenteditable=\"true\"]') as HTMLElement;\n if (editorElement && document.activeElement !== editorElement) {\n editorElement.focus();\n }\n\n // Insert the transcribed text at the current cursor position\n editor.insertInlineContent(message);\n } catch (error) {\n console.error(\"Error inserting transcribed text:\", error);\n // Fallback: try to insert at the end of the document\n try {\n const blocks = editor.document;\n if (blocks.length > 0) {\n const lastBlock = blocks[blocks.length - 1];\n editor.setTextCursorPosition(lastBlock.id, \"end\");\n editor.insertInlineContent(message);\n }\n } catch (fallbackError) {\n console.error(\"Fallback insertion also failed:\", fallbackError);\n }\n }\n },\n [editor],\n );\n\n return (\n <div ref={editorRef} className={cn(bordered ? \"rounded-md border\" : \"\", \"w-full\")}>\n <BlockNoteView\n editor={editor}\n onChange={handleChange}\n editable={onChange !== undefined}\n formattingToolbar={false}\n theme=\"light\"\n className={cn(`BlockNoteView ${onChange ? \"min-h-96 p-4\" : \"\"}`, className, size === \"sm\" && \"small\")}\n >\n <BlockNoteEditorFormattingToolbar />\n </BlockNoteView>\n </div>\n );\n}\n","\"use client\";\n\nimport {\n BasicTextStyleButton,\n BlockTypeSelect,\n CreateLinkButton,\n FileCaptionButton,\n FileReplaceButton,\n FormattingToolbar,\n FormattingToolbarController,\n TextAlignButton,\n} from \"@blocknote/react\";\n\nexport function BlockNoteEditorFormattingToolbar() {\n return (\n <FormattingToolbarController\n formattingToolbar={() => (\n <FormattingToolbar>\n <BlockTypeSelect key={\"blockTypeSelect\"} />\n\n <FileCaptionButton key={\"fileCaptionButton\"} />\n <FileReplaceButton key={\"replaceFileButton\"} />\n\n <BasicTextStyleButton basicTextStyle={\"bold\"} key={\"boldStyleButton\"} />\n <BasicTextStyleButton basicTextStyle={\"italic\"} key={\"italicStyleButton\"} />\n <BasicTextStyleButton basicTextStyle={\"underline\"} key={\"underlineStyleButton\"} />\n <BasicTextStyleButton basicTextStyle={\"strike\"} key={\"strikeStyleButton\"} />\n\n <TextAlignButton textAlignment={\"left\"} key={\"textAlignLeftButton\"} />\n <TextAlignButton textAlignment={\"center\"} key={\"textAlignCenterButton\"} />\n <TextAlignButton textAlignment={\"right\"} key={\"textAlignRightButton\"} />\n\n <CreateLinkButton key={\"createLinkButton\"} />\n </FormattingToolbar>\n )}\n />\n );\n}\n"]}
1
+ {"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/BlockNoteEditor-KSPPX6JO.js","../src/components/editors/BlockNoteEditor.tsx","../src/components/editors/BlockNoteEditorFormattingToolbar.tsx"],"names":["jsxs","jsx"],"mappings":"AAAA,ylBAAY;AACZ;AACE;AACA;AACA;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACA;AACA;AACA;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACF,sDAA4B;AAC5B;AACA;AClBA,uCAAyE;AACzE,yCAAiE;AACjE,2CAA8B;AAC9B,uCAAO;AACP,2CAAiC;AACjC,qCAAgC;AAChC,+BAAyE;ADoBzE;AACA;AE3BA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAOM,+CAAA;AAJD,SAAS,gCAAA,CAAA,EAAmC;AACjD,EAAA,uBACE,6BAAA;AAAA,IA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;AACqB,YAAA;AACM,YAAA;AACd,YAAA;AACpC,UAAA;AACsB,QAAA;AAC2B,UAAA;AACnD,QAAA;AACF,MAAA;AACF,IAAA;AACO,IAAA;AACT,EAAA;AAGqC,EAAA;AAChC,IAAA;AAAA,IAAA;AACC,MAAA;AACU,MAAA;AACa,MAAA;AACJ,MAAA;AACb,MAAA;AACuD,MAAA;AAE5D,MAAA;AAAiC,IAAA;AAEtC,EAAA;AAEJ;AAtUwB;AD4S6C;AACA;AACA","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/BlockNoteEditor-KSPPX6JO.js","sourcesContent":[null,"\"use client\";\n\nimport { BlockNoteSchema, defaultInlineContentSpecs, PartialBlock } from \"@blocknote/core\";\nimport { createReactInlineContentSpec, useCreateBlockNote } from \"@blocknote/react\";\nimport { BlockNoteView } from \"@blocknote/shadcn\";\nimport \"@blocknote/shadcn/style.css\";\nimport { CheckIcon, XIcon } from \"lucide-react\";\nimport { useTranslations } from \"next-intl\";\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { useCurrentUserContext } from \"../../contexts\";\nimport { S3Interface } from \"../../features/s3/data\";\nimport { UserInterface } from \"../../features/user/data\";\nimport { S3Service } from \"../../features/s3/data/s3.service\";\nimport { Button } from \"../../shadcnui\";\nimport { BlockNoteDiffUtil, BlockNoteWordDiffRendererUtil, cn } from \"../../utils\";\nimport { errorToast } from \"../errors\";\nimport { BlockNoteEditorFormattingToolbar } from \"./BlockNoteEditorFormattingToolbar\";\n\nexport type BlockNoteEditorProps = {\n id: string;\n type: string;\n initialContent?: PartialBlock[];\n onChange?: (content: any, isEmpty: boolean, hasUnresolvedDiff: boolean) => void;\n size?: \"sm\" | \"md\";\n className?: string;\n markdownContent?: string;\n diffContent?: PartialBlock[];\n placeholder?: string;\n bordered?: boolean;\n};\n\nconst createDiffActionsInlineContentSpec = (\n handleAcceptChange: (diffId: string) => void,\n handleRejectChange: (diffId: string) => void,\n) => {\n return createReactInlineContentSpec(\n {\n type: \"diffActions\",\n propSchema: {\n diffIds: {\n default: \"\",\n },\n },\n content: \"none\",\n },\n {\n render: (props) => {\n const diffIds = props.inlineContent.props.diffIds;\n\n return (\n <span className=\"diff-actions-container mx-2 inline-flex items-center gap-1 align-middle\">\n <Button\n title=\"Accept change\"\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n diffIds.split(\",\").forEach((id: string) => handleAcceptChange(id.trim()));\n }}\n >\n <CheckIcon className=\"h-3 w-3 text-green-600\" />\n </Button>\n <Button\n title=\"Reject change\"\n className=\"mx-2 p-0\"\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n diffIds.split(\",\").forEach((id: string) => handleRejectChange(id.trim()));\n }}\n >\n <XIcon className=\"h-3 w-3 text-red-600\" />\n </Button>\n </span>\n );\n },\n },\n );\n};\n\nexport default function BlockNoteEditor({\n id,\n type,\n initialContent,\n onChange,\n size,\n className,\n markdownContent,\n diffContent,\n placeholder,\n bordered,\n}: BlockNoteEditorProps): React.JSX.Element {\n const t = useTranslations();\n const { company } = useCurrentUserContext<UserInterface>();\n\n const [acceptedChanges, setAcceptedChanges] = useState<Set<string>>(new Set());\n const [rejectedChanges, setRejectedChanges] = useState<Set<string>>(new Set());\n\n const editorRef = useRef<HTMLDivElement>(null);\n\n const handleAcceptChange = useCallback((diffId: string) => {\n setAcceptedChanges((prev) => new Set([...prev, diffId]));\n setRejectedChanges((prev) => {\n const newSet = new Set(prev);\n newSet.delete(diffId);\n return newSet;\n });\n }, []);\n\n const handleRejectChange = useCallback((diffId: string) => {\n setRejectedChanges((prev) => new Set([...prev, diffId]));\n setAcceptedChanges((prev) => {\n const newSet = new Set(prev);\n newSet.delete(diffId);\n return newSet;\n });\n }, []);\n\n const DiffActionsInlineContent = useMemo(\n () => createDiffActionsInlineContentSpec(handleAcceptChange, handleRejectChange),\n [handleAcceptChange, handleRejectChange],\n );\n\n const schema = useMemo(\n () =>\n BlockNoteSchema.create({\n inlineContentSpecs: {\n ...defaultInlineContentSpecs,\n diffActions: DiffActionsInlineContent,\n },\n } as any),\n [DiffActionsInlineContent],\n );\n\n const uploadImage = useCallback(\n async (file: File): Promise<string> => {\n if (!company) {\n errorToast({\n title: t(`generic.errors.upload`),\n error: t(`generic.errors.upload_description`),\n });\n throw new Error(t(`generic.errors.upload`));\n }\n\n const fileType = file.type;\n const key = `companies/${company.id}/${type}/${id}/${file.name}`;\n\n const s3: S3Interface = await S3Service.getPreSignedUrl({\n key: key,\n contentType: fileType,\n isPublic: true,\n });\n\n await fetch(s3.url, {\n method: \"PUT\",\n headers: s3.headers,\n body: file,\n });\n\n const signedImage: S3Interface = await S3Service.getSignedUrl({\n key: key,\n isPublic: true,\n });\n\n return signedImage.url;\n },\n [company, id, t],\n );\n\n // Utility: Remove trailing empty blocks for read-only display\n const removeTrailingEmptyBlocks = useCallback(\n (blocks: PartialBlock[]): PartialBlock[] => {\n if (!blocks || blocks.length === 0) return blocks;\n\n // Only remove trailing empty blocks in read-only mode\n if (onChange !== undefined) return blocks;\n\n const result = [...blocks];\n\n // Remove trailing empty paragraph blocks, but keep at least one block\n while (result.length > 1) {\n const lastBlock = result[result.length - 1];\n\n // Check if it's an empty paragraph\n const isEmptyParagraph =\n lastBlock.type === \"paragraph\" &&\n (!lastBlock.content ||\n lastBlock.content.length === 0 ||\n (Array.isArray(lastBlock.content) && lastBlock.content.every((c: any) => !c.text || c.text.trim() === \"\")));\n\n if (isEmptyParagraph) {\n result.pop();\n } else {\n break;\n }\n }\n\n return result;\n },\n [onChange],\n );\n\n const processedContent = useMemo(() => {\n if (diffContent && initialContent) {\n try {\n const diffResult = BlockNoteDiffUtil.diff(initialContent, diffContent);\n const renderedDiff = BlockNoteWordDiffRendererUtil.renderWordDiffs(\n diffResult.blocks,\n handleAcceptChange,\n handleRejectChange,\n acceptedChanges,\n rejectedChanges,\n );\n return removeTrailingEmptyBlocks(renderedDiff);\n } catch (error) {\n return initialContent && Array.isArray(initialContent) && initialContent.length > 0\n ? removeTrailingEmptyBlocks(initialContent)\n : [];\n }\n }\n\n if (!initialContent) {\n return [];\n }\n\n if (!Array.isArray(initialContent)) {\n return [];\n }\n\n return initialContent.length > 0 ? removeTrailingEmptyBlocks(initialContent) : [];\n }, [\n initialContent,\n diffContent,\n handleAcceptChange,\n handleRejectChange,\n acceptedChanges,\n rejectedChanges,\n removeTrailingEmptyBlocks,\n ]);\n\n const validatedInitialContent = useMemo(() => {\n if (processedContent && Array.isArray(processedContent) && processedContent.length > 0) {\n const validatedContent = processedContent.filter((block) => {\n if (!block || typeof block !== \"object\") return false;\n if (!(block as any).type) return false;\n return true;\n });\n return validatedContent.length > 0 ? (validatedContent as PartialBlock[]) : undefined;\n }\n return undefined;\n }, [processedContent]);\n\n const editor = useCreateBlockNote(\n useMemo(\n () => ({\n placeholders: {\n emptyDocument: placeholder || t(`generic.blocknote.placeholder`),\n },\n schema,\n initialContent: validatedInitialContent,\n uploadFile: uploadImage,\n }),\n [placeholder, t, schema, validatedInitialContent, uploadImage],\n ),\n );\n\n const handleChange = useCallback(async () => {\n if (!onChange) return;\n const newBlocks = editor.document;\n\n const markdownFromBlocks = (await editor.blocksToMarkdownLossy(editor.document)).trim();\n\n function hasUnresolvedDiffsRecursive(block: any): boolean {\n if (!block || typeof block !== \"object\") return false;\n let diffId = undefined;\n if (block.props && block.props.diffId) diffId = block.props.diffId;\n if (!diffId && block.attrs && block.attrs.diffId) diffId = block.attrs.diffId;\n if (diffId && !acceptedChanges.has(diffId) && !rejectedChanges.has(diffId)) {\n return true;\n }\n\n if (block.content) {\n const contentArr = Array.isArray(block.content) ? block.content : [block.content];\n for (const inline of contentArr) {\n if (inline && typeof inline === \"object\") {\n if (inline.type === \"diffActions\" && inline.props && inline.props.diffIds) {\n const ids =\n typeof inline.props.diffIds === \"string\" ? inline.props.diffIds.split(\",\") : inline.props.diffIds;\n for (const id of ids) {\n const trimmed = (id || \"\").toString().trim();\n if (trimmed && !acceptedChanges.has(trimmed) && !rejectedChanges.has(trimmed)) {\n return true;\n }\n }\n }\n if (inline.props && inline.props.diffId) {\n const diffIdInline = inline.props.diffId;\n if (diffIdInline && !acceptedChanges.has(diffIdInline) && !rejectedChanges.has(diffIdInline)) {\n return true;\n }\n }\n if (inline.children && Array.isArray(inline.children)) {\n for (const child of inline.children) {\n if (hasUnresolvedDiffsRecursive(child)) return true;\n }\n }\n }\n }\n }\n if (Array.isArray(block.children)) {\n for (const child of block.children) {\n if (hasUnresolvedDiffsRecursive(child)) return true;\n }\n }\n return false;\n }\n\n let hasUnresolvedDiff = false;\n if (Array.isArray(newBlocks)) {\n hasUnresolvedDiff = newBlocks.some((block: any) => hasUnresolvedDiffsRecursive(block));\n }\n\n onChange(newBlocks, !markdownFromBlocks.length, hasUnresolvedDiff);\n }, [editor, onChange, id, acceptedChanges, rejectedChanges]);\n\n // Utility: deep equality for arrays of blocks\n const areBlocksEqual = (a: any[], b: any[]): boolean => {\n return JSON.stringify(a) === JSON.stringify(b);\n };\n\n // Only initialize from markdownContent once per value, and only if different\n const hasInitializedFromMarkdown = useRef<string | null>(null);\n useEffect(() => {\n const updateContent = async (markdown: string) => {\n const blocks = await editor.tryParseMarkdownToBlocks(markdown);\n if (!areBlocksEqual(blocks, editor.document)) {\n editor.replaceBlocks(editor.document, blocks);\n }\n };\n\n if (markdownContent && hasInitializedFromMarkdown.current !== markdownContent) {\n hasInitializedFromMarkdown.current = markdownContent;\n updateContent(markdownContent).then(() => handleChange());\n }\n }, [markdownContent, editor]);\n\n // Update editor content when diff content changes, but only if different\n // Prevent unnecessary replaceBlocks calls that reset scroll/cursor.\n const previousContentHashRef = useRef<string | null>(null);\n useEffect(() => {\n if (!processedContent || !editor) return;\n const hash = JSON.stringify(processedContent);\n if (previousContentHashRef.current === hash) return; // no changes\n const currentHash = JSON.stringify(editor.document);\n if (currentHash === hash) {\n previousContentHashRef.current = hash;\n return; // already in sync\n }\n editor.replaceBlocks(editor.document, processedContent as PartialBlock[]);\n previousContentHashRef.current = hash;\n }, [processedContent, editor]);\n\n // Handle audio received from whisper transcription\n const handleAudioReceived = useCallback(\n (message: string) => {\n try {\n // Ensure the editor has focus\n const editorElement = editorRef.current?.querySelector('[contenteditable=\"true\"]') as HTMLElement;\n if (editorElement && document.activeElement !== editorElement) {\n editorElement.focus();\n }\n\n // Insert the transcribed text at the current cursor position\n editor.insertInlineContent(message);\n } catch (error) {\n console.error(\"Error inserting transcribed text:\", error);\n // Fallback: try to insert at the end of the document\n try {\n const blocks = editor.document;\n if (blocks.length > 0) {\n const lastBlock = blocks[blocks.length - 1];\n editor.setTextCursorPosition(lastBlock.id, \"end\");\n editor.insertInlineContent(message);\n }\n } catch (fallbackError) {\n console.error(\"Fallback insertion also failed:\", fallbackError);\n }\n }\n },\n [editor],\n );\n\n return (\n <div ref={editorRef} className={cn(bordered ? \"rounded-md border\" : \"\", \"w-full\")}>\n <BlockNoteView\n editor={editor}\n onChange={handleChange}\n editable={onChange !== undefined}\n formattingToolbar={false}\n theme=\"light\"\n className={cn(`BlockNoteView ${onChange ? \"min-h-96 p-4\" : \"\"}`, className, size === \"sm\" && \"small\")}\n >\n <BlockNoteEditorFormattingToolbar />\n </BlockNoteView>\n </div>\n );\n}\n","\"use client\";\n\nimport {\n BasicTextStyleButton,\n BlockTypeSelect,\n CreateLinkButton,\n FileCaptionButton,\n FileReplaceButton,\n FormattingToolbar,\n FormattingToolbarController,\n TextAlignButton,\n} from \"@blocknote/react\";\n\nexport function BlockNoteEditorFormattingToolbar() {\n return (\n <FormattingToolbarController\n formattingToolbar={() => (\n <FormattingToolbar>\n <BlockTypeSelect key={\"blockTypeSelect\"} />\n\n <FileCaptionButton key={\"fileCaptionButton\"} />\n <FileReplaceButton key={\"replaceFileButton\"} />\n\n <BasicTextStyleButton basicTextStyle={\"bold\"} key={\"boldStyleButton\"} />\n <BasicTextStyleButton basicTextStyle={\"italic\"} key={\"italicStyleButton\"} />\n <BasicTextStyleButton basicTextStyle={\"underline\"} key={\"underlineStyleButton\"} />\n <BasicTextStyleButton basicTextStyle={\"strike\"} key={\"strikeStyleButton\"} />\n\n <TextAlignButton textAlignment={\"left\"} key={\"textAlignLeftButton\"} />\n <TextAlignButton textAlignment={\"center\"} key={\"textAlignCenterButton\"} />\n <TextAlignButton textAlignment={\"right\"} key={\"textAlignRightButton\"} />\n\n <CreateLinkButton key={\"createLinkButton\"} />\n </FormattingToolbar>\n )}\n />\n );\n}\n"]}
@@ -3,14 +3,14 @@ import {
3
3
  Button,
4
4
  errorToast,
5
5
  useCurrentUserContext
6
- } from "./chunk-2TCBJO4B.mjs";
6
+ } from "./chunk-TLBZWOCU.mjs";
7
7
  import "./chunk-IGOWVLJH.mjs";
8
8
  import {
9
9
  BlockNoteDiffUtil,
10
10
  BlockNoteWordDiffRendererUtil,
11
11
  S3Service,
12
12
  cn
13
- } from "./chunk-2O7ODHTG.mjs";
13
+ } from "./chunk-CK5KLBZV.mjs";
14
14
  import "./chunk-C7C7VY4F.mjs";
15
15
  import "./chunk-SAL7XW2G.mjs";
16
16
  import "./chunk-AUXK7QSA.mjs";
@@ -380,4 +380,4 @@ __name(BlockNoteEditor, "BlockNoteEditor");
380
380
  export {
381
381
  BlockNoteEditor as default
382
382
  };
383
- //# sourceMappingURL=BlockNoteEditor-KH7WWHBK.mjs.map
383
+ //# sourceMappingURL=BlockNoteEditor-N534QVBR.mjs.map
@@ -116,6 +116,26 @@ var AbstractApiData = class {
116
116
  included: data.included
117
117
  });
118
118
  }
119
+ /**
120
+ * Read included relationship data and augment with relationship meta properties.
121
+ * Used for single relationships (one-to-one) that have edge properties.
122
+ *
123
+ * @param data - Hydrated JSON:API data
124
+ * @param type - Relationship type key (e.g., "guide")
125
+ * @param dataType - Module reference for rehydration
126
+ * @returns Related object augmented with meta properties, or undefined
127
+ */
128
+ _readIncludedWithMeta(data, type, dataType) {
129
+ const related = this._readIncluded(data, type, dataType);
130
+ if (!related || Array.isArray(related)) {
131
+ return void 0;
132
+ }
133
+ const relationshipMeta = _optionalChain([data, 'access', _2 => _2.jsonApi, 'access', _3 => _3.relationships, 'optionalAccess', _4 => _4[type], 'optionalAccess', _5 => _5.meta]);
134
+ if (!relationshipMeta) {
135
+ return related;
136
+ }
137
+ return Object.assign(related, relationshipMeta);
138
+ }
119
139
  dehydrate() {
120
140
  return {
121
141
  jsonApi: this._jsonApi,
@@ -127,9 +147,9 @@ var AbstractApiData = class {
127
147
  this._included = data.included;
128
148
  this._type = this._jsonApi.type;
129
149
  this._id = this._jsonApi.id;
130
- this._createdAt = _optionalChain([this, 'access', _2 => _2._jsonApi, 'access', _3 => _3.meta, 'optionalAccess', _4 => _4.createdAt]) !== void 0 ? new Date(this._jsonApi.meta.createdAt) : void 0;
131
- this._updatedAt = _optionalChain([this, 'access', _5 => _5._jsonApi, 'access', _6 => _6.meta, 'optionalAccess', _7 => _7.updatedAt]) !== void 0 ? new Date(this._jsonApi.meta.updatedAt) : void 0;
132
- this._self = _nullishCoalesce(_optionalChain([this, 'access', _8 => _8._jsonApi, 'access', _9 => _9.links, 'optionalAccess', _10 => _10.self]), () => ( void 0));
150
+ this._createdAt = _optionalChain([this, 'access', _6 => _6._jsonApi, 'access', _7 => _7.meta, 'optionalAccess', _8 => _8.createdAt]) !== void 0 ? new Date(this._jsonApi.meta.createdAt) : void 0;
151
+ this._updatedAt = _optionalChain([this, 'access', _9 => _9._jsonApi, 'access', _10 => _10.meta, 'optionalAccess', _11 => _11.updatedAt]) !== void 0 ? new Date(this._jsonApi.meta.updatedAt) : void 0;
152
+ this._self = _nullishCoalesce(_optionalChain([this, 'access', _12 => _12._jsonApi, 'access', _13 => _13.links, 'optionalAccess', _14 => _14.self]), () => ( void 0));
133
153
  return this;
134
154
  }
135
155
  };
@@ -328,7 +348,7 @@ function configureClientJsonApi(config) {
328
348
  }
329
349
  _chunk7QVYU63Ejs.__name.call(void 0, configureClientJsonApi, "configureClientJsonApi");
330
350
  function getClientApiUrl() {
331
- if (_optionalChain([_clientConfig, 'optionalAccess', _11 => _11.apiUrl])) {
351
+ if (_optionalChain([_clientConfig, 'optionalAccess', _15 => _15.apiUrl])) {
332
352
  return _clientConfig.apiUrl;
333
353
  }
334
354
  const envUrl = process.env.NEXT_PUBLIC_API_URL;
@@ -341,7 +361,7 @@ function getClientApiUrl() {
341
361
  }
342
362
  _chunk7QVYU63Ejs.__name.call(void 0, getClientApiUrl, "getClientApiUrl");
343
363
  function getClientAppUrl() {
344
- if (_optionalChain([_clientConfig, 'optionalAccess', _12 => _12.appUrl])) {
364
+ if (_optionalChain([_clientConfig, 'optionalAccess', _16 => _16.appUrl])) {
345
365
  return _clientConfig.appUrl;
346
366
  }
347
367
  const envUrl = process.env.NEXT_PUBLIC_ADDRESS;
@@ -354,11 +374,11 @@ function getClientAppUrl() {
354
374
  }
355
375
  _chunk7QVYU63Ejs.__name.call(void 0, getClientAppUrl, "getClientAppUrl");
356
376
  function getClientTrackablePages() {
357
- return _nullishCoalesce(_optionalChain([_clientConfig, 'optionalAccess', _13 => _13.trackablePages]), () => ( []));
377
+ return _nullishCoalesce(_optionalChain([_clientConfig, 'optionalAccess', _17 => _17.trackablePages]), () => ( []));
358
378
  }
359
379
  _chunk7QVYU63Ejs.__name.call(void 0, getClientTrackablePages, "getClientTrackablePages");
360
380
  function runClientBootstrapper() {
361
- if (_optionalChain([_clientConfig, 'optionalAccess', _14 => _14.bootstrapper])) {
381
+ if (_optionalChain([_clientConfig, 'optionalAccess', _18 => _18.bootstrapper])) {
362
382
  _clientConfig.bootstrapper();
363
383
  }
364
384
  }
@@ -377,7 +397,7 @@ async function ClientJsonApiGet(params) {
377
397
  token,
378
398
  companyId: params.companyId,
379
399
  language: params.language,
380
- additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _15 => _15.additionalHeaders])
400
+ additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _19 => _19.additionalHeaders])
381
401
  });
382
402
  return _chunkCKS6SVUKjs.translateResponse.call(void 0, {
383
403
  classKey: params.classKey,
@@ -410,7 +430,7 @@ async function ClientJsonApiPost(params) {
410
430
  files: params.files,
411
431
  companyId: params.companyId,
412
432
  language: params.language,
413
- additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _16 => _16.additionalHeaders])
433
+ additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _20 => _20.additionalHeaders])
414
434
  });
415
435
  return _chunkCKS6SVUKjs.translateResponse.call(void 0, {
416
436
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
@@ -437,7 +457,7 @@ async function ClientJsonApiPut(params) {
437
457
  files: params.files,
438
458
  companyId: params.companyId,
439
459
  language: params.language,
440
- additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _17 => _17.additionalHeaders])
460
+ additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _21 => _21.additionalHeaders])
441
461
  });
442
462
  return _chunkCKS6SVUKjs.translateResponse.call(void 0, {
443
463
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
@@ -464,7 +484,7 @@ async function ClientJsonApiPatch(params) {
464
484
  files: params.files,
465
485
  companyId: params.companyId,
466
486
  language: params.language,
467
- additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _18 => _18.additionalHeaders])
487
+ additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _22 => _22.additionalHeaders])
468
488
  });
469
489
  return _chunkCKS6SVUKjs.translateResponse.call(void 0, {
470
490
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
@@ -483,7 +503,7 @@ async function ClientJsonApiDelete(params) {
483
503
  token,
484
504
  companyId: params.companyId,
485
505
  language: params.language,
486
- additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _19 => _19.additionalHeaders])
506
+ additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _23 => _23.additionalHeaders])
487
507
  });
488
508
  return _chunkCKS6SVUKjs.translateResponse.call(void 0, {
489
509
  classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
@@ -1594,14 +1614,14 @@ var BlockNoteWordDiffRendererUtil = class {
1594
1614
  return diffBlocks.map((block) => {
1595
1615
  const updatedBlock = { ...block };
1596
1616
  if (updatedBlock.diffId) {
1597
- updatedBlock.accepted = _optionalChain([acceptedChanges, 'optionalAccess', _20 => _20.has, 'call', _21 => _21(updatedBlock.diffId)]) || false;
1598
- updatedBlock.rejected = _optionalChain([rejectedChanges, 'optionalAccess', _22 => _22.has, 'call', _23 => _23(updatedBlock.diffId)]) || false;
1617
+ updatedBlock.accepted = _optionalChain([acceptedChanges, 'optionalAccess', _24 => _24.has, 'call', _25 => _25(updatedBlock.diffId)]) || false;
1618
+ updatedBlock.rejected = _optionalChain([rejectedChanges, 'optionalAccess', _26 => _26.has, 'call', _27 => _27(updatedBlock.diffId)]) || false;
1599
1619
  }
1600
1620
  if (updatedBlock.wordDiffs) {
1601
1621
  updatedBlock.wordDiffs = updatedBlock.wordDiffs.map((wordDiff) => ({
1602
1622
  ...wordDiff,
1603
- accepted: _optionalChain([acceptedChanges, 'optionalAccess', _24 => _24.has, 'call', _25 => _25(wordDiff.diffId)]) || false,
1604
- rejected: _optionalChain([rejectedChanges, 'optionalAccess', _26 => _26.has, 'call', _27 => _27(wordDiff.diffId)]) || false
1623
+ accepted: _optionalChain([acceptedChanges, 'optionalAccess', _28 => _28.has, 'call', _29 => _29(wordDiff.diffId)]) || false,
1624
+ rejected: _optionalChain([rejectedChanges, 'optionalAccess', _30 => _30.has, 'call', _31 => _31(wordDiff.diffId)]) || false
1605
1625
  }));
1606
1626
  }
1607
1627
  if (updatedBlock.children) {
@@ -1626,7 +1646,7 @@ var BlockNoteWordDiffRendererUtil = class {
1626
1646
  type: block.type || "paragraph",
1627
1647
  props: this.getBlockProps(block),
1628
1648
  content: Array.isArray(block.content) ? block.content : [],
1629
- children: _optionalChain([block, 'access', _28 => _28.children, 'optionalAccess', _29 => _29.map, 'call', _30 => _30(
1649
+ children: _optionalChain([block, 'access', _32 => _32.children, 'optionalAccess', _33 => _33.map, 'call', _34 => _34(
1630
1650
  (child) => this.renderDiffBlock(child, onAcceptChange, onRejectChange)
1631
1651
  )])
1632
1652
  };
@@ -1639,7 +1659,7 @@ var BlockNoteWordDiffRendererUtil = class {
1639
1659
  type: block.type || "paragraph",
1640
1660
  props: block.props || {},
1641
1661
  content: Array.isArray(block.content) ? block.content : [],
1642
- children: _optionalChain([block, 'access', _31 => _31.children, 'optionalAccess', _32 => _32.map, 'call', _33 => _33(
1662
+ children: _optionalChain([block, 'access', _35 => _35.children, 'optionalAccess', _36 => _36.map, 'call', _37 => _37(
1643
1663
  (child) => this.renderDiffBlock(child, onAcceptChange, onRejectChange)
1644
1664
  )])
1645
1665
  };
@@ -1691,7 +1711,7 @@ var BlockNoteWordDiffRendererUtil = class {
1691
1711
  type: block.type || "paragraph",
1692
1712
  props: this.getBlockProps(block),
1693
1713
  content,
1694
- children: _optionalChain([block, 'access', _34 => _34.children, 'optionalAccess', _35 => _35.map, 'call', _36 => _36(
1714
+ children: _optionalChain([block, 'access', _38 => _38.children, 'optionalAccess', _39 => _39.map, 'call', _40 => _40(
1695
1715
  (child) => this.renderDiffBlock(child, onAcceptChange, onRejectChange)
1696
1716
  )])
1697
1717
  };
@@ -1713,7 +1733,7 @@ var BlockNoteWordDiffRendererUtil = class {
1713
1733
  type: block.type || "paragraph",
1714
1734
  props: block.props || {},
1715
1735
  content: Array.isArray(content) ? content : [],
1716
- children: _optionalChain([block, 'access', _37 => _37.children, 'optionalAccess', _38 => _38.map, 'call', _39 => _39((child) => this.renderDiffBlock(child, onAcceptChange, onRejectChange))]) || []
1736
+ children: _optionalChain([block, 'access', _41 => _41.children, 'optionalAccess', _42 => _42.map, 'call', _43 => _43((child) => this.renderDiffBlock(child, onAcceptChange, onRejectChange))]) || []
1717
1737
  };
1718
1738
  }
1719
1739
  static groupAndRenderWordDiffs(wordDiffs) {
@@ -2096,10 +2116,10 @@ var AuthService = class extends AbstractService {
2096
2116
  token: auth.token,
2097
2117
  refreshToken: auth.refreshToken,
2098
2118
  userId: auth.user.id,
2099
- companyId: _optionalChain([auth, 'access', _40 => _40.user, 'access', _41 => _41.company, 'optionalAccess', _42 => _42.id]),
2100
- licenseExpirationDate: _optionalChain([auth, 'access', _43 => _43.user, 'access', _44 => _44.company, 'optionalAccess', _45 => _45.licenseExpirationDate]),
2119
+ companyId: _optionalChain([auth, 'access', _44 => _44.user, 'access', _45 => _45.company, 'optionalAccess', _46 => _46.id]),
2120
+ licenseExpirationDate: _optionalChain([auth, 'access', _47 => _47.user, 'access', _48 => _48.company, 'optionalAccess', _49 => _49.licenseExpirationDate]),
2101
2121
  roles: auth.user.roles.map((role) => role.id),
2102
- features: _nullishCoalesce(_optionalChain([auth, 'access', _46 => _46.user, 'access', _47 => _47.company, 'optionalAccess', _48 => _48.features, 'optionalAccess', _49 => _49.map, 'call', _50 => _50((feature) => feature.id)]), () => ( [])),
2122
+ features: _nullishCoalesce(_optionalChain([auth, 'access', _50 => _50.user, 'access', _51 => _51.company, 'optionalAccess', _52 => _52.features, 'optionalAccess', _53 => _53.map, 'call', _54 => _54((feature) => feature.id)]), () => ( [])),
2103
2123
  modules: auth.user.modules.map((module) => ({
2104
2124
  id: module.id,
2105
2125
  permissions: module.permissions
@@ -2109,7 +2129,7 @@ var AuthService = class extends AbstractService {
2109
2129
  return auth.user;
2110
2130
  }
2111
2131
  static async logout(params) {
2112
- const language = _optionalChain([params, 'optionalAccess', _51 => _51.language]) || "en-US";
2132
+ const language = _optionalChain([params, 'optionalAccess', _55 => _55.language]) || "en-US";
2113
2133
  await _chunkCKS6SVUKjs.JsonApiDelete.call(void 0, {
2114
2134
  classKey: Modules.Auth,
2115
2135
  endpoint: new EndpointCreator({ endpoint: Modules.Auth }).generate(),
@@ -2183,10 +2203,10 @@ var AuthService = class extends AbstractService {
2183
2203
  token: auth.token,
2184
2204
  refreshToken: auth.refreshToken,
2185
2205
  userId: auth.user.id,
2186
- companyId: _optionalChain([auth, 'access', _52 => _52.user, 'access', _53 => _53.company, 'optionalAccess', _54 => _54.id]),
2187
- licenseExpirationDate: _optionalChain([auth, 'access', _55 => _55.user, 'access', _56 => _56.company, 'optionalAccess', _57 => _57.licenseExpirationDate]),
2206
+ companyId: _optionalChain([auth, 'access', _56 => _56.user, 'access', _57 => _57.company, 'optionalAccess', _58 => _58.id]),
2207
+ licenseExpirationDate: _optionalChain([auth, 'access', _59 => _59.user, 'access', _60 => _60.company, 'optionalAccess', _61 => _61.licenseExpirationDate]),
2188
2208
  roles: auth.user.roles.map((role) => role.id),
2189
- features: _nullishCoalesce(_optionalChain([auth, 'access', _58 => _58.user, 'access', _59 => _59.company, 'optionalAccess', _60 => _60.features, 'optionalAccess', _61 => _61.map, 'call', _62 => _62((feature) => feature.id)]), () => ( [])),
2209
+ features: _nullishCoalesce(_optionalChain([auth, 'access', _62 => _62.user, 'access', _63 => _63.company, 'optionalAccess', _64 => _64.features, 'optionalAccess', _65 => _65.map, 'call', _66 => _66((feature) => feature.id)]), () => ( [])),
2190
2210
  modules: auth.user.modules.map((module) => ({
2191
2211
  id: module.id,
2192
2212
  permissions: module.permissions
@@ -2472,8 +2492,8 @@ var ContentService = class extends AbstractService {
2472
2492
  if (params.fetchAll) endpoint.addAdditionalParam("fetchAll", "true");
2473
2493
  if (params.search) endpoint.addAdditionalParam("search", params.search);
2474
2494
  }
2475
- if (_optionalChain([Modules, 'access', _63 => _63.Content, 'access', _64 => _64.inclusions, 'optionalAccess', _65 => _65.lists, 'optionalAccess', _66 => _66.fields])) endpoint.limitToFields(Modules.Content.inclusions.lists.fields);
2476
- if (_optionalChain([Modules, 'access', _67 => _67.Content, 'access', _68 => _68.inclusions, 'optionalAccess', _69 => _69.lists, 'optionalAccess', _70 => _70.types])) endpoint.limitToType(Modules.Content.inclusions.lists.types);
2495
+ if (_optionalChain([Modules, 'access', _67 => _67.Content, 'access', _68 => _68.inclusions, 'optionalAccess', _69 => _69.lists, 'optionalAccess', _70 => _70.fields])) endpoint.limitToFields(Modules.Content.inclusions.lists.fields);
2496
+ if (_optionalChain([Modules, 'access', _71 => _71.Content, 'access', _72 => _72.inclusions, 'optionalAccess', _73 => _73.lists, 'optionalAccess', _74 => _74.types])) endpoint.limitToType(Modules.Content.inclusions.lists.types);
2477
2497
  return this.callApi({
2478
2498
  type: Modules.Content,
2479
2499
  method: "GET" /* GET */,
@@ -2487,8 +2507,8 @@ var ContentService = class extends AbstractService {
2487
2507
  id: params.id,
2488
2508
  childEndpoint: "relevance"
2489
2509
  });
2490
- if (_optionalChain([Modules, 'access', _71 => _71.Content, 'access', _72 => _72.inclusions, 'optionalAccess', _73 => _73.lists, 'optionalAccess', _74 => _74.fields])) endpoint.limitToFields(Modules.Content.inclusions.lists.fields);
2491
- if (_optionalChain([Modules, 'access', _75 => _75.Content, 'access', _76 => _76.inclusions, 'optionalAccess', _77 => _77.lists, 'optionalAccess', _78 => _78.types])) endpoint.limitToType(Modules.Content.inclusions.lists.types);
2510
+ if (_optionalChain([Modules, 'access', _75 => _75.Content, 'access', _76 => _76.inclusions, 'optionalAccess', _77 => _77.lists, 'optionalAccess', _78 => _78.fields])) endpoint.limitToFields(Modules.Content.inclusions.lists.fields);
2511
+ if (_optionalChain([Modules, 'access', _79 => _79.Content, 'access', _80 => _80.inclusions, 'optionalAccess', _81 => _81.lists, 'optionalAccess', _82 => _82.types])) endpoint.limitToType(Modules.Content.inclusions.lists.types);
2492
2512
  return this.callApi({
2493
2513
  type: Modules.Content,
2494
2514
  method: "GET" /* GET */,
@@ -2504,8 +2524,8 @@ var ContentService = class extends AbstractService {
2504
2524
  });
2505
2525
  if (params.fetchAll) endpoint.addAdditionalParam("fetchAll", "true");
2506
2526
  if (params.search) endpoint.addAdditionalParam("search", params.search);
2507
- if (_optionalChain([Modules, 'access', _79 => _79.Content, 'access', _80 => _80.inclusions, 'optionalAccess', _81 => _81.lists, 'optionalAccess', _82 => _82.fields])) endpoint.limitToFields(Modules.Content.inclusions.lists.fields);
2508
- if (_optionalChain([Modules, 'access', _83 => _83.Content, 'access', _84 => _84.inclusions, 'optionalAccess', _85 => _85.lists, 'optionalAccess', _86 => _86.types])) endpoint.limitToType(Modules.Content.inclusions.lists.types);
2527
+ if (_optionalChain([Modules, 'access', _83 => _83.Content, 'access', _84 => _84.inclusions, 'optionalAccess', _85 => _85.lists, 'optionalAccess', _86 => _86.fields])) endpoint.limitToFields(Modules.Content.inclusions.lists.fields);
2528
+ if (_optionalChain([Modules, 'access', _87 => _87.Content, 'access', _88 => _88.inclusions, 'optionalAccess', _89 => _89.lists, 'optionalAccess', _90 => _90.types])) endpoint.limitToType(Modules.Content.inclusions.lists.types);
2509
2529
  return this.callApi({
2510
2530
  type: Modules.Content,
2511
2531
  method: "GET" /* GET */,
@@ -3197,8 +3217,8 @@ var UserService = class extends AbstractService {
3197
3217
  id: params.id,
3198
3218
  childEndpoint: "user-relevance"
3199
3219
  });
3200
- if (_optionalChain([Modules, 'access', _87 => _87.User, 'access', _88 => _88.inclusions, 'optionalAccess', _89 => _89.lists, 'optionalAccess', _90 => _90.fields])) endpoint.limitToFields(Modules.User.inclusions.lists.fields);
3201
- if (_optionalChain([Modules, 'access', _91 => _91.User, 'access', _92 => _92.inclusions, 'optionalAccess', _93 => _93.lists, 'optionalAccess', _94 => _94.types])) endpoint.limitToType(Modules.User.inclusions.lists.types);
3220
+ if (_optionalChain([Modules, 'access', _91 => _91.User, 'access', _92 => _92.inclusions, 'optionalAccess', _93 => _93.lists, 'optionalAccess', _94 => _94.fields])) endpoint.limitToFields(Modules.User.inclusions.lists.fields);
3221
+ if (_optionalChain([Modules, 'access', _95 => _95.User, 'access', _96 => _96.inclusions, 'optionalAccess', _97 => _97.lists, 'optionalAccess', _98 => _98.types])) endpoint.limitToType(Modules.User.inclusions.lists.types);
3202
3222
  return this.callApi({
3203
3223
  type: Modules.User,
3204
3224
  method: "GET" /* GET */,
@@ -3435,4 +3455,4 @@ var AuthorModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory
3435
3455
 
3436
3456
 
3437
3457
  exports.RehydrationFactory = RehydrationFactory; exports.AbstractApiData = AbstractApiData; exports.HttpMethod = HttpMethod; exports.setGlobalErrorHandler = setGlobalErrorHandler; exports.getGlobalErrorHandler = getGlobalErrorHandler; exports.AbstractService = AbstractService; exports.configureClientJsonApi = configureClientJsonApi; exports.getClientApiUrl = getClientApiUrl; exports.getClientAppUrl = getClientAppUrl; exports.getClientTrackablePages = getClientTrackablePages; exports.ClientJsonApiGet = ClientJsonApiGet; exports.ClientJsonApiPost = ClientJsonApiPost; exports.ClientJsonApiPut = ClientJsonApiPut; exports.ClientJsonApiPatch = ClientJsonApiPatch; exports.ClientJsonApiDelete = ClientJsonApiDelete; exports.ClientHttpMethod = ClientHttpMethod; exports.setClientGlobalErrorHandler = setClientGlobalErrorHandler; exports.getClientGlobalErrorHandler = getClientGlobalErrorHandler; exports.ClientAbstractService = ClientAbstractService; exports.ModuleRegistrar = ModuleRegistrar; exports.ModuleRegistry = ModuleRegistry; exports.Modules = Modules; exports.EndpointCreator = EndpointCreator; exports.createJsonApiInclusion = createJsonApiInclusion; exports.rehydrate = rehydrate; exports.rehydrateList = rehydrateList; exports.cn = cn; exports.composeRefs = composeRefs; exports.useComposedRefs = useComposedRefs; exports.useIsMobile = useIsMobile; exports.formatDate = formatDate; exports.exists = exists; exports.TableOptions = TableOptions; exports.getTableOptions = getTableOptions; exports.getTableComponents = getTableComponents; exports.userObjectSchema = userObjectSchema; exports.entityObjectSchema = entityObjectSchema; exports.BlockNoteDiffUtil = BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = BlockNoteWordDiffRendererUtil; exports.getIconByModule = getIconByModule; exports.getIcon = getIcon; exports.getIconByModuleName = getIconByModuleName; exports.getLucideIcon = getLucideIcon; exports.getLucideIconByModule = getLucideIconByModule; exports.getLucideIconByModuleName = getLucideIconByModuleName; exports.Action = Action; exports.checkPermissions = checkPermissions; exports.checkPermissionsFromServer = checkPermissionsFromServer; exports.getValueFromPath = getValueFromPath; exports.Auth = Auth; exports.configureAuth = configureAuth; exports.getTokenHandler = getTokenHandler; exports.AuthService = AuthService; exports.AuthComponent = AuthComponent; exports.AuthModule = AuthModule; exports.Company = Company; exports.CompanyFields = CompanyFields; exports.CompanyService = CompanyService; exports.CompanyModule = CompanyModule; exports.Content = Content; exports.ContentFields = ContentFields; exports.ContentService = ContentService; exports.ContentModule = ContentModule; exports.Feature = Feature; exports.FeatureService = FeatureService; exports.FeatureModule = FeatureModule; exports.Module = Module; exports.ModuleModule = ModuleModule; exports.Notification = Notification; exports.NotificationFields = NotificationFields; exports.NotificationService = NotificationService; exports.NotificationModule = NotificationModule; exports.Push = Push; exports.PushService = PushService; exports.PushModule = PushModule; exports.Role = Role; exports.RoleFields = RoleFields; exports.RoleService = RoleService; exports.RoleModule = RoleModule; exports.S3 = S3; exports.S3Module = S3Module; exports.S3Service = S3Service; exports.User = User; exports.UserFields = UserFields; exports.UserService = UserService; exports.UserModule = UserModule; exports.AuthorModule = AuthorModule;
3438
- //# sourceMappingURL=chunk-3HL4VFJ4.js.map
3458
+ //# sourceMappingURL=chunk-7Z7FEMEB.js.map