taon 19.0.7 → 19.0.8

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 (64) hide show
  1. package/browser/fesm2022/taon.mjs +35 -23
  2. package/browser/fesm2022/taon.mjs.map +1 -1
  3. package/browser/lib/base-classes/base-custom-repository.d.ts +4 -0
  4. package/browser/lib/base-classes/base-entity.d.ts +9 -0
  5. package/browser/lib/base-classes/base-injector.d.ts +3 -2
  6. package/browser/lib/base-classes/base-repository.d.ts +25 -9
  7. package/browser/lib/base-classes/base.d.ts +2 -0
  8. package/browser/lib/index.d.ts +1 -0
  9. package/browser/package.json +1 -1
  10. package/client/fesm2022/taon.mjs +35 -23
  11. package/client/fesm2022/taon.mjs.map +1 -1
  12. package/client/lib/base-classes/base-custom-repository.d.ts +4 -0
  13. package/client/lib/base-classes/base-entity.d.ts +9 -0
  14. package/client/lib/base-classes/base-injector.d.ts +3 -2
  15. package/client/lib/base-classes/base-repository.d.ts +25 -9
  16. package/client/lib/base-classes/base.d.ts +2 -0
  17. package/client/lib/index.d.ts +1 -0
  18. package/client/package.json +1 -1
  19. package/lib/base-classes/base-custom-repository.d.ts +3 -0
  20. package/lib/base-classes/base-custom-repository.js +19 -0
  21. package/lib/base-classes/base-custom-repository.js.map +1 -0
  22. package/lib/base-classes/base-entity.d.ts +10 -1
  23. package/lib/base-classes/base-entity.js +13 -2
  24. package/lib/base-classes/base-entity.js.map +1 -1
  25. package/lib/base-classes/base-injector.d.ts +3 -2
  26. package/lib/base-classes/base-injector.js.map +1 -1
  27. package/lib/base-classes/base-repository.d.ts +25 -9
  28. package/lib/base-classes/base-repository.js +15 -21
  29. package/lib/base-classes/base-repository.js.map +1 -1
  30. package/lib/base-classes/base.d.ts +2 -0
  31. package/lib/base-classes/base.js +2 -0
  32. package/lib/base-classes/base.js.map +1 -1
  33. package/lib/build-info._auto-generated_.d.ts +1 -1
  34. package/lib/build-info._auto-generated_.js +1 -1
  35. package/lib/index.d.ts +1 -0
  36. package/lib/index.js +3 -1
  37. package/lib/index.js.map +1 -1
  38. package/lib/realtime/realtime-strategy/realtime-abstract-mock.d.ts +10 -0
  39. package/lib/realtime/realtime-strategy/realtime-abstract-mock.js +214 -0
  40. package/lib/realtime/realtime-strategy/realtime-abstract-mock.js.map +1 -0
  41. package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.js +2 -2
  42. package/lib/ui/directives/index.js +2 -2
  43. package/lib/ui/index.js +2 -2
  44. package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js +2 -2
  45. package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js +2 -2
  46. package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js +2 -2
  47. package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
  48. package/lib/ui/taon-github-fork-me-corner/index.js +2 -2
  49. package/lib/ui/taon-github-fork-me-ribbon/index.js +2 -2
  50. package/lib/ui/taon-notifications/taon-notifications.models.js +2 -2
  51. package/lib/ui/taon-progress-bar/index.js +2 -2
  52. package/lib/ui/taon-session-passcode/index.js +2 -2
  53. package/lib/ui/taon-table/index.js +2 -2
  54. package/package.json +1 -1
  55. package/tmp-environment.json +3 -3
  56. package/websql/fesm2022/taon.mjs +35 -21
  57. package/websql/fesm2022/taon.mjs.map +1 -1
  58. package/websql/lib/base-classes/base-custom-repository.d.ts +4 -0
  59. package/websql/lib/base-classes/base-entity.d.ts +9 -0
  60. package/websql/lib/base-classes/base-injector.d.ts +3 -2
  61. package/websql/lib/base-classes/base-repository.d.ts +25 -9
  62. package/websql/lib/base-classes/base.d.ts +2 -0
  63. package/websql/lib/index.d.ts +1 -0
  64. package/websql/package.json +1 -1
@@ -761,14 +761,24 @@ class BaseClass {
761
761
  }
762
762
  }
763
763
 
764
- /* */
765
- /* */
766
764
  let EntityDecorator$1 = () => {
767
765
  return (target) => { };
768
766
  };
769
767
  /* */
770
768
  /* */
771
769
  let BaseEntity = class BaseEntity extends BaseClass {
770
+ /**
771
+ * simple check if relation is ok
772
+ */
773
+ relation(relationName) {
774
+ return relationName;
775
+ }
776
+ /**
777
+ * simple check if relation is ok
778
+ */
779
+ relations(relationNames) {
780
+ return relationNames;
781
+ }
772
782
  };
