@carlonicora/nja-todos 0.0.1 → 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.
Files changed (215) hide show
  1. package/LICENSE +675 -0
  2. package/README.md +791 -2
  3. package/dist/api/common/decorate.d.ts +21 -0
  4. package/dist/api/common/decorate.d.ts.map +1 -0
  5. package/dist/api/common/decorate.js +39 -0
  6. package/dist/api/common/decorate.js.map +1 -0
  7. package/dist/api/config/todos.config.d.ts +51 -0
  8. package/dist/api/config/todos.config.d.ts.map +1 -0
  9. package/dist/api/config/todos.config.js +7 -0
  10. package/dist/api/config/todos.config.js.map +1 -0
  11. package/dist/api/events/todos.event.payloads.d.ts +21 -0
  12. package/dist/api/events/todos.event.payloads.d.ts.map +1 -0
  13. package/dist/api/events/todos.event.payloads.js +3 -0
  14. package/dist/api/events/todos.event.payloads.js.map +1 -0
  15. package/dist/api/index.d.ts +22 -0
  16. package/dist/api/index.d.ts.map +1 -0
  17. package/dist/api/index.js +49 -0
  18. package/dist/api/index.js.map +1 -0
  19. package/dist/api/notifications/todos.notification.processor.d.ts +48 -0
  20. package/dist/api/notifications/todos.notification.processor.d.ts.map +1 -0
  21. package/dist/api/notifications/todos.notification.processor.js +251 -0
  22. package/dist/api/notifications/todos.notification.processor.js.map +1 -0
  23. package/dist/api/notifications/todos.queue.d.ts +41 -0
  24. package/dist/api/notifications/todos.queue.d.ts.map +1 -0
  25. package/dist/api/notifications/todos.queue.js +35 -0
  26. package/dist/api/notifications/todos.queue.js.map +1 -0
  27. package/dist/api/task/controllers/task.controller.factory.d.ts +38 -0
  28. package/dist/api/task/controllers/task.controller.factory.d.ts.map +1 -0
  29. package/dist/api/task/controllers/task.controller.factory.js +314 -0
  30. package/dist/api/task/controllers/task.controller.factory.js.map +1 -0
  31. package/dist/api/task/dtos/task.dtos.d.ts +15 -0
  32. package/dist/api/task/dtos/task.dtos.d.ts.map +1 -0
  33. package/dist/api/task/dtos/task.dtos.js +260 -0
  34. package/dist/api/task/dtos/task.dtos.js.map +1 -0
  35. package/dist/api/task/entities/task.d.ts +21 -0
  36. package/dist/api/task/entities/task.d.ts.map +1 -0
  37. package/dist/api/task/entities/task.js +95 -0
  38. package/dist/api/task/entities/task.js.map +1 -0
  39. package/dist/api/task/entities/task.meta.d.ts +3 -0
  40. package/dist/api/task/entities/task.meta.d.ts.map +1 -0
  41. package/dist/api/task/entities/task.meta.js +11 -0
  42. package/dist/api/task/entities/task.meta.js.map +1 -0
  43. package/dist/api/task/repositories/task.repository.d.ts +104 -0
  44. package/dist/api/task/repositories/task.repository.d.ts.map +1 -0
  45. package/dist/api/task/repositories/task.repository.js +328 -0
  46. package/dist/api/task/repositories/task.repository.js.map +1 -0
  47. package/dist/api/task/services/task.service.d.ts +149 -0
  48. package/dist/api/task/services/task.service.d.ts.map +1 -0
  49. package/dist/api/task/services/task.service.js +378 -0
  50. package/dist/api/task/services/task.service.js.map +1 -0
  51. package/dist/api/taskcomment/controllers/taskcomment.controller.factory.d.ts +44 -0
  52. package/dist/api/taskcomment/controllers/taskcomment.controller.factory.d.ts.map +1 -0
  53. package/dist/api/taskcomment/controllers/taskcomment.controller.factory.js +136 -0
  54. package/dist/api/taskcomment/controllers/taskcomment.controller.factory.js.map +1 -0
  55. package/dist/api/taskcomment/dtos/taskcomment.post.dto.d.ts +23 -0
  56. package/dist/api/taskcomment/dtos/taskcomment.post.dto.d.ts.map +1 -0
  57. package/dist/api/taskcomment/dtos/taskcomment.post.dto.js +87 -0
  58. package/dist/api/taskcomment/dtos/taskcomment.post.dto.js.map +1 -0
  59. package/dist/api/taskcomment/dtos/taskcomment.put.dto.d.ts +21 -0
  60. package/dist/api/taskcomment/dtos/taskcomment.put.dto.d.ts.map +1 -0
  61. package/dist/api/taskcomment/dtos/taskcomment.put.dto.js +71 -0
  62. package/dist/api/taskcomment/dtos/taskcomment.put.dto.js.map +1 -0
  63. package/dist/api/taskcomment/entities/taskcomment.d.ts +11 -0
  64. package/dist/api/taskcomment/entities/taskcomment.d.ts.map +1 -0
  65. package/dist/api/taskcomment/entities/taskcomment.js +44 -0
  66. package/dist/api/taskcomment/entities/taskcomment.js.map +1 -0
  67. package/dist/api/taskcomment/entities/taskcomment.meta.d.ts +5 -0
  68. package/dist/api/taskcomment/entities/taskcomment.meta.d.ts.map +1 -0
  69. package/dist/api/taskcomment/entities/taskcomment.meta.js +13 -0
  70. package/dist/api/taskcomment/entities/taskcomment.meta.js.map +1 -0
  71. package/dist/api/taskcomment/repositories/taskcomment.repository.d.ts +25 -0
  72. package/dist/api/taskcomment/repositories/taskcomment.repository.d.ts.map +1 -0
  73. package/dist/api/taskcomment/repositories/taskcomment.repository.js +73 -0
  74. package/dist/api/taskcomment/repositories/taskcomment.repository.js.map +1 -0
  75. package/dist/api/taskcomment/services/taskcomment.service.d.ts +78 -0
  76. package/dist/api/taskcomment/services/taskcomment.service.d.ts.map +1 -0
  77. package/dist/api/taskcomment/services/taskcomment.service.js +190 -0
  78. package/dist/api/taskcomment/services/taskcomment.service.js.map +1 -0
  79. package/dist/api/todos.module.d.ts +20 -0
  80. package/dist/api/todos.module.d.ts.map +1 -0
  81. package/dist/api/todos.module.js +143 -0
  82. package/dist/api/todos.module.js.map +1 -0
  83. package/dist/chunk-CO56HIPE.mjs +283 -0
  84. package/dist/chunk-CO56HIPE.mjs.map +1 -0
  85. package/dist/chunk-K6KLDGC2.js +283 -0
  86. package/dist/chunk-K6KLDGC2.js.map +1 -0
  87. package/dist/seed/index.d.ts +4 -0
  88. package/dist/seed/index.d.ts.map +1 -0
  89. package/dist/seed/index.js +9 -0
  90. package/dist/seed/index.js.map +1 -0
  91. package/dist/seed/todos.module.seed.d.ts +12 -0
  92. package/dist/seed/todos.module.seed.d.ts.map +1 -0
  93. package/dist/seed/todos.module.seed.js +54 -0
  94. package/dist/seed/todos.module.seed.js.map +1 -0
  95. package/dist/shared/index.d.ts +7 -0
  96. package/dist/shared/index.d.ts.map +1 -0
  97. package/dist/shared/index.js +23 -0
  98. package/dist/shared/index.js.map +1 -0
  99. package/dist/shared/task.completed.filter.d.ts +2 -0
  100. package/dist/shared/task.completed.filter.d.ts.map +1 -0
  101. package/dist/shared/task.completed.filter.js +3 -0
  102. package/dist/shared/task.completed.filter.js.map +1 -0
  103. package/dist/shared/task.priority.d.ts +6 -0
  104. package/dist/shared/task.priority.d.ts.map +1 -0
  105. package/dist/shared/task.priority.js +10 -0
  106. package/dist/shared/task.priority.js.map +1 -0
  107. package/dist/shared/todos.endpoints.d.ts +7 -0
  108. package/dist/shared/todos.endpoints.d.ts.map +1 -0
  109. package/dist/shared/todos.endpoints.js +10 -0
  110. package/dist/shared/todos.endpoints.js.map +1 -0
  111. package/dist/shared/todos.events.d.ts +13 -0
  112. package/dist/shared/todos.events.d.ts.map +1 -0
  113. package/dist/shared/todos.events.js +16 -0
  114. package/dist/shared/todos.events.js.map +1 -0
  115. package/dist/shared/todos.module.ids.d.ts +5 -0
  116. package/dist/shared/todos.module.ids.d.ts.map +1 -0
  117. package/dist/shared/todos.module.ids.js +8 -0
  118. package/dist/shared/todos.module.ids.js.map +1 -0
  119. package/dist/shared/todos.notification.types.d.ts +6 -0
  120. package/dist/shared/todos.notification.types.d.ts.map +1 -0
  121. package/dist/shared/todos.notification.types.js +9 -0
  122. package/dist/shared/todos.notification.types.js.map +1 -0
  123. package/dist/web/config/todos.config.d.ts +25 -0
  124. package/dist/web/config/todos.config.d.ts.map +1 -0
  125. package/dist/web/config/todos.ui.config.d.ts +28 -0
  126. package/dist/web/config/todos.ui.config.d.ts.map +1 -0
  127. package/dist/web/core.d.ts +18 -0
  128. package/dist/web/core.d.ts.map +1 -0
  129. package/dist/web/core.js +208 -0
  130. package/dist/web/core.js.map +1 -0
  131. package/dist/web/core.mjs +208 -0
  132. package/dist/web/core.mjs.map +1 -0
  133. package/dist/web/index.d.ts +22 -0
  134. package/dist/web/index.d.ts.map +1 -0
  135. package/dist/web/index.js +1959 -0
  136. package/dist/web/index.js.map +1 -0
  137. package/dist/web/index.mjs +1958 -0
  138. package/dist/web/index.mjs.map +1 -0
  139. package/dist/web/task/TaskModule.d.ts +6 -0
  140. package/dist/web/task/TaskModule.d.ts.map +1 -0
  141. package/dist/web/task/components/EisenhowerIcon.d.ts +9 -0
  142. package/dist/web/task/components/EisenhowerIcon.d.ts.map +1 -0
  143. package/dist/web/task/components/EisenhowerMatrixBoard.d.ts +21 -0
  144. package/dist/web/task/components/EisenhowerMatrixBoard.d.ts.map +1 -0
  145. package/dist/web/task/components/TaskMatrixCard.d.ts +11 -0
  146. package/dist/web/task/components/TaskMatrixCard.d.ts.map +1 -0
  147. package/dist/web/task/components/containers/TaskListContainer.d.ts +12 -0
  148. package/dist/web/task/components/containers/TaskListContainer.d.ts.map +1 -0
  149. package/dist/web/task/components/editors/TaskEditor.d.ts +12 -0
  150. package/dist/web/task/components/editors/TaskEditor.d.ts.map +1 -0
  151. package/dist/web/task/components/filters/TaskListFilters.d.ts +9 -0
  152. package/dist/web/task/components/filters/TaskListFilters.d.ts.map +1 -0
  153. package/dist/web/task/components/filters/TaskViewSwitcher.d.ts +9 -0
  154. package/dist/web/task/components/filters/TaskViewSwitcher.d.ts.map +1 -0
  155. package/dist/web/task/components/forms/TaskCreateButton.d.ts +5 -0
  156. package/dist/web/task/components/forms/TaskCreateButton.d.ts.map +1 -0
  157. package/dist/web/task/components/forms/TaskDeleter.d.ts +8 -0
  158. package/dist/web/task/components/forms/TaskDeleter.d.ts.map +1 -0
  159. package/dist/web/task/components/lists/TasksList.d.ts +20 -0
  160. package/dist/web/task/components/lists/TasksList.d.ts.map +1 -0
  161. package/dist/web/task/components/screens/UserTasksScreen.d.ts +5 -0
  162. package/dist/web/task/components/screens/UserTasksScreen.d.ts.map +1 -0
  163. package/dist/web/task/contexts/TaskContext.d.ts +29 -0
  164. package/dist/web/task/contexts/TaskContext.d.ts.map +1 -0
  165. package/dist/web/task/data/Task.d.ts +25 -0
  166. package/dist/web/task/data/Task.d.ts.map +1 -0
  167. package/dist/web/task/data/TaskFields.d.ts +12 -0
  168. package/dist/web/task/data/TaskFields.d.ts.map +1 -0
  169. package/dist/web/task/data/TaskInterface.d.ts +29 -0
  170. package/dist/web/task/data/TaskInterface.d.ts.map +1 -0
  171. package/dist/web/task/data/TaskService.d.ts +51 -0
  172. package/dist/web/task/data/TaskService.d.ts.map +1 -0
  173. package/dist/web/task/hooks/useTaskDeepLink.d.ts +12 -0
  174. package/dist/web/task/hooks/useTaskDeepLink.d.ts.map +1 -0
  175. package/dist/web/task/hooks/useTaskOverdueParam.d.ts +19 -0
  176. package/dist/web/task/hooks/useTaskOverdueParam.d.ts.map +1 -0
  177. package/dist/web/task/hooks/useTaskTableStructure.d.ts +8 -0
  178. package/dist/web/task/hooks/useTaskTableStructure.d.ts.map +1 -0
  179. package/dist/web/task/lib/task.priority.options.d.ts +5 -0
  180. package/dist/web/task/lib/task.priority.options.d.ts.map +1 -0
  181. package/dist/web/task/utils/dueDate.d.ts +11 -0
  182. package/dist/web/task/utils/dueDate.d.ts.map +1 -0
  183. package/dist/web/task/utils/getEisenhowerQuadrant.d.ts +4 -0
  184. package/dist/web/task/utils/getEisenhowerQuadrant.d.ts.map +1 -0
  185. package/dist/web/task/utils/isTaskOverdue.d.ts +12 -0
  186. package/dist/web/task/utils/isTaskOverdue.d.ts.map +1 -0
  187. package/dist/web/taskcomment/TaskCommentModule.d.ts +5 -0
  188. package/dist/web/taskcomment/TaskCommentModule.d.ts.map +1 -0
  189. package/dist/web/taskcomment/components/forms/TaskCommentEditor.d.ts +2 -0
  190. package/dist/web/taskcomment/components/forms/TaskCommentEditor.d.ts.map +1 -0
  191. package/dist/web/taskcomment/components/lists/TaskCommentList.d.ts +2 -0
  192. package/dist/web/taskcomment/components/lists/TaskCommentList.d.ts.map +1 -0
  193. package/dist/web/taskcomment/contexts/TaskCommentContext.d.ts +22 -0
  194. package/dist/web/taskcomment/contexts/TaskCommentContext.d.ts.map +1 -0
  195. package/dist/web/taskcomment/data/TaskComment.d.ts +11 -0
  196. package/dist/web/taskcomment/data/TaskComment.d.ts.map +1 -0
  197. package/dist/web/taskcomment/data/TaskCommentInterface.d.ts +12 -0
  198. package/dist/web/taskcomment/data/TaskCommentInterface.d.ts.map +1 -0
  199. package/dist/web/taskcomment/data/TaskCommentService.d.ts +16 -0
  200. package/dist/web/taskcomment/data/TaskCommentService.d.ts.map +1 -0
  201. package/dist/web/todos.modules.d.ts +10 -0
  202. package/dist/web/todos.modules.d.ts.map +1 -0
  203. package/dist/web/utils/isNotFoundError.d.ts +11 -0
  204. package/dist/web/utils/isNotFoundError.d.ts.map +1 -0
  205. package/i18n/en/todos.json +13 -0
  206. package/i18n/it/todos.json +13 -0
  207. package/messages/en.json +132 -0
  208. package/messages/it.json +132 -0
  209. package/package.json +214 -5
  210. package/templates/email/en/taskAssigned.hbs +31 -0
  211. package/templates/email/en/taskCommented.hbs +31 -0
  212. package/templates/email/en/taskCompleted.hbs +31 -0
  213. package/templates/email/it/taskAssigned.hbs +31 -0
  214. package/templates/email/it/taskCommented.hbs +31 -0
  215. package/templates/email/it/taskCompleted.hbs +31 -0
