@feedmepos/ui-library 1.2.13-rc.10 → 1.2.13-rc.11
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 +8 -1
- package/dist/components/form/text-field/FmTextField.vue.d.ts +2 -2
- package/dist/components.d.ts +11 -8
- package/dist/federation/{FmGlobalSearch.vue_vue_type_script_setup_true_lang-C3_s6QHe.js → FmGlobalSearch.vue_vue_type_script_setup_true_lang-QJPMbFJC.js} +1 -1
- package/dist/federation/{FmPhoneNumber.vue_vue_type_script_setup_true_lang-DwZVTL-L.js → FmPhoneNumber.vue_vue_type_script_setup_true_lang-BNPXS_w0.js} +1 -1
- package/dist/federation/{FmSearch.vue_vue_type_script_setup_true_lang-5zaJ6fL3.js → FmSearch.vue_vue_type_script_setup_true_lang-CHXoaYvN.js} +1 -1
- package/dist/federation/FmTextField.vue_vue_type_style_index_0_lang-D1tSRmqs.js +1 -0
- package/dist/federation/{__federation_expose_FmGlobalSearch-AKMPexOc.js → __federation_expose_FmGlobalSearch-D5zd7IkG.js} +1 -1
- package/dist/federation/{__federation_expose_FmPhoneNumber-DvMgkptU.js → __federation_expose_FmPhoneNumber-BgXJNdmq.js} +1 -1
- package/dist/federation/{__federation_expose_FmSearch-BFXhrv8U.js → __federation_expose_FmSearch-Dq9I1x34.js} +1 -1
- package/dist/federation/{__federation_expose_FmTextField-Bc7k6y6c.js → __federation_expose_FmTextField-BlMSG5J4.js} +1 -1
- package/dist/federation/feedmepos-ui-components.js +1 -1
- package/dist/federation/{index-BYLZZDjm.js → index-CadwspEL.js} +2 -2
- package/dist/feedmepos-ui-library.js +6 -9
- package/dist/feedmepos-ui-library.umd.cjs +3 -3
- package/package.json +1 -1
- package/dist/federation/FmTextField.vue_vue_type_style_index_0_lang-BWcQtJXz.js +0 -1
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type Ref } from 'vue';
|
|
2
1
|
import { type FormChildProps } from '../../../composables/useFormChild';
|
|
3
2
|
export interface FmTextFieldProps extends FormChildProps {
|
|
4
3
|
placeholder?: string;
|
|
@@ -15,7 +14,7 @@ export interface FmTextFieldProps extends FormChildProps {
|
|
|
15
14
|
showWordCount?: boolean;
|
|
16
15
|
invalid?: boolean;
|
|
17
16
|
autofocus?: boolean;
|
|
18
|
-
|
|
17
|
+
debounce?: number;
|
|
19
18
|
}
|
|
20
19
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<FmTextFieldProps>, {
|
|
21
20
|
label: string;
|
|
@@ -36,6 +35,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
36
35
|
showWordCount: boolean;
|
|
37
36
|
}>, {
|
|
38
37
|
focus: () => void;
|
|
38
|
+
inputEl: import("vue").Ref<HTMLInputElement | null>;
|
|
39
39
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
40
40
|
"update:modelValue": (value: string) => void;
|
|
41
41
|
"focus-changed": (value: boolean) => void;
|
package/dist/components.d.ts
CHANGED
|
@@ -8191,14 +8191,15 @@ export declare const components: {
|
|
|
8191
8191
|
type: import("vue").PropType<boolean>;
|
|
8192
8192
|
default: boolean;
|
|
8193
8193
|
};
|
|
8194
|
-
|
|
8195
|
-
type: import("vue").PropType<
|
|
8194
|
+
debounce: {
|
|
8195
|
+
type: import("vue").PropType<number>;
|
|
8196
8196
|
};
|
|
8197
8197
|
}>> & {
|
|
8198
8198
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
8199
8199
|
"onFocus-changed"?: ((value: boolean) => any) | undefined;
|
|
8200
8200
|
}, {
|
|
8201
8201
|
focus: () => void;
|
|
8202
|
+
inputEl: import("vue").Ref<HTMLInputElement | null>;
|
|
8202
8203
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8203
8204
|
"update:modelValue": (value: string) => void;
|
|
8204
8205
|
"focus-changed": (value: boolean) => void;
|
|
@@ -8280,8 +8281,8 @@ export declare const components: {
|
|
|
8280
8281
|
type: import("vue").PropType<boolean>;
|
|
8281
8282
|
default: boolean;
|
|
8282
8283
|
};
|
|
8283
|
-
|
|
8284
|
-
type: import("vue").PropType<
|
|
8284
|
+
debounce: {
|
|
8285
|
+
type: import("vue").PropType<number>;
|
|
8285
8286
|
};
|
|
8286
8287
|
}>> & {
|
|
8287
8288
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
@@ -8388,14 +8389,15 @@ export declare const components: {
|
|
|
8388
8389
|
type: import("vue").PropType<boolean>;
|
|
8389
8390
|
default: boolean;
|
|
8390
8391
|
};
|
|
8391
|
-
|
|
8392
|
-
type: import("vue").PropType<
|
|
8392
|
+
debounce: {
|
|
8393
|
+
type: import("vue").PropType<number>;
|
|
8393
8394
|
};
|
|
8394
8395
|
}>> & {
|
|
8395
8396
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
8396
8397
|
"onFocus-changed"?: ((value: boolean) => any) | undefined;
|
|
8397
8398
|
}, {
|
|
8398
8399
|
focus: () => void;
|
|
8400
|
+
inputEl: import("vue").Ref<HTMLInputElement | null>;
|
|
8399
8401
|
}, {}, {}, {}, {
|
|
8400
8402
|
label: string;
|
|
8401
8403
|
disabled: boolean;
|
|
@@ -8495,14 +8497,15 @@ export declare const components: {
|
|
|
8495
8497
|
type: import("vue").PropType<boolean>;
|
|
8496
8498
|
default: boolean;
|
|
8497
8499
|
};
|
|
8498
|
-
|
|
8499
|
-
type: import("vue").PropType<
|
|
8500
|
+
debounce: {
|
|
8501
|
+
type: import("vue").PropType<number>;
|
|
8500
8502
|
};
|
|
8501
8503
|
}>> & {
|
|
8502
8504
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
8503
8505
|
"onFocus-changed"?: ((value: boolean) => any) | undefined;
|
|
8504
8506
|
}, {
|
|
8505
8507
|
focus: () => void;
|
|
8508
|
+
inputEl: import("vue").Ref<HTMLInputElement | null>;
|
|
8506
8509
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8507
8510
|
"update:modelValue": (value: string) => void;
|
|
8508
8511
|
"focus-changed": (value: boolean) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{importShared as O,__tla as Ke}from"./__federation_fn_import-Batzb-of.js";import Fe,{__tla as Le}from"./__federation_expose_FmTopSheet-D-BZdKBX.js";import{_ as Me,__tla as ze}from"./FmSearch.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import{importShared as O,__tla as Ke}from"./__federation_fn_import-Batzb-of.js";import Fe,{__tla as Le}from"./__federation_expose_FmTopSheet-D-BZdKBX.js";import{_ as Me,__tla as ze}from"./FmSearch.vue_vue_type_script_setup_true_lang-CHXoaYvN.js";import U,{__tla as Ne}from"./__federation_expose_FmButton-CKWHZqwH.js";import{d as he}from"./index-RDtT6JTM.js";import Pe,{__tla as $e}from"./__federation_expose_FmCircularProgress-IyJfIIwD.js";import{u as ye,__tla as Be}from"./useProxiedModel-Cil0ZKGg.js";import ge,{__tla as Ae}from"./__federation_expose_FmIcon-6QbjDMnx.js";import{g as Ie}from"./_commonjsHelpers-Cpj98o6Y.js";import Re,{__tla as Ee}from"./__federation_expose_FmSpacer-CBF82AiW.js";let _e,Je=Promise.all([(()=>{try{return Ke}catch{}})(),(()=>{try{return Le}catch{}})(),(()=>{try{return ze}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return $e}catch{}})(),(()=>{try{return Be}catch{}})(),(()=>{try{return Ae}catch{}})(),(()=>{try{return Ee}catch{}})()]).then(async()=>{var j={exports:{}};(function(L,w){(function(){var e={};L.exports=e,e.simpleFilter=function(o,a){return a.filter(function(r){return e.test(o,r)})},e.test=function(o,a){return e.match(o,a)!==null},e.match=function(o,a,r){r=r||{};var v=0,c=[],p=a.length,k=0,u=0,n=r.pre||"",K=r.post||"",B=r.caseSensitive&&a||a.toLowerCase(),C;o=r.caseSensitive&&o||o.toLowerCase();for(var _=0;_<p;_++)C=a[_],B[_]===o[v]?(C=n+C+K,v+=1,u+=1+u):u=0,k+=u,c[c.length]=C;return v===o.length?(k=B===o?1/0:k,{rendered:c.join(""),score:k}):null},e.filter=function(o,a,r){return!a||a.length===0?[]:typeof o!="string"?a:(r=r||{},a.reduce(function(v,c,p,k){var u=c;r.extract&&(u=r.extract(c));var n=e.match(o,u,r);return n!=null&&(v[v.length]={string:n.rendered,score:n.score,index:p,original:c}),v},[]).sort(function(v,c){var p=c.score-v.score;return p||v.index-c.index}))}})()})(j);var be=j.exports;const xe=Ie(be);function z(L,w){const[e]=xe.filter(L.toLocaleLowerCase(),[w],{pre:"|",post:"|",extract(a){return a.toLocaleLowerCase()}});if(!e)return{label:w,segments:[{segment:w,isMatch:!1}],matched:!1};const o=e.string.toString().replace(/\|\|/g,"").split("|").reduce((a,r,v)=>(a.push({segment:r,isMatch:v%2!==0}),a),new Array);return{label:w,segments:o,matched:!0}}let D,G,g,s,m,f,N,F,b,V,P,q,I,R,H,Q,T,W,X,Y,Z,ee,le,te,ae,re,oe,ne,se,ce,ue,ie,me,de,x,S,$,ve;({defineComponent:D}=await O("vue")),{unref:G,createVNode:g,createElementVNode:s,openBlock:m,createElementBlock:f,createCommentVNode:N,renderList:F,Fragment:b,toDisplayString:V,renderSlot:P,mergeProps:q,normalizeClass:I,createBlock:R,isRef:H,withCtx:Q}=await O("vue"),T={class:"flex flex-col gap-4"},W={class:"bg-white flex gap-4 px-24 py-8 sticky top-0"},X={class:"hidden sm:inline xs:inline"},Y={key:0},Z={key:0,class:"flex flex-col"},ee={class:"flex flex-col"},le={class:"flex items-center px-24 py-12"},te=s("div",{class:"fm-typo-en-body-md-400 text-fm-color-typo-secondary"}," Recent search ",-1),ae=s("div",{class:"py-4"},[s("hr",{class:"border-fm-color-neutral-gray-100"})],-1),re=["onClick"],oe={class:"fm-typo-en-body-lg-400 text-fm-color-typo-primary"},ne={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-primary"},se={class:"fm-typo-en-body-lg-400 px-24 py-12 text-center text-fm-color-typo-secondary"},ce={key:3,class:"flex flex-col"},ue=["onClick"],ie={class:"flex flex-col gap-4"},me={key:0,class:"text-fm-color-typo-secondary"},de={class:"px-16 py-4"},{computed:x,ref:S,watch:$}=await O("vue"),ve=5,_e=D({__name:"FmGlobalSearch",props:{show:{type:Boolean,default:!1},modelValue:{default:""},suggestions:{default:void 0},onSearch:{type:Function,default:void 0},placeholder:{default:""},hintPlaceholder:{default:""},notFoundPlaceholder:{default:""},recentSearchKey:{default:""}},emits:["dismiss","submit","update:show","update:modelValue"],setup(L,{emit:w}){const e=L,o=w;function a(){if(!e.recentSearchKey)return;const l=e.recentSearchKey;localStorage.removeItem(l),c.value=[]}function r(){if(!e.recentSearchKey)return;const l=e.recentSearchKey,t=localStorage.getItem(l);if(!t)return[];try{return JSON.parse(t)}catch{return new Array}}const v=he(function(l){if(!e.recentSearchKey)return;const t=e.recentSearchKey,d=l().trim();if(!t||!d)return;const h=r()??[],i=[...new Set([d,...h])].slice(0,ve),M=JSON.stringify(i);return localStorage.setItem(t,M),c.value=i,i},800),c=S(r()),p=ye(e,"show");$([()=>e.show],()=>{e.show?(n.value=null,e.suggestions&&fe()):o("dismiss")});const k=ye(e,"modelValue"),u=S(e.modelValue);$([()=>u.value],()=>{we()});const n=S(null),K=S(!0),B=x(()=>{var l;return K.value?(l=n.value)==null?void 0:l.slice(0,5):n.value});$([()=>n.value],([])=>{K.value=!0});const C=x(()=>n.value===null),_=S(!1),A=S(""),E=()=>u.value;async function fe(){if(!p.value)return;const l=E();if(!l)return;const t=Math.random().toString();if(A.value=t,e.suggestions){n.value=e.suggestions.map(d=>({label:z(l,d.label),sublabel:d.sublabel?z(l,d.sublabel):null})).filter(d=>{var h;return d.label.matched||((h=d.sublabel)==null?void 0:h.matched)}),v(E);return}if(e.onSearch)try{_.value=!0;const d=await e.onSearch(l);t===A.value&&(n.value=d.map(h=>({label:z(l,h.label),sublabel:h.sublabel?z(l,h.sublabel):null})))}catch{t===A.value&&(n.value=[])}finally{t===A.value&&(_.value=!1,v(E))}}function Se(l){p.value=!1,o("dismiss"),k.value=l}const we=he(fe),pe=x(()=>c.value&&c.value.length===0),ke=x(()=>(!u.value||C.value)&&!pe.value),Ce=x(()=>(!u.value||C.value)&&pe.value),Ve=x(()=>u.value&&n.value&&n.value.length===0);return(l,t)=>(m(),R(Fe,{"model-value":G(p),"onUpdate:modelValue":t[4]||(t[4]=d=>H(p)?p.value=d:null),"fullscreen-size":"sm","dismiss-away":""},{default:Q(()=>{var d,h;return[s("div",T,[s("div",W,[s("div",X,[g(U,{"prepend-icon":"arrow_back",variant:"tertiary",onClick:t[0]||(t[0]=i=>p.value=!1)})]),g(Me,{"model-value":u.value,"onUpdate:modelValue":t[1]||(t[1]=i=>u.value=i),class:"flex-1",placeholder:l.placeholder},null,8,["model-value","placeholder"])]),_.value?(m(),f("div",Y,[g(Pe,{size:"xl"})])):(m(),f(b,{key:1},[ke.value?(m(),f(b,{key:0},[l.recentSearchKey&&((d=c.value)!=null&&d.length)?(m(),f("div",Z,[s("div",ee,[s("div",le,[te,g(Re),g(U,{label:"Clear history",variant:"plain",size:"md",onClick:t[2]||(t[2]=i=>a())})]),ae]),s("div",null,[(m(!0),f(b,null,F(c.value,(i,M)=>(m(),f("div",{key:M,class:"cursor-pointer flex gap-8 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12",onClick:y=>u.value=i},[g(ge,{size:"lg",name:"history"}),s("div",oe,V(i),1)],8,re))),128))])])):N("",!0)],64)):Ce.value?P(l.$slots,"hint-placeholder",{key:1},()=>[s("div",ne,V(l.hintPlaceholder),1)]):Ve.value?P(l.$slots,"not-found-placeholder",{key:2},()=>[s("div",se,V(l.notFoundPlaceholder||`No result found for \u201C${u.value}\u201D`),1)]):(m(),f("div",ce,[(m(!0),f(b,null,F(B.value,(i,M)=>P(l.$slots,"search-result-item",q({key:M},{result:i}),()=>[s("div",{class:"cursor-pointer flex gap-16 hover:bg-fm-color-neutral-gray-100 items-center px-24 py-12 w-full",onClick:y=>Se(i.label.label)},[g(ge,{size:"lg",name:"arrow_forward"}),s("div",ie,[s("div",null,[(m(!0),f(b,null,F(i.label.segments,(y,J)=>(m(),f("span",{key:J,class:I({"fm-typo-en-body-lg-400":!y.isMatch,"fm-typo-en-body-lg-600":y.isMatch})},V(y.segment),3))),128))]),i.sublabel?(m(),f("div",me,[(m(!0),f(b,null,F(i.sublabel.segments,(y,J)=>(m(),f("span",{key:J,class:I({"fm-typo-en-body-md-400":!y.isMatch,"fm-typo-en-body-md-600":y.isMatch})},V(y.segment),3))),128))])):N("",!0)])],8,ue)])),128)),s("div",de,[K.value&&(((h=n.value)==null?void 0:h.length)??0)>5?(m(),R(U,{key:0,label:`show ${n.value.length-5} more results`,variant:"plain",onClick:t[3]||(t[3]=i=>K.value=!1)},null,8,["label"])):N("",!0)])]))],64))])]}),_:3},8,["model-value"]))}})});export{_e as _,Je as __tla};
|