@feedmepos/ui-library 1.8.8 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CHANGELOG.md +19 -0
- package/dist/components/chip/FmChip.vue.d.ts +2 -0
- package/dist/components/chip-group/FmChipGroup.vue.d.ts +2 -0
- package/dist/components/form/calendar/date-range-picker/common.d.ts +4 -4
- package/dist/components/form/select/FmSelect.vue.d.ts +2 -0
- package/dist/components/form/simple-calendar/simple-date-range-picker/common.d.ts +6 -6
- package/dist/components.d.ts +14 -0
- package/dist/federation/FmChip.vue_vue_type_script_setup_true_lang-COOfOYqf.js +1 -0
- package/dist/federation/FmChipGroup.vue_vue_type_script_setup_true_lang-CbHNw_nI.js +1 -0
- package/dist/federation/{__federation_expose_FmDateRangePickerMobile-0vR-i-mJ.css → FmDateRangePicker-Dy1X9cjU.css} +1 -1
- package/dist/federation/FmDateRangePicker.vue_vue_type_script_setup_true_lang-HPHbTnO1.js +1 -0
- package/dist/federation/{FmPhoneNumber.vue_vue_type_script_setup_true_lang-C2WVAnYm.js → FmPhoneNumber.vue_vue_type_script_setup_true_lang-BsBkMTxg.js} +1 -1
- package/dist/federation/{FmTableToolbar.vue_vue_type_script_setup_true_lang-CXU-iC5D.js → FmTableToolbar.vue_vue_type_script_setup_true_lang-D0wkO6QF.js} +1 -1
- package/dist/federation/{__federation_expose_FmChip-DD2ux2Ef.js → __federation_expose_FmChip-CQBC4kt1.js} +1 -1
- package/dist/federation/{__federation_expose_FmChipGroup-BNyMO0Iy.js → __federation_expose_FmChipGroup-ubrN-p5z.js} +1 -1
- package/dist/federation/{__federation_expose_FmDateRangePicker-nEi7uNwi.js → __federation_expose_FmDateRangePicker-2p7UCoY_.js} +1 -1
- package/dist/federation/__federation_expose_FmDateRangePickerMobile-CHgHr2In.js +1 -0
- package/dist/federation/{FmDateRangePicker-BNXRdltJ.css → __federation_expose_FmDateRangePickerMobile-DnlyvSaH.css} +1 -1
- package/dist/federation/{__federation_expose_FmPhoneNumber-BKnGqmCs.js → __federation_expose_FmPhoneNumber-DRxo5Qab.js} +1 -1
- package/dist/federation/__federation_expose_FmSelect-BDJH0smK.js +1 -0
- package/dist/federation/{__federation_expose_FmSelect-BJDloe7K.css → __federation_expose_FmSelect-m2HxaV_S.css} +1 -1
- package/dist/federation/{__federation_expose_FmTableToolbar-DlNpjsXR.js → __federation_expose_FmTableToolbar-DHHG8g8i.js} +1 -1
- package/dist/federation/feedmepos-ui-components.js +1 -1
- package/dist/federation/index-BMRto8ml.js +2 -0
- package/dist/feedmepos-ui-library.js +4828 -4822
- package/dist/feedmepos-ui-library.umd.cjs +28 -28
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/federation/FmChip.vue_vue_type_script_setup_true_lang-nFXSoYWT.js +0 -1
- package/dist/federation/FmChipGroup.vue_vue_type_script_setup_true_lang-DIQGxpQ7.js +0 -1
- package/dist/federation/FmDateRangePicker.vue_vue_type_script_setup_true_lang-CKM4vlHQ.js +0 -1
- package/dist/federation/__federation_expose_FmDateRangePickerMobile-DX8vXznX.js +0 -1
- package/dist/federation/__federation_expose_FmSelect-oNyH9_H-.js +0 -1
- package/dist/federation/index-BkFeW379.js +0 -2
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
# 1.9.0
|
|
2
|
+
|
|
3
|
+
- **BREAKING CHANGE:** `FmSimpleDateRangePicker` & `FmDateRangePicker`
|
|
4
|
+
- Convert `CompareType` enum keys to SCREAMING_SNAKE_CASE for consistency with backend services
|
|
5
|
+
- `CompareType.NoComparison` → `CompareType.NO_COMPARISON`
|
|
6
|
+
- `CompareType.PrecedingPeriod` → `CompareType.PRECEDING_PERIOD`
|
|
7
|
+
- `CompareType.PrecedingWeek` → `CompareType.PRECEDING_WEEK`
|
|
8
|
+
- `CompareType.PrecedingMonth` → `CompareType.PRECEDING_MONTH`
|
|
9
|
+
- `CompareType.PrecedingYear` → `CompareType.PRECEDING_YEAR`
|
|
10
|
+
- `CompareType.Custom` → `CompareType.CUSTOM`
|
|
11
|
+
- Enum values (string literals) remain unchanged for backward compatibility with stored data
|
|
12
|
+
- Services can now import CompareType directly from component paths instead of duplicating definitions
|
|
13
|
+
|
|
14
|
+
# 1.8.9
|
|
15
|
+
|
|
16
|
+
- `FmSelect` & `FmChipGroup`
|
|
17
|
+
- Add `chipClicked` event that emits the value when a chip is clicked
|
|
18
|
+
- Allows handling individual chip clicks within the component
|
|
19
|
+
|
|
1
20
|
# 1.8.8
|
|
2
21
|
|
|
3
22
|
- `FmErrorSummary`
|
|
@@ -26,6 +26,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
26
26
|
variant: string;
|
|
27
27
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
28
|
"chip-closed": () => void;
|
|
29
|
+
click: () => void;
|
|
29
30
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FmChipProps>, {
|
|
30
31
|
label: string;
|
|
31
32
|
icon: string;
|
|
@@ -37,6 +38,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
37
38
|
compact: boolean;
|
|
38
39
|
variant: string;
|
|
39
40
|
}>>> & {
|
|
41
|
+
onClick?: (() => any) | undefined;
|
|
40
42
|
"onChip-closed"?: (() => any) | undefined;
|
|
41
43
|
}, {
|
|
42
44
|
label: string;
|
|
@@ -13,6 +13,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
13
13
|
removable: boolean;
|
|
14
14
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
15
|
"chip-closed": (index: number) => void;
|
|
16
|
+
"chip-clicked": (index: number) => void;
|
|
16
17
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FmChipGroupProps>, {
|
|
17
18
|
selectable: boolean;
|
|
18
19
|
disabled: boolean;
|
|
@@ -20,6 +21,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
20
21
|
removable: boolean;
|
|
21
22
|
}>>> & {
|
|
22
23
|
"onChip-closed"?: ((index: number) => any) | undefined;
|
|
24
|
+
"onChip-clicked"?: ((index: number) => any) | undefined;
|
|
23
25
|
}, {
|
|
24
26
|
disabled: boolean;
|
|
25
27
|
selectable: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { FormChildProps } from '../../../../composables/useFormChild';
|
|
2
2
|
import type { Dayjs } from 'dayjs';
|
|
3
3
|
export declare enum CompareType {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
PRECEDING_PERIOD = "PRECEDING_PERIOD",
|
|
5
|
+
PRECEDING_WEEK = "PRECEDING_WEEK",
|
|
6
|
+
PRECEDING_MONTH = "PRECEDING_MONTH",
|
|
7
|
+
CUSTOM = "CUSTOM"
|
|
8
8
|
}
|
|
9
9
|
export interface FmCalendarPredefinedRange {
|
|
10
10
|
label: string;
|
|
@@ -65,6 +65,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
65
65
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
66
66
|
"update:modelValue": (value: any) => void;
|
|
67
67
|
"dropdown-changed": (value: boolean) => void;
|
|
68
|
+
"chip-clicked": (value: any) => void;
|
|
68
69
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FmSelectProps>, {
|
|
69
70
|
label: string;
|
|
70
71
|
labelMark: string;
|
|
@@ -86,6 +87,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
86
87
|
clearable: boolean;
|
|
87
88
|
}>>> & {
|
|
88
89
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
90
|
+
"onChip-clicked"?: ((value: any) => any) | undefined;
|
|
89
91
|
"onDropdown-changed"?: ((value: boolean) => any) | undefined;
|
|
90
92
|
}, {
|
|
91
93
|
label: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { FormChildProps } from '../../../../composables/useFormChild';
|
|
2
2
|
import type { Dayjs } from 'dayjs';
|
|
3
3
|
export declare enum CompareType {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
NO_COMPARISON = "NO_COMPARISON",
|
|
5
|
+
PRECEDING_PERIOD = "PRECEDING_PERIOD",
|
|
6
|
+
PRECEDING_WEEK = "PRECEDING_WEEK",
|
|
7
|
+
PRECEDING_MONTH = "PRECEDING_MONTH",
|
|
8
|
+
PRECEDING_YEAR = "PRECEDING_YEAR",
|
|
9
|
+
CUSTOM = "CUSTOM"
|
|
10
10
|
}
|
|
11
11
|
export interface FmCalendarPredefinedRange {
|
|
12
12
|
label: string;
|
package/dist/components.d.ts
CHANGED
|
@@ -930,9 +930,11 @@ export declare const components: {
|
|
|
930
930
|
default: boolean;
|
|
931
931
|
};
|
|
932
932
|
}>> & {
|
|
933
|
+
onClick?: (() => any) | undefined;
|
|
933
934
|
"onChip-closed"?: (() => any) | undefined;
|
|
934
935
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
935
936
|
"chip-closed": () => void;
|
|
937
|
+
click: () => void;
|
|
936
938
|
}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
937
939
|
label: {
|
|
938
940
|
type: import("vue").PropType<string>;
|
|
@@ -971,6 +973,7 @@ export declare const components: {
|
|
|
971
973
|
default: boolean;
|
|
972
974
|
};
|
|
973
975
|
}>> & {
|
|
976
|
+
onClick?: (() => any) | undefined;
|
|
974
977
|
"onChip-closed"?: (() => any) | undefined;
|
|
975
978
|
}, {
|
|
976
979
|
label: string;
|
|
@@ -1027,6 +1030,7 @@ export declare const components: {
|
|
|
1027
1030
|
default: boolean;
|
|
1028
1031
|
};
|
|
1029
1032
|
}>> & {
|
|
1033
|
+
onClick?: (() => any) | undefined;
|
|
1030
1034
|
"onChip-closed"?: (() => any) | undefined;
|
|
1031
1035
|
}, {}, {}, {}, {}, {
|
|
1032
1036
|
label: string;
|
|
@@ -1080,9 +1084,11 @@ export declare const components: {
|
|
|
1080
1084
|
default: boolean;
|
|
1081
1085
|
};
|
|
1082
1086
|
}>> & {
|
|
1087
|
+
onClick?: (() => any) | undefined;
|
|
1083
1088
|
"onChip-closed"?: (() => any) | undefined;
|
|
1084
1089
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1085
1090
|
"chip-closed": () => void;
|
|
1091
|
+
click: () => void;
|
|
1086
1092
|
}, string, {
|
|
1087
1093
|
label: string;
|
|
1088
1094
|
disabled: boolean;
|
|
@@ -1121,6 +1127,7 @@ export declare const components: {
|
|
|
1121
1127
|
};
|
|
1122
1128
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1123
1129
|
"chip-closed": (index: number) => void;
|
|
1130
|
+
"chip-clicked": (index: number) => void;
|
|
1124
1131
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
1125
1132
|
disabled: {
|
|
1126
1133
|
type: import("vue").PropType<boolean>;
|
|
@@ -1144,6 +1151,7 @@ export declare const components: {
|
|
|
1144
1151
|
};
|
|
1145
1152
|
}>> & {
|
|
1146
1153
|
"onChip-closed"?: ((index: number) => any) | undefined;
|
|
1154
|
+
"onChip-clicked"?: ((index: number) => any) | undefined;
|
|
1147
1155
|
}, {
|
|
1148
1156
|
disabled: boolean;
|
|
1149
1157
|
selectable: boolean;
|
|
@@ -7757,10 +7765,12 @@ export declare const components: {
|
|
|
7757
7765
|
};
|
|
7758
7766
|
}>> & {
|
|
7759
7767
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
7768
|
+
"onChip-clicked"?: ((value: any) => any) | undefined;
|
|
7760
7769
|
"onDropdown-changed"?: ((value: boolean) => any) | undefined;
|
|
7761
7770
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7762
7771
|
"update:modelValue": (value: any) => void;
|
|
7763
7772
|
"dropdown-changed": (value: boolean) => void;
|
|
7773
|
+
"chip-clicked": (value: any) => void;
|
|
7764
7774
|
}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
|
|
7765
7775
|
label: {
|
|
7766
7776
|
type: import("vue").PropType<string>;
|
|
@@ -7865,6 +7875,7 @@ export declare const components: {
|
|
|
7865
7875
|
};
|
|
7866
7876
|
}>> & {
|
|
7867
7877
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
7878
|
+
"onChip-clicked"?: ((value: any) => any) | undefined;
|
|
7868
7879
|
"onDropdown-changed"?: ((value: boolean) => any) | undefined;
|
|
7869
7880
|
}, {
|
|
7870
7881
|
label: string;
|
|
@@ -7996,6 +8007,7 @@ export declare const components: {
|
|
|
7996
8007
|
};
|
|
7997
8008
|
}>> & {
|
|
7998
8009
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
8010
|
+
"onChip-clicked"?: ((value: any) => any) | undefined;
|
|
7999
8011
|
"onDropdown-changed"?: ((value: boolean) => any) | undefined;
|
|
8000
8012
|
}, {}, {}, {}, {}, {
|
|
8001
8013
|
label: string;
|
|
@@ -8124,10 +8136,12 @@ export declare const components: {
|
|
|
8124
8136
|
};
|
|
8125
8137
|
}>> & {
|
|
8126
8138
|
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
8139
|
+
"onChip-clicked"?: ((value: any) => any) | undefined;
|
|
8127
8140
|
"onDropdown-changed"?: ((value: boolean) => any) | undefined;
|
|
8128
8141
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8129
8142
|
"update:modelValue": (value: any) => void;
|
|
8130
8143
|
"dropdown-changed": (value: boolean) => void;
|
|
8144
|
+
"chip-clicked": (value: any) => void;
|
|
8131
8145
|
}, string, {
|
|
8132
8146
|
label: string;
|
|
8133
8147
|
disabled: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as p,__tla as P}from"./__federation_fn_import-CYKgoy9p.js";import v,{__tla as R}from"./__federation_expose_FmIcon-B5L3FtOO.js";let D,T=Promise.all([(()=>{try{return P}catch{}})(),(()=>{try{return R}catch{}})()]).then(async()=>{let y,h,r,d,o,g,i,u,w,k,x,_,m,n,B;({defineComponent:y}=await p("vue")),{renderSlot:h,openBlock:r,createBlock:d,createCommentVNode:o,toDisplayString:g,normalizeClass:i,createElementBlock:u,createVNode:w,resolveDirective:k,withDirectives:x}=await p("vue"),{nextTick:_,onMounted:m,ref:n,watch:B}=await p("vue"),D=y({__name:"FmChip",props:{label:{default:""},icon:{default:""},rightIcon:{default:""},selected:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},removable:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},variant:{default:"plain"}},emits:["chip-closed","click"],setup(I,{emit:S}){const t=I,C=S,l=n(!1),f=n(!1);function b(e){t.selectable&&(f.value=e)}const j=()=>{C("click"),!(!t.selectable||t.disabled)&&(l.value=!l.value)},N=e=>{e.stopPropagation(),!t.disabled&&C("chip-closed")};m(()=>{l.value=t.selected}),B(()=>t.selected,()=>{l.value=t.selected});function V(e,a,s){if(e)return"text-fm-color-typo-disabled";switch(s){case"plain":return a?"text-fm-color-neutral-white":"";case"neutral":case"info":case"success":case"critical":return"text-fm-color-neutral-white";case"warning":return"text-fm-color-neutral-black"}}function W(e,a,s){if(e)return"bg-fm-color-neutral-gray-100 cursor-not-allowed";switch(s){case"plain":return a?"bg-fm-color-neutral-black":"bg-fm-color-neutral-gray-100";case"neutral":return"bg-fm-color-neutral-black";case"info":return"bg-fm-color-secondary-blueberry";case"success":return"bg-fm-color-secondary-mint";case"critical":return"bg-fm-color-secondary-salmon";case"warning":return"bg-fm-color-secondary-mustard"}}const c=n(),z=n(!1);function M(e=0){if(t.label&&!(!c.value&&e>500)){if(!c.value){_(()=>M(e+1));return}z.value=c.value.offsetWidth<c.value.scrollWidth}}return m(()=>{M()}),(e,a)=>{const s=k("tooltip");return x((r(),u("div",{class:i(["inline-flex rounded-md items-center gap-4 justify-center",e.compact?"h-[22px] px-8":"h-[30px] px-8 py-4",W(e.disabled,l.value,e.variant),{"cursor-pointer":e.selectable&&!e.disabled,"hover:bg-fm-color-opacity-sm":!l.value&&!e.disabled&&e.selectable}]),onClick:j,onMousedown:a[0]||(a[0]=()=>b(!0)),onMouseleave:a[1]||(a[1]=()=>b(!1)),onMouseup:a[2]||(a[2]=()=>b(!1))},[h(e.$slots,"default",{},()=>[e.icon?(r(),d(v,{key:0,color:e.disabled?"neutral-gray-200":l.value?"neutral-white":"neutral-black",name:e.icon,outline:!f.value&&!l.value,size:"sm"},null,8,["color","name","outline"])):o("",!0),e.label?(r(),u("div",{key:1,ref_key:"labelRef",ref:c,class:i(["fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap",V(e.disabled,l.value,e.variant)])},g(e.label),3)):o("",!0),e.rightIcon?(r(),d(v,{key:2,color:e.disabled?"neutral-gray-200":l.value?"neutral-white":"neutral-black",name:e.rightIcon,outline:!f.value&&!l.value,size:"sm"},null,8,["color","name","outline"])):o("",!0)]),e.removable?(r(),u("div",{key:0,class:i(["flex items-center justify-center rounded-xxxl",!l.value&&!e.disabled?"hover:bg-fm-color-opacity-sm":"",{"cursor-not-allowed":e.disabled,"cursor-pointer":e.selectable&&!e.disabled}]),onClick:N},[w(v,{color:e.disabled?"neutral-gray-200":l.value?"neutral-white":"neutral-black",name:"close",size:"sm"},null,8,["color"])],2)):o("",!0)],34)),[[s,z.value?e.label:null]])}}})});export{D as _,T as __tla};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as p,__tla as $}from"./__federation_fn_import-CYKgoy9p.js";import{_ as A,__tla as G}from"./FmChip.vue_vue_type_script_setup_true_lang-COOfOYqf.js";let x,I=Promise.all([(()=>{try{return $}catch{}})(),(()=>{try{return G}catch{}})()]).then(async()=>{let b,h,_,n,v,f,y,C,c,k;({defineComponent:b}=await p("vue")),{renderList:h,Fragment:_,openBlock:n,createElementBlock:v,createBlock:f,normalizeClass:y}=await p("vue"),{onMounted:C,ref:c,watch:k}=await p("vue"),x=b({__name:"FmChipGroup",props:{items:{},selectable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},compact:{type:Boolean,default:!1},removable:{type:Boolean,default:!1}},emits:["chip-closed","chip-clicked"],setup(R,{emit:z}){const s=R,B=z,i=c(null),a=c(0),t=c(null),r=c(),d=()=>{var e,o;if(!i.value)return;const l=i.value.getBoundingClientRect();a.value>0&&t.value&&((e=r.value)==null||e.splice(t.value,1)),a.value=0;let u=0;Array.from(i.value.children).forEach((m,g)=>{const w=m.getBoundingClientRect(),M=w.y-l.y;u=Math.max(w.height*2+4,u),M>u&&(a.value+=1,t.value=t.value===null?g:g-a.value)}),a.value>0&&t.value&&((o=r.value)==null||o.splice(t.value,0,{label:`+${a.value}`,removable:!1,selectable:!1,compact:s.compact}))},E=l=>{B("chip-closed",l)},F=l=>{B("chip-clicked",l)};return C(()=>{r.value=s.items,d(),new ResizeObserver(()=>{d()}).observe(i.value)}),k(()=>s.items,()=>{r.value=s.items,d()}),(l,u)=>(n(),v("div",{ref_key:"chipsContainer",ref:i,class:y(["flex flex-wrap gap-4 items-center overflow-y-hidden",l.compact?"max-h-48":"max-h-64"])},[(n(!0),v(_,null,h(r.value,(e,o)=>(n(),f(A,{key:o,label:e.label,icon:e.icon,selected:e.selected,removable:e.removable!==void 0?e.removable:l.removable,selectable:e.selectable!==void 0?e.selectable:l.selectable,disabled:e.disabled!==void 0?e.disabled:l.disabled,compact:l.compact,variant:e.variant,onChipClosed:m=>E(o),onClick:m=>F(o)},null,8,["label","icon","selected","removable","selectable","disabled","compact","variant","onChipClosed","onClick"]))),128))],2))}})});export{x as _,I as __tla};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.fm-calendar__row[data-v-
|
|
1
|
+
.fm-calendar__row[data-v-cc800d6b]{display:flex;height:48px;width:100%}.fm-calendar__cell[data-v-cc800d6b]{position:relative;display:flex;height:48px;width:48px;align-items:center;justify-content:center}.fm-calendar__cell__button[data-v-cc800d6b]{height:100%;width:100%;border-radius:9999px}.fm-calendar__cell__button--today[data-v-cc800d6b]{position:absolute;top:75%;left:50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));width:16px;border-radius:8px;border-bottom-width:2px;border-color:var(--fm-color-primary)}.fm-calendar__cell__button[data-v-cc800d6b]:hover:not(.fm-calendar__cell__button--selected):not(.fm-calendar__cell__button--selected-start):not(.fm-calendar__cell__button--selected-between):not(.fm-calendar__cell__button--selected-end){border-radius:9999px;background-color:var(--fm-color-opacity-sm)}.fm-calendar__cell__button--selected[data-v-cc800d6b]{border-radius:50%!important;font-size:1rem;font-weight:600;line-height:1.25rem;letter-spacing:.005em;text-decoration-line:none;color:var(--fm-color-neutral-white)}.fm-calendar__cell__button--selected[data-v-cc800d6b]:before{--tw-content: "";content:var(--tw-content);z-index:-1;height:100%;width:50%;position:absolute;top:0;left:0}.fm-calendar__cell__button--selected[data-v-cc800d6b]:after{--tw-content: "";content:var(--tw-content);z-index:-1;height:100%;width:50%;position:absolute;top:0;left:50%}.fm-calendar__cell__button--selected-start[data-v-cc800d6b]{border-radius:50%!important;position:relative;font-size:1rem;font-weight:600;line-height:1.25rem;letter-spacing:.005em;text-decoration-line:none;color:var(--fm-color-neutral-white)}.fm-calendar__cell__button--selected-start[data-v-cc800d6b]:before{--tw-content: "";content:var(--tw-content);z-index:-1;height:100%;width:50%;position:absolute;top:0;left:50%}.fm-calendar__cell__button--selected-start[data-v-cc800d6b]:after{--tw-content: "";content:var(--tw-content);z-index:-1;height:100%;width:50%;position:absolute;top:0;left:0}.fm-calendar__cell__button--selected-between[data-v-cc800d6b]{border-radius:0}.fm-calendar__cell__button--selected-end[data-v-cc800d6b]{position:relative;border-radius:50%!important;font-size:1rem;font-weight:600;line-height:1.25rem;letter-spacing:.005em;text-decoration-line:none;color:var(--fm-color-neutral-white)}.fm-calendar__cell__button--selected-end[data-v-cc800d6b]:before{--tw-content: "";content:var(--tw-content);z-index:-1;height:100%;width:50%;position:absolute;top:0;left:0}.fm-calendar__cell__button--selected-end[data-v-cc800d6b]:after{--tw-content: "";content:var(--tw-content);z-index:-1;height:100%;width:50%;position:absolute;top:0;left:50%}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{importShared as j,__tla as Pa}from"./__federation_fn_import-CYKgoy9p.js";import{d as r}from"./dayjs.min-DMGOSre-.js";import{D as d,n as ba,g as ya,__tla as Ea}from"./helper-a7cZBmum.js";import Da,{__tla as $a}from"./__federation_expose_FmIcon-B5L3FtOO.js";import _a,{__tla as Ma}from"./__federation_expose_FmButton-BoCn-KbF.js";import{u as ha,__tla as Aa}from"./useProxiedModel-DbArcH0F.js";import{_ as Ia,__tla as La}from"./FmFormGroup.vue_vue_type_script_setup_true_lang-Dc2WxVgg.js";import H,{__tla as Na}from"./__federation_expose_FmField-D0Rom3Qf.js";import{F as Ua,__tla as za}from"./FmPopover-CVCwxVIt.js";import{_ as X,u as Ta,__tla as Fa}from"./FmDateRangeYearMonthPicker.vue_vue_type_script_setup_true_lang-DIacYXaV.js";import ga,{__tla as Wa}from"./__federation_expose_FmMenuItem-BlT0jLYm.js";import{_ as Ga,__tla as ja}from"./FmMenuDivider.vue_vue_type_script_setup_true_lang-CCOaILZv.js";import Ha,{__tla as Ka}from"./__federation_expose_FmSwitch-D76AWunf.js";import{_ as K,__tla as Ya}from"./FmLabel.vue_vue_type_script_setup_true_lang-CcmBRq-W.js";import qa,{C as M,__tla as Ja}from"./__federation_expose_FmDateRangePickerMobile-CHgHr2In.js";import{i as R}from"./helpers-BMauHSok.js";import{F as Qa}from"./provider-keys-Biea8ASh.js";import{t as o,__tla as Xa}from"./locale-DlTOLQMQ.js";import{_ as Za}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{u as et,__tla as at}from"./useBreakpoints-CD9JASJ_.js";let xa,tt=Promise.all([(()=>{try{return Pa}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Xa}catch{}})(),(()=>{try{return at}catch{}})()]).then(async()=>{let me,u,ce,ka,V,ve,_,p,h,k,f,y,m,v,w,S,Z,pe,be,ye,De,ee,_e,he,ge,xe,ke,we,Re,Ce,Be,Oe,Ve,Se,Pe,Ee,$e,Me,Ae,Ie,Le,Ne,Ue,ze,Te,Fe,We,Ge,je,He,Ke,T,Ye,P,qe,Je,Qe,Xe,E,ae,te,le,re,oe,de,se,Y,ne,ue,Ze,ea;({defineComponent:me}=await j("vue")),{unref:u,normalizeProps:ce,guardReactiveProps:ka,renderSlot:V,mergeProps:ve,createCommentVNode:_,createVNode:p,toDisplayString:h,normalizeClass:k,createElementVNode:f,withCtx:y,openBlock:m,createElementBlock:v,Fragment:w,renderList:S,createBlock:Z,isRef:pe,createSlots:be,pushScopeId:ye,popScopeId:De}=await j("vue"),ee=I=>(ye("data-v-cc800d6b"),I=I(),De(),I),_e={key:0,class:"flex gap-4 items-center relative w-full"},he={class:"flex flex-col gap-4 w-full"},ge=ee(()=>f("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)),xe={class:"flex flex-col gap-4 w-full"},ke={key:1,class:"flex flex-col gap-4 w-full"},we={class:"flex gap-4 p-12"},Re={key:0,class:"max-h-[549px] overflow-y-auto w-[171px]"},Ce={key:0,class:"px-8"},Be={key:1,class:"-my-12 border-fm-color-neutral-gray-100 border-l shrink-0"},Oe={class:"flex flex-col gap-24"},Ve={key:0,class:"flex gap-4 items-center px-12 w-full"},Se={class:"flex flex-col gap-4 w-full"},Pe=ee(()=>f("div",{class:"fm-typo-en-body-lg-400 h-6 mt-7 shrink-0 text-center text-fm-color-typo-primary w-6"}," - ",-1)),Ee={class:"flex flex-col gap-4 w-full"},$e={class:"flex gap-24"},Me={class:"w-max"},Ae={class:"flex gap-16 h-40 items-center justify-start px-4 py-8"},Ie={class:"flex gap-4 items-center"},Le={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},Ne={class:"h-[288px]"},Ue={key:0,class:"fm-calendar__cell__button--today"},ze=["onClick","onMouseover"],Te={class:"w-max"},Fe={class:"flex gap-16 h-10 items-center justify-end px-4 py-8"},We={class:"flex gap-4 items-center"},Ge={class:"fm-calendar__row fm-typo-en-body-lg-400 text-fm-color-typo-tertiary"},je={key:0,class:"fm-calendar__cell__button--today"},He=["onClick","onMouseover"],Ke={class:"flex gap-8 h-72 items-center justify-end py-16 w-full"},{computed:T,inject:Ye,ref:P,watch:qe}=await j("vue"),Je=me({__name:"FmDateRangePickerDesktop",props:{modelValue:{},startLabel:{},endLabel:{},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:o("date.predefinedRanges.today"),value:{startDate:r().format(d),endDate:r().format(d)}},{label:o("date.predefinedRanges.yesterday"),value:{startDate:r().subtract(1,"day").format(d),endDate:r().subtract(1,"day").format(d)}},{label:o("date.predefinedRanges.thisWeek"),value:{startDate:r().startOf("week").format(d),endDate:r().endOf("week").format(d)}},{label:o("date.predefinedRanges.lastWeek"),value:{startDate:r().subtract(1,"week").startOf("week").format(d),endDate:r().subtract(1,"week").endOf("week").format(d)}},{label:o("date.predefinedRanges.last7Days"),value:{startDate:r().subtract(7,"day").format(d),endDate:r().subtract(1,"day").format(d)}},{label:o("date.predefinedRanges.thisMonth"),value:{startDate:r().startOf("month").format(d),endDate:r().endOf("month").format(d)}},{label:o("date.predefinedRanges.lastMonth"),value:{startDate:r().subtract(1,"month").startOf("month").format(d),endDate:r().subtract(1,"month").endOf("month").format(d)}},{label:o("date.predefinedRanges.thisYear"),value:{startDate:r().startOf("year").format(d),endDate:r().endOf("year").format(d)}}]},compare:{type:Boolean,default:!1},compareLabel:{},min:{default:()=>r().subtract(50,"year").format(d)},max:{default:()=>r().add(25,"year").format(d)},zIndex:{default:void 0},locale:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(I){var ra,oa;const z=[{id:M.PRECEDING_PERIOD,label:o("date.precedingPeriod"),sublabel:"",action:()=>{$.value=M.PRECEDING_PERIOD;const e=s.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:M.PRECEDING_WEEK,label:o("date.precedingPeriod"),sublabel:o("date.match.dayOfWeek"),action:()=>{$.value=M.PRECEDING_WEEK;const e=s.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:M.PRECEDING_MONTH,label:o("date.precedingPeriod"),sublabel:o("date.match.dayOfMonth"),action:()=>{$.value=M.PRECEDING_MONTH;const e=s.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:M.CUSTOM,label:o("date.match.custom"),sublabel:"",action:()=>{$.value=M.CUSTOM}}],C=I,B=Ye(Qa,null),L=r(),n=ha(C,"modelValue"),s=P([{startDate:(ra=n.value)!=null&&ra.startDate?r(n.value.startDate,d):null,endDate:(oa=n.value)!=null&&oa.endDate?r(n.value.endDate,d):null},{startDate:null,endDate:null}]),b=P(!1),g=T(()=>C.disabled??(B==null?void 0:B.getDisabled())??!1),D=P(!1),$=P(""),N=P(r().startOf("month")),F=P(r().startOf("month").add(1,"month")),ie=P(""),fe=P(null);let x=0;const aa=e=>{var a;if(ie.value="",s.value[x].startDate&&s.value[x].endDate){x===1&&(s.value=s.value.map(()=>({startDate:null,endDate:null})),x=0),s.value[0]={startDate:e,endDate:null};return}else if(!s.value[x].startDate&&!s.value[x].endDate)s.value[x].startDate=e;else{if(e.isBefore(s.value[x].startDate)){const i=s.value[x].startDate;s.value[x]={startDate:e,endDate:i}}else s.value[x].endDate=e;D.value&&(x=1),z.find(i=>i.id===$.value)||($.value=M.CUSTOM)}(a=z.find(i=>i.id===$.value))==null||a.action()},wa=()=>{D.value?n.value=s.value.map(e=>({startDate:e.startDate.format(d),endDate:e.endDate.format(d)})):n.value={startDate:s.value[0].startDate.format(d),endDate:s.value[0].endDate.format(d)},setTimeout(()=>{b.value=!1})},Ra=()=>{var e,a;Array.isArray(n.value)?s.value=n.value:s.value[0]={startDate:(e=n.value)!=null&&e.startDate?r(n.value.startDate,d):null,endDate:(a=n.value)!=null&&a.endDate?r(n.value.endDate,d):null},b.value=!1},U=(e,a)=>{e==="left"?(N.value=a,F.value=a.add(1,"month")):e==="right"&&(F.value=a,N.value=a.subtract(1,"month"))},ta=e=>{const a=s.value[0].startDate,i=s.value[0].endDate,t=s.value[1].startDate,c=s.value[1].endDate,l=fe.value,O=a==null?void 0:a.isSame(e),W=i==null?void 0:i.isSame(e),A=t==null?void 0:t.isSame(e),G=c==null?void 0:c.isSame(e),J=l==null?void 0:l.isSame(e),da=O&&i&&!(O&&W)||a&&!i&&O&&(l==null?void 0:l.isAfter(a))||a&&!i&&J&&(l==null?void 0:l.isBefore(a)),sa=A&&c&&!(A&&G)||t&&!c&&A&&(l==null?void 0:l.isAfter(t))||t&&!c&&J&&(l==null?void 0:l.isBefore(t)),na=W&&a&&!(O&&W)||a&&!i&&O&&(l==null?void 0:l.isBefore(a))||a&&!i&&J&&(l==null?void 0:l.isAfter(a)),ua=G&&t&&!(A&&G)||t&&!c&&A&&(l==null?void 0:l.isBefore(t))||t&&!c&&J&&(l==null?void 0:l.isAfter(t)),ia=O&&W||O&&!i,fa=A&&G||A&&!c,ma=a&&(i||l)&&i?e.isAfter(a)&&e.isBefore(i):e.isAfter(l)&&e.isBefore(a)||e.isBefore(l)&&e.isAfter(a),ca=t&&(c||l)&&c?e.isAfter(t)&&e.isBefore(c):e.isAfter(l)&&e.isBefore(t)||e.isBefore(l)&&e.isAfter(t),Q=()=>{if(s.value.filter(va=>{var pa;for(const Sa in va)if((pa=va[Sa])!=null&&pa.isSame(e,"day"))return!0;return!1}).length===2)return"bg-fm-color-system-success-400 before:bg-fm-color-system-success-100";if(O&&W&&(R(e,t,c)||R(e,t,l)))return"bg-fm-color-primary before:bg-fm-color-system-info-100 after:bg-fm-color-system-info-100";if(A&&G&&(R(e,a,i)||R(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(da||na)return R(e,t,c)||R(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||ua)return R(e,a,i)||R(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(ia)return"bg-fm-color-primary";if(fa)return"bg-fm-color-system-info-300";if(R(e,a,i)&&(R(e,t,c)||R(e,t,l)))return"bg-fm-color-system-success-100";if(ma)return"bg-fm-color-system-warning-100";if(ca)return"bg-fm-color-system-info-100"};return{[`fm-calendar__cell__button--selected-start ${Q()}`]:da||sa,[`fm-calendar__cell__button--selected-end ${Q()}`]:na||ua,[`fm-calendar__cell__button--selected-between ${Q()}`]:ma||ca,[`fm-calendar__cell__button--selected ${Q()}`]:ia||fa}},la=e=>{const a=s.value;if(a[0].startDate&&!a[0].endDate||a[1].startDate&&!a[1].endDate){fe.value=e;return}fe.value=null},Ca=e=>{ie.value=e.label,s.value[0]={startDate:r(e.value.startDate,d),endDate:r(e.value.endDate,d)},U("left",r(e.value.startDate,d).startOf("month"))},Ba=T(()=>D.value?!s.value.every(e=>e.startDate&&e.endDate):!(s.value[0].startDate&&s.value[0].endDate)),Oa=e=>{$.value="",D.value=e,s.value=Array.from(Array(2),()=>({startDate:null,endDate:null})),x=0},q=T(()=>{if(!n.value)return{startDate:o("date.placeholder"),endDate:o("date.placeholder")};const e=D.value&&Array.isArray(n.value)?n.value[0].startDate:n.value.startDate,a=D.value&&Array.isArray(n.value)?n.value[0].endDate:n.value.endDate;return{startDate:e?r(e).format(o("date.format")):o("date.placeholder"),endDate:a?r(a).format(o("date.format")):o("date.placeholder")}}),Va=T(()=>{const e=D.value&&Array.isArray(n.value)?n.value[1].startDate:null,a=D.value&&Array.isArray(n.value)?n.value[1].endDate:null;return e&&a?`${o("date.compareLabel")} ${r(e).format(o("date.format"))} - ${r(a).format(o("date.format"))}`:""});return qe(()=>n.value,()=>{var e,a;D.value?s.value=n.value.map(i=>({startDate:i!=null&&i.startDate?r(i.startDate,d):null,endDate:i!=null&&i.endDate?r(i.endDate,d):null})):s.value[0]={startDate:(e=n.value)!=null&&e.startDate?r(n.value.startDate,d):null,endDate:(a=n.value)!=null&&a.endDate?r(n.value.endDate,d):null}}),(e,a)=>(m(),Z(Ia,{modelValue:u(n),"onUpdate:modelValue":a[8]||(a[8]=i=>pe(n)?n.value=i:null),disabled:g.value,focused:b.value,"helper-state":e.helperState,"helper-text":D.value?Va.value:e.helperText,rules:e.rules,tag:"div"},be({default:y(({invalid:i})=>[p(Ua,{disabled:g.value,"show-popover":b.value,"z-index":C.zIndex,onPopoverChanged:a[7]||(a[7]=t=>b.value=t)},{"popover-button":y(()=>[e.$slots["trigger-button"]?V(e.$slots,"trigger-button",ce(ve({key:0},{opened:b.value,invalid:i,showValidBorder:e.showValidBorder,isComparing:D.value,disabled:g.value})),void 0,!0):(m(),v(w,{key:1},[e.compare?_("",!0):(m(),v("div",_e,[f("label",he,[p(K,{disabled:g.value,label:C.startLabel??u(o)("date.startDate")},null,8,["disabled","label"]),p(H,{class:k(g.value?"cursor-not-allowed":"cursor-pointer"),disabled:g.value,focused:b.value,"icon-outlined":!b.value,invalid:i,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:y(()=>[V(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[V(e.$slots,"append",{},void 0,!0)]),default:y(()=>{var t;return[f("div",{class:k([[g.value?"text-fm-color-typo-disabled cursor-not-allowed":"text-fm-color-typo-primary cursor-pointer"],"fm-typo-en-body-lg-400"])},h((t=u(n))!=null&&t.startDate?u(r)(u(n).startDate).format(u(o)("date.format")):u(o)("date.placeholder")),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])]),ge,f("label",xe,[p(K,{disabled:g.value,label:C.endLabel??u(o)("date.endDate")},null,8,["disabled","label"]),p(H,{class:k(g.value?"cursor-not-allowed":"cursor-pointer"),disabled:g.value,focused:b.value,"icon-outlined":!b.value,invalid:i,"show-valid-border":e.showValidBorder,"prepend-icon":"calendar_month"},{prepend:y(()=>[V(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[V(e.$slots,"append",{},void 0,!0)]),default:y(()=>{var t;return[f("div",{class:k([[g.value?"text-fm-color-typo-disabled":q.value.startDate!==u(o)("date.placeholder")?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},h((t=u(n))!=null&&t.endDate?u(r)(u(n).endDate).format(u(o)("date.format")):u(o)("date.placeholder")),3)]}),_:2},1032,["class","disabled","focused","icon-outlined","invalid","show-valid-border"])])])),e.compare?(m(),v("label",ke,[p(K,{label:e.compareLabel??u(o)("date.compare"),locale:e.locale},null,8,["label","locale"]),p(H,{class:k(g.value?"cursor-not-allowed":"cursor-pointer"),focused:b.value,invalid:i,"show-valid-border":e.showValidBorder},{prepend:y(()=>[V(e.$slots,"prepend",{},void 0,!0)]),append:y(()=>[V(e.$slots,"append",{},void 0,!0)]),default:y(()=>[f("div",{class:k([[g.value?"text-fm-color-typo-disabled":q.value.startDate!==u(o)("date.placeholder")?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},h(q.value.startDate)+" - "+h(q.value.endDate),3)]),_:2},1032,["class","focused","invalid","show-valid-border"])])):_("",!0)],64))]),default:y(()=>[f("div",we,[e.showPredefinedRange?(m(),v("div",Re,[(m(!0),v(w,null,S(e.predefinedRange,(t,c)=>(m(),Z(ga,{key:c,label:t.label,"model-value":ie.value===t.label,selectable:"",onClick:l=>Ca(t)},null,8,["label","model-value","onClick"]))),128)),e.compare&&e.predefinedRange?(m(),v("div",Ce,[p(Ga,{inset:""})])):_("",!0),e.compare?(m(),v(w,{key:1},[p(Ha,{"model-value":D.value,class:"justify-between px-12",label:u(o)("date.label.compare"),"onUpdate:modelValue":a[0]||(a[0]=t=>Oa(t))},null,8,["model-value","label"]),D.value?(m(),v(w,{key:0},S(z,(t,c)=>p(ga,{key:c,label:t.label,"model-value":$.value===t.id,sublabel:t.sublabel,selectable:"",onClick:l=>t.action()},null,8,["label","model-value","sublabel","onClick"])),64)):_("",!0)],64)):_("",!0)])):_("",!0),e.showPredefinedRange?(m(),v("div",Be)):_("",!0),f("div",{class:k({"pl-4":e.showPredefinedRange})},[f("div",Oe,[D.value?(m(),v("div",Ve,[f("label",Se,[p(K,{locale:e.locale,label:u(o)("date.label.custom")},null,8,["locale","label"]),p(H,{focused:!1},{default:y(()=>{var t,c;return[f("div",{class:k([[(t=s.value[0])!=null&&t.startDate&&((c=s.value[0])!=null&&c.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},h(s.value[0].startDate!==null?s.value[0].startDate.format(u(o)("date.format")):u(o)("date.placeholder"))+" - "+h(s.value[0].endDate!==null?s.value[0].endDate.format(u(o)("date.format")):u(o)("date.placeholder")),3)]}),_:1})]),Pe,f("label",Ee,[p(K,{locale:e.locale,label:u(o)("date.label.compare")},null,8,["locale","label"]),p(H,{focused:!1},{default:y(()=>{var t,c;return[f("div",{class:k([[(t=s.value[1])!=null&&t.startDate&&((c=s.value[1])!=null&&c.endDate)?"text-fm-color-typo-primary":"text-fm-color-typo-tertiary"],"fm-typo-en-body-lg-400"])},h(s.value[1].startDate!==null?s.value[1].startDate.format(u(o)("date.format")):u(o)("date.placeholder"))+" - "+h(s.value[1].endDate!==null?s.value[1].endDate.format(u(o)("date.format")):u(o)("date.placeholder")),3)]}),_:1})])])):_("",!0),f("div",$e,[f("div",Me,[f("div",Ae,[f("div",Ie,[p(Da,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_left",onClick:a[1]||(a[1]=()=>U("left",N.value.subtract(1,"month")))}),p(X,{max:e.max,min:e.min,"model-value":N.value,picker:"month","onUpdate:modelValue":a[2]||(a[2]=t=>U("left",t))},null,8,["max","min","model-value"]),p(X,{max:e.max,min:e.min,"model-value":N.value,picker:"year","onUpdate:modelValue":a[3]||(a[3]=t=>U("left",t))},null,8,["max","min","model-value"])])]),f("div",null,[f("div",Le,[(m(!0),v(w,null,S(u(ba)(),t=>(m(),v("div",{key:t,class:"fm-calendar__cell"},h(t),1))),128))]),f("div",Ne,[(m(!0),v(w,null,S(u(ya)(N.value),(t,c)=>(m(),v("div",{key:c,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(m(!0),v(w,null,S(t,l=>(m(),v("div",{key:l.date.date(),class:"fm-calendar__cell"},[l.date.isSame(u(L),"day")&&l.isCurrentMonth?(m(),v("div",Ue)):_("",!0),l.isCurrentMonth?(m(),v("button",{key:1,class:k([[ta(l.date),{"fm-typo-en-body-lg-600":l.date.isSame(u(L),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>aa(l.date),onMouseover:O=>la(l.date)},h(l.date.date()),43,ze)):_("",!0)]))),128))]))),128))])])]),f("div",Te,[f("div",Fe,[f("div",We,[p(X,{max:e.max,min:e.min,"model-value":F.value,picker:"month","onUpdate:modelValue":a[4]||(a[4]=t=>U("right",t))},null,8,["max","min","model-value"]),p(X,{max:e.max,min:e.min,"model-value":F.value,picker:"year","onUpdate:modelValue":a[5]||(a[5]=t=>U("right",t))},null,8,["max","min","model-value"])]),p(Da,{outline:!1,class:"cursor-pointer select-none",color:"#1C1C1E",name:"chevron_right",onClick:a[6]||(a[6]=()=>U("left",N.value.add(1,"month")))})]),f("div",null,[f("div",Ge,[(m(!0),v(w,null,S(u(ba)(),t=>(m(),v("div",{key:t,class:"fm-calendar__cell"},h(t),1))),128))]),f("div",null,[(m(!0),v(w,null,S(u(ya)(F.value),(t,c)=>(m(),v("div",{key:c,class:"fm-calendar__row fm-typo-en-body-lg-400"},[(m(!0),v(w,null,S(t,l=>(m(),v("div",{key:l.date.date(),class:"fm-calendar__cell"},[l.date.isSame(u(L),"day")&&l.isCurrentMonth?(m(),v("div",je)):_("",!0),l.isCurrentMonth?(m(),v("button",{key:1,class:k([[ta(l.date),{"fm-typo-en-body-lg-600":l.date.isSame(u(L),"day")}],"fm-calendar__cell__button"]),type:"button",onClick:()=>aa(l.date),onMouseover:O=>la(l.date)},h(l.date.date()),43,He)):_("",!0)]))),128))]))),128))])])])])]),f("div",Ke,[p(_a,{label:u(o)("actions.cancel"),size:"md",variant:"tertiary",onClick:Ra},null,8,["label"]),p(_a,{disabled:Ba.value,label:u(o)("actions.apply"),size:"md",variant:"primary",onClick:wa},null,8,["disabled","label"])])],2)])]),_:2},1032,["disabled","show-popover","z-index"])]),_:2},[e.$slots["helper-text"]?{name:"helper-text",fn:y(()=>[V(e.$slots,"helper-text",{},void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","disabled","focused","helper-state","helper-text","rules"]))}}),Qe=Za(Je,[["__scopeId","data-v-cc800d6b"]]),{defineComponent:Xe}=await j("vue"),{unref:E,normalizeProps:ae,guardReactiveProps:te,renderSlot:le,isRef:re,mergeProps:oe,withCtx:de,createSlots:se,openBlock:Y,createBlock:ne,createCommentVNode:ue,Fragment:Ze,createElementBlock:ea}=await j("vue"),xa=Xe({__name:"FmDateRangePicker",props:{modelValue:{},startLabel:{},endLabel:{},disabled:{type:Boolean,default:void 0},showValidBorder:{type:Boolean,default:!1},showPredefinedRange:{type:Boolean,default:!1},predefinedRange:{default:()=>[{label:o("date.predefinedRanges.today"),value:{startDate:r().format(d),endDate:r().format(d)}},{label:o("date.predefinedRanges.yesterday"),value:{startDate:r().subtract(1,"day").format(d),endDate:r().subtract(1,"day").format(d)}},{label:o("date.predefinedRanges.thisWeek"),value:{startDate:r().startOf("week").format(d),endDate:r().endOf("week").format(d)}},{label:o("date.predefinedRanges.lastWeek"),value:{startDate:r().subtract(1,"week").startOf("week").format(d),endDate:r().subtract(1,"week").endOf("week").format(d)}},{label:o("date.predefinedRanges.last7Days"),value:{startDate:r().subtract(7,"day").format(d),endDate:r().subtract(1,"day").format(d)}},{label:o("date.predefinedRanges.thisMonth"),value:{startDate:r().startOf("month").format(d),endDate:r().endOf("month").format(d)}},{label:o("date.predefinedRanges.lastMonth"),value:{startDate:r().subtract(1,"month").startOf("month").format(d),endDate:r().subtract(1,"month").endOf("month").format(d)}},{label:o("date.predefinedRanges.thisYear"),value:{startDate:r().startOf("year").format(d),endDate:r().endOf("year").format(d)}}]},compare:{type:Boolean,default:!1},compareLabel:{},min:{default:()=>r().subtract(50,"year").format(d)},max:{default:()=>r().add(25,"year").format(d)},zIndex:{},locale:{},labelMark:{default:"none"},labelInfo:{default:""},focused:{type:Boolean,default:!1},rules:{default:()=>[]},helperText:{default:""},helperState:{default:"none"}},emits:["update:modelValue"],setup(I){const z=I,{breakpoints:C}=et(),B=ha(z,"modelValue"),L=Ta(z);return(n,s)=>(Y(),ea(Ze,null,[E(C).md||E(C).lg?(Y(),ne(Qe,oe({key:0},E(L),{modelValue:E(B),"onUpdate:modelValue":s[0]||(s[0]=b=>re(B)?B.value=b:null)}),se({_:2},[n.$slots["trigger-button"]?{name:"trigger-button",fn:de(b=>[le(n.$slots,"trigger-button",ae(te(b)))]),key:"0"}:void 0]),1040,["modelValue"])):ue("",!0),E(C).xs||E(C).sm?(Y(),ne(qa,oe({key:1},E(L),{modelValue:E(B),"onUpdate:modelValue":s[1]||(s[1]=b=>re(B)?B.value=b:null)}),se({_:2},[n.$slots["trigger-button"]?{name:"trigger-button",fn:de(b=>[le(n.$slots,"trigger-button",ae(te(b)))]),key:"0"}:void 0]),1040,["modelValue"])):ue("",!0)],64))}})});export{xa as _,tt as __tla};
|