@feedmepos/ui-library 1.2.9-rc.3 → 1.2.9
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/CHANGELOG.md +14 -0
- package/dist/components/button/FmButton.vue.d.ts +11 -2
- package/dist/components/form/time-picker/FmTimeRangePicker.vue.d.ts +9 -2
- package/dist/components.d.ts +212 -55
- package/dist/federation/{FmDatePicker.vue_vue_type_script_setup_true_lang-CFDk3Cr0.js → FmDatePicker.vue_vue_type_script_setup_true_lang-DQZORnCm.js} +1 -1
- package/dist/federation/{FmDateRangePicker.vue_vue_type_script_setup_true_lang-D7GnL25G.js → FmDateRangePicker.vue_vue_type_script_setup_true_lang-DEUI654i.js} +1 -1
- package/dist/federation/{FmGlobalSearch.vue_vue_type_script_setup_true_lang-BZovv_DN.js → FmGlobalSearch.vue_vue_type_script_setup_true_lang-DM8ljvSH.js} +1 -1
- package/dist/federation/{FmPageHead.vue_vue_type_script_setup_true_lang-CKN_IGaW.js → FmPageHead.vue_vue_type_script_setup_true_lang-B-1Rwp-3.js} +1 -1
- package/dist/federation/{FmSearch.vue_vue_type_script_setup_true_lang-DZYaq1zq.js → FmSearch.vue_vue_type_script_setup_true_lang-BeKlAwbr.js} +1 -1
- package/dist/federation/{FmTable.vue_vue_type_script_setup_true_lang-BO_GQ5LP.js → FmTable.vue_vue_type_script_setup_true_lang-AdysSkZ-.js} +1 -1
- package/dist/federation/{FmTabs.vue_vue_type_script_setup_true_lang-BsHOWB1P.js → FmTabs.vue_vue_type_script_setup_true_lang-BPYfn5OQ.js} +1 -1
- package/dist/federation/{FmTimePicker.vue_vue_type_script_setup_true_lang-CNCzNJjc.js → FmTimePicker.vue_vue_type_script_setup_true_lang-CqL9fh-D.js} +1 -1
- package/dist/federation/FmTimeRangePicker.vue_vue_type_script_setup_true_lang-gaZg50WV.js +1 -0
- package/dist/federation/__federation_expose_FmButton-CfZVt7rM.js +9 -0
- package/dist/federation/__federation_expose_FmButton-DwIx5V3J.css +1 -0
- package/dist/federation/{__federation_expose_FmDatePicker-DS76cdBs.js → __federation_expose_FmDatePicker-C0-odFH7.js} +1 -1
- package/dist/federation/{__federation_expose_FmDatePickerMobile-D79wX3e9.js → __federation_expose_FmDatePickerMobile-CwKFkWFb.js} +1 -1
- package/dist/federation/{__federation_expose_FmDateRangePicker-CYR7EcrX.js → __federation_expose_FmDateRangePicker-TuPPBl0K.js} +1 -1
- package/dist/federation/{__federation_expose_FmDateRangePickerMobile-BWwg3C2x.js → __federation_expose_FmDateRangePickerMobile-BQevE3K2.js} +1 -1
- package/dist/federation/{__federation_expose_FmDropField-KKWs3vsm.js → __federation_expose_FmDropField-CZjwJVMy.js} +1 -1
- package/dist/federation/{__federation_expose_FmDynamicDialog-CIgVhgXt.js → __federation_expose_FmDynamicDialog-Cqa8lvY_.js} +1 -1
- package/dist/federation/{__federation_expose_FmGlobalSearch-D5_BiVA0.js → __federation_expose_FmGlobalSearch-Bb_mpbuv.js} +1 -1
- package/dist/federation/{__federation_expose_FmPageHead-cAnMW_gf.js → __federation_expose_FmPageHead-B9PoIXQ7.js} +1 -1
- package/dist/federation/{__federation_expose_FmSearch-Be6Ez-8F.js → __federation_expose_FmSearch-BZRPX-wz.js} +1 -1
- package/dist/federation/__federation_expose_FmTab-BN-n8MtU.css +1 -0
- package/dist/federation/__federation_expose_FmTab-BjvJP-Ei.js +1 -0
- package/dist/federation/{__federation_expose_FmTable-POK-9UVF.js → __federation_expose_FmTable-AoGYHwx0.js} +1 -1
- package/dist/federation/{__federation_expose_FmTabs-CJUr-2sz.js → __federation_expose_FmTabs-BCOwfGtP.js} +1 -1
- package/dist/federation/{__federation_expose_FmTimePicker-7KciPd7K.js → __federation_expose_FmTimePicker-CWZViO3T.js} +1 -1
- package/dist/federation/{__federation_expose_FmTimeRangePicker-DSxn2GeW.js → __federation_expose_FmTimeRangePicker-D7wEI2bK.js} +1 -1
- package/dist/federation/{dialog-plugin-Bdd7Bqwm.js → dialog-plugin-CCUfMY81.js} +1 -1
- package/dist/federation/feedmepos-ui-components.js +1 -1
- package/dist/federation/index-Os5_1mM-.css +1 -0
- package/dist/federation/{index-DiOYnI-z.js → index-QS1laK_d.js} +1 -1
- package/dist/feedmepos-ui-library.js +1002 -937
- package/dist/feedmepos-ui-library.umd.cjs +11 -11
- package/dist/style.css +1 -1
- package/package.json +3 -1
- package/dist/federation/FmTimeRangePicker.vue_vue_type_script_setup_true_lang-DXlQQD2K.js +0 -1
- package/dist/federation/__federation_expose_FmButton-CJdqrqAb.js +0 -9
- package/dist/federation/__federation_expose_FmButton-CUd06qi1.css +0 -1
- package/dist/federation/__federation_expose_FmTab-BzNTJ2Zh.js +0 -1
- package/dist/federation/__federation_expose_FmTab-COVLgtjU.css +0 -1
- package/dist/federation/index-CpS8Uqth.css +0 -1
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 1.2.9 - 2024-07-01
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- `FmTabs`
|
|
6
|
+
- New UI for tabs
|
|
7
|
+
|
|
8
|
+
## 1.2.9-rc.4 - 2024-07-01
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
- `FmTimeRangePicker`
|
|
13
|
+
- Add `disableTimeCheck` prop to allow user to assign the end time to be the same/before the start time
|
|
14
|
+
|
|
1
15
|
## 1.2.9-rc.2 - 2024-06-26
|
|
2
16
|
|
|
3
17
|
### Fixes
|
|
@@ -44,7 +44,7 @@ export interface FmButtonProps {
|
|
|
44
44
|
/** Disable icon status */
|
|
45
45
|
disableIconStatus?: boolean;
|
|
46
46
|
}
|
|
47
|
-
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FmButtonProps>, {
|
|
47
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FmButtonProps>, {
|
|
48
48
|
variant: string;
|
|
49
49
|
label: string;
|
|
50
50
|
icon: string;
|
|
@@ -80,7 +80,11 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
80
80
|
prependIcon: string;
|
|
81
81
|
appendIcon: string;
|
|
82
82
|
loading: boolean;
|
|
83
|
-
}, {}
|
|
83
|
+
}, {}>, {
|
|
84
|
+
default?(_: {
|
|
85
|
+
disabled: boolean;
|
|
86
|
+
}): any;
|
|
87
|
+
}>;
|
|
84
88
|
export default _default;
|
|
85
89
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
86
90
|
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
@@ -99,3 +103,8 @@ type __VLS_WithDefaults<P, D> = {
|
|
|
99
103
|
type __VLS_Prettify<T> = {
|
|
100
104
|
[K in keyof T]: T[K];
|
|
101
105
|
} & {};
|
|
106
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
107
|
+
new (): {
|
|
108
|
+
$slots: S;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { FmTimePicker } from '../../../components/form/time-picker/FmTimePicker.vue';
|
|
2
2
|
export interface FmTimeRangePicker extends Omit<FmTimePicker, 'modelValue'> {
|
|
3
3
|
modelValue: string[] | null;
|
|
4
|
+
/**
|
|
5
|
+
* Disable to check is the end time is before the start time
|
|
6
|
+
*/
|
|
7
|
+
disableTimeCheck?: boolean;
|
|
4
8
|
}
|
|
5
|
-
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<
|
|
9
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FmTimeRangePicker>, {
|
|
6
10
|
label: string;
|
|
7
11
|
labelMark: string;
|
|
8
12
|
labelInfo: string;
|
|
@@ -14,9 +18,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
14
18
|
showValidBorder: boolean;
|
|
15
19
|
placeholder: string;
|
|
16
20
|
zIndex: undefined;
|
|
21
|
+
disableTimeCheck: boolean;
|
|
17
22
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
23
|
"update:modelValue": (value: string | null) => void;
|
|
19
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FmTimeRangePicker>, {
|
|
20
25
|
label: string;
|
|
21
26
|
labelMark: string;
|
|
22
27
|
labelInfo: string;
|
|
@@ -28,6 +33,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
28
33
|
showValidBorder: boolean;
|
|
29
34
|
placeholder: string;
|
|
30
35
|
zIndex: undefined;
|
|
36
|
+
disableTimeCheck: boolean;
|
|
31
37
|
}>>> & {
|
|
32
38
|
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
33
39
|
}, {
|
|
@@ -42,6 +48,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
42
48
|
helperState: "success" | "warning" | "none" | "error";
|
|
43
49
|
placeholder: string;
|
|
44
50
|
showValidBorder: boolean;
|
|
51
|
+
disableTimeCheck: boolean;
|
|
45
52
|
}, {}>, {
|
|
46
53
|
label?(_: {}): any;
|
|
47
54
|
"trigger-button"?(_: {
|
package/dist/components.d.ts
CHANGED
|
@@ -252,55 +252,187 @@ export declare const components: {
|
|
|
252
252
|
required: true;
|
|
253
253
|
};
|
|
254
254
|
}>>, {}, {}>;
|
|
255
|
-
FmButton:
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
type:
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
255
|
+
FmButton: {
|
|
256
|
+
new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
|
|
257
|
+
label: {
|
|
258
|
+
type: import("vue").PropType<string>;
|
|
259
|
+
default: string;
|
|
260
|
+
};
|
|
261
|
+
variant: {
|
|
262
|
+
type: import("vue").PropType<"primary" | "secondary" | "tertiary" | "destructive" | "plain" | "fab">;
|
|
263
|
+
default: string;
|
|
264
|
+
};
|
|
265
|
+
type: {
|
|
266
|
+
type: import("vue").PropType<"button" | "submit" | "reset">;
|
|
267
|
+
default: string;
|
|
268
|
+
};
|
|
269
|
+
size: {
|
|
270
|
+
type: import("vue").PropType<"md" | "lg">;
|
|
271
|
+
default: string;
|
|
272
|
+
};
|
|
273
|
+
disabled: {
|
|
274
|
+
type: import("vue").PropType<boolean>;
|
|
275
|
+
default: boolean;
|
|
276
|
+
};
|
|
277
|
+
icon: {
|
|
278
|
+
type: import("vue").PropType<string>;
|
|
279
|
+
default: string;
|
|
280
|
+
};
|
|
281
|
+
iconColor: {
|
|
282
|
+
type: import("vue").PropType<string>;
|
|
283
|
+
default: string;
|
|
284
|
+
};
|
|
285
|
+
iconPosition: {
|
|
286
|
+
type: import("vue").PropType<"prepend" | "append">;
|
|
287
|
+
default: string;
|
|
288
|
+
};
|
|
289
|
+
prependIcon: {
|
|
290
|
+
type: import("vue").PropType<string>;
|
|
291
|
+
default: string;
|
|
292
|
+
};
|
|
293
|
+
appendIcon: {
|
|
294
|
+
type: import("vue").PropType<string>;
|
|
295
|
+
default: string;
|
|
296
|
+
};
|
|
297
|
+
loading: {
|
|
298
|
+
type: import("vue").PropType<boolean>;
|
|
299
|
+
default: boolean;
|
|
300
|
+
};
|
|
301
|
+
disableIconStatus: {
|
|
302
|
+
type: import("vue").PropType<boolean>;
|
|
303
|
+
};
|
|
304
|
+
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
305
|
+
label: {
|
|
306
|
+
type: import("vue").PropType<string>;
|
|
307
|
+
default: string;
|
|
308
|
+
};
|
|
309
|
+
variant: {
|
|
310
|
+
type: import("vue").PropType<"primary" | "secondary" | "tertiary" | "destructive" | "plain" | "fab">;
|
|
311
|
+
default: string;
|
|
312
|
+
};
|
|
313
|
+
type: {
|
|
314
|
+
type: import("vue").PropType<"button" | "submit" | "reset">;
|
|
315
|
+
default: string;
|
|
316
|
+
};
|
|
317
|
+
size: {
|
|
318
|
+
type: import("vue").PropType<"md" | "lg">;
|
|
319
|
+
default: string;
|
|
320
|
+
};
|
|
321
|
+
disabled: {
|
|
322
|
+
type: import("vue").PropType<boolean>;
|
|
323
|
+
default: boolean;
|
|
324
|
+
};
|
|
325
|
+
icon: {
|
|
326
|
+
type: import("vue").PropType<string>;
|
|
327
|
+
default: string;
|
|
328
|
+
};
|
|
329
|
+
iconColor: {
|
|
330
|
+
type: import("vue").PropType<string>;
|
|
331
|
+
default: string;
|
|
332
|
+
};
|
|
333
|
+
iconPosition: {
|
|
334
|
+
type: import("vue").PropType<"prepend" | "append">;
|
|
335
|
+
default: string;
|
|
336
|
+
};
|
|
337
|
+
prependIcon: {
|
|
338
|
+
type: import("vue").PropType<string>;
|
|
339
|
+
default: string;
|
|
340
|
+
};
|
|
341
|
+
appendIcon: {
|
|
342
|
+
type: import("vue").PropType<string>;
|
|
343
|
+
default: string;
|
|
344
|
+
};
|
|
345
|
+
loading: {
|
|
346
|
+
type: import("vue").PropType<boolean>;
|
|
347
|
+
default: boolean;
|
|
348
|
+
};
|
|
349
|
+
disableIconStatus: {
|
|
350
|
+
type: import("vue").PropType<boolean>;
|
|
351
|
+
};
|
|
352
|
+
}>>, {
|
|
353
|
+
label: string;
|
|
354
|
+
variant: "primary" | "secondary" | "tertiary" | "destructive" | "plain" | "fab";
|
|
355
|
+
type: "button" | "submit" | "reset";
|
|
356
|
+
size: "md" | "lg";
|
|
357
|
+
disabled: boolean;
|
|
358
|
+
icon: string;
|
|
359
|
+
iconColor: string;
|
|
360
|
+
iconPosition: "prepend" | "append";
|
|
361
|
+
prependIcon: string;
|
|
362
|
+
appendIcon: string;
|
|
363
|
+
loading: boolean;
|
|
364
|
+
}, true, {}, {}, {
|
|
365
|
+
P: {};
|
|
366
|
+
B: {};
|
|
367
|
+
D: {};
|
|
368
|
+
C: {};
|
|
369
|
+
M: {};
|
|
370
|
+
Defaults: {};
|
|
371
|
+
}, Readonly<import("vue").ExtractPropTypes<{
|
|
372
|
+
label: {
|
|
373
|
+
type: import("vue").PropType<string>;
|
|
374
|
+
default: string;
|
|
375
|
+
};
|
|
376
|
+
variant: {
|
|
377
|
+
type: import("vue").PropType<"primary" | "secondary" | "tertiary" | "destructive" | "plain" | "fab">;
|
|
378
|
+
default: string;
|
|
379
|
+
};
|
|
380
|
+
type: {
|
|
381
|
+
type: import("vue").PropType<"button" | "submit" | "reset">;
|
|
382
|
+
default: string;
|
|
383
|
+
};
|
|
384
|
+
size: {
|
|
385
|
+
type: import("vue").PropType<"md" | "lg">;
|
|
386
|
+
default: string;
|
|
387
|
+
};
|
|
388
|
+
disabled: {
|
|
389
|
+
type: import("vue").PropType<boolean>;
|
|
390
|
+
default: boolean;
|
|
391
|
+
};
|
|
392
|
+
icon: {
|
|
393
|
+
type: import("vue").PropType<string>;
|
|
394
|
+
default: string;
|
|
395
|
+
};
|
|
396
|
+
iconColor: {
|
|
397
|
+
type: import("vue").PropType<string>;
|
|
398
|
+
default: string;
|
|
399
|
+
};
|
|
400
|
+
iconPosition: {
|
|
401
|
+
type: import("vue").PropType<"prepend" | "append">;
|
|
402
|
+
default: string;
|
|
403
|
+
};
|
|
404
|
+
prependIcon: {
|
|
405
|
+
type: import("vue").PropType<string>;
|
|
406
|
+
default: string;
|
|
407
|
+
};
|
|
408
|
+
appendIcon: {
|
|
409
|
+
type: import("vue").PropType<string>;
|
|
410
|
+
default: string;
|
|
411
|
+
};
|
|
412
|
+
loading: {
|
|
413
|
+
type: import("vue").PropType<boolean>;
|
|
414
|
+
default: boolean;
|
|
415
|
+
};
|
|
416
|
+
disableIconStatus: {
|
|
417
|
+
type: import("vue").PropType<boolean>;
|
|
418
|
+
};
|
|
419
|
+
}>>, {}, {}, {}, {}, {
|
|
420
|
+
label: string;
|
|
421
|
+
variant: "primary" | "secondary" | "tertiary" | "destructive" | "plain" | "fab";
|
|
422
|
+
type: "button" | "submit" | "reset";
|
|
423
|
+
size: "md" | "lg";
|
|
424
|
+
disabled: boolean;
|
|
425
|
+
icon: string;
|
|
426
|
+
iconColor: string;
|
|
427
|
+
iconPosition: "prepend" | "append";
|
|
428
|
+
prependIcon: string;
|
|
429
|
+
appendIcon: string;
|
|
430
|
+
loading: boolean;
|
|
431
|
+
}>;
|
|
432
|
+
__isFragment?: undefined;
|
|
433
|
+
__isTeleport?: undefined;
|
|
434
|
+
__isSuspense?: undefined;
|
|
435
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
304
436
|
label: {
|
|
305
437
|
type: import("vue").PropType<string>;
|
|
306
438
|
default: string;
|
|
@@ -348,7 +480,7 @@ export declare const components: {
|
|
|
348
480
|
disableIconStatus: {
|
|
349
481
|
type: import("vue").PropType<boolean>;
|
|
350
482
|
};
|
|
351
|
-
}>>, {
|
|
483
|
+
}>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
352
484
|
label: string;
|
|
353
485
|
variant: "primary" | "secondary" | "tertiary" | "destructive" | "plain" | "fab";
|
|
354
486
|
type: "button" | "submit" | "reset";
|
|
@@ -360,7 +492,13 @@ export declare const components: {
|
|
|
360
492
|
prependIcon: string;
|
|
361
493
|
appendIcon: string;
|
|
362
494
|
loading: boolean;
|
|
363
|
-
}, {}
|
|
495
|
+
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
496
|
+
$slots: {
|
|
497
|
+
default?(_: {
|
|
498
|
+
disabled: boolean;
|
|
499
|
+
}): any;
|
|
500
|
+
};
|
|
501
|
+
});
|
|
364
502
|
FmButtonGroup: import("vue").DefineComponent<{
|
|
365
503
|
modelValue: {
|
|
366
504
|
type: import("vue").PropType<import("./components/button-group/FmButtonGroup.vue").ButtonGroupItem | null>;
|
|
@@ -8967,7 +9105,7 @@ export declare const components: {
|
|
|
8967
9105
|
default: undefined;
|
|
8968
9106
|
};
|
|
8969
9107
|
modelValue: {
|
|
8970
|
-
type: import("vue").PropType<string | null>;
|
|
9108
|
+
type: import("vue").PropType<string[] | null>;
|
|
8971
9109
|
required: true;
|
|
8972
9110
|
};
|
|
8973
9111
|
disabled: {
|
|
@@ -9006,6 +9144,10 @@ export declare const components: {
|
|
|
9006
9144
|
type: import("vue").PropType<boolean>;
|
|
9007
9145
|
default: boolean;
|
|
9008
9146
|
};
|
|
9147
|
+
disableTimeCheck: {
|
|
9148
|
+
type: import("vue").PropType<boolean>;
|
|
9149
|
+
default: boolean;
|
|
9150
|
+
};
|
|
9009
9151
|
}>> & {
|
|
9010
9152
|
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
9011
9153
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -9020,7 +9162,7 @@ export declare const components: {
|
|
|
9020
9162
|
default: undefined;
|
|
9021
9163
|
};
|
|
9022
9164
|
modelValue: {
|
|
9023
|
-
type: import("vue").PropType<string | null>;
|
|
9165
|
+
type: import("vue").PropType<string[] | null>;
|
|
9024
9166
|
required: true;
|
|
9025
9167
|
};
|
|
9026
9168
|
disabled: {
|
|
@@ -9059,6 +9201,10 @@ export declare const components: {
|
|
|
9059
9201
|
type: import("vue").PropType<boolean>;
|
|
9060
9202
|
default: boolean;
|
|
9061
9203
|
};
|
|
9204
|
+
disableTimeCheck: {
|
|
9205
|
+
type: import("vue").PropType<boolean>;
|
|
9206
|
+
default: boolean;
|
|
9207
|
+
};
|
|
9062
9208
|
}>> & {
|
|
9063
9209
|
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
9064
9210
|
}, {
|
|
@@ -9073,6 +9219,7 @@ export declare const components: {
|
|
|
9073
9219
|
helperState: "success" | "warning" | "none" | "error";
|
|
9074
9220
|
placeholder: string;
|
|
9075
9221
|
showValidBorder: boolean;
|
|
9222
|
+
disableTimeCheck: boolean;
|
|
9076
9223
|
}, true, {}, {}, {
|
|
9077
9224
|
P: {};
|
|
9078
9225
|
B: {};
|
|
@@ -9090,7 +9237,7 @@ export declare const components: {
|
|
|
9090
9237
|
default: undefined;
|
|
9091
9238
|
};
|
|
9092
9239
|
modelValue: {
|
|
9093
|
-
type: import("vue").PropType<string | null>;
|
|
9240
|
+
type: import("vue").PropType<string[] | null>;
|
|
9094
9241
|
required: true;
|
|
9095
9242
|
};
|
|
9096
9243
|
disabled: {
|
|
@@ -9129,6 +9276,10 @@ export declare const components: {
|
|
|
9129
9276
|
type: import("vue").PropType<boolean>;
|
|
9130
9277
|
default: boolean;
|
|
9131
9278
|
};
|
|
9279
|
+
disableTimeCheck: {
|
|
9280
|
+
type: import("vue").PropType<boolean>;
|
|
9281
|
+
default: boolean;
|
|
9282
|
+
};
|
|
9132
9283
|
}>> & {
|
|
9133
9284
|
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
9134
9285
|
}, {}, {}, {}, {}, {
|
|
@@ -9143,6 +9294,7 @@ export declare const components: {
|
|
|
9143
9294
|
helperState: "success" | "warning" | "none" | "error";
|
|
9144
9295
|
placeholder: string;
|
|
9145
9296
|
showValidBorder: boolean;
|
|
9297
|
+
disableTimeCheck: boolean;
|
|
9146
9298
|
}>;
|
|
9147
9299
|
__isFragment?: undefined;
|
|
9148
9300
|
__isTeleport?: undefined;
|
|
@@ -9157,7 +9309,7 @@ export declare const components: {
|
|
|
9157
9309
|
default: undefined;
|
|
9158
9310
|
};
|
|
9159
9311
|
modelValue: {
|
|
9160
|
-
type: import("vue").PropType<string | null>;
|
|
9312
|
+
type: import("vue").PropType<string[] | null>;
|
|
9161
9313
|
required: true;
|
|
9162
9314
|
};
|
|
9163
9315
|
disabled: {
|
|
@@ -9196,6 +9348,10 @@ export declare const components: {
|
|
|
9196
9348
|
type: import("vue").PropType<boolean>;
|
|
9197
9349
|
default: boolean;
|
|
9198
9350
|
};
|
|
9351
|
+
disableTimeCheck: {
|
|
9352
|
+
type: import("vue").PropType<boolean>;
|
|
9353
|
+
default: boolean;
|
|
9354
|
+
};
|
|
9199
9355
|
}>> & {
|
|
9200
9356
|
"onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
|
|
9201
9357
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -9212,6 +9368,7 @@ export declare const components: {
|
|
|
9212
9368
|
helperState: "success" | "warning" | "none" | "error";
|
|
9213
9369
|
placeholder: string;
|
|
9214
9370
|
showValidBorder: boolean;
|
|
9371
|
+
disableTimeCheck: boolean;
|
|
9215
9372
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
9216
9373
|
$slots: {
|
|
9217
9374
|
label?(_: {}): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{importShared as g,__tla as ke}from"./__federation_fn_import-DThBtRAV.js";import{u as ge,__tla as Ve}from"./useBreakpoints-DqA4Z0bX.js";import{d as _}from"./dayjs.min-DE2R3_3L.js";import ne,{__tla as we}from"./__federation_expose_FmIcon-BKc-kUKB.js";import ue,{__tla as Ce}from"./__federation_expose_FmButton-
|
|
1
|
+
import{importShared as g,__tla as ke}from"./__federation_fn_import-DThBtRAV.js";import{u as ge,__tla as Ve}from"./useBreakpoints-DqA4Z0bX.js";import{d as _}from"./dayjs.min-DE2R3_3L.js";import ne,{__tla as we}from"./__federation_expose_FmIcon-BKc-kUKB.js";import ue,{__tla as Ce}from"./__federation_expose_FmButton-CfZVt7rM.js";import{u as ie,__tla as Be}from"./useProxiedModel-DA9duj_S.js";import Se,{__tla as ze}from"./__federation_expose_FmField-C4U6qz8m.js";import{_ as Me,__tla as Pe}from"./FmFormGroup.vue_vue_type_script_setup_true_lang-DKU2Ql0w.js";import{_ as se,u as $e,__tla as De}from"./useInheritFormState-D3ePekQa.js";import{F as Ie,__tla as Ye}from"./FmPopover-BeLBRWG0.js";import{D as x,n as Fe,g as Ue}from"./helper-Dphf0qEj.js";import{F as Ee}from"./provider-keys-nUDvvk3o.js";import{_ as je}from"./_plugin-vue_export-helper-DlAUqK2U.js";import qe,{__tla as Ne}from"./__federation_expose_FmDatePickerMobile-CwKFkWFb.js";let me,Re=Promise.all([(()=>{try{return ke}catch{}})(),(()=>{try{return Ve}catch{}})(),(()=>{try{return we}catch{}})(),(()=>{try{return Ce}catch{}})(),(()=>{try{return Be}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Pe}catch{}})(),(()=>{try{return De}catch{}})(),(()=>{try{return Ye}catch{}})(),(()=>{try{return Ne}catch{}})()]).then(async()=>{let R,m,y,T,pe,A,O,V,M,r,i,d,P,p,w,C,c,L,ce,fe,G,H,J,K,W,X,Z,Q,ee,le,b,ae,te,oe,s,$,D,I,Y,F,U,E,B,j,q,re,de;({defineComponent:R}=await g("vue")),{unref:m,renderSlot:y,normalizeProps:T,guardReactiveProps:pe,mergeProps:A,createCommentVNode:O,toDisplayString:V,normalizeClass:M,createElementVNode:r,withCtx:i,openBlock:d,createBlock:P,createVNode:p,renderList:w,Fragment:C,createElementBlock:c,isRef:L,pushScopeId:ce,popScopeId:fe}=await g("vue"),G={class:"p-12 w-[360px]"},H={class:"w-max"},J={class:"flex h-40 justify-between px-4 py-8"},K={class:"flex gap-4 items-center"},W={class:"flex gap-4 items-center justify-center"},X={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},Z=["onClick"],Q={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},{computed:ee,inject:le,ref:b}=await g("vue"),ae=R({__name:"FmDatePickerDesktop",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>_().subtract(50,"year").format(x)},max:{default:()=>_().add(25,"year").format(x)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(N){const v=N,h=le(Ee,null),l=ie(v,"modelValue"),f=b(_(l.value,x)),t=b(!1),n=ee(()=>v.disabled??(h==null?void 0:h.getDisabled())??!1),a=b(_().startOf("month")),_e=b(!1),ve=b(!1),ye=e=>{f.value=e},be=()=>{l.value=f.value.format(x),setTimeout(()=>{t.value=!1},0)},he=()=>{f.value=l.value?_(l.value):null,t.value=!1},S=e=>{_e.value=!1,ve.value=!1,a.value=e};return(e,o)=>(d(),P(Me,{modelValue:m(l),"onUpdate:modelValue":o[5]||(o[5]=z=>L(l)?l.value=z:null),disabled:n.value,focused:t.value,"helper-state":e.helperState,"helper-text":e.helperText,info:e.labelInfo,label:e.label,optional:e.labelMark==="optional",required:e.labelMark==="required",rules:e.rules,tag:"div"},{label:i(()=>[y(e.$slots,"label",{},void 0,!0)]),default:i(({invalid:z})=>[p(Ie,{disabled:n.value,"show-popover":t.value,"z-index":e.zIndex,onPopoverChanged:o[4]||(o[4]=u=>t.value=u)},{"popover-button":i(()=>[e.$slots["trigger-button"]?y(e.$slots,"trigger-button",T(A({key:0},{invalid:z,opened:t.value,showValidBorder:e.showValidBorder,disabled:n.value})),void 0,!0):(d(),P(Se,{key:1,disabled:n.value,focused:t.value,"icon-outlined":!t.value,invalid:z,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:i(()=>[y(e.$slots,"prepend",{},void 0,!0)]),append:i(()=>[y(e.$slots,"append",{},void 0,!0)]),default:i(()=>[r("div",{class:M([[n.value?"text-fm-color-typo-disabled":m(l)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},V(m(l)?m(_)(m(l)).format("D MMM YYYY"):"DD MM YYYY"),3)]),_:2},1032,["disabled","focused","icon-outlined","invalid","show-valid-border"]))]),default:i(()=>[r("div",G,[r("div",H,[r("div",J,[r("div",K,[p(se,{max:e.max,min:e.min,"model-value":a.value,picker:"month","onUpdate:modelValue":o[0]||(o[0]=u=>S(u))},null,8,["max","min","model-value"]),p(se,{max:e.max,min:e.min,"model-value":a.value,picker:"year","onUpdate:modelValue":o[1]||(o[1]=u=>S(u))},null,8,["max","min","model-value"])]),r("div",W,[p(ne,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_left",onClick:o[2]||(o[2]=()=>S(a.value.subtract(1,"month")))}),p(ne,{outline:!1,class:"cursor-pointer",color:"#1C1C1E",name:"chevron_right",onClick:o[3]||(o[3]=()=>S(a.value.add(1,"month")))})])]),r("div",null,[r("div",X,[(d(!0),c(C,null,w(m(Fe),u=>(d(),c("div",{key:u,class:"fm-calendar__cell"},V(u),1))),128))]),r("div",null,[(d(!0),c(C,null,w(m(Ue)(a.value),(u,xe)=>(d(),c("div",{key:xe,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(d(!0),c(C,null,w(u,k=>(d(),c("div",{key:k.date.date(),class:"fm-calendar__cell"},[k.isCurrentMonth?(d(),c("button",{key:0,class:M([{"fm-calendar__cell__button--selected":k.date.isSame(f.value)},"fm-calendar__cell__button"]),type:"button",onClick:()=>ye(k.date)},V(k.date.date()),11,Z)):O("",!0)]))),128))]))),128))])])]),r("div",Q,[p(ue,{label:"Cancel",size:"md",variant:"tertiary",onClick:he}),p(ue,{disabled:!f.value,label:"Apply",size:"md",variant:"primary",onClick:be},null,8,["disabled"])])])]),_:2},1032,["disabled","show-popover","z-index"])]),"helper-text":i(()=>[y(e.$slots,"helper-text",{},void 0,!0)]),_:3},8,["modelValue","disabled","focused","helper-state","helper-text","info","label","optional","required","rules"]))}}),te=je(ae,[["__scopeId","data-v-6d34db79"]]),{defineComponent:oe}=await g("vue"),{unref:s,normalizeProps:$,guardReactiveProps:D,renderSlot:I,isRef:Y,mergeProps:F,withCtx:U,createSlots:E,openBlock:B,createBlock:j,createCommentVNode:q,Fragment:re,createElementBlock:de}=await g("vue"),me=oe({__name:"FmDatePicker",props:{modelValue:{},showValidBorder:{type:Boolean,default:!1},min:{default:()=>_().subtract(50,"year").format(x)},max:{default:()=>_().add(25,"year").format(x)},zIndex:{default:void 0},label:{default:""},labelMark:{default:"none"},labelInfo:{default:""},disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(N){const{breakpoints:v}=ge(),h=N,l=ie(h,"modelValue"),f=$e(h);return(t,n)=>(B(),de(re,null,[s(v).md||s(v).lg?(B(),j(te,F({key:0},s(f),{modelValue:s(l),"onUpdate:modelValue":n[0]||(n[0]=a=>Y(l)?l.value=a:null)}),E({_:2},[t.$slots["trigger-button"]?{name:"trigger-button",fn:U(a=>[I(t.$slots,"trigger-button",$(D(a)))]),key:"0"}:void 0]),1040,["modelValue"])):q("",!0),s(v).xs||s(v).sm?(B(),j(qe,F({key:1},s(f),{modelValue:s(l),"onUpdate:modelValue":n[1]||(n[1]=a=>Y(l)?l.value=a:null)}),E({_:2},[t.$slots["trigger-button"]?{name:"trigger-button",fn:U(a=>[I(t.$slots,"trigger-button",$(D(a)))]),key:"0"}:void 0]),1040,["modelValue"])):q("",!0)],64))}})});export{me as _,Re as __tla};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{importShared as N,__tla as Pa}from"./__federation_fn_import-DThBtRAV.js";import{d as r}from"./dayjs.min-DE2R3_3L.js";import{D as s,n as pa,g as ya}from"./helper-Dphf0qEj.js";import ba,{__tla as Aa}from"./__federation_expose_FmIcon-BKc-kUKB.js";import Da,{__tla as Oa}from"./__federation_expose_FmButton-CJdqrqAb.js";import{u as _a,__tla as Sa}from"./useProxiedModel-DA9duj_S.js";import{_ as $a,__tla as La}from"./FmFormGroup.vue_vue_type_script_setup_true_lang-DKU2Ql0w.js";import W,{__tla as Ra}from"./__federation_expose_FmField-C4U6qz8m.js";import{F as Ta,__tla as za}from"./FmPopover-BeLBRWG0.js";import{_ as K,u as Ia,__tla as Ua}from"./useInheritFormState-D3ePekQa.js";import ha,{__tla as Ea}from"./__federation_expose_FmMenuItem-CJaWt7cG.js";import{_ as Fa,__tla as ja}from"./FmMenuDivider.vue_vue_type_script_setup_true_lang-BXNEveuZ.js";import Na,{__tla as Wa}from"./__federation_expose_FmSwitch-CmgsT_mG.js";import{_ as ie,__tla as qa}from"./FmLabel.vue_vue_type_script_setup_true_lang-CWZsudf4.js";import Ga,{C as S,__tla as Ha}from"./__federation_expose_FmDateRangePickerMobile-BWwg3C2x.js";import{a as k}from"./helpers-CU5VxHcp.js";import{F as Ja}from"./provider-keys-nUDvvk3o.js";import{_ as Ka}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{u as Qa,__tla as Xa}from"./useBreakpoints-DqA4Z0bX.js";let ga,Za=Promise.all([(()=>{try{return Pa}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Xa}catch{}})()]).then(async()=>{let me,p,fe,Ya,B,ce,h,b,D,u,y,c,i,f,x,V,Q,ve,pe,ye,be,X,De,_e,he,ge,Ye,xe,ke,we,Me,Ce,Be,Ve,Pe,Ae,Oe,Se,$e,Le,Re,Te,ze,Ie,Ue,Ee,Fe,je,Ne,We,qe,U,Ge,P,He,Je,Ke,Qe,A,Z,ee,ae,te,le,re,oe,q,se,ne,Xe,Ze;({defineComponent:me}=await N("vue")),{unref:p,normalizeProps:fe,guardReactiveProps:Ya,renderSlot:B,mergeProps:ce,createCommentVNode:h,toDisplayString:b,normalizeClass:D,createElementVNode:u,withCtx:y,createVNode:c,openBlock:i,createElementBlock:f,Fragment:x,renderList:V,createBlock:Q,isRef:ve,createSlots:pe,pushScopeId:ye,popScopeId:be}=await N("vue"),X=L=>(ye("data-v-a35b0ec8"),L=L(),be(),L),De={key:0,class:"flex gap-4 items-center relative w-full"},_e={class:"flex flex-col gap-4 w-full"},he=X(()=>u("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),ge={class:"flex flex-col gap-4 w-full"},Ye={key:1,class:"flex flex-col gap-4 w-full"},xe={class:"flex gap-4 p-12"},ke={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},we={key:0,class:"px-8"},Me={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},Ce={class:"flex flex-col gap-24"},Be={key:0,class:"flex gap-4 items-center px-12 w-full"},Ve={class:"flex flex-col gap-4 w-full"},Pe=X(()=>u("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),Ae={class:"flex flex-col gap-4 w-full"},Oe={class:"flex gap-24"},Se={class:"w-max"},$e={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},Le={class:"flex gap-4 items-center"},Re={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},Te={class:"h-[288px]"},ze={key:0,class:"fm-calendar__cell__button--today"},Ie=["onClick","onMouseover"],Ue={class:"w-max"},Ee={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},Fe={class:"flex gap-4 items-center"},je={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},Ne={key:0,class:"fm-calendar__cell__button--today"},We=["onClick","onMouseover"],qe={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},{computed:U,inject:Ge,ref:P,watch:He}=await N("vue"),Je=me({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:r().format(s),endDate:r().format(s)}},{label:"Yesterday",value:{startDate:r().subtract(1,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This week",value:{startDate:r().startOf("week").format(s),endDate:r().endOf("week").format(s)}},{label:"Last week",value:{startDate:r().subtract(1,"week").startOf("week").format(s),endDate:r().subtract(1,"week").endOf("week").format(s)}},{label:"Last 7 days",value:{startDate:r().subtract(7,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This month",value:{startDate:r().startOf("month").format(s),endDate:r().endOf("month").format(s)}},{label:"Last month",value:{startDate:r().subtract(1,"month").startOf("month").format(s),endDate:r().subtract(1,"month").endOf("month").format(s)}},{label:"This year",value:{startDate:r().startOf("year").format(s),endDate:r().endOf("year").format(s)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>r().subtract(50,"year").format(s)},max:{default:()=>r().add(25,"year").format(s)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(L){var la,ra;const z=[{id:S.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{O.value=S.PrecedingPeriod;const e=o.value;if(e[0].startDate&&e[0].endDate){const a=e[0].startDate.diff(e[0].endDate,"day");e[1]={startDate:e[0].startDate.subtract(+(1-a),"day"),endDate:e[0].startDate.subtract(1,"day")}}}},{id:S.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{O.value=S.PrecedingWeek;const e=o.value;if(e[0].startDate&&e[0].endDate){let a=e[0].endDate.diff(e[0].startDate,"week");a===0&&(a+=1),e[1]={startDate:e[0].startDate.subtract(a,"week"),endDate:e[0].endDate.subtract(a,"week")}}}},{id:S.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{O.value=S.PrecedingMonth;const e=o.value;if(e[0].startDate&&e[0].endDate){let a=e[0].endDate.diff(e[0].startDate,"month");a===0&&(a+=1),e[1]={startDate:e[0].startDate.subtract(a,"month"),endDate:e[0].endDate.subtract(a,"month")}}}},{id:S.Custom,label:"Custom",sublabel:"",action:()=>{O.value=S.Custom}}],w=L,M=Ge(Ja,null),R=r(),n=_a(w,"modelValue"),o=P([{startDate:(la=n.value)!=null&&la.startDate?r(n.value.startDate,s):null,endDate:(ra=n.value)!=null&&ra.endDate?r(n.value.endDate,s):null},{startDate:null,endDate:null}]),v=P(!1),g=U(()=>w.disabled??(M==null?void 0:M.getDisabled())??!1),_=P(!1),O=P(""),T=P(r().startOf("month")),E=P(r().startOf("month").add(1,"month")),de=P(""),ue=P(null);let Y=0;const ea=e=>{var a;if(de.value="",o.value[Y].startDate&&o.value[Y].endDate){Y===1&&(o.value=o.value.map(()=>({startDate:null,endDate:null})),Y=0),o.value[0]={startDate:e,endDate:null};return}else if(!o.value[Y].startDate&&!o.value[Y].endDate)o.value[Y].startDate=e;else{if(e.isBefore(o.value[Y].startDate)){const d=o.value[Y].startDate;o.value[Y]={startDate:e,endDate:d}}else o.value[Y].endDate=e;_.value&&(Y=1),z.find(d=>d.id===O.value)||(O.value=S.Custom)}(a=z.find(d=>d.id===O.value))==null||a.action()},xa=()=>{_.value?n.value=o.value.map(e=>({startDate:e.startDate.format(s),endDate:e.endDate.format(s)})):n.value={startDate:o.value[0].startDate.format(s),endDate:o.value[0].endDate.format(s)},setTimeout(()=>{v.value=!1})},ka=()=>{var e,a;Array.isArray(n.value)?o.value=n.value:o.value[0]={startDate:(e=n.value)!=null&&e.startDate?r(n.value.startDate,s):null,endDate:(a=n.value)!=null&&a.endDate?r(n.value.endDate,s):null},v.value=!1},I=(e,a)=>{e==="left"?(T.value=a,E.value=a.add(1,"month")):e==="right"&&(E.value=a,T.value=a.subtract(1,"month"))},aa=e=>{const a=o.value[0].startDate,d=o.value[0].endDate,t=o.value[1].startDate,m=o.value[1].endDate,l=ue.value,C=a==null?void 0:a.isSame(e),F=d==null?void 0:d.isSame(e),$=t==null?void 0:t.isSame(e),j=m==null?void 0:m.isSame(e),H=l==null?void 0:l.isSame(e),oa=C&&d&&!(C&&F)||a&&!d&&C&&(l==null?void 0:l.isAfter(a))||a&&!d&&H&&(l==null?void 0:l.isBefore(a)),sa=$&&m&&!($&&j)||t&&!m&&$&&(l==null?void 0:l.isAfter(t))||t&&!m&&H&&(l==null?void 0:l.isBefore(t)),na=F&&a&&!(C&&F)||a&&!d&&C&&(l==null?void 0:l.isBefore(a))||a&&!d&&H&&(l==null?void 0:l.isAfter(a)),da=j&&t&&!($&&j)||t&&!m&&$&&(l==null?void 0:l.isBefore(t))||t&&!m&&H&&(l==null?void 0:l.isAfter(t)),ua=C&&F||C&&!d,ia=$&&j||$&&!m,ma=a&&(d||l)&&d?e.isAfter(a)&&e.isBefore(d):e.isAfter(l)&&e.isBefore(a)||e.isBefore(l)&&e.isAfter(a),fa=t&&(m||l)&&m?e.isAfter(t)&&e.isBefore(m):e.isAfter(l)&&e.isBefore(t)||e.isBefore(l)&&e.isAfter(t),J=()=>{if(o.value.filter(ca=>{var va;for(const Va in ca)if((va=ca[Va])!=null&&va.isSame(e,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(C&&F&&(k(e,t,m)||k(e,t,l)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if($&&j&&(k(e,a,d)||k(e,a,l)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(oa||na)return k(e,t,m)||k(e,t,l)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(sa||da)return k(e,a,d)||k(e,a,l)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(ua)return"bg-fm-color-primary";if(ia)return"bg-fm-color-system-info-300";if(k(e,a,d)&&(k(e,t,m)||k(e,t,l)))return"bg-fm-color-system-success-100";if(ma)return"bg-fm-color-system-warning-100";if(fa)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${J()}`]:oa||sa,[`fm-calendar__cell__button--selected-end ${J()}`]:na||da,[`fm-calendar__cell__button--selected-between ${J()}`]:ma||fa,[`fm-calendar__cell__button--selected ${J()}`]:ua||ia}},ta=e=>{const a=o.value;if(a[0].startDate&&!a[0].endDate||a[1].startDate&&!a[1].endDate){ue.value=e;return}ue.value=null},wa=e=>{de.value=e.label,o.value[0]={startDate:r(e.value.startDate,s),endDate:r(e.value.endDate,s)}},Ma=U(()=>_.value?!o.value.every(e=>e.startDate&&e.endDate):!(o.value[0].startDate&&o.value[0].endDate)),Ca=e=>{O.value="",_.value=e,o.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),Y=0},G=U(()=>{if(!n.value)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const e=_.value&&Array.isArray(n.value)?n.value[0].startDate:n.value.startDate,a=_.value&&Array.isArray(n.value)?n.value[0].endDate:n.value.endDate;return{startDate:e?r(e).format("D MMM YYYY"):"DD MM YYYY",endDate:a?r(a).format("D MMM YYYY"):"DD MM YYYY"}}),Ba=U(()=>{const e=_.value&&Array.isArray(n.value)?n.value[1].startDate:null,a=_.value&&Array.isArray(n.value)?n.value[1].endDate:null;return e&&a?`Compared: ${r(e).format("D MMM YYYY")} - ${r(a).format("D MMM YYYY")}`:""});return He(()=>n.value,()=>{var e,a;_.value?o.value=n.value.map(d=>({startDate:d!=null&&d.startDate?r(d.startDate,s):null,endDate:d!=null&&d.endDate?r(d.endDate,s):null})):o.value[0]={startDate:(e=n.value)!=null&&e.startDate?r(n.value.startDate,s):null,endDate:(a=n.value)!=null&&a.endDate?r(n.value.endDate,s):null}}),(e,a)=>(i(),Q($a,{modelValue:p(n),"onUpdate:modelValue":a[8]||(a[8]=d=>ve(n)?n.value=d:null),disabled:g.value,focused:v.value,"helper-state":e.helperState,"helper-text":_.value?Ba.value:e.helperText,rules:e.rules,tag:"div"},pe({default:y(({invalid:d})=>[c(Ta,{disabled:g.value,"show-popover":v.value,"z-index":w.zIndex,onPopoverChanged:a[7]||(a[7]=t=>v.value=t)},{"popover-button":y(()=>[e.$slots["trigger-button"]?B(e.$slots,"trigger-button",fe(ce({key:0},{opened:v.value,invalid:d,showValidBorder:e.showValidBorder,isComparing:_.value,disabled:g.value})),void 0,!0):(i(),f(x,{key:1},[e.compare?h("",!0):(i(),f("div",De,[u("label",_e,[u("div",{class:D([[g.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},b(w.startLabel),3),c(W,{class:D(g.value?"cursor-not-allowed":"cursor-pointer"),disabled:g.value,focused:v.value,"icon-outlined":!v.value,invalid:d,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:y(()=>[B(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[B(e.$slots,"append",{},void 0,!0)]),default:y(()=>{var t;return[u("div",{class:D([[g.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},b((t=p(n))!=null&&t.startDate?p(r)(p(n).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),he,u("label",ge,[u("div",{class:D([[g.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},b(w.endLabel),3),c(W,{class:D(g.value?"cursor-not-allowed":"cursor-pointer"),disabled:g.value,focused:v.value,"icon-outlined":!v.value,invalid:d,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:y(()=>[B(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[B(e.$slots,"append",{},void 0,!0)]),default:y(()=>{var t;return[u("div",{class:D([[g.value?"text-fm-color-typo-disabled":G.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},b((t=p(n))!=null&&t.endDate?p(r)(p(n).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])])),e.compare?(i(),f("label",Ye,[c(ie,{label:e.compareLabel},null,8,["label"]),c(W,{class:D(g.value?"cursor-not-allowed":"cursor-pointer"),focused:v.value,invalid:d,"show-valid-border":e.showValidBorder},{prepend:y(()=>[B(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[B(e.$slots,"append",{},void 0,!0)]),default:y(()=>[u("div",{class:D([[g.value?"text-fm-color-typo-disabled":G.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},b(G.value.startDate)+" - "+b(G.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):h("",!0)],64))]),default:y(()=>[u("div",xe,[e.showPredefinedRange?(i(),f("div",ke,[(i(!0),f(x,null,V(e.predefinedRange,(t,m)=>(i(),Q(ha,{key:m,label:t.label,"model-value":de.value===t.label,selectable:"",onClick:l=>wa(t)},null,8,["label","model-value","onClick"]))),128)),e.compare&&e.predefinedRange?(i(),f("div",we,[c(Fa,{inset:""})])):h("",!0),e.compare?(i(),f(x,{key:1},[c(Na,{"model-value":_.value,class:"justify-between px-12",label:"Compare","onUpdate:modelValue":a[0]||(a[0]=t=>Ca(t))},null,8,["model-value"]),_.value?(i(),f(x,{key:0},V(z,(t,m)=>c(ha,{key:m,label:t.label,"model-value":O.value===t.id,sublabel:t.sublabel,selectable:"",onClick:l=>t.action()},null,8,["label","model-value","sublabel","onClick"])),64)):h("",!0)],64)):h("",!0)])):h("",!0),e.showPredefinedRange?(i(),f("div",Me)):h("",!0),u("div",{class:D({"pl-4":e.showPredefinedRange})},[u("div",Ce,[_.value?(i(),f("div",Be,[u("label",Ve,[c(ie,{label:"Custom"}),c(W,{focused:!1},{default:y(()=>{var t,m;return[u("div",{class:D([[(t=o.value[0])!=null&&t.startDate&&((m=o.value[0])!=null&&m.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},b(o.value[0].startDate!==null?o.value[0].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+b(o.value[0].endDate!==null?o.value[0].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})]),Pe,u("label",Ae,[c(ie,{label:"Compare"}),c(W,{focused:!1},{default:y(()=>{var t,m;return[u("div",{class:D([[(t=o.value[1])!=null&&t.startDate&&((m=o.value[1])!=null&&m.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},b(o.value[1].startDate!==null?o.value[1].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+b(o.value[1].endDate!==null?o.value[1].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})])])):h("",!0),u("div",Oe,[u("div",Se,[u("div",$e,[u("div",Le,[c(ba,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",onClick:a[1]||(a[1]=()=>I("left",T.value.subtract(1,"month")))}),c(K,{max:e.max,min:e.min,"model-value":T.value,picker:"month","onUpdate:modelValue":a[2]||(a[2]=t=>I("left",t))},null,8,["max","min","model-value"]),c(K,{max:e.max,min:e.min,"model-value":T.value,picker:"year","onUpdate:modelValue":a[3]||(a[3]=t=>I("left",t))},null,8,["max","min","model-value"])])]),u("div",null,[u("div",Re,[(i(!0),f(x,null,V(p(pa),t=>(i(),f("div",{key:t,class:"fm-calendar__cell"},b(t),1))),128))]),u("div",Te,[(i(!0),f(x,null,V(p(ya)(T.value),(t,m)=>(i(),f("div",{key:m,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(i(!0),f(x,null,V(t,l=>(i(),f("div",{key:l.date.date(),class:"fm-calendar__cell"},[l.date.isSame(p(R),"day")&&l.isCurrentMonth?(i(),f("div",ze)):h("",!0),l.isCurrentMonth?(i(),f("button",{key:1,class:D([[aa(l.date),{"fm-typo-en-body-lg-600":l.date.isSame(p(R),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>ea(l.date),onMouseover:C=>ta(l.date)},b(l.date.date()),43,Ie)):h("",!0)]))),128))]))),128))])])]),u("div",Ue,[u("div",Ee,[u("div",Fe,[c(K,{max:e.max,min:e.min,"model-value":E.value,picker:"month","onUpdate:modelValue":a[4]||(a[4]=t=>I("right",t))},null,8,["max","min","model-value"]),c(K,{max:e.max,min:e.min,"model-value":E.value,picker:"year","onUpdate:modelValue":a[5]||(a[5]=t=>I("right",t))},null,8,["max","min","model-value"])]),c(ba,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",onClick:a[6]||(a[6]=()=>I("left",T.value.add(1,"month")))})]),u("div",null,[u("div",je,[(i(!0),f(x,null,V(p(pa),t=>(i(),f("div",{key:t,class:"fm-calendar__cell"},b(t),1))),128))]),u("div",null,[(i(!0),f(x,null,V(p(ya)(E.value),(t,m)=>(i(),f("div",{key:m,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(i(!0),f(x,null,V(t,l=>(i(),f("div",{key:l.date.date(),class:"fm-calendar__cell"},[l.date.isSame(p(R),"day")&&l.isCurrentMonth?(i(),f("div",Ne)):h("",!0),l.isCurrentMonth?(i(),f("button",{key:1,class:D([[aa(l.date),{"fm-typo-en-body-lg-600":l.date.isSame(p(R),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>ea(l.date),onMouseover:C=>ta(l.date)},b(l.date.date()),43,We)):h("",!0)]))),128))]))),128))])])])])]),u("div",qe,[c(Da,{label:"Cancel",size:"md",variant:"tertiary",onClick:ka}),c(Da,{disabled:Ma.value,label:"Apply",size:"md",variant:"primary",onClick:xa},null,8,["disabled"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[e.$slots["helper-text"]?{name:"helper-text",fn:y(()=>[B(e.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),Ke=Ka(Je,[["__scopeId","data-v-a35b0ec8"]]),{defineComponent:Qe}=await N("vue"),{unref:A,normalizeProps:Z,guardReactiveProps:ee,renderSlot:ae,isRef:te,mergeProps:le,withCtx:re,createSlots:oe,openBlock:q,createBlock:se,createCommentVNode:ne,Fragment:Xe,createElementBlock:Ze}=await N("vue"),ga=Qe({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:r().format(s),endDate:r().format(s)}},{label:"Yesterday",value:{startDate:r().subtract(1,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This week",value:{startDate:r().startOf("week").format(s),endDate:r().endOf("week").format(s)}},{label:"Last week",value:{startDate:r().subtract(1,"week").startOf("week").format(s),endDate:r().subtract(1,"week").endOf("week").format(s)}},{label:"Last 7 days",value:{startDate:r().subtract(7,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This month",value:{startDate:r().startOf("month").format(s),endDate:r().endOf("month").format(s)}},{label:"Last month",value:{startDate:r().subtract(1,"month").startOf("month").format(s),endDate:r().subtract(1,"month").endOf("month").format(s)}},{label:"This year",value:{startDate:r().startOf("year").format(s),endDate:r().endOf("year").format(s)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>r().subtract(50,"year").format(s)},max:{default:()=>r().add(25,"year").format(s)},zIndex:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(L){const z=L,{breakpoints:w}=Qa(),M=_a(z,"modelValue"),R=Ia(z);return(n,o)=>(q(),Ze(Xe,null,[A(w).md||A(w).lg?(q(),se(Ke,le({key:0},A(R),{modelValue:A(M),"onUpdate:modelValue":o[0]||(o[0]=v=>te(M)?M.value=v:null)}),oe({_:2},[n.$slots["trigger-button"]?{name:"trigger-button",fn:re(v=>[ae(n.$slots,"trigger-button",Z(ee(v)))]),key:"0"}:void 0]),1040,["modelValue"])):ne("",!0),A(w).xs||A(w).sm?(q(),se(Ga,le({key:1},A(R),{modelValue:A(M),"onUpdate:modelValue":o[1]||(o[1]=v=>te(M)?M.value=v:null)}),oe({_:2},[n.$slots["trigger-button"]?{name:"trigger-button",fn:re(v=>[ae(n.$slots,"trigger-button",Z(ee(v)))]),key:"0"}:void 0]),1040,["modelValue"])):ne("",!0)],64))}})});export{ga as _,Za as __tla};
|
|
1
|
+
import{importShared as N,__tla as Pa}from"./__federation_fn_import-DThBtRAV.js";import{d as r}from"./dayjs.min-DE2R3_3L.js";import{D as s,n as pa,g as ya}from"./helper-Dphf0qEj.js";import ba,{__tla as Aa}from"./__federation_expose_FmIcon-BKc-kUKB.js";import Da,{__tla as Oa}from"./__federation_expose_FmButton-CfZVt7rM.js";import{u as _a,__tla as Sa}from"./useProxiedModel-DA9duj_S.js";import{_ as $a,__tla as La}from"./FmFormGroup.vue_vue_type_script_setup_true_lang-DKU2Ql0w.js";import W,{__tla as Ra}from"./__federation_expose_FmField-C4U6qz8m.js";import{F as Ta,__tla as za}from"./FmPopover-BeLBRWG0.js";import{_ as K,u as Ia,__tla as Ua}from"./useInheritFormState-D3ePekQa.js";import ha,{__tla as Ea}from"./__federation_expose_FmMenuItem-CJaWt7cG.js";import{_ as Fa,__tla as ja}from"./FmMenuDivider.vue_vue_type_script_setup_true_lang-BXNEveuZ.js";import Na,{__tla as Wa}from"./__federation_expose_FmSwitch-CmgsT_mG.js";import{_ as ie,__tla as qa}from"./FmLabel.vue_vue_type_script_setup_true_lang-CWZsudf4.js";import Ga,{C as S,__tla as Ha}from"./__federation_expose_FmDateRangePickerMobile-BQevE3K2.js";import{a as k}from"./helpers-CU5VxHcp.js";import{F as Ja}from"./provider-keys-nUDvvk3o.js";import{_ as Ka}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{u as Qa,__tla as Xa}from"./useBreakpoints-DqA4Z0bX.js";let ga,Za=Promise.all([(()=>{try{return Pa}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Xa}catch{}})()]).then(async()=>{let me,p,fe,Ya,B,ce,h,b,D,u,y,c,i,f,x,V,Q,ve,pe,ye,be,X,De,_e,he,ge,Ye,xe,ke,we,Me,Ce,Be,Ve,Pe,Ae,Oe,Se,$e,Le,Re,Te,ze,Ie,Ue,Ee,Fe,je,Ne,We,qe,U,Ge,P,He,Je,Ke,Qe,A,Z,ee,ae,te,le,re,oe,q,se,ne,Xe,Ze;({defineComponent:me}=await N("vue")),{unref:p,normalizeProps:fe,guardReactiveProps:Ya,renderSlot:B,mergeProps:ce,createCommentVNode:h,toDisplayString:b,normalizeClass:D,createElementVNode:u,withCtx:y,createVNode:c,openBlock:i,createElementBlock:f,Fragment:x,renderList:V,createBlock:Q,isRef:ve,createSlots:pe,pushScopeId:ye,popScopeId:be}=await N("vue"),X=L=>(ye("data-v-a35b0ec8"),L=L(),be(),L),De={key:0,class:"flex gap-4 items-center relative w-full"},_e={class:"flex flex-col gap-4 w-full"},he=X(()=>u("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," to ",-1)),ge={class:"flex flex-col gap-4 w-full"},Ye={key:1,class:"flex flex-col gap-4 w-full"},xe={class:"flex gap-4 p-12"},ke={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},we={key:0,class:"px-8"},Me={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},Ce={class:"flex flex-col gap-24"},Be={key:0,class:"flex gap-4 items-center px-12 w-full"},Ve={class:"flex flex-col gap-4 w-full"},Pe=X(()=>u("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),Ae={class:"flex flex-col gap-4 w-full"},Oe={class:"flex gap-24"},Se={class:"w-max"},$e={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},Le={class:"flex gap-4 items-center"},Re={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},Te={class:"h-[288px]"},ze={key:0,class:"fm-calendar__cell__button--today"},Ie=["onClick","onMouseover"],Ue={class:"w-max"},Ee={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},Fe={class:"flex gap-4 items-center"},je={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},Ne={key:0,class:"fm-calendar__cell__button--today"},We=["onClick","onMouseover"],qe={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},{computed:U,inject:Ge,ref:P,watch:He}=await N("vue"),Je=me({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:r().format(s),endDate:r().format(s)}},{label:"Yesterday",value:{startDate:r().subtract(1,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This week",value:{startDate:r().startOf("week").format(s),endDate:r().endOf("week").format(s)}},{label:"Last week",value:{startDate:r().subtract(1,"week").startOf("week").format(s),endDate:r().subtract(1,"week").endOf("week").format(s)}},{label:"Last 7 days",value:{startDate:r().subtract(7,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This month",value:{startDate:r().startOf("month").format(s),endDate:r().endOf("month").format(s)}},{label:"Last month",value:{startDate:r().subtract(1,"month").startOf("month").format(s),endDate:r().subtract(1,"month").endOf("month").format(s)}},{label:"This year",value:{startDate:r().startOf("year").format(s),endDate:r().endOf("year").format(s)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>r().subtract(50,"year").format(s)},max:{default:()=>r().add(25,"year").format(s)},zIndex:{default:void 0},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(L){var la,ra;const z=[{id:S.PrecedingPeriod,label:"Preceding period",sublabel:"",action:()=>{O.value=S.PrecedingPeriod;const e=o.value;if(e[0].startDate&&e[0].endDate){const a=e[0].startDate.diff(e[0].endDate,"day");e[1]={startDate:e[0].startDate.subtract(+(1-a),"day"),endDate:e[0].startDate.subtract(1,"day")}}}},{id:S.PrecedingWeek,label:"Preceding period",sublabel:"Match day of week",action:()=>{O.value=S.PrecedingWeek;const e=o.value;if(e[0].startDate&&e[0].endDate){let a=e[0].endDate.diff(e[0].startDate,"week");a===0&&(a+=1),e[1]={startDate:e[0].startDate.subtract(a,"week"),endDate:e[0].endDate.subtract(a,"week")}}}},{id:S.PrecedingMonth,label:"Preceding period",sublabel:"Match day of month",action:()=>{O.value=S.PrecedingMonth;const e=o.value;if(e[0].startDate&&e[0].endDate){let a=e[0].endDate.diff(e[0].startDate,"month");a===0&&(a+=1),e[1]={startDate:e[0].startDate.subtract(a,"month"),endDate:e[0].endDate.subtract(a,"month")}}}},{id:S.Custom,label:"Custom",sublabel:"",action:()=>{O.value=S.Custom}}],w=L,M=Ge(Ja,null),R=r(),n=_a(w,"modelValue"),o=P([{startDate:(la=n.value)!=null&&la.startDate?r(n.value.startDate,s):null,endDate:(ra=n.value)!=null&&ra.endDate?r(n.value.endDate,s):null},{startDate:null,endDate:null}]),v=P(!1),g=U(()=>w.disabled??(M==null?void 0:M.getDisabled())??!1),_=P(!1),O=P(""),T=P(r().startOf("month")),E=P(r().startOf("month").add(1,"month")),de=P(""),ue=P(null);let Y=0;const ea=e=>{var a;if(de.value="",o.value[Y].startDate&&o.value[Y].endDate){Y===1&&(o.value=o.value.map(()=>({startDate:null,endDate:null})),Y=0),o.value[0]={startDate:e,endDate:null};return}else if(!o.value[Y].startDate&&!o.value[Y].endDate)o.value[Y].startDate=e;else{if(e.isBefore(o.value[Y].startDate)){const d=o.value[Y].startDate;o.value[Y]={startDate:e,endDate:d}}else o.value[Y].endDate=e;_.value&&(Y=1),z.find(d=>d.id===O.value)||(O.value=S.Custom)}(a=z.find(d=>d.id===O.value))==null||a.action()},xa=()=>{_.value?n.value=o.value.map(e=>({startDate:e.startDate.format(s),endDate:e.endDate.format(s)})):n.value={startDate:o.value[0].startDate.format(s),endDate:o.value[0].endDate.format(s)},setTimeout(()=>{v.value=!1})},ka=()=>{var e,a;Array.isArray(n.value)?o.value=n.value:o.value[0]={startDate:(e=n.value)!=null&&e.startDate?r(n.value.startDate,s):null,endDate:(a=n.value)!=null&&a.endDate?r(n.value.endDate,s):null},v.value=!1},I=(e,a)=>{e==="left"?(T.value=a,E.value=a.add(1,"month")):e==="right"&&(E.value=a,T.value=a.subtract(1,"month"))},aa=e=>{const a=o.value[0].startDate,d=o.value[0].endDate,t=o.value[1].startDate,m=o.value[1].endDate,l=ue.value,C=a==null?void 0:a.isSame(e),F=d==null?void 0:d.isSame(e),$=t==null?void 0:t.isSame(e),j=m==null?void 0:m.isSame(e),H=l==null?void 0:l.isSame(e),oa=C&&d&&!(C&&F)||a&&!d&&C&&(l==null?void 0:l.isAfter(a))||a&&!d&&H&&(l==null?void 0:l.isBefore(a)),sa=$&&m&&!($&&j)||t&&!m&&$&&(l==null?void 0:l.isAfter(t))||t&&!m&&H&&(l==null?void 0:l.isBefore(t)),na=F&&a&&!(C&&F)||a&&!d&&C&&(l==null?void 0:l.isBefore(a))||a&&!d&&H&&(l==null?void 0:l.isAfter(a)),da=j&&t&&!($&&j)||t&&!m&&$&&(l==null?void 0:l.isBefore(t))||t&&!m&&H&&(l==null?void 0:l.isAfter(t)),ua=C&&F||C&&!d,ia=$&&j||$&&!m,ma=a&&(d||l)&&d?e.isAfter(a)&&e.isBefore(d):e.isAfter(l)&&e.isBefore(a)||e.isBefore(l)&&e.isAfter(a),fa=t&&(m||l)&&m?e.isAfter(t)&&e.isBefore(m):e.isAfter(l)&&e.isBefore(t)||e.isBefore(l)&&e.isAfter(t),J=()=>{if(o.value.filter(ca=>{var va;for(const Va in ca)if((va=ca[Va])!=null&&va.isSame(e,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(C&&F&&(k(e,t,m)||k(e,t,l)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if($&&j&&(k(e,a,d)||k(e,a,l)))return"bg-fm-color-system-info-300 before:bg-fm-color-system-warning-100 after:bg-fm-color-system-warning-100";if(oa||na)return k(e,t,m)||k(e,t,l)?"bg-fm-color-primary before:bg-fm-color-system-success-100 after:bg-fm-color-system-info-100":"bg-fm-color-primary before:bg-fm-color-system-warning-100";if(sa||da)return k(e,a,d)||k(e,a,l)?"bg-fm-color-system-info-300 before:bg-fm-color-system-success-100 after:bg-fm-color-system-warning-100":"bg-fm-color-system-info-300 before:bg-fm-color-system-info-100";if(ua)return"bg-fm-color-primary";if(ia)return"bg-fm-color-system-info-300";if(k(e,a,d)&&(k(e,t,m)||k(e,t,l)))return"bg-fm-color-system-success-100";if(ma)return"bg-fm-color-system-warning-100";if(fa)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${J()}`]:oa||sa,[`fm-calendar__cell__button--selected-end ${J()}`]:na||da,[`fm-calendar__cell__button--selected-between ${J()}`]:ma||fa,[`fm-calendar__cell__button--selected ${J()}`]:ua||ia}},ta=e=>{const a=o.value;if(a[0].startDate&&!a[0].endDate||a[1].startDate&&!a[1].endDate){ue.value=e;return}ue.value=null},wa=e=>{de.value=e.label,o.value[0]={startDate:r(e.value.startDate,s),endDate:r(e.value.endDate,s)}},Ma=U(()=>_.value?!o.value.every(e=>e.startDate&&e.endDate):!(o.value[0].startDate&&o.value[0].endDate)),Ca=e=>{O.value="",_.value=e,o.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),Y=0},G=U(()=>{if(!n.value)return{startDate:"DD MM YYYY",endDate:"DD MM YYYY"};const e=_.value&&Array.isArray(n.value)?n.value[0].startDate:n.value.startDate,a=_.value&&Array.isArray(n.value)?n.value[0].endDate:n.value.endDate;return{startDate:e?r(e).format("D MMM YYYY"):"DD MM YYYY",endDate:a?r(a).format("D MMM YYYY"):"DD MM YYYY"}}),Ba=U(()=>{const e=_.value&&Array.isArray(n.value)?n.value[1].startDate:null,a=_.value&&Array.isArray(n.value)?n.value[1].endDate:null;return e&&a?`Compared: ${r(e).format("D MMM YYYY")} - ${r(a).format("D MMM YYYY")}`:""});return He(()=>n.value,()=>{var e,a;_.value?o.value=n.value.map(d=>({startDate:d!=null&&d.startDate?r(d.startDate,s):null,endDate:d!=null&&d.endDate?r(d.endDate,s):null})):o.value[0]={startDate:(e=n.value)!=null&&e.startDate?r(n.value.startDate,s):null,endDate:(a=n.value)!=null&&a.endDate?r(n.value.endDate,s):null}}),(e,a)=>(i(),Q($a,{modelValue:p(n),"onUpdate:modelValue":a[8]||(a[8]=d=>ve(n)?n.value=d:null),disabled:g.value,focused:v.value,"helper-state":e.helperState,"helper-text":_.value?Ba.value:e.helperText,rules:e.rules,tag:"div"},pe({default:y(({invalid:d})=>[c(Ta,{disabled:g.value,"show-popover":v.value,"z-index":w.zIndex,onPopoverChanged:a[7]||(a[7]=t=>v.value=t)},{"popover-button":y(()=>[e.$slots["trigger-button"]?B(e.$slots,"trigger-button",fe(ce({key:0},{opened:v.value,invalid:d,showValidBorder:e.showValidBorder,isComparing:_.value,disabled:g.value})),void 0,!0):(i(),f(x,{key:1},[e.compare?h("",!0):(i(),f("div",De,[u("label",_e,[u("div",{class:D([[g.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},b(w.startLabel),3),c(W,{class:D(g.value?"cursor-not-allowed":"cursor-pointer"),disabled:g.value,focused:v.value,"icon-outlined":!v.value,invalid:d,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:y(()=>[B(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[B(e.$slots,"append",{},void 0,!0)]),default:y(()=>{var t;return[u("div",{class:D([[g.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},b((t=p(n))!=null&&t.startDate?p(r)(p(n).startDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),he,u("label",ge,[u("div",{class:D([[g.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},b(w.endLabel),3),c(W,{class:D(g.value?"cursor-not-allowed":"cursor-pointer"),disabled:g.value,focused:v.value,"icon-outlined":!v.value,invalid:d,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:y(()=>[B(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[B(e.$slots,"append",{},void 0,!0)]),default:y(()=>{var t;return[u("div",{class:D([[g.value?"text-fm-color-typo-disabled":G.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},b((t=p(n))!=null&&t.endDate?p(r)(p(n).endDate).format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])])),e.compare?(i(),f("label",Ye,[c(ie,{label:e.compareLabel},null,8,["label"]),c(W,{class:D(g.value?"cursor-not-allowed":"cursor-pointer"),focused:v.value,invalid:d,"show-valid-border":e.showValidBorder},{prepend:y(()=>[B(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[B(e.$slots,"append",{},void 0,!0)]),default:y(()=>[u("div",{class:D([[g.value?"text-fm-color-typo-disabled":G.value.startDate!=="DD MM YYYY"?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},b(G.value.startDate)+" - "+b(G.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):h("",!0)],64))]),default:y(()=>[u("div",xe,[e.showPredefinedRange?(i(),f("div",ke,[(i(!0),f(x,null,V(e.predefinedRange,(t,m)=>(i(),Q(ha,{key:m,label:t.label,"model-value":de.value===t.label,selectable:"",onClick:l=>wa(t)},null,8,["label","model-value","onClick"]))),128)),e.compare&&e.predefinedRange?(i(),f("div",we,[c(Fa,{inset:""})])):h("",!0),e.compare?(i(),f(x,{key:1},[c(Na,{"model-value":_.value,class:"justify-between px-12",label:"Compare","onUpdate:modelValue":a[0]||(a[0]=t=>Ca(t))},null,8,["model-value"]),_.value?(i(),f(x,{key:0},V(z,(t,m)=>c(ha,{key:m,label:t.label,"model-value":O.value===t.id,sublabel:t.sublabel,selectable:"",onClick:l=>t.action()},null,8,["label","model-value","sublabel","onClick"])),64)):h("",!0)],64)):h("",!0)])):h("",!0),e.showPredefinedRange?(i(),f("div",Me)):h("",!0),u("div",{class:D({"pl-4":e.showPredefinedRange})},[u("div",Ce,[_.value?(i(),f("div",Be,[u("label",Ve,[c(ie,{label:"Custom"}),c(W,{focused:!1},{default:y(()=>{var t,m;return[u("div",{class:D([[(t=o.value[0])!=null&&t.startDate&&((m=o.value[0])!=null&&m.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},b(o.value[0].startDate!==null?o.value[0].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+b(o.value[0].endDate!==null?o.value[0].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})]),Pe,u("label",Ae,[c(ie,{label:"Compare"}),c(W,{focused:!1},{default:y(()=>{var t,m;return[u("div",{class:D([[(t=o.value[1])!=null&&t.startDate&&((m=o.value[1])!=null&&m.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},b(o.value[1].startDate!==null?o.value[1].startDate.format("D MMM YYYY"):"DD MM YYYY")+" - "+b(o.value[1].endDate!==null?o.value[1].endDate.format("D MMM YYYY"):"DD MM YYYY"),3)]}),_:1})])])):h("",!0),u("div",Oe,[u("div",Se,[u("div",$e,[u("div",Le,[c(ba,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",onClick:a[1]||(a[1]=()=>I("left",T.value.subtract(1,"month")))}),c(K,{max:e.max,min:e.min,"model-value":T.value,picker:"month","onUpdate:modelValue":a[2]||(a[2]=t=>I("left",t))},null,8,["max","min","model-value"]),c(K,{max:e.max,min:e.min,"model-value":T.value,picker:"year","onUpdate:modelValue":a[3]||(a[3]=t=>I("left",t))},null,8,["max","min","model-value"])])]),u("div",null,[u("div",Re,[(i(!0),f(x,null,V(p(pa),t=>(i(),f("div",{key:t,class:"fm-calendar__cell"},b(t),1))),128))]),u("div",Te,[(i(!0),f(x,null,V(p(ya)(T.value),(t,m)=>(i(),f("div",{key:m,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(i(!0),f(x,null,V(t,l=>(i(),f("div",{key:l.date.date(),class:"fm-calendar__cell"},[l.date.isSame(p(R),"day")&&l.isCurrentMonth?(i(),f("div",ze)):h("",!0),l.isCurrentMonth?(i(),f("button",{key:1,class:D([[aa(l.date),{"fm-typo-en-body-lg-600":l.date.isSame(p(R),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>ea(l.date),onMouseover:C=>ta(l.date)},b(l.date.date()),43,Ie)):h("",!0)]))),128))]))),128))])])]),u("div",Ue,[u("div",Ee,[u("div",Fe,[c(K,{max:e.max,min:e.min,"model-value":E.value,picker:"month","onUpdate:modelValue":a[4]||(a[4]=t=>I("right",t))},null,8,["max","min","model-value"]),c(K,{max:e.max,min:e.min,"model-value":E.value,picker:"year","onUpdate:modelValue":a[5]||(a[5]=t=>I("right",t))},null,8,["max","min","model-value"])]),c(ba,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",onClick:a[6]||(a[6]=()=>I("left",T.value.add(1,"month")))})]),u("div",null,[u("div",je,[(i(!0),f(x,null,V(p(pa),t=>(i(),f("div",{key:t,class:"fm-calendar__cell"},b(t),1))),128))]),u("div",null,[(i(!0),f(x,null,V(p(ya)(E.value),(t,m)=>(i(),f("div",{key:m,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(i(!0),f(x,null,V(t,l=>(i(),f("div",{key:l.date.date(),class:"fm-calendar__cell"},[l.date.isSame(p(R),"day")&&l.isCurrentMonth?(i(),f("div",Ne)):h("",!0),l.isCurrentMonth?(i(),f("button",{key:1,class:D([[aa(l.date),{"fm-typo-en-body-lg-600":l.date.isSame(p(R),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>ea(l.date),onMouseover:C=>ta(l.date)},b(l.date.date()),43,We)):h("",!0)]))),128))]))),128))])])])])]),u("div",qe,[c(Da,{label:"Cancel",size:"md",variant:"tertiary",onClick:ka}),c(Da,{disabled:Ma.value,label:"Apply",size:"md",variant:"primary",onClick:xa},null,8,["disabled"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[e.$slots["helper-text"]?{name:"helper-text",fn:y(()=>[B(e.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),Ke=Ka(Je,[["__scopeId","data-v-a35b0ec8"]]),{defineComponent:Qe}=await N("vue"),{unref:A,normalizeProps:Z,guardReactiveProps:ee,renderSlot:ae,isRef:te,mergeProps:le,withCtx:re,createSlots:oe,openBlock:q,createBlock:se,createCommentVNode:ne,Fragment:Xe,createElementBlock:Ze}=await N("vue"),ga=Qe({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{default:"Start date"},endLabel:{default:"End date"},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:"Today",value:{startDate:r().format(s),endDate:r().format(s)}},{label:"Yesterday",value:{startDate:r().subtract(1,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This week",value:{startDate:r().startOf("week").format(s),endDate:r().endOf("week").format(s)}},{label:"Last week",value:{startDate:r().subtract(1,"week").startOf("week").format(s),endDate:r().subtract(1,"week").endOf("week").format(s)}},{label:"Last 7 days",value:{startDate:r().subtract(7,"day").format(s),endDate:r().subtract(1,"day").format(s)}},{label:"This month",value:{startDate:r().startOf("month").format(s),endDate:r().endOf("month").format(s)}},{label:"Last month",value:{startDate:r().subtract(1,"month").startOf("month").format(s),endDate:r().subtract(1,"month").endOf("month").format(s)}},{label:"This year",value:{startDate:r().startOf("year").format(s),endDate:r().endOf("year").format(s)}}]},compare:{type:Boolean,default:!1},compareLabel:{default:"Date"},min:{default:()=>r().subtract(50,"year").format(s)},max:{default:()=>r().add(25,"year").format(s)},zIndex:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(L){const z=L,{breakpoints:w}=Qa(),M=_a(z,"modelValue"),R=Ia(z);return(n,o)=>(q(),Ze(Xe,null,[A(w).md||A(w).lg?(q(),se(Ke,le({key:0},A(R),{modelValue:A(M),"onUpdate:modelValue":o[0]||(o[0]=v=>te(M)?M.value=v:null)}),oe({_:2},[n.$slots["trigger-button"]?{name:"trigger-button",fn:re(v=>[ae(n.$slots,"trigger-button",Z(ee(v)))]),key:"0"}:void 0]),1040,["modelValue"])):ne("",!0),A(w).xs||A(w).sm?(q(),se(Ga,le({key:1},A(R),{modelValue:A(M),"onUpdate:modelValue":o[1]||(o[1]=v=>te(M)?M.value=v:null)}),oe({_:2},[n.$slots["trigger-button"]?{name:"trigger-button",fn:re(v=>[ae(n.$slots,"trigger-button",Z(ee(v)))]),key:"0"}:void 0]),1040,["modelValue"])):ne("",!0)],64))}})});export{ga as _,Za as __tla};
|