@talxis/base-controls 1.2406.3 → 1.2406.5
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/Numeral-a0284afb.js +1 -0
- package/dist/components/Decimal/Decimal.js +1 -1
- package/dist/components/Duration/Duration.js +1 -1
- package/dist/components/Grid/Grid.js +2 -2
- package/dist/components/Grid/core/components/AgGrid/controllers/useAgGridController.d.ts +9 -1
- package/dist/components/Grid/core/components/AgGrid/model/AgGrid.d.ts +3 -0
- package/dist/components/Grid/core/model/Grid.d.ts +0 -1
- package/dist/components/Grid/interfaces.d.ts +0 -1
- package/dist/components/Grid/paging/controllers/usePagingController.d.ts +1 -0
- package/dist/components/Grid/paging/model/Paging.d.ts +1 -0
- package/dist/utils/{NumeralPCF.d.ts → Numeral.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/NumeralPCF-a609b7be.js +0 -1
- package/examples/Currency/Currency/ControlManifest.Input.xml +0 -53
- package/examples/Currency/Currency/index.ts +0 -66
- package/examples/Currency/Currency.pcfproj +0 -46
- package/examples/Currency/package.json +0 -29
- package/examples/Currency/pcfconfig.json +0 -3
- package/examples/DateTime/DateTime/ControlManifest.Input.xml +0 -58
- package/examples/DateTime/DateTime/index.ts +0 -69
- package/examples/DateTime/DateTime.pcfproj +0 -46
- package/examples/DateTime/package.json +0 -29
- package/examples/DateTime/pcfconfig.json +0 -3
- package/examples/Decimal/Decimal/ControlManifest.Input.xml +0 -66
- package/examples/Decimal/Decimal/index.ts +0 -66
- package/examples/Decimal/Decimal.pcfproj +0 -46
- package/examples/Decimal/package.json +0 -28
- package/examples/Decimal/pcfconfig.json +0 -3
- package/examples/Duration/Duration/ControlManifest.Input.xml +0 -53
- package/examples/Duration/Duration/index.ts +0 -66
- package/examples/Duration/Duration.pcfproj +0 -46
- package/examples/Duration/package.json +0 -29
- package/examples/Duration/pcfconfig.json +0 -3
- package/examples/Grid/Grid/ControlManifest.Input.xml +0 -28
- package/examples/Grid/Grid/index.ts +0 -100
- package/examples/Grid/Grid.pcfproj +0 -46
- package/examples/Grid/package.json +0 -30
- package/examples/Grid/pcfconfig.json +0 -3
- package/examples/Lookup/Lookup/ControlManifest.Input.xml +0 -51
- package/examples/Lookup/Lookup/index.ts +0 -90
- package/examples/Lookup/Lookup.pcfproj +0 -46
- package/examples/Lookup/package.json +0 -29
- package/examples/Lookup/pcfconfig.json +0 -3
- package/examples/MultiSelectOptionSet/MultiSelectOptionSet/ControlManifest.Input.xml +0 -53
- package/examples/MultiSelectOptionSet/MultiSelectOptionSet/index.ts +0 -86
- package/examples/MultiSelectOptionSet/MultiSelectOptionSet.pcfproj +0 -46
- package/examples/MultiSelectOptionSet/package.json +0 -31
- package/examples/MultiSelectOptionSet/pcfconfig.json +0 -3
- package/examples/OptionSet/OptionSet/ControlManifest.Input.xml +0 -53
- package/examples/OptionSet/OptionSet/index.ts +0 -70
- package/examples/OptionSet/OptionSet.pcfproj +0 -46
- package/examples/OptionSet/package.json +0 -29
- package/examples/OptionSet/pcfconfig.json +0 -3
- package/examples/TwoOptions/TwoOptions/ControlManifest.Input.xml +0 -53
- package/examples/TwoOptions/TwoOptions/index.ts +0 -69
- package/examples/TwoOptions/TwoOptions.pcfproj +0 -46
- package/examples/TwoOptions/package.json +0 -29
- package/examples/TwoOptions/pcfconfig.json +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import c from"numeral";class e{static decimal(e){const l={ordinal:c=>".",currency:{symbol:e.currencySymbol},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},delimiters:{decimal:e.numberDecimalSeparator,thousands:e.numberGroupSeparator}};this._locales.includes("__pcfcustomdecimal")?c.locales.__pcfcustomdecimal=l:c.register("locale","__pcfcustomdecimal",l),c.locale("__pcfcustomdecimal")}static currency(e){const l={ordinal:c=>".",currency:{symbol:e.currencySymbol},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},delimiters:{decimal:e.currencyDecimalSeparator,thousands:e.currencyGroupSeparator}};this._locales.includes("__pcfcustomcurrency")?c.locales.__pcfcustomcurrency=l:c.register("locale","__pcfcustomcurrency",l),c.locale("__pcfcustomcurrency")}static get _locales(){return Object.keys(c.locales)}}export{e as N};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{TextField as r}from"@talxis/react-components/dist/components/TextField";import{useInputBasedComponent as o}from"../../hooks/useInputBasedComponent.js";import t from"numeral";import{N as a}from"../../
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{TextField as r}from"@talxis/react-components/dist/components/TextField";import{useInputBasedComponent as o}from"../../hooks/useInputBasedComponent.js";import t from"numeral";import{N as a}from"../../Numeral-a0284afb.js";import"react";import"../../hooks/useComponent.js";import"fast-deep-equal/es6";import"merge-anything";import"liquidjs";const n=n=>{var i,l,s,u;const m=n.context,p=n.parameters,c=p.value,d=m.userSettings.numberFormattingInfo,v=e=>{var r;const o=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");let i;return a.decimal(d),"Decimal"===n.parameters.value.type?i=new RegExp("^[\\d"+o(d.numberDecimalSeparator)+o(d.numberGroupSeparator)+"\\s"+o(d.negativeSign)+"]+$"):"Currency"===n.parameters.value.type?(a.currency(d),i=new RegExp("^\\s*(?:"+o(d.currencySymbol)+"\\s*)?[\\d"+o(d.currencyDecimalSeparator)+o(d.currencyGroupSeparator)+"\\s"+o(d.negativeSign)+"]*(?:\\s*"+o(d.currencySymbol)+")?\\s*$")):i=new RegExp("^[\\d"+o(d.numberGroupSeparator)+"\\s"+o(d.negativeSign)+"]+$"),i.test(e)?null!==(r=t(e).value())&&void 0!==r?r:void 0:e},[y,g,f,b]=o("Decimal",n,{formatter:e=>{var r;if(null!=e)return isNaN(e)?e:"Decimal"===n.parameters.value.type?m.formatting.formatDecimal(parseFloat(e),null===(r=c.attributes)||void 0===r?void 0:r.Precision):"Currency"===n.parameters.value.type?n.parameters.value.formatted:m.formatting.formatInteger(parseInt(e))},valueExtractor:v});return e(r,{readOnly:m.mode.isControlDisabled,autoFocus:null===(i=p.AutoFocus)||void 0===i?void 0:i.raw,borderless:!1===(null===(l=p.EnableBorder)||void 0===l?void 0:l.raw),errorMessage:c.errorMessage,styles:{fieldGroup:{height:m.mode.allocatedHeight||void 0,width:m.mode.allocatedWidth||void 0}},deleteButtonProps:!0===(null===(s=p.EnableDeleteButton)||void 0===s?void 0:s.raw)?{key:"delete",showOnlyOnHover:!0,iconProps:{iconName:"Delete"},onClick:()=>f(void 0)}:void 0,clickToCopyProps:!0===(null===(u=p.EnableCopyButton)||void 0===u?void 0:u.raw)?{key:"copy",showOnlyOnHover:!0,iconProps:{iconName:"Copy"}}:void 0,value:null!=y?y:"",onBlur:e=>{b({value:v(e.target.value)})},onChange:(e,r)=>{f(r)}})};export{n as Decimal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{ComboBox as o}from"@talxis/react-components/dist/components/ComboBox";import{useInputBasedComponent as n}from"../../hooks/useInputBasedComponent.js";import a from"numeral";import{N as i}from"../../
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{ComboBox as o}from"@talxis/react-components/dist/components/ComboBox";import{useInputBasedComponent as n}from"../../hooks/useInputBasedComponent.js";import a from"numeral";import{N as i}from"../../Numeral-a0284afb.js";import"react";import"../../hooks/useComponent.js";import"fast-deep-equal/es6";import"merge-anything";import"liquidjs";const t=[{Label:"1",Value:1,Color:""},{Label:"15",Value:2,Color:""},{Label:"30",Value:3,Color:""},{Label:"45",Value:4,Color:""},{Label:"60",Value:5,Color:""},{Label:"90",Value:6,Color:""},{Label:"120",Value:7,Color:""},{Label:"150",Value:8,Color:""},{Label:"180",Value:9,Color:""},{Label:"210",Value:10,Color:""},{Label:"240",Value:11,Color:""},{Label:"270",Value:12,Color:""},{Label:"300",Value:13,Color:""},{Label:"330",Value:14,Color:""},{Label:"360",Value:15,Color:""},{Label:"390",Value:16,Color:""},{Label:"420",Value:17,Color:""},{Label:"450",Value:18,Color:""},{Label:"480",Value:19,Color:""},{Label:"1440",Value:20,Color:""},{Label:"2880",Value:21,Color:""},{Label:"4320",Value:22,Color:""}],l=l=>{var r,u;const m=l.parameters,s=m.value,d=l.context,h=require("humanize-duration"),p=d.userSettings.locale,c=d.userSettings.numberFormattingInfo,b=e=>{if(null===e)return null;const o=6e4*e,n={units:e<60?["m"]:e>=1440?["d"]:["h"],maxDecimalPoints:2,language:p.slice(0,p.indexOf("-")),decimal:d.userSettings.numberFormattingInfo.numberDecimalSeparator,fallbacks:["en"]};return h(o,n)},C=e=>{const o=JSON.parse(v.minute()),n=JSON.parse(v.minutes()),a=JSON.parse(v.hour()),i=JSON.parse(v.hours()),t=JSON.parse(v.day()),l=JSON.parse(v.days()),r=new RegExp("^("+o.join("|")+")\\s|\\s("+o.join("|")+")$|^("+n.join("|")+")\\s|\\s("+n.join("|")+")$","i"),u=new RegExp("^("+a.join("|")+")\\s|\\s("+a.join("|")+")$|^("+i.join("|")+")\\s|\\s("+i.join("|")+")$","i"),m=new RegExp("^("+t.join("|")+")\\s|\\s("+t.join("|")+")$|^("+l.join("|")+")\\s|\\s("+l.join("|")+")$","i");if(e&&e.trim()){let o=e.trim().toLowerCase(),n="minute";r.test(o)?o=o.replace(r,"").trim():u.test(o)?(o=o.replace(u,"").trim(),n="hour"):m.test(o)&&(o=o.replace(m,"").trim(),n="day");const a=y(o);return a&&!isNaN(a)?L(a,n):NaN}},y=e=>{var o;return i.decimal(c),null!==(o=a(e).value())&&void 0!==o?o:void 0},L=(e,o)=>{switch(o){case"hour":return 60*e;case"day":return 60*e*24;default:return e}},V=t.map((e=>({key:e.Value.toString(),text:b(parseInt(e.Label))}))),[g,v,f,j]=n("Duration",l,{formatter:b,valueExtractor:C,defaultTranslations:{minute:{1029:["min","minuta","minuty","minute","minutu","minutě","minutou","minuta","minuty","minute","minutu","minute","minutou"],1033:["min","minute"]},minutes:{1029:["minuty","minut","minutám","minutách","minutami","minuty","minut","minutam","minutach","minutami"],1033:["minutes"]},hour:{1029:["hod","hodina","hodiny","hodině","hodinu","hodinou","hodina","hodiny","hodine","hodinu","hodinou"],1033:["hour"]},hours:{1029:["hodiny","hodin","hodinám","hodinách","hodinami","hodiny","hodin","hodinam","hodinach","hodinami"],1033:["hours"]},day:{1029:["den","dne","dni","dnu","dnem","den","dne","dni","dnu","dnem"],1033:["day"]},days:{1029:["dny","dnů","dnům","dnech","dny","dní","dny","dnu","dnom","dnech","dny","dni"],1033:["days"]}}});return e(o,{borderless:!1===(null===(r=m.EnableBorder)||void 0===r?void 0:r.raw),options:V,allowFreeInput:!0,autoComplete:"on",autofill:!0===(null===(u=m.AutoFocus)||void 0===u?void 0:u.raw)?{autoFocus:!0}:void 0,readOnly:d.mode.isControlDisabled,useComboBoxAsMenuWidth:!0,errorMessage:s.errorMessage,text:null!=g?g:"",styles:{root:{height:d.mode.allocatedHeight||void 0,width:d.mode.allocatedWidth||void 0,display:"flex",alignItems:"center"},callout:{height:300}},onInputValueChange:e=>{f(null!=e?e:"")},onBlur:e=>{j({value:C(g)})},onChange:(e,o)=>{var n;j({value:C(null!==(n=null==o?void 0:o.text)&&void 0!==n?n:"")})}})};export{l as Duration};
|