@ajf/calendars 12.1.0

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 (37) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +6 -0
  3. package/bundles/calendars-ethiopian.umd.js +984 -0
  4. package/bundles/calendars-ethiopian.umd.js.map +1 -0
  5. package/bundles/calendars.umd.js +80 -0
  6. package/bundles/calendars.umd.js.map +1 -0
  7. package/esm2015/calendars.externs.js +0 -0
  8. package/esm2015/ethiopian/calendar-module.js +41 -0
  9. package/esm2015/ethiopian/calendar-service.js +210 -0
  10. package/esm2015/ethiopian/converter.js +140 -0
  11. package/esm2015/ethiopian/ethiopian-date-pipe.js +41 -0
  12. package/esm2015/ethiopian/ethiopian-date.js +188 -0
  13. package/esm2015/ethiopian/ethiopian.externs.js +6 -0
  14. package/esm2015/ethiopian/index.js +5 -0
  15. package/esm2015/ethiopian/public-api.js +26 -0
  16. package/esm2015/ethiopian/utils.js +27 -0
  17. package/esm2015/index.js +23 -0
  18. package/esm2015/public-api.js +23 -0
  19. package/esm2015/version.js +25 -0
  20. package/ethiopian/calendar-module.d.ts +23 -0
  21. package/ethiopian/calendar-service.d.ts +35 -0
  22. package/ethiopian/converter.d.ts +30 -0
  23. package/ethiopian/ethiopian-date-pipe.d.ts +25 -0
  24. package/ethiopian/ethiopian-date.d.ts +70 -0
  25. package/ethiopian/index.d.ts +4 -0
  26. package/ethiopian/index.metadata.json +1 -0
  27. package/ethiopian/package.json +9 -0
  28. package/ethiopian/public-api.d.ts +25 -0
  29. package/ethiopian/utils.d.ts +24 -0
  30. package/fesm2015/calendars.js +72 -0
  31. package/fesm2015/calendars.js.map +1 -0
  32. package/fesm2015/ethiopian.js +667 -0
  33. package/fesm2015/ethiopian.js.map +1 -0
  34. package/index.d.ts +22 -0
  35. package/package.json +26 -0
  36. package/public-api.d.ts +22 -0
  37. package/version.d.ts +24 -0
