@shaxpir/duiduidui-models 1.5.12 → 1.5.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.
@@ -32,10 +32,10 @@ export interface AnnotatedPhrase extends Phrase {
32
32
  phrase_id?: number;
33
33
  content_id?: ContentId;
34
34
  starred_at: CompactDateTime | null;
35
- alpha: number;
36
- beta: number;
37
- theta: number;
38
- uncertainty: number;
35
+ alpha: number | null;
36
+ beta: number | null;
37
+ theta: number | null;
38
+ uncertainty: number | null;
39
39
  reviews: ReviewLike[];
40
40
  user_tags: string[];
41
41
  }
@@ -166,18 +166,32 @@ class Term extends Content_1.Content {
166
166
  }
167
167
  addUserTag(value) {
168
168
  this.checkDisposed("Term.addUserTag");
169
+ console.log('[Term.addUserTag] Adding tag:', value);
170
+ console.log('[Term.addUserTag] Current tags:', this._userTagsView.values);
169
171
  const index = this._userTagsView.indexOf(value);
170
172
  if (index === -1) {
171
173
  this._userTagsView.push(value);
172
174
  this._updateTagCount();
175
+ console.log('[Term.addUserTag] Tag added, new tags:', this._userTagsView.values);
176
+ console.log('[Term.addUserTag] Document data after add:', JSON.stringify(this.doc.data.payload.user_tags));
177
+ }
178
+ else {
179
+ console.log('[Term.addUserTag] Tag already exists, skipping');
173
180
  }
174
181
  }
175
182
  removeUserTag(value) {
176
183
  this.checkDisposed("Term.removeUserTag");
184
+ console.log('[Term.removeUserTag] Removing tag:', value);
185
+ console.log('[Term.removeUserTag] Current tags:', this._userTagsView.values);
177
186
  const index = this._userTagsView.indexOf(value);
178
187
  if (index !== -1) {
179
188
  this._userTagsView.removeAt(index);
180
189
  this._updateTagCount();
190
+ console.log('[Term.removeUserTag] Tag removed, new tags:', this._userTagsView.values);
191
+ console.log('[Term.removeUserTag] Document data after remove:', JSON.stringify(this.doc.data.payload.user_tags));
192
+ }
193
+ else {
194
+ console.log('[Term.removeUserTag] Tag not found, skipping');
181
195
  }
182
196
  }
183
197
  get lastReviewUtc() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shaxpir/duiduidui-models",
3
- "version": "1.5.12",
3
+ "version": "1.5.14",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/shaxpir/duiduidui-models"