@sneat/core 0.1.2 → 0.1.4

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 (160) hide show
  1. package/esm2022/index.js +2 -0
  2. package/esm2022/index.js.map +1 -0
  3. package/esm2022/lib/analytics.interface.js +3 -0
  4. package/esm2022/lib/analytics.interface.js.map +1 -0
  5. package/esm2022/lib/animations/form-animations.js +8 -0
  6. package/esm2022/lib/animations/form-animations.js.map +1 -0
  7. package/esm2022/lib/animations/index.js +3 -0
  8. package/esm2022/lib/animations/index.js.map +1 -0
  9. package/esm2022/lib/animations/list-animations.js +29 -0
  10. package/esm2022/lib/animations/list-animations.js.map +1 -0
  11. package/esm2022/lib/app.service.js +3 -0
  12. package/esm2022/lib/app.service.js.map +1 -0
  13. package/esm2022/lib/core-models.js +2 -0
  14. package/esm2022/lib/core-models.js.map +1 -0
  15. package/esm2022/lib/directives/index.js +2 -0
  16. package/esm2022/lib/directives/index.js.map +1 -0
  17. package/esm2022/lib/directives/sneat-select-all-on-focus.directive.js +42 -0
  18. package/esm2022/lib/directives/sneat-select-all-on-focus.directive.js.map +1 -0
  19. package/esm2022/lib/environment-config.js +4 -0
  20. package/esm2022/lib/environment-config.js.map +1 -0
  21. package/esm2022/lib/eq.js +2 -0
  22. package/esm2022/lib/eq.js.map +1 -0
  23. package/esm2022/lib/exclude-undefined.js +43 -0
  24. package/esm2022/lib/exclude-undefined.js.map +1 -0
  25. package/esm2022/lib/form-field.js +2 -0
  26. package/esm2022/lib/form-field.js.map +1 -0
  27. package/esm2022/lib/index.js +22 -0
  28. package/esm2022/lib/index.js.map +1 -0
  29. package/esm2022/lib/interfaces.js +11 -0
  30. package/esm2022/lib/interfaces.js.map +1 -0
  31. package/esm2022/lib/location-href.js +6 -0
  32. package/esm2022/lib/location-href.js.map +1 -0
  33. package/esm2022/lib/logging/interfaces.js +3 -0
  34. package/esm2022/lib/logging/interfaces.js.map +1 -0
  35. package/esm2022/lib/logging.js +16 -0
  36. package/esm2022/lib/logging.js.map +1 -0
  37. package/esm2022/lib/nav/index.js +3 -0
  38. package/esm2022/lib/nav/index.js.map +1 -0
  39. package/esm2022/lib/nav/nav-context.js +7 -0
  40. package/esm2022/lib/nav/nav-context.js.map +1 -0
  41. package/esm2022/lib/nav/routing-state.js +29 -0
  42. package/esm2022/lib/nav/routing-state.js.map +1 -0
  43. package/esm2022/lib/services/index.js +4 -0
  44. package/esm2022/lib/services/index.js.map +1 -0
  45. package/esm2022/lib/services/ng-module-preloader.service.js +108 -0
  46. package/esm2022/lib/services/ng-module-preloader.service.js.map +1 -0
  47. package/esm2022/lib/services/sneat-nav.service.js +41 -0
  48. package/esm2022/lib/services/sneat-nav.service.js.map +1 -0
  49. package/esm2022/lib/services/top-menu.service.js +25 -0
  50. package/esm2022/lib/services/top-menu.service.js.map +1 -0
  51. package/esm2022/lib/sneat-enum-keys.js +2 -0
  52. package/esm2022/lib/sneat-enum-keys.js.map +1 -0
  53. package/esm2022/lib/sneat-extensions.js +38 -0
  54. package/esm2022/lib/sneat-extensions.js.map +1 -0
  55. package/esm2022/lib/store.js +42 -0
  56. package/esm2022/lib/store.js.map +1 -0
  57. package/esm2022/lib/team-type.js +2 -0
  58. package/esm2022/lib/team-type.js.map +1 -0
  59. package/esm2022/lib/types/age-group.js +2 -0
  60. package/esm2022/lib/types/age-group.js.map +1 -0
  61. package/{src/lib/types/gender.ts → esm2022/lib/types/gender.js} +1 -7
  62. package/esm2022/lib/types/gender.js.map +1 -0
  63. package/esm2022/lib/types/index.js +3 -0
  64. package/esm2022/lib/types/index.js.map +1 -0
  65. package/esm2022/lib/utils/datetimes.js +39 -0
  66. package/esm2022/lib/utils/datetimes.js.map +1 -0
  67. package/esm2022/lib/utils/index.js +2 -0
  68. package/esm2022/lib/utils/index.js.map +1 -0
  69. package/esm2022/sneat-core.js +5 -0
  70. package/esm2022/sneat-core.js.map +1 -0
  71. package/lib/analytics.interface.d.ts +12 -0
  72. package/lib/animations/form-animations.d.ts +1 -0
  73. package/lib/animations/list-animations.d.ts +3 -0
  74. package/lib/app.service.d.ts +9 -0
  75. package/{src/lib/core-models.ts → lib/core-models.d.ts} +4 -6
  76. package/lib/directives/sneat-select-all-on-focus.directive.d.ts +7 -0
  77. package/lib/environment-config.d.ts +37 -0
  78. package/lib/eq.d.ts +1 -0
  79. package/lib/exclude-undefined.d.ts +6 -0
  80. package/lib/form-field.d.ts +4 -0
  81. package/lib/interfaces.d.ts +53 -0
  82. package/lib/location-href.d.ts +1 -0
  83. package/lib/logging/interfaces.d.ts +12 -0
  84. package/lib/logging.d.ts +12 -0
  85. package/lib/nav/nav-context.d.ts +4 -0
  86. package/lib/nav/routing-state.d.ts +8 -0
  87. package/lib/services/ng-module-preloader.service.d.ts +18 -0
  88. package/lib/services/sneat-nav.service.d.ts +12 -0
  89. package/lib/services/top-menu.service.d.ts +10 -0
  90. package/lib/sneat-enum-keys.d.ts +1 -0
  91. package/lib/sneat-extensions.d.ts +7 -0
  92. package/lib/store.d.ts +14 -0
  93. package/lib/team-type.d.ts +2 -0
  94. package/lib/types/gender.d.ts +6 -0
  95. package/lib/utils/datetimes.d.ts +7 -0
  96. package/package.json +14 -2
  97. package/sneat-core.d.ts +5 -0
  98. package/eslint.config.js +0 -7
  99. package/ng-package.json +0 -7
  100. package/project.json +0 -38
  101. package/src/lib/analytics.interface.ts +0 -34
  102. package/src/lib/animations/form-animations.spec.ts +0 -26
  103. package/src/lib/animations/form-animations.ts +0 -11
  104. package/src/lib/animations/list-animations.spec.ts +0 -50
  105. package/src/lib/animations/list-animations.ts +0 -44
  106. package/src/lib/app.service.ts +0 -33
  107. package/src/lib/constants.spec.ts +0 -20
  108. package/src/lib/constants.ts +0 -1
  109. package/src/lib/directives/sneat-select-all-on-focus.directive.spec.ts +0 -142
  110. package/src/lib/directives/sneat-select-all-on-focus.directive.ts +0 -36
  111. package/src/lib/environment-config.ts +0 -54
  112. package/src/lib/eq.spec.ts +0 -24
  113. package/src/lib/eq.ts +0 -1
  114. package/src/lib/exclude-undefined.spec.ts +0 -165
  115. package/src/lib/exclude-undefined.ts +0 -47
  116. package/src/lib/form-field.ts +0 -5
  117. package/src/lib/interfaces.spec.ts +0 -116
  118. package/src/lib/interfaces.ts +0 -85
  119. package/src/lib/location-href.spec.ts +0 -53
  120. package/src/lib/location-href.ts +0 -9
  121. package/src/lib/logging/interfaces.ts +0 -19
  122. package/src/lib/logging.spec.ts +0 -132
  123. package/src/lib/logging.ts +0 -33
  124. package/src/lib/nav/nav-context.ts +0 -16
  125. package/src/lib/nav/routing-state.spec.ts +0 -65
  126. package/src/lib/nav/routing-state.ts +0 -26
  127. package/src/lib/services/ng-module-preloader.service.spec.ts +0 -72
  128. package/src/lib/services/ng-module-preloader.service.ts +0 -125
  129. package/src/lib/services/sneat-nav.service.spec.ts +0 -95
  130. package/src/lib/services/sneat-nav.service.ts +0 -46
  131. package/src/lib/services/top-menu.service.spec.ts +0 -42
  132. package/src/lib/services/top-menu.service.ts +0 -19
  133. package/src/lib/sneat-enum-keys.ts +0 -2
  134. package/src/lib/sneat-extensions.spec.ts +0 -127
  135. package/src/lib/sneat-extensions.ts +0 -49
  136. package/src/lib/store.spec.ts +0 -156
  137. package/src/lib/store.ts +0 -54
  138. package/src/lib/team-type.spec.ts +0 -8
  139. package/src/lib/team-type.ts +0 -13
  140. package/src/lib/testing/base-test-setup.ts +0 -247
  141. package/src/lib/testing/test-setup-light.ts +0 -1
  142. package/src/lib/testing/test-setup.ts +0 -70
  143. package/src/lib/types/gender.spec.ts +0 -42
  144. package/src/lib/utils/datetimes.spec.ts +0 -144
  145. package/src/lib/utils/datetimes.ts +0 -51
  146. package/src/test-setup.ts +0 -3
  147. package/tsconfig.json +0 -13
  148. package/tsconfig.lib.json +0 -19
  149. package/tsconfig.lib.prod.json +0 -7
  150. package/tsconfig.spec.json +0 -31
  151. package/vite.config.mts +0 -10
  152. /package/{src/index.ts → index.d.ts} +0 -0
  153. /package/{src/lib/animations/index.ts → lib/animations/index.d.ts} +0 -0
  154. /package/{src/lib/directives/index.ts → lib/directives/index.d.ts} +0 -0
  155. /package/{src/lib/index.ts → lib/index.d.ts} +0 -0
  156. /package/{src/lib/nav/index.ts → lib/nav/index.d.ts} +0 -0
  157. /package/{src/lib/services/index.ts → lib/services/index.d.ts} +0 -0
  158. /package/{src/lib/types/age-group.ts → lib/types/age-group.d.ts} +0 -0
  159. /package/{src/lib/types/index.ts → lib/types/index.d.ts} +0 -0
  160. /package/{src/lib/utils/index.ts → lib/utils/index.d.ts} +0 -0
