@bigfootai/bigfoot-types 3.7.12 → 3.7.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/editor.js CHANGED
@@ -8,6 +8,7 @@ const prosemirror_model_1 = require("prosemirror-model");
8
8
  const prosemirror_schema_basic_1 = require("prosemirror-schema-basic");
9
9
  const prosemirror_schema_list_1 = require("prosemirror-schema-list");
10
10
  const orderedmap_1 = __importDefault(require("orderedmap"));
11
+ const uuid_1 = require("uuid");
11
12
  const tag = {
12
13
  attrs: {
13
14
  tagId: { default: null },
@@ -47,16 +48,38 @@ const tag = {
47
48
  const checklist = {
48
49
  content: 'checklistItem+',
49
50
  group: 'block',
50
- toDOM: () => ['ul', 0],
51
- parseDOM: [{ tag: 'ul.checklist' }],
51
+ attrs: { taskListId: { default: (0, uuid_1.v4)() } },
52
+ //@ts-expect-error Not sure why this is throwing an error, but will revisit
53
+ toDOM: (node) => [
54
+ 'ul',
55
+ {
56
+ 'data-task-parent-id': node?.attrs?.taskListId,
57
+ },
58
+ 0,
59
+ ],
60
+ parseDOM: [
61
+ {
62
+ tag: 'ul.checklist[data-task-parent-id]',
63
+ getAttrs(dom) {
64
+ return {
65
+ taskListId: dom.getAttribute('data-tag-id'),
66
+ };
67
+ },
68
+ },
69
+ ],
52
70
  };
53
71
  const checklistItem = {
54
72
  content: 'text*',
55
- attrs: { checked: { default: false } },
73
+ attrs: { checked: { default: false }, taskId: { default: (0, uuid_1.v4)() } },
56
74
  //@ts-expect-error Not sure why this is throwing an error, but will revisit
57
75
  toDOM: (node) => [
58
- 'li',
59
- { 'data-checked': node?.attrs?.checked ? 'true' : 'false' },
76
+ [
77
+ 'li',
78
+ {
79
+ 'data-checked': node?.attrs?.checked ? true : false,
80
+ 'data-task-id': node?.attrs?.taskId,
81
+ },
82
+ ],
60
83
  [
61
84
  'input',
62
85
  {
@@ -65,13 +88,17 @@ const checklistItem = {
65
88
  },
66
89
  ],
67
90
  ['span', {}],
91
+ 0,
68
92
  ],
69
93
  parseDOM: [
70
94
  {
71
- tag: 'li[data-checked]',
72
- getAttrs: (dom) => ({
73
- checked: dom.getAttribute('data-checked') === 'true',
74
- }),
95
+ tag: 'li[data-checked][data-task-id]',
96
+ getAttrs(dom) {
97
+ return {
98
+ checked: dom.getAttribute('data-checked') === 'true',
99
+ taskId: dom.getAttribute('data-task-id'),
100
+ };
101
+ },
75
102
  },
76
103
  ],
77
104
  };
package/editor.ts CHANGED
@@ -2,6 +2,7 @@ import { MarkSpec, NodeSpec, Schema } from 'prosemirror-model';
2
2
  import { schema } from 'prosemirror-schema-basic';
3
3
  import { addListNodes } from 'prosemirror-schema-list';
4
4
  import orderedMap from 'orderedmap';
5
+ import { v4 as uuidv4 } from 'uuid';
5
6
 
6
7
  const tag: MarkSpec = {
7
8
  attrs: {
@@ -52,17 +53,39 @@ const tag: MarkSpec = {
52
53
  const checklist: NodeSpec = {
53
54
  content: 'checklistItem+',
54
55
  group: 'block',
55
- toDOM: () => ['ul', 0],
56
- parseDOM: [{ tag: 'ul.checklist' }],
56
+ attrs: { taskListId: { default: uuidv4() } },
57
+ //@ts-expect-error Not sure why this is throwing an error, but will revisit
58
+ toDOM: (node: NodeSpec) => [
59
+ 'ul',
60
+ {
61
+ 'data-task-parent-id': node?.attrs?.taskListId,
62
+ },
63
+ 0,
64
+ ],
65
+ parseDOM: [
66
+ {
67
+ tag: 'ul.checklist[data-task-parent-id]',
68
+ getAttrs(dom: HTMLElement) {
69
+ return {
70
+ taskListId: dom.getAttribute('data-tag-id'),
71
+ };
72
+ },
73
+ },
74
+ ],
57
75
  };
58
76
 
59
77
  const checklistItem: NodeSpec = {
60
78
  content: 'text*',
61
- attrs: { checked: { default: false } },
79
+ attrs: { checked: { default: false }, taskId: { default: uuidv4() } },
62
80
  //@ts-expect-error Not sure why this is throwing an error, but will revisit
63
81
  toDOM: (node: NodeSpec) => [
64
- 'li',
65
- { 'data-checked': node?.attrs?.checked ? 'true' : 'false' },
82
+ [
83
+ 'li',
84
+ {
85
+ 'data-checked': node?.attrs?.checked ? true : false,
86
+ 'data-task-id': node?.attrs?.taskId,
87
+ },
88
+ ],
66
89
  [
67
90
  'input',
68
91
  {
@@ -71,13 +94,17 @@ const checklistItem: NodeSpec = {
71
94
  },
72
95
  ],
73
96
  ['span', {}],
97
+ 0,
74
98
  ],
75
99
  parseDOM: [
76
100
  {
77
- tag: 'li[data-checked]',
78
- getAttrs: (dom: HTMLElement) => ({
79
- checked: dom.getAttribute('data-checked') === 'true',
80
- }),
101
+ tag: 'li[data-checked][data-task-id]',
102
+ getAttrs(dom: HTMLElement) {
103
+ return {
104
+ checked: dom.getAttribute('data-checked') === 'true',
105
+ taskId: dom.getAttribute('data-task-id'),
106
+ };
107
+ },
81
108
  },
82
109
  ],
83
110
  };
package/model.js CHANGED
@@ -502,6 +502,7 @@ exports.ArticleQL = `
502
502
  type Article {${exports.PrimitiveFields}
503
503
  referenceBlock: ReferenceBlock!
504
504
  sentiment: DocumentSentiment
505
+ dateDue: Float
505
506
  dates: [EntityEntry]
506
507
  locations: [EntityEntry]
507
508
  linkUrls: [String]
@@ -511,6 +512,9 @@ type Article {${exports.PrimitiveFields}
511
512
  relations: [RelationEntry]
512
513
  archived: Boolean!
513
514
  favorite: Boolean!
515
+ status: Int
516
+ groupId: String
517
+ parentId: String
514
518
  }`;
515
519
  class Article extends Primitive {
516
520
  constructor(referenceBlock) {
@@ -527,6 +531,8 @@ exports.BlockFields = `${exports.SharedPrimitiveFields}
527
531
  blockType: String!
528
532
  archived: Boolean!
529
533
  favorite: Boolean!
534
+ parentId: String
535
+ groupId: String
530
536
  document: String
531
537
  reactions: [Reaction]`;
532
538
  class Block extends SharedPrimitive {
@@ -600,8 +606,6 @@ exports.TaskFields = `${exports.BlockFields}
600
606
  steps: [TaskStep]
601
607
  dateRemindMe: Int
602
608
  recurrence: [String]
603
- parentId: String
604
- groupId: String
605
609
  `;
606
610
  exports.TaskQL = `
607
611
  type Task {${exports.TaskFields}
package/model.ts CHANGED
@@ -752,6 +752,7 @@ export const ArticleQL = `
752
752
  type Article {${PrimitiveFields}
753
753
  referenceBlock: ReferenceBlock!
754
754
  sentiment: DocumentSentiment
755
+ dateDue: Float
755
756
  dates: [EntityEntry]
756
757
  locations: [EntityEntry]
757
758
  linkUrls: [String]
@@ -761,11 +762,15 @@ type Article {${PrimitiveFields}
761
762
  relations: [RelationEntry]
762
763
  archived: Boolean!
763
764
  favorite: Boolean!
765
+ status: Int
766
+ groupId: String
767
+ parentId: String
764
768
  }`;
765
769
  export class Article extends Primitive {
766
770
  referenceBlock: ReferenceBlock;
767
771
  embedding?: number[];
768
772
  sentiment?: DocumentSentiment;
773
+ dateDue?: number;
769
774
  dates?: EntityEntry[];
770
775
  locations?: EntityEntry[];
771
776
  linkUrls?: string[];
@@ -775,6 +780,9 @@ export class Article extends Primitive {
775
780
  relations?: RelationEntry[];
776
781
  archived: boolean;
777
782
  favorite: boolean;
783
+ status: TaskStatus;
784
+ groupId?: string;
785
+ parentId?: string;
778
786
  _changes?: Changes;
779
787
  _tasks?: Task[];
780
788
  _entitiesPerson?: EntityEntry[];
@@ -798,6 +806,8 @@ export const BlockFields = `${SharedPrimitiveFields}
798
806
  blockType: String!
799
807
  archived: Boolean!
800
808
  favorite: Boolean!
809
+ parentId: String
810
+ groupId: String
801
811
  document: String
802
812
  reactions: [Reaction]`;
803
813
  export class Block extends SharedPrimitive {
@@ -806,6 +816,8 @@ export class Block extends SharedPrimitive {
806
816
  blockType: BlockType;
807
817
  archived: boolean;
808
818
  favorite: boolean;
819
+ parentId?: string;
820
+ groupId?: string;
809
821
  document?: any;
810
822
  reactions?: Reaction[];
811
823
  _changes?: Changes;
@@ -873,7 +885,6 @@ export class BusinessObject extends Block {
873
885
  processingReason?: string; // The reason the processing is at this stage
874
886
  externalResponse?: any; // The full response from the external system that created this object
875
887
  iconUrl?: string | null; // The url of an icon that represents the business object
876
- parentId?: string | null; // The business object that is the parent of this business object
877
888
 
878
889
  constructor(
879
890
  tenantIdCreated: string,
@@ -924,8 +935,6 @@ export const TaskFields = `${BlockFields}
924
935
  steps: [TaskStep]
925
936
  dateRemindMe: Int
926
937
  recurrence: [String]
927
- parentId: String
928
- groupId: String
929
938
  `;
930
939
  export const TaskQL = `
931
940
  type Task {${TaskFields}
@@ -938,8 +947,7 @@ export class Task extends Block {
938
947
  steps?: TaskStep[];
939
948
  dateRemindMe?: number;
940
949
  recurrence?: RecurrenceRFC[];
941
- parentId?: string;
942
- groupId?: string;
950
+ _dateDueUserAssigned: Boolean;
943
951
 
944
952
  constructor(
945
953
  tenantIdCreated: string,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "author": "Bigfoot",
3
3
  "name": "@bigfootai/bigfoot-types",
4
- "version": "3.7.12",
4
+ "version": "3.7.14",
5
5
  "description": "The internal library for the types used in the Bigfoot platform",
6
6
  "main": "model.js",
7
7
  "license": "ISC",