@@ -0,0 +1,35 @@
1
+ /**
2
+ * @license
3
+ * Copyright (C) Gnucoop soc. coop.
4
+ *
5
+ * This file is part of the Advanced JSON forms (ajf).
6
+ *
7
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
8
+ * modify it under the terms of the GNU Affero General Public License as
9
+ * published by the Free Software Foundation, either version 3 of the License,
10
+ * or (at your option) any later version.
11
+ *
12
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
15
+ * General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Affero General Public License
18
+ * along with Advanced JSON forms (ajf).
19
+ * If not, see http://www.gnu.org/licenses/.
20
+ *
21
+ */
22
+ import { AjfCalendarEntry, AjfCalendarParams, AjfCalendarService, AjfCalendarView, AjfCalendarViewMode } from '@ajf/core/calendar';
23
+ export declare class AjfEthiopianCalendarService extends AjfCalendarService {
24
+ buildView(params: AjfCalendarParams): AjfCalendarView;
25
+ entryLabel(entry: AjfCalendarEntry): string;
26
+ monthBounds(date: Date, isoMode: boolean): {
27
+ start: Date;
28
+ end: Date;
29
+ };
30
+ nextView(viewDate: Date, viewMode: AjfCalendarViewMode): Date;
31
+ previousView(viewDate: Date, viewMode: AjfCalendarViewMode): Date;
32
+ private _ecMonthHeaderRow;
33
+ private _ecYearCalendarRows;
34
+ private _ecDecadeCalendarRows;
35
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @license
3
+ * Copyright (C) Gnucoop soc. coop.
4
+ *
5
+ * This file is part of the Advanced JSON forms (ajf).
6
+ *
7
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
8
+ * modify it under the terms of the GNU Affero General Public License as
9
+ * published by the Free Software Foundation, either version 3 of the License,
10
+ * or (at your option) any later version.
11
+ *
12
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
15
+ * General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Affero General Public License
18
+ * along with Advanced JSON forms (ajf).
19
+ * If not, see http://www.gnu.org/licenses/.
20
+ *
21
+ */
22
+ /** API * */
23
+ /** ethiopian to gregorian */
24
+ export declare function toGC(dateArray: [number, number, number] | [number, number, number, number]): [
25
+ number,
26
+ number,
27
+ number
28
+ ];
29
+ /** gregorian to ethiopian */
30
+ export declare function toEC(dateArray: [number, number, number]): [number, number, number];
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright (C) Gnucoop soc. coop.
4
+ *
5
+ * This file is part of the Advanced JSON forms (ajf).
6
+ *
7
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
8
+ * modify it under the terms of the GNU Affero General Public License as
9
+ * published by the Free Software Foundation, either version 3 of the License,
10
+ * or (at your option) any later version.
11
+ *
12
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
15
+ * General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Affero General Public License
18
+ * along with Advanced JSON forms (ajf).
19
+ * If not, see http://www.gnu.org/licenses/.
20
+ *
21
+ */
22
+ import { PipeTransform } from '@angular/core';
23
+ export declare class AjfEthiopianDatePipe implements PipeTransform {
24
+ transform(value: any): string | null;
25
+ }
@@ -0,0 +1,70 @@
1
+ /**
2
+ * @license
3
+ * Copyright (C) Gnucoop soc. coop.
4
+ *
5
+ * This file is part of the Advanced JSON forms (ajf).
6
+ *
7
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
8
+ * modify it under the terms of the GNU Affero General Public License as
9
+ * published by the Free Software Foundation, either version 3 of the License,
10
+ * or (at your option) any later version.
11
+ *
12
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
15
+ * General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Affero General Public License
18
+ * along with Advanced JSON forms (ajf).
19
+ * If not, see http://www.gnu.org/licenses/.
20
+ *
21
+ */
22
+ export declare class EthiopianDate {
23
+ private _year;
24
+ private _month;
25
+ private _date;
26
+ private _gc;
27
+ /**
28
+ * @param val - A numeric year value if the second and third parameters ar provided,
29
+ * It should be a date string if not
30
+ * @param month A zero-based numeric value for the month (0 for መስከረም, 12 for ጳጉሜን)
31
+ * @param day A numeric value equal for the day of the month.
32
+ */
33
+ constructor(val?: Date | string | number, month?: number, day?: number);
34
+ getDate(): number;
35
+ getDay(): number;
36
+ getDayOfWeek(): string;
37
+ getFullYear(): number;
38
+ getGregorianDate(): Date;
39
+ getGCWeekDay(): number;
40
+ getMonth(): number;
41
+ getMonthName(): string | null;
42
+ getShortMonthName(): string | null;
43
+ getHours(): number;
44
+ getMinutes(): number;
45
+ getSeconds(): number;
46
+ getMilliseconds(): number;
47
+ toString(): string;
48
+ /**
49
+ * Converts a Ethiopian date to Gregorian and returns Date instance representing Gregorian Date.
50
+ *
51
+ * @param val - A numeric year value if the second and third parameters are
52
+ * provided, it should be a date string if not
53
+ * @param month A zero-based numeric value for the month
54
+ * (0 for January, 11 for December)
55
+ * @param day A numeric value equal for the day of the month.
56
+ *
57
+ * @api public
58
+ */
59
+ static ethiopianToGregorian(val?: EthiopianDate | string | number, month?: number, day?: number): Date;
60
+ static gregorianToEthiopian(val?: Date | string | number, month?: number, day?: number): EthiopianDate;
61
+ /**
62
+ * Parse Ethiopian date from string
63
+ *
64
+ * @param dateString a date string to parse
65
+ * @param pattern a parsing pattern
66
+ *
67
+ * @returns EthiopianDate
68
+ */
69
+ static parse(dateString: string): EthiopianDate | null;
70
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
@@ -0,0 +1 @@
1
+ {"__symbolic":"module","version":4,"metadata":{"AjfEthiopianCalendarModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":28,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"AjfEthiopianDatePipe"}],"exports":[{"__symbolic":"reference","name":"AjfEthiopianDatePipe"}],"providers":[{"provide":{"__symbolic":"reference","module":"@ajf/core/calendar","name":"AjfCalendarService","line":36,"character":14},"useClass":{"__symbolic":"reference","name":"AjfEthiopianCalendarService"}}]}]}],"members":{}},"AjfEthiopianCalendarService":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ajf/core/calendar","name":"AjfCalendarService","line":61,"character":49},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":60,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"buildView":[{"__symbolic":"method"}],"entryLabel":[{"__symbolic":"method"}],"monthBounds":[{"__symbolic":"method"}],"nextView":[{"__symbolic":"method"}],"previousView":[{"__symbolic":"method"}],"_ecMonthHeaderRow":[{"__symbolic":"method"}],"_ecYearCalendarRows":[{"__symbolic":"method"}],"_ecDecadeCalendarRows":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"EthiopianDate":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Date"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"}]}],"getDate":[{"__symbolic":"method"}],"getDay":[{"__symbolic":"method"}],"getDayOfWeek":[{"__symbolic":"method"}],"getFullYear":[{"__symbolic":"method"}],"getGregorianDate":[{"__symbolic":"method"}],"getGCWeekDay":[{"__symbolic":"method"}],"getMonth":[{"__symbolic":"method"}],"getMonthName":[{"__symbolic":"method"}],"getShortMonthName":[{"__symbolic":"method"}],"getHours":[{"__symbolic":"method"}],"getMinutes":[{"__symbolic":"method"}],"getSeconds":[{"__symbolic":"method"}],"getMilliseconds":[{"__symbolic":"method"}],"toString":[{"__symbolic":"method"}]}},"AjfEthiopianDatePipe":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":25,"character":1}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Pipe","line":26,"character":1},"arguments":[{"name":"ajfEthiopianDate"}]}],"members":{"transform":[{"__symbolic":"method"}]}}},"origins":{"AjfEthiopianCalendarModule":"./calendar-module","AjfEthiopianCalendarService":"./calendar-service","EthiopianDate":"./ethiopian-date","AjfEthiopianDatePipe":"./ethiopian-date-pipe"},"importAs":"@ajf/calendars/ethiopian"}
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@ajf/calendars/ethiopian",
3
+ "main": "../bundles/calendars-ethiopian.umd.js",
4
+ "fesm2015": "../fesm2015/ethiopian.js",
5
+ "esm2015": "../esm2015/ethiopian/index.js",
6
+ "typings": "./index.d.ts",
7
+ "module": "../fesm2015/ethiopian.js",
8
+ "es2015": "../fesm2015/ethiopian.js"
9
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright (C) Gnucoop soc. coop.
4
+ *
5
+ * This file is part of the Advanced JSON forms (ajf).
6
+ *
7
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
8
+ * modify it under the terms of the GNU Affero General Public License as
9
+ * published by the Free Software Foundation, either version 3 of the License,
10
+ * or (at your option) any later version.
11
+ *
12
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
15
+ * General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Affero General Public License
18
+ * along with Advanced JSON forms (ajf).
19
+ * If not, see http://www.gnu.org/licenses/.
20
+ *
21
+ */
22
+ export * from './calendar-module';
23
+ export * from './calendar-service';
24
+ export * from './ethiopian-date';
25
+ export * from './ethiopian-date-pipe';
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @license
3
+ * Copyright (C) Gnucoop soc. coop.
4
+ *
5
+ * This file is part of the Advanced JSON forms (ajf).
6
+ *
7
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
8
+ * modify it under the terms of the GNU Affero General Public License as
9
+ * published by the Free Software Foundation, either version 3 of the License,
10
+ * or (at your option) any later version.
11
+ *
12
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
13
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
15
+ * General Public License for more details.
16
+ *
17
+ * You should have received a copy of the GNU Affero General Public License
18
+ * along with Advanced JSON forms (ajf).
19
+ * If not, see http://www.gnu.org/licenses/.
20
+ *
21
+ */
22
+ export declare const WEEK_NAMES: string[];
23
+ export declare const MONTHS_NAMES: string[];
24
+ export declare const SHORT_MONTHS_NAMES: string[];
@@ -0,0 +1,72 @@
1
+ import { Version } from '@angular/core';
2
+
3
+ /**
4
+ * @license
5
+ * Copyright (C) Gnucoop soc. coop.
6
+ *
7
+ * This file is part of the Advanced JSON forms (ajf).
8
+ *
9
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
10
+ * modify it under the terms of the GNU Affero General Public License as
11
+ * published by the Free Software Foundation, either version 3 of the License,
12
+ * or (at your option) any later version.
13
+ *
14
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
17
+ * General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU Affero General Public License
20
+ * along with Advanced JSON forms (ajf).
21
+ * If not, see http://www.gnu.org/licenses/.
22
+ *
23
+ */
24
+ /** Current version of Ajf. */
25
+ const VERSION = new Version('12.1.0');
26
+
27
+ /**
28
+ * @license
29
+ * Copyright (C) Gnucoop soc. coop.
30
+ *
31
+ * This file is part of the Advanced JSON forms (ajf).
32
+ *
33
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
34
+ * modify it under the terms of the GNU Affero General Public License as
35
+ * published by the Free Software Foundation, either version 3 of the License,
36
+ * or (at your option) any later version.
37
+ *
38
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
39
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
40
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
41
+ * General Public License for more details.
42
+ *
43
+ * You should have received a copy of the GNU Affero General Public License
44
+ * along with Advanced JSON forms (ajf).
45
+ * If not, see http://www.gnu.org/licenses/.
46
+ *
47
+ */
48
+
49
+ /**
50
+ * @license
51
+ * Copyright (C) Gnucoop soc. coop.
52
+ *
53
+ * This file is part of the Advanced JSON forms (ajf).
54
+ *
55
+ * Advanced JSON forms (ajf) is free software: you can redistribute it and/or
56
+ * modify it under the terms of the GNU Affero General Public License as
57
+ * published by the Free Software Foundation, either version 3 of the License,
58
+ * or (at your option) any later version.
59
+ *
60
+ * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,
61
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
62
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
63
+ * General Public License for more details.
64
+ *
65
+ * You should have received a copy of the GNU Affero General Public License
66
+ * along with Advanced JSON forms (ajf).
67
+ * If not, see http://www.gnu.org/licenses/.
68
+ *
69
+ */
70
+
71
+ export { VERSION };
72
+ //# sourceMappingURL=calendars.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendars.js","sources":["../../../../../../src/calendars/version.ts","../../../../../../src/calendars/public-api.ts","../../../../../../src/calendars/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of Ajf. */\nexport const VERSION = new Version('12.1.0');\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nexport * from './version';\n","/**\n * @license\n * Copyright (C) Gnucoop soc. coop.\n *\n * This file is part of the Advanced JSON forms (ajf).\n *\n * Advanced JSON forms (ajf) is free software: you can redistribute it and/or\n * modify it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * Advanced JSON forms (ajf) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero\n * General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with Advanced JSON forms (ajf).\n * If not, see http://www.gnu.org/licenses/.\n *\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;;AAwBA;MACa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;ACzBtD;;;;;;;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;"}