@@ -0,0 +1,25 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { BehaviorSubject } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export class TopMenuService {
5
+ constructor() {
6
+ this.$isTopMenuVisible = new BehaviorSubject(false);
7
+ this.$isTopMenuHidden = new BehaviorSubject(true);
8
+ this.isTopMenuVisible = this.$isTopMenuVisible.asObservable();
9
+ this.isTopMenuHidden = this.$isTopMenuHidden.asObservable();
10
+ this.visibilityChanged = (event) => {
11
+ const visible = !!event.detail['visible'];
12
+ this.$isTopMenuVisible.next(visible);
13
+ this.$isTopMenuHidden.next(!visible);
14
+ };
15
+ }
16
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: TopMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
17
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: TopMenuService, providedIn: 'root' }); }
18
+ }
19
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: TopMenuService, decorators: [{
20
+ type: Injectable,
21
+ args: [{
22
+ providedIn: 'root',
23
+ }]
24
+ }] });
25
+ //# sourceMappingURL=top-menu.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"top-menu.service.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/services/top-menu.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;;AAKvC,MAAM,OAAO,cAAc;IAH3B;QAIU,sBAAiB,GAAG,IAAI,eAAe,CAAU,KAAK,CAAC,CAAC;QACxD,qBAAgB,GAAG,IAAI,eAAe,CAAU,IAAI,CAAC,CAAC;QAE9C,qBAAgB,GAAG,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;QACzD,oBAAe,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,EAAE,CAAC;QAEvD,sBAAiB,GAAG,CAAC,KAAY,EAAQ,EAAE;YACzD,MAAM,OAAO,GAAG,CAAC,CAAE,KAAqB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAC3D,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACrC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;QACvC,CAAC,CAAC;KACH;8GAZY,cAAc;kHAAd,cAAc,cAFb,MAAM;;2FAEP,cAAc;kBAH1B,UAAU;mBAAC;oBACV,UAAU,EAAE,MAAM;iBACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TopMenuService {\n private $isTopMenuVisible = new BehaviorSubject<boolean>(false);\n private $isTopMenuHidden = new BehaviorSubject<boolean>(true);\n\n public readonly isTopMenuVisible = this.$isTopMenuVisible.asObservable();\n public readonly isTopMenuHidden = this.$isTopMenuHidden.asObservable();\n\n public readonly visibilityChanged = (event: Event): void => {\n const visible = !!(event as CustomEvent).detail['visible'];\n this.$isTopMenuVisible.next(visible);\n this.$isTopMenuHidden.next(!visible);\n };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=sneat-enum-keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sneat-enum-keys.js","sourceRoot":"","sources":["../../../../../libs/core/src/lib/sneat-enum-keys.ts"],"names":[],"mappings":"","sourcesContent":["// https://stackoverflow.com/questions/50376977/generic-type-to-get-enum-keys-as-union-string-in-typescript\nexport type EnumAsUnionOfKeys<TEnum> = keyof TEnum;\n"]}
@@ -0,0 +1,38 @@
1
+ const assetsExtension = {
2
+ id: 'assets',
3
+ title: 'Assets',
4
+ emoji: '🏡',
5
+ };
6
+ // const contactsExtension: ISneatExtension = {
7
+ // id: 'contacts',
8
+ // title: 'Contacts',
9
+ // emoji: '📇'
10
+ // }
11
+ const documentsExtension = {
12
+ id: 'documents',
13
+ title: 'Documents',
14
+ emoji: '📄',
15
+ };
16
+ const sizesExtension = {
17
+ id: 'sizes',
18
+ title: 'Sizes',
19
+ emoji: '📏',
20
+ };
21
+ const calendariumExtension = {
22
+ id: 'calendarium',
23
+ title: 'Calendar',
24
+ emoji: '🗓️',
25
+ };
26
+ export const defaultFamilyExtension = [
27
+ assetsExtension,
28
+ calendariumExtension,
29
+ documentsExtension,
30
+ sizesExtension,
31
+ ];
32
+ export const defaultFamilyMemberExtensions = [
33
+ assetsExtension,
34
+ calendariumExtension,
35
+ documentsExtension,
36
+ sizesExtension,
37
+ ];
38
+ //# sourceMappingURL=sneat-extensions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sneat-extensions.js","sourceRoot":"","sources":["../../../../../libs/core/src/lib/sneat-extensions.ts"],"names":[],"mappings":"AAMA,MAAM,eAAe,GAAoB;IACvC,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF,+CAA+C;AAC/C,mBAAmB;AACnB,sBAAsB;AACtB,eAAe;AACf,IAAI;AAEJ,MAAM,kBAAkB,GAAoB;IAC1C,EAAE,EAAE,WAAW;IACf,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF,MAAM,cAAc,GAAoB;IACtC,EAAE,EAAE,OAAO;IACX,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF,MAAM,oBAAoB,GAAoB;IAC5C,EAAE,EAAE,aAAa;IACjB,KAAK,EAAE,UAAU;IACjB,KAAK,EAAE,KAAK;CACb,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACvD,eAAe;IACf,oBAAoB;IACpB,kBAAkB;IAClB,cAAc;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAsB;IAC9D,eAAe;IACf,oBAAoB;IACpB,kBAAkB;IAClB,cAAc;CACf,CAAC","sourcesContent":["export interface ISneatExtension {\n id: string;\n title: string;\n emoji: string;\n}\n\nconst assetsExtension: ISneatExtension = {\n id: 'assets',\n title: 'Assets',\n emoji: '🏡',\n};\n\n// const contactsExtension: ISneatExtension = {\n// \tid: 'contacts',\n// \ttitle: 'Contacts',\n// \temoji: '📇'\n// }\n\nconst documentsExtension: ISneatExtension = {\n id: 'documents',\n title: 'Documents',\n emoji: '📄',\n};\n\nconst sizesExtension: ISneatExtension = {\n id: 'sizes',\n title: 'Sizes',\n emoji: '📏',\n};\n\nconst calendariumExtension: ISneatExtension = {\n id: 'calendarium',\n title: 'Calendar',\n emoji: '🗓️',\n};\n\nexport const defaultFamilyExtension: ISneatExtension[] = [\n assetsExtension,\n calendariumExtension,\n documentsExtension,\n sizesExtension,\n];\n\nexport const defaultFamilyMemberExtensions: ISneatExtension[] = [\n assetsExtension,\n calendariumExtension,\n documentsExtension,\n sizesExtension,\n];\n"]}
@@ -0,0 +1,42 @@
1
+ // Migrated
2
+ export const STORE_ID_FIRESTORE = 'firestore';
3
+ export const STORE_TYPE_FIRESTORE = 'firestore';
4
+ export const STORE_TYPE_GITHUB = 'github';
5
+ export const STORE_ID_GITHUB_COM = 'github.com';
6
+ export const GITLAB_REPO_PREFIX = 'gitlab.';
7
+ export function storeCanProvideListOfProjects(storeId) {
8
+ return !(storeId === STORE_ID_FIRESTORE || storeId === STORE_ID_GITHUB_COM);
9
+ }
10
+ export function storeRefToId(ref) {
11
+ switch (ref.type) {
12
+ case 'firestore':
13
+ case 'github':
14
+ return ref.url || ref.type;
15
+ case 'gitlab':
16
+ case 'agent':
17
+ if (ref.url) {
18
+ return ref.url;
19
+ }
20
+ throw new Error('store with type "agent" must have URL');
21
+ default:
22
+ return ``;
23
+ }
24
+ }
25
+ export function parseStoreRef(storeId) {
26
+ if (!storeId) {
27
+ throw new Error('storeId is a required parameter');
28
+ }
29
+ switch (storeId) {
30
+ case 'firestore':
31
+ case 'github':
32
+ return { type: storeId };
33
+ case 'github.com':
34
+ return { type: 'github' };
35
+ default:
36
+ if (storeId.startsWith('http-') || storeId.startsWith('https-')) {
37
+ return { type: 'agent', url: storeId.replace('-', '://') };
38
+ }
39
+ throw new Error('unsupported format of store id:' + storeId);
40
+ }
41
+ }
42
+ //# sourceMappingURL=store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.js","sourceRoot":"","sources":["../../../../../libs/core/src/lib/store.ts"],"names":[],"mappings":"AAAA,WAAW;AACX,MAAM,CAAC,MAAM,kBAAkB,GAAG,WAAW,CAAC;AAC9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;AAEhD,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAC1C,MAAM,CAAC,MAAM,mBAAmB,GAAG,YAAY,CAAC;AAEhD,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAE5C,MAAM,UAAU,6BAA6B,CAAC,OAAe;IAC3D,OAAO,CAAC,CAAC,OAAO,KAAK,kBAAkB,IAAI,OAAO,KAAK,mBAAmB,CAAC,CAAC;AAC9E,CAAC;AAUD,MAAM,UAAU,YAAY,CAAC,GAAc;IACzC,QAAQ,GAAG,CAAC,IAAI,EAAE,CAAC;QACjB,KAAK,WAAW,CAAC;QACjB,KAAK,QAAQ;YACX,OAAO,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC;QAC7B,KAAK,QAAQ,CAAC;QACd,KAAK,OAAO;YACV,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC;gBACZ,OAAO,GAAG,CAAC,GAAG,CAAC;YACjB,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3D;YACE,OAAO,EAAE,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC5C,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;IACD,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,WAAW,CAAC;QACjB,KAAK,QAAQ;YACX,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QAC3B,KAAK,YAAY;YACf,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QAC5B;YACE,IAAI,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAChE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC;YAC7D,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,iCAAiC,GAAG,OAAO,CAAC,CAAC;IACjE,CAAC;AACH,CAAC","sourcesContent":["// Migrated\nexport const STORE_ID_FIRESTORE = 'firestore';\nexport const STORE_TYPE_FIRESTORE = 'firestore';\n\nexport const STORE_TYPE_GITHUB = 'github';\nexport const STORE_ID_GITHUB_COM = 'github.com';\n\nexport const GITLAB_REPO_PREFIX = 'gitlab.';\n\nexport function storeCanProvideListOfProjects(storeId: string): boolean {\n return !(storeId === STORE_ID_FIRESTORE || storeId === STORE_ID_GITHUB_COM);\n}\n\nexport type StoreType = 'firestore' | 'agent' | 'browser' | 'github' | 'gitlab';\n\nexport interface IStoreRef {\n type: StoreType;\n id?: string;\n url?: string;\n}\n\nexport function storeRefToId(ref: IStoreRef): string {\n switch (ref.type) {\n case 'firestore':\n case 'github':\n return ref.url || ref.type;\n case 'gitlab':\n case 'agent':\n if (ref.url) {\n return ref.url;\n }\n throw new Error('store with type \"agent\" must have URL');\n default:\n return ``;\n }\n}\n\nexport function parseStoreRef(storeId?: string): IStoreRef {\n if (!storeId) {\n throw new Error('storeId is a required parameter');\n }\n switch (storeId) {\n case 'firestore':\n case 'github':\n return { type: storeId };\n case 'github.com':\n return { type: 'github' };\n default:\n if (storeId.startsWith('http-') || storeId.startsWith('https-')) {\n return { type: 'agent', url: storeId.replace('-', '://') };\n }\n throw new Error('unsupported format of store id:' + storeId);\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export const SpaceTypeFamily = 'family';
2
+ //# sourceMappingURL=team-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team-type.js","sourceRoot":"","sources":["../../../../../libs/core/src/lib/team-type.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC","sourcesContent":["export const SpaceTypeFamily = 'family';\n\nexport type SpaceType =\n | 'family'\n | 'private'\n | 'company'\n | 'team'\n | 'parish'\n | 'educator'\n | 'realtor'\n | 'sport_club'\n | 'cohabit'\n | 'unknown';\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=age-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"age-group.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/types/age-group.ts"],"names":[],"mappings":"","sourcesContent":["export type AgeGroupID = 'adult' | 'child' | 'pet' | 'undisclosed' | 'unknown';\n"]}
@@ -3,10 +3,4 @@ export const GenderUnknown = 'unknown';
3
3
  export const GenderMale = 'male';
