@limetech/lime-crm-building-blocks 1.36.2 → 1.36.3
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/CHANGELOG.md +8 -0
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -5
- package/dist/collection/components/locale-picker/locale-picker.js +1 -5
- package/dist/components/limebb-locale-picker.js +1 -5
- package/dist/esm/limebb-locale-picker.entry.js +1 -5
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/{p-9b4ada81.entry.js → p-1073b2c2.entry.js} +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
### [1.36.3](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.36.2...v1.36.3) (2024-08-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
* **locale-picker:** omit setting default value when rendering ([05083e9](https://github.com/Lundalogik/lime-crm-building-blocks/commit/05083e9459e5fbdb7b68fb81f51ecfa3f01eb5c6))
|
|
8
|
+
|
|
1
9
|
### [1.36.2](https://github.com/Lundalogik/lime-crm-building-blocks/compare/v1.36.1...v1.36.2) (2024-07-08)
|
|
2
10
|
|
|
3
11
|
|
|
@@ -3419,14 +3419,10 @@ const LocalePicker = class {
|
|
|
3419
3419
|
if (Array.isArray(this.value)) {
|
|
3420
3420
|
const value = this.value;
|
|
3421
3421
|
selectedOptions = options.filter((option) => value.some((val) => option.value === val));
|
|
3422
|
-
if (selectedOptions.length === 0) {
|
|
3423
|
-
selectedOptions = [options[0]];
|
|
3424
|
-
}
|
|
3425
3422
|
}
|
|
3426
3423
|
else {
|
|
3427
3424
|
const value = this.value;
|
|
3428
|
-
selectedOptions =
|
|
3429
|
-
options.find((option) => option.value === value) || options[0];
|
|
3425
|
+
selectedOptions = options.find((option) => option.value === value);
|
|
3430
3426
|
}
|
|
3431
3427
|
return (index.h("limel-select", { value: selectedOptions, options: sortBy(options, 'text'), helperText: this.helperText, label: this.label, required: this.required, disabled: this.disabled, readonly: this.readonly, onChange: this.handleChange, multiple: this.multipleChoice }));
|
|
3432
3428
|
}
|
|
@@ -49,14 +49,10 @@ export class LocalePicker {
|
|
|
49
49
|
if (Array.isArray(this.value)) {
|
|
50
50
|
const value = this.value;
|
|
51
51
|
selectedOptions = options.filter((option) => value.some((val) => option.value === val));
|
|
52
|
-
if (selectedOptions.length === 0) {
|
|
53
|
-
selectedOptions = [options[0]];
|
|
54
|
-
}
|
|
55
52
|
}
|
|
56
53
|
else {
|
|
57
54
|
const value = this.value;
|
|
58
|
-
selectedOptions =
|
|
59
|
-
options.find((option) => option.value === value) || options[0];
|
|
55
|
+
selectedOptions = options.find((option) => option.value === value);
|
|
60
56
|
}
|
|
61
57
|
return (h("limel-select", { value: selectedOptions, options: sortBy(options, 'text'), helperText: this.helperText, label: this.label, required: this.required, disabled: this.disabled, readonly: this.readonly, onChange: this.handleChange, multiple: this.multipleChoice }));
|
|
62
58
|
}
|
|
@@ -3417,14 +3417,10 @@ const LocalePicker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
3417
3417
|
if (Array.isArray(this.value)) {
|
|
3418
3418
|
const value = this.value;
|
|
3419
3419
|
selectedOptions = options.filter((option) => value.some((val) => option.value === val));
|
|
3420
|
-
if (selectedOptions.length === 0) {
|
|
3421
|
-
selectedOptions = [options[0]];
|
|
3422
|
-
}
|
|
3423
3420
|
}
|
|
3424
3421
|
else {
|
|
3425
3422
|
const value = this.value;
|
|
3426
|
-
selectedOptions =
|
|
3427
|
-
options.find((option) => option.value === value) || options[0];
|
|
3423
|
+
selectedOptions = options.find((option) => option.value === value);
|
|
3428
3424
|
}
|
|
3429
3425
|
return (h("limel-select", { value: selectedOptions, options: sortBy(options, 'text'), helperText: this.helperText, label: this.label, required: this.required, disabled: this.disabled, readonly: this.readonly, onChange: this.handleChange, multiple: this.multipleChoice }));
|
|
3430
3426
|
}
|
|
@@ -3415,14 +3415,10 @@ const LocalePicker = class {
|
|
|
3415
3415
|
if (Array.isArray(this.value)) {
|
|
3416
3416
|
const value = this.value;
|
|
3417
3417
|
selectedOptions = options.filter((option) => value.some((val) => option.value === val));
|
|
3418
|
-
if (selectedOptions.length === 0) {
|
|
3419
|
-
selectedOptions = [options[0]];
|
|
3420
|
-
}
|
|
3421
3418
|
}
|
|
3422
3419
|
else {
|
|
3423
3420
|
const value = this.value;
|
|
3424
|
-
selectedOptions =
|
|
3425
|
-
options.find((option) => option.value === value) || options[0];
|
|
3421
|
+
selectedOptions = options.find((option) => option.value === value);
|
|
3426
3422
|
}
|
|
3427
3423
|
return (h("limel-select", { value: selectedOptions, options: sortBy(options, 'text'), helperText: this.helperText, label: this.label, required: this.required, disabled: this.disabled, readonly: this.readonly, onChange: this.handleChange, multiple: this.multipleChoice }));
|
|
3428
3424
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-09a9a5fa.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((e=>t([["p-df53b19d",[[1,"limebb-date-range",{platform:[16],context:[16],startTime:[16],endTime:[16],startTimeLabel:[1,"start-time-label"],endTimeLabel:[1,"end-time-label"],language:[1],timeFormat:[1,"time-format"],type:[1]}]]],["p-ac7c2a10",[[1,"limebb-feed",{platform:[16],context:[16],items:[16],emptyStateMessage:[1,"empty-state-message"],loading:[4],minutesOfProximity:[2,"minutes-of-proximity"],totalCount:[2,"total-count"],lastVisitedTimestamp:[1,"last-visited-timestamp"]}]]],["p-31828dc2",[[17,"limebb-browser",{platform:[16],context:[16],items:[16],layout:[1],filter:[32]}]]],["p-16969305",[[1,"limebb-currency-picker",{label:[513],platform:[16],currencies:[16],helperText:[513,"helper-text"],required:[516],readonly:[516],invalid:[516],disabled:[516],value:[16]}]]],["p-af734874",[[1,"limebb-dashboard-widget",{heading:[513],subheading:[513],supportingText:[513,"supporting-text"],icon:[513]}]]],["p-68e4fc72",[[1,"limebb-icon-picker",{value:[1],required:[4],readonly:[4],invalid:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-1bd3523d",[[1,"limebb-limeobject-file-viewer",{platform:[16],context:[16],property:[1],fileTypes:[16],limeobject:[32],limetype:[32]}]]],["p-
|
|
1
|
+
import{p as e,b as t}from"./p-09a9a5fa.js";(()=>{const t=import.meta.url,l={};return""!==t&&(l.resourcesUrl=new URL(".",t).href),e(l)})().then((e=>t([["p-df53b19d",[[1,"limebb-date-range",{platform:[16],context:[16],startTime:[16],endTime:[16],startTimeLabel:[1,"start-time-label"],endTimeLabel:[1,"end-time-label"],language:[1],timeFormat:[1,"time-format"],type:[1]}]]],["p-ac7c2a10",[[1,"limebb-feed",{platform:[16],context:[16],items:[16],emptyStateMessage:[1,"empty-state-message"],loading:[4],minutesOfProximity:[2,"minutes-of-proximity"],totalCount:[2,"total-count"],lastVisitedTimestamp:[1,"last-visited-timestamp"]}]]],["p-31828dc2",[[17,"limebb-browser",{platform:[16],context:[16],items:[16],layout:[1],filter:[32]}]]],["p-16969305",[[1,"limebb-currency-picker",{label:[513],platform:[16],currencies:[16],helperText:[513,"helper-text"],required:[516],readonly:[516],invalid:[516],disabled:[516],value:[16]}]]],["p-af734874",[[1,"limebb-dashboard-widget",{heading:[513],subheading:[513],supportingText:[513,"supporting-text"],icon:[513]}]]],["p-68e4fc72",[[1,"limebb-icon-picker",{value:[1],required:[4],readonly:[4],invalid:[4],disabled:[4],label:[1],helperText:[1,"helper-text"]}]]],["p-1bd3523d",[[1,"limebb-limeobject-file-viewer",{platform:[16],context:[16],property:[1],fileTypes:[16],limeobject:[32],limetype:[32]}]]],["p-1073b2c2",[[1,"limebb-locale-picker",{platform:[16],context:[16],value:[1],required:[4],disabled:[4],label:[1],helperText:[1,"helper-text"],readonly:[4],multipleChoice:[4,"multiple-choice"],allLanguages:[32]}]]],["p-71a0802f",[[17,"limebb-navigation-button",{href:[513],tooltipLabel:[513,"tooltip-label"],tooltipHelperLabel:[513,"tooltip-helper-label"],type:[513]}]]],["p-1895e593",[[1,"limebb-date-picker",{platform:[16],context:[16],disabled:[516],readonly:[516],invalid:[516],label:[513],placeholder:[513],helperText:[513,"helper-text"],required:[516],value:[1],type:[513]}]]],["p-ef70e987",[[1,"limebb-feed-timeline-item",{platform:[16],context:[16],item:[16],ui:[513],isBundled:[516,"is-bundled"],headingCanExpand:[32],isHeadingExpanded:[32],showMore:[32],isTall:[32]}]]]],e)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,c as n,h as t}from"./p-09a9a5fa.js";import{P as e}from"./p-11eb7b1e.js";var u="object"==typeof global&&global&&global.Object===Object&&global,i="object"==typeof self&&self&&self.Object===Object&&self,o=u||i||Function("return this")(),f=o.Symbol,c=Object.prototype,a=c.hasOwnProperty,s=c.toString,v=f?f.toStringTag:void 0,l=Object.prototype.toString,b=f?f.toStringTag:void 0;function h(r){return null==r?void 0===r?"[object Undefined]":"[object Null]":b&&b in Object(r)?function(r){var n=a.call(r,v),t=r[v];try{r[v]=void 0;var e=!0}catch(r){}var u=s.call(r);return e&&(n?r[v]=t:delete r[v]),u}(r):function(r){return l.call(r)}(r)}function d(r){return null!=r&&"object"==typeof r}function j(r){return"symbol"==typeof r||d(r)&&"[object Symbol]"==h(r)}function p(r,n){for(var t=-1,e=null==r?0:r.length,u=Array(e);++t<e;)u[t]=n(r[t],t,r);return u}var y=Array.isArray,m=f?f.prototype:void 0,w=m?m.toString:void 0;function g(r){if("string"==typeof r)return r;if(y(r))return p(r,g)+"";if(j(r))return w?w.call(r):"";var n=r+"";return"0"==n&&1/r==-1/0?"-0":n}function _(r){var n=typeof r;return null!=r&&("object"==n||"function"==n)}function O(r){return r}function x(r){if(!_(r))return!1;var n=h(r);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}var A,S=o["__core-js_shared__"],k=(A=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",$=Function.prototype.toString;function M(r){if(null!=r){try{return $.call(r)}catch(r){}try{return r+""}catch(r){}}return""}var E=/^\[object .+?Constructor\]$/,P=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function D(r,n){var t=function(r,n){return null==r?void 0:r[n]}(r,n);return function(r){return!(!_(r)||(n=r,k&&k in n))&&(x(r)?P:E).test(M(r));var n}(t)?t:void 0}var F=D(o,"WeakMap");function R(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}var U,V,W,B=Date.now,C=function(){try{var r=D(Object,"defineProperty");return r({},"",{}),r}catch(r){}}(),L=(U=C?function(r,n){return C(r,"toString",{configurable:!0,enumerable:!1,value:(t=n,function(){return t}),writable:!0});var t}:O,V=0,W=0,function(){var r=B(),n=16-(r-W);if(W=r,n>0){if(++V>=800)return arguments[0]}else V=0;return U.apply(void 0,arguments)}),N=/^(?:0|[1-9]\d*)$/;function T(r,n){var t=typeof r;return!!(n=null==n?9007199254740991:n)&&("number"==t||"symbol"!=t&&N.test(r))&&r>-1&&r%1==0&&r<n}function q(r,n){return r===n||r!=r&&n!=n}var G=Math.max;function I(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=9007199254740991}function z(r){return null!=r&&I(r.length)&&!x(r)}function H(r,n,t){if(!_(t))return!1;var e=typeof n;return!!("number"==e?z(t)&&T(n,t.length):"string"==e&&n in t)&&q(t[n],r)}var J=Object.prototype;function K(r){return d(r)&&"[object Arguments]"==h(r)}var Q=Object.prototype,X=Q.hasOwnProperty,Y=Q.propertyIsEnumerable,Z=K(function(){return arguments}())?K:function(r){return d(r)&&X.call(r,"callee")&&!Y.call(r,"callee")},rr="object"==typeof exports&&exports&&!exports.nodeType&&exports,nr=rr&&"object"==typeof module&&module&&!module.nodeType&&module,tr=nr&&nr.exports===rr?o.Buffer:void 0,er=(tr?tr.isBuffer:void 0)||function(){return!1},ur={};function ir(r){return function(n){return r(n)}}ur["[object Float32Array]"]=ur["[object Float64Array]"]=ur["[object Int8Array]"]=ur["[object Int16Array]"]=ur["[object Int32Array]"]=ur["[object Uint8Array]"]=ur["[object Uint8ClampedArray]"]=ur["[object Uint16Array]"]=ur["[object Uint32Array]"]=!0,ur["[object Arguments]"]=ur["[object Array]"]=ur["[object ArrayBuffer]"]=ur["[object Boolean]"]=ur["[object DataView]"]=ur["[object Date]"]=ur["[object Error]"]=ur["[object Function]"]=ur["[object Map]"]=ur["[object Number]"]=ur["[object Object]"]=ur["[object RegExp]"]=ur["[object Set]"]=ur["[object String]"]=ur["[object WeakMap]"]=!1;var or="object"==typeof exports&&exports&&!exports.nodeType&&exports,fr=or&&"object"==typeof module&&module&&!module.nodeType&&module,cr=fr&&fr.exports===or&&u.process,ar=function(){try{return fr&&fr.require&&fr.require("util").types||cr&&cr.binding&&cr.binding("util")}catch(r){}}(),sr=ar&&ar.isTypedArray,vr=sr?ir(sr):function(r){return d(r)&&I(r.length)&&!!ur[h(r)]},lr=Object.prototype.hasOwnProperty;var br=function(r,n){return function(t){return r(n(t))}}(Object.keys,Object),hr=Object.prototype.hasOwnProperty;function dr(r){return z(r)?function(r,n){var t=y(r),e=!t&&Z(r),u=!t&&!e&&er(r),i=!t&&!e&&!u&&vr(r),o=t||e||u||i,f=o?function(r,n){for(var t=-1,e=Array(r);++t<r;)e[t]=n(t);return e}(r.length,String):[],c=f.length;for(var a in r)!n&&!lr.call(r,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||T(a,c))||f.push(a);return f}(r):function(r){if((n=r)!==("function"==typeof(t=n&&n.constructor)&&t.prototype||J))return br(r);var n,t,e=[];for(var u in Object(r))hr.call(r,u)&&"constructor"!=u&&e.push(u);return e}(r)}var jr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pr=/^\w*$/;function yr(r,n){if(y(r))return!1;var t=typeof r;return!("number"!=t&&"symbol"!=t&&"boolean"!=t&&null!=r&&!j(r))||pr.test(r)||!jr.test(r)||null!=n&&r in Object(n)}var mr=D(Object,"create"),wr=Object.prototype.hasOwnProperty,gr=Object.prototype.hasOwnProperty;function _r(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}function Or(r,n){for(var t=r.length;t--;)if(q(r[t][0],n))return t;return-1}_r.prototype.clear=function(){this.__data__=mr?mr(null):{},this.size=0},_r.prototype.delete=function(r){var n=this.has(r)&&delete this.__data__[r];return this.size-=n?1:0,n},_r.prototype.get=function(r){var n=this.__data__;if(mr){var t=n[r];return"__lodash_hash_undefined__"===t?void 0:t}return wr.call(n,r)?n[r]:void 0},_r.prototype.has=function(r){var n=this.__data__;return mr?void 0!==n[r]:gr.call(n,r)},_r.prototype.set=function(r,n){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=mr&&void 0===n?"__lodash_hash_undefined__":n,this};var xr=Array.prototype.splice;function Ar(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}Ar.prototype.clear=function(){this.__data__=[],this.size=0},Ar.prototype.delete=function(r){var n=this.__data__,t=Or(n,r);return!(t<0||(t==n.length-1?n.pop():xr.call(n,t,1),--this.size,0))},Ar.prototype.get=function(r){var n=this.__data__,t=Or(n,r);return t<0?void 0:n[t][1]},Ar.prototype.has=function(r){return Or(this.__data__,r)>-1},Ar.prototype.set=function(r,n){var t=this.__data__,e=Or(t,r);return e<0?(++this.size,t.push([r,n])):t[e][1]=n,this};var Sr=D(o,"Map");function kr(r,n){var t,e,u=r.__data__;return("string"==(e=typeof(t=n))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t)?u["string"==typeof n?"string":"hash"]:u.map}function $r(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}function Mr(r,n){if("function"!=typeof r||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var t=function(){var e=arguments,u=n?n.apply(this,e):e[0],i=t.cache;if(i.has(u))return i.get(u);var o=r.apply(this,e);return t.cache=i.set(u,o)||i,o};return t.cache=new(Mr.Cache||$r),t}$r.prototype.clear=function(){this.size=0,this.__data__={hash:new _r,map:new(Sr||Ar),string:new _r}},$r.prototype.delete=function(r){var n=kr(this,r).delete(r);return this.size-=n?1:0,n},$r.prototype.get=function(r){return kr(this,r).get(r)},$r.prototype.has=function(r){return kr(this,r).has(r)},$r.prototype.set=function(r,n){var t=kr(this,r),e=t.size;return t.set(r,n),this.size+=t.size==e?0:1,this},Mr.Cache=$r;var Er,Pr,Dr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fr=/\\(\\)?/g,Rr=(Er=Mr((function(r){var n=[];return 46===r.charCodeAt(0)&&n.push(""),r.replace(Dr,(function(r,t,e,u){n.push(e?u.replace(Fr,"$1"):t||r)})),n}),(function(r){return 500===Pr.size&&Pr.clear(),r})),Pr=Er.cache,Er);function Ur(r){return null==r?"":g(r)}function Vr(r,n){return y(r)?r:yr(r,n)?[r]:Rr(Ur(r))}function Wr(r){if("string"==typeof r||j(r))return r;var n=r+"";return"0"==n&&1/r==-1/0?"-0":n}function Br(r,n){for(var t=0,e=(n=Vr(n,r)).length;null!=r&&t<e;)r=r[Wr(n[t++])];return t&&t==e?r:void 0}function Cr(r,n){for(var t=-1,e=n.length,u=r.length;++t<e;)r[u+t]=n[t];return r}var Lr=f?f.isConcatSpreadable:void 0;function Nr(r){return y(r)||Z(r)||!!(Lr&&r&&r[Lr])}function Tr(r,n,t,e,u){var i=-1,o=r.length;for(t||(t=Nr),u||(u=[]);++i<o;){var f=r[i];n>0&&t(f)?n>1?Tr(f,n-1,t,e,u):Cr(u,f):e||(u[u.length]=f)}return u}var qr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Gr(r){return qr.test(r)}var Ir="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",zr="\\ud83c[\\udffb-\\udfff]",Hr="[^\\ud800-\\udfff]",Jr="(?:\\ud83c[\\udde6-\\uddff]){2}",Kr="[\\ud800-\\udbff][\\udc00-\\udfff]",Qr="(?:"+Ir+"|"+zr+")?",Xr="[\\ufe0e\\ufe0f]?"+Qr+"(?:\\u200d(?:"+[Hr,Jr,Kr].join("|")+")[\\ufe0e\\ufe0f]?"+Qr+")*",Yr="(?:"+[Hr+Ir+"?",Ir,Jr,Kr,"[\\ud800-\\udfff]"].join("|")+")",Zr=RegExp(zr+"(?="+zr+")|"+Yr+Xr,"g");var rn=("toUpperCase",function(r){var n,t,e,u,i=Gr(r=Ur(r))?function(r){return Gr(r)?function(r){return r.match(Zr)||[]}(r):function(r){return r.split("")}(r)}(r):void 0,o=i?i[0]:r.charAt(0),f=i?(n=i,t=1,u=n.length,e=void 0===e?u:e,!t&&e>=u?n:function(r,n,t){var e=-1,u=r.length;n<0&&(n=-n>u?0:u+n),(t=t>u?u:t)<0&&(t+=u),u=n>t?0:t-n>>>0,n>>>=0;for(var i=Array(u);++e<u;)i[e]=r[e+n];return i}(n,t,e)).join(""):r.slice(1);return o.toUpperCase()+f});function nn(r){var n=this.__data__=new Ar(r);this.size=n.size}nn.prototype.clear=function(){this.__data__=new Ar,this.size=0},nn.prototype.delete=function(r){var n=this.__data__,t=n.delete(r);return this.size=n.size,t},nn.prototype.get=function(r){return this.__data__.get(r)},nn.prototype.has=function(r){return this.__data__.has(r)},nn.prototype.set=function(r,n){var t=this.__data__;if(t instanceof Ar){var e=t.__data__;if(!Sr||e.length<199)return e.push([r,n]),this.size=++t.size,this;t=this.__data__=new $r(e)}return t.set(r,n),this.size=t.size,this};var tn=Object.prototype.propertyIsEnumerable,en=Object.getOwnPropertySymbols,un=en?function(r){return null==r?[]:(r=Object(r),function(n){for(var t=-1,e=null==n?0:n.length,u=0,i=[];++t<e;){var o=n[t];tn.call(r,o)&&(i[u++]=o)}return i}(en(r)))}:function(){return[]};function on(r){return function(r,n,t){var e=dr(r);return y(r)?e:Cr(e,t(r))}(r,0,un)}var fn=D(o,"DataView"),cn=D(o,"Promise"),an=D(o,"Set"),sn=M(fn),vn=M(Sr),ln=M(cn),bn=M(an),hn=M(F),dn=h;(fn&&"[object DataView]"!=dn(new fn(new ArrayBuffer(1)))||Sr&&"[object Map]"!=dn(new Sr)||cn&&"[object Promise]"!=dn(cn.resolve())||an&&"[object Set]"!=dn(new an)||F&&"[object WeakMap]"!=dn(new F))&&(dn=function(r){var n=h(r),t="[object Object]"==n?r.constructor:void 0,e=t?M(t):"";if(e)switch(e){case sn:return"[object DataView]";case vn:return"[object Map]";case ln:return"[object Promise]";case bn:return"[object Set]";case hn:return"[object WeakMap]"}return n});const jn=dn;var pn=o.Uint8Array;function yn(r){var n=-1,t=null==r?0:r.length;for(this.__data__=new $r;++n<t;)this.add(r[n])}function mn(r,n){for(var t=-1,e=null==r?0:r.length;++t<e;)if(n(r[t],t,r))return!0;return!1}function wn(r,n,t,e,u,i){var o=1&t,f=r.length,c=n.length;if(f!=c&&!(o&&c>f))return!1;var a=i.get(r),s=i.get(n);if(a&&s)return a==n&&s==r;var v=-1,l=!0,b=2&t?new yn:void 0;for(i.set(r,n),i.set(n,r);++v<f;){var h=r[v],d=n[v];if(e)var j=o?e(d,h,v,n,r,i):e(h,d,v,r,n,i);if(void 0!==j){if(j)continue;l=!1;break}if(b){if(!mn(n,(function(r,n){if(!b.has(n)&&(h===r||u(h,r,t,e,i)))return b.push(n)}))){l=!1;break}}else if(h!==d&&!u(h,d,t,e,i)){l=!1;break}}return i.delete(r),i.delete(n),l}function gn(r){var n=-1,t=Array(r.size);return r.forEach((function(r,e){t[++n]=[e,r]})),t}function _n(r){var n=-1,t=Array(r.size);return r.forEach((function(r){t[++n]=r})),t}yn.prototype.add=yn.prototype.push=function(r){return this.__data__.set(r,"__lodash_hash_undefined__"),this},yn.prototype.has=function(r){return this.__data__.has(r)};var On=f?f.prototype:void 0,xn=On?On.valueOf:void 0,An=Object.prototype.hasOwnProperty,Sn="[object Object]",kn=Object.prototype.hasOwnProperty;function $n(r,n,t,e,u){return r===n||(null==r||null==n||!d(r)&&!d(n)?r!=r&&n!=n:function(r,n,t,e,u,i){var o=y(r),f=y(n),c=o?"[object Array]":jn(r),a=f?"[object Array]":jn(n),s=(c="[object Arguments]"==c?Sn:c)==Sn,v=(a="[object Arguments]"==a?Sn:a)==Sn,l=c==a;if(l&&er(r)){if(!er(n))return!1;o=!0,s=!1}if(l&&!s)return i||(i=new nn),o||vr(r)?wn(r,n,t,e,u,i):function(r,n,t,e,u,i,o){switch(t){case"[object DataView]":if(r.byteLength!=n.byteLength||r.byteOffset!=n.byteOffset)return!1;r=r.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(r.byteLength!=n.byteLength||!i(new pn(r),new pn(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return q(+r,+n);case"[object Error]":return r.name==n.name&&r.message==n.message;case"[object RegExp]":case"[object String]":return r==n+"";case"[object Map]":var f=gn;case"[object Set]":if(f||(f=_n),r.size!=n.size&&!(1&e))return!1;var c=o.get(r);if(c)return c==n;e|=2,o.set(r,n);var a=wn(f(r),f(n),e,u,i,o);return o.delete(r),a;case"[object Symbol]":if(xn)return xn.call(r)==xn.call(n)}return!1}(r,n,c,t,e,u,i);if(!(1&t)){var b=s&&kn.call(r,"__wrapped__"),h=v&&kn.call(n,"__wrapped__");if(b||h){var d=b?r.value():r,j=h?n.value():n;return i||(i=new nn),u(d,j,t,e,i)}}return!!l&&(i||(i=new nn),function(r,n,t,e,u,i){var o=1&t,f=on(r),c=f.length;if(c!=on(n).length&&!o)return!1;for(var a=c;a--;){var s=f[a];if(!(o?s in n:An.call(n,s)))return!1}var v=i.get(r),l=i.get(n);if(v&&l)return v==n&&l==r;var b=!0;i.set(r,n),i.set(n,r);for(var h=o;++a<c;){var d=r[s=f[a]],j=n[s];if(e)var p=o?e(j,d,s,n,r,i):e(d,j,s,r,n,i);if(!(void 0===p?d===j||u(d,j,t,e,i):p)){b=!1;break}h||(h="constructor"==s)}if(b&&!h){var y=r.constructor,m=n.constructor;y==m||!("constructor"in r)||!("constructor"in n)||"function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m||(b=!1)}return i.delete(r),i.delete(n),b}(r,n,t,e,u,i))}(r,n,t,e,$n,u))}function Mn(r){return r==r&&!_(r)}function En(r,n){return function(t){return null!=t&&t[r]===n&&(void 0!==n||r in Object(t))}}function Pn(r,n){return null!=r&&n in Object(r)}function Dn(r,n){return yr(r)&&Mn(n)?En(Wr(r),n):function(t){var e=function(r,n){var t=null==r?void 0:Br(r,n);return void 0===t?void 0:t}(t,r);return void 0===e&&e===n?function(r,n){return null!=r&&function(r,n,t){for(var e=-1,u=(n=Vr(n,r)).length,i=!1;++e<u;){var o=Wr(n[e]);if(!(i=null!=r&&t(r,o)))break;r=r[o]}return i||++e!=u?i:!!(u=null==r?0:r.length)&&I(u)&&T(o,u)&&(y(r)||Z(r))}(r,n,Pn)}(t,r):$n(n,e,3)}}function Fn(r){return"function"==typeof r?r:null==r?O:"object"==typeof r?y(r)?Dn(r[0],r[1]):1==(u=function(r){for(var n=dr(r),t=n.length;t--;){var e=n[t],u=r[e];n[t]=[e,u,Mn(u)]}return n}(e=r)).length&&u[0][2]?En(u[0][0],u[0][1]):function(r){return r===e||function(r,n,t,e){var u=t.length,i=u;if(null==r)return!i;for(r=Object(r);u--;){var o=t[u];if(o[2]?o[1]!==r[o[0]]:!(o[0]in r))return!1}for(;++u<i;){var f=(o=t[u])[0],c=r[f],a=o[1];if(o[2]){if(void 0===c&&!(f in r))return!1}else{var s,v=new nn;if(!(void 0===s?$n(a,c,3,e,v):s))return!1}}return!0}(r,0,u)}:yr(n=r)?(t=Wr(n),function(r){return null==r?void 0:r[t]}):function(r){return function(n){return Br(n,r)}}(n);var n,t,e,u}var Rn=function(r,n,t){for(var e=-1,u=Object(r),i=t(r),o=i.length;o--;){var f=i[++e];if(!1===n(u[f],f,u))break}return r},Un=function(r,n){if(null==r)return r;if(!z(r))return function(r,n){return r&&Rn(r,n,dr)}(r,n);for(var t=r.length,e=-1,u=Object(r);++e<t&&!1!==n(u[e],e,u););return r};function Vn(r,n){if(r!==n){var t=void 0!==r,e=null===r,u=r==r,i=j(r),o=void 0!==n,f=null===n,c=n==n,a=j(n);if(!f&&!a&&!i&&r>n||i&&o&&c&&!f&&!a||e&&o&&c||!t&&c||!u)return 1;if(!e&&!i&&!a&&r<n||a&&t&&u&&!e&&!i||f&&t&&u||!o&&u||!c)return-1}return 0}function Wn(r,n,t){n=n.length?p(n,(function(r){return y(r)?function(n){return Br(n,1===r.length?r[0]:r)}:r})):[O];var e=-1;return n=p(n,ir(Fn)),function(r){var n=r.length;for(r.sort((function(r,n){return function(r,n,t){for(var e=-1,u=r.criteria,i=n.criteria,o=u.length,f=t.length;++e<o;){var c=Vn(u[e],i[e]);if(c)return e>=f?c:c*("desc"==t[e]?-1:1)}return r.index-n.index}(r,n,t)}));n--;)r[n]=r[n].value;return r}(function(r,n){var t=-1,e=z(r)?Array(r.length):[];return Un(r,(function(r){e[++t]=n(r)})),e}(r,(function(r){return{criteria:p(n,(function(n){return n(r)})),index:++e,value:r}})))}var Bn=function(r){return L(function(r,n,t){return n=G(void 0===n?r.length-1:n,0),function(){for(var e=arguments,u=-1,i=G(e.length-n,0),o=Array(i);++u<i;)o[u]=e[n+u];u=-1;for(var f=Array(n+1);++u<n;)f[u]=e[u];return f[n]=t(o),R(r,this,f)}}(r,void 0,O),r+"")}((function(r,n){if(null==r)return[];var t=n.length;return t>1&&H(r,n[0],n[1])?n=[]:t>2&&H(n[0],n[1],n[2])&&(n=[n[0]]),Wn(r,Tr(n,1),[])}));function Cn(r,n){if(!r.length||!n.length)return"";r="en_us"===r?"en-US":r,n="en_us"===n?"en-US":n;const t=(new Intl.DisplayNames(n,{type:"language"}).of(r)||"").split(" ");return t[0]=rn(Ur(t[0]).toLowerCase()),t.join(" ")}const Ln=class{constructor(t){r(this,t),this.change=n(this,"change",7),this.context={limetype:null,id:null},this.handleChange=r=>{r.stopPropagation(),this.change.emit(this.multipleChoice?r.detail.map((r=>r.value)):r.detail.value)}}async componentWillLoad(){try{this.http=this.platform.get(e.Http),this.allLanguages=await async function(r){const n=await r.get("api/v1/admin/settings/languages"),t=[];return(null==n?void 0:n.active)&&t.push(...n.active),(null==n?void 0:n.inactive)&&t.push(...n.inactive),t}(this.http)}catch(r){console.error(r)}}getOptions(){return this.allLanguages.map((r=>({value:r,text:Cn(r,r)})))}render(){const r=this.getOptions();let n;if(Array.isArray(this.value)){const t=this.value;n=r.filter((r=>t.some((n=>r.value===n)))),0===n.length&&(n=[r[0]])}else{const t=this.value;n=r.find((r=>r.value===t))||r[0]}return t("limel-select",{value:n,options:Bn(r,"text"),helperText:this.helperText,label:this.label,required:this.required,disabled:this.disabled,readonly:this.readonly,onChange:this.handleChange,multiple:this.multipleChoice})}};export{Ln as limebb_locale_picker}
|
|
1
|
+
import{r,c as n,h as t}from"./p-09a9a5fa.js";import{P as e}from"./p-11eb7b1e.js";var u="object"==typeof global&&global&&global.Object===Object&&global,i="object"==typeof self&&self&&self.Object===Object&&self,o=u||i||Function("return this")(),f=o.Symbol,c=Object.prototype,a=c.hasOwnProperty,s=c.toString,v=f?f.toStringTag:void 0,l=Object.prototype.toString,b=f?f.toStringTag:void 0;function h(r){return null==r?void 0===r?"[object Undefined]":"[object Null]":b&&b in Object(r)?function(r){var n=a.call(r,v),t=r[v];try{r[v]=void 0;var e=!0}catch(r){}var u=s.call(r);return e&&(n?r[v]=t:delete r[v]),u}(r):function(r){return l.call(r)}(r)}function d(r){return null!=r&&"object"==typeof r}function j(r){return"symbol"==typeof r||d(r)&&"[object Symbol]"==h(r)}function p(r,n){for(var t=-1,e=null==r?0:r.length,u=Array(e);++t<e;)u[t]=n(r[t],t,r);return u}var y=Array.isArray,m=f?f.prototype:void 0,w=m?m.toString:void 0;function g(r){if("string"==typeof r)return r;if(y(r))return p(r,g)+"";if(j(r))return w?w.call(r):"";var n=r+"";return"0"==n&&1/r==-1/0?"-0":n}function _(r){var n=typeof r;return null!=r&&("object"==n||"function"==n)}function O(r){return r}function x(r){if(!_(r))return!1;var n=h(r);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}var A,S=o["__core-js_shared__"],k=(A=/[^.]+$/.exec(S&&S.keys&&S.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",$=Function.prototype.toString;function M(r){if(null!=r){try{return $.call(r)}catch(r){}try{return r+""}catch(r){}}return""}var E=/^\[object .+?Constructor\]$/,P=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function D(r,n){var t=function(r,n){return null==r?void 0:r[n]}(r,n);return function(r){return!(!_(r)||(n=r,k&&k in n))&&(x(r)?P:E).test(M(r));var n}(t)?t:void 0}var F=D(o,"WeakMap");function R(r,n,t){switch(t.length){case 0:return r.call(n);case 1:return r.call(n,t[0]);case 2:return r.call(n,t[0],t[1]);case 3:return r.call(n,t[0],t[1],t[2])}return r.apply(n,t)}var U,V,W,B=Date.now,C=function(){try{var r=D(Object,"defineProperty");return r({},"",{}),r}catch(r){}}(),L=(U=C?function(r,n){return C(r,"toString",{configurable:!0,enumerable:!1,value:(t=n,function(){return t}),writable:!0});var t}:O,V=0,W=0,function(){var r=B(),n=16-(r-W);if(W=r,n>0){if(++V>=800)return arguments[0]}else V=0;return U.apply(void 0,arguments)}),N=/^(?:0|[1-9]\d*)$/;function T(r,n){var t=typeof r;return!!(n=null==n?9007199254740991:n)&&("number"==t||"symbol"!=t&&N.test(r))&&r>-1&&r%1==0&&r<n}function q(r,n){return r===n||r!=r&&n!=n}var G=Math.max;function I(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=9007199254740991}function z(r){return null!=r&&I(r.length)&&!x(r)}function H(r,n,t){if(!_(t))return!1;var e=typeof n;return!!("number"==e?z(t)&&T(n,t.length):"string"==e&&n in t)&&q(t[n],r)}var J=Object.prototype;function K(r){return d(r)&&"[object Arguments]"==h(r)}var Q=Object.prototype,X=Q.hasOwnProperty,Y=Q.propertyIsEnumerable,Z=K(function(){return arguments}())?K:function(r){return d(r)&&X.call(r,"callee")&&!Y.call(r,"callee")},rr="object"==typeof exports&&exports&&!exports.nodeType&&exports,nr=rr&&"object"==typeof module&&module&&!module.nodeType&&module,tr=nr&&nr.exports===rr?o.Buffer:void 0,er=(tr?tr.isBuffer:void 0)||function(){return!1},ur={};function ir(r){return function(n){return r(n)}}ur["[object Float32Array]"]=ur["[object Float64Array]"]=ur["[object Int8Array]"]=ur["[object Int16Array]"]=ur["[object Int32Array]"]=ur["[object Uint8Array]"]=ur["[object Uint8ClampedArray]"]=ur["[object Uint16Array]"]=ur["[object Uint32Array]"]=!0,ur["[object Arguments]"]=ur["[object Array]"]=ur["[object ArrayBuffer]"]=ur["[object Boolean]"]=ur["[object DataView]"]=ur["[object Date]"]=ur["[object Error]"]=ur["[object Function]"]=ur["[object Map]"]=ur["[object Number]"]=ur["[object Object]"]=ur["[object RegExp]"]=ur["[object Set]"]=ur["[object String]"]=ur["[object WeakMap]"]=!1;var or="object"==typeof exports&&exports&&!exports.nodeType&&exports,fr=or&&"object"==typeof module&&module&&!module.nodeType&&module,cr=fr&&fr.exports===or&&u.process,ar=function(){try{return fr&&fr.require&&fr.require("util").types||cr&&cr.binding&&cr.binding("util")}catch(r){}}(),sr=ar&&ar.isTypedArray,vr=sr?ir(sr):function(r){return d(r)&&I(r.length)&&!!ur[h(r)]},lr=Object.prototype.hasOwnProperty;var br=function(r,n){return function(t){return r(n(t))}}(Object.keys,Object),hr=Object.prototype.hasOwnProperty;function dr(r){return z(r)?function(r,n){var t=y(r),e=!t&&Z(r),u=!t&&!e&&er(r),i=!t&&!e&&!u&&vr(r),o=t||e||u||i,f=o?function(r,n){for(var t=-1,e=Array(r);++t<r;)e[t]=n(t);return e}(r.length,String):[],c=f.length;for(var a in r)!n&&!lr.call(r,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||T(a,c))||f.push(a);return f}(r):function(r){if((n=r)!==("function"==typeof(t=n&&n.constructor)&&t.prototype||J))return br(r);var n,t,e=[];for(var u in Object(r))hr.call(r,u)&&"constructor"!=u&&e.push(u);return e}(r)}var jr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pr=/^\w*$/;function yr(r,n){if(y(r))return!1;var t=typeof r;return!("number"!=t&&"symbol"!=t&&"boolean"!=t&&null!=r&&!j(r))||pr.test(r)||!jr.test(r)||null!=n&&r in Object(n)}var mr=D(Object,"create"),wr=Object.prototype.hasOwnProperty,gr=Object.prototype.hasOwnProperty;function _r(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}function Or(r,n){for(var t=r.length;t--;)if(q(r[t][0],n))return t;return-1}_r.prototype.clear=function(){this.__data__=mr?mr(null):{},this.size=0},_r.prototype.delete=function(r){var n=this.has(r)&&delete this.__data__[r];return this.size-=n?1:0,n},_r.prototype.get=function(r){var n=this.__data__;if(mr){var t=n[r];return"__lodash_hash_undefined__"===t?void 0:t}return wr.call(n,r)?n[r]:void 0},_r.prototype.has=function(r){var n=this.__data__;return mr?void 0!==n[r]:gr.call(n,r)},_r.prototype.set=function(r,n){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=mr&&void 0===n?"__lodash_hash_undefined__":n,this};var xr=Array.prototype.splice;function Ar(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}Ar.prototype.clear=function(){this.__data__=[],this.size=0},Ar.prototype.delete=function(r){var n=this.__data__,t=Or(n,r);return!(t<0||(t==n.length-1?n.pop():xr.call(n,t,1),--this.size,0))},Ar.prototype.get=function(r){var n=this.__data__,t=Or(n,r);return t<0?void 0:n[t][1]},Ar.prototype.has=function(r){return Or(this.__data__,r)>-1},Ar.prototype.set=function(r,n){var t=this.__data__,e=Or(t,r);return e<0?(++this.size,t.push([r,n])):t[e][1]=n,this};var Sr=D(o,"Map");function kr(r,n){var t,e,u=r.__data__;return("string"==(e=typeof(t=n))||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t)?u["string"==typeof n?"string":"hash"]:u.map}function $r(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n<t;){var e=r[n];this.set(e[0],e[1])}}function Mr(r,n){if("function"!=typeof r||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var t=function(){var e=arguments,u=n?n.apply(this,e):e[0],i=t.cache;if(i.has(u))return i.get(u);var o=r.apply(this,e);return t.cache=i.set(u,o)||i,o};return t.cache=new(Mr.Cache||$r),t}$r.prototype.clear=function(){this.size=0,this.__data__={hash:new _r,map:new(Sr||Ar),string:new _r}},$r.prototype.delete=function(r){var n=kr(this,r).delete(r);return this.size-=n?1:0,n},$r.prototype.get=function(r){return kr(this,r).get(r)},$r.prototype.has=function(r){return kr(this,r).has(r)},$r.prototype.set=function(r,n){var t=kr(this,r),e=t.size;return t.set(r,n),this.size+=t.size==e?0:1,this},Mr.Cache=$r;var Er,Pr,Dr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fr=/\\(\\)?/g,Rr=(Er=Mr((function(r){var n=[];return 46===r.charCodeAt(0)&&n.push(""),r.replace(Dr,(function(r,t,e,u){n.push(e?u.replace(Fr,"$1"):t||r)})),n}),(function(r){return 500===Pr.size&&Pr.clear(),r})),Pr=Er.cache,Er);function Ur(r){return null==r?"":g(r)}function Vr(r,n){return y(r)?r:yr(r,n)?[r]:Rr(Ur(r))}function Wr(r){if("string"==typeof r||j(r))return r;var n=r+"";return"0"==n&&1/r==-1/0?"-0":n}function Br(r,n){for(var t=0,e=(n=Vr(n,r)).length;null!=r&&t<e;)r=r[Wr(n[t++])];return t&&t==e?r:void 0}function Cr(r,n){for(var t=-1,e=n.length,u=r.length;++t<e;)r[u+t]=n[t];return r}var Lr=f?f.isConcatSpreadable:void 0;function Nr(r){return y(r)||Z(r)||!!(Lr&&r&&r[Lr])}function Tr(r,n,t,e,u){var i=-1,o=r.length;for(t||(t=Nr),u||(u=[]);++i<o;){var f=r[i];n>0&&t(f)?n>1?Tr(f,n-1,t,e,u):Cr(u,f):e||(u[u.length]=f)}return u}var qr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Gr(r){return qr.test(r)}var Ir="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",zr="\\ud83c[\\udffb-\\udfff]",Hr="[^\\ud800-\\udfff]",Jr="(?:\\ud83c[\\udde6-\\uddff]){2}",Kr="[\\ud800-\\udbff][\\udc00-\\udfff]",Qr="(?:"+Ir+"|"+zr+")?",Xr="[\\ufe0e\\ufe0f]?"+Qr+"(?:\\u200d(?:"+[Hr,Jr,Kr].join("|")+")[\\ufe0e\\ufe0f]?"+Qr+")*",Yr="(?:"+[Hr+Ir+"?",Ir,Jr,Kr,"[\\ud800-\\udfff]"].join("|")+")",Zr=RegExp(zr+"(?="+zr+")|"+Yr+Xr,"g");var rn=("toUpperCase",function(r){var n,t,e,u,i=Gr(r=Ur(r))?function(r){return Gr(r)?function(r){return r.match(Zr)||[]}(r):function(r){return r.split("")}(r)}(r):void 0,o=i?i[0]:r.charAt(0),f=i?(n=i,t=1,u=n.length,e=void 0===e?u:e,!t&&e>=u?n:function(r,n,t){var e=-1,u=r.length;n<0&&(n=-n>u?0:u+n),(t=t>u?u:t)<0&&(t+=u),u=n>t?0:t-n>>>0,n>>>=0;for(var i=Array(u);++e<u;)i[e]=r[e+n];return i}(n,t,e)).join(""):r.slice(1);return o.toUpperCase()+f});function nn(r){var n=this.__data__=new Ar(r);this.size=n.size}nn.prototype.clear=function(){this.__data__=new Ar,this.size=0},nn.prototype.delete=function(r){var n=this.__data__,t=n.delete(r);return this.size=n.size,t},nn.prototype.get=function(r){return this.__data__.get(r)},nn.prototype.has=function(r){return this.__data__.has(r)},nn.prototype.set=function(r,n){var t=this.__data__;if(t instanceof Ar){var e=t.__data__;if(!Sr||e.length<199)return e.push([r,n]),this.size=++t.size,this;t=this.__data__=new $r(e)}return t.set(r,n),this.size=t.size,this};var tn=Object.prototype.propertyIsEnumerable,en=Object.getOwnPropertySymbols,un=en?function(r){return null==r?[]:(r=Object(r),function(n){for(var t=-1,e=null==n?0:n.length,u=0,i=[];++t<e;){var o=n[t];tn.call(r,o)&&(i[u++]=o)}return i}(en(r)))}:function(){return[]};function on(r){return function(r,n,t){var e=dr(r);return y(r)?e:Cr(e,t(r))}(r,0,un)}var fn=D(o,"DataView"),cn=D(o,"Promise"),an=D(o,"Set"),sn=M(fn),vn=M(Sr),ln=M(cn),bn=M(an),hn=M(F),dn=h;(fn&&"[object DataView]"!=dn(new fn(new ArrayBuffer(1)))||Sr&&"[object Map]"!=dn(new Sr)||cn&&"[object Promise]"!=dn(cn.resolve())||an&&"[object Set]"!=dn(new an)||F&&"[object WeakMap]"!=dn(new F))&&(dn=function(r){var n=h(r),t="[object Object]"==n?r.constructor:void 0,e=t?M(t):"";if(e)switch(e){case sn:return"[object DataView]";case vn:return"[object Map]";case ln:return"[object Promise]";case bn:return"[object Set]";case hn:return"[object WeakMap]"}return n});const jn=dn;var pn=o.Uint8Array;function yn(r){var n=-1,t=null==r?0:r.length;for(this.__data__=new $r;++n<t;)this.add(r[n])}function mn(r,n){for(var t=-1,e=null==r?0:r.length;++t<e;)if(n(r[t],t,r))return!0;return!1}function wn(r,n,t,e,u,i){var o=1&t,f=r.length,c=n.length;if(f!=c&&!(o&&c>f))return!1;var a=i.get(r),s=i.get(n);if(a&&s)return a==n&&s==r;var v=-1,l=!0,b=2&t?new yn:void 0;for(i.set(r,n),i.set(n,r);++v<f;){var h=r[v],d=n[v];if(e)var j=o?e(d,h,v,n,r,i):e(h,d,v,r,n,i);if(void 0!==j){if(j)continue;l=!1;break}if(b){if(!mn(n,(function(r,n){if(!b.has(n)&&(h===r||u(h,r,t,e,i)))return b.push(n)}))){l=!1;break}}else if(h!==d&&!u(h,d,t,e,i)){l=!1;break}}return i.delete(r),i.delete(n),l}function gn(r){var n=-1,t=Array(r.size);return r.forEach((function(r,e){t[++n]=[e,r]})),t}function _n(r){var n=-1,t=Array(r.size);return r.forEach((function(r){t[++n]=r})),t}yn.prototype.add=yn.prototype.push=function(r){return this.__data__.set(r,"__lodash_hash_undefined__"),this},yn.prototype.has=function(r){return this.__data__.has(r)};var On=f?f.prototype:void 0,xn=On?On.valueOf:void 0,An=Object.prototype.hasOwnProperty,Sn="[object Object]",kn=Object.prototype.hasOwnProperty;function $n(r,n,t,e,u){return r===n||(null==r||null==n||!d(r)&&!d(n)?r!=r&&n!=n:function(r,n,t,e,u,i){var o=y(r),f=y(n),c=o?"[object Array]":jn(r),a=f?"[object Array]":jn(n),s=(c="[object Arguments]"==c?Sn:c)==Sn,v=(a="[object Arguments]"==a?Sn:a)==Sn,l=c==a;if(l&&er(r)){if(!er(n))return!1;o=!0,s=!1}if(l&&!s)return i||(i=new nn),o||vr(r)?wn(r,n,t,e,u,i):function(r,n,t,e,u,i,o){switch(t){case"[object DataView]":if(r.byteLength!=n.byteLength||r.byteOffset!=n.byteOffset)return!1;r=r.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(r.byteLength!=n.byteLength||!i(new pn(r),new pn(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return q(+r,+n);case"[object Error]":return r.name==n.name&&r.message==n.message;case"[object RegExp]":case"[object String]":return r==n+"";case"[object Map]":var f=gn;case"[object Set]":if(f||(f=_n),r.size!=n.size&&!(1&e))return!1;var c=o.get(r);if(c)return c==n;e|=2,o.set(r,n);var a=wn(f(r),f(n),e,u,i,o);return o.delete(r),a;case"[object Symbol]":if(xn)return xn.call(r)==xn.call(n)}return!1}(r,n,c,t,e,u,i);if(!(1&t)){var b=s&&kn.call(r,"__wrapped__"),h=v&&kn.call(n,"__wrapped__");if(b||h){var d=b?r.value():r,j=h?n.value():n;return i||(i=new nn),u(d,j,t,e,i)}}return!!l&&(i||(i=new nn),function(r,n,t,e,u,i){var o=1&t,f=on(r),c=f.length;if(c!=on(n).length&&!o)return!1;for(var a=c;a--;){var s=f[a];if(!(o?s in n:An.call(n,s)))return!1}var v=i.get(r),l=i.get(n);if(v&&l)return v==n&&l==r;var b=!0;i.set(r,n),i.set(n,r);for(var h=o;++a<c;){var d=r[s=f[a]],j=n[s];if(e)var p=o?e(j,d,s,n,r,i):e(d,j,s,r,n,i);if(!(void 0===p?d===j||u(d,j,t,e,i):p)){b=!1;break}h||(h="constructor"==s)}if(b&&!h){var y=r.constructor,m=n.constructor;y==m||!("constructor"in r)||!("constructor"in n)||"function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m||(b=!1)}return i.delete(r),i.delete(n),b}(r,n,t,e,u,i))}(r,n,t,e,$n,u))}function Mn(r){return r==r&&!_(r)}function En(r,n){return function(t){return null!=t&&t[r]===n&&(void 0!==n||r in Object(t))}}function Pn(r,n){return null!=r&&n in Object(r)}function Dn(r,n){return yr(r)&&Mn(n)?En(Wr(r),n):function(t){var e=function(r,n){var t=null==r?void 0:Br(r,n);return void 0===t?void 0:t}(t,r);return void 0===e&&e===n?function(r,n){return null!=r&&function(r,n,t){for(var e=-1,u=(n=Vr(n,r)).length,i=!1;++e<u;){var o=Wr(n[e]);if(!(i=null!=r&&t(r,o)))break;r=r[o]}return i||++e!=u?i:!!(u=null==r?0:r.length)&&I(u)&&T(o,u)&&(y(r)||Z(r))}(r,n,Pn)}(t,r):$n(n,e,3)}}function Fn(r){return"function"==typeof r?r:null==r?O:"object"==typeof r?y(r)?Dn(r[0],r[1]):1==(u=function(r){for(var n=dr(r),t=n.length;t--;){var e=n[t],u=r[e];n[t]=[e,u,Mn(u)]}return n}(e=r)).length&&u[0][2]?En(u[0][0],u[0][1]):function(r){return r===e||function(r,n,t,e){var u=t.length,i=u;if(null==r)return!i;for(r=Object(r);u--;){var o=t[u];if(o[2]?o[1]!==r[o[0]]:!(o[0]in r))return!1}for(;++u<i;){var f=(o=t[u])[0],c=r[f],a=o[1];if(o[2]){if(void 0===c&&!(f in r))return!1}else{var s,v=new nn;if(!(void 0===s?$n(a,c,3,e,v):s))return!1}}return!0}(r,0,u)}:yr(n=r)?(t=Wr(n),function(r){return null==r?void 0:r[t]}):function(r){return function(n){return Br(n,r)}}(n);var n,t,e,u}var Rn=function(r,n,t){for(var e=-1,u=Object(r),i=t(r),o=i.length;o--;){var f=i[++e];if(!1===n(u[f],f,u))break}return r},Un=function(r,n){if(null==r)return r;if(!z(r))return function(r,n){return r&&Rn(r,n,dr)}(r,n);for(var t=r.length,e=-1,u=Object(r);++e<t&&!1!==n(u[e],e,u););return r};function Vn(r,n){if(r!==n){var t=void 0!==r,e=null===r,u=r==r,i=j(r),o=void 0!==n,f=null===n,c=n==n,a=j(n);if(!f&&!a&&!i&&r>n||i&&o&&c&&!f&&!a||e&&o&&c||!t&&c||!u)return 1;if(!e&&!i&&!a&&r<n||a&&t&&u&&!e&&!i||f&&t&&u||!o&&u||!c)return-1}return 0}function Wn(r,n,t){n=n.length?p(n,(function(r){return y(r)?function(n){return Br(n,1===r.length?r[0]:r)}:r})):[O];var e=-1;return n=p(n,ir(Fn)),function(r){var n=r.length;for(r.sort((function(r,n){return function(r,n,t){for(var e=-1,u=r.criteria,i=n.criteria,o=u.length,f=t.length;++e<o;){var c=Vn(u[e],i[e]);if(c)return e>=f?c:c*("desc"==t[e]?-1:1)}return r.index-n.index}(r,n,t)}));n--;)r[n]=r[n].value;return r}(function(r,n){var t=-1,e=z(r)?Array(r.length):[];return Un(r,(function(r){e[++t]=n(r)})),e}(r,(function(r){return{criteria:p(n,(function(n){return n(r)})),index:++e,value:r}})))}var Bn=function(r){return L(function(r,n,t){return n=G(void 0===n?r.length-1:n,0),function(){for(var e=arguments,u=-1,i=G(e.length-n,0),o=Array(i);++u<i;)o[u]=e[n+u];u=-1;for(var f=Array(n+1);++u<n;)f[u]=e[u];return f[n]=t(o),R(r,this,f)}}(r,void 0,O),r+"")}((function(r,n){if(null==r)return[];var t=n.length;return t>1&&H(r,n[0],n[1])?n=[]:t>2&&H(n[0],n[1],n[2])&&(n=[n[0]]),Wn(r,Tr(n,1),[])}));function Cn(r,n){if(!r.length||!n.length)return"";r="en_us"===r?"en-US":r,n="en_us"===n?"en-US":n;const t=(new Intl.DisplayNames(n,{type:"language"}).of(r)||"").split(" ");return t[0]=rn(Ur(t[0]).toLowerCase()),t.join(" ")}const Ln=class{constructor(t){r(this,t),this.change=n(this,"change",7),this.context={limetype:null,id:null},this.handleChange=r=>{r.stopPropagation(),this.change.emit(this.multipleChoice?r.detail.map((r=>r.value)):r.detail.value)}}async componentWillLoad(){try{this.http=this.platform.get(e.Http),this.allLanguages=await async function(r){const n=await r.get("api/v1/admin/settings/languages"),t=[];return(null==n?void 0:n.active)&&t.push(...n.active),(null==n?void 0:n.inactive)&&t.push(...n.inactive),t}(this.http)}catch(r){console.error(r)}}getOptions(){return this.allLanguages.map((r=>({value:r,text:Cn(r,r)})))}render(){const r=this.getOptions();let n;if(Array.isArray(this.value)){const t=this.value;n=r.filter((r=>t.some((n=>r.value===n))))}else{const t=this.value;n=r.find((r=>r.value===t))}return t("limel-select",{value:n,options:Bn(r,"text"),helperText:this.helperText,label:this.label,required:this.required,disabled:this.disabled,readonly:this.readonly,onChange:this.handleChange,multiple:this.multipleChoice})}};export{Ln as limebb_locale_picker}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-crm-building-blocks",
|
|
3
|
-
"version": "1.36.
|
|
3
|
+
"version": "1.36.3",
|
|
4
4
|
"description": "A home for shared components meant for use with Lime CRM",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@limetech/lime-elements": "^37.
|
|
44
|
+
"@limetech/lime-elements": "^37.55.4",
|
|
45
45
|
"@limetech/lime-web-components": "^5.31.0",
|
|
46
46
|
"@lundalogik/lime-icons8": "^2.26.1",
|
|
47
47
|
"@lundalogik/limeclient.js": "^1.65.0",
|