773
783
  BaseEntity = __decorate([
774
784
  EntityDecorator$1()
@@ -4985,10 +4995,17 @@ class BaseInjector {
4985
4995
  }
4986
4996
  }
4987
4997
 
4998
+ //#endregion
4999
+ let BaseCustomRepository = class BaseCustomRepository extends BaseInjector {
5000
+ };
5001
+ BaseCustomRepository = __decorate([
5002
+ TaonRepository({ className: 'BaseCustomRepository' })
5003
+ ], BaseCustomRepository);
5004
+
4988
5005
  //#endregion
4989
5006
  const INDEX_KEYS_NO_FOR_UPDATE = ['id'];
4990
5007
  const REPOS_CACHE = Symbol('repository cache inside instance');
4991
- let BaseRepository = class BaseRepository extends BaseInjector {
5008
+ let BaseRepository = class BaseRepository extends BaseCustomRepository {
4992
5009
  constructor(
4993
5010
  // Injected through BaseCrudController
4994
5011
  __entityClassResolveFn) {
@@ -5103,12 +5120,11 @@ let BaseRepository = class BaseRepository extends BaseInjector {
5103
5120
  return (void 0);
5104
5121
  }
5105
5122
  /**
5106
- * alias to save
5107
- * -> it will actuall create new entity in db
5108
- * in oposite to typeorm create method
5123
+ * Creates a new entity instance or instances.
5124
+ * Can copy properties from the given object into new entities.
5109
5125
  */
5110
- async create(item, options) {
5111
- return this.save(item, options);
5126
+ create(plainEntityLikeOrPlainEntityLikes) {
5127
+ return this.repo.create(plainEntityLikeOrPlainEntityLikes);
5112
5128
  }
5113
5129
  async bulkSave(items, options) {
5114
5130
  /* */
@@ -5126,20 +5142,6 @@ let BaseRepository = class BaseRepository extends BaseInjector {
5126
5142
  return this.bulkSave(items, options);
5127
5143
  }
5128
5144
  //#region old typeorm version
5129
- // /**
5130
- // * Creates a new entity instance.
5131
- // */
5132
- // create(): Entity;
5133
- // /**
5134
- // * Creates new entities and copies all entity properties from given objects into their new entities.
5135
- // * Note that it copies only properties that are present in entity schema.
5136
- // */
5137
- // create(entityLikeArray: Entity[]): Entity[];
5138
- // /**
5139
- // * Creates a new entity instance and copies all entity properties from this object into a new entity.
5140
- // * Note that it copies only properties that are present in entity schema.
5141
- // */
5142
- // create(entityLike: Entity): Entity;
5143
5145
  /**
5144
5146
  * Saves all given entities in the database.
5145
5147
  * If entities do not exist in the database then inserts, otherwise updates.
@@ -5539,6 +5541,15 @@ let BaseRepository = class BaseRepository extends BaseInjector {
5539
5541
  return this.repo.query(query, parameters);
5540
5542
  }
5541
5543
  //#endregion
5544
+ //#region crud operations / typeorm / query
5545
+ /**
5546
+ * Executes a raw SQL query and returns a raw database results.
5547
+ * Raw query execution is supported only by relational databases (MongoDB is not supported).
5548
+ */
5549
+ createQueryBuilder(alias, queryRunner) {
5550
+ return this.repo.createQueryBuilder(alias, queryRunner);
5551
+ }
5552
+ //#endregion
5542
5553
  //#region crud operations / typeorm / clear
5543
5554
  /**
5544
5555
  * Clears all the data from the given table/collection (truncates/drops it).
@@ -6229,6 +6240,7 @@ var Base;
6229
6240
  Base.Provider = BaseProvider;
6230
6241
  Base.Class = BaseClass;
6231
6242
  Base.Repository = BaseRepository;
6243
+ Base.CustomRepository = BaseCustomRepository;
6232
6244
  Base.SubscriberForEntity = BaseSubscriberForEntity;
6233
6245
  Base.Migration = BaseMigration;
6234
6246
  Base.AngularService = BaseAngularsService;
@@ -7569,5 +7581,5 @@ var Taon;
7569
7581
  * Generated bundle index. Do not edit.
7570
7582
  */
7571
7583
 
7572
- export { BaseContext, BaseController, BaseEntity, BaseMigration, BaseProvider, BaseRepository, ClassHelpers, EndpointContext, Models, SafePipe, Taon, TaonAdminModeConfigurationComponent, TaonFullMaterialModule, TaonGithubForkMeCornerComponent, TaonGithubForkMeCornerModule, TaonInjectHTMLDirective, TaonLongPress, TaonNotificationOptions, TaonNotificationsComponent, TaonNotificationsModule, TaonNotificationsService, TaonProgressBarComponent, TaonProgressBarModule, TaonSessionPasscodeComponent, TaonTableComponent, TaonTableModule, createContext, inject };
7584
+ export { BaseContext, BaseController, BaseCustomRepository, BaseEntity, BaseMigration, BaseProvider, BaseRepository, ClassHelpers, EndpointContext, Models, SafePipe, Taon, TaonAdminModeConfigurationComponent, TaonFullMaterialModule, TaonGithubForkMeCornerComponent, TaonGithubForkMeCornerModule, TaonInjectHTMLDirective, TaonLongPress, TaonNotificationOptions, TaonNotificationsComponent, TaonNotificationsModule, TaonNotificationsService, TaonProgressBarComponent, TaonProgressBarModule, TaonSessionPasscodeComponent, TaonTableComponent, TaonTableModule, createContext, inject };
7573
7585
  //# sourceMappingURL=taon.mjs.map