@drincs/nqtr 0.1.15 → 0.1.16

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 (212) hide show
  1. package/dist/ActivityProps-B1IaFbGD.d.ts +124 -0
  2. package/dist/ActivityProps-BmIzqtXr.d.mts +124 -0
  3. package/dist/{index-Cu8ZAiqF.d.ts → Commitment-BjkhJtTx.d.ts} +227 -220
  4. package/dist/{index-DhsRZJ3g.d.mts → Commitment-BxUQoZST.d.mts} +227 -220
  5. package/dist/{index-gJ26gdgL.d.mts → Quest-Bdm0R9LA.d.mts} +7 -12
  6. package/dist/{index-BjOzVDyw.d.ts → Quest-CxJcXETG.d.ts} +7 -12
  7. package/dist/classes/Activity.d.mts +41 -127
  8. package/dist/classes/Activity.d.ts +41 -127
  9. package/dist/classes/Activity.js +2 -151
  10. package/dist/classes/Activity.js.map +1 -1
  11. package/dist/classes/Activity.mjs +2 -148
  12. package/dist/classes/Activity.mjs.map +1 -1
  13. package/dist/classes/ActivityStoredAbstract.d.mts +3 -0
  14. package/dist/classes/ActivityStoredAbstract.d.ts +3 -0
  15. package/dist/classes/ActivityStoredAbstract.js +399 -0
  16. package/dist/classes/ActivityStoredAbstract.js.map +1 -0
  17. package/dist/classes/ActivityStoredAbstract.mjs +397 -0
  18. package/dist/classes/ActivityStoredAbstract.mjs.map +1 -0
  19. package/dist/classes/Commitment.d.mts +4 -1
  20. package/dist/classes/Commitment.d.ts +4 -1
  21. package/dist/classes/Commitment.js +5 -4
  22. package/dist/classes/Commitment.js.map +1 -1
  23. package/dist/classes/Commitment.mjs +5 -4
  24. package/dist/classes/Commitment.mjs.map +1 -1
  25. package/dist/classes/index.d.mts +9 -2
  26. package/dist/classes/index.d.ts +9 -2
  27. package/dist/classes/index.js +868 -5
  28. package/dist/classes/index.js.map +1 -1
  29. package/dist/classes/index.mjs +863 -6
  30. package/dist/classes/index.mjs.map +1 -1
  31. package/dist/classes/navigation/ActivityRoom.d.mts +5 -2
  32. package/dist/classes/navigation/ActivityRoom.d.ts +5 -2
  33. package/dist/classes/navigation/ActivityRoom.js +3 -3
  34. package/dist/classes/navigation/ActivityRoom.js.map +1 -1
  35. package/dist/classes/navigation/ActivityRoom.mjs +3 -3
  36. package/dist/classes/navigation/ActivityRoom.mjs.map +1 -1
  37. package/dist/classes/navigation/Location.d.mts +5 -2
  38. package/dist/classes/navigation/Location.d.ts +5 -2
  39. package/dist/classes/navigation/Location.js.map +1 -1
  40. package/dist/classes/navigation/Location.mjs.map +1 -1
  41. package/dist/classes/navigation/Map.d.mts +5 -2
  42. package/dist/classes/navigation/Map.d.ts +5 -2
  43. package/dist/classes/navigation/Map.js.map +1 -1
  44. package/dist/classes/navigation/Map.mjs.map +1 -1
  45. package/dist/classes/navigation/Room.d.mts +4 -1
  46. package/dist/classes/navigation/Room.d.ts +4 -1
  47. package/dist/classes/navigation/Room.js +3 -3
  48. package/dist/classes/navigation/Room.js.map +1 -1
  49. package/dist/classes/navigation/Room.mjs +3 -3
  50. package/dist/classes/navigation/Room.mjs.map +1 -1
  51. package/dist/classes/quest/Goal.d.mts +3 -6
  52. package/dist/classes/quest/Goal.d.ts +3 -6
  53. package/dist/classes/quest/Goal.js.map +1 -1
  54. package/dist/classes/quest/Goal.mjs.map +1 -1
  55. package/dist/classes/quest/Quest.d.mts +3 -1
  56. package/dist/classes/quest/Quest.d.ts +3 -1
  57. package/dist/classes/quest/Quest.js.map +1 -1
  58. package/dist/classes/quest/Quest.mjs.map +1 -1
  59. package/dist/classes/quest/Stage.d.mts +3 -1
  60. package/dist/classes/quest/Stage.d.ts +3 -1
  61. package/dist/classes/quest/Stage.js.map +1 -1
  62. package/dist/classes/quest/Stage.mjs.map +1 -1
  63. package/dist/decorators/ActivityDecorator.d.mts +16 -0
  64. package/dist/decorators/ActivityDecorator.d.ts +16 -0
  65. package/dist/decorators/ActivityDecorator.js.map +1 -1
  66. package/dist/decorators/ActivityDecorator.mjs.map +1 -1
  67. package/dist/decorators/CommitmentDecorator.d.mts +5 -2
  68. package/dist/decorators/CommitmentDecorator.d.ts +5 -2
  69. package/dist/decorators/CommitmentDecorator.js +3 -3
  70. package/dist/decorators/CommitmentDecorator.js.map +1 -1
  71. package/dist/decorators/CommitmentDecorator.mjs +3 -3
  72. package/dist/decorators/CommitmentDecorator.mjs.map +1 -1
  73. package/dist/decorators/RoomDecorator.d.mts +9 -2
  74. package/dist/decorators/RoomDecorator.d.ts +9 -2
  75. package/dist/decorators/RoomDecorator.js.map +1 -1
  76. package/dist/decorators/RoomDecorator.mjs.map +1 -1
  77. package/dist/decorators/index.d.mts +4 -1
  78. package/dist/decorators/index.d.ts +4 -1
  79. package/dist/decorators/index.js +3 -3
  80. package/dist/decorators/index.js.map +1 -1
  81. package/dist/decorators/index.mjs +3 -3
  82. package/dist/decorators/index.mjs.map +1 -1
  83. package/dist/functions/ActivityFunctions.d.mts +5 -2
  84. package/dist/functions/ActivityFunctions.d.ts +5 -2
  85. package/dist/functions/ActivityFunctions.js.map +1 -1
  86. package/dist/functions/ActivityFunctions.mjs.map +1 -1
  87. package/dist/functions/NavigationFunctions.d.mts +5 -2
  88. package/dist/functions/NavigationFunctions.d.ts +5 -2
  89. package/dist/functions/NavigationFunctions.js.map +1 -1
  90. package/dist/functions/NavigationFunctions.mjs.map +1 -1
  91. package/dist/functions/RoutineFunctions.d.mts +5 -2
  92. package/dist/functions/RoutineFunctions.d.ts +5 -2
  93. package/dist/functions/RoutineFunctions.js.map +1 -1
  94. package/dist/functions/RoutineFunctions.mjs.map +1 -1
  95. package/dist/functions/index.d.mts +5 -2
  96. package/dist/functions/index.d.ts +5 -2
  97. package/dist/functions/index.js.map +1 -1
  98. package/dist/functions/index.mjs.map +1 -1
  99. package/dist/index.d.mts +9 -4
  100. package/dist/index.d.ts +9 -4
  101. package/dist/index.js +155 -154
  102. package/dist/index.js.map +1 -1
  103. package/dist/index.mjs +155 -154
  104. package/dist/index.mjs.map +1 -1
  105. package/dist/interface/ActivityProps.d.mts +3 -0
  106. package/dist/interface/ActivityProps.d.ts +3 -0
  107. package/dist/{override/OnRunActivityProps.js → interface/ActivityProps.js} +1 -1
  108. package/dist/interface/ActivityProps.mjs +3 -0
  109. package/dist/interface/CommitmentProps.d.mts +8 -0
  110. package/dist/interface/CommitmentProps.d.ts +8 -0
  111. package/dist/interface/CommitmentProps.js +4 -0
  112. package/dist/interface/CommitmentProps.js.map +1 -0
  113. package/dist/interface/CommitmentProps.mjs +3 -0
  114. package/dist/interface/CommitmentProps.mjs.map +1 -0
  115. package/dist/interface/RoomActivityMemory.d.mts +9 -0
  116. package/dist/interface/RoomActivityMemory.d.ts +9 -0
  117. package/dist/interface/RoomActivityMemory.js +4 -0
  118. package/dist/interface/RoomActivityMemory.js.map +1 -0
  119. package/dist/interface/RoomActivityMemory.mjs +3 -0
  120. package/dist/interface/RoomActivityMemory.mjs.map +1 -0
  121. package/dist/interface/RoomProps.d.mts +8 -0
  122. package/dist/interface/RoomProps.d.ts +8 -0
  123. package/dist/interface/RoomProps.js +4 -0
  124. package/dist/interface/RoomProps.js.map +1 -0
  125. package/dist/interface/RoomProps.mjs +3 -0
  126. package/dist/interface/RoomProps.mjs.map +1 -0
  127. package/dist/interface/index.d.mts +12 -0
  128. package/dist/interface/index.d.ts +12 -0
  129. package/dist/interface/index.js +4 -0
  130. package/dist/interface/index.js.map +1 -0
  131. package/dist/interface/index.mjs +3 -0
  132. package/dist/interface/index.mjs.map +1 -0
  133. package/dist/interface/navigation/LocationProps.d.mts +8 -0
  134. package/dist/interface/navigation/LocationProps.d.ts +8 -0
  135. package/dist/interface/navigation/LocationProps.js +4 -0
  136. package/dist/interface/navigation/LocationProps.js.map +1 -0
  137. package/dist/interface/navigation/LocationProps.mjs +3 -0
  138. package/dist/interface/navigation/LocationProps.mjs.map +1 -0
  139. package/dist/interface/navigation/MapProps.d.mts +8 -0
  140. package/dist/interface/navigation/MapProps.d.ts +8 -0
  141. package/dist/interface/navigation/MapProps.js +4 -0
  142. package/dist/interface/navigation/MapProps.js.map +1 -0
  143. package/dist/interface/navigation/MapProps.mjs +3 -0
  144. package/dist/interface/navigation/MapProps.mjs.map +1 -0
  145. package/dist/interface/quest/GoalProps.d.mts +7 -0
  146. package/dist/interface/quest/GoalProps.d.ts +7 -0
  147. package/dist/interface/quest/GoalProps.js +4 -0
  148. package/dist/interface/quest/GoalProps.js.map +1 -0
  149. package/dist/interface/quest/GoalProps.mjs +3 -0
  150. package/dist/interface/quest/GoalProps.mjs.map +1 -0
  151. package/dist/interface/quest/QuestProps.d.mts +9 -0
  152. package/dist/interface/quest/QuestProps.d.ts +9 -0
  153. package/dist/interface/quest/QuestProps.js +4 -0
  154. package/dist/interface/quest/QuestProps.js.map +1 -0
  155. package/dist/interface/quest/QuestProps.mjs +3 -0
  156. package/dist/interface/quest/QuestProps.mjs.map +1 -0
  157. package/dist/interface/quest/StageProps.d.mts +5 -0
  158. package/dist/interface/quest/StageProps.d.ts +5 -0
  159. package/dist/interface/quest/StageProps.js +4 -0
  160. package/dist/interface/quest/StageProps.js.map +1 -0
  161. package/dist/interface/quest/StageProps.mjs +3 -0
  162. package/dist/interface/quest/StageProps.mjs.map +1 -0
  163. package/dist/managers/TimeManager.d.mts +1 -1
  164. package/dist/managers/TimeManager.d.ts +1 -1
  165. package/dist/managers/TimeManager.js +1 -1
  166. package/dist/managers/TimeManager.js.map +1 -1
  167. package/dist/managers/TimeManager.mjs +1 -1
  168. package/dist/managers/TimeManager.mjs.map +1 -1
  169. package/dist/managers/index.js +1 -1
  170. package/dist/managers/index.js.map +1 -1
  171. package/dist/managers/index.mjs +1 -1
  172. package/dist/managers/index.mjs.map +1 -1
  173. package/dist/override/{OnRunActivityProps.d.mts → OnRunProps.d.mts} +3 -3
  174. package/dist/override/{OnRunActivityProps.d.ts → OnRunProps.d.ts} +3 -3
  175. package/dist/override/OnRunProps.js +4 -0
  176. package/dist/override/OnRunProps.js.map +1 -0
  177. package/dist/override/OnRunProps.mjs +3 -0
  178. package/dist/override/OnRunProps.mjs.map +1 -0
  179. package/dist/override/index.d.mts +1 -1
  180. package/dist/override/index.d.ts +1 -1
  181. package/dist/types/OnRunActivityEvent.d.mts +8 -0
  182. package/dist/types/OnRunActivityEvent.d.ts +8 -0
  183. package/dist/types/OnRunActivityEvent.js +4 -0
  184. package/dist/types/OnRunActivityEvent.js.map +1 -0
  185. package/dist/types/OnRunActivityEvent.mjs +3 -0
  186. package/dist/types/OnRunActivityEvent.mjs.map +1 -0
  187. package/dist/types/OnRunCommitmentEvent.d.mts +8 -0
  188. package/dist/types/OnRunCommitmentEvent.d.ts +8 -0
  189. package/dist/types/OnRunCommitmentEvent.js +4 -0
  190. package/dist/types/OnRunCommitmentEvent.js.map +1 -0
  191. package/dist/types/OnRunCommitmentEvent.mjs +3 -0
  192. package/dist/types/OnRunCommitmentEvent.mjs.map +1 -0
  193. package/dist/types/QuestsRequired.d.mts +4 -2
  194. package/dist/types/QuestsRequired.d.ts +4 -2
  195. package/dist/types/index.d.mts +4 -2
  196. package/dist/types/index.d.ts +4 -2
  197. package/package.json +1 -1
  198. package/dist/classes/navigation/index.d.mts +0 -5
  199. package/dist/classes/navigation/index.d.ts +0 -5
  200. package/dist/classes/navigation/index.js +0 -987
  201. package/dist/classes/navigation/index.js.map +0 -1
  202. package/dist/classes/navigation/index.mjs +0 -983
  203. package/dist/classes/navigation/index.mjs.map +0 -1
  204. package/dist/classes/quest/index.d.mts +0 -3
  205. package/dist/classes/quest/index.d.ts +0 -3
  206. package/dist/classes/quest/index.js +0 -133
  207. package/dist/classes/quest/index.js.map +0 -1
  208. package/dist/classes/quest/index.mjs +0 -129
  209. package/dist/classes/quest/index.mjs.map +0 -1
  210. package/dist/override/OnRunActivityProps.mjs +0 -3
  211. /package/dist/{override/OnRunActivityProps.js.map → interface/ActivityProps.js.map} +0 -0
  212. /package/dist/{override/OnRunActivityProps.mjs.map → interface/ActivityProps.mjs.map} +0 -0