@@ -0,0 +1,29 @@
1
+ import { ReactNode } from "react";
2
+ import { TaskScope } from "../../config/todos.config";
3
+ import { TaskInterface } from "../data/TaskInterface";
4
+ export type TaskContextType = {
5
+ task: TaskInterface | undefined;
6
+ scope: TaskScope | undefined;
7
+ /** Opens the editor on a fresh read of the task (`GET tasks/:id`): rows, cards and app code use this. */
8
+ setTaskId: (taskId: string) => Promise<void>;
9
+ setNewTask: () => void;
10
+ /** Opens the editor on a task the caller has just read (the deep link). */
11
+ showTask: (task: TaskInterface) => void;
12
+ taskEditorShown: boolean;
13
+ setTaskEditorShown: (value: boolean) => void;
14
+ hideTaskEditor: () => void;
15
+ /** Replaces the current task with a saved copy. Never opens the editor, and ignores a task that is no
16
+ * longer the current one (a save that resolves after the editor moved on). */
17
+ setCurrentTask: (task: TaskInterface) => void;
18
+ version: number;
19
+ };
20
+ type TaskProviderProps = {
21
+ children: ReactNode;
22
+ /** The linked record of this page: a new task's link is prefilled from it. */
23
+ scope?: TaskScope;
24
+ };
25
+ export declare function TaskProvider({ children, scope }: TaskProviderProps): import("react").JSX.Element;
26
+ export declare function useTaskContext(): TaskContextType;
27
+ export declare const useRefreshOnTaskEditorClose: (refresh: () => void) => void;
28
+ export {};
29
+ //# sourceMappingURL=TaskContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskContext.d.ts","sourceRoot":"","sources":["../../../../src/web/task/contexts/TaskContext.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAiB,SAAS,EAA2C,MAAM,OAAO,CAAC;AAC1F,OAAO,EAAkB,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGtD,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,aAAa,GAAG,SAAS,CAAC;IAChC,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,yGAAyG;IACzG,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,2EAA2E;IAC3E,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B;mFAC+E;IAC/E,cAAc,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC9C,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAIF,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,iBAAiB,+BA6ElE;AAeD,wBAAgB,cAAc,IAAI,eAAe,CAEhD;AAED,eAAO,MAAM,2BAA2B,GAAI,SAAS,MAAM,IAAI,SAQ9D,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { AbstractApiData, type ApiDataInterface, type JsonApiHydratedDataInterface, type UserInterface } from "@carlonicora/nextjs-jsonapi/core";
2
+ import type { TaskPriority } from "../../../shared/task.priority";
3
+ import type { TaskInput, TaskInterface } from "./TaskInterface";
4
+ export declare class Task extends AbstractApiData implements TaskInterface {
5
+ private _name?;
6
+ private _content?;
7
+ private _priority?;
8
+ private _dueDate?;
9
+ private _completed?;
10
+ private _creator?;
11
+ private _assignee?;
12
+ private _related;
13
+ get name(): string;
14
+ get content(): any;
15
+ get priority(): TaskPriority | undefined;
16
+ get dueDate(): Date | undefined;
17
+ get completed(): boolean;
18
+ get creator(): UserInterface | undefined;
19
+ get assignee(): UserInterface | undefined;
20
+ related<T extends ApiDataInterface = ApiDataInterface>(key: string): T | undefined;
21
+ relatedMany<T extends ApiDataInterface = ApiDataInterface>(key: string): T[];
22
+ rehydrate(data: JsonApiHydratedDataInterface): this;
23
+ createJsonApi(data: TaskInput): any;
24
+ }
25
+ //# sourceMappingURL=Task.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Task.d.ts","sourceRoot":"","sources":["../../../../src/web/task/data/Task.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAGf,KAAK,gBAAgB,EACrB,KAAK,4BAA4B,EACjC,KAAK,aAAa,EACnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAGlE,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhE,qBAAa,IAAK,SAAQ,eAAgB,YAAW,aAAa;IAChE,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,OAAO,CAAC,QAAQ,CAAC,CAAM;IACvB,OAAO,CAAC,SAAS,CAAC,CAAe;IACjC,OAAO,CAAC,QAAQ,CAAC,CAAO;IACxB,OAAO,CAAC,UAAU,CAAC,CAAU;IAC7B,OAAO,CAAC,QAAQ,CAAC,CAAgB;IACjC,OAAO,CAAC,SAAS,CAAC,CAAgB;IAClC,OAAO,CAAC,QAAQ,CAAyE;IAEzF,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,OAAO,IAAI,GAAG,CAEjB;IAED,IAAI,QAAQ,IAAI,YAAY,GAAG,SAAS,CAEvC;IAED,IAAI,OAAO,IAAI,IAAI,GAAG,SAAS,CAE9B;IAED,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,OAAO,IAAI,aAAa,GAAG,SAAS,CAEvC;IAED,IAAI,QAAQ,IAAI,aAAa,GAAG,SAAS,CAExC;IAED,OAAO,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAKlF,WAAW,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,EAAE;IAM5E,SAAS,CAAC,IAAI,EAAE,4BAA4B,GAAG,IAAI;IAoBnD,aAAa,CAAC,IAAI,EAAE,SAAS;CA8B9B"}
@@ -0,0 +1,12 @@
1
+ export declare enum TaskFields {
2
+ taskId = "taskId",
3
+ name = "name",
4
+ assignee = "assignee",
5
+ owner = "owner",
6
+ priority = "priority",
7
+ dueDate = "dueDate",
8
+ relationships = "relationships",
9
+ createdAt = "createdAt",
10
+ updatedAt = "updatedAt"
11
+ }
12
+ //# sourceMappingURL=TaskFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskFields.d.ts","sourceRoot":"","sources":["../../../../src/web/task/data/TaskFields.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,MAAM,WAAW;IAEjB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,OAAO,YAAY;IAEnB,aAAa,kBAAkB;IAE/B,SAAS,cAAc;IACvB,SAAS,cAAc;CACxB"}
@@ -0,0 +1,29 @@
1
+ import type { ApiDataInterface, UserInterface } from "@carlonicora/nextjs-jsonapi/core";
2
+ import type { TaskPriority } from "../../../shared/task.priority";
3
+ export type TaskInput = {
4
+ id: string;
5
+ name?: string;
6
+ content?: any;
7
+ priority?: TaskPriority | null;
8
+ dueDate?: Date | null;
9
+ completed?: boolean;
10
+ assigneeId?: string;
11
+ /** Linked record ids, by relationship key. */
12
+ related?: Record<string, string | string[] | undefined>;
13
+ };
14
+ /** A record a task links to (campaign, account, …): the app's model, of which the task only reads the name. */
15
+ export type TaskLinkedEntity = ApiDataInterface & {
16
+ readonly name?: string;
17
+ };
18
+ export interface TaskInterface extends ApiDataInterface {
19
+ get name(): string;
20
+ get content(): any;
21
+ get priority(): TaskPriority | undefined;
22
+ get dueDate(): Date | undefined;
23
+ get completed(): boolean;
24
+ get creator(): UserInterface | undefined;
25
+ get assignee(): UserInterface | undefined;
26
+ related<T extends ApiDataInterface = ApiDataInterface>(key: string): T | undefined;
27
+ relatedMany<T extends ApiDataInterface = ApiDataInterface>(key: string): T[];
28
+ }
29
+ //# sourceMappingURL=TaskInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskInterface.d.ts","sourceRoot":"","sources":["../../../../src/web/task/data/TaskInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,QAAQ,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;CACzD,CAAC;AAEF,+GAA+G;AAC/G,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE7E,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACrD,IAAI,IAAI,IAAI,MAAM,CAAC;IACnB,IAAI,OAAO,IAAI,GAAG,CAAC;IACnB,IAAI,QAAQ,IAAI,YAAY,GAAG,SAAS,CAAC;IACzC,IAAI,OAAO,IAAI,IAAI,GAAG,SAAS,CAAC;IAChC,IAAI,SAAS,IAAI,OAAO,CAAC;IACzB,IAAI,OAAO,IAAI,aAAa,GAAG,SAAS,CAAC;IACzC,IAAI,QAAQ,IAAI,aAAa,GAAG,SAAS,CAAC;IAC1C,OAAO,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;IACnF,WAAW,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC;CAC9E"}
@@ -0,0 +1,51 @@
1
+ import { AbstractService, type NextRef, type PreviousRef } from "@carlonicora/nextjs-jsonapi/core";
2
+ import type { TaskCompletedFilter } from "../../../shared/task.completed.filter";
3
+ import type { TaskInput, TaskInterface } from "./TaskInterface";
4
+ export type TaskListParams = {
5
+ search?: string;
6
+ completedFilter?: TaskCompletedFilter;
7
+ filterPriority?: string;
8
+ fetchAll?: boolean;
9
+ /** Caps the page; the JSON:API paginator reads it as page[size]. */
10
+ pageSize?: number;
11
+ sort?: string;
12
+ next?: NextRef;
13
+ prev?: PreviousRef;
14
+ };
15
+ export declare class TaskService extends AbstractService {
16
+ private static addListParams;
17
+ static findOne(params: {
18
+ id: string;
19
+ }): Promise<TaskInterface>;
20
+ static findMany(params: TaskListParams): Promise<TaskInterface[]>;
21
+ static findManyByRelated(params: TaskListParams & {
22
+ key: string;
23
+ id: string;
24
+ }): Promise<TaskInterface[]>;
25
+ static findManyByUser(params: TaskListParams & {
26
+ userId: string;
27
+ creator?: boolean;
28
+ }): Promise<TaskInterface[]>;
29
+ static create(params: TaskInput): Promise<TaskInterface>;
30
+ static update(params: TaskInput): Promise<TaskInterface>;
31
+ static patch(params: TaskInput): Promise<TaskInterface>;
32
+ static patchRelationships(params: {
33
+ id: string;
34
+ related: Record<string, string | string[] | undefined>;
35
+ }): Promise<TaskInterface>;
36
+ static toggleComplete(params: {
37
+ taskId: string;
38
+ completed: boolean;
39
+ }): Promise<TaskInterface>;
40
+ static changeAssignee(params: {
41
+ taskId: string;
42
+ assigneeId: string;
43
+ }): Promise<TaskInterface>;
44
+ static clearAssignee(params: {
45
+ taskId: string;
46
+ }): Promise<void>;
47
+ static delete(params: {
48
+ id: string;
49
+ }): Promise<void>;
50
+ }
51
+ //# sourceMappingURL=TaskService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskService.d.ts","sourceRoot":"","sources":["../../../../src/web/task/data/TaskService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAIf,KAAK,OAAO,EACZ,KAAK,WAAW,EACjB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAQjF,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhE,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB,CAAC;AAEF,qBAAa,WAAY,SAAQ,eAAe;IAC9C,OAAO,CAAC,MAAM,CAAC,aAAa;WAUf,OAAO,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,CAAC;WASvD,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;WAa1D,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;WAmBjG,cAAc,CACzB,MAAM,EAAE,cAAc,GAAG;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GAC7D,OAAO,CAAC,aAAa,EAAE,CAAC;WAmBd,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC;WAUjD,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC;WAUjD,KAAK,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC;WAUhD,kBAAkB,CAAC,MAAM,EAAE;QACtC,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;KACxD,GAAG,OAAO,CAAC,aAAa,CAAC;WAgBb,cAAc,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,CAAC;WAgBtF,cAAc,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,CAAC;WActF,aAAa,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;WAaxD,MAAM,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ3D"}
@@ -0,0 +1,12 @@
1
+ import type { TaskScope } from "../../config/todos.config";
2
+ /**
3
+ * Opens the task editor for `?task=<id>` once, on mount, and removes the parameter when the editor closes.
4
+ *
5
+ * The address is read from `window.location`, never `useSearchParams`, so no `<Suspense>` boundary is needed
6
+ * (same shape as `useTaskOverdueParam`). A task outside `scope`, a missing one, or one of another company shows
7
+ * "Task not found" and removes the parameter; the editor never opens.
8
+ */
9
+ export declare function useTaskDeepLink(params?: {
10
+ scope?: TaskScope;
11
+ }): void;
12
+ //# sourceMappingURL=useTaskDeepLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTaskDeepLink.d.ts","sourceRoot":"","sources":["../../../../src/web/task/hooks/useTaskDeepLink.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAkB3D;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG,IAAI,CAgCpE"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The "Overdue" filter of a task list, kept in the page address as `overdue=true`
3
+ * (absent when off).
4
+ *
5
+ * The address is read from `window.location` once on mount, so this hook is not a Next
6
+ * search-params hook consumer and needs no `<Suspense>` boundary (same shape as the
7
+ * package's `useListSortParam`). `ready` is false until that read has happened; the list
8
+ * holds its first request until then, so an address with `overdue=true` costs one
9
+ * filtered request, not an unfiltered one followed by a filtered one.
10
+ *
11
+ * `setOverdue` replaces only the query string of the current path with
12
+ * `history.replaceState`, keeping every other search param and the hash.
13
+ */
14
+ export declare function useTaskOverdueParam(): {
15
+ overdue: boolean;
16
+ ready: boolean;
17
+ setOverdue: (value: boolean) => void;
18
+ };
19
+ //# sourceMappingURL=useTaskOverdueParam.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTaskOverdueParam.d.ts","sourceRoot":"","sources":["../../../../src/web/task/hooks/useTaskOverdueParam.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,IAAI;IACrC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,CAAC;IACf,UAAU,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACtC,CAwBA"}
@@ -0,0 +1,8 @@
1
+ import { UseTableStructureHook } from "@carlonicora/nextjs-jsonapi/client";
2
+ import { ReactNode } from "react";
3
+ import { TaskFields } from "../data/TaskFields";
4
+ import { TaskInterface } from "../data/TaskInterface";
5
+ /** Extra badges an app shows on a task's row, after its name (e.g. an activity count). Return null for none. */
6
+ export type TaskNameBadges = (task: TaskInterface) => ReactNode;
7
+ export declare const useTaskTableStructure: UseTableStructureHook<TaskInterface, TaskFields>;
8
+ //# sourceMappingURL=useTaskTableStructure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTaskTableStructure.d.ts","sourceRoot":"","sources":["../../../../src/web/task/hooks/useTaskTableStructure.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,qBAAqB,EACtB,MAAM,oCAAoC,CAAC;AAuB5C,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAC;AAQrD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAoB,MAAM,uBAAuB,CAAC;AAOxE,gHAAgH;AAChH,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,aAAa,KAAK,SAAS,CAAC;AAoKhE,eAAO,MAAM,qBAAqB,EAAE,qBAAqB,CAAC,aAAa,EAAE,UAAU,CAkPlF,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const getTaskPrioritiesSelectOptions: (t: (key: string, values?: Record<string, unknown>) => string) => {
2
+ id: string;
3
+ text: string;
4
+ }[];
5
+ //# sourceMappingURL=task.priority.options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task.priority.options.d.ts","sourceRoot":"","sources":["../../../../src/web/task/lib/task.priority.options.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,8BAA8B,GACzC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,KAC3D;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAQ9B,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * A due date is a calendar day (`type: "date"`). The model reads the API's `YYYY-MM-DD` with
3
+ * `new Date(...)`, which JavaScript parses as UTC midnight: west of UTC that instant is the evening
4
+ * of the day before in local time. These two helpers are the only way the package reads the day.
5
+ */
6
+ /** The due date's calendar day as `YYYY-MM-DD`, read in UTC (where the model put it). */
7
+ export declare function dueDateDay(dueDate: Date): string;
8
+ /** The same calendar day at local midnight: what a local date formatter and a date picker are given.
9
+ * A day picked from it goes back to the API through `formatLocalDate`, unchanged. */
10
+ export declare function dueDateAsLocal(dueDate: Date): Date;
11
+ //# sourceMappingURL=dueDate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dueDate.d.ts","sourceRoot":"","sources":["../../../../src/web/task/utils/dueDate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,yFAAyF;AACzF,wBAAgB,UAAU,CAAC,OAAO,EAAE,IAAI,GAAG,MAAM,CAEhD;AAED;sFACsF;AACtF,wBAAgB,cAAc,CAAC,OAAO,EAAE,IAAI,GAAG,IAAI,CAElD"}
@@ -0,0 +1,4 @@
1
+ export type EisenhowerQuadrant = "do" | "defer" | "delegate" | "delete";
2
+ /** Pure: "today" is `now`, read once by the caller's render pass, never inside the helper. */
3
+ export declare function getEisenhowerQuadrant(priority: string | undefined, dueDate: Date | undefined, now: Date): EisenhowerQuadrant;
4
+ //# sourceMappingURL=getEisenhowerQuadrant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getEisenhowerQuadrant.d.ts","sourceRoot":"","sources":["../../../../src/web/task/utils/getEisenhowerQuadrant.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;AAyBxE,8FAA8F;AAC9F,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,EAAE,IAAI,GAAG,SAAS,EACzB,GAAG,EAAE,IAAI,GACR,kBAAkB,CAQpB"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The web copy of the API's "overdue" rule (`TASK_OVERDUE_RULE` in the task repository):
3
+ * not completed, a due date, and that date strictly before today. Both sides are compared as
4
+ * calendar dates (`YYYY-MM-DD`): the due date's own day (read in UTC, where the model put it) against
5
+ * today's local day, so a task due today is not overdue at any time of the day, in any time zone.
6
+ * `now` is undefined on the server render (useMountedNow): nothing is overdue until the clock is known.
7
+ */
8
+ export declare function isTaskOverdue(task: {
9
+ dueDate?: Date;
10
+ completed: boolean;
11
+ }, now: Date | undefined): boolean;
12
+ //# sourceMappingURL=isTaskOverdue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isTaskOverdue.d.ts","sourceRoot":"","sources":["../../../../src/web/task/utils/isTaskOverdue.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAAE,OAAO,CAAC,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAE,EAAE,GAAG,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO,CAG1G"}
@@ -0,0 +1,5 @@
1
+ import type { ModuleFactory } from "@carlonicora/nextjs-jsonapi/core";
2
+ export declare const TaskCommentModule: (factory: ModuleFactory, options?: {
3
+ feature?: string;
4
+ }) => import("@carlonicora/nextjs-jsonapi").ModuleWithPermissions;
5
+ //# sourceMappingURL=TaskCommentModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskCommentModule.d.ts","sourceRoot":"","sources":["../../../src/web/taskcomment/TaskCommentModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAKtE,eAAO,MAAM,iBAAiB,GAAI,SAAS,aAAa,EAAE,UAAS;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,gEAMxF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function TaskCommentEditor(): import("react").JSX.Element | null;
2
+ //# sourceMappingURL=TaskCommentEditor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskCommentEditor.d.ts","sourceRoot":"","sources":["../../../../../src/web/taskcomment/components/forms/TaskCommentEditor.tsx"],"names":[],"mappings":"AAkBA,wBAAgB,iBAAiB,uCAqGhC"}
@@ -0,0 +1,2 @@
1
+ export declare function TaskCommentList(): import("react").JSX.Element | null;
2
+ //# sourceMappingURL=TaskCommentList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskCommentList.d.ts","sourceRoot":"","sources":["../../../../../src/web/taskcomment/components/lists/TaskCommentList.tsx"],"names":[],"mappings":"AA8BA,wBAAgB,eAAe,uCA6J9B"}
@@ -0,0 +1,22 @@
1
+ import { ReactNode } from "react";
2
+ import { TaskInterface } from "../../task/data/TaskInterface";
3
+ import { TaskCommentInterface } from "../data/TaskCommentInterface";
4
+ interface TaskCommentContextType {
5
+ task?: TaskInterface;
6
+ comments: TaskCommentInterface[];
7
+ setComments: (comments: TaskCommentInterface[]) => void;
8
+ addComment: (comment: TaskCommentInterface) => void;
9
+ updateComment: (comment: TaskCommentInterface) => void;
10
+ removeComment: (id: string) => void;
11
+ }
12
+ type TaskCommentProviderProps = {
13
+ task?: TaskInterface;
14
+ /** Whether the editor showing the comments is open: each opening reads the comments again, so a comment
15
+ * added by someone else shows the next time the editor opens. Left out, the provider counts as open. */
16
+ open?: boolean;
17
+ children: ReactNode;
18
+ };
19
+ export declare function TaskCommentProvider({ task, open, children }: TaskCommentProviderProps): import("react").JSX.Element;
20
+ export declare function useTaskCommentContext(): TaskCommentContextType;
21
+ export {};
22
+ //# sourceMappingURL=TaskCommentContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskCommentContext.d.ts","sourceRoot":"","sources":["../../../../src/web/taskcomment/contexts/TaskCommentContext.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAiB,SAAS,EAAmC,MAAM,OAAO,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGpE,UAAU,sBAAsB;IAC9B,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,oBAAoB,EAAE,CAAC;IACjC,WAAW,EAAE,CAAC,QAAQ,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IACxD,UAAU,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACpD,aAAa,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACvD,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAID,KAAK,wBAAwB,GAAG;IAC9B,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;6GACyG;IACzG,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,IAAW,EAAE,QAAQ,EAAE,EAAE,wBAAwB,+BA+C5F;AAED,wBAAgB,qBAAqB,IAAI,sBAAsB,CAM9D"}
@@ -0,0 +1,11 @@
1
+ import { AbstractApiData, type JsonApiHydratedDataInterface, type UserInterface } from "@carlonicora/nextjs-jsonapi/core";
2
+ import type { TaskCommentInput, TaskCommentInterface } from "./TaskCommentInterface";
3
+ export declare class TaskComment extends AbstractApiData implements TaskCommentInterface {
4
+ private _content?;
5
+ private _owner?;
6
+ get content(): any;
7
+ get owner(): UserInterface | undefined;
8
+ rehydrate(data: JsonApiHydratedDataInterface): this;
9
+ createJsonApi(data: TaskCommentInput): any;
10
+ }
11
+ //# sourceMappingURL=TaskComment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskComment.d.ts","sourceRoot":"","sources":["../../../../src/web/taskcomment/data/TaskComment.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,KAAK,4BAA4B,EACjC,KAAK,aAAa,EACnB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAErF,qBAAa,WAAY,SAAQ,eAAgB,YAAW,oBAAoB;IAC9E,OAAO,CAAC,QAAQ,CAAC,CAAM;IACvB,OAAO,CAAC,MAAM,CAAC,CAAgB;IAE/B,IAAI,OAAO,IAAI,GAAG,CAEjB;IAED,IAAI,KAAK,IAAI,aAAa,GAAG,SAAS,CAErC;IAED,SAAS,CAAC,IAAI,EAAE,4BAA4B,GAAG,IAAI;IAWnD,aAAa,CAAC,IAAI,EAAE,gBAAgB;CAarC"}
@@ -0,0 +1,12 @@
1
+ import type { ApiDataInterface, UserInterface } from "@carlonicora/nextjs-jsonapi/core";
2
+ export type TaskCommentInput = {
3
+ id: string;
4
+ content?: any;
5
+ /** The task the comment belongs to: required on create and on update (PUT names its task). */
6
+ taskId?: string;
7
+ };
8
+ export interface TaskCommentInterface extends ApiDataInterface {
9
+ get content(): any;
10
+ get owner(): UserInterface | undefined;
11
+ }
12
+ //# sourceMappingURL=TaskCommentInterface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskCommentInterface.d.ts","sourceRoot":"","sources":["../../../../src/web/taskcomment/data/TaskCommentInterface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAExF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,8FAA8F;IAC9F,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,IAAI,OAAO,IAAI,GAAG,CAAC;IACnB,IAAI,KAAK,IAAI,aAAa,GAAG,SAAS,CAAC;CACxC"}
@@ -0,0 +1,16 @@
1
+ import { AbstractService, type NextRef, type PreviousRef } from "@carlonicora/nextjs-jsonapi/core";
2
+ import type { TaskCommentInput, TaskCommentInterface } from "./TaskCommentInterface";
3
+ export declare class TaskCommentService extends AbstractService {
4
+ static findMany(params: {
5
+ taskId: string;
6
+ fetchAll?: boolean;
7
+ next?: NextRef;
8
+ prev?: PreviousRef;
9
+ }): Promise<TaskCommentInterface[]>;
10
+ static create(params: TaskCommentInput): Promise<TaskCommentInterface>;
11
+ static update(params: TaskCommentInput): Promise<TaskCommentInterface>;
12
+ static delete(params: {
13
+ id: string;
14
+ }): Promise<void>;
15
+ }
16
+ //# sourceMappingURL=TaskCommentService.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskCommentService.d.ts","sourceRoot":"","sources":["../../../../src/web/taskcomment/data/TaskCommentService.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAGf,KAAK,OAAO,EACZ,KAAK,WAAW,EACjB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAErF,qBAAa,kBAAmB,SAAQ,eAAe;WACxC,QAAQ,CAAC,MAAM,EAAE;QAC5B,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,IAAI,CAAC,EAAE,WAAW,CAAC;KACpB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;WAmBtB,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC;WAU/D,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC;WAU/D,MAAM,CAAC,MAAM,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ3D"}
@@ -0,0 +1,10 @@
1
+ import { type ModuleWithPermissions } from "@carlonicora/nextjs-jsonapi/core";
2
+ /**
3
+ * The registry entries `Task` and `TaskComment`, typed without the app's `AppModuleDefinitions`
4
+ * augmentation. It is the same Proxy object as `Modules`.
5
+ */
6
+ export declare const TodosModules: {
7
+ readonly Task: ModuleWithPermissions;
8
+ readonly TaskComment: ModuleWithPermissions;
9
+ };
10
+ //# sourceMappingURL=todos.modules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"todos.modules.d.ts","sourceRoot":"","sources":["../../src/web/todos.modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEvF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAyB;IAChD,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,QAAQ,CAAC,WAAW,EAAE,qBAAqB,CAAC;CAC7C,CAAC"}
@@ -0,0 +1,11 @@
1
+ /** Opening a task (a row, a card, a deep link): a deleted task, one in another campaign or company and
2
+ * one the user may not see all answer one of these. */
3
+ export declare const NOT_FOUND_STATUSES: readonly number[];
4
+ /** READS only. True when the error thrown by `callApi` while opening a task means "not found" for this
5
+ * user (spec call 8: gone, or in another campaign or company). */
6
+ export declare function isNotFoundError(error: unknown): boolean;
7
+ /** SAVES only. True when a save failed because the task no longer exists (404): the editor closes and the
8
+ * list refreshes. Any other failure (400, 403, …) is an ordinary save error: the toast shows and the
9
+ * editor keeps the typed values. */
10
+ export declare function isTaskGoneError(error: unknown): boolean;
11
+ //# sourceMappingURL=isNotFoundError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isNotFoundError.d.ts","sourceRoot":"","sources":["../../../src/web/utils/isNotFoundError.ts"],"names":[],"mappings":"AAKA;wDACwD;AACxD,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAAoB,CAAC;AAErE;mEACmE;AACnE,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAGvD;AAED;;qCAEqC;AACrC,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEvD"}
@@ -0,0 +1,13 @@
1
+ {
2
+ "notification": {
3
+ "task_assigned": { "title": "New task assigned", "message": "{actor} assigned you the task “{task}”" },
4
+ "task_completed": { "title": "Task completed", "message": "{actor} completed the task “{task}”" },
5
+ "task_commented_on": { "title": "New comment on a task", "message": "{actor} commented on the task “{task}”" },
6
+ "unknown_actor": "Someone"
7
+ },
8
+ "email": {
9
+ "taskAssigned": { "subject": "{actor} assigned you the task “{task}”" },
10
+ "taskCompleted": { "subject": "{actor} completed the task “{task}”" },
11
+ "taskCommented": { "subject": "{actor} commented on the task “{task}”" }
12
+ }
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "notification": {
3
+ "task_assigned": { "title": "Nuovo Task Assegnato", "message": "{actor} ti ha assegnato il task «{task}»" },
4
+ "task_completed": { "title": "Task Completato", "message": "{actor} ha completato il task «{task}»" },
5
+ "task_commented_on": { "title": "Nuovo Commento sul Task", "message": "{actor} ha commentato il task «{task}»" },
6
+ "unknown_actor": "Qualcuno"
7
+ },
8
+ "email": {
9
+ "taskAssigned": { "subject": "{actor} ti ha assegnato il task «{task}»" },
10
+ "taskCompleted": { "subject": "{actor} ha completato il task «{task}»" },
11
+ "taskCommented": { "subject": "{actor} ha commentato il task «{task}»" }
12
+ }
13
+ }
@@ -0,0 +1,132 @@
1
+ {
2
+ "task": {
3
+ "my_tasks": "My tasks",
4
+ "my_created_tasks": "Tasks I created",
5
+ "priorities": "{priority, select, low {Low} medium {Medium} high {High} other {None}}",
6
+ "actions": {
7
+ "copy_link": "Copy link to task"
8
+ },
9
+ "messages": {
10
+ "saved_title": "Task saved",
11
+ "saved_description": "The task {name} has been saved",
12
+ "not_found": "Task not found",
13
+ "not_found_description": "It was deleted, or you cannot open it from here."
14
+ },
15
+ "edit": "Edit task",
16
+ "create": "Create task",
17
+ "read_only": "You can read this task but not change it.",
18
+ "views": {
19
+ "list": "Tasks",
20
+ "matrix": "Matrix"
21
+ },
22
+ "filter": {
23
+ "completed": "Completed",
24
+ "overdue": "Overdue",
25
+ "priority": "Priority",
26
+ "clear": "Clear filters"
27
+ },
28
+ "fields": {
29
+ "name": {
30
+ "error": "The task name is required",
31
+ "label": "Task name",
32
+ "placeholder": "Enter the task name"
33
+ },
34
+ "owner": {
35
+ "label": "Created by"
36
+ },
37
+ "priority": {
38
+ "label": "Priority",
39
+ "placeholder": "Select priority",
40
+ "none": "No priority"
41
+ },
42
+ "assignee": {
43
+ "label": "Assignee",
44
+ "placeholder": "Select assignee",
45
+ "clear": "Remove assignee"
46
+ },
47
+ "due_date": {
48
+ "label": "Due date",
49
+ "placeholder": "Select due date"
50
+ },
51
+ "description": {
52
+ "label": "Notes"
53
+ },
54
+ "relationships": {
55
+ "label": "Links"
56
+ },
57
+ "related": {
58
+ "required": "This link is required"
59
+ },
60
+ "created_at": {
61
+ "label": "Created"
62
+ },
63
+ "updated_at": {
64
+ "label": "Updated"
65
+ }
66
+ },
67
+ "buttons": {
68
+ "mark_complete": "Mark as completed",
69
+ "completed": "Completed"
70
+ },
71
+ "eisenhower": {
72
+ "do": "Do: urgent and important",
73
+ "defer": "Schedule: not urgent and important",
74
+ "delegate": "Delegate: urgent and not important",
75
+ "delete": "Drop: not urgent and not important"
76
+ },
77
+ "eisenhower_matrix": "Matrix",
78
+ "tabs": {
79
+ "comments": "Comments"
80
+ },
81
+ "delete": {
82
+ "title": "Delete task",
83
+ "subtitle": "Delete \"{name}\"?",
84
+ "description": "The task and its comments will be deleted. This cannot be undone."
85
+ },
86
+ "errors": {
87
+ "load": "The task could not be opened",
88
+ "save": "The task could not be saved",
89
+ "copy_link": "The link could not be copied"
90
+ }
91
+ },
92
+ "taskcomment": {
93
+ "buttons": {
94
+ "comment": "Comment",
95
+ "edit": "Edit comment",
96
+ "save": "Save",
97
+ "cancel": "Cancel"
98
+ },
99
+ "placeholder": "Write a comment…",
100
+ "delete": {
101
+ "title": "Delete comment",
102
+ "subtitle": "Delete this comment?",
103
+ "description": "The comment will be deleted. This cannot be undone."
104
+ },
105
+ "errors": {
106
+ "save": "The comment could not be saved"
107
+ }
108
+ },
109
+ "notification": {
110
+ "task_assigned": {
111
+ "title": "New Task Assigned",
112
+ "description": "<strong>{actor}</strong> assigned you the task <strong>{message}</strong>",
113
+ "buttons": {
114
+ "action": "Open task"
115
+ }
116
+ },
117
+ "task_completed": {
118
+ "title": "Task completed",
119
+ "description": "<strong>{actor}</strong> completed the task <strong>{message}</strong>",
120
+ "buttons": {
121
+ "action": "Go to task"
122
+ }
123
+ },
124
+ "task_commented_on": {
125
+ "title": "New Comment on Task",
126
+ "description": "<strong>{actor}</strong> commented on the task <strong>{message}</strong> you are following",
127
+ "buttons": {
128
+ "action": "Read comment"
129
+ }
130
+ }
131
+ }
132
+ }