@fieldia/calendar 0.0.0-stage → 0.23.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 (75) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +125 -2
  3. package/package.json +37 -3
  4. package/src/index.d.mts +3 -0
  5. package/src/index.d.ts +3 -0
  6. package/src/index.js +6 -0
  7. package/src/index.js.map +1 -0
  8. package/src/index.mjs +2 -0
  9. package/src/index.mjs.map +1 -0
  10. package/src/lib/calendar-core.d.mts +83 -0
  11. package/src/lib/calendar-core.d.ts +83 -0
  12. package/src/lib/calendar-core.js +18 -0
  13. package/src/lib/calendar-core.js.map +1 -0
  14. package/src/lib/calendar-core.mjs +13 -0
  15. package/src/lib/calendar-core.mjs.map +1 -0
  16. package/src/lib/calendar-view.d.mts +11 -0
  17. package/src/lib/calendar-view.d.ts +11 -0
  18. package/src/lib/calendar-view.js +829 -0
  19. package/src/lib/calendar-view.js.map +1 -0
  20. package/src/lib/calendar-view.mjs +826 -0
  21. package/src/lib/calendar-view.mjs.map +1 -0
  22. package/src/lib/dates.d.mts +43 -0
  23. package/src/lib/dates.d.ts +43 -0
  24. package/src/lib/dates.js +100 -0
  25. package/src/lib/dates.js.map +1 -0
  26. package/src/lib/dates.mjs +80 -0
  27. package/src/lib/dates.mjs.map +1 -0
  28. package/src/lib/events.d.mts +58 -0
  29. package/src/lib/events.d.ts +58 -0
  30. package/src/lib/events.js +136 -0
  31. package/src/lib/events.js.map +1 -0
  32. package/src/lib/events.mjs +125 -0
  33. package/src/lib/events.mjs.map +1 -0
  34. package/src/lib/gestures.d.mts +11 -0
  35. package/src/lib/gestures.d.ts +11 -0
  36. package/src/lib/gestures.js +215 -0
  37. package/src/lib/gestures.js.map +1 -0
  38. package/src/lib/gestures.mjs +210 -0
  39. package/src/lib/gestures.mjs.map +1 -0
  40. package/src/lib/keys.d.mts +5 -0
  41. package/src/lib/keys.d.ts +5 -0
  42. package/src/lib/keys.js +151 -0
  43. package/src/lib/keys.js.map +1 -0
  44. package/src/lib/keys.mjs +146 -0
  45. package/src/lib/keys.mjs.map +1 -0
  46. package/src/lib/labels.d.mts +65 -0
  47. package/src/lib/labels.d.ts +65 -0
  48. package/src/lib/labels.js +193 -0
  49. package/src/lib/labels.js.map +1 -0
  50. package/src/lib/labels.mjs +188 -0
  51. package/src/lib/labels.mjs.map +1 -0
  52. package/src/lib/list-view.d.mts +11 -0
  53. package/src/lib/list-view.d.ts +11 -0
  54. package/src/lib/list-view.js +54 -0
  55. package/src/lib/list-view.js.map +1 -0
  56. package/src/lib/list-view.mjs +51 -0
  57. package/src/lib/list-view.mjs.map +1 -0
  58. package/src/lib/move-to.d.mts +15 -0
  59. package/src/lib/move-to.d.ts +15 -0
  60. package/src/lib/move-to.js +122 -0
  61. package/src/lib/move-to.js.map +1 -0
  62. package/src/lib/move-to.mjs +118 -0
  63. package/src/lib/move-to.mjs.map +1 -0
  64. package/src/lib/settings.d.mts +11 -0
  65. package/src/lib/settings.d.ts +11 -0
  66. package/src/lib/settings.js +3 -0
  67. package/src/lib/settings.js.map +1 -0
  68. package/src/lib/settings.mjs +2 -0
  69. package/src/lib/settings.mjs.map +1 -0
  70. package/src/lib/styles.d.mts +9 -0
  71. package/src/lib/styles.d.ts +9 -0
  72. package/src/lib/styles.js +165 -0
  73. package/src/lib/styles.js.map +1 -0
  74. package/src/lib/styles.mjs +161 -0
  75. package/src/lib/styles.mjs.map +1 -0
@@ -0,0 +1,65 @@
1
+ import type { CalendarView, Locale } from '@fieldia/core';
2
+ /** The words a calendar shows itself. `{name}`, `{when}`, `{n}` are filled in where they stand. */
3
+ export interface CalendarLabels {
4
+ /** Its name on the list's switcher, and for a screen reader. */
5
+ calendar: string;
6
+ today: string;
7
+ previous: Record<CalendarView, string>;
8
+ next: Record<CalendarView, string>;
9
+ views: Record<CalendarView, string>;
10
+ /** The group of Day, Week, Month and Agenda, for a screen reader. */
11
+ showAs: string;
12
+ /** The group of Today, back and on. */
13
+ moveThrough: string;
14
+ newRecord: string;
15
+ allDay: string;
16
+ /** The hours' column head, for a screen reader. */
17
+ time: string;
18
+ loadFailed: string;
19
+ retry: string;
20
+ nothing: string;
21
+ /** Under a month's day with more than it shows: "+2 more". */
22
+ more: string;
23
+ /** The same, said in full: "2 more on Wednesday 14 October". */
24
+ moreOn: string;
25
+ /** The column of records with no one. */
26
+ noResource: string;
27
+ tooMany: string;
28
+ /** How long a record is: "10:00 to 10:30". */
29
+ fromTo: string;
30
+ /** Who a record is with: "with Dr Karim". */
31
+ withWho: string;
32
+ /** Said of a slot nothing takes. */
33
+ free: string;
34
+ /** How many a slot holds: "1 record", "{n} records". */
35
+ holds: string;
36
+ holdsOne: string;
37
+ keysOpen: string;
38
+ keysMove: string;
39
+ keysOpenMove: string;
40
+ keysSlots: string;
41
+ keysDays: string;
42
+ moveTo: string;
43
+ moveTitle: string;
44
+ moveDay: string;
45
+ moveTime: string;
46
+ move: string;
47
+ cancel: string;
48
+ /** Move to…'s day refused: no day, or one far from the record's ("0026", "2062"). */
49
+ badDay: string;
50
+ badTime: string;
51
+ moved: string;
52
+ stretched: string;
53
+ undo: string;
54
+ undone: string;
55
+ close: string;
56
+ notMoved: string;
57
+ /** Why a record cannot be moved, when its source gives no reason of its own. */
58
+ cannotMove: string;
59
+ saving: string;
60
+ }
61
+ export declare const CALENDAR_LABELS: Record<Locale, CalendarLabels>;
62
+ /** The calendar's words in a page's language, the app's own over them. */
63
+ export declare function calendarLabels(locale: Locale, own?: Partial<CalendarLabels>): CalendarLabels;
64
+ /** Words with their `{name}`s filled in. */
65
+ export declare const fill: (words: string, values: Record<string, string | number>) => string;
@@ -0,0 +1,193 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fill = exports.CALENDAR_LABELS = void 0;
4
+ exports.calendarLabels = calendarLabels;
5
+ const en = {
6
+ calendar: 'Calendar',
7
+ today: 'Today',
8
+ previous: { day: 'Previous day', week: 'Previous week', month: 'Previous month', agenda: 'Previous week' },
9
+ next: { day: 'Next day', week: 'Next week', month: 'Next month', agenda: 'Next week' },
10
+ views: { day: 'Day', week: 'Week', month: 'Month', agenda: 'Agenda' },
11
+ showAs: 'Show the calendar by',
12
+ moveThrough: 'Move through the calendar',
13
+ newRecord: 'New',
14
+ allDay: 'All day',
15
+ time: 'Time',
16
+ loadFailed: 'The calendar could not be loaded.',
17
+ retry: 'Try again',
18
+ nothing: 'Nothing on these days.',
19
+ more: '+{n} more',
20
+ moreOn: '{n} more on {when}',
21
+ noResource: 'No one',
22
+ tooMany: 'Showing the first {shown} of {total}: search for fewer to see them all.',
23
+ fromTo: '{from} to {to}',
24
+ withWho: 'with {name}',
25
+ free: 'free',
26
+ holds: '{n} records',
27
+ holdsOne: '1 record',
28
+ keysOpen: 'Enter opens it.',
29
+ keysMove: 'M moves it.',
30
+ keysOpenMove: 'Enter opens it. M moves it.',
31
+ keysSlots: 'The arrow keys move between days and times; Enter makes a new record there.',
32
+ keysDays: 'The arrow keys move between days; Enter makes a new record there.',
33
+ moveTo: 'Move to…',
34
+ moveTitle: 'Move {name}',
35
+ moveDay: 'Day',
36
+ moveTime: 'Starts at',
37
+ move: 'Move',
38
+ cancel: 'Cancel',
39
+ badDay: 'Pick a day from {from} to {to}.',
40
+ badTime: 'Pick a time.',
41
+ moved: 'Moved {name} to {when}.',
42
+ stretched: '{name} now ends at {when}.',
43
+ undo: 'Undo',
44
+ undone: 'Put back as it was.',
45
+ close: 'Close',
46
+ notMoved: 'Not moved: {why}',
47
+ cannotMove: 'You cannot change this one.',
48
+ saving: 'Saving…',
49
+ };
50
+ const ar = {
51
+ calendar: 'التقويم',
52
+ today: 'اليوم',
53
+ previous: { day: 'اليوم السابق', week: 'الأسبوع السابق', month: 'الشهر السابق', agenda: 'الأسبوع السابق' },
54
+ next: { day: 'اليوم التالي', week: 'الأسبوع التالي', month: 'الشهر التالي', agenda: 'الأسبوع التالي' },
55
+ views: { day: 'يوم', week: 'أسبوع', month: 'شهر', agenda: 'جدول' },
56
+ showAs: 'عرض التقويم حسب',
57
+ moveThrough: 'التنقل في التقويم',
58
+ newRecord: 'جديد',
59
+ allDay: 'طوال اليوم',
60
+ time: 'الوقت',
61
+ loadFailed: 'تعذّر تحميل التقويم.',
62
+ retry: 'حاول مرة أخرى',
63
+ nothing: 'لا شيء في هذه الأيام.',
64
+ more: '+{n} أخرى',
65
+ moreOn: '{n} أخرى يوم {when}',
66
+ noResource: 'بلا أحد',
67
+ tooMany: 'يُعرض أول {shown} من {total}: ضيّق البحث لترى الكل.',
68
+ fromTo: 'من {from} إلى {to}',
69
+ withWho: 'مع {name}',
70
+ free: 'متاح',
71
+ holds: '{n} سجلات',
72
+ holdsOne: 'سجل واحد',
73
+ keysOpen: 'زر الإدخال يفتحه.',
74
+ keysMove: 'حرف M ينقله.',
75
+ keysOpenMove: 'زر الإدخال يفتحه. حرف M ينقله.',
76
+ keysSlots: 'مفاتيح الأسهم تتنقل بين الأيام والأوقات، وزر الإدخال ينشئ سجلًا جديدًا هناك.',
77
+ keysDays: 'مفاتيح الأسهم تتنقل بين الأيام، وزر الإدخال ينشئ سجلًا جديدًا هناك.',
78
+ moveTo: 'نقل إلى…',
79
+ moveTitle: 'نقل {name}',
80
+ moveDay: 'اليوم',
81
+ moveTime: 'يبدأ في',
82
+ move: 'نقل',
83
+ cancel: 'إلغاء',
84
+ badDay: 'اختر يومًا من {from} إلى {to}.',
85
+ badTime: 'اختر وقتًا.',
86
+ moved: 'نُقل {name} إلى {when}.',
87
+ stretched: 'صار {name} ينتهي في {when}.',
88
+ undo: 'تراجع',
89
+ undone: 'أُعيد كما كان.',
90
+ close: 'إغلاق',
91
+ notMoved: 'لم يُنقل: {why}',
92
+ cannotMove: 'لا يمكنك تغيير هذا السجل.',
93
+ saving: 'جارٍ الحفظ…',
94
+ };
95
+ const fr = {
96
+ calendar: 'Calendrier',
97
+ today: 'Aujourd’hui',
98
+ previous: { day: 'Jour précédent', week: 'Semaine précédente', month: 'Mois précédent', agenda: 'Semaine précédente' },
99
+ next: { day: 'Jour suivant', week: 'Semaine suivante', month: 'Mois suivant', agenda: 'Semaine suivante' },
100
+ views: { day: 'Jour', week: 'Semaine', month: 'Mois', agenda: 'Agenda' },
101
+ showAs: 'Afficher le calendrier par',
102
+ moveThrough: 'Parcourir le calendrier',
103
+ newRecord: 'Nouveau',
104
+ allDay: 'Toute la journée',
105
+ time: 'Heure',
106
+ loadFailed: 'Le calendrier n’a pas pu être chargé.',
107
+ retry: 'Réessayer',
108
+ nothing: 'Rien ces jours-ci.',
109
+ more: '+{n} de plus',
110
+ moreOn: '{n} de plus le {when}',
111
+ noResource: 'Personne',
112
+ tooMany: 'Les {shown} premiers sur {total} : affinez la recherche pour tout voir.',
113
+ fromTo: 'de {from} à {to}',
114
+ withWho: 'avec {name}',
115
+ free: 'libre',
116
+ holds: '{n} fiches',
117
+ holdsOne: '1 fiche',
118
+ keysOpen: 'Entrée l’ouvre.',
119
+ keysMove: 'M le déplace.',
120
+ keysOpenMove: 'Entrée l’ouvre. M le déplace.',
121
+ keysSlots: 'Les flèches passent d’un jour et d’une heure à l’autre ; Entrée crée une fiche à cet endroit.',
122
+ keysDays: 'Les flèches passent d’un jour à l’autre ; Entrée crée une fiche à cet endroit.',
123
+ moveTo: 'Déplacer vers…',
124
+ moveTitle: 'Déplacer {name}',
125
+ moveDay: 'Jour',
126
+ moveTime: 'Commence à',
127
+ move: 'Déplacer',
128
+ cancel: 'Annuler',
129
+ badDay: 'Choisissez un jour du {from} au {to}.',
130
+ badTime: 'Choisissez une heure.',
131
+ moved: '{name} déplacé au {when}.',
132
+ stretched: '{name} se termine maintenant à {when}.',
133
+ undo: 'Annuler',
134
+ undone: 'Remis comme avant.',
135
+ close: 'Fermer',
136
+ notMoved: 'Pas déplacé : {why}',
137
+ cannotMove: 'Vous ne pouvez pas modifier celle-ci.',
138
+ saving: 'Enregistrement…',
139
+ };
140
+ const de = {
141
+ calendar: 'Kalender',
142
+ today: 'Heute',
143
+ previous: { day: 'Vorheriger Tag', week: 'Vorherige Woche', month: 'Vorheriger Monat', agenda: 'Vorherige Woche' },
144
+ next: { day: 'Nächster Tag', week: 'Nächste Woche', month: 'Nächster Monat', agenda: 'Nächste Woche' },
145
+ views: { day: 'Tag', week: 'Woche', month: 'Monat', agenda: 'Agenda' },
146
+ showAs: 'Kalender zeigen nach',
147
+ moveThrough: 'Durch den Kalender blättern',
148
+ newRecord: 'Neu',
149
+ allDay: 'Ganztägig',
150
+ time: 'Uhrzeit',
151
+ loadFailed: 'Der Kalender konnte nicht geladen werden.',
152
+ retry: 'Erneut versuchen',
153
+ nothing: 'An diesen Tagen ist nichts.',
154
+ more: '+{n} weitere',
155
+ moreOn: '{n} weitere am {when}',
156
+ noResource: 'Niemand',
157
+ tooMany: 'Die ersten {shown} von {total}: Suche enger, um alle zu sehen.',
158
+ fromTo: '{from} bis {to}',
159
+ withWho: 'mit {name}',
160
+ free: 'frei',
161
+ holds: '{n} Einträge',
162
+ holdsOne: '1 Eintrag',
163
+ keysOpen: 'Eingabe öffnet ihn.',
164
+ keysMove: 'M verschiebt ihn.',
165
+ keysOpenMove: 'Eingabe öffnet ihn. M verschiebt ihn.',
166
+ keysSlots: 'Die Pfeiltasten wechseln zwischen Tagen und Zeiten; Eingabe legt dort einen neuen Eintrag an.',
167
+ keysDays: 'Die Pfeiltasten wechseln zwischen Tagen; Eingabe legt dort einen neuen Eintrag an.',
168
+ moveTo: 'Verschieben nach…',
169
+ moveTitle: '{name} verschieben',
170
+ moveDay: 'Tag',
171
+ moveTime: 'Beginnt um',
172
+ move: 'Verschieben',
173
+ cancel: 'Abbrechen',
174
+ badDay: 'Wählen Sie einen Tag vom {from} bis zum {to}.',
175
+ badTime: 'Wählen Sie eine Uhrzeit.',
176
+ moved: '{name} verschoben auf {when}.',
177
+ stretched: '{name} endet jetzt um {when}.',
178
+ undo: 'Rückgängig',
179
+ undone: 'Wie vorher zurückgesetzt.',
180
+ close: 'Schließen',
181
+ notMoved: 'Nicht verschoben: {why}',
182
+ cannotMove: 'Diesen Eintrag können Sie nicht ändern.',
183
+ saving: 'Wird gespeichert…',
184
+ };
185
+ exports.CALENDAR_LABELS = { en, ar, fr, de };
186
+ /** The calendar's words in a page's language, the app's own over them. */
187
+ function calendarLabels(locale, own) {
188
+ return { ...(exports.CALENDAR_LABELS[locale] ?? en), ...own };
189
+ }
190
+ /** Words with their `{name}`s filled in. */
191
+ const fill = (words, values) => words.replace(/\{(\w+)\}/g, (all, key) => (key in values ? String(values[key]) : all));
192
+ exports.fill = fill;
193
+ //# sourceMappingURL=labels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labels.js","sourceRoot":"","sources":["../../../../../libs/calendar/src/lib/labels.ts"],"names":[],"mappings":";;;AAyPA,wCAEC;AA7LD,MAAM,EAAE,GAAmB;IACzB,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,eAAe,EAAE;IAC1G,IAAI,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE;IACtF,KAAK,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE;IACrE,MAAM,EAAE,sBAAsB;IAC9B,WAAW,EAAE,2BAA2B;IACxC,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,SAAS;IACjB,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,mCAAmC;IAC/C,KAAK,EAAE,WAAW;IAClB,OAAO,EAAE,wBAAwB;IACjC,IAAI,EAAE,WAAW;IACjB,MAAM,EAAE,oBAAoB;IAC5B,UAAU,EAAE,QAAQ;IACpB,OAAO,EAA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,EAAE,yBAAyB;IACnC,UAAU,EAAE,yCAAyC;IACrD,MAAM,EAAE,mBAAmB;CAC5B,CAAC;AAEW,QAAA,eAAe,GAAmC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AAElF,0EAA0E;AAC1E,SAAgB,cAAc,CAAC,MAAc,EAAE,GAA6B;IAC1E,OAAO,EAAE,GAAG,CAAC,uBAAe,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC;AACxD,CAAC;AAED,4CAA4C;AACrC,MAAM,IAAI,GAAG,CAAC,KAAa,EAAE,MAAuC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,GAAG,EAAE,GAAW,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAAlK,QAAA,IAAI,QAA8J"}
@@ -0,0 +1,188 @@
1
+ const en = {
2
+ calendar: 'Calendar',
3
+ today: 'Today',
4
+ previous: { day: 'Previous day', week: 'Previous week', month: 'Previous month', agenda: 'Previous week' },
5
+ next: { day: 'Next day', week: 'Next week', month: 'Next month', agenda: 'Next week' },
6
+ views: { day: 'Day', week: 'Week', month: 'Month', agenda: 'Agenda' },
7
+ showAs: 'Show the calendar by',
8
+ moveThrough: 'Move through the calendar',
9
+ newRecord: 'New',
10
+ allDay: 'All day',
11
+ time: 'Time',
12
+ loadFailed: 'The calendar could not be loaded.',
13
+ retry: 'Try again',
14
+ nothing: 'Nothing on these days.',
15
+ more: '+{n} more',
16
+ moreOn: '{n} more on {when}',
17
+ noResource: 'No one',
18
+ tooMany: 'Showing the first {shown} of {total}: search for fewer to see them all.',
19
+ fromTo: '{from} to {to}',
20
+ withWho: 'with {name}',
21
+ free: 'free',
22
+ holds: '{n} records',
23
+ holdsOne: '1 record',
24
+ keysOpen: 'Enter opens it.',
25
+ keysMove: 'M moves it.',
26
+ keysOpenMove: 'Enter opens it. M moves it.',
27
+ keysSlots: 'The arrow keys move between days and times; Enter makes a new record there.',
28
+ keysDays: 'The arrow keys move between days; Enter makes a new record there.',
29
+ moveTo: 'Move to…',
30
+ moveTitle: 'Move {name}',
31
+ moveDay: 'Day',
32
+ moveTime: 'Starts at',
33
+ move: 'Move',
34
+ cancel: 'Cancel',
35
+ badDay: 'Pick a day from {from} to {to}.',
36
+ badTime: 'Pick a time.',
37
+ moved: 'Moved {name} to {when}.',
38
+ stretched: '{name} now ends at {when}.',
39
+ undo: 'Undo',
40
+ undone: 'Put back as it was.',
41
+ close: 'Close',
42
+ notMoved: 'Not moved: {why}',
43
+ cannotMove: 'You cannot change this one.',
44
+ saving: 'Saving…',
45
+ };
46
+ const ar = {
47
+ calendar: 'التقويم',
48
+ today: 'اليوم',
49
+ previous: { day: 'اليوم السابق', week: 'الأسبوع السابق', month: 'الشهر السابق', agenda: 'الأسبوع السابق' },
50
+ next: { day: 'اليوم التالي', week: 'الأسبوع التالي', month: 'الشهر التالي', agenda: 'الأسبوع التالي' },
51
+ views: { day: 'يوم', week: 'أسبوع', month: 'شهر', agenda: 'جدول' },
52
+ showAs: 'عرض التقويم حسب',
53
+ moveThrough: 'التنقل في التقويم',
54
+ newRecord: 'جديد',
55
+ allDay: 'طوال اليوم',
56
+ time: 'الوقت',
57
+ loadFailed: 'تعذّر تحميل التقويم.',
58
+ retry: 'حاول مرة أخرى',
59
+ nothing: 'لا شيء في هذه الأيام.',
60
+ more: '+{n} أخرى',
61
+ moreOn: '{n} أخرى يوم {when}',
62
+ noResource: 'بلا أحد',
63
+ tooMany: 'يُعرض أول {shown} من {total}: ضيّق البحث لترى الكل.',
64
+ fromTo: 'من {from} إلى {to}',
65
+ withWho: 'مع {name}',
66
+ free: 'متاح',
67
+ holds: '{n} سجلات',
68
+ holdsOne: 'سجل واحد',
69
+ keysOpen: 'زر الإدخال يفتحه.',
70
+ keysMove: 'حرف M ينقله.',
71
+ keysOpenMove: 'زر الإدخال يفتحه. حرف M ينقله.',
72
+ keysSlots: 'مفاتيح الأسهم تتنقل بين الأيام والأوقات، وزر الإدخال ينشئ سجلًا جديدًا هناك.',
73
+ keysDays: 'مفاتيح الأسهم تتنقل بين الأيام، وزر الإدخال ينشئ سجلًا جديدًا هناك.',
74
+ moveTo: 'نقل إلى…',
75
+ moveTitle: 'نقل {name}',
76
+ moveDay: 'اليوم',
77
+ moveTime: 'يبدأ في',
78
+ move: 'نقل',
79
+ cancel: 'إلغاء',
80
+ badDay: 'اختر يومًا من {from} إلى {to}.',
81
+ badTime: 'اختر وقتًا.',
82
+ moved: 'نُقل {name} إلى {when}.',
83
+ stretched: 'صار {name} ينتهي في {when}.',
84
+ undo: 'تراجع',
85
+ undone: 'أُعيد كما كان.',
86
+ close: 'إغلاق',
87
+ notMoved: 'لم يُنقل: {why}',
88
+ cannotMove: 'لا يمكنك تغيير هذا السجل.',
89
+ saving: 'جارٍ الحفظ…',
90
+ };
91
+ const fr = {
92
+ calendar: 'Calendrier',
93
+ today: 'Aujourd’hui',
94
+ previous: { day: 'Jour précédent', week: 'Semaine précédente', month: 'Mois précédent', agenda: 'Semaine précédente' },
95
+ next: { day: 'Jour suivant', week: 'Semaine suivante', month: 'Mois suivant', agenda: 'Semaine suivante' },
96
+ views: { day: 'Jour', week: 'Semaine', month: 'Mois', agenda: 'Agenda' },
97
+ showAs: 'Afficher le calendrier par',
98
+ moveThrough: 'Parcourir le calendrier',
99
+ newRecord: 'Nouveau',
100
+ allDay: 'Toute la journée',
101
+ time: 'Heure',
102
+ loadFailed: 'Le calendrier n’a pas pu être chargé.',
103
+ retry: 'Réessayer',
104
+ nothing: 'Rien ces jours-ci.',
105
+ more: '+{n} de plus',
106
+ moreOn: '{n} de plus le {when}',
107
+ noResource: 'Personne',
108
+ tooMany: 'Les {shown} premiers sur {total} : affinez la recherche pour tout voir.',
109
+ fromTo: 'de {from} à {to}',
110
+ withWho: 'avec {name}',
111
+ free: 'libre',
112
+ holds: '{n} fiches',
113
+ holdsOne: '1 fiche',
114
+ keysOpen: 'Entrée l’ouvre.',
115
+ keysMove: 'M le déplace.',
116
+ keysOpenMove: 'Entrée l’ouvre. M le déplace.',
117
+ keysSlots: 'Les flèches passent d’un jour et d’une heure à l’autre ; Entrée crée une fiche à cet endroit.',
118
+ keysDays: 'Les flèches passent d’un jour à l’autre ; Entrée crée une fiche à cet endroit.',
119
+ moveTo: 'Déplacer vers…',
120
+ moveTitle: 'Déplacer {name}',
121
+ moveDay: 'Jour',
122
+ moveTime: 'Commence à',
123
+ move: 'Déplacer',
124
+ cancel: 'Annuler',
125
+ badDay: 'Choisissez un jour du {from} au {to}.',
126
+ badTime: 'Choisissez une heure.',
127
+ moved: '{name} déplacé au {when}.',
128
+ stretched: '{name} se termine maintenant à {when}.',
129
+ undo: 'Annuler',
130
+ undone: 'Remis comme avant.',
131
+ close: 'Fermer',
132
+ notMoved: 'Pas déplacé : {why}',
133
+ cannotMove: 'Vous ne pouvez pas modifier celle-ci.',
134
+ saving: 'Enregistrement…',
135
+ };
136
+ const de = {
137
+ calendar: 'Kalender',
138
+ today: 'Heute',
139
+ previous: { day: 'Vorheriger Tag', week: 'Vorherige Woche', month: 'Vorheriger Monat', agenda: 'Vorherige Woche' },
140
+ next: { day: 'Nächster Tag', week: 'Nächste Woche', month: 'Nächster Monat', agenda: 'Nächste Woche' },
141
+ views: { day: 'Tag', week: 'Woche', month: 'Monat', agenda: 'Agenda' },
142
+ showAs: 'Kalender zeigen nach',
143
+ moveThrough: 'Durch den Kalender blättern',
144
+ newRecord: 'Neu',
145
+ allDay: 'Ganztägig',
146
+ time: 'Uhrzeit',
147
+ loadFailed: 'Der Kalender konnte nicht geladen werden.',
148
+ retry: 'Erneut versuchen',
149
+ nothing: 'An diesen Tagen ist nichts.',
150
+ more: '+{n} weitere',
151
+ moreOn: '{n} weitere am {when}',
152
+ noResource: 'Niemand',
153
+ tooMany: 'Die ersten {shown} von {total}: Suche enger, um alle zu sehen.',
154
+ fromTo: '{from} bis {to}',
155
+ withWho: 'mit {name}',
156
+ free: 'frei',
157
+ holds: '{n} Einträge',
158
+ holdsOne: '1 Eintrag',
159
+ keysOpen: 'Eingabe öffnet ihn.',
160
+ keysMove: 'M verschiebt ihn.',
161
+ keysOpenMove: 'Eingabe öffnet ihn. M verschiebt ihn.',
162
+ keysSlots: 'Die Pfeiltasten wechseln zwischen Tagen und Zeiten; Eingabe legt dort einen neuen Eintrag an.',
163
+ keysDays: 'Die Pfeiltasten wechseln zwischen Tagen; Eingabe legt dort einen neuen Eintrag an.',
164
+ moveTo: 'Verschieben nach…',
165
+ moveTitle: '{name} verschieben',
166
+ moveDay: 'Tag',
167
+ moveTime: 'Beginnt um',
168
+ move: 'Verschieben',
169
+ cancel: 'Abbrechen',
170
+ badDay: 'Wählen Sie einen Tag vom {from} bis zum {to}.',
171
+ badTime: 'Wählen Sie eine Uhrzeit.',
172
+ moved: '{name} verschoben auf {when}.',
173
+ stretched: '{name} endet jetzt um {when}.',
174
+ undo: 'Rückgängig',
175
+ undone: 'Wie vorher zurückgesetzt.',
176
+ close: 'Schließen',
177
+ notMoved: 'Nicht verschoben: {why}',
178
+ cannotMove: 'Diesen Eintrag können Sie nicht ändern.',
179
+ saving: 'Wird gespeichert…',
180
+ };
181
+ export const CALENDAR_LABELS = { en, ar, fr, de };
182
+ /** The calendar's words in a page's language, the app's own over them. */
183
+ export function calendarLabels(locale, own) {
184
+ return { ...(CALENDAR_LABELS[locale] ?? en), ...own };
185
+ }
186
+ /** Words with their `{name}`s filled in. */
187
+ export const fill = (words, values) => words.replace(/\{(\w+)\}/g, (all, key) => (key in values ? String(values[key]) : all));
188
+ //# sourceMappingURL=labels.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labels.mjs","sourceRoot":"","sources":["../../../../../libs/calendar/src/lib/labels.ts"],"names":[],"mappings":"AA8DA,MAAM,EAA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AW,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ListViewFactory } from '@fieldia/viewer';
2
+ import type { CalendarSettings } from './settings.mjs';
3
+ /**
4
+ * A list's records on a calendar, for the viewer's `listViews`: a list with
5
+ * `calendar` offers Calendar beside its table, and opens on it when the page
6
+ * says `opens: "calendar"`. The calendar's own code loads the first time one
7
+ * is shown, in a chunk of its own.
8
+ *
9
+ * mountViewer(host, { page, listViews: { ...calendarListViews(), ...mapListViews({ provider }) } })
10
+ */
11
+ export declare function calendarListViews(settings?: CalendarSettings): Record<string, ListViewFactory>;
@@ -0,0 +1,11 @@
1
+ import type { ListViewFactory } from '@fieldia/viewer';
2
+ import type { CalendarSettings } from './settings';
3
+ /**
4
+ * A list's records on a calendar, for the viewer's `listViews`: a list with
5
+ * `calendar` offers Calendar beside its table, and opens on it when the page
6
+ * says `opens: "calendar"`. The calendar's own code loads the first time one
7
+ * is shown, in a chunk of its own.
8
+ *
9
+ * mountViewer(host, { page, listViews: { ...calendarListViews(), ...mapListViews({ provider }) } })
10
+ */
11
+ export declare function calendarListViews(settings?: CalendarSettings): Record<string, ListViewFactory>;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.calendarListViews = calendarListViews;
4
+ /** Its name on the list's switcher, which shows before the calendar's own code has come. */
5
+ const NAME = { en: 'Calendar', ar: 'التقويم', fr: 'Calendrier', de: 'Kalender' };
6
+ const FAILED = { en: 'The calendar could not be loaded.', ar: 'تعذّر تحميل التقويم.', fr: 'Le calendrier n’a pas pu être chargé.', de: 'Der Kalender konnte nicht geladen werden.' };
7
+ /**
8
+ * A list's records on a calendar, for the viewer's `listViews`: a list with
9
+ * `calendar` offers Calendar beside its table, and opens on it when the page
10
+ * says `opens: "calendar"`. The calendar's own code loads the first time one
11
+ * is shown, in a chunk of its own.
12
+ *
13
+ * mountViewer(host, { page, listViews: { ...calendarListViews(), ...mapListViews({ provider }) } })
14
+ */
15
+ function calendarListViews(settings = {}) {
16
+ const calendar = Object.assign((context) => lazyCalendar(context, settings), {
17
+ label: (locale) => settings.labels?.[locale]?.calendar ?? NAME[locale] ?? NAME.en,
18
+ opens: (node) => node.calendar?.opens === 'calendar',
19
+ });
20
+ return { calendar };
21
+ }
22
+ /** The calendar's place at once, busy; the calendar in it once its code has come. */
23
+ function lazyCalendar(context, settings) {
24
+ const element = context.document.createElement('div');
25
+ element.className = 'fd-cal-holder';
26
+ element.setAttribute('aria-busy', 'true');
27
+ let part = null;
28
+ let gone = false;
29
+ const ready = Promise.resolve().then(() => require('./calendar-view')).then(({ calendarPart }) => {
30
+ if (gone)
31
+ return null;
32
+ part = calendarPart(context, settings);
33
+ element.replaceChildren(part.element);
34
+ element.removeAttribute('aria-busy');
35
+ return part;
36
+ }, () => {
37
+ element.removeAttribute('aria-busy');
38
+ element.setAttribute('role', 'alert');
39
+ element.textContent = settings.labels?.[context.locale]?.loadFailed ?? FAILED[context.locale] ?? FAILED.en;
40
+ return null;
41
+ });
42
+ return {
43
+ element,
44
+ reload: () => ready.then((loaded) => loaded?.reload()),
45
+ highlight: (id) => part?.highlight(id),
46
+ chosenChanged: () => part?.chosenChanged(),
47
+ shown: () => void ready.then((loaded) => loaded?.shown()),
48
+ destroy() {
49
+ gone = true;
50
+ part?.destroy();
51
+ },
52
+ };
53
+ }
54
+ //# sourceMappingURL=list-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-view.js","sourceRoot":"","sources":["../../../../../libs/calendar/src/lib/list-view.ts"],"names":[],"mappings":";;AAgBA,8CAMC;AAlBD,4FAA4F;AAC5F,MAAM,IAAI,GAA2B,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,EAAE,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,OAAO,CAAC,CAAC;QACtC,OAAO,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC,EACD,GAAG,EAAE;QACH,OAAO,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QACrC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACtC,OAAO,CAAC,WAAW,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,EAAE,CAAC;QAC3G,OAAO,IAAI,CAAC;IACd,CAAC,CACF,CAAC;IACF,OAAO;QACL,OAAO;QACP,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;QACtD,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC;QACtC,aAAa,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE;QAC1C,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC;QACzD,OAAO;YACL,IAAI,GAAG,IAAI,CAAC;YACZ,IAAI,EAAE,OAAO,EAAE,CAAC;QAClB,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,51 @@
1
+ /** Its name on the list's switcher, which shows before the calendar's own code has come. */
2
+ const NAME = { en: 'Calendar', ar: 'التقويم', fr: 'Calendrier', de: 'Kalender' };
3
+ const FAILED = { en: 'The calendar could not be loaded.', ar: 'تعذّر تحميل التقويم.', fr: 'Le calendrier n’a pas pu être chargé.', de: 'Der Kalender konnte nicht geladen werden.' };
4
+ /**
5
+ * A list's records on a calendar, for the viewer's `listViews`: a list with
6
+ * `calendar` offers Calendar beside its table, and opens on it when the page
7
+ * says `opens: "calendar"`. The calendar's own code loads the first time one
8
+ * is shown, in a chunk of its own.
9
+ *
10
+ * mountViewer(host, { page, listViews: { ...calendarListViews(), ...mapListViews({ provider }) } })
11
+ */
12
+ export function calendarListViews(settings = {}) {
13
+ const calendar = Object.assign((context) => lazyCalendar(context, settings), {
14
+ label: (locale) => settings.labels?.[locale]?.calendar ?? NAME[locale] ?? NAME.en,
15
+ opens: (node) => node.calendar?.opens === 'calendar',
16
+ });
17
+ return { calendar };
18
+ }
19
+ /** The calendar's place at once, busy; the calendar in it once its code has come. */
20
+ function lazyCalendar(context, settings) {
21
+ const element = context.document.createElement('div');
22
+ element.className = 'fd-cal-holder';
23
+ element.setAttribute('aria-busy', 'true');
24
+ let part = null;
25
+ let gone = false;
26
+ const ready = import('./calendar-view.mjs').then(({ calendarPart }) => {
27
+ if (gone)
28
+ return null;
29
+ part = calendarPart(context, settings);
30
+ element.replaceChildren(part.element);
31
+ element.removeAttribute('aria-busy');
32
+ return part;
33
+ }, () => {
34
+ element.removeAttribute('aria-busy');
35
+ element.setAttribute('role', 'alert');
36
+ element.textContent = settings.labels?.[context.locale]?.loadFailed ?? FAILED[context.locale] ?? FAILED.en;
37
+ return null;
38
+ });
39
+ return {
40
+ element,
41
+ reload: () => ready.then((loaded) => loaded?.reload()),
42
+ highlight: (id) => part?.highlight(id),
43
+ chosenChanged: () => part?.chosenChanged(),
44
+ shown: () => void ready.then((loaded) => loaded?.shown()),
45
+ destroy() {
46
+ gone = true;
47
+ part?.destroy();
48
+ },
49
+ };
50
+ }
51
+ //# sourceMappingURL=list-view.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list-view.mjs","sourceRoot":"","sources":["../../../../../libs/calendar/src/lib/list-view.ts"],"names":[],"mappings":"AAIA,4FAA4F;AAC5F,MAAM,IAAI,GAA2B,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE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CAAC,CAAC;QACvC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC,EACD,GAAG,EAAE;QACH,OAAO,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QACrC,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACtC,OAAO,CAAC,WAAW,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,EAAE,CAAC;QAC3G,OAAO,IAAI,CAAC;IACd,CAAC,CACF,CAAC;IACF,OAAO;QACL,OAAO;QACP,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;QACtD,SAAS,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC;QACtC,aAAa,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE;QAC1C,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,CAAC;QACzD,OAAO;YACL,IAAI,GAAG,IAAI,CAAC;YACZ,IAAI,EAAE,OAAO,EAAE,CAAC;QAClB,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { CalendarCore } from './calendar-core.mjs';
2
+ import { type CalendarEvent } from './events.mjs';
3
+ /** A small box of the calendar's own (Move to…, a crowded slot's list) put under what opened it, kept inside the calendar. */
4
+ export declare function placeUnder(cal: CalendarCore, box: HTMLElement, under: HTMLElement): void;
5
+ /**
6
+ * "Move to…", the keyboard's way to move a record and a phone's: a small
7
+ * dialog under the record with its day, its time and its person, kept inside
8
+ * the calendar. Move writes it as a drag does, with Undo; Escape, Cancel or a
9
+ * press outside closes it, the focus back on the record. A day that is no
10
+ * day, or one more than ten years from the record's, is refused in words.
11
+ */
12
+ export declare function moveTo(cal: CalendarCore): {
13
+ open(event: CalendarEvent, block: HTMLElement): void;
14
+ close(back?: HTMLElement): void;
15
+ };
@@ -0,0 +1,15 @@
1
+ import type { CalendarCore } from './calendar-core';
2
+ import { type CalendarEvent } from './events';
3
+ /** A small box of the calendar's own (Move to…, a crowded slot's list) put under what opened it, kept inside the calendar. */
4
+ export declare function placeUnder(cal: CalendarCore, box: HTMLElement, under: HTMLElement): void;
5
+ /**
6
+ * "Move to…", the keyboard's way to move a record and a phone's: a small
7
+ * dialog under the record with its day, its time and its person, kept inside
8
+ * the calendar. Move writes it as a drag does, with Undo; Escape, Cancel or a
9
+ * press outside closes it, the focus back on the record. A day that is no
10
+ * day, or one more than ten years from the record's, is refused in words.
11
+ */
12
+ export declare function moveTo(cal: CalendarCore): {
13
+ open(event: CalendarEvent, block: HTMLElement): void;
14
+ close(back?: HTMLElement): void;
15
+ };