package/dist/index.mjs CHANGED
@@ -193,7 +193,7 @@ var TimeManager = class _TimeManager {
193
193
  * Get the current TimeManager.timeSlots index.
194
194
  * You can use this property to create "Image that changes based on the time period":
195
195
  * @example
196
- * ```ts
196
+ * ```tsx
197
197
  * import { TimeManager } from '@drincs/nqtr';
198
198
  *
199
199
  * function changeBackground() {
@@ -260,152 +260,6 @@ var TimeManager = class _TimeManager {
260
260
  };
261
261
 
262
262
  // src/classes/Activity.ts
263
- var ActivityStoredAbstract = class {
264
- /**
265
- * @param onRun The function that is called when the activity is runned. Have 2 parameters: the runned activity and the yourParams object, that is an object with the parameters that you want to pass to the onRun function.
266
- * @param props The activity properties.
267
- */
268
- constructor(onRun, props) {
269
- this.defaultName = props.name;
270
- this.defaultFromHour = props.fromHour;
271
- this.defaultToHour = props.toHour;
272
- this.defaultFromDay = props.fromDay;
273
- this.defaultToDay = props.toDay;
274
- this.defaultDisabled = props.disabled || false;
275
- this.defaultHidden = props.hidden || false;
276
- this._renderIcon = props.renderIcon;
277
- this._onRun = onRun;
278
- }
279
- /**
280
- * The name
281
- */
282
- get name() {
283
- return this.getStorageProperty("name") || this.defaultName || "";
284
- }
285
- set name(value) {
286
- this.setStorageProperty("name", value);
287
- }
288
- /**
289
- * The hour when the activity starts. If the activity is not started yet, it will be hidden.
290
- */
291
- get fromHour() {
292
- return this.getStorageProperty("fromHour") || this.defaultFromHour || TimeManager.minDayHours;
293
- }
294
- set fromHour(value) {
295
- this.setStorageProperty("fromHour", value);
296
- }
297
- /**
298
- * The hour when the activity ends. If the activity is ended yet, it will be hidden.
299
- */
300
- get toHour() {
301
- return this.getStorageProperty("toHour") || this.defaultToHour || TimeManager.maxDayHours + 1;
302
- }
303
- set toHour(value) {
304
- this.setStorageProperty("toHour", value);
305
- }
306
- /**
307
- * The day when the activity starts. If the activity is not started yet, it will be hidden.
308
- */
309
- get fromDay() {
310
- return this.getStorageProperty("fromDay") || this.defaultFromDay;
311
- }
312
- set fromDay(value) {
313
- this.setStorageProperty("fromDay", value);
314
- }
315
- /**
316
- * The day when the activity ends. If the activity is ended yet, it will be deleted or hidden.
317
- */
318
- get toDay() {
319
- return this.getStorageProperty("toDay") || this.defaultToDay;
320
- }
321
- set toDay(value) {
322
- this.setStorageProperty("toDay", value);
323
- }
324
- /**
325
- * Whether is disabled.
326
- */
327
- get disabled() {
328
- let value = this.getStorageProperty("disabled") || this.defaultDisabled;
329
- if (typeof value === "string") {
330
- return getFlag(value);
331
- }
332
- return value;
333
- }
334
- set disabled(value) {
335
- this.setStorageProperty("disabled", value);
336
- }
337
- /**
338
- * Whether is hidden. If the activity is not started yet, it will be hidden.
339
- */
340
- get hidden() {
341
- if (this.fromDay && this.fromDay > TimeManager.currentDay) {
342
- return true;
343
- }
344
- if (!TimeManager.nowIsBetween(this.fromHour, this.toHour)) {
345
- return true;
346
- }
347
- if (!this.isExpired) {
348
- return true;
349
- }
350
- let value = this.getStorageProperty("hidden") || this.defaultHidden;
351
- if (typeof value === "string") {
352
- return getFlag(value);
353
- }
354
- return value;
355
- }
356
- set hidden(value) {
357
- this.setStorageProperty("hidden", value);
358
- }
359
- /**
360
- * The function for rendering the icon of the activity.
361
- */
362
- get renderIcon() {
363
- let render = this._renderIcon;
364
- if (render === void 0) {
365
- return void 0;
366
- }
367
- if (typeof render === "function") {
368
- return (props) => {
369
- return render(this, props);
370
- };
371
- }
372
- return (props) => render;
373
- }
374
- /**
375
- * The function that is called when the activity is runned.
376
- */
377
- get onRun() {
378
- return (props) => {
379
- return this._onRun(this, props);
380
- };
381
- }
382
- /**
383
- * Whether the activity is a deadline.
384
- * @returns Whether the activity is a deadline.
385
- */
386
- isExpired() {
387
- if (this.toDay && this.toDay <= TimeManager.currentDay) {
388
- return true;
389
- }
390
- return false;
391
- }
392
- /**
393
- * Export the activity properties.
394
- * @returns The activity properties.
395
- */
396
- export() {
397
- return {
398
- name: this.getStorageProperty("name") || this.defaultName,
399
- fromHour: this.getStorageProperty("fromHour") || this.defaultFromHour,
400
- toHour: this.getStorageProperty("toHour") || this.defaultToHour,
401
- fromDay: this.getStorageProperty("fromDay") || this.defaultFromDay,
402
- toDay: this.getStorageProperty("toDay") || this.defaultToDay,
403
- disabled: this.getStorageProperty("disabled") || this.defaultDisabled,
404
- hidden: this.getStorageProperty("hidden") || this.defaultHidden,
405
- renderIcon: this._renderIcon
406
- };
407
- }
408
- };
409
263
  var ActivityModel = class {
410
264
  /**
411
265
  * @param id The activity id, that must be unique.
@@ -650,11 +504,12 @@ var CommitmentBaseModel = class extends StoredClassModel {
650
504
  * Is a function that is called when the player interacts with the character.
651
505
  */
652
506
  onRun() {
653
- if (!this._onRun) {
507
+ let onRun = this._onRun;
508
+ if (!onRun) {
654
509
  console.warn("[NQTR] onRun() is not defined for commitmen, so it will not run.", this);
655
- } else {
656
- this._onRun(this);
510
+ return;
657
511
  }
512
+ return (props) => onRun(this, props);
658
513
  }
659
514
  /**
660
515
  * Whether is disabled. You can also pass a Pixi'VN flag name.
@@ -996,13 +851,13 @@ function getCommitmentById(id) {
996
851
  }
997
852
  function setFixedCommitments(commitments) {
998
853
  if (Array.isArray(commitments)) {
999
- commitments.forEach((c) => saveCommitment(c));
854
+ commitments.forEach((c) => setFixedCommitments(c));
1000
855
  return;
1001
856
  }
1002
- if (registeredCommitments[commitments.id]) {
857
+ if (fixedCommitments[commitments.id]) {
1003
858
  console.warn(`[NQTR] Commitment id ${commitments.id} already exists, it will be overwritten`);
1004
859
  }
1005
- registeredCommitments[commitments.id] = commitments;
860
+ fixedCommitments[commitments.id] = commitments;
1006
861
  }
1007
862
  function addTemporaryCommitment(commitment) {
1008
863
  if (!Array.isArray(commitment)) {
@@ -1078,6 +933,152 @@ function getCommitmentByCharacter(character) {
1078
933
  });
1079
934
  return void 0;
1080
935
  }
936
+ var ActivityStoredAbstract = class {
937
+ /**
938
+ * @param onRun The function that is called when the activity is runned. Have 2 parameters: the runned activity and the yourParams object, that is an object with the parameters that you want to pass to the onRun function.
939
+ * @param props The activity properties.
940
+ */
941
+ constructor(onRun, props) {
942
+ this.defaultName = props.name;
943
+ this.defaultFromHour = props.fromHour;
944
+ this.defaultToHour = props.toHour;
945
+ this.defaultFromDay = props.fromDay;
946
+ this.defaultToDay = props.toDay;
947
+ this.defaultDisabled = props.disabled || false;
948
+ this.defaultHidden = props.hidden || false;
949
+ this._renderIcon = props.renderIcon;
950
+ this._onRun = onRun;
951
+ }
952
+ /**
953
+ * The name
954
+ */
955
+ get name() {
956
+ return this.getStorageProperty("name") || this.defaultName || "";
957
+ }
958
+ set name(value) {
959
+ this.setStorageProperty("name", value);
960
+ }
961
+ /**
962
+ * The hour when the activity starts. If the activity is not started yet, it will be hidden.
963
+ */
964
+ get fromHour() {
965
+ return this.getStorageProperty("fromHour") || this.defaultFromHour || TimeManager.minDayHours;
966
+ }
967
+ set fromHour(value) {
968
+ this.setStorageProperty("fromHour", value);
969
+ }
970
+ /**
971
+ * The hour when the activity ends. If the activity is ended yet, it will be hidden.
972
+ */
973
+ get toHour() {
974
+ return this.getStorageProperty("toHour") || this.defaultToHour || TimeManager.maxDayHours + 1;
975
+ }
976
+ set toHour(value) {
977
+ this.setStorageProperty("toHour", value);
978
+ }
979
+ /**
980
+ * The day when the activity starts. If the activity is not started yet, it will be hidden.
981
+ */
982
+ get fromDay() {
983
+ return this.getStorageProperty("fromDay") || this.defaultFromDay;
984
+ }
985
+ set fromDay(value) {
986
+ this.setStorageProperty("fromDay", value);
987
+ }
988
+ /**
989
+ * The day when the activity ends. If the activity is ended yet, it will be deleted or hidden.
990
+ */
991
+ get toDay() {
992
+ return this.getStorageProperty("toDay") || this.defaultToDay;
993
+ }
994
+ set toDay(value) {
995
+ this.setStorageProperty("toDay", value);
996
+ }
997
+ /**
998
+ * Whether is disabled.
999
+ */
1000
+ get disabled() {
1001
+ let value = this.getStorageProperty("disabled") || this.defaultDisabled;
1002
+ if (typeof value === "string") {
1003
+ return getFlag(value);
1004
+ }
1005
+ return value;
1006
+ }
1007
+ set disabled(value) {
1008
+ this.setStorageProperty("disabled", value);
1009
+ }
1010
+ /**
1011
+ * Whether is hidden. If the activity is not started yet, it will be hidden.
1012
+ */
1013
+ get hidden() {
1014
+ if (this.fromDay && this.fromDay > TimeManager.currentDay) {
1015
+ return true;
1016
+ }
1017
+ if (!TimeManager.nowIsBetween(this.fromHour, this.toHour)) {
1018
+ return true;
1019
+ }
1020
+ if (!this.isExpired) {
1021
+ return true;
1022
+ }
1023
+ let value = this.getStorageProperty("hidden") || this.defaultHidden;
1024
+ if (typeof value === "string") {
1025
+ return getFlag(value);
1026
+ }
1027
+ return value;
1028
+ }
1029
+ set hidden(value) {
1030
+ this.setStorageProperty("hidden", value);
1031
+ }
1032
+ /**
1033
+ * The function for rendering the icon of the activity.
1034
+ */
1035
+ get renderIcon() {
1036
+ let render = this._renderIcon;
1037
+ if (render === void 0) {
1038
+ return void 0;
1039
+ }
1040
+ if (typeof render === "function") {
1041
+ return (props) => {
1042
+ return render(this, props);
1043
+ };
1044
+ }
1045
+ return (props) => render;
1046
+ }
1047
+ /**
1048
+ * The function that is called when the activity is runned.
1049
+ */
1050
+ get onRun() {
1051
+ return (props) => {
1052
+ return this._onRun(this, props);
1053
+ };
1054
+ }
1055
+ /**
1056
+ * Whether the activity is a deadline.
1057
+ * @returns Whether the activity is a deadline.
1058
+ */
1059
+ isExpired() {
1060
+ if (this.toDay && this.toDay <= TimeManager.currentDay) {
1061
+ return true;
1062
+ }
1063
+ return false;
1064
+ }
1065
+ /**
1066
+ * Export the activity properties.
1067
+ * @returns The activity properties.
1068
+ */
1069
+ export() {
1070
+ return {
1071
+ name: this.getStorageProperty("name") || this.defaultName,
1072
+ fromHour: this.getStorageProperty("fromHour") || this.defaultFromHour,
1073
+ toHour: this.getStorageProperty("toHour") || this.defaultToHour,
1074
+ fromDay: this.getStorageProperty("fromDay") || this.defaultFromDay,
1075
+ toDay: this.getStorageProperty("toDay") || this.defaultToDay,
1076
+ disabled: this.getStorageProperty("disabled") || this.defaultDisabled,
1077
+ hidden: this.getStorageProperty("hidden") || this.defaultHidden,
1078
+ renderIcon: this._renderIcon
1079
+ };
1080
+ }
1081
+ };
1081
1082
 
1082
1083
  // src/classes/navigation/ActivityRoom.ts
1083
1084
  var ActivityRoom = class extends ActivityStoredAbstract {
@@ -1212,7 +1213,7 @@ var RoomBaseModel = class extends StoredClassModel {
1212
1213
  get activities() {
1213
1214
  let activities = this.activityIds.map((id) => {
1214
1215
  return this.getActivity(id);
1215
- }).filter((activity) => activity !== void 0);
1216
+ }).filter((activity) => activity !== void 0 && !activity.hidden);
1216
1217
  return activities;
1217
1218
  }
1218
1219
  /**