4
4
  export const GenderFemale = 'female';
5
5
  export const GenderOther = 'other';
6
-
7
- export type Gender =
8
- | typeof GenderUndisclosed
9
- | typeof GenderUnknown
10
- | typeof GenderMale
11
- | typeof GenderFemale
12
- | typeof GenderOther;
6
+ //# sourceMappingURL=gender.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gender.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/types/gender.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAC/C,MAAM,CAAC,MAAM,aAAa,GAAG,SAAS,CAAC;AACvC,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC;AACjC,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC;AACrC,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC","sourcesContent":["export const GenderUndisclosed = 'undisclosed';\nexport const GenderUnknown = 'unknown';\nexport const GenderMale = 'male';\nexport const GenderFemale = 'female';\nexport const GenderOther = 'other';\n\nexport type Gender =\n | typeof GenderUndisclosed\n | typeof GenderUnknown\n | typeof GenderMale\n | typeof GenderFemale\n | typeof GenderOther;\n"]}
@@ -0,0 +1,3 @@
1
+ export * from './age-group';
2
+ export * from './gender';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC","sourcesContent":["export * from './age-group';\nexport * from './gender';\n"]}
@@ -0,0 +1,39 @@
1
+ export function isoStringsToDate(date, time) {
2
+ const [year, month, day] = date ? date.split('T')[0].split('-') : [0, 0, 0];
3
+ if (time) {
4
+ if (time.includes('T')) {
5
+ time = time.split('T')[1];
6
+ }
7
+ }
8
+ else {
9
+ time = '00:00';
10
+ }
11
+ const [hour, minute] = time.split(':');
12
+ return new Date(Number(year), Number(month) - 1, Number(day), Number(hour), Number(minute));
13
+ }
14
+ export function isValidaTimeString(v) {
15
+ return !!v?.match(/^\d{2}:\d{2}$/);
16
+ }
17
+ export function isValidDateString(v) {
18
+ return !!v?.match(/^\d{4}-\d{2}-\d{2}$/);
19
+ }
20
+ export function dateToIso(d) {
21
+ d = new Date(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate()));
22
+ return d.toISOString().split('T')[0];
23
+ }
24
+ export function localDateToIso(d) {
25
+ const month = `${d.getMonth() + 1}`;
26
+ const day = `${d.getDate()}`;
27
+ return `${d.getFullYear()}-${month.length === 1 ? `0${month}` : month}-${day.length === 1 ? `0${day}` : day}`;
28
+ }
29
+ export function getWeekStartDate(d, day) {
30
+ d = new Date(d.getFullYear(), d.getMonth(), d.getDate());
31
+ const dateDay = d.getDay();
32
+ const diff = d.getDate() - day + (dateDay === 0 ? -6 : 1 - dateDay); // adjust when day is sunday
33
+ return new Date(d.setDate(diff));
34
+ }
35
+ export function getWeekID(d) {
36
+ d = getWeekStartDate(d, 1);
37
+ return (d.getFullYear() * 100 + (1 + d.getMonth())) * 100 + d.getDate();
38
+ }
39
+ //# sourceMappingURL=datetimes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"datetimes.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/utils/datetimes.ts"],"names":[],"mappings":"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","sourcesContent":["export function isoStringsToDate(date: string, time?: string): Date {\n const [year, month, day] = date ? date.split('T')[0].split('-') : [0, 0, 0];\n if (time) {\n if (time.includes('T')) {\n time = time.split('T')[1];\n }\n } else {\n time = '00:00';\n }\n const [hour, minute] = time.split(':');\n return new Date(\n Number(year),\n Number(month) - 1,\n Number(day),\n Number(hour),\n Number(minute),\n );\n}\n\nexport function isValidaTimeString(v?: string): boolean {\n return !!v?.match(/^\\d{2}:\\d{2}$/);\n}\n\nexport function isValidDateString(v?: string): boolean {\n return !!v?.match(/^\\d{4}-\\d{2}-\\d{2}$/);\n}\n\nexport function dateToIso(d: Date): string {\n d = new Date(Date.UTC(d.getFullYear(), d.getMonth(), d.getDate()));\n return d.toISOString().split('T')[0];\n}\n\nexport function localDateToIso(d: Date): string {\n const month = `${d.getMonth() + 1}`;\n const day = `${d.getDate()}`;\n return `${d.getFullYear()}-${month.length === 1 ? `0${month}` : month}-${\n day.length === 1 ? `0${day}` : day\n }`;\n}\n\nexport function getWeekStartDate(d: Date, day: number): Date {\n d = new Date(d.getFullYear(), d.getMonth(), d.getDate());\n const dateDay = d.getDay();\n const diff = d.getDate() - day + (dateDay === 0 ? -6 : 1 - dateDay); // adjust when day is sunday\n return new Date(d.setDate(diff));\n}\n\nexport function getWeekID(d: Date): number {\n d = getWeekStartDate(d, 1);\n return (d.getFullYear() * 100 + (1 + d.getMonth())) * 100 + d.getDate();\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './datetimes';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC","sourcesContent":["export * from './datetimes';\n"]}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=sneat-core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sneat-core.js","sourceRoot":"","sources":["../../../../libs/core/src/sneat-core.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"]}
@@ -0,0 +1,12 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export interface IAnalyticsCallOptions {
3
+ global: boolean;
4
+ }
5
+ export type UserProperties = Record<string, unknown>;
6
+ export interface IAnalyticsService {
7
+ logEvent(eventName: string, eventParams?: Readonly<Record<string, unknown>>, options?: IAnalyticsCallOptions): void;
8
+ identify(userID: string, userPropertiesToSet?: UserProperties, userPropertiesToSetOnce?: UserProperties): void;
9
+ loggedOut(): void;
10
+ setCurrentScreen(screenName: string, options?: IAnalyticsCallOptions): void;
11
+ }
12
+ export declare const AnalyticsService: InjectionToken<IAnalyticsService>;
@@ -0,0 +1 @@
1
+ export declare const formNexInAnimation: import("@angular/animations").AnimationTriggerMetadata;
@@ -0,0 +1,3 @@
1
+ import { AnimationTriggerMetadata } from '@angular/animations';
2
+ export declare const listItemAnimations: AnimationTriggerMetadata;
3
+ export declare const listAddRemoveAnimation: AnimationTriggerMetadata[];
@@ -0,0 +1,9 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { SpaceType } from './team-type';
3
+ export type SneatApp = 'sneat' | 'aaproject' | 'agendum' | 'class' | 'contactus' | 'creche' | 'debtus' | 'docus' | 'dream7' | 'feis' | 'logist' | 'listus' | 'neighbours' | 'parish' | 'renterra' | 'rsvp' | 'sizechart' | 'splitus' | 'sportclubs' | 'tournament' | 'datatug';
4
+ export interface IAppInfo {
5
+ readonly appId: SneatApp;
6
+ readonly appTitle: string;
7
+ readonly requiredSpaceType?: SpaceType;
8
+ }
9
+ export declare const APP_INFO: InjectionToken<IAppInfo>;
@@ -1,12 +1,10 @@
1
1
  export interface IApiError {
2
- code?: string;
3
- message: string;
2
+ code?: string;
3
+ message: string;
4
4
  }
5
-
6
5
  export interface IErrorResponse {
7
- error: IApiError;
6
+ error: IApiError;
8
7
  }
9
-
10
8
  export interface IFieldError extends IApiError {
11
- field: string;
9
+ field: string;
12
10
  }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class SneatSelectAllOnFocusDirective {
3
+ private readonly el;
4
+ selectAll(_target?: EventTarget | null): void;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<SneatSelectAllOnFocusDirective, never>;
6
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SneatSelectAllOnFocusDirective, "[sneatSelectAllOnFocus]", never, {}, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,37 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { BrowserOptions } from '@sentry/browser';
3
+ import { PostHogConfig } from 'posthog-js';
4
+ export interface IFirebaseEmulatorConfig {
5
+ authPort: number;
6
+ authHost?: string;
7
+ firestorePort: number;
8
+ firestoreHost?: string;
9
+ }
10
+ export interface IFirebaseConfig {
11
+ emulator?: IFirebaseEmulatorConfig;
12
+ projectId: string;
13
+ appId: string;
14
+ measurementId?: string;
15
+ messagingSenderId?: string;
16
+ apiKey: string;
17
+ authDomain: string;
18
+ databaseURL?: string;
19
+ storageBucket?: string;
20
+ }
21
+ type OnlyValidKeys<T, Shape> = T extends Shape ? Exclude<keyof T, keyof Shape> extends never ? T : never : never;
22
+ export interface IPosthogSettings {
23
+ readonly token: string;
24
+ readonly config?: OnlyValidKeys<Partial<PostHogConfig>, Partial<PostHogConfig>>;
25
+ }
26
+ export interface IEnvironmentConfig {
27
+ production: boolean;
28
+ useNgrok?: boolean;
29
+ posthog?: IPosthogSettings;
30
+ sentry?: BrowserOptions;
31
+ agents: Record<string, string>;
32
+ firebaseConfig: IFirebaseConfig;
33
+ firebaseBaseUrl?: string;
34
+ }
35
+ export declare const FirebaseConfigToken: InjectionToken<IFirebaseConfig>;
36
+ export declare const EnvConfigToken: InjectionToken<IEnvironmentConfig>;
37
+ export {};
package/lib/eq.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const eq: <T = string | number>(x?: T, y?: T) => boolean;
@@ -0,0 +1,6 @@
1
+ type O = Record<string, unknown>;
2
+ export declare function excludeUndefined<T>(o: T): T;
3
+ export declare function excludeEmpty<T>(o: T): T;
4
+ export declare function undefinedIfEmpty<T extends O>(o: T): T | undefined;
5
+ export declare function excludeZeroValues<T>(o: T): T;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface IFormField {
2
+ readonly hide?: boolean;
3
+ readonly required?: boolean;
4
+ }
@@ -0,0 +1,53 @@
1
+ import { SpaceType } from './team-type';
2
+ export interface ISpaceRef {
3
+ readonly id: string;
4
+ readonly type?: SpaceType;
5
+ }
6
+ export declare function equalSpaceRefs(v1?: ISpaceRef | null, v2?: ISpaceRef | null): boolean;
7
+ export declare const emptySpaceRef: ISpaceRef;
8
+ export interface IIdAndBrief<Brief> {
9
+ readonly id: string;
10
+ readonly brief: Brief;
11
+ }
12
+ export interface IIdAndBriefWithSpaceRef<Brief> {
13
+ readonly id: string;
14
+ readonly brief: Brief;
15
+ readonly space: ISpaceRef;
16
+ }
17
+ export interface IIdAndOptionalBrief<Brief> {
18
+ readonly id: string;
19
+ readonly brief?: Brief | null;
20
+ }
21
+ export interface IIdAndOptionalDbo<Dbo> {
22
+ readonly id: string;
23
+ readonly dbo?: Dbo | null;
24
+ }
25
+ export interface IIdAndDbo<Dbo> {
26
+ readonly id: string;
27
+ readonly dbo: Dbo;
28
+ }
29
+ export interface IIdAndOptionalBriefAndOptionalDbo<Brief, Dbo extends Brief> {
30
+ readonly id: string;
31
+ readonly brief?: Brief | null;
32
+ readonly dbo?: Dbo | null;
33
+ }
34
+ export interface IIdAndBriefAndOptionalDbo<Brief, Dbo extends Brief> {
35
+ readonly id: string;
36
+ readonly brief: Brief;
37
+ readonly dbo?: Dbo | null;
38
+ }
39
+ export interface IIdAndBriefAndDbo<Brief, Dbo extends Brief> {
40
+ readonly id: string;
41
+ readonly brief: Brief;
42
+ readonly dbo: Dbo;
43
+ }
44
+ export interface ISpaceItemWithBriefAndDbo<Brief, Dbo extends Brief> extends IIdAndBriefAndDbo<Brief, Dbo> {
45
+ readonly space: ISpaceRef;
46
+ }
47
+ export interface ISpaceItemBriefWithSpace<Brief> extends IIdAndBrief<Brief> {
48
+ readonly space: ISpaceRef;
49
+ }
50
+ export declare function spaceItemBriefWithSpaceRefFromBrief<Brief>(space: ISpaceRef, id: string, brief: Brief): ISpaceItemBriefWithSpace<Brief>;
51
+ export interface IIdAndDboWithSpaceRef<Dbo> extends IIdAndDbo<Dbo> {
52
+ space: ISpaceRef;
53
+ }
@@ -0,0 +1 @@
1
+ export declare function setHrefQueryParam(param: string, value: string, href?: string): string;
@@ -0,0 +1,12 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export interface ILogErrorOptions {
3
+ readonly report?: boolean;
4
+ readonly feedback?: boolean;
5
+ readonly show?: boolean;
6
+ readonly showDuration?: number;
7
+ }
8
+ export interface IErrorLogger {
9
+ logError(e: unknown, message?: string, options?: ILogErrorOptions): void;
10
+ logErrorHandler(message?: string, options?: ILogErrorOptions): (error: unknown) => void;
11
+ }
12
+ export declare const ErrorLogger: InjectionToken<IErrorLogger>;
@@ -0,0 +1,12 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export interface ILogger {
3
+ debug(...v: unknown[]): void;
4
+ info(...v: unknown[]): void;
5
+ warn(...v: unknown[]): void;
6
+ error(...v: unknown[]): void;
7
+ }
8
+ export interface ILoggerFactory {
9
+ getLogger(name: string): ILogger;
10
+ }
11
+ export declare const LOGGER_FACTORY: InjectionToken<ILoggerFactory>;
12
+ export declare const loggerFactory: ILoggerFactory;
@@ -0,0 +1,4 @@
1
+ import { IIdAndOptionalBriefAndOptionalDbo } from '../interfaces';
2
+ export type SpaceItem = 'happening' | 'contact' | 'document' | 'asset' | 'list';
3
+ export type DeleteOperationState = 'deleting' | 'deleted' | undefined;
4
+ export type INavContext<Brief, Dbo extends Brief> = IIdAndOptionalBriefAndOptionalDbo<Brief, Dbo>;
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class RoutingState {
3
+ private history;
4
+ constructor();
5
+ hasHistory(): boolean;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<RoutingState, never>;
7
+ static ɵprov: i0.ɵɵInjectableDeclaration<RoutingState>;
8
+ }
@@ -0,0 +1,18 @@
1
+ import { Type } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export type PreloadPages = 'assets' | 'contacts' | 'members' | 'real-estates' | 'budget';
4
+ export declare class NgModulePreloaderService {
5
+ private readonly preloaded;
6
+ private readonly configs;
7
+ private warned;
8
+ addPreloadConfigs(...configs: {
9
+ id: string;
10
+ path: string;
11
+ type: Type<unknown>;
12
+ module?: string;
13
+ }[]): void;
14
+ markAsPreloaded(path: string): void;
15
+ preload(paths: string[], ms?: number): void;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgModulePreloaderService, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<NgModulePreloaderService>;
18
+ }
@@ -0,0 +1,12 @@
1
+ import { NavigationBehaviorOptions, UrlTree } from '@angular/router';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SneatNavService {
4
+ private readonly router;
5
+ private readonly location;
6
+ private readonly navController;
7
+ private previous?;
8
+ constructor();
9
+ goBack(url: string | UrlTree, extras?: NavigationBehaviorOptions): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<SneatNavService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<SneatNavService>;
12
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class TopMenuService {
3
+ private $isTopMenuVisible;
4
+ private $isTopMenuHidden;
5
+ readonly isTopMenuVisible: import("rxjs").Observable<boolean>;
6
+ readonly isTopMenuHidden: import("rxjs").Observable<boolean>;
7
+ readonly visibilityChanged: (event: Event) => void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<TopMenuService, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<TopMenuService>;
10
+ }
@@ -0,0 +1 @@
1
+ export type EnumAsUnionOfKeys<TEnum> = keyof TEnum;
@@ -0,0 +1,7 @@
1
+ export interface ISneatExtension {
2
+ id: string;
3
+ title: string;
4
+ emoji: string;
5
+ }
6
+ export declare const defaultFamilyExtension: ISneatExtension[];
7
+ export declare const defaultFamilyMemberExtensions: ISneatExtension[];
package/lib/store.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ export declare const STORE_ID_FIRESTORE = "firestore";
2
+ export declare const STORE_TYPE_FIRESTORE = "firestore";
3
+ export declare const STORE_TYPE_GITHUB = "github";
4
+ export declare const STORE_ID_GITHUB_COM = "github.com";
5
+ export declare const GITLAB_REPO_PREFIX = "gitlab.";
6
+ export declare function storeCanProvideListOfProjects(storeId: string): boolean;
7
+ export type StoreType = 'firestore' | 'agent' | 'browser' | 'github' | 'gitlab';
8
+ export interface IStoreRef {
9
+ type: StoreType;
10
+ id?: string;
11
+ url?: string;
12
+ }
13
+ export declare function storeRefToId(ref: IStoreRef): string;
14
+ export declare function parseStoreRef(storeId?: string): IStoreRef;
@@ -0,0 +1,2 @@
1
+ export declare const SpaceTypeFamily = "family";
2
+ export type SpaceType = 'family' | 'private' | 'company' | 'team' | 'parish' | 'educator' | 'realtor' | 'sport_club' | 'cohabit' | 'unknown';
@@ -0,0 +1,6 @@
1
+ export declare const GenderUndisclosed = "undisclosed";
2
+ export declare const GenderUnknown = "unknown";
3
+ export declare const GenderMale = "male";
4
+ export declare const GenderFemale = "female";
5
+ export declare const GenderOther = "other";
6
+ export type Gender = typeof GenderUndisclosed | typeof GenderUnknown | typeof GenderMale | typeof GenderFemale | typeof GenderOther;
@@ -0,0 +1,7 @@
1
+ export declare function isoStringsToDate(date: string, time?: string): Date;
2
+ export declare function isValidaTimeString(v?: string): boolean;
3
+ export declare function isValidDateString(v?: string): boolean;
4
+ export declare function dateToIso(d: Date): string;
5
+ export declare function localDateToIso(d: Date): string;
6
+ export declare function getWeekStartDate(d: Date, day: number): Date;
7
+ export declare function getWeekID(d: Date): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sneat/core",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -10,5 +10,17 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "tslib": "2.8.1"
13
- }
13
+ },
14
+ "module": "esm2022/sneat-core.js",
15
+ "typings": "sneat-core.d.ts",
16
+ "exports": {
17
+ "./package.json": {
18
+ "default": "./package.json"
19
+ },
20
+ ".": {
21
+ "types": "./sneat-core.d.ts",
22
+ "default": "./esm2022/sneat-core.js"
23
+ }
24
+ },
25
+ "sideEffects": false
14
26
  }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@sneat/core" />
5
+ export * from './index';
package/eslint.config.js DELETED
@@ -1,7 +0,0 @@
1
- const baseConfig = require('../../eslint.config.js');
2
- const { sneatLibConfig } = require('../../eslint.lib.config.js');
3
-
4
- module.exports = [
5
- ...baseConfig,
6
- ...sneatLibConfig(__dirname),
7
- ];
package/ng-package.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/libs/core",
4
- "lib": {
5
- "entryFile": "src/index.ts"
6
- }
7
- }