@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,340 @@
1
+ import { __decorate, __param, __metadata } from 'tslib';
2
+ import { InjectionToken, Optional, Inject, ɵɵdefineNgModule, ɵɵdefineInjector, ɵsetClassMetadata, NgModule, ɵɵsetNgModuleScope } from '@angular/core';
3
+ import { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS } from '@angular/material/core';
4
+ import * as dayjs from 'dayjs';
5
+ import { isDayjs, extend, locale } from 'dayjs';
6
+ import * as utc from 'dayjs/plugin/utc';
7
+ import * as localeData from 'dayjs/plugin/localeData';
8
+ import * as LocalizedFormat from 'dayjs/plugin/localizedFormat';
9
+ import * as customParseFormat from 'dayjs/plugin/customParseFormat';
10
+ import 'dayjs/locale/ja';
11
+ import { flatten } from 'flat';
12
+
13
+ const comma = (n) => n === null ? '0' : n.toLocaleString();
14
+ const commaStr = (n, unit = '円') => n < 0 ? `-${comma(abs(n))}${unit}` : `${comma(n)}${unit}`;
15
+ const abs = (n) => Math.abs(n);
16
+
17
+ const compareById = (a, b) => parseInt(a.id, 10) - parseInt(b.id, 10);
18
+
19
+ /** InjectionToken for Dayjs date adapter to configure options. */
20
+ const MAT_DAYJS_DATE_ADAPTER_OPTIONS = new InjectionToken('MAT_DAYJS_DATE_ADAPTER_OPTIONS', {
21
+ providedIn: 'root',
22
+ factory: MAT_DAYJS_DATE_ADAPTER_OPTIONS_FACTORY
23
+ });
24
+ function MAT_DAYJS_DATE_ADAPTER_OPTIONS_FACTORY() {
25
+ return {
26
+ useUtc: false
27
+ };
28
+ }
29
+ /** Creates an array and fills it with values. */
30
+ function range(length, valueFunction) {
31
+ const valuesArray = Array(length);
32
+ for (let i = 0; i < length; i++) {
33
+ valuesArray[i] = valueFunction(i);
34
+ }
35
+ return valuesArray;
36
+ }
37
+ /** Adapts Dayjs Dates for use with Angular Material. */
38
+ let DayjsDateAdapter = class DayjsDateAdapter extends DateAdapter {
39
+ constructor(dateLocale, options) {
40
+ super();
41
+ this.dateLocale = dateLocale;
42
+ this.options = options;
43
+ this.initializeParser(dateLocale);
44
+ }
45
+ // TODO: Implement
46
+ setLocale(locale) {
47
+ super.setLocale(locale);
48
+ const dayJsLocaleData = this.dayJs().localeData();
49
+ this.localeData = {
50
+ firstDayOfWeek: dayJsLocaleData.firstDayOfWeek(),
51
+ longMonths: dayJsLocaleData.months(),
52
+ shortMonths: dayJsLocaleData.monthsShort(),
53
+ dates: range(31, (i) => this.createDate(2017, 0, i + 1).format('D')),
54
+ longDaysOfWeek: range(7, (i) => this.dayJs().set('day', i).format('dddd')),
55
+ shortDaysOfWeek: dayJsLocaleData.weekdaysShort(),
56
+ narrowDaysOfWeek: dayJsLocaleData.weekdaysMin(),
57
+ };
58
+ }
59
+ getYear(date) {
60
+ return this.dayJs(date).year();
61
+ }
62
+ getMonth(date) {
63
+ return this.dayJs(date).month();
64
+ }
65
+ getDate(date) {
66
+ return this.dayJs(date).date();
67
+ }
68
+ getDayOfWeek(date) {
69
+ return this.dayJs(date).day();
70
+ }
71
+ getMonthNames(style) {
72
+ return style === 'long' ? this.localeData.longMonths : this.localeData.shortMonths;
73
+ }
74
+ getDateNames() {
75
+ return this.localeData.dates;
76
+ }
77
+ getDayOfWeekNames(style) {
78
+ if (style === 'long') {
79
+ return this.localeData.longDaysOfWeek;
80
+ }
81
+ if (style === 'short') {
82
+ return this.localeData.shortDaysOfWeek;
83
+ }
84
+ return this.localeData.narrowDaysOfWeek;
85
+ }
86
+ getYearName(date) {
87
+ return this.dayJs(date).format('YYYY');
88
+ }
89
+ getFirstDayOfWeek() {
90
+ return this.localeData.firstDayOfWeek;
91
+ }
92
+ getNumDaysInMonth(date) {
93
+ return this.dayJs(date).daysInMonth();
94
+ }
95
+ clone(date) {
96
+ return date.clone();
97
+ }
98
+ createDate(year, month, date) {
99
+ const returnDayjs = this.dayJs()
100
+ .set('year', year)
101
+ .set('month', month)
102
+ .set('date', date);
103
+ return returnDayjs;
104
+ }
105
+ today() {
106
+ return this.dayJs();
107
+ }
108
+ parse(value, parseFormat) {
109
+ if (value && typeof value === 'string') {
110
+ return this.dayJs(value, dayjs().localeData().longDateFormat(parseFormat), this.locale);
111
+ }
112
+ return value ? this.dayJs(value).locale(this.locale) : null;
113
+ }
114
+ format(date, displayFormat) {
115
+ if (!this.isValid(date)) {
116
+ throw Error('DayjsDateAdapter: Cannot format invalid date.');
117
+ }
118
+ return date.locale(this.locale).format(displayFormat);
119
+ }
120
+ addCalendarYears(date, years) {
121
+ return date.add(years, 'year');
122
+ }
123
+ addCalendarMonths(date, months) {
124
+ return date.add(months, 'month');
125
+ }
126
+ addCalendarDays(date, days) {
127
+ return date.add(days, 'day');
128
+ }
129
+ toIso8601(date) {
130
+ return date.toISOString();
131
+ }
132
+ /**
133
+ * Attempts to deserialize a value to a valid date object. This is different from parsing in that
134
+ * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601
135
+ * string). The default implementation does not allow any deserialization, it simply checks that
136
+ * the given value is already a valid date object or null. The `<mat-datepicker>` will call this
137
+ * method on all of it's `@Input()` properties that accept dates. It is therefore possible to
138
+ * support passing values from your backend directly to these properties by overriding this method
139
+ * to also deserialize the format used by your backend.
140
+ * @param value The value to be deserialized into a date object.
141
+ * @returns The deserialized date object, either a valid date, null if the value can be
142
+ * deserialized into a null date (e.g. the empty string), or an invalid date.
143
+ */
144
+ deserialize(value) {
145
+ let date;
146
+ if (value instanceof Date) {
147
+ date = this.dayJs(value);
148
+ }
149
+ else if (this.isDateInstance(value)) {
150
+ // NOTE: assumes that cloning also sets the correct locale.
151
+ return this.clone(value);
152
+ }
153
+ if (typeof value === 'string') {
154
+ if (!value) {
155
+ return null;
156
+ }
157
+ date = this.dayJs(value).toISOString();
158
+ }
159
+ if (date && this.isValid(date)) {
160
+ return this.dayJs(date); // NOTE: Is this necessary since Dayjs is immutable and Moment was not?
161
+ }
162
+ return super.deserialize(value);
163
+ }
164
+ isDateInstance(obj) {
165
+ return isDayjs(obj);
166
+ }
167
+ isValid(date) {
168
+ return this.dayJs(date).isValid();
169
+ }
170
+ invalid() {
171
+ return this.dayJs(null);
172
+ }
173
+ dayJs(input, format, locale) {
174
+ if (!this.shouldUseUtc) {
175
+ return dayjs(input, { format, locale }, locale);
176
+ }
177
+ return dayjs(input, { format, locale, utc: this.shouldUseUtc }, locale).utc();
178
+ }
179
+ get shouldUseUtc() {
180
+ const { useUtc } = this.options || {};
181
+ return !!useUtc;
182
+ }
183
+ initializeParser(dateLocale) {
184
+ if (this.shouldUseUtc) {
185
+ extend(utc);
186
+ }
187
+ extend(LocalizedFormat);
188
+ extend(customParseFormat);
189
+ extend(localeData);
190
+ this.setLocale(dateLocale);
191
+ }
192
+ };
193
+ DayjsDateAdapter = __decorate([
194
+ __param(0, Optional()), __param(0, Inject(MAT_DATE_LOCALE)),
195
+ __param(1, Optional()), __param(1, Inject(MAT_DAYJS_DATE_ADAPTER_OPTIONS)),
196
+ __metadata("design:paramtypes", [String, Object])
197
+ ], DayjsDateAdapter);
198
+
199
+ /**
200
+ * Custom Date-Formats and Adapter (using https://github.com/iamkun/dayjs)
201
+ */
202
+ const MAT_DAYJS_DATE_FORMATS = {
203
+ parse: {
204
+ dateInput: 'MM/DD/YYYY',
205
+ },
206
+ display: {
207
+ dateInput: 'MM/DD/YYYY',
208
+ monthYearLabel: 'MMM YYYY',
209
+ dateA11yLabel: 'LL',
210
+ monthYearA11yLabel: 'MMMM YYYY',
211
+ }
212
+ };
213
+
214
+ locale('ja');
215
+ const MAT_DAYJS_DATE_FORMATS_FOR_JP = {
216
+ parse: {
217
+ dateInput: 'YYYY/MM/DD',
218
+ },
219
+ display: {
220
+ dateInput: 'YYYY/MM/DD',
221
+ monthYearLabel: 'MMM YYYY',
222
+ dateA11yLabel: 'LL',
223
+ monthYearA11yLabel: 'MMMM YYYY',
224
+ }
225
+ };
226
+ const MAT_DAYJS_JP_PROVIDERS = [
227
+ { provide: MAT_DATE_LOCALE, useValue: 'ja' },
228
+ { provide: MAT_DATE_FORMATS, useValue: MAT_DAYJS_DATE_FORMATS_FOR_JP },
229
+ ];
230
+
231
+ class DayjsDateModule {
232
+ }
233
+ DayjsDateModule.ɵfac = function DayjsDateModule_Factory(t) { return new (t || DayjsDateModule)(); };
234
+ DayjsDateModule.ɵmod = ɵɵdefineNgModule({ type: DayjsDateModule });
235
+ DayjsDateModule.ɵinj = ɵɵdefineInjector({ providers: [
236
+ {
237
+ provide: DateAdapter,
238
+ useClass: DayjsDateAdapter,
239
+ deps: [MAT_DATE_LOCALE, MAT_DAYJS_DATE_ADAPTER_OPTIONS]
240
+ },
241
+ ] });
242
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(DayjsDateModule, [{
243
+ type: NgModule,
244
+ args: [{
245
+ providers: [
246
+ {
247
+ provide: DateAdapter,
248
+ useClass: DayjsDateAdapter,
249
+ deps: [MAT_DATE_LOCALE, MAT_DAYJS_DATE_ADAPTER_OPTIONS]
250
+ },
251
+ ],
252
+ }]
253
+ }], null, null); })();
254
+ class MatDayjsDateModule {
255
+ }
256
+ MatDayjsDateModule.ɵfac = function MatDayjsDateModule_Factory(t) { return new (t || MatDayjsDateModule)(); };
257
+ MatDayjsDateModule.ɵmod = ɵɵdefineNgModule({ type: MatDayjsDateModule });
258
+ MatDayjsDateModule.ɵinj = ɵɵdefineInjector({ providers: [{ provide: MAT_DATE_FORMATS, useValue: MAT_DAYJS_DATE_FORMATS }], imports: [[DayjsDateModule]] });
259
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵɵsetNgModuleScope(MatDayjsDateModule, { imports: [DayjsDateModule] }); })();
260
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵsetClassMetadata(MatDayjsDateModule, [{
261
+ type: NgModule,
262
+ args: [{
263
+ imports: [DayjsDateModule],
264
+ providers: [{ provide: MAT_DATE_FORMATS, useValue: MAT_DAYJS_DATE_FORMATS }],
265
+ }]
266
+ }], null, null); })();
267
+
268
+ const getAllProps = (obj, keys = Object.keys(obj)) => {
269
+ const proto = Object.getPrototypeOf(obj);
270
+ keys = Object.getOwnPropertyNames(proto)
271
+ .filter(v => v !== '__proto__')
272
+ .filter(v => Object.getOwnPropertyDescriptor(proto, v).get instanceof Function)
273
+ .concat(keys);
274
+ return proto.constructor.name === 'Object' ? keys : getAllProps(proto, keys);
275
+ };
276
+ const toObject = (obj) => getAllProps(obj).reduce((p, k) => (Object.assign(Object.assign({}, p), { [k]: obj[k] })), {});
277
+
278
+ const filterByQuery = (items, queryString, dlm = {}) => {
279
+ return new QueryResolver(dlm).resolve(items, queryString);
280
+ };
281
+ class QueryResolver {
282
+ constructor(map) {
283
+ this.inQueryByKey = (items, query) => {
284
+ var _a, _b;
285
+ const [not, _key, value] = this.parseQuery(query);
286
+ const key = (_b = (_a = this.REVERSED_MAP) === null || _a === void 0 ? void 0 : _a[_key]) !== null && _b !== void 0 ? _b : _key;
287
+ return items.filter(item => { var _a; return _not(_in((_a = flatten(toObject(item))) === null || _a === void 0 ? void 0 : _a[key], value), not); });
288
+ };
289
+ this.gtQueryByKey = (items, query) => {
290
+ var _a, _b;
291
+ const [_key, value] = query.split('>');
292
+ const key = (_b = (_a = this.REVERSED_MAP) === null || _a === void 0 ? void 0 : _a[_key]) !== null && _b !== void 0 ? _b : _key;
293
+ return items.filter(item => { var _a; return _gt((_a = flatten(toObject(item))) === null || _a === void 0 ? void 0 : _a[key], value); });
294
+ };
295
+ this.inQuery = (items, query) => {
296
+ return items.filter(item => Object.values(flatten(toObject(item))).some(value => _in(value, query)));
297
+ };
298
+ this.REVERSED_MAP = Object.entries(map).reduce((p, [k, v]) => (Object.assign(Object.assign({}, p), { [v]: k })), {});
299
+ }
300
+ resolve(items, queryString) {
301
+ return this.resolveQueries(items, queryString.split(' ').filter(q => q.length));
302
+ }
303
+ resolveQueries(items, queries) {
304
+ return queries.reduce((_items, query) => {
305
+ if (query.includes(':'))
306
+ return this.inQueryByKey(_items, query);
307
+ if (query.includes('='))
308
+ return this.inQueryByKey(_items, query);
309
+ if (query.includes('>'))
310
+ return this.gtQueryByKey(_items, query);
311
+ if (query.includes('<'))
312
+ return this.inQueryByKey(_items, query);
313
+ return this.inQuery(_items, query);
314
+ }, items);
315
+ }
316
+ parseQuery(query) {
317
+ const [_key, value] = query.split(':');
318
+ return [_key.startsWith('-'), _key.startsWith('-') ? _key.slice(1) : _key, value];
319
+ }
320
+ }
321
+ const _not = (bool, not) => {
322
+ return not ? !bool : bool;
323
+ };
324
+ const _in = (value, query) => {
325
+ return typeof value === 'string' ? value === null || value === void 0 ? void 0 : value.includes(query) : false;
326
+ };
327
+ const _gt = (value, query) => {
328
+ return typeof value === 'string'
329
+ ? parseFloat(value) > parseFloat(query)
330
+ : typeof value === 'number'
331
+ ? value > parseFloat(query)
332
+ : false;
333
+ };
334
+
335
+ /**
336
+ * Generated bundle index. Do not edit.
337
+ */
338
+
339
+ export { DayjsDateAdapter, DayjsDateModule, MAT_DAYJS_DATE_ADAPTER_OPTIONS, MAT_DAYJS_DATE_ADAPTER_OPTIONS_FACTORY, MAT_DAYJS_DATE_FORMATS, MAT_DAYJS_DATE_FORMATS_FOR_JP, MAT_DAYJS_JP_PROVIDERS, MatDayjsDateModule, abs, comma, commaStr, compareById, filterByQuery, toObject };
340
+ //# sourceMappingURL=ng-atomic-common-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-atomic-common-utils.js","sources":["../../../../libs/common/utils/comma/comma.ts","../../../../libs/common/utils/compare-by-id/compare-by-id.ts","../../../../libs/common/utils/mat-dayjs-date/dayjs-date.adapter.ts","../../../../libs/common/utils/mat-dayjs-date/dayjs-date.formats.ts","../../../../libs/common/utils/mat-dayjs-date/dayjs-jp-providers.ts","../../../../libs/common/utils/mat-dayjs-date/dayjs-date.module.ts","../../../../libs/common/utils/to-object/to-object.ts","../../../../libs/common/utils/query/query.resolver.ts","../../../../libs/common/utils/ng-atomic-common-utils.ts"],"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);","export type HasId = { id: string };\nexport const compareById = (a: HasId, b: HasId) => parseInt(a.id, 10) - parseInt(b.id, 10);\n","\nimport { Optional, Inject, InjectionToken } from '@angular/core';\nimport { DateAdapter, MAT_DATE_LOCALE } from '@angular/material/core';\nimport * as dayjs from 'dayjs';\nimport { Dayjs } from 'dayjs';\nimport * as utc from 'dayjs/plugin/utc';\nimport * as localeData from 'dayjs/plugin/localeData';\nimport * as LocalizedFormat from 'dayjs/plugin/localizedFormat';\nimport * as customParseFormat from 'dayjs/plugin/customParseFormat';\n\n\nexport interface DayJsDateAdapterOptions {\n /**\n * Turns the use of utc dates on or off.\n * Changing this will change how Angular Material components like DatePicker output dates.\n * {@default false}\n */\n useUtc?: boolean;\n}\n\n/** InjectionToken for Dayjs date adapter to configure options. */\nexport const MAT_DAYJS_DATE_ADAPTER_OPTIONS = new InjectionToken<DayJsDateAdapterOptions>(\n 'MAT_DAYJS_DATE_ADAPTER_OPTIONS', {\n providedIn: 'root',\n factory: MAT_DAYJS_DATE_ADAPTER_OPTIONS_FACTORY\n});\n\nexport function MAT_DAYJS_DATE_ADAPTER_OPTIONS_FACTORY(): DayJsDateAdapterOptions {\n return {\n useUtc: false\n };\n}\n\n/** Creates an array and fills it with values. */\nfunction range<T>(length: number, valueFunction: (index: number) => T): T[] {\n const valuesArray = Array(length);\n for (let i = 0; i < length; i++) {\n valuesArray[i] = valueFunction(i);\n }\n return valuesArray;\n}\n\n/** Adapts Dayjs Dates for use with Angular Material. */\nexport class DayjsDateAdapter extends DateAdapter<Dayjs> {\n private localeData!: {\n firstDayOfWeek: number,\n longMonths: string[],\n shortMonths: string[],\n dates: string[],\n longDaysOfWeek: string[],\n shortDaysOfWeek: string[],\n narrowDaysOfWeek: string[]\n };\n\n constructor(\n @Optional() @Inject(MAT_DATE_LOCALE) public dateLocale: string,\n @Optional() @Inject(MAT_DAYJS_DATE_ADAPTER_OPTIONS) private options?: DayJsDateAdapterOptions\n ) {\n super();\n this.initializeParser(dateLocale);\n }\n\n // TODO: Implement\n setLocale(locale: string) {\n super.setLocale(locale);\n\n const dayJsLocaleData = this.dayJs().localeData();\n this.localeData = {\n firstDayOfWeek: dayJsLocaleData.firstDayOfWeek(),\n longMonths: dayJsLocaleData.months(),\n shortMonths: dayJsLocaleData.monthsShort(),\n dates: range(31, (i) => this.createDate(2017, 0, i + 1).format('D')),\n longDaysOfWeek: range(7, (i) => this.dayJs().set('day', i).format('dddd')),\n shortDaysOfWeek: dayJsLocaleData.weekdaysShort(),\n narrowDaysOfWeek: dayJsLocaleData.weekdaysMin(),\n };\n }\n\n getYear(date: Dayjs): number {\n return this.dayJs(date).year();\n }\n\n getMonth(date: Dayjs): number {\n return this.dayJs(date).month();\n }\n\n getDate(date: Dayjs): number {\n return this.dayJs(date).date();\n }\n\n getDayOfWeek(date: Dayjs): number {\n return this.dayJs(date).day();\n }\n\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\n return style === 'long' ? this.localeData.longMonths : this.localeData.shortMonths;\n }\n\n getDateNames(): string[] {\n return this.localeData.dates;\n }\n\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\n if (style === 'long') {\n return this.localeData.longDaysOfWeek;\n }\n if (style === 'short') {\n return this.localeData.shortDaysOfWeek;\n }\n return this.localeData.narrowDaysOfWeek;\n }\n\n getYearName(date: Dayjs): string {\n return this.dayJs(date).format('YYYY');\n }\n\n getFirstDayOfWeek(): number {\n return this.localeData.firstDayOfWeek;\n }\n\n getNumDaysInMonth(date: Dayjs): number {\n return this.dayJs(date).daysInMonth();\n }\n\n clone(date: Dayjs): Dayjs {\n return date.clone();\n }\n\n createDate(year: number, month: number, date: number): Dayjs {\n const returnDayjs = this.dayJs()\n .set('year', year)\n .set('month', month)\n .set('date', date);\n return returnDayjs;\n }\n\n today(): Dayjs {\n return this.dayJs();\n }\n\n parse(value: any, parseFormat: string): Dayjs | null {\n if (value && typeof value === 'string') {\n return this.dayJs(value, dayjs().localeData().longDateFormat(parseFormat), this.locale);\n }\n return value ? this.dayJs(value).locale(this.locale) : null;\n }\n\n format(date: Dayjs, displayFormat: string): string {\n if (!this.isValid(date)) {\n throw Error('DayjsDateAdapter: Cannot format invalid date.');\n }\n return date.locale(this.locale).format(displayFormat);\n }\n\n addCalendarYears(date: Dayjs, years: number): Dayjs {\n return date.add(years, 'year');\n }\n\n addCalendarMonths(date: Dayjs, months: number): Dayjs {\n return date.add(months, 'month');\n }\n\n addCalendarDays(date: Dayjs, days: number): Dayjs {\n return date.add(days, 'day');\n }\n\n toIso8601(date: Dayjs): string {\n return date.toISOString();\n }\n\n /**\n * Attempts to deserialize a value to a valid date object. This is different from parsing in that\n * deserialize should only accept non-ambiguous, locale-independent formats (e.g. a ISO 8601\n * string). The default implementation does not allow any deserialization, it simply checks that\n * the given value is already a valid date object or null. The `<mat-datepicker>` will call this\n * method on all of it's `@Input()` properties that accept dates. It is therefore possible to\n * support passing values from your backend directly to these properties by overriding this method\n * to also deserialize the format used by your backend.\n * @param value The value to be deserialized into a date object.\n * @returns The deserialized date object, either a valid date, null if the value can be\n * deserialized into a null date (e.g. the empty string), or an invalid date.\n */\n deserialize(value: any): Dayjs | null {\n let date;\n if (value instanceof Date) {\n date = this.dayJs(value);\n } else if (this.isDateInstance(value)) {\n // NOTE: assumes that cloning also sets the correct locale.\n return this.clone(value);\n }\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n date = this.dayJs(value).toISOString();\n }\n if (date && this.isValid(date as Dayjs)) {\n return this.dayJs(date); // NOTE: Is this necessary since Dayjs is immutable and Moment was not?\n }\n return super.deserialize(value);\n }\n\n isDateInstance(obj: any): boolean {\n return dayjs.isDayjs(obj);\n }\n\n isValid(date: Dayjs): boolean {\n return this.dayJs(date).isValid();\n }\n\n invalid(): Dayjs {\n return this.dayJs(null);\n }\n\n private dayJs(input?: any, format?: string, locale?: string): Dayjs {\n if (!this.shouldUseUtc) {\n return dayjs(input, { format, locale }, locale);\n }\n return dayjs(input, { format, locale, utc: this.shouldUseUtc }, locale).utc();\n }\n\n private get shouldUseUtc(): boolean {\n const { useUtc }: DayJsDateAdapterOptions = this.options || {};\n return !!useUtc;\n }\n\n private initializeParser(dateLocale: string) {\n if (this.shouldUseUtc) {\n dayjs.extend(utc);\n }\n\n dayjs.extend(LocalizedFormat);\n dayjs.extend(customParseFormat);\n dayjs.extend(localeData);\n\n this.setLocale(dateLocale);\n }\n}","import { MatDateFormats } from '@angular/material/core';\n\n/**\n * Custom Date-Formats and Adapter (using https://github.com/iamkun/dayjs)\n */\nexport const MAT_DAYJS_DATE_FORMATS: MatDateFormats = {\n parse: {\n dateInput: 'MM/DD/YYYY',\n },\n display: {\n dateInput: 'MM/DD/YYYY',\n monthYearLabel: 'MMM YYYY',\n dateA11yLabel: 'LL',\n monthYearA11yLabel: 'MMMM YYYY',\n }\n};","import { MatDateFormats, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core';\nimport * as dayjs from 'dayjs';\nimport 'dayjs/locale/ja'\ndayjs.locale('ja');\n\nexport const MAT_DAYJS_DATE_FORMATS_FOR_JP: MatDateFormats = {\n parse: {\n dateInput: 'YYYY/MM/DD',\n },\n display: {\n dateInput: 'YYYY/MM/DD',\n monthYearLabel: 'MMM YYYY',\n dateA11yLabel: 'LL',\n monthYearA11yLabel: 'MMMM YYYY',\n }\n};\n\nexport const MAT_DAYJS_JP_PROVIDERS = [\n { provide: MAT_DATE_LOCALE, useValue: 'ja' },\n { provide: MAT_DATE_FORMATS, useValue: MAT_DAYJS_DATE_FORMATS_FOR_JP },\n];\n","import { NgModule } from '@angular/core';\nimport { DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core';\nimport { DayjsDateAdapter, MAT_DAYJS_DATE_ADAPTER_OPTIONS } from './dayjs-date.adapter';\nimport { MAT_DAYJS_DATE_FORMATS } from './dayjs-date.formats';\n\n@NgModule({\n providers: [\n {\n provide: DateAdapter,\n useClass: DayjsDateAdapter,\n deps: [MAT_DATE_LOCALE, MAT_DAYJS_DATE_ADAPTER_OPTIONS]\n },\n ],\n})\nexport class DayjsDateModule { }\n\n@NgModule({\n imports: [DayjsDateModule],\n providers: [{ provide: MAT_DATE_FORMATS, useValue: MAT_DAYJS_DATE_FORMATS }],\n})\nexport class MatDayjsDateModule { }","const getAllProps = (obj: object, keys: string[] = Object.keys(obj)): string[] => {\n const proto = Object.getPrototypeOf(obj);\n keys = Object.getOwnPropertyNames(proto)\n .filter(v => v !== '__proto__')\n .filter(v => Object.getOwnPropertyDescriptor(proto, v)!.get instanceof Function)\n .concat(keys);\n\n return proto.constructor.name === 'Object' ? keys : getAllProps(proto, keys);\n}\n\nexport const toObject = (obj: object): object => getAllProps(obj).reduce((p, k) => ({...p, [k]: obj[k]}), {});\n","import { toObject } from '../to-object';\nimport { flatten } from 'flat';\n\nexport const filterByQuery = <T>(items: T[], queryString: string, dlm: Record<string, string> = {}): T[] => {\n return new QueryResolver(dlm).resolve(items, queryString);\n}\n\ntype QueryResolveFunc<T> = (items: T[], query: string) => T[];\n\nclass QueryResolver<T extends object = any> {\n REVERSED_MAP: Record<string, string>;\n\n constructor(map: Record<string, string>) {\n this.REVERSED_MAP = Object.entries(map).reduce((p, [k, v]) => ({...p, [v]: k}), {} as Record<string, string>);\n }\n\n resolve(items: T[], queryString: string): T[] {\n return this.resolveQueries(items, queryString.split(' ').filter(q => q.length));\n }\n\n resolveQueries(items: T[], queries: string[]): T[] {\n return queries.reduce((_items, query: string) => {\n if (query.includes(':')) return this.inQueryByKey(_items, query);\n if (query.includes('=')) return this.inQueryByKey(_items, query);\n if (query.includes('>')) return this.gtQueryByKey(_items, query);\n if (query.includes('<')) return this.inQueryByKey(_items, query);\n return this.inQuery(_items, query);\n }, items);\n }\n\n private parseQuery(query: string): [boolean, string, string] {\n const [_key, value] = query.split(':');\n return [_key.startsWith('-'), _key.startsWith('-') ? _key.slice(1) : _key, value];\n }\n\n private inQueryByKey: QueryResolveFunc<T> = (items, query) => {\n const [not, _key, value] = this.parseQuery(query);\n const key = this.REVERSED_MAP?.[_key] ?? _key;\n return items.filter(item => _not(_in(flatten(toObject(item as any))?.[key], value), not));\n }\n\n private gtQueryByKey: QueryResolveFunc<T> = (items, query) => {\n const [_key, value] = query.split('>');\n const key = this.REVERSED_MAP?.[_key] ?? _key;\n return items.filter(item => _gt(flatten(toObject(item as any))?.[key], value));\n }\n\n private inQuery: QueryResolveFunc<T> = (items, query) => {\n return items.filter(item => Object.values(flatten(toObject(item as T))).some(value => _in(value, query)));\n }\n}\n\nconst _not = (bool: boolean, not: boolean): boolean => {\n return not ? !bool : bool;\n}\n\nconst _in = (value: any, query: string) => {\n return typeof value === 'string' ? value?.includes(query) : false;\n}\n\nconst _gt = (value: any, query: string) => {\n return typeof value === 'string' \n ? parseFloat(value) > parseFloat(query) \n : typeof value === 'number'\n ? value > parseFloat(query)\n : false;\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["dayjs.isDayjs","dayjs.extend","dayjs.locale"],"mappings":";;;;;;;;;;;;MAAa,KAAK,GAAG,CAAC,CAAgB,KAAa,CAAC,KAAK,IAAI,GAAG,GAAG,GAAG,CAAC,CAAC,cAAc,GAAG;MAC5E,QAAQ,GAAG,CAAC,CAAS,EAAE,OAAe,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG;MACxG,GAAG,GAAG,CAAC,CAAS,KAAK,IAAI,CAAC,GAAG,CAAC,CAAC;;MCD/B,WAAW,GAAG,CAAC,CAAQ,EAAE,CAAQ,KAAK,Q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AAC,KAAK,CAAC;UACrC,OAAO,KAAK,KAAK,QAAQ;cACzB,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;cACzB,KAAK,CAAC;AACZ,CAAC;;AClED;;;;;;"}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ //# sourceMappingURL=ng-atomic-common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-atomic-common.js","sources":["../../../../libs/common/ng-atomic-common.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;;"}
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface ActionItem {
2
+ id: number | string;
3
+ name: string;
4
+ icon?: string;
5
+ }
6
+ export declare type ActionItemEvent<T = any> = [ActionItem, T];
@@ -0,0 +1 @@
1
+ export * from './public_api';
@@ -0,0 +1,4 @@
1
+ export interface MenuItem {
2
+ id: number | string;
3
+ name: string;
4
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@ng-atomic/common/models" />
5
+ export * from './index';
@@ -0,0 +1,10 @@
1
+ {
2
+ "main": "../bundles/ng-atomic-common-models.umd.js",
3
+ "module": "../fesm2015/ng-atomic-common-models.js",
4
+ "es2015": "../fesm2015/ng-atomic-common-models.js",
5
+ "esm2015": "../esm2015/models/ng-atomic-common-models.js",
6
+ "fesm2015": "../fesm2015/ng-atomic-common-models.js",
7
+ "typings": "ng-atomic-common-models.d.ts",
8
+ "sideEffects": false,
9
+ "name": "@ng-atomic/common/models"
10
+ }
@@ -0,0 +1,2 @@
1
+ export * from './action-item';
2
+ export * from './menu-item';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@ng-atomic/common" />
5
+ export * from './index';
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "@ng-atomic/common",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^11.2.14",
6
+ "@angular/core": "^11.2.14",
7
+ "rxjs": "~6.6.3",
8
+ "@ngrx/component-store": "^11.1.1",
9
+ "flat": "^5.0.2"
10
+ },
11
+ "dependencies": {
12
+ "tslib": "^2.0.0"
13
+ },
14
+ "main": "bundles/ng-atomic-common.umd.js",
15
+ "module": "fesm2015/ng-atomic-common.js",
16
+ "es2015": "fesm2015/ng-atomic-common.js",
17
+ "esm2015": "esm2015/ng-atomic-common.js",
18
+ "fesm2015": "fesm2015/ng-atomic-common.js",
19
+ "typings": "ng-atomic-common.d.ts",
20
+ "sideEffects": false
21
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./domain.pipe";
3
+ import * as i2 from "@angular/common";
4
+ export declare class DomainModule {
5
+ static ɵfac: i0.ɵɵFactoryDef<DomainModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDefWithMeta<DomainModule, [typeof i1.DomainPipe], [typeof i2.CommonModule], [typeof i1.DomainPipe]>;
7
+ static ɵinj: i0.ɵɵInjectorDef<DomainModule>;
8
+ }
@@ -0,0 +1,11 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare type DomainLangMap = Record<string, string>;
4
+ export declare const DOMAIN_LANG_MAP: InjectionToken<Record<string, string>>;
5
+ export declare class DomainPipe {
6
+ private map;
7
+ constructor(map: DomainLangMap);
8
+ transform(input: string): string;
9
+ static ɵfac: i0.ɵɵFactoryDef<DomainPipe, [{ optional: true; }]>;
10
+ static ɵpipe: i0.ɵɵPipeDefWithMeta<DomainPipe, "D">;
11
+ }
@@ -0,0 +1,2 @@
1
+ export { DomainModule } from './domain.module';
2
+ export { DomainPipe, DomainLangMap, DOMAIN_LANG_MAP } from './domain.pipe';
@@ -0,0 +1,4 @@
1
+ export * from './domain';
2
+ export * from './smart-exp';
3
+ export * from './smart-field';
4
+ export * from './yen';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@ng-atomic/common/pipes" />
5
+ export * from './index';
@@ -0,0 +1,10 @@
1
+ {
2
+ "main": "../bundles/ng-atomic-common-pipes.umd.js",
3
+ "module": "../fesm2015/ng-atomic-common-pipes.js",
4
+ "es2015": "../fesm2015/ng-atomic-common-pipes.js",
5
+ "esm2015": "../esm2015/pipes/ng-atomic-common-pipes.js",
6
+ "fesm2015": "../fesm2015/ng-atomic-common-pipes.js",
7
+ "typings": "ng-atomic-common-pipes.d.ts",
8
+ "sideEffects": false,
9
+ "name": "@ng-atomic/common/pipes"
10
+ }
@@ -0,0 +1,2 @@
1
+ export * from './smart-exp.pipe';
2
+ export { SmartExpModule } from './smart-exp.module';
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./smart-exp.pipe";
3
+ export declare class SmartExpModule {
4
+ static ɵfac: i0.ɵɵFactoryDef<SmartExpModule, never>;
5
+ static ɵmod: i0.ɵɵNgModuleDefWithMeta<SmartExpModule, [typeof i1.SmartExpPipe], never, [typeof i1.SmartExpPipe]>;
6
+ static ɵinj: i0.ɵɵInjectorDef<SmartExpModule>;
7
+ }
@@ -0,0 +1,7 @@
1
+ import * as dayjs from 'dayjs';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SmartExpPipe {
4
+ transform(input: string | number | dayjs.Dayjs | any, key?: string): string;
5
+ static ɵfac: i0.ɵɵFactoryDef<SmartExpPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDefWithMeta<SmartExpPipe, "smartExp">;
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from './smart-field.pipe';
2
+ export * from './smart-field.module';
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./smart-field.pipe";
3
+ import * as i2 from "@angular/common";
4
+ export declare class SmartFieldModule {
5
+ static ɵfac: i0.ɵɵFactoryDef<SmartFieldModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDefWithMeta<SmartFieldModule, [typeof i1.SmartFieldPipe], [typeof i2.CommonModule], [typeof i1.SmartFieldPipe]>;
7
+ static ɵinj: i0.ɵɵInjectorDef<SmartFieldModule>;
8
+ }
@@ -0,0 +1,31 @@
1
+ import { InjectionToken, PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ interface Option<T> {
4
+ name: string;
5
+ value: T;
6
+ }
7
+ interface InputField {
8
+ type: 'input';
9
+ }
10
+ interface DateInputField {
11
+ type: 'date';
12
+ }
13
+ interface SelectField<T> {
14
+ type: 'select';
15
+ options: Option<T>[];
16
+ }
17
+ interface MultiSelectField<T> {
18
+ type: 'multi-select';
19
+ options: Option<T>[];
20
+ }
21
+ declare type FormField<V> = InputField | DateInputField | SelectField<V> | MultiSelectField<V>;
22
+ export declare type FormFieldMap = Record<string, FormField<any>>;
23
+ export declare const FORM_FIELD_MAP: InjectionToken<Record<string, FormField<any>>>;
24
+ export declare class SmartFieldPipe implements PipeTransform {
25
+ private map;
26
+ constructor(map: Record<string, FormField<any>>);
27
+ transform(key: string): FormField<any>;
28
+ static ɵfac: i0.ɵɵFactoryDef<SmartFieldPipe, [{ optional: true; }]>;
29
+ static ɵpipe: i0.ɵɵPipeDefWithMeta<SmartFieldPipe, "smartField">;
30
+ }
31
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './yen.pipe';
2
+ export * from './yen.module';
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./yen.pipe";
3
+ import * as i2 from "@angular/common";
4
+ export declare class YenModule {
5
+ static ɵfac: i0.ɵɵFactoryDef<YenModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDefWithMeta<YenModule, [typeof i1.YenPipe], [typeof i2.CommonModule], [typeof i1.YenPipe]>;
7
+ static ɵinj: i0.ɵɵInjectorDef<YenModule>;
8
+ }
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class YenPipe implements PipeTransform {
4
+ transform(value: number, _unit?: string): string;
5
+ static ɵfac: i0.ɵɵFactoryDef<YenPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDefWithMeta<YenPipe, "yen">;
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from './loading';
2
+ export * from './snack-bar';
@@ -0,0 +1 @@
1
+ export * from './loading.service';
@@ -0,0 +1,14 @@
1
+ import * as i0 from "@angular/core";
2
+ declare type LoadingMap = Record<string, boolean>;
3
+ export declare class LoadingService {
4
+ private loadingEntries$;
5
+ loadingMap: LoadingMap;
6
+ loadingMap$: import("rxjs").Observable<Record<string, boolean>>;
7
+ isLoading$: import("rxjs").Observable<boolean>;
8
+ constructor();
9
+ setKey(key: string): void;
10
+ removeKey(key: string): void;
11
+ static ɵfac: i0.ɵɵFactoryDef<LoadingService, never>;
12
+ static ɵprov: i0.ɵɵInjectableDef<LoadingService>;
13
+ }
14
+ export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@ng-atomic/common/services" />
5
+ export * from './index';