@limetech/lime-elements 36.3.0-next.13 → 36.3.0-next.15
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.
- package/dist/cjs/{dateFormatter-d7a8d40d.js → dateFormatter-5353def7.js} +227 -141
- package/dist/cjs/limel-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +9 -3
- package/dist/cjs/limel-split-button.cjs.entry.js +1 -1
- package/dist/collection/components/chip-set/chip-set.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +1 -1
- package/dist/collection/components/date-picker/dateFormatter.js +7 -3
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.js +1 -1
- package/dist/collection/components/date-picker/pickers/Picker.js +11 -2
- package/dist/collection/components/file/file.js +1 -1
- package/dist/collection/components/snackbar/snackbar.js +1 -1
- package/dist/collection/components/split-button/split-button.css +4 -0
- package/dist/esm/{dateFormatter-784c3334.js → dateFormatter-e13137e8.js} +227 -141
- package/dist/esm/limel-date-picker.entry.js +1 -1
- package/dist/esm/limel-flatpickr-adapter.entry.js +9 -3
- package/dist/esm/limel-split-button.entry.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/p-3a7b55ce.entry.js +1 -0
- package/dist/lime-elements/{p-d512656b.entry.js → p-7fb5f651.entry.js} +1 -1
- package/dist/lime-elements/{p-73df4d83.js → p-9900c44b.js} +5 -3
- package/dist/lime-elements/{p-c4a89055.entry.js → p-aec225e5.entry.js} +1 -1
- package/dist/types/components/date-picker/date.types.d.ts +1 -1
- package/dist/types/components/date-picker/dateFormatter.d.ts +3 -2
- package/dist/types/components/date-picker/pickers/Picker.d.ts +3 -0
- package/package.json +7 -7
- package/dist/lime-elements/p-e4f8d6a8.entry.js +0 -1
|
@@ -61,6 +61,89 @@ createCommonjsModule(function (module, exports) {
|
|
|
61
61
|
})));
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
+
createCommonjsModule(function (module, exports) {
|
|
65
|
+
(function (global, factory) {
|
|
66
|
+
typeof commonjsRequire === 'function' ? factory(moment) :
|
|
67
|
+
factory(global.moment);
|
|
68
|
+
}(commonjsGlobal, (function (moment) {
|
|
69
|
+
//! moment.js locale configuration
|
|
70
|
+
|
|
71
|
+
function processRelativeTime(number, withoutSuffix, key, isFuture) {
|
|
72
|
+
var format = {
|
|
73
|
+
m: ['eine Minute', 'einer Minute'],
|
|
74
|
+
h: ['eine Stunde', 'einer Stunde'],
|
|
75
|
+
d: ['ein Tag', 'einem Tag'],
|
|
76
|
+
dd: [number + ' Tage', number + ' Tagen'],
|
|
77
|
+
w: ['eine Woche', 'einer Woche'],
|
|
78
|
+
M: ['ein Monat', 'einem Monat'],
|
|
79
|
+
MM: [number + ' Monate', number + ' Monaten'],
|
|
80
|
+
y: ['ein Jahr', 'einem Jahr'],
|
|
81
|
+
yy: [number + ' Jahre', number + ' Jahren'],
|
|
82
|
+
};
|
|
83
|
+
return withoutSuffix ? format[key][0] : format[key][1];
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
var de = moment.defineLocale('de', {
|
|
87
|
+
months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
|
|
88
|
+
'_'
|
|
89
|
+
),
|
|
90
|
+
monthsShort:
|
|
91
|
+
'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
|
|
92
|
+
monthsParseExact: true,
|
|
93
|
+
weekdays:
|
|
94
|
+
'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
|
|
95
|
+
'_'
|
|
96
|
+
),
|
|
97
|
+
weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
|
|
98
|
+
weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
|
|
99
|
+
weekdaysParseExact: true,
|
|
100
|
+
longDateFormat: {
|
|
101
|
+
LT: 'HH:mm',
|
|
102
|
+
LTS: 'HH:mm:ss',
|
|
103
|
+
L: 'DD.MM.YYYY',
|
|
104
|
+
LL: 'D. MMMM YYYY',
|
|
105
|
+
LLL: 'D. MMMM YYYY HH:mm',
|
|
106
|
+
LLLL: 'dddd, D. MMMM YYYY HH:mm',
|
|
107
|
+
},
|
|
108
|
+
calendar: {
|
|
109
|
+
sameDay: '[heute um] LT [Uhr]',
|
|
110
|
+
sameElse: 'L',
|
|
111
|
+
nextDay: '[morgen um] LT [Uhr]',
|
|
112
|
+
nextWeek: 'dddd [um] LT [Uhr]',
|
|
113
|
+
lastDay: '[gestern um] LT [Uhr]',
|
|
114
|
+
lastWeek: '[letzten] dddd [um] LT [Uhr]',
|
|
115
|
+
},
|
|
116
|
+
relativeTime: {
|
|
117
|
+
future: 'in %s',
|
|
118
|
+
past: 'vor %s',
|
|
119
|
+
s: 'ein paar Sekunden',
|
|
120
|
+
ss: '%d Sekunden',
|
|
121
|
+
m: processRelativeTime,
|
|
122
|
+
mm: '%d Minuten',
|
|
123
|
+
h: processRelativeTime,
|
|
124
|
+
hh: '%d Stunden',
|
|
125
|
+
d: processRelativeTime,
|
|
126
|
+
dd: processRelativeTime,
|
|
127
|
+
w: processRelativeTime,
|
|
128
|
+
ww: '%d Wochen',
|
|
129
|
+
M: processRelativeTime,
|
|
130
|
+
MM: processRelativeTime,
|
|
131
|
+
y: processRelativeTime,
|
|
132
|
+
yy: processRelativeTime,
|
|
133
|
+
},
|
|
134
|
+
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
|
135
|
+
ordinal: '%d.',
|
|
136
|
+
week: {
|
|
137
|
+
dow: 1, // Monday is the first day of the week.
|
|
138
|
+
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
|
139
|
+
},
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
return de;
|
|
143
|
+
|
|
144
|
+
})));
|
|
145
|
+
});
|
|
146
|
+
|
|
64
147
|
createCommonjsModule(function (module, exports) {
|
|
65
148
|
(function (global, factory) {
|
|
66
149
|
typeof commonjsRequire === 'function' ? factory(moment) :
|
|
@@ -192,146 +275,6 @@ createCommonjsModule(function (module, exports) {
|
|
|
192
275
|
})));
|
|
193
276
|
});
|
|
194
277
|
|
|
195
|
-
createCommonjsModule(function (module, exports) {
|
|
196
|
-
(function (global, factory) {
|
|
197
|
-
typeof commonjsRequire === 'function' ? factory(moment) :
|
|
198
|
-
factory(global.moment);
|
|
199
|
-
}(commonjsGlobal, (function (moment) {
|
|
200
|
-
//! moment.js locale configuration
|
|
201
|
-
|
|
202
|
-
var nb = moment.defineLocale('nb', {
|
|
203
|
-
months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
|
|
204
|
-
'_'
|
|
205
|
-
),
|
|
206
|
-
monthsShort:
|
|
207
|
-
'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
|
|
208
|
-
monthsParseExact: true,
|
|
209
|
-
weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
|
|
210
|
-
weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
|
|
211
|
-
weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
|
|
212
|
-
weekdaysParseExact: true,
|
|
213
|
-
longDateFormat: {
|
|
214
|
-
LT: 'HH:mm',
|
|
215
|
-
LTS: 'HH:mm:ss',
|
|
216
|
-
L: 'DD.MM.YYYY',
|
|
217
|
-
LL: 'D. MMMM YYYY',
|
|
218
|
-
LLL: 'D. MMMM YYYY [kl.] HH:mm',
|
|
219
|
-
LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
|
|
220
|
-
},
|
|
221
|
-
calendar: {
|
|
222
|
-
sameDay: '[i dag kl.] LT',
|
|
223
|
-
nextDay: '[i morgen kl.] LT',
|
|
224
|
-
nextWeek: 'dddd [kl.] LT',
|
|
225
|
-
lastDay: '[i går kl.] LT',
|
|
226
|
-
lastWeek: '[forrige] dddd [kl.] LT',
|
|
227
|
-
sameElse: 'L',
|
|
228
|
-
},
|
|
229
|
-
relativeTime: {
|
|
230
|
-
future: 'om %s',
|
|
231
|
-
past: '%s siden',
|
|
232
|
-
s: 'noen sekunder',
|
|
233
|
-
ss: '%d sekunder',
|
|
234
|
-
m: 'ett minutt',
|
|
235
|
-
mm: '%d minutter',
|
|
236
|
-
h: 'en time',
|
|
237
|
-
hh: '%d timer',
|
|
238
|
-
d: 'en dag',
|
|
239
|
-
dd: '%d dager',
|
|
240
|
-
w: 'en uke',
|
|
241
|
-
ww: '%d uker',
|
|
242
|
-
M: 'en måned',
|
|
243
|
-
MM: '%d måneder',
|
|
244
|
-
y: 'ett år',
|
|
245
|
-
yy: '%d år',
|
|
246
|
-
},
|
|
247
|
-
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
|
248
|
-
ordinal: '%d.',
|
|
249
|
-
week: {
|
|
250
|
-
dow: 1, // Monday is the first day of the week.
|
|
251
|
-
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
|
252
|
-
},
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
return nb;
|
|
256
|
-
|
|
257
|
-
})));
|
|
258
|
-
});
|
|
259
|
-
|
|
260
|
-
createCommonjsModule(function (module, exports) {
|
|
261
|
-
(function (global, factory) {
|
|
262
|
-
typeof commonjsRequire === 'function' ? factory(moment) :
|
|
263
|
-
factory(global.moment);
|
|
264
|
-
}(commonjsGlobal, (function (moment) {
|
|
265
|
-
//! moment.js locale configuration
|
|
266
|
-
|
|
267
|
-
var sv = moment.defineLocale('sv', {
|
|
268
|
-
months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
|
|
269
|
-
'_'
|
|
270
|
-
),
|
|
271
|
-
monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
|
|
272
|
-
weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
|
|
273
|
-
weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
|
|
274
|
-
weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
|
|
275
|
-
longDateFormat: {
|
|
276
|
-
LT: 'HH:mm',
|
|
277
|
-
LTS: 'HH:mm:ss',
|
|
278
|
-
L: 'YYYY-MM-DD',
|
|
279
|
-
LL: 'D MMMM YYYY',
|
|
280
|
-
LLL: 'D MMMM YYYY [kl.] HH:mm',
|
|
281
|
-
LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
|
|
282
|
-
lll: 'D MMM YYYY HH:mm',
|
|
283
|
-
llll: 'ddd D MMM YYYY HH:mm',
|
|
284
|
-
},
|
|
285
|
-
calendar: {
|
|
286
|
-
sameDay: '[Idag] LT',
|
|
287
|
-
nextDay: '[Imorgon] LT',
|
|
288
|
-
lastDay: '[Igår] LT',
|
|
289
|
-
nextWeek: '[På] dddd LT',
|
|
290
|
-
lastWeek: '[I] dddd[s] LT',
|
|
291
|
-
sameElse: 'L',
|
|
292
|
-
},
|
|
293
|
-
relativeTime: {
|
|
294
|
-
future: 'om %s',
|
|
295
|
-
past: 'för %s sedan',
|
|
296
|
-
s: 'några sekunder',
|
|
297
|
-
ss: '%d sekunder',
|
|
298
|
-
m: 'en minut',
|
|
299
|
-
mm: '%d minuter',
|
|
300
|
-
h: 'en timme',
|
|
301
|
-
hh: '%d timmar',
|
|
302
|
-
d: 'en dag',
|
|
303
|
-
dd: '%d dagar',
|
|
304
|
-
M: 'en månad',
|
|
305
|
-
MM: '%d månader',
|
|
306
|
-
y: 'ett år',
|
|
307
|
-
yy: '%d år',
|
|
308
|
-
},
|
|
309
|
-
dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
|
|
310
|
-
ordinal: function (number) {
|
|
311
|
-
var b = number % 10,
|
|
312
|
-
output =
|
|
313
|
-
~~((number % 100) / 10) === 1
|
|
314
|
-
? ':e'
|
|
315
|
-
: b === 1
|
|
316
|
-
? ':a'
|
|
317
|
-
: b === 2
|
|
318
|
-
? ':a'
|
|
319
|
-
: b === 3
|
|
320
|
-
? ':e'
|
|
321
|
-
: ':e';
|
|
322
|
-
return number + output;
|
|
323
|
-
},
|
|
324
|
-
week: {
|
|
325
|
-
dow: 1, // Monday is the first day of the week.
|
|
326
|
-
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
|
327
|
-
},
|
|
328
|
-
});
|
|
329
|
-
|
|
330
|
-
return sv;
|
|
331
|
-
|
|
332
|
-
})));
|
|
333
|
-
});
|
|
334
|
-
|
|
335
278
|
createCommonjsModule(function (module, exports) {
|
|
336
279
|
(function (global, factory) {
|
|
337
280
|
typeof commonjsRequire === 'function' ? factory(moment) :
|
|
@@ -447,6 +390,71 @@ createCommonjsModule(function (module, exports) {
|
|
|
447
390
|
})));
|
|
448
391
|
});
|
|
449
392
|
|
|
393
|
+
createCommonjsModule(function (module, exports) {
|
|
394
|
+
(function (global, factory) {
|
|
395
|
+
typeof commonjsRequire === 'function' ? factory(moment) :
|
|
396
|
+
factory(global.moment);
|
|
397
|
+
}(commonjsGlobal, (function (moment) {
|
|
398
|
+
//! moment.js locale configuration
|
|
399
|
+
|
|
400
|
+
var nb = moment.defineLocale('nb', {
|
|
401
|
+
months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(
|
|
402
|
+
'_'
|
|
403
|
+
),
|
|
404
|
+
monthsShort:
|
|
405
|
+
'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
|
|
406
|
+
monthsParseExact: true,
|
|
407
|
+
weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
|
|
408
|
+
weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
|
|
409
|
+
weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
|
|
410
|
+
weekdaysParseExact: true,
|
|
411
|
+
longDateFormat: {
|
|
412
|
+
LT: 'HH:mm',
|
|
413
|
+
LTS: 'HH:mm:ss',
|
|
414
|
+
L: 'DD.MM.YYYY',
|
|
415
|
+
LL: 'D. MMMM YYYY',
|
|
416
|
+
LLL: 'D. MMMM YYYY [kl.] HH:mm',
|
|
417
|
+
LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',
|
|
418
|
+
},
|
|
419
|
+
calendar: {
|
|
420
|
+
sameDay: '[i dag kl.] LT',
|
|
421
|
+
nextDay: '[i morgen kl.] LT',
|
|
422
|
+
nextWeek: 'dddd [kl.] LT',
|
|
423
|
+
lastDay: '[i går kl.] LT',
|
|
424
|
+
lastWeek: '[forrige] dddd [kl.] LT',
|
|
425
|
+
sameElse: 'L',
|
|
426
|
+
},
|
|
427
|
+
relativeTime: {
|
|
428
|
+
future: 'om %s',
|
|
429
|
+
past: '%s siden',
|
|
430
|
+
s: 'noen sekunder',
|
|
431
|
+
ss: '%d sekunder',
|
|
432
|
+
m: 'ett minutt',
|
|
433
|
+
mm: '%d minutter',
|
|
434
|
+
h: 'en time',
|
|
435
|
+
hh: '%d timer',
|
|
436
|
+
d: 'en dag',
|
|
437
|
+
dd: '%d dager',
|
|
438
|
+
w: 'en uke',
|
|
439
|
+
ww: '%d uker',
|
|
440
|
+
M: 'en måned',
|
|
441
|
+
MM: '%d måneder',
|
|
442
|
+
y: 'ett år',
|
|
443
|
+
yy: '%d år',
|
|
444
|
+
},
|
|
445
|
+
dayOfMonthOrdinalParse: /\d{1,2}\./,
|
|
446
|
+
ordinal: '%d.',
|
|
447
|
+
week: {
|
|
448
|
+
dow: 1, // Monday is the first day of the week.
|
|
449
|
+
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
|
450
|
+
},
|
|
451
|
+
});
|
|
452
|
+
|
|
453
|
+
return nb;
|
|
454
|
+
|
|
455
|
+
})));
|
|
456
|
+
});
|
|
457
|
+
|
|
450
458
|
createCommonjsModule(function (module, exports) {
|
|
451
459
|
(function (global, factory) {
|
|
452
460
|
typeof commonjsRequire === 'function' ? factory(moment) :
|
|
@@ -557,6 +565,81 @@ createCommonjsModule(function (module, exports) {
|
|
|
557
565
|
})));
|
|
558
566
|
});
|
|
559
567
|
|
|
568
|
+
createCommonjsModule(function (module, exports) {
|
|
569
|
+
(function (global, factory) {
|
|
570
|
+
typeof commonjsRequire === 'function' ? factory(moment) :
|
|
571
|
+
factory(global.moment);
|
|
572
|
+
}(commonjsGlobal, (function (moment) {
|
|
573
|
+
//! moment.js locale configuration
|
|
574
|
+
|
|
575
|
+
var sv = moment.defineLocale('sv', {
|
|
576
|
+
months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(
|
|
577
|
+
'_'
|
|
578
|
+
),
|
|
579
|
+
monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
|
|
580
|
+
weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
|
|
581
|
+
weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
|
|
582
|
+
weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
|
|
583
|
+
longDateFormat: {
|
|
584
|
+
LT: 'HH:mm',
|
|
585
|
+
LTS: 'HH:mm:ss',
|
|
586
|
+
L: 'YYYY-MM-DD',
|
|
587
|
+
LL: 'D MMMM YYYY',
|
|
588
|
+
LLL: 'D MMMM YYYY [kl.] HH:mm',
|
|
589
|
+
LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
|
|
590
|
+
lll: 'D MMM YYYY HH:mm',
|
|
591
|
+
llll: 'ddd D MMM YYYY HH:mm',
|
|
592
|
+
},
|
|
593
|
+
calendar: {
|
|
594
|
+
sameDay: '[Idag] LT',
|
|
595
|
+
nextDay: '[Imorgon] LT',
|
|
596
|
+
lastDay: '[Igår] LT',
|
|
597
|
+
nextWeek: '[På] dddd LT',
|
|
598
|
+
lastWeek: '[I] dddd[s] LT',
|
|
599
|
+
sameElse: 'L',
|
|
600
|
+
},
|
|
601
|
+
relativeTime: {
|
|
602
|
+
future: 'om %s',
|
|
603
|
+
past: 'för %s sedan',
|
|
604
|
+
s: 'några sekunder',
|
|
605
|
+
ss: '%d sekunder',
|
|
606
|
+
m: 'en minut',
|
|
607
|
+
mm: '%d minuter',
|
|
608
|
+
h: 'en timme',
|
|
609
|
+
hh: '%d timmar',
|
|
610
|
+
d: 'en dag',
|
|
611
|
+
dd: '%d dagar',
|
|
612
|
+
M: 'en månad',
|
|
613
|
+
MM: '%d månader',
|
|
614
|
+
y: 'ett år',
|
|
615
|
+
yy: '%d år',
|
|
616
|
+
},
|
|
617
|
+
dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/,
|
|
618
|
+
ordinal: function (number) {
|
|
619
|
+
var b = number % 10,
|
|
620
|
+
output =
|
|
621
|
+
~~((number % 100) / 10) === 1
|
|
622
|
+
? ':e'
|
|
623
|
+
: b === 1
|
|
624
|
+
? ':a'
|
|
625
|
+
: b === 2
|
|
626
|
+
? ':a'
|
|
627
|
+
: b === 3
|
|
628
|
+
? ':e'
|
|
629
|
+
: ':e';
|
|
630
|
+
return number + output;
|
|
631
|
+
},
|
|
632
|
+
week: {
|
|
633
|
+
dow: 1, // Monday is the first day of the week.
|
|
634
|
+
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
|
635
|
+
},
|
|
636
|
+
});
|
|
637
|
+
|
|
638
|
+
return sv;
|
|
639
|
+
|
|
640
|
+
})));
|
|
641
|
+
});
|
|
642
|
+
|
|
560
643
|
class DateFormatter {
|
|
561
644
|
constructor(language = 'en') {
|
|
562
645
|
this.language = language;
|
|
@@ -574,7 +657,10 @@ class DateFormatter {
|
|
|
574
657
|
return null;
|
|
575
658
|
}
|
|
576
659
|
getLanguage() {
|
|
577
|
-
|
|
660
|
+
if (this.language === 'no') {
|
|
661
|
+
return 'nb';
|
|
662
|
+
}
|
|
663
|
+
return this.language;
|
|
578
664
|
}
|
|
579
665
|
getDateFormat(type) {
|
|
580
666
|
return ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-cdfd351d.js';
|
|
2
2
|
import { c as createRandomString } from './random-string-2246b81e.js';
|
|
3
3
|
import { i as isIOSDevice, a as isAndroidDevice } from './device-39db3b5f.js';
|
|
4
|
-
import { D as DateFormatter } from './dateFormatter-
|
|
4
|
+
import { D as DateFormatter } from './dateFormatter-e13137e8.js';
|
|
5
5
|
import { M as MDCTextField } from './component-288691f3.js';
|
|
6
6
|
import './_commonjsHelpers-5ec8f9b7.js';
|
|
7
7
|
import './moment-faa8a4a8.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-cdfd351d.js';
|
|
2
2
|
import { t as translate } from './translations-0d0ee941.js';
|
|
3
3
|
import { c as createCommonjsModule, a as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-5ec8f9b7.js';
|
|
4
|
-
import { D as DateFormatter } from './dateFormatter-
|
|
4
|
+
import { D as DateFormatter } from './dateFormatter-e13137e8.js';
|
|
5
5
|
import { m as moment } from './moment-faa8a4a8.js';
|
|
6
6
|
import { i as isIOSDevice, a as isAndroidDevice } from './device-39db3b5f.js';
|
|
7
7
|
import { e as eq } from './eq-c1c7f528.js';
|
|
@@ -6523,10 +6523,16 @@ class Picker {
|
|
|
6523
6523
|
});
|
|
6524
6524
|
}
|
|
6525
6525
|
getFlatpickrLang() {
|
|
6526
|
-
|
|
6526
|
+
if (this.language === 'nb') {
|
|
6527
|
+
return 'no';
|
|
6528
|
+
}
|
|
6529
|
+
return this.language;
|
|
6527
6530
|
}
|
|
6528
6531
|
getMomentLang() {
|
|
6529
|
-
|
|
6532
|
+
if (this.language === 'no') {
|
|
6533
|
+
return 'nb';
|
|
6534
|
+
}
|
|
6535
|
+
return this.language;
|
|
6530
6536
|
}
|
|
6531
6537
|
getPickerDate(selectedDates) {
|
|
6532
6538
|
return selectedDates[0] ? new Date(selectedDates[0].toJSON()) : null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-cdfd351d.js';
|
|
2
2
|
|
|
3
|
-
const splitButtonCss = ":host(limel-split-button.has-menu){--button-padding-right:2rem}:host(limel-split-button){display:inline-flex;isolation:isolate}:host(limel-split-button) *{box-sizing:border-box}limel-button{width:100%}limel-menu{display:flex;justify-content:flex-end;position:relative;z-index:1;padding:0.125rem;margin-left:calc(var(--button-padding-right) * -1);width:var(--button-padding-right)}limel-menu:before{transition:background-color 0.5s ease;content:\"\";position:absolute;inset:0.375rem auto 0.375rem 0.6875rem;width:1px;background-color:currentColor;opacity:0.2}limel-menu:not([disabled]){color:var(--mdc-theme-primary, rgb(var(--color-teal-default)))}limel-menu:not([disabled]).primary{color:var(--mdc-theme-on-primary, rgb(var(--color-white)))}limel-menu[disabled]{color:rgba(var(--contrast-1600), 0.37)}limel-menu:hover:before,limel-menu:focus-within:before{background-color:transparent}.menu-trigger{all:unset;text-align:center;font-weight:bold;border-radius:0.125rem;height:100%;width:1rem}.menu-trigger:not(:disabled){transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;color:var(--mdc-theme-on-surface);background-color:transparent;cursor:pointer}.menu-trigger:not(:disabled):hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.menu-trigger:not(:disabled):active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.menu-trigger:not(:disabled):focus{outline:none}.menu-trigger:not(:disabled):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.menu-trigger:not(:disabled):focus-visible,.menu-trigger:not(:disabled):hover{background-color:rgb(var(--color-white), 0.1)}.menu-trigger:before{content:\"\";position:absolute;inset:-0.25rem;z-index:-1}";
|
|
3
|
+
const splitButtonCss = ":host(limel-split-button.has-menu){--button-padding-right:2rem}:host(limel-split-button){display:inline-flex;isolation:isolate}:host(limel-split-button) *{box-sizing:border-box}:host([disabled]){pointer-events:none}limel-button{width:100%}limel-menu{display:flex;justify-content:flex-end;position:relative;z-index:1;padding:0.125rem;margin-left:calc(var(--button-padding-right) * -1);width:var(--button-padding-right)}limel-menu:before{transition:background-color 0.5s ease;content:\"\";position:absolute;inset:0.375rem auto 0.375rem 0.6875rem;width:1px;background-color:currentColor;opacity:0.2}limel-menu:not([disabled]){color:var(--mdc-theme-primary, rgb(var(--color-teal-default)))}limel-menu:not([disabled]).primary{color:var(--mdc-theme-on-primary, rgb(var(--color-white)))}limel-menu[disabled]{color:rgba(var(--contrast-1600), 0.37)}limel-menu:hover:before,limel-menu:focus-within:before{background-color:transparent}.menu-trigger{all:unset;text-align:center;font-weight:bold;border-radius:0.125rem;height:100%;width:1rem}.menu-trigger:not(:disabled){transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;color:var(--mdc-theme-on-surface);background-color:transparent;cursor:pointer}.menu-trigger:not(:disabled):hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.menu-trigger:not(:disabled):active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.menu-trigger:not(:disabled):focus{outline:none}.menu-trigger:not(:disabled):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.menu-trigger:not(:disabled):focus-visible,.menu-trigger:not(:disabled):hover{background-color:rgb(var(--color-white), 0.1)}.menu-trigger:before{content:\"\";position:absolute;inset:-0.25rem;z-index:-1}";
|
|
4
4
|
|
|
5
5
|
const SplitButton = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as l}from"./p-d4e788e1.js";(()=>{const l=import.meta.url,i={};return""!==l&&(i.resourcesUrl=new URL(".",l).href),e(i)})().then((e=>l([["p-0bf916a0",[[1,"limel-color-picker",{value:[513],label:[513],helperText:[513,"helper-text"],tooltipLabel:[513,"tooltip-label"],required:[516],readonly:[516],isOpen:[32]}]]],["p-cc9f89a9",[[1,"limel-dock",{dockItems:[16],dockFooterItems:[16],accessibleLabel:[513,"accessible-label"],expanded:[516],allowResize:[516,"allow-resize"],mobileBreakPoint:[514,"mobile-break-point"],useMobileLayout:[32]}]]],["p-cad7cda1",[[1,"limel-picker",{disabled:[4],readonly:[516],label:[1],searchLabel:[1,"search-label"],helperText:[513,"helper-text"],leadingIcon:[1,"leading-icon"],emptyResultMessage:[1,"empty-result-message"],required:[4],value:[16],searcher:[16],multiple:[4],delimiter:[513],actions:[16],actionPosition:[1,"action-position"],actionScrollBehavior:[1,"action-scroll-behavior"],badgeIcons:[516,"badge-icons"],items:[32],textValue:[32],loading:[32],chips:[32]}]]],["p-
|
|
1
|
+
import{p as e,b as l}from"./p-d4e788e1.js";(()=>{const l=import.meta.url,i={};return""!==l&&(i.resourcesUrl=new URL(".",l).href),e(i)})().then((e=>l([["p-0bf916a0",[[1,"limel-color-picker",{value:[513],label:[513],helperText:[513,"helper-text"],tooltipLabel:[513,"tooltip-label"],required:[516],readonly:[516],isOpen:[32]}]]],["p-cc9f89a9",[[1,"limel-dock",{dockItems:[16],dockFooterItems:[16],accessibleLabel:[513,"accessible-label"],expanded:[516],allowResize:[516,"allow-resize"],mobileBreakPoint:[514,"mobile-break-point"],useMobileLayout:[32]}]]],["p-cad7cda1",[[1,"limel-picker",{disabled:[4],readonly:[516],label:[1],searchLabel:[1,"search-label"],helperText:[513,"helper-text"],leadingIcon:[1,"leading-icon"],emptyResultMessage:[1,"empty-result-message"],required:[4],value:[16],searcher:[16],multiple:[4],delimiter:[513],actions:[16],actionPosition:[1,"action-position"],actionScrollBehavior:[1,"action-scroll-behavior"],badgeIcons:[516,"badge-icons"],items:[32],textValue:[32],loading:[32],chips:[32]}]]],["p-3a7b55ce",[[1,"limel-split-button",{label:[513],primary:[516],icon:[513],disabled:[516],items:[16]}]]],["p-7fb5f651",[[1,"limel-date-picker",{disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[16],type:[513],format:[513],language:[513],formattedValue:[32],internalFormat:[32],showPortal:[32]}]]],["p-52e18d94",[[1,"limel-button-group",{value:[16],disabled:[516],selectedButtonId:[32]}]]],["p-81df4a1f",[[1,"limel-info-tile",{value:[520],icon:[1],label:[513],prefix:[513],suffix:[513],disabled:[516],badge:[520],loading:[516],link:[16],progress:[16]}]]],["p-c234a991",[[1,"limel-select",{disabled:[516],readonly:[516],invalid:[516],required:[516],label:[513],helperText:[513,"helper-text"],value:[16],options:[16],multiple:[4],menuOpen:[32]}]]],["p-a0c78744",[[1,"limel-snackbar",{message:[1],timeout:[2],actionText:[1,"action-text"],dismissible:[4],multiline:[4],language:[1],show:[64]}]]],["p-3fda3473",[[1,"limel-tab-panel",{tabs:[1040]}]]],["p-d1187867",[[1,"limel-file",{value:[16],label:[513],required:[516],disabled:[516],readonly:[516],accept:[513],language:[1],isDraggingOverDropZone:[32]}]]],["p-5393213b",[[1,"limel-collapsible-section",{isOpen:[1540,"is-open"],header:[513],actions:[16]}]]],["p-b079fc71",[[1,"limel-dialog",{heading:[1],fullscreen:[516],open:[1540],closingActions:[16]}]]],["p-35a6ab13",[[1,"limel-progress-flow",{flowItems:[16],disabled:[4],readonly:[4]}]]],["p-2f2ea041",[[1,"limel-shortcut",{icon:[513],label:[513],disabled:[516],badge:[520],link:[16]}]]],["p-6784c5c3",[[1,"limel-table",{data:[16],columns:[16],mode:[1],layout:[1],pageSize:[2,"page-size"],totalRows:[2,"total-rows"],sorting:[16],activeRow:[1040],movableColumns:[4,"movable-columns"],loading:[4],page:[2],emptyMessage:[1,"empty-message"],aggregates:[16],selectable:[4],selection:[16]}]]],["p-bf3d6097",[[1,"limel-banner",{message:[513],icon:[513],isOpen:[32],open:[64],close:[64]}]]],["p-405207fa",[[1,"limel-code-editor",{value:[1],language:[1],readonly:[4],lineNumbers:[4,"line-numbers"],fold:[4],lint:[4],colorScheme:[1,"color-scheme"],random:[32]}]]],["p-6c38b505",[[1,"limel-config",{config:[16]}]]],["p-5338663b",[[1,"limel-flex-container",{direction:[513],justify:[513],align:[513],reverse:[516]}]]],["p-9ec08ebc",[[1,"limel-form",{schema:[16],value:[16],disabled:[4],propsFactory:[16],transformErrors:[16],errors:[16]}]]],["p-82cd7bb6",[[1,"limel-grid"]]],["p-8c4e3b46",[[1,"limel-slider",{disabled:[516],readonly:[516],factor:[514],label:[513],helperText:[513,"helper-text"],unit:[513],value:[514],valuemax:[514],valuemin:[514],step:[514],percentageClass:[32]}]]],["p-c6e913a4",[[1,"limel-switch",{label:[513],disabled:[516],readonly:[516],value:[516],fieldId:[32]}]]],["p-61b3352f",[[0,"limel-dock-button",{item:[16],expanded:[516],useMobileLayout:[516,"use-mobile-layout"],isOpen:[32]}]]],["p-5409b92f",[[1,"limel-color-picker-palette",{value:[513],label:[513],helperText:[513,"helper-text"],required:[516]}]]],["p-95fd48d0",[[1,"limel-menu-list",{items:[16],badgeIcons:[4,"badge-icons"],iconSize:[1,"icon-size"],type:[1],maxLinesSecondaryText:[2,"max-lines-secondary-text"]}]]],["p-f9958763",[[1,"limel-menu",{items:[16],disabled:[516],openDirection:[513,"open-direction"],open:[1540],badgeIcons:[516,"badge-icons"],gridLayout:[516,"grid-layout"]}]]],["p-55c8cb64",[[1,"limel-tab-bar",{tabs:[1040],canScrollLeft:[32],canScrollRight:[32]},[[9,"resize","handleWindowResize"]]]]],["p-95cefb5f",[[1,"limel-header",{icon:[1],heading:[1],subheading:[1],supportingText:[1,"supporting-text"]}]]],["p-cfaa685f",[[0,"limel-progress-flow-item",{item:[16],disabled:[4],readonly:[4]}]]],["p-eed2a202",[[1,"limel-checkbox",{disabled:[516],readonly:[516],label:[513],helperText:[513,"helper-text"],checked:[516],indeterminate:[516],required:[516],modified:[32]}]]],["p-aec225e5",[[1,"limel-flatpickr-adapter",{value:[16],type:[1],format:[1],isOpen:[4,"is-open"],inputElement:[16],language:[1]}]]],["p-004aad18",[[1,"limel-button",{label:[513],primary:[516],outlined:[516],icon:[513],disabled:[516],loading:[516],loadingFailed:[516,"loading-failed"],justLoaded:[32]}]]],["p-ff340a70",[[1,"limel-chip-set",{value:[16],type:[513],label:[513],helperText:[513,"helper-text"],disabled:[516],readonly:[516],inputType:[513,"input-type"],maxItems:[514,"max-items"],required:[516],searchLabel:[513,"search-label"],emptyInputOnBlur:[516,"empty-input-on-blur"],clearAllButton:[4,"clear-all-button"],leadingIcon:[513,"leading-icon"],delimiter:[513],language:[1],editMode:[32],textValue:[32],blurred:[32],inputChipIndexSelected:[32],getEditMode:[64],setFocus:[64],emptyInput:[64]}]]],["p-05d88196",[[1,"limel-circular-progress",{value:[2],maxValue:[2,"max-value"],prefix:[513],suffix:[1],displayPercentageColors:[4,"display-percentage-colors"],size:[513]}],[1,"limel-linear-progress",{value:[2],indeterminate:[4]}]]],["p-15c3ec8e",[[1,"limel-input-field",{disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],prefix:[513],suffix:[513],required:[516],value:[513],trailingIcon:[513,"trailing-icon"],leadingIcon:[513,"leading-icon"],pattern:[513],type:[513],formatNumber:[516,"format-number"],step:[520],max:[514],min:[514],maxlength:[514],minlength:[514],completions:[16],showLink:[516,"show-link"],isFocused:[32],isModified:[32],showCompletions:[32]}]]],["p-934456bc",[[1,"limel-icon-button",{icon:[513],elevated:[516],label:[513],disabled:[516]}]]],["p-a8d38277",[[1,"limel-spinner",{size:[513],limeBranded:[4,"lime-branded"]}]]],["p-91604294",[[1,"limel-badge",{label:[520]}]]],["p-90961075",[[1,"limel-portal",{openDirection:[1,"open-direction"],position:[1],containerId:[1,"container-id"],containerStyle:[16],parent:[16],inheritParentWidth:[4,"inherit-parent-width"],visible:[4]}]]],["p-93ad8b90",[[1,"limel-list",{items:[16],badgeIcons:[4,"badge-icons"],iconSize:[1,"icon-size"],type:[1],maxLinesSecondaryText:[2,"max-lines-secondary-text"]}],[1,"limel-menu-surface",{open:[4],allowClicksElement:[16]}]]],["p-029360c8",[[1,"limel-popover",{open:[4],openDirection:[513,"open-direction"]}],[1,"limel-tooltip",{elementId:[513,"element-id"],label:[513],helperLabel:[513,"helper-label"],maxlength:[514],open:[32]}],[1,"limel-popover-surface",{contentCollection:[16]}],[1,"limel-tooltip-content",{label:[513],helperLabel:[513,"helper-label"],maxlength:[514]}]]],["p-75d01713",[[1,"limel-icon",{size:[513],name:[513],badge:[516]}]]]],e)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as o,H as r}from"./p-d4e788e1.js";const i=class{constructor(r){e(this,r),this.select=t(this,"select",7),this.renderMenu=()=>{if(this.items.length)return o("limel-menu",{class:{primary:this.primary},disabled:this.disabled,items:this.items,openDirection:"bottom"},o("button",{class:"menu-trigger",slot:"trigger",disabled:this.disabled},"⋮"))},this.label=void 0,this.primary=!1,this.icon=void 0,this.disabled=!1,this.items=[]}render(){return o(r,{class:{"has-menu":!!this.items.length}},o("limel-button",{label:this.label,primary:this.primary,icon:this.icon,disabled:this.disabled}),this.renderMenu())}};i.style=':host(limel-split-button.has-menu){--button-padding-right:2rem}:host(limel-split-button){display:inline-flex;isolation:isolate}:host(limel-split-button) *{box-sizing:border-box}:host([disabled]){pointer-events:none}limel-button{width:100%}limel-menu{display:flex;justify-content:flex-end;position:relative;z-index:1;padding:0.125rem;margin-left:calc(var(--button-padding-right) * -1);width:var(--button-padding-right)}limel-menu:before{transition:background-color 0.5s ease;content:"";position:absolute;inset:0.375rem auto 0.375rem 0.6875rem;width:1px;background-color:currentColor;opacity:0.2}limel-menu:not([disabled]){color:var(--mdc-theme-primary, rgb(var(--color-teal-default)))}limel-menu:not([disabled]).primary{color:var(--mdc-theme-on-primary, rgb(var(--color-white)))}limel-menu[disabled]{color:rgba(var(--contrast-1600), 0.37)}limel-menu:hover:before,limel-menu:focus-within:before{background-color:transparent}.menu-trigger{all:unset;text-align:center;font-weight:bold;border-radius:0.125rem;height:100%;width:1rem}.menu-trigger:not(:disabled){transition:color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;color:var(--mdc-theme-on-surface);background-color:transparent;cursor:pointer}.menu-trigger:not(:disabled):hover{color:var(--mdc-theme-on-surface);background-color:var(--lime-elevated-surface-background-color);box-shadow:var(--button-shadow-hovered)}.menu-trigger:not(:disabled):active{box-shadow:var(--button-shadow-pressed);transform:translate3d(0, 0.08rem, 0)}.menu-trigger:not(:disabled):focus{outline:none}.menu-trigger:not(:disabled):focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}.menu-trigger:not(:disabled):focus-visible,.menu-trigger:not(:disabled):hover{background-color:rgb(var(--color-white), 0.1)}.menu-trigger:before{content:"";position:absolute;inset:-0.25rem;z-index:-1}';export{i as limel_split_button}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,g as e}from"./p-d4e788e1.js";import{c as h}from"./p-6c094f3f.js";import{i as a,a as n}from"./p-cc9ebbef.js";import{D as o}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s,g as e}from"./p-d4e788e1.js";import{c as h}from"./p-6c094f3f.js";import{i as a,a as n}from"./p-cc9ebbef.js";import{D as o}from"./p-9900c44b.js";import{M as l}from"./p-1c284626.js";import"./p-eab67c09.js";import"./p-945afca2.js";import"./p-48d4ef20.js";import"./p-cbc43682.js";import"./p-dcc97cc2.js";import"./p-d0a7de87.js";const d={date:"date",time:"time",week:a()?"date":"week",month:"month",quarter:"date",year:"date",datetime:"datetime-local",default:"datetime-local"},r={date:"Y-MM-DD",time:"HH:mm",week:"GGGG-[W]WW",month:"Y-MM","datetime-local":"Y-MM-DD[T]HH:mm"},m=class{constructor(s){t(this,s),this.change=i(this,"change",7),this.portalId=`date-picker-calendar-${h()}`,this.documentClickListener=t=>{"keydown"===t.type&&"Tab"!==t.key||document.querySelector(`#${this.portalId}`).contains(t.target)||this.hideCalendar()},this.disabled=!1,this.readonly=!1,this.invalid=!1,this.label=void 0,this.placeholder=void 0,this.helperText=void 0,this.required=!1,this.value=void 0,this.type="datetime",this.format=void 0,this.language="en",this.formattedValue=void 0,this.internalFormat=void 0,this.showPortal=!1,this.handleCalendarChange=this.handleCalendarChange.bind(this),this.handleInputElementChange=this.handleInputElementChange.bind(this),this.showCalendar=this.showCalendar.bind(this),this.dateFormatter=new o(this.language),this.clearValue=this.clearValue.bind(this),this.hideCalendar=this.hideCalendar.bind(this),this.onInputClick=this.onInputClick.bind(this),this.nativeChangeHandler=this.nativeChangeHandler.bind(this),this.preventBlurFromCalendarContainer=this.preventBlurFromCalendarContainer.bind(this)}componentWillLoad(){this.useNative=!this.readonly&&(a()||n()),this.updateInternalFormatAndType(),this.formattedValue=this.dateFormatter.formatDate(this.value,this.internalFormat)}componentWillUpdate(){this.updateInternalFormatAndType()}render(){const t={onAction:this.clearValue};if(this.value&&!this.readonly&&(t.trailingIcon="clear_symbol"),this.useNative)return s("limel-input-field",{disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,label:this.label,helperText:this.helperText,required:this.required,value:this.formattedValue,type:this.nativeType,onChange:this.nativeChangeHandler});const i=getComputedStyle(this.host).getPropertyValue("--dropdown-z-index");return[s("limel-input-field",Object.assign({disabled:this.disabled,readonly:this.readonly,invalid:this.invalid,label:this.label,placeholder:this.placeholder,helperText:this.helperText,required:this.required,value:this.formattedValue,onFocus:this.showCalendar,onBlur:this.hideCalendar,onClick:this.onInputClick,onChange:this.handleInputElementChange,ref:t=>this.textField=t},t)),s("limel-portal",{containerId:this.portalId,visible:this.showPortal,containerStyle:{"z-index":i}},s("limel-flatpickr-adapter",{format:this.internalFormat,language:this.language,type:this.type,value:this.value,ref:t=>this.datePickerCalendar=t,isOpen:this.showPortal,onChange:this.handleCalendarChange}))]}onValueChange(t,i){t!==i&&t!==this.formattedValue&&(this.formattedValue=this.dateFormatter.formatDate(this.value,this.internalFormat))}updateInternalFormatAndType(){this.nativeType=d[this.type||"default"],this.nativeFormat=r[this.nativeType],this.internalFormat=this.useNative?this.nativeFormat:this.format?this.format:this.dateFormatter.getDateFormat(this.type)}nativeChangeHandler(t){t.stopPropagation();const i=this.dateFormatter.parseDate(t.detail,this.internalFormat);this.formattedValue=t.detail,this.change.emit(i)}showCalendar(t){this.showPortal=!0;const i=this.textField.shadowRoot.querySelector("input");setTimeout((()=>{this.datePickerCalendar.inputElement=i})),t.stopPropagation(),document.addEventListener("mousedown",this.documentClickListener,{passive:!0}),document.addEventListener("keydown",this.documentClickListener,{passive:!0}),document.addEventListener("blur",this.preventBlurFromCalendarContainer,{capture:!0})}preventBlurFromCalendarContainer(t){t.relatedTarget===this.datePickerCalendar&&t.stopPropagation()}hideCalendar(){setTimeout((()=>{this.showPortal=!1})),document.removeEventListener("mousedown",this.documentClickListener),document.removeEventListener("keydown",this.documentClickListener),document.removeEventListener("blur",this.preventBlurFromCalendarContainer),this.pickerIsAutoClosing()||this.fixFlatpickrFocusBug()}fixFlatpickrFocusBug(){new l(this.textField.shadowRoot.querySelector(".mdc-text-field")).getDefaultFoundation().deactivateFocus()}handleCalendarChange(t){const i=t.detail;this.formattedValue=this.dateFormatter.formatDate(i,this.internalFormat),t.stopPropagation(),this.pickerIsAutoClosing()&&this.hideCalendar(),this.change.emit(i)}onInputClick(t){this.disabled||this.readonly||this.showPortal||this.showCalendar(t)}handleInputElementChange(t){""===t.detail&&this.clearValue(),t.stopPropagation()}pickerIsAutoClosing(){return"datetime"!==this.type&&"time"!==this.type}clearValue(){this.formattedValue="",this.change.emit(null)}get host(){return e(this)}static get watchers(){return{value:["onValueChange"]}}};m.style=":host(limel-date-picker){position:relative}limel-input-field[disabled],limel-input-field[readonly]{pointer-events:none}";export{m as limel_date_picker}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import{c as e,b as a,a as n}from"./p-eab67c09.js";import{m as t}from"./p-945afca2.js";e((function(){!function(e){e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}("function"==typeof a?t:n.moment)})),e((function(){!function(e){
|
|
2
2
|
//! moment.js locale configuration
|
|
3
|
-
|
|
3
|
+
function a(e,a,n){var t={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return a?t[n][0]:t[n][1]}e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:a,mm:"%d Minuten",h:a,hh:"%d Stunden",d:a,dd:a,w:a,ww:"%d Wochen",M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}("function"==typeof a?t:n.moment)})),e((function(){!function(e){
|
|
4
4
|
//! moment.js locale configuration
|
|
5
|
-
var a
|
|
5
|
+
var a="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),n=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",a[7],a[8],a[9]];function t(e,t,r,d){var s="";switch(r){case"s":return d?"muutaman sekunnin":"muutama sekunti";case"ss":s=d?"sekunnin":"sekuntia";break;case"m":return d?"minuutin":"minuutti";case"mm":s=d?"minuutin":"minuuttia";break;case"h":return d?"tunnin":"tunti";case"hh":s=d?"tunnin":"tuntia";break;case"d":return d?"päivän":"päivä";case"dd":s=d?"päivän":"päivää";break;case"M":return d?"kuukauden":"kuukausi";case"MM":s=d?"kuukauden":"kuukautta";break;case"y":return d?"vuoden":"vuosi";case"yy":s=d?"vuoden":"vuotta"}return function(e,t){return e<10?t?n[e]:a[e]:e}(e,d)+" "+s}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}("function"==typeof a?t:n.moment)})),e((function(){!function(e){
|
|
6
6
|
//! moment.js locale configuration
|
|
7
|
-
var a
|
|
7
|
+
var a=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i];e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,monthsShortStrictRegex:/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,a){switch(a){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}("function"==typeof a?t:n.moment)})),e((function(){!function(e){e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",w:"en uke",ww:"%d uker",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}("function"==typeof a?t:n.moment)})),e((function(){!function(e){
|
|
8
|
+
//! moment.js locale configuration
|
|
9
|
+
var a="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),t=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],r=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,t){return e?/-MMM-/.test(t)?n[e.month()]:a[e.month()]:a},monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:t,longMonthsParse:t,shortMonthsParse:t,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}("function"==typeof a?t:n.moment)})),e((function(){!function(e){e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var a=e%10;return e+(1==~~(e%100/10)?":e":1===a||2===a?":a":":e")},week:{dow:1,doy:4}})}("function"==typeof a?t:n.moment)}));class r{constructor(e="en"){this.language=e}formatDate(e,a){return e?t(e).locale(this.getLanguage()).format(a):""}parseDate(e,a){return e?t(e,a).toDate():null}getLanguage(){return"no"===this.language?"nb":this.language}getDateFormat(e){return{date:"L",time:"LT",week:"[w] W GGGG",month:"MM/YYYY",quarter:"[Q]Q YYYY",year:"YYYY",datetime:"L - LT"}[e]||"L - LT"}}export{r as D}
|