@jirawatpyk/aura-react 4.16.0 → 4.17.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.
@@ -0,0 +1,164 @@
1
+ 'use client';
2
+ const ERA = /^พ\.ศ\.\s?|\s?(BE|พ\.ศ\.)$/g;
3
+ const pad = function(n) {
4
+ return (n < 10 ? "0" : "") + n;
5
+ };
6
+ function toISO(d) {
7
+ return d ? d.getFullYear() + "-" + pad(d.getMonth() + 1) + "-" + pad(d.getDate()) : null;
8
+ }
9
+ function fromISO(s) {
10
+ if (!s) return null;
11
+ const m = /^(\d{4})-(\d{2})-(\d{2})$/.exec(s);
12
+ return m ? new Date(+m[1], +m[2] - 1, +m[3]) : null;
13
+ }
14
+ function addDays(d, n) {
15
+ return new Date(d.getFullYear(), d.getMonth(), d.getDate() + n);
16
+ }
17
+ function addMonths(d, n) {
18
+ const t = new Date(d.getFullYear(), d.getMonth() + n, 1);
19
+ const last = new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate();
20
+ return new Date(t.getFullYear(), t.getMonth(), Math.min(d.getDate(), last));
21
+ }
22
+ function same(a, b) {
23
+ return !!a && !!b && a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
24
+ }
25
+ const TAGS = { th: "th-TH", en: "en-GB", sv: "sv-SE" };
26
+ function defaultCalendar(locale) {
27
+ return locale === "th" ? "buddhist" : "gregory";
28
+ }
29
+ function localeTag(locale, calendar) {
30
+ const cal = calendar || defaultCalendar(locale);
31
+ return (TAGS[locale || "en"] || "en-GB") + "-u-ca-" + (cal === "gregory" ? "gregory" : "buddhist");
32
+ }
33
+ const DATE_TEXT = {
34
+ th: {
35
+ prevYears: "\u0E0A\u0E48\u0E27\u0E07\u0E1B\u0E35\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",
36
+ nextYears: "\u0E0A\u0E48\u0E27\u0E07\u0E1B\u0E35\u0E16\u0E31\u0E14\u0E44\u0E1B",
37
+ prevMonth: "\u0E40\u0E14\u0E37\u0E2D\u0E19\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",
38
+ nextMonth: "\u0E40\u0E14\u0E37\u0E2D\u0E19\u0E16\u0E31\u0E14\u0E44\u0E1B",
39
+ today: "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49",
40
+ clear: "\u0E25\u0E49\u0E32\u0E07",
41
+ chooseDate: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
42
+ datePlaceholder: "\u0E27\u0E27/\u0E14\u0E14/\u0E1B\u0E1B\u0E1B\u0E1B",
43
+ clearDate: "\u0E25\u0E49\u0E32\u0E07\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
44
+ openCalendar: "\u0E40\u0E1B\u0E34\u0E14\u0E1B\u0E0F\u0E34\u0E17\u0E34\u0E19",
45
+ chooseDates: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E0A\u0E48\u0E27\u0E07\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
46
+ rangePlaceholder: "\u0E27\u0E27/\u0E14\u0E14/\u0E1B\u0E1B\u0E1B\u0E1B \u2013 \u0E27\u0E27/\u0E14\u0E14/\u0E1B\u0E1B\u0E1B\u0E1B",
47
+ clearDates: "\u0E25\u0E49\u0E32\u0E07\u0E0A\u0E48\u0E27\u0E07\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48",
48
+ chooseStart: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E27\u0E31\u0E19\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",
49
+ chooseEnd: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E27\u0E31\u0E19\u0E2A\u0E34\u0E49\u0E19\u0E2A\u0E38\u0E14"
50
+ },
51
+ en: {
52
+ prevYears: "Previous years",
53
+ nextYears: "Next years",
54
+ prevMonth: "Previous month",
55
+ nextMonth: "Next month",
56
+ today: "Today",
57
+ clear: "Clear",
58
+ chooseDate: "Choose date",
59
+ datePlaceholder: "DD/MM/YYYY",
60
+ clearDate: "Clear date",
61
+ openCalendar: "Open calendar",
62
+ chooseDates: "Choose dates",
63
+ rangePlaceholder: "DD/MM/YYYY \u2013 DD/MM/YYYY",
64
+ clearDates: "Clear dates",
65
+ chooseStart: "Choose the start date",
66
+ chooseEnd: "Choose the end date"
67
+ },
68
+ sv: {
69
+ prevYears: "Tidigare \xE5r",
70
+ nextYears: "Senare \xE5r",
71
+ prevMonth: "F\xF6reg\xE5ende m\xE5nad",
72
+ nextMonth: "N\xE4sta m\xE5nad",
73
+ today: "Idag",
74
+ clear: "Rensa",
75
+ chooseDate: "V\xE4lj datum",
76
+ datePlaceholder: "\xE5\xE5\xE5\xE5-mm-dd",
77
+ clearDate: "Rensa datum",
78
+ openCalendar: "\xD6ppna kalendern",
79
+ chooseDates: "V\xE4lj datum",
80
+ rangePlaceholder: "\xE5\xE5\xE5\xE5-mm-dd \u2013 \xE5\xE5\xE5\xE5-mm-dd",
81
+ clearDates: "Rensa datumen",
82
+ chooseStart: "V\xE4lj startdatum",
83
+ chooseEnd: "V\xE4lj slutdatum"
84
+ }
85
+ };
86
+ function dateText(locale) {
87
+ return DATE_TEXT[locale || "en"] || DATE_TEXT.en;
88
+ }
89
+ const fmtCache = {};
90
+ const PRESETS = {
91
+ short: { day: "numeric", month: "short", year: "numeric" },
92
+ long: { day: "numeric", month: "long", year: "numeric" },
93
+ numeric: { day: "2-digit", month: "2-digit", year: "numeric" }
94
+ };
95
+ function fmt(tag, opts, d) {
96
+ const k = tag + JSON.stringify(opts);
97
+ if (!fmtCache[k]) fmtCache[k] = new Intl.DateTimeFormat(tag, opts);
98
+ return fmtCache[k].format(d);
99
+ }
100
+ function formatDate(iso, opts) {
101
+ const o = opts || {}, d = fromISO(iso);
102
+ if (!d) return "";
103
+ const f = typeof o.format === "object" ? o.format : PRESETS[o.format || "short"];
104
+ const loc = o.locale || "th";
105
+ return fmt(localeTag(loc, o.calendar || defaultCalendar(loc)), f, d).replace(ERA, "");
106
+ }
107
+ let MONTHS = null;
108
+ function monthIndex(word) {
109
+ if (!MONTHS) {
110
+ MONTHS = {};
111
+ ["th-TH", "en-GB", "sv-SE"].forEach(function(tag) {
112
+ ["short", "long"].forEach(function(w) {
113
+ for (let i = 0; i < 12; i++) {
114
+ const n = new Intl.DateTimeFormat(tag, { month: w }).format(new Date(2020, i, 1)).toLowerCase().replace(/\.$/, "");
115
+ MONTHS[n] = i;
116
+ if (/^[a-zåäö]/.test(n)) MONTHS[n.slice(0, 3)] = i;
117
+ }
118
+ });
119
+ });
120
+ }
121
+ const k = word.toLowerCase().replace(/\.$/, "");
122
+ return MONTHS[k] != null ? MONTHS[k] : -1;
123
+ }
124
+ function parseDate(text) {
125
+ const s = String(text || "").trim();
126
+ let m = /^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(s), y, mo, d;
127
+ if (m) {
128
+ y = +m[1];
129
+ mo = +m[2];
130
+ d = +m[3];
131
+ } else if (m = /^(\d{1,2})[\/.\-](\d{1,2})[\/.\-](\d{4})$/.exec(s)) {
132
+ d = +m[1];
133
+ mo = +m[2];
134
+ y = +m[3];
135
+ } else if ((m = /^(\d{1,2})\s+(\S+)\s+(\d{4})$/.exec(s.replace(ERA, "").trim())) && monthIndex(m[2]) >= 0) {
136
+ d = +m[1];
137
+ mo = monthIndex(m[2]) + 1;
138
+ y = +m[3];
139
+ } else return null;
140
+ if (y >= 2400) y -= 543;
141
+ const dt = new Date(y, mo - 1, d);
142
+ return dt.getMonth() === mo - 1 && dt.getDate() === d ? toISO(dt) : null;
143
+ }
144
+ export {
145
+ DATE_TEXT,
146
+ ERA,
147
+ MONTHS,
148
+ PRESETS,
149
+ TAGS,
150
+ addDays,
151
+ addMonths,
152
+ dateText,
153
+ defaultCalendar,
154
+ fmt,
155
+ fmtCache,
156
+ formatDate,
157
+ fromISO,
158
+ localeTag,
159
+ monthIndex,
160
+ pad,
161
+ parseDate,
162
+ same,
163
+ toISO
164
+ };
@@ -1,352 +1,6 @@
1
1
  'use client';
2
2
  import * as React from "react";
3
- const n = function(x) {
4
- return Number(x).toLocaleString("en");
5
- };
6
- const nsv = function(x) {
7
- return Number(x).toLocaleString("sv-SE");
8
- };
9
- const STRINGS = {
10
- en: {
11
- close: "Close",
12
- dismiss: "Dismiss",
13
- dismissToast: "Dismiss notification",
14
- showPassword: "Show password",
15
- filters: "Filters",
16
- search: "Search",
17
- clearFilters: "Clear all",
18
- results: function(n2) {
19
- return n2 === 1 ? "1 result" : n2.toLocaleString("en") + " results";
20
- },
21
- commandMenu: "Command menu",
22
- commandPlaceholder: "Type a command or search\u2026",
23
- commandHint: "\u2191\u2193 to move \xB7 Enter to open \xB7 Esc to close",
24
- errorSummary: function(n2) {
25
- return n2 === 1 ? "Fix 1 field to continue" : "Fix " + n2 + " fields to continue";
26
- },
27
- notifications: "Notifications",
28
- mainNav: "Main",
29
- breadcrumb: "Breadcrumb",
30
- navigation: "Navigation",
31
- openNav: "Open navigation",
32
- collapseNav: "Collapse sidebar",
33
- expandNav: "Expand sidebar",
34
- searching: "Searching\u2026",
35
- noMatches: "No matches",
36
- clear: function(what) {
37
- return "Clear " + (what || "selection");
38
- },
39
- keepTyping: function(total) {
40
- return "Keep typing to narrow " + n(total) + " options";
41
- },
42
- sortAsc: "Sort ascending",
43
- sortDesc: "Sort descending",
44
- pin: "Pin to left",
45
- unpin: "Unpin column",
46
- moveLeft: "Move left",
47
- moveRight: "Move right",
48
- hideColumn: "Hide column",
49
- resetColumns: "Reset columns",
50
- selectRows: "Select rows",
51
- selectAllRows: "Select all rows",
52
- deselectAllRows: "Deselect all rows",
53
- selectAll: "Select all",
54
- selectRow: function(k) {
55
- return "Select " + k;
56
- },
57
- selectedCount: function(c) {
58
- return n(c) + " selected";
59
- },
60
- pinned: "Pinned",
61
- columnOptions: function(label) {
62
- return label + " column options";
63
- },
64
- column: function(label) {
65
- return label ? label + " column" : "Column";
66
- },
67
- columns: "Columns",
68
- showHideColumns: "Show or hide columns",
69
- empty: "Nothing here yet",
70
- loading: "Loading\u2026",
71
- loadingRows: "Loading rows",
72
- range: function(a, b, total) {
73
- return a + "\u2013" + b + " of " + n(total);
74
- },
75
- page: function(p, total) {
76
- return "Page " + p + " of " + total;
77
- },
78
- prevPage: "Previous page",
79
- nextPage: "Next page",
80
- rowCount: function(c) {
81
- return n(c) + " rows";
82
- },
83
- actions: "Actions",
84
- optional: "optional",
85
- timePlaceholder: "hh:mm",
86
- timeInvalid: "Type a time like 09:30",
87
- timeOutOfRange: function(a, b) {
88
- return "Choose a time between " + a + " and " + b;
89
- },
90
- dropFiles: "Drag files here or",
91
- browse: "Choose files",
92
- browseOne: "Choose a file",
93
- remove: function(n2) {
94
- return "Remove " + n2;
95
- },
96
- fileTooBig: function(max) {
97
- return "Larger than " + max;
98
- },
99
- fileWrongType: "This file type isn\u2019t accepted",
100
- tooManyFiles: function(n2) {
101
- return "Up to " + n2 + " files";
102
- },
103
- colorScheme: "Colour scheme",
104
- increase: "Increase",
105
- decrease: "Decrease",
106
- stepDone: "completed",
107
- stepOf: function(i, total) {
108
- return "Step " + i + " of " + total;
109
- },
110
- schemeLight: "Light",
111
- schemeDark: "Dark",
112
- schemeSystem: "System",
113
- uploading: "Uploading\u2026",
114
- images: "Images",
115
- pagination: "Pagination",
116
- pageN: function(p) {
117
- return "Page " + p;
118
- },
119
- accepts: function(list, max) {
120
- return [list, max && "up to " + max + " each"].filter(Boolean).join(", ");
121
- }
122
- },
123
- th: {
124
- close: "\u0E1B\u0E34\u0E14",
125
- dismiss: "\u0E1B\u0E34\u0E14",
126
- dismissToast: "\u0E1B\u0E34\u0E14\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19",
127
- showPassword: "\u0E41\u0E2A\u0E14\u0E07\u0E23\u0E2B\u0E31\u0E2A\u0E1C\u0E48\u0E32\u0E19",
128
- filters: "\u0E15\u0E31\u0E27\u0E01\u0E23\u0E2D\u0E07",
129
- search: "\u0E04\u0E49\u0E19\u0E2B\u0E32",
130
- clearFilters: "\u0E25\u0E49\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
131
- results: function(n2) {
132
- return n2.toLocaleString("en") + " \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23";
133
- },
134
- commandMenu: "\u0E40\u0E21\u0E19\u0E39\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07",
135
- commandPlaceholder: "\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E2B\u0E23\u0E37\u0E2D\u0E04\u0E49\u0E19\u0E2B\u0E32\u2026",
136
- commandHint: "\u2191\u2193 \u0E40\u0E25\u0E37\u0E48\u0E2D\u0E19 \xB7 Enter \u0E40\u0E1B\u0E34\u0E14 \xB7 Esc \u0E1B\u0E34\u0E14",
137
- errorSummary: function(n2) {
138
- return "\u0E41\u0E01\u0E49\u0E44\u0E02 " + n2 + " \u0E0A\u0E48\u0E2D\u0E07\u0E01\u0E48\u0E2D\u0E19\u0E44\u0E1B\u0E15\u0E48\u0E2D";
139
- },
140
- notifications: "\u0E01\u0E32\u0E23\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19",
141
- mainNav: "\u0E40\u0E21\u0E19\u0E39\u0E2B\u0E25\u0E31\u0E01",
142
- breadcrumb: "\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07",
143
- navigation: "\u0E40\u0E21\u0E19\u0E39",
144
- openNav: "\u0E40\u0E1B\u0E34\u0E14\u0E40\u0E21\u0E19\u0E39",
145
- collapseNav: "\u0E22\u0E48\u0E2D\u0E41\u0E16\u0E1A\u0E40\u0E21\u0E19\u0E39",
146
- expandNav: "\u0E02\u0E22\u0E32\u0E22\u0E41\u0E16\u0E1A\u0E40\u0E21\u0E19\u0E39",
147
- searching: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E04\u0E49\u0E19\u0E2B\u0E32\u2026",
148
- noMatches: "\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E19",
149
- clear: function(what) {
150
- return "\u0E25\u0E49\u0E32\u0E07" + (what || "\u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01");
151
- },
152
- keepTyping: function(total) {
153
- return "\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E01\u0E23\u0E2D\u0E07\u0E08\u0E32\u0E01 " + n(total) + " \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23";
154
- },
155
- sortAsc: "\u0E40\u0E23\u0E35\u0E22\u0E07\u0E08\u0E32\u0E01\u0E19\u0E49\u0E2D\u0E22\u0E44\u0E1B\u0E21\u0E32\u0E01",
156
- sortDesc: "\u0E40\u0E23\u0E35\u0E22\u0E07\u0E08\u0E32\u0E01\u0E21\u0E32\u0E01\u0E44\u0E1B\u0E19\u0E49\u0E2D\u0E22",
157
- pin: "\u0E15\u0E23\u0E36\u0E07\u0E44\u0E27\u0E49\u0E0B\u0E49\u0E32\u0E22",
158
- unpin: "\u0E40\u0E25\u0E34\u0E01\u0E15\u0E23\u0E36\u0E07\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C",
159
- moveLeft: "\u0E22\u0E49\u0E32\u0E22\u0E44\u0E1B\u0E0B\u0E49\u0E32\u0E22",
160
- moveRight: "\u0E22\u0E49\u0E32\u0E22\u0E44\u0E1B\u0E02\u0E27\u0E32",
161
- hideColumn: "\u0E0B\u0E48\u0E2D\u0E19\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C",
162
- resetColumns: "\u0E04\u0E37\u0E19\u0E04\u0E48\u0E32\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C",
163
- selectRows: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E41\u0E16\u0E27",
164
- selectAllRows: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E17\u0E38\u0E01\u0E41\u0E16\u0E27",
165
- deselectAllRows: "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01\u0E01\u0E32\u0E23\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E17\u0E38\u0E01\u0E41\u0E16\u0E27",
166
- selectAll: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
167
- selectRow: function(k) {
168
- return "\u0E40\u0E25\u0E37\u0E2D\u0E01 " + k;
169
- },
170
- selectedCount: function(c) {
171
- return "\u0E40\u0E25\u0E37\u0E2D\u0E01 " + n(c) + " \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23";
172
- },
173
- pinned: "\u0E15\u0E23\u0E36\u0E07\u0E2D\u0E22\u0E39\u0E48",
174
- columnOptions: function(label) {
175
- return "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C " + label;
176
- },
177
- column: function(label) {
178
- return label ? "\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C " + label : "\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C";
179
- },
180
- columns: "\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C",
181
- showHideColumns: "\u0E41\u0E2A\u0E14\u0E07\u0E2B\u0E23\u0E37\u0E2D\u0E0B\u0E48\u0E2D\u0E19\u0E04\u0E2D\u0E25\u0E31\u0E21\u0E19\u0E4C",
182
- empty: "\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
183
- loading: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u2026",
184
- loadingRows: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
185
- range: function(a, b, total) {
186
- return a + "\u2013" + b + " \u0E08\u0E32\u0E01 " + n(total);
187
- },
188
- page: function(p, total) {
189
- return "\u0E2B\u0E19\u0E49\u0E32 " + p + " / " + total;
190
- },
191
- prevPage: "\u0E2B\u0E19\u0E49\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32",
192
- nextPage: "\u0E2B\u0E19\u0E49\u0E32\u0E16\u0E31\u0E14\u0E44\u0E1B",
193
- rowCount: function(c) {
194
- return n(c) + " \u0E41\u0E16\u0E27";
195
- },
196
- actions: "\u0E01\u0E32\u0E23\u0E08\u0E31\u0E14\u0E01\u0E32\u0E23",
197
- optional: "\u0E44\u0E21\u0E48\u0E1A\u0E31\u0E07\u0E04\u0E31\u0E1A",
198
- timePlaceholder: "\u0E0A\u0E0A:\u0E19\u0E19",
199
- timeInvalid: "\u0E1E\u0E34\u0E21\u0E1E\u0E4C\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A 09:30",
200
- timeOutOfRange: function(a, b) {
201
- return "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E40\u0E27\u0E25\u0E32\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07 " + a + "\u2013" + b + " \u0E19.";
202
- },
203
- dropFiles: "\u0E25\u0E32\u0E01\u0E44\u0E1F\u0E25\u0E4C\u0E21\u0E32\u0E27\u0E32\u0E07 \u0E2B\u0E23\u0E37\u0E2D",
204
- browse: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E1F\u0E25\u0E4C",
205
- browseOne: "\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E1F\u0E25\u0E4C",
206
- remove: function(n2) {
207
- return "\u0E25\u0E1A " + n2;
208
- },
209
- fileTooBig: function(max) {
210
- return "\u0E44\u0E1F\u0E25\u0E4C\u0E43\u0E2B\u0E0D\u0E48\u0E40\u0E01\u0E34\u0E19 " + max;
211
- },
212
- fileWrongType: "\u0E44\u0E21\u0E48\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A\u0E44\u0E1F\u0E25\u0E4C\u0E0A\u0E19\u0E34\u0E14\u0E19\u0E35\u0E49",
213
- tooManyFiles: function(n2) {
214
- return "\u0E41\u0E19\u0E1A\u0E44\u0E14\u0E49\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + n2 + " \u0E44\u0E1F\u0E25\u0E4C";
215
- },
216
- colorScheme: "\u0E42\u0E2B\u0E21\u0E14\u0E2A\u0E35",
217
- increase: "\u0E40\u0E1E\u0E34\u0E48\u0E21",
218
- decrease: "\u0E25\u0E14",
219
- stepDone: "\u0E40\u0E2A\u0E23\u0E47\u0E08\u0E41\u0E25\u0E49\u0E27",
220
- stepOf: function(i, total) {
221
- return "\u0E02\u0E31\u0E49\u0E19\u0E17\u0E35\u0E48 " + i + " \u0E08\u0E32\u0E01 " + total;
222
- },
223
- schemeLight: "\u0E2A\u0E27\u0E48\u0E32\u0E07",
224
- schemeDark: "\u0E21\u0E37\u0E14",
225
- schemeSystem: "\u0E15\u0E32\u0E21\u0E23\u0E30\u0E1A\u0E1A",
226
- uploading: "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E2D\u0E31\u0E1B\u0E42\u0E2B\u0E25\u0E14\u2026",
227
- images: "\u0E23\u0E39\u0E1B\u0E20\u0E32\u0E1E",
228
- pagination: "\u0E40\u0E25\u0E02\u0E2B\u0E19\u0E49\u0E32",
229
- pageN: function(p) {
230
- return "\u0E2B\u0E19\u0E49\u0E32 " + p;
231
- },
232
- accepts: function(list, max) {
233
- return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
234
- }
235
- },
236
- sv: {
237
- close: "St\xE4ng",
238
- dismiss: "St\xE4ng",
239
- dismissToast: "St\xE4ng aviseringen",
240
- showPassword: "Visa l\xF6senord",
241
- filters: "Filter",
242
- search: "S\xF6k",
243
- clearFilters: "Rensa alla",
244
- results: function(n2) {
245
- return n2 === 1 ? "1 tr\xE4ff" : n2.toLocaleString("sv-SE") + " tr\xE4ffar";
246
- },
247
- commandMenu: "Kommandomeny",
248
- commandPlaceholder: "Skriv ett kommando eller s\xF6k\u2026",
249
- commandHint: "\u2191\u2193 flytta \xB7 Enter \xF6ppna \xB7 Esc st\xE4ng",
250
- errorSummary: function(n2) {
251
- return n2 === 1 ? "R\xE4tta 1 f\xE4lt f\xF6r att forts\xE4tta" : "R\xE4tta " + n2 + " f\xE4lt f\xF6r att forts\xE4tta";
252
- },
253
- notifications: "Aviseringar",
254
- mainNav: "Huvudmeny",
255
- breadcrumb: "Br\xF6dsmulor",
256
- navigation: "Navigering",
257
- openNav: "\xD6ppna menyn",
258
- collapseNav: "F\xE4ll ihop sidof\xE4ltet",
259
- expandNav: "F\xE4ll ut sidof\xE4ltet",
260
- searching: "S\xF6ker\u2026",
261
- noMatches: "Inga tr\xE4ffar",
262
- clear: function(what) {
263
- return "Rensa " + (what || "urvalet");
264
- },
265
- keepTyping: function(total) {
266
- return "Skriv mer f\xF6r att begr\xE4nsa " + nsv(total) + " alternativ";
267
- },
268
- sortAsc: "Sortera stigande",
269
- sortDesc: "Sortera fallande",
270
- pin: "F\xE4st till v\xE4nster",
271
- unpin: "Lossa kolumnen",
272
- moveLeft: "Flytta v\xE4nster",
273
- moveRight: "Flytta h\xF6ger",
274
- hideColumn: "D\xF6lj kolumnen",
275
- resetColumns: "\xC5terst\xE4ll kolumner",
276
- selectRows: "V\xE4lj rader",
277
- selectAllRows: "V\xE4lj alla rader",
278
- deselectAllRows: "Avmarkera alla rader",
279
- selectAll: "V\xE4lj alla",
280
- selectRow: function(k) {
281
- return "V\xE4lj " + k;
282
- },
283
- selectedCount: function(c) {
284
- return nsv(c) + " valda";
285
- },
286
- pinned: "F\xE4st",
287
- columnOptions: function(label) {
288
- return "Alternativ f\xF6r kolumnen " + label;
289
- },
290
- column: function(label) {
291
- return label ? "Kolumnen " + label : "Kolumn";
292
- },
293
- columns: "Kolumner",
294
- showHideColumns: "Visa eller d\xF6lj kolumner",
295
- empty: "Inget h\xE4r \xE4nnu",
296
- loading: "Laddar\u2026",
297
- loadingRows: "Laddar rader",
298
- range: function(a, b, total) {
299
- return a + "\u2013" + b + " av " + nsv(total);
300
- },
301
- page: function(p, total) {
302
- return "Sida " + p + " av " + total;
303
- },
304
- prevPage: "F\xF6reg\xE5ende sida",
305
- nextPage: "N\xE4sta sida",
306
- rowCount: function(c) {
307
- return nsv(c) + " rader";
308
- },
309
- actions: "\xC5tg\xE4rder",
310
- optional: "valfritt",
311
- timePlaceholder: "tt:mm",
312
- timeInvalid: "Skriv en tid som 09:30",
313
- timeOutOfRange: function(a, b) {
314
- return "V\xE4lj en tid mellan " + a + " och " + b;
315
- },
316
- dropFiles: "Dra filer hit eller",
317
- browse: "V\xE4lj filer",
318
- browseOne: "V\xE4lj en fil",
319
- remove: function(n2) {
320
- return "Ta bort " + n2;
321
- },
322
- fileTooBig: function(max) {
323
- return "St\xF6rre \xE4n " + max;
324
- },
325
- fileWrongType: "Den h\xE4r filtypen godtas inte",
326
- tooManyFiles: function(n2) {
327
- return "H\xF6gst " + n2 + " filer";
328
- },
329
- colorScheme: "F\xE4rgl\xE4ge",
330
- increase: "\xD6ka",
331
- decrease: "Minska",
332
- stepDone: "klart",
333
- stepOf: function(i, total) {
334
- return "Steg " + i + " av " + total;
335
- },
336
- schemeLight: "Ljust",
337
- schemeDark: "M\xF6rkt",
338
- schemeSystem: "System",
339
- uploading: "Laddar upp\u2026",
340
- images: "Bilder",
341
- pagination: "Sidnumrering",
342
- pageN: function(p) {
343
- return "Sida " + p;
344
- },
345
- accepts: function(list, max) {
346
- return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
347
- }
348
- }
349
- };
3
+ import { STRINGS } from "./strings.js";
350
4
  const LocaleContext = React.createContext(null);
351
5
  function AuraProvider(props) {
352
6
  const outer = React.useContext(LocaleContext);
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import * as React from "react";
3
- const breakpoints = { sm: 640, md: 768, lg: 1024, xl: 1280 };
3
+ import { breakpoints } from "./breakpoints.js";
4
4
  const ORDER = ["base", "sm", "md", "lg", "xl"];
5
5
  function useBreakpoint() {
6
6
  return React.useSyncExternalStore(subscribe, current, function() {
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ const TONE_WORDS = {
3
+ ready: ["ready", "done", "complete", "completed", "approved", "live", "passed"],
4
+ progress: ["in progress", "in review", "review", "syncing", "running", "pending"],
5
+ blocked: ["blocked", "failed", "error", "rejected", "on hold", "cancelled"]
6
+ };
7
+ function toneFor(status) {
8
+ const s = String(status == null ? "" : status).trim().toLowerCase();
9
+ for (const t in TONE_WORDS) if (TONE_WORDS[t].indexOf(s) >= 0) return t;
10
+ return "neutral";
11
+ }
12
+ const TONE_ORDER = { neutral: 0, progress: 1, ready: 2, blocked: 3 };
13
+ export {
14
+ TONE_ORDER,
15
+ toneFor as statusTone,
16
+ toneFor
17
+ };