@ng-atomic/common 0.0.1

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 (206) hide show
  1. package/README.md +7 -0
  2. package/bundles/ng-atomic-common-directives.umd.js +95 -0
  3. package/bundles/ng-atomic-common-directives.umd.js.map +1 -0
  4. package/bundles/ng-atomic-common-directives.umd.min.js +2 -0
  5. package/bundles/ng-atomic-common-directives.umd.min.js.map +1 -0
  6. package/bundles/ng-atomic-common-models.umd.js +11 -0
  7. package/bundles/ng-atomic-common-models.umd.js.map +1 -0
  8. package/bundles/ng-atomic-common-models.umd.min.js +2 -0
  9. package/bundles/ng-atomic-common-models.umd.min.js.map +1 -0
  10. package/bundles/ng-atomic-common-pipes.umd.js +266 -0
  11. package/bundles/ng-atomic-common-pipes.umd.js.map +1 -0
  12. package/bundles/ng-atomic-common-pipes.umd.min.js +2 -0
  13. package/bundles/ng-atomic-common-pipes.umd.min.js.map +1 -0
  14. package/bundles/ng-atomic-common-services.umd.js +429 -0
  15. package/bundles/ng-atomic-common-services.umd.js.map +1 -0
  16. package/bundles/ng-atomic-common-services.umd.min.js +16 -0
  17. package/bundles/ng-atomic-common-services.umd.min.js.map +1 -0
  18. package/bundles/ng-atomic-common-store.umd.js +435 -0
  19. package/bundles/ng-atomic-common-store.umd.js.map +1 -0
  20. package/bundles/ng-atomic-common-store.umd.min.js +16 -0
  21. package/bundles/ng-atomic-common-store.umd.min.js.map +1 -0
  22. package/bundles/ng-atomic-common-utils.umd.js +727 -0
  23. package/bundles/ng-atomic-common-utils.umd.js.map +1 -0
  24. package/bundles/ng-atomic-common-utils.umd.min.js +2 -0
  25. package/bundles/ng-atomic-common-utils.umd.min.js.map +1 -0
  26. package/bundles/ng-atomic-common.umd.js +11 -0
  27. package/bundles/ng-atomic-common.umd.js.map +1 -0
  28. package/bundles/ng-atomic-common.umd.min.js +2 -0
  29. package/bundles/ng-atomic-common.umd.min.js.map +1 -0
  30. package/directives/index.d.ts +1 -0
  31. package/directives/ios-safari-scroll-buggyfill/index.d.ts +2 -0
  32. package/directives/ios-safari-scroll-buggyfill/ios-safari-scroll-buggyfill.directive.d.ts +10 -0
  33. package/directives/ios-safari-scroll-buggyfill/ios-safari-scroll-buggyfill.module.d.ts +8 -0
  34. package/directives/ng-atomic-common-directives.d.ts +5 -0
  35. package/directives/package.json +10 -0
  36. package/esm2015/directives/index.js +2 -0
  37. package/esm2015/directives/index.js.map +1 -0
  38. package/esm2015/directives/ios-safari-scroll-buggyfill/index.js +3 -0
  39. package/esm2015/directives/ios-safari-scroll-buggyfill/index.js.map +1 -0
  40. package/esm2015/directives/ios-safari-scroll-buggyfill/ios-safari-scroll-buggyfill.directive.js +27 -0
  41. package/esm2015/directives/ios-safari-scroll-buggyfill/ios-safari-scroll-buggyfill.directive.js.map +1 -0
  42. package/esm2015/directives/ios-safari-scroll-buggyfill/ios-safari-scroll-buggyfill.module.js +27 -0
  43. package/esm2015/directives/ios-safari-scroll-buggyfill/ios-safari-scroll-buggyfill.module.js.map +1 -0
  44. package/esm2015/directives/ng-atomic-common-directives.js +5 -0
  45. package/esm2015/directives/ng-atomic-common-directives.js.map +1 -0
  46. package/esm2015/index.js +2 -0
  47. package/esm2015/index.js.map +1 -0
  48. package/esm2015/models/action-item.js +2 -0
  49. package/esm2015/models/action-item.js.map +1 -0
  50. package/esm2015/models/index.js +2 -0
  51. package/esm2015/models/index.js.map +1 -0
  52. package/esm2015/models/menu-item.js +2 -0
  53. package/esm2015/models/menu-item.js.map +1 -0
  54. package/esm2015/models/ng-atomic-common-models.js +5 -0
  55. package/esm2015/models/ng-atomic-common-models.js.map +1 -0
  56. package/esm2015/models/public_api.js +3 -0
  57. package/esm2015/models/public_api.js.map +1 -0
  58. package/esm2015/ng-atomic-common.js +5 -0
  59. package/esm2015/ng-atomic-common.js.map +1 -0
  60. package/esm2015/pipes/domain/domain.module.js +27 -0
  61. package/esm2015/pipes/domain/domain.module.js.map +1 -0
  62. package/esm2015/pipes/domain/domain.pipe.js +29 -0
  63. package/esm2015/pipes/domain/domain.pipe.js.map +1 -0
  64. package/esm2015/pipes/domain/index.js +3 -0
  65. package/esm2015/pipes/domain/index.js.map +1 -0
  66. package/esm2015/pipes/index.js +5 -0
  67. package/esm2015/pipes/index.js.map +1 -0
  68. package/esm2015/pipes/ng-atomic-common-pipes.js +5 -0
  69. package/esm2015/pipes/ng-atomic-common-pipes.js.map +1 -0
  70. package/esm2015/pipes/smart-exp/index.js +3 -0
  71. package/esm2015/pipes/smart-exp/index.js.map +1 -0
  72. package/esm2015/pipes/smart-exp/smart-exp.module.js +17 -0
  73. package/esm2015/pipes/smart-exp/smart-exp.module.js.map +1 -0
  74. package/esm2015/pipes/smart-exp/smart-exp.pipe.js +28 -0
  75. package/esm2015/pipes/smart-exp/smart-exp.pipe.js.map +1 -0
  76. package/esm2015/pipes/smart-field/index.js +3 -0
  77. package/esm2015/pipes/smart-field/index.js.map +1 -0
  78. package/esm2015/pipes/smart-field/smart-field.module.js +27 -0
  79. package/esm2015/pipes/smart-field/smart-field.module.js.map +1 -0
  80. package/esm2015/pipes/smart-field/smart-field.pipe.js +33 -0
  81. package/esm2015/pipes/smart-field/smart-field.pipe.js.map +1 -0
  82. package/esm2015/pipes/yen/index.js +3 -0
  83. package/esm2015/pipes/yen/index.js.map +1 -0
  84. package/esm2015/pipes/yen/yen.module.js +27 -0
  85. package/esm2015/pipes/yen/yen.module.js.map +1 -0
  86. package/esm2015/pipes/yen/yen.pipe.js +17 -0
  87. package/esm2015/pipes/yen/yen.pipe.js.map +1 -0
  88. package/esm2015/services/index.js +3 -0
  89. package/esm2015/services/index.js.map +1 -0
  90. package/esm2015/services/loading/index.js +2 -0
  91. package/esm2015/services/loading/index.js.map +1 -0
  92. package/esm2015/services/loading/loading.service.js +32 -0
  93. package/esm2015/services/loading/loading.service.js.map +1 -0
  94. package/esm2015/services/ng-atomic-common-services.js +5 -0
  95. package/esm2015/services/ng-atomic-common-services.js.map +1 -0
  96. package/esm2015/services/snack-bar/index.js +3 -0
  97. package/esm2015/services/snack-bar/index.js.map +1 -0
  98. package/esm2015/services/snack-bar/snack-bar.module.js +25 -0
  99. package/esm2015/services/snack-bar/snack-bar.module.js.map +1 -0
  100. package/esm2015/services/snack-bar/snack-bar.service.js +23 -0
  101. package/esm2015/services/snack-bar/snack-bar.service.js.map +1 -0
  102. package/esm2015/store/entities.page.store.js +30 -0
  103. package/esm2015/store/entities.page.store.js.map +1 -0
  104. package/esm2015/store/entity.page.store.js +41 -0
  105. package/esm2015/store/entity.page.store.js.map +1 -0
  106. package/esm2015/store/index.js +3 -0
  107. package/esm2015/store/index.js.map +1 -0
  108. package/esm2015/store/ng-atomic-common-store.js +5 -0
  109. package/esm2015/store/ng-atomic-common-store.js.map +1 -0
  110. package/esm2015/utils/comma/comma.js +4 -0
  111. package/esm2015/utils/comma/comma.js.map +1 -0
  112. package/esm2015/utils/comma/index.js +2 -0
  113. package/esm2015/utils/comma/index.js.map +1 -0
  114. package/esm2015/utils/compare-by-id/compare-by-id.js +2 -0
  115. package/esm2015/utils/compare-by-id/compare-by-id.js.map +1 -0
  116. package/esm2015/utils/compare-by-id/index.js +2 -0
  117. package/esm2015/utils/compare-by-id/index.js.map +1 -0
  118. package/esm2015/utils/index.js +6 -0
  119. package/esm2015/utils/index.js.map +1 -0
  120. package/esm2015/utils/mat-dayjs-date/dayjs-date.adapter.js +189 -0
  121. package/esm2015/utils/mat-dayjs-date/dayjs-date.adapter.js.map +1 -0
  122. package/esm2015/utils/mat-dayjs-date/dayjs-date.formats.js +15 -0
  123. package/esm2015/utils/mat-dayjs-date/dayjs-date.formats.js.map +1 -0
  124. package/esm2015/utils/mat-dayjs-date/dayjs-date.module.js +42 -0
  125. package/esm2015/utils/mat-dayjs-date/dayjs-date.module.js.map +1 -0
  126. package/esm2015/utils/mat-dayjs-date/dayjs-jp-providers.js +20 -0
  127. package/esm2015/utils/mat-dayjs-date/dayjs-jp-providers.js.map +1 -0
  128. package/esm2015/utils/mat-dayjs-date/index.js +5 -0
  129. package/esm2015/utils/mat-dayjs-date/index.js.map +1 -0
  130. package/esm2015/utils/ng-atomic-common-utils.js +5 -0
  131. package/esm2015/utils/ng-atomic-common-utils.js.map +1 -0
  132. package/esm2015/utils/query/index.js +2 -0
  133. package/esm2015/utils/query/index.js.map +1 -0
  134. package/esm2015/utils/query/query.resolver.js +59 -0
  135. package/esm2015/utils/query/query.resolver.js.map +1 -0
  136. package/esm2015/utils/to-object/index.js +2 -0
  137. package/esm2015/utils/to-object/index.js.map +1 -0
  138. package/esm2015/utils/to-object/to-object.js +10 -0
  139. package/esm2015/utils/to-object/to-object.js.map +1 -0
  140. package/fesm2015/ng-atomic-common-directives.js +58 -0
  141. package/fesm2015/ng-atomic-common-directives.js.map +1 -0
  142. package/fesm2015/ng-atomic-common-models.js +4 -0
  143. package/fesm2015/ng-atomic-common-models.js.map +1 -0
  144. package/fesm2015/ng-atomic-common-pipes.js +191 -0
  145. package/fesm2015/ng-atomic-common-pipes.js.map +1 -0
  146. package/fesm2015/ng-atomic-common-services.js +80 -0
  147. package/fesm2015/ng-atomic-common-services.js.map +1 -0
  148. package/fesm2015/ng-atomic-common-store.js +74 -0
  149. package/fesm2015/ng-atomic-common-store.js.map +1 -0
  150. package/fesm2015/ng-atomic-common-utils.js +340 -0
  151. package/fesm2015/ng-atomic-common-utils.js.map +1 -0
  152. package/fesm2015/ng-atomic-common.js +4 -0
  153. package/fesm2015/ng-atomic-common.js.map +1 -0
  154. package/index.d.ts +1 -0
  155. package/models/action-item.d.ts +6 -0
  156. package/models/index.d.ts +1 -0
  157. package/models/menu-item.d.ts +4 -0
  158. package/models/ng-atomic-common-models.d.ts +5 -0
  159. package/models/package.json +10 -0
  160. package/models/public_api.d.ts +2 -0
  161. package/ng-atomic-common.d.ts +5 -0
  162. package/package.json +21 -0
  163. package/pipes/domain/domain.module.d.ts +8 -0
  164. package/pipes/domain/domain.pipe.d.ts +11 -0
  165. package/pipes/domain/index.d.ts +2 -0
  166. package/pipes/index.d.ts +4 -0
  167. package/pipes/ng-atomic-common-pipes.d.ts +5 -0
  168. package/pipes/package.json +10 -0
  169. package/pipes/smart-exp/index.d.ts +2 -0
  170. package/pipes/smart-exp/smart-exp.module.d.ts +7 -0
  171. package/pipes/smart-exp/smart-exp.pipe.d.ts +7 -0
  172. package/pipes/smart-field/index.d.ts +2 -0
  173. package/pipes/smart-field/smart-field.module.d.ts +8 -0
  174. package/pipes/smart-field/smart-field.pipe.d.ts +31 -0
  175. package/pipes/yen/index.d.ts +2 -0
  176. package/pipes/yen/yen.module.d.ts +8 -0
  177. package/pipes/yen/yen.pipe.d.ts +7 -0
  178. package/services/index.d.ts +2 -0
  179. package/services/loading/index.d.ts +1 -0
  180. package/services/loading/loading.service.d.ts +14 -0
  181. package/services/ng-atomic-common-services.d.ts +5 -0
  182. package/services/package.json +10 -0
  183. package/services/snack-bar/index.d.ts +2 -0
  184. package/services/snack-bar/snack-bar.module.d.ts +8 -0
  185. package/services/snack-bar/snack-bar.service.d.ts +9 -0
  186. package/store/entities.page.store.d.ts +32 -0
  187. package/store/entity.page.store.d.ts +28 -0
  188. package/store/index.d.ts +2 -0
  189. package/store/ng-atomic-common-store.d.ts +5 -0
  190. package/store/package.json +10 -0
  191. package/utils/comma/comma.d.ts +3 -0
  192. package/utils/comma/index.d.ts +1 -0
  193. package/utils/compare-by-id/compare-by-id.d.ts +4 -0
  194. package/utils/compare-by-id/index.d.ts +1 -0
  195. package/utils/index.d.ts +5 -0
  196. package/utils/mat-dayjs-date/dayjs-date.adapter.d.ts +60 -0
  197. package/utils/mat-dayjs-date/dayjs-date.formats.d.ts +5 -0
  198. package/utils/mat-dayjs-date/dayjs-date.module.d.ts +11 -0
  199. package/utils/mat-dayjs-date/dayjs-jp-providers.d.ts +10 -0
  200. package/utils/mat-dayjs-date/index.d.ts +4 -0
  201. package/utils/ng-atomic-common-utils.d.ts +5 -0
  202. package/utils/package.json +10 -0
  203. package/utils/query/index.d.ts +1 -0
  204. package/utils/query/query.resolver.d.ts +1 -0
  205. package/utils/to-object/index.d.ts +1 -0
  206. package/utils/to-object/to-object.d.ts +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/common/pipes/smart-exp/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export * from './smart-exp.pipe';\nexport { SmartExpModule } from './smart-exp.module';"]}
@@ -0,0 +1,17 @@
1
+ import { NgModule } from "@angular/core";
2
+ import { SmartExpPipe } from "./smart-exp.pipe";
3
+ import * as i0 from "@angular/core";
4
+ export class SmartExpModule {
5
+ }
6
+ SmartExpModule.ɵfac = function SmartExpModule_Factory(t) { return new (t || SmartExpModule)(); };
7
+ SmartExpModule.ɵmod = i0.ɵɵdefineNgModule({ type: SmartExpModule });
8
+ SmartExpModule.ɵinj = i0.ɵɵdefineInjector({});
9
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SmartExpModule, { declarations: [SmartExpPipe], exports: [SmartExpPipe] }); })();
10
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SmartExpModule, [{
11
+ type: NgModule,
12
+ args: [{
13
+ declarations: [SmartExpPipe],
14
+ exports: [SmartExpPipe]
15
+ }]
16
+ }], null, null); })();
17
+ //# sourceMappingURL=smart-exp.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smart-exp.module.js","sourceRoot":"","sources":["../../../../../../libs/common/pipes/smart-exp/smart-exp.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;;AAMhD,MAAM,OAAO,cAAc;;4EAAd,cAAc;kDAAd,cAAc;;wFAAd,cAAc,mBAHV,YAAY,aACjB,YAAY;uFAEX,cAAc;cAJ1B,QAAQ;eAAC;gBACR,YAAY,EAAE,CAAC,YAAY,CAAC;gBAC5B,OAAO,EAAE,CAAC,YAAY,CAAC;aACxB","sourcesContent":["import { NgModule } from \"@angular/core\";\nimport { SmartExpPipe } from \"./smart-exp.pipe\";\n\n@NgModule({\n declarations: [SmartExpPipe],\n exports: [SmartExpPipe]\n})\nexport class SmartExpModule { }"]}
@@ -0,0 +1,28 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as dayjs from 'dayjs';
3
+ import { YenPipe } from '../yen/yen.pipe';
4
+ import * as i0 from "@angular/core";
5
+ export class SmartExpPipe {
6
+ transform(input, key) {
7
+ if (dayjs.isDayjs(input)) {
8
+ return input.format('YY/MM/DD');
9
+ }
10
+ else if (Array.isArray(input)) {
11
+ return `${input.length}個のアイテム`;
12
+ }
13
+ else if (typeof input === 'number' && input > 10000) {
14
+ return new YenPipe().transform(input);
15
+ }
16
+ return input;
17
+ }
18
+ }
19
+ SmartExpPipe.ɵfac = function SmartExpPipe_Factory(t) { return new (t || SmartExpPipe)(); };
20
+ SmartExpPipe.ɵpipe = i0.ɵɵngDeclarePipe({ version: "11.2.14", ngImport: i0, type: SmartExpPipe, name: "smartExp" });
21
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SmartExpPipe, [{
22
+ type: Pipe,
23
+ args: [{
24
+ name: 'smartExp',
25
+ pure: true,
26
+ }]
27
+ }], null, null); })();
28
+ //# sourceMappingURL=smart-exp.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smart-exp.pipe.js","sourceRoot":"","sources":["../../../../../../libs/common/pipes/smart-exp/smart-exp.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;;AAM1C,MAAM,OAAO,YAAY;IACvB,SAAS,CAAC,KAA0C,EAAE,GAAY;QAChE,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACxB,OAAO,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;SACjC;aAAM,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YAC/B,OAAO,GAAG,KAAK,CAAC,MAAM,QAAQ,CAAC;SAChC;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,GAAG,KAAM,EAAE;YACtD,OAAO,IAAI,OAAO,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;SACvC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;;wEAVU,YAAY;kFAAZ,YAAY;uFAAZ,YAAY;cAJxB,IAAI;eAAC;gBACJ,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,IAAI;aACX","sourcesContent":["import { Pipe } from '@angular/core';\nimport * as dayjs from 'dayjs';\nimport { YenPipe } from '../yen/yen.pipe';\n\n@Pipe({\n name: 'smartExp',\n pure: true,\n})\nexport class SmartExpPipe {\n transform(input: string | number | dayjs.Dayjs | any, key?: string): string {\n if (dayjs.isDayjs(input)) {\n return input.format('YY/MM/DD');\n } else if (Array.isArray(input)) {\n return `${input.length}個のアイテム`;\n } else if (typeof input === 'number' && input > 10_000) {\n return new YenPipe().transform(input);\n }\n return input;\n }\n}"]}
@@ -0,0 +1,3 @@
1
+ export * from './smart-field.pipe';
2
+ export * from './smart-field.module';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/common/pipes/smart-field/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC","sourcesContent":["export * from './smart-field.pipe';\nexport * from './smart-field.module';"]}
@@ -0,0 +1,27 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { SmartFieldPipe } from './smart-field.pipe';
4
+ import * as i0 from "@angular/core";
5
+ export class SmartFieldModule {
6
+ }
7
+ SmartFieldModule.ɵfac = function SmartFieldModule_Factory(t) { return new (t || SmartFieldModule)(); };
8
+ SmartFieldModule.ɵmod = i0.ɵɵdefineNgModule({ type: SmartFieldModule });
9
+ SmartFieldModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
10
+ CommonModule
11
+ ]] });
12
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SmartFieldModule, { declarations: [SmartFieldPipe], imports: [CommonModule], exports: [SmartFieldPipe] }); })();
13
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SmartFieldModule, [{
14
+ type: NgModule,
15
+ args: [{
16
+ declarations: [
17
+ SmartFieldPipe
18
+ ],
19
+ imports: [
20
+ CommonModule
21
+ ],
22
+ exports: [
23
+ SmartFieldPipe
24
+ ]
25
+ }]
26
+ }], null, null); })();
27
+ //# sourceMappingURL=smart-field.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smart-field.module.js","sourceRoot":"","sources":["../../../../../../libs/common/pipes/smart-field/smart-field.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;;AAepD,MAAM,OAAO,gBAAgB;;gFAAhB,gBAAgB;oDAAhB,gBAAgB;wDAPlB;YACP,YAAY;SACb;wFAKU,gBAAgB,mBATzB,cAAc,aAGd,YAAY,aAGZ,cAAc;uFAGL,gBAAgB;cAX5B,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,cAAc;iBACf;gBACD,OAAO,EAAE;oBACP,YAAY;iBACb;gBACD,OAAO,EAAE;oBACP,cAAc;iBACf;aACF","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SmartFieldPipe } from './smart-field.pipe';\n\n\n\n@NgModule({\n declarations: [\n SmartFieldPipe\n ],\n imports: [\n CommonModule\n ],\n exports: [\n SmartFieldPipe\n ]\n})\nexport class SmartFieldModule { }\n"]}
@@ -0,0 +1,33 @@
1
+ import { Inject, InjectionToken, Optional, Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export const FORM_FIELD_MAP = new InjectionToken('[@ng-atomic] Smart Form Field');
4
+ export class SmartFieldPipe {
5
+ constructor(map) {
6
+ var _a;
7
+ this.map = map;
8
+ (_a = this.map) !== null && _a !== void 0 ? _a : (this.map = {
9
+ createdAt: { type: 'date' },
10
+ updatedAt: { type: 'date' },
11
+ deletedAt: { type: 'date' },
12
+ });
13
+ }
14
+ transform(key) {
15
+ var _a;
16
+ return (_a = this.map[key]) !== null && _a !== void 0 ? _a : { type: 'input' };
17
+ }
18
+ }
19
+ SmartFieldPipe.ɵfac = function SmartFieldPipe_Factory(t) { return new (t || SmartFieldPipe)(i0.ɵɵdirectiveInject(FORM_FIELD_MAP, 8)); };
20
+ SmartFieldPipe.ɵpipe = i0.ɵɵngDeclarePipe({ version: "11.2.14", ngImport: i0, type: SmartFieldPipe, name: "smartField" });
21
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SmartFieldPipe, [{
22
+ type: Pipe,
23
+ args: [{
24
+ name: 'smartField',
25
+ pure: true,
26
+ }]
27
+ }], function () { return [{ type: undefined, decorators: [{
28
+ type: Optional
29
+ }, {
30
+ type: Inject,
31
+ args: [FORM_FIELD_MAP]
32
+ }] }]; }, null); })();
33
+ //# sourceMappingURL=smart-field.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"smart-field.pipe.js","sourceRoot":"","sources":["../../../../../../libs/common/pipes/smart-field/smart-field.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;;AAgCtF,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,CAAe,+BAA+B,CAAC,CAAC;AAMhG,MAAM,OAAO,cAAc;IAEzB,YAC8C,GAAmC;;QAAnC,QAAG,GAAH,GAAG,CAAgC;QAE/E,MAAA,IAAI,CAAC,GAAG,oCAAR,IAAI,CAAC,GAAG,GAAK;YACX,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YAC3B,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YAC3B,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SAC5B,EAAC;IACJ,CAAC;IAED,SAAS,CAAC,GAAW;;QACnB,aAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,mCAAI,EAAC,IAAI,EAAE,OAAO,EAAC,CAAC;IAC1C,CAAC;;4EAdU,cAAc,uBAGH,cAAc;oFAHzB,cAAc;uFAAd,cAAc;cAJ1B,IAAI;eAAC;gBACJ,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE,IAAI;aACX;;sBAII,QAAQ;;sBAAI,MAAM;uBAAC,cAAc","sourcesContent":["import { Inject, InjectionToken, Optional, Pipe, PipeTransform } from '@angular/core';\n\ninterface Option<T> {\n name: string;\n value: T;\n}\n\ninterface InputField {\n type: 'input';\n}\n\ninterface DateInputField {\n type: 'date';\n}\n\ninterface SelectField<T> {\n type: 'select';\n options: Option<T>[];\n}\n\ninterface MultiSelectField<T> {\n type: 'multi-select';\n options: Option<T>[];\n}\n\ntype FormField<V> = InputField\n | DateInputField\n | SelectField<V>\n | MultiSelectField<V>;\n\nexport type FormFieldMap = Record<string, FormField<any>>;\n\nexport const FORM_FIELD_MAP = new InjectionToken<FormFieldMap>('[@ng-atomic] Smart Form Field');\n\n@Pipe({\n name: 'smartField',\n pure: true,\n})\nexport class SmartFieldPipe implements PipeTransform {\n\n constructor(\n @Optional() @Inject(FORM_FIELD_MAP) private map: Record<string, FormField<any>>\n ) {\n this.map ??= {\n createdAt: { type: 'date' },\n updatedAt: { type: 'date' },\n deletedAt: { type: 'date' },\n };\n }\n\n transform(key: string): FormField<any> {\n return this.map[key] ?? {type: 'input'};\n }\n\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export * from './yen.pipe';
2
+ export * from './yen.module';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/common/pipes/yen/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC","sourcesContent":["export * from './yen.pipe';\nexport * from './yen.module';"]}
@@ -0,0 +1,27 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { YenPipe } from './yen.pipe';
4
+ import * as i0 from "@angular/core";
5
+ export class YenModule {
6
+ }
7
+ YenModule.ɵfac = function YenModule_Factory(t) { return new (t || YenModule)(); };
8
+ YenModule.ɵmod = i0.ɵɵdefineNgModule({ type: YenModule });
9
+ YenModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
10
+ CommonModule
11
+ ]] });
12
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(YenModule, { declarations: [YenPipe], imports: [CommonModule], exports: [YenPipe] }); })();
13
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(YenModule, [{
14
+ type: NgModule,
15
+ args: [{
16
+ declarations: [
17
+ YenPipe
18
+ ],
19
+ imports: [
20
+ CommonModule
21
+ ],
22
+ exports: [
23
+ YenPipe
24
+ ]
25
+ }]
26
+ }], null, null); })();
27
+ //# sourceMappingURL=yen.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yen.module.js","sourceRoot":"","sources":["../../../../../../libs/common/pipes/yen/yen.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;;AAerC,MAAM,OAAO,SAAS;;kEAAT,SAAS;6CAAT,SAAS;iDAPX;YACP,YAAY;SACb;wFAKU,SAAS,mBATlB,OAAO,aAGP,YAAY,aAGZ,OAAO;uFAGE,SAAS;cAXrB,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,OAAO;iBACR;gBACD,OAAO,EAAE;oBACP,YAAY;iBACb;gBACD,OAAO,EAAE;oBACP,OAAO;iBACR;aACF","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { YenPipe } from './yen.pipe';\n\n\n\n@NgModule({\n declarations: [\n YenPipe\n ],\n imports: [\n CommonModule\n ],\n exports: [\n YenPipe\n ]\n})\nexport class YenModule { }\n"]}
@@ -0,0 +1,17 @@
1
+ import { Pipe } from '@angular/core';
2
+ import { comma } from '@ng-atomic/common/utils';
3
+ import * as i0 from "@angular/core";
4
+ export class YenPipe {
5
+ transform(value, _unit) {
6
+ return value < 1 ? `${comma(value * 100)}%` : `${comma(value)}円`;
7
+ }
8
+ }
9
+ YenPipe.ɵfac = function YenPipe_Factory(t) { return new (t || YenPipe)(); };
10
+ YenPipe.ɵpipe = i0.ɵɵngDeclarePipe({ version: "11.2.14", ngImport: i0, type: YenPipe, name: "yen" });
11
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(YenPipe, [{
12
+ type: Pipe,
13
+ args: [{
14
+ name: 'yen'
15
+ }]
16
+ }], null, null); })();
17
+ //# sourceMappingURL=yen.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"yen.pipe.js","sourceRoot":"","sources":["../../../../../../libs/common/pipes/yen/yen.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;;AAKhD,MAAM,OAAO,OAAO;IAElB,SAAS,CAAC,KAAa,EAAE,KAAc;QACrC,OAAO,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC;IACnE,CAAC;;8DAJU,OAAO;6EAAP,OAAO;uFAAP,OAAO;cAHnB,IAAI;eAAC;gBACJ,IAAI,EAAE,KAAK;aACZ","sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\nimport { comma } from '@ng-atomic/common/utils';\n\n@Pipe({\n name: 'yen'\n})\nexport class YenPipe implements PipeTransform {\n\n transform(value: number, _unit?: string): string {\n return value < 1 ? `${comma(value * 100)}%` : `${comma(value)}円`;\n }\n\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export * from './loading';
2
+ export * from './snack-bar';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/common/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC","sourcesContent":["export * from './loading';\nexport * from './snack-bar';\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './loading.service';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/common/services/loading/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC","sourcesContent":["export * from './loading.service';\n"]}
@@ -0,0 +1,32 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { Subject } from 'rxjs';
3
+ import { scan, map, distinctUntilChanged, delay } from 'rxjs/operators';
4
+ import * as i0 from "@angular/core";
5
+ export class LoadingService {
6
+ constructor() {
7
+ this.loadingEntries$ = new Subject();
8
+ this.loadingMap = {};
9
+ this.loadingMap$ = this.loadingEntries$.pipe(scan((pre, [key, value]) => (Object.assign(Object.assign({}, pre), { [key]: value })), {}), map((m) => Object.entries(m)
10
+ .filter(([k, v]) => v)
11
+ .reduce((p, [k, v]) => (Object.assign(Object.assign({}, p), { [k]: v })), {})), distinctUntilChanged((pre, cur) => JSON.stringify(pre) === JSON.stringify(cur)));
12
+ this.isLoading$ = this.loadingMap$.pipe(map((m) => !!Object.keys(m).length), delay(0));
13
+ this.loadingMap$.subscribe((m) => {
14
+ this.loadingMap = m;
15
+ });
16
+ }
17
+ setKey(key) {
18
+ this.loadingEntries$.next([key, true]);
19
+ }
20
+ removeKey(key) {
21
+ this.loadingEntries$.next([key, false]);
22
+ }
23
+ }
24
+ LoadingService.ɵfac = function LoadingService_Factory(t) { return new (t || LoadingService)(); };
25
+ LoadingService.ɵprov = i0.ɵɵdefineInjectable({ token: LoadingService, factory: LoadingService.ɵfac, providedIn: 'root' });
26
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadingService, [{
27
+ type: Injectable,
28
+ args: [{
29
+ providedIn: 'root',
30
+ }]
31
+ }], function () { return []; }, null); })();
32
+ //# sourceMappingURL=loading.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loading.service.js","sourceRoot":"","sources":["../../../../../../libs/common/services/loading/loading.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;;AAOxE,MAAM,OAAO,cAAc;IAiBzB;QAhBQ,oBAAe,GAAG,IAAI,OAAO,EAAqB,CAAC;QAE3D,eAAU,GAAe,EAAE,CAAC;QAC5B,gBAAW,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CACrC,IAAI,CAAC,CAAC,GAAG,EA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AAc,WAAd,cAAc,mBAFb,MAAM;uFAEP,cAAc;cAH1B,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { scan, map, distinctUntilChanged, delay } from 'rxjs/operators';\n\ntype LoadingMap = Record<string, boolean>;\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LoadingService {\n private loadingEntries$ = new Subject<[string, boolean]>();\n\n loadingMap: LoadingMap = {};\n loadingMap$ = this.loadingEntries$.pipe(\n scan((pre, [key, value]) => ({ ...pre, [key]: value }), {} as LoadingMap),\n map((m: LoadingMap) => Object.entries(m)\n .filter(([k, v]: [string, boolean]) => v)\n .reduce((p, [k, v]) => ({ ...p, [k]: v }), {} as LoadingMap)),\n distinctUntilChanged((pre, cur) => JSON.stringify(pre) === JSON.stringify(cur)),\n );\n\n isLoading$ = this.loadingMap$.pipe(\n map((m) => !!Object.keys(m).length),\n delay(0),\n );\n\n constructor() {\n this.loadingMap$.subscribe((m) => {\n this.loadingMap = m;\n });\n }\n\n setKey(key: string): void {\n this.loadingEntries$.next([key, true]);\n }\n\n removeKey(key: string): void {\n this.loadingEntries$.next([key, false]);\n }\n}\n"]}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=ng-atomic-common-services.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-atomic-common-services.js","sourceRoot":"","sources":["../../../../../libs/common/services/ng-atomic-common-services.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,3 @@
1
+ export * from './snack-bar.service';
2
+ export * from './snack-bar.module';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/common/services/snack-bar/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC","sourcesContent":["export * from './snack-bar.service';\nexport * from './snack-bar.module';"]}
@@ -0,0 +1,25 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { MatSnackBarModule } from '@angular/material/snack-bar';
4
+ import * as i0 from "@angular/core";
5
+ export class SnackBarModule {
6
+ }
7
+ SnackBarModule.ɵfac = function SnackBarModule_Factory(t) { return new (t || SnackBarModule)(); };
8
+ SnackBarModule.ɵmod = i0.ɵɵdefineNgModule({ type: SnackBarModule });
9
+ SnackBarModule.ɵinj = i0.ɵɵdefineInjector({ imports: [[
10
+ CommonModule,
11
+ MatSnackBarModule
12
+ ]] });
13
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(SnackBarModule, { imports: [CommonModule,
14
+ MatSnackBarModule] }); })();
15
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SnackBarModule, [{
16
+ type: NgModule,
17
+ args: [{
18
+ declarations: [],
19
+ imports: [
20
+ CommonModule,
21
+ MatSnackBarModule
22
+ ]
23
+ }]
24
+ }], null, null); })();
25
+ //# sourceMappingURL=snack-bar.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snack-bar.module.js","sourceRoot":"","sources":["../../../../../../libs/common/services/snack-bar/snack-bar.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;;AAShE,MAAM,OAAO,cAAc;;4EAAd,cAAc;kDAAd,cAAc;sDALhB;YACP,YAAY;YACZ,iBAAiB;SAClB;wFAEU,cAAc,cAJvB,YAAY;QACZ,iBAAiB;uFAGR,cAAc;cAP1B,QAAQ;eAAC;gBACR,YAAY,EAAE,EAAE;gBAChB,OAAO,EAAE;oBACP,YAAY;oBACZ,iBAAiB;iBAClB;aACF","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n MatSnackBarModule\n ]\n})\nexport class SnackBarModule { }\n"]}
@@ -0,0 +1,23 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { MatSnackBar } from '@angular/material/snack-bar';
3
+ import * as i0 from "@angular/core";
4
+ import * as i1 from "@angular/material/snack-bar";
5
+ export class SnackBarService {
6
+ constructor(snackBar) {
7
+ this.snackBar = snackBar;
8
+ }
9
+ openSnackBar(message, action) {
10
+ this.snackBar.open(message, action, {
11
+ duration: 2000,
12
+ });
13
+ }
14
+ }
15
+ SnackBarService.ɵfac = function SnackBarService_Factory(t) { return new (t || SnackBarService)(i0.ɵɵinject(i1.MatSnackBar)); };
16
+ SnackBarService.ɵprov = i0.ɵɵdefineInjectable({ token: SnackBarService, factory: SnackBarService.ɵfac, providedIn: 'root' });
17
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SnackBarService, [{
18
+ type: Injectable,
19
+ args: [{
20
+ providedIn: 'root'
21
+ }]
22
+ }], function () { return [{ type: i1.MatSnackBar }]; }, null); })();
23
+ //# sourceMappingURL=snack-bar.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snack-bar.service.js","sourceRoot":"","sources":["../../../../../../libs/common/services/snack-bar/snack-bar.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;;;AAK1D,MAAM,OAAO,eAAe;IAE1B,YAAoB,QAAqB;QAArB,aAAQ,GAAR,QAAQ,CAAa;IAAG,CAAC;IAE7C,YAAY,CAAC,OAAe,EAAE,MAAe;QAC3C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE;YAClC,QAAQ,EAAE,IAAI;SACf,CAAC,CAAC;IACL,CAAC;;8EARU,eAAe;uDAAf,eAAe,WAAf,eAAe,mBAFd,MAAM;uFAEP,eAAe;cAH3B,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB","sourcesContent":["import { Injectable } from '@angular/core';\n\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SnackBarService {\n\n constructor(private snackBar: MatSnackBar) {}\n\n openSnackBar(message: string, action?: string) {\n this.snackBar.open(message, action, {\n duration: 2000,\n });\n }\n}\n"]}
@@ -0,0 +1,30 @@
1
+ import { ComponentStore } from '@ngrx/component-store';
2
+ // import { Page } from '../components/templates/smart-index';
3
+ import { filterByQuery } from '@ng-atomic/common/utils';
4
+ import { compareById } from '@ng-atomic/common/utils';
5
+ import { distinctUntilChanged, tap, map, filter, switchMap } from 'rxjs/operators';
6
+ export class EntitiesPageStore extends ComponentStore {
7
+ constructor(initialState) {
8
+ super(initialState);
9
+ this.userId$ = this.select(state => state.userId).pipe(filter(userId => !!userId));
10
+ this.entities$ = this.select(({ query, entities }) => filterByQuery(entities, query, this.LANG_MAP))
11
+ .pipe(map((entities) => entities.sort(compareById)))
12
+ .pipe(distinctUntilChanged((pre, cur) => JSON.stringify(pre) === JSON.stringify(cur)));
13
+ this.setUserId = this.updater((state, userId) => (Object.assign(Object.assign({}, state), { userId })));
14
+ this.setEntities = this.updater((state, entities) => (Object.assign(Object.assign({}, state), { entities })));
15
+ this.setPage = this.updater((state, page) => (Object.assign(Object.assign({}, state), { page })));
16
+ this.setIdSet = this.updater((state, idSet) => (Object.assign(Object.assign({}, state), { idSet })));
17
+ this.addId = this.updater((state, id) => (Object.assign(Object.assign({}, state), { idSet: new Set([...state.idSet, id]) })));
18
+ this.removeId = this.updater((state, id) => {
19
+ return Object.assign(Object.assign({}, state), { idSet: new Set([...state.idSet].filter(_id => _id !== id)) });
20
+ });
21
+ this.setQuery = this.updater((state, query) => (Object.assign(Object.assign({}, state), { query })));
22
+ this.getPage = this.effect((entities$) => entities$.pipe(tap(({ length }) => this.setPage(this.page.patch({ length })))));
23
+ this.getEntities = this.effect((userId$) => userId$.pipe(filter(userId => !!userId), tap(() => this.loading.setKey('[/entities] Get Entities')), switchMap(() => this._getEntities()), tap((entities) => this.setEntities(entities)), tap(() => this.loading.removeKey('[/entities] Get Entities'))));
24
+ this.getPage(this.entities$);
25
+ this.getEntities(this.userId$);
26
+ }
27
+ get page() { return this.get(state => state.page); }
28
+ get idSet() { return this.get(state => state.idSet); }
29
+ }
30
+ //# sourceMappingURL=entities.page.store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entities.page.store.js","sourceRoot":"","sources":["../../../../../libs/common/store/entities.page.store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,8DAA8D;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,oBAAoB,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAYnF,MAAM,OAAgB,iBAA0E,SAAQ,cAAiB;IAWvH,YAAY,YAAe;QACzB,KAAK,CAAC,YAAY,CAAC,CAAC;QANtB,YAAO,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;QAC9E,cAAS,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,EAAC,KAAK,EAAE,QAAQ,EAAC,EAAE,EAAE,CAAC,aAAa,CAAC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,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC1D,IAAI,KAAK,KAAkB,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;CAqCpE","sourcesContent":["import { ComponentStore } from '@ngrx/component-store';\nimport { LoadingService } from '@ng-atomic/common/services';\n// import { Page } from '../components/templates/smart-index';\nimport { filterByQuery } from '@ng-atomic/common/utils';\nimport { compareById } from '@ng-atomic/common/utils';\nimport { Observable } from 'rxjs';\nimport { distinctUntilChanged, tap, map, filter, switchMap } from 'rxjs/operators';\n\nexport type Page = any\n\nexport interface EntitiesPageState<E> {\n userId: string; \n idSet: Set<string>;\n query: string;\n entities: E[]\n page: Page;\n}\n\nexport abstract class EntitiesPageStore<S extends EntitiesPageState<E>, E extends {id: string}> extends ComponentStore<S> {\n abstract LANG_MAP: Record<string, string>;\n\n get page(): Page { return this.get(state => state.page); }\n get idSet(): Set<string> { return this.get(state => state.idSet); }\n\n userId$ = this.select(state => state.userId).pipe(filter(userId => !!userId));\n entities$ = this.select(({query, entities}) => filterByQuery(entities, query, this.LANG_MAP))\n .pipe(map((entities: E[]) => entities.sort(compareById)))\n .pipe(distinctUntilChanged((pre, cur) => JSON.stringify(pre) === JSON.stringify(cur)));\n\n constructor(initialState: S) {\n super(initialState);\n this.getPage(this.entities$);\n this.getEntities(this.userId$);\n }\n\n setUserId = this.updater((state, userId: string) => ({...state, userId}));\n setEntities = this.updater((state, entities: E[]) => ({...state, entities}));\n setPage = this.updater((state, page: Page) => ({...state, page}));\n setIdSet = this.updater((state, idSet: Set<string>) => ({...state, idSet}));\n addId = this.updater((state, id: string) => ({...state, idSet: new Set([...state.idSet, id])}));\n removeId = this.updater((state, id: string) => {\n return {...state, idSet: new Set([...state.idSet].filter(_id => _id !== id))}\n });\n setQuery = this.updater((state, query: string) => ({...state, query}));\n\n getPage = this.effect((entities$: Observable<E[]>) => entities$.pipe(\n tap(({length}: E[]) => this.setPage(this.page.patch({length}))),\n ));\n\n getEntities = this.effect((userId$: Observable<string>) => userId$.pipe(\n filter(userId => !!userId),\n tap(() => this.loading.setKey('[/entities] Get Entities')),\n switchMap(() => this._getEntities()),\n tap((entities: E[]) => this.setEntities(entities)),\n tap(() => this.loading.removeKey('[/entities] Get Entities')),\n )); \n\n abstract _getEntities(): Observable<E[]>;\n abstract loading: LoadingService;\n}"]}
@@ -0,0 +1,41 @@
1
+ import { __awaiter } from "tslib";
2
+ import { ComponentStore } from '@ngrx/component-store';
3
+ import { filter, switchMap, tap } from 'rxjs/operators';
4
+ const tryCatch = (promise) => new Promise((resolve, reject) => __awaiter(void 0, void 0, void 0, function* () {
5
+ try {
6
+ resolve(yield promise);
7
+ }
8
+ catch (error) {
9
+ reject(error);
10
+ }
11
+ }));
12
+ export class EntityPageStore extends ComponentStore {
13
+ constructor(initialState) {
14
+ super(initialState);
15
+ this.mode$ = this.select(state => state.mode);
16
+ this.entityId$ = this.select(state => state.entityId).pipe(filter(id => !!id));
17
+ this.entity$ = this.select(state => state.entity);
18
+ this.setMode = this.updater((state, mode) => (Object.assign(Object.assign({}, state), { mode })));
19
+ this.setEntityId = this.updater((state, entityId) => (Object.assign(Object.assign({}, state), { entityId })));
20
+ this.setEntity = this.updater((state, entity) => (Object.assign(Object.assign({}, state), { entity })));
21
+ this.getEntityIdAndMode = this.effect((entityId$) => entityId$.pipe(tap(id => this.setMode(id === 'new' ? 'create' : 'update')), filter(id => id !== 'new'), tap((id) => this.setEntityId(id))));
22
+ this.getEntity = this.effect((entityId$) => entityId$.pipe(switchMap(id => this._getEntity(id)), tap((entity) => this.setEntity(entity))));
23
+ this.getEntity(this.entityId$);
24
+ }
25
+ get entity() { return this.get().entity; }
26
+ createEntity(value) {
27
+ const entity = (Object.assign(Object.assign({}, this.entity), value));
28
+ this.loading.setKey('[pages/stores/pages/store] Create Store');
29
+ return tryCatch(this._createEntity(entity))
30
+ .catch(error => (console.error(error), this.snackBar.openSnackBar('作成に失敗しました。')))
31
+ .finally(() => this.loading.removeKey('[pages/stores/pages/store] Create Store'));
32
+ }
33
+ updateEntity(value) {
34
+ const entity = (Object.assign(Object.assign({}, this.entity), value));
35
+ this.loading.setKey('[pages/stores/pages/store] Create Store');
36
+ return this._updateEntity(entity)
37
+ .catch(error => (console.error(error), this.snackBar.openSnackBar('更新に失敗しました。')))
38
+ .finally(() => this.loading.removeKey('[pages/stores/pages/store] Create Store'));
39
+ }
40
+ }
41
+ //# sourceMappingURL=entity.page.store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity.page.store.js","sourceRoot":"","sources":["../../../../../libs/common/store/entity.page.store.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAUxD,MAAM,QAAQ,GAAG,CAAC,OAAqB,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAO,OAAO,EAAE,MAAM,EAAE,EAAE;IAChF,IAAI;QAAE,OAAO,CAAC,MAAM,OAAO,CAAC,CAAC;KAAE;IAAC,OAAO,KAAK,EAAE;QAAE,MAAM,CAAC,KAAK,CAAC,CAAC;KAAE;AAClE,CAAC,CAAA,CAAC,CAAC;AAEH,MAAM,OAAgB,eAA2D,SAAQ,cAAiB;IAWxG,YAAY,YAAgB;QAC1B,KAAK,CAAC,YAAY,CAAC,CAAC;QATtB,UAAK,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACzC,cAAS,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAC1E,YAAO,GAAG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ACjC,CAAC;IAbD,IAAI,MAAM,KAAK,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAA,CAAA,CAAC;IA4BxC,YAAY,CAAC,KAAsB;QACjC,MAAM,MAAM,GAAW,iCAAK,IAAI,CAAC,MAAM,GAAK,KAAK,EAAE,CAAC;QAEpD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,yCAAyC,CAAC,CAAC;QAE/D,OAAO,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;aACxC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC;aAChF,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,yCAAyC,CAAC,CAAC,CAAC;IACtF,CAAC;IAED,YAAY,CAAC,KAAsB;QACjC,MAAM,MAAM,GAAW,iCAAK,IAAI,CAAC,MAAM,GAAK,KAAK,EAAE,CAAC;QAEpD,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,yCAAyC,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;aAC9B,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC;aAChF,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,yCAAyC,CAAC,CAAC,CAAC;IACtF,CAAC;CASF","sourcesContent":["import { ComponentStore } from '@ngrx/component-store';\nimport { LoadingService, SnackBarService } from '@ng-atomic/common/services';\nimport { Observable } from 'rxjs';\nimport { filter, switchMap, tap } from 'rxjs/operators';\n\nexport type Mode = 'create' | 'update'\n\nexport interface EntityPageState<Entity> {\n mode: Mode;\n entityId: string;\n entity: Entity;\n}\n\nconst tryCatch = (promise: Promise<any>) => new Promise(async (resolve, reject) => {\n try { resolve(await promise); } catch (error) { reject(error); }\n});\n\nexport abstract class EntityPageStore<S extends EntityPageState<Entity>, Entity> extends ComponentStore<S> {\n get entity() { return this.get().entity}\n\n mode$ = this.select(state => state.mode);\n entityId$ = this.select(state => state.entityId).pipe(filter(id => !!id));\n entity$ = this.select(state => state.entity);\n\n setMode = this.updater((state, mode: Mode) => ({...state, mode}));\n setEntityId = this.updater((state, entityId: string) => ({...state, entityId}));\n setEntity = this.updater((state, entity: Entity) => ({...state, entity}));\n\n constructor(initialState?: S) {\n super(initialState);\n this.getEntity(this.entityId$);\n }\n\n getEntityIdAndMode = this.effect((entityId$: Observable<string>) => entityId$.pipe(\n tap(id => this.setMode(id === 'new' ? 'create' : 'update')),\n filter(id => id !== 'new'),\n tap((id: string) => this.setEntityId(id)),\n ));\n\n getEntity = this.effect((entityId$: Observable<string>) => entityId$.pipe(\n switchMap(id => this._getEntity(id)),\n tap((entity: Entity) => this.setEntity(entity)),\n ));\n\n\n\n createEntity(value: Partial<Entity>) {\n const entity: Entity = ({...this.entity, ...value});\n\n this.loading.setKey('[pages/stores/pages/store] Create Store');\n\n return tryCatch(this._createEntity(entity))\n .catch(error => (console.error(error), this.snackBar.openSnackBar('作成に失敗しました。')))\n .finally(() => this.loading.removeKey('[pages/stores/pages/store] Create Store'));\n }\n\n updateEntity(value: Partial<Entity>) {\n const entity: Entity = ({...this.entity, ...value});\n\n this.loading.setKey('[pages/stores/pages/store] Create Store');\n return this._updateEntity(entity)\n .catch(error => (console.error(error), this.snackBar.openSnackBar('更新に失敗しました。')))\n .finally(() => this.loading.removeKey('[pages/stores/pages/store] Create Store'));\n }\n\n abstract _getEntity(id: string): Observable<Entity>;\n abstract _createEntity(entity: Entity): Promise<Entity>;\n abstract _updateEntity(entity: Entity): Promise<void>;\n\n abstract get loading(): LoadingService;\n abstract get snackBar(): SnackBarService;\n\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export * from './entity.page.store';
2
+ export * from './entities.page.store';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/common/store/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC","sourcesContent":["export * from './entity.page.store';\nexport * from './entities.page.store';\n"]}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=ng-atomic-common-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-atomic-common-store.js","sourceRoot":"","sources":["../../../../../libs/common/store/ng-atomic-common-store.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,4 @@
1
+ export const comma = (n) => n === null ? '0' : n.toLocaleString();
2
+ export const commaStr = (n, unit = '円') => n < 0 ? `-${comma(abs(n))}${unit}` : `${comma(n)}${unit}`;
3
+ export const abs = (n) => Math.abs(n);
4
+ //# sourceMappingURL=comma.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"comma.js","sourceRoot":"","sources":["../../../../../../libs/common/utils/comma/comma.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAgB,EAAU,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;AACzF,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAS,EAAE,OAAe,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC;AACrH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC","sourcesContent":["export const comma = (n: number | null): string => n === null ? '0' : n.toLocaleString();\nexport const commaStr = (n: number, unit: string = '円') => n < 0 ? `-${comma(abs(n))}${unit}` : `${comma(n)}${unit}`;\nexport const abs = (n: number) => Math.abs(n);"]}
@@ -0,0 +1,2 @@
1
+ export * from './comma';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/common/utils/comma/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC","sourcesContent":["export * from './comma';\n"]}
@@ -0,0 +1,2 @@
1
+ export const compareById = (a, b) => parseInt(a.id, 10) - parseInt(b.id, 10);
2
+ //# sourceMappingURL=compare-by-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compare-by-id.js","sourceRoot":"","sources":["../../../../../../libs/common/utils/compare-by-id/compare-by-id.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAQ,EAAE,CAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC","sourcesContent":["export type HasId = { id: string };\nexport const compareById = (a: HasId, b: HasId) => parseInt(a.id, 10) - parseInt(b.id, 10);\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './compare-by-id';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../libs/common/utils/compare-by-id/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './compare-by-id';\n"]}
@@ -0,0 +1,6 @@
1
+ export * from './comma';
2
+ export * from './compare-by-id';
3
+ export * from './mat-dayjs-date';
4
+ export * from './to-object';
5
+ export * from './query';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/common/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC","sourcesContent":["export * from './comma';\nexport * from './compare-by-id';\nexport * from './mat-dayjs-date';\nexport * from './to-object';\nexport * from './query';\n"]}