@ikas/popup-renderer 1.0.196 → 1.0.198
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/build/ext/libphonenumber-js/es6/formatIncompletePhoneNumber.js +1 -0
- package/build/ext/libphonenumber-js/es6/getCountries.js +1 -0
- package/build/ext/libphonenumber-js/min/exports/formatIncompletePhoneNumber.js +1 -0
- package/build/ext/libphonenumber-js/min/exports/getCountries.js +1 -0
- package/build/ext/libphonenumber-js/min/exports/getCountryCallingCode.js +1 -0
- package/build/ext/libphonenumber-js/min/exports/isSupportedCountry.js +1 -0
- package/build/ext/libphonenumber-js/min/exports/parsePhoneNumber.js +1 -0
- package/build/ext/mobx-react-lite/es/ObserverComponent.js +1 -0
- package/build/ext/mobx-react-lite/es/index.js +1 -0
- package/build/ext/mobx-react-lite/es/observer.js +1 -0
- package/build/ext/mobx-react-lite/es/useAsObservableSource.js +1 -0
- package/build/ext/mobx-react-lite/es/useObserver.js +1 -0
- package/build/ext/mobx-react-lite/es/utils/UniversalFinalizationRegistry.js +1 -0
- package/build/ext/mobx-react-lite/es/utils/assertEnvironment.js +1 -0
- package/build/ext/mobx-react-lite/es/utils/observerBatching.js +1 -0
- package/build/ext/mobx-react-lite/es/utils/observerFinalizationRegistry.js +1 -0
- package/build/ext/mobx-react-lite/es/utils/printDebugValue.js +1 -0
- package/build/popup-renderer/components/form-element-renderer/input-item-view/index.d.ts +3 -0
- package/build/popup-renderer/components/form-element-renderer/input-item-view/index.js +1 -1
- package/build/popup-renderer/components/form-element-renderer/phone-input-item-view/get-countries.d.ts +7 -0
- package/build/popup-renderer/components/form-element-renderer/phone-input-item-view/get-countries.js +1 -0
- package/build/popup-renderer/components/form-element-renderer/phone-input-item-view/index.d.ts +12 -0
- package/build/popup-renderer/components/form-element-renderer/phone-input-item-view/index.js +1 -0
- package/build/popup-renderer/models/modal/step/elements/form/form-settings/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import o from"./AsYouType.js";function t(t,e,n){return n||(n=e,e=void 0),new o(e,n).input(t)}export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./metadata.js";function e(e){return new t(e).getCountries()}export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"./withMetadataArgument.js";import"../../es6/PhoneNumberMatcher.js";import"../../es6/AsYouTypeFormatter.js";import r from"../../es6/formatIncompletePhoneNumber.js";function t(){return e(r,arguments)}export{t as formatIncompletePhoneNumber};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./withMetadataArgument.js";import"../../es6/PhoneNumberMatcher.js";import"../../es6/AsYouTypeFormatter.js";import r from"../../es6/getCountries.js";function e(){return t(r,arguments)}export{e as getCountries};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./withMetadataArgument.js";import{getCountryCallingCode as e}from"../../es6/metadata.js";import"../../es6/PhoneNumberMatcher.js";import"../../es6/AsYouTypeFormatter.js";function r(){return t(e,arguments)}export{r as getCountryCallingCode};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"./withMetadataArgument.js";import{isSupportedCountry as r}from"../../es6/metadata.js";import"../../es6/PhoneNumberMatcher.js";import"../../es6/AsYouTypeFormatter.js";function e(){return t(r,arguments)}export{e as isSupportedCountry};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import r from"./withMetadataArgument.js";import e from"../../es6/parsePhoneNumber.js";import"../../es6/PhoneNumberMatcher.js";import"../../es6/AsYouTypeFormatter.js";function t(){return r(e,arguments)}export{t as parsePhoneNumber};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./useObserver.js";process.env.NODE_ENV;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./utils/assertEnvironment.js";import{unstable_batchedUpdates as r}from"react-dom";import{observerBatching as e}from"./utils/observerBatching.js";export{observerBatching}from"./utils/observerBatching.js";import"./useObserver.js";import{observerFinalizationRegistry as o}from"./utils/observerFinalizationRegistry.js";export{observer}from"./observer.js";import"./ObserverComponent.js";import"mobx";import"react";import"./useAsObservableSource.js";e(r),o.finalizeAllImmediately;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{forwardRef as e,memo as r}from"react";import{useObserver as o}from"./useObserver.js";var t=!0,n="function"==typeof Symbol&&Symbol.for,a=n?Symbol.for("react.forward_ref"):"function"==typeof e&&e((function(e){return null})).$$typeof,f=n?Symbol.for("react.memo"):"function"==typeof r&&r((function(e){return null})).$$typeof;function c(n,c){var i;if("production"!==process.env.NODE_ENV&&t&&c&&(t=!1,console.warn("[mobx-react-lite] `observer(fn, { forwardRef: true })` is deprecated, use `observer(React.forwardRef(fn))`")),f&&n.$$typeof===f)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var s=null!==(i=null==c?void 0:c.forwardRef)&&void 0!==i&&i,y=n,u=n.displayName||n.name;if(a&&n.$$typeof===a&&(s=!0,"function"!=typeof(y=n.render)))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var m,l,d=function(e,r){return o((function(){return y(e,r)}),u)};return""!==u&&(d.displayName=u),n.contextTypes&&(d.contextTypes=n.contextTypes),s&&(d=e(d)),d=r(d),m=n,l=d,Object.keys(m).forEach((function(e){p[e]||Object.defineProperty(l,e,Object.getOwnPropertyDescriptor(m,e))})),"production"!==process.env.NODE_ENV&&Object.defineProperty(d,"contextTypes",{set:function(){var e;throw new Error("[mobx-react-lite] `".concat(this.displayName||(null===(e=this.type)||void 0===e?void 0:e.displayName)||"Component",".contextTypes` must be set before applying `observer`."))}}),d}var p={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};export{c as observer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"mobx";import"react";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Reaction as r}from"mobx";import e from"react";import{printDebugValue as n}from"./utils/printDebugValue.js";import{observerFinalizationRegistry as t}from"./utils/observerFinalizationRegistry.js";var o=function(r,e){var n="function"==typeof Symbol&&r[Symbol.iterator];if(!n)return r;var t,o,u=n.call(r),i=[];try{for(;(void 0===e||e-- >0)&&!(t=u.next()).done;)i.push(t.value)}catch(r){o={error:r}}finally{try{t&&!t.done&&(n=u.return)&&n.call(u)}finally{if(o)throw o.error}}return i};function u(r){return"observer".concat(r)}var i=function(){};function c(){return new i}function a(i,a){void 0===a&&(a="observed");var f=o(e.useState(c),1)[0],l=o(e.useState(),2)[1],s=function(){return l([])},d=e.useRef(null);d.current||(d.current={reaction:null,mounted:!1,changedBeforeMount:!1});var m,v,g=d.current;if(g.reaction||(g.reaction=new r(u(a),(function(){g.mounted?s():g.changedBeforeMount=!0})),t.register(f,g,g)),e.useDebugValue(g.reaction,n),e.useEffect((function(){return t.unregister(g),g.mounted=!0,g.reaction?g.changedBeforeMount&&(g.changedBeforeMount=!1,s()):(g.reaction=new r(u(a),(function(){s()})),s()),function(){g.reaction.dispose(),g.reaction=null,g.mounted=!1,g.changedBeforeMount=!1}}),[]),g.reaction.track((function(){try{m=i()}catch(r){v=r}})),v)throw v;return m}export{a as useObserver};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=1e4,t=1e4,i=function(){function e(e){var t=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(e){void 0===e&&(e=1e4),clearTimeout(t.sweepTimeout),t.sweepTimeout=void 0;var i=Date.now();t.registrations.forEach((function(r,n){i-r.registeredAt>=e&&(t.finalize(r.value),t.registrations.delete(n))})),t.registrations.size>0&&t.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,t,i){this.registrations.set(i,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){void 0===this.sweepTimeout&&(this.sweepTimeout=setTimeout(this.sweep,1e4))}}),e}(),r="undefined"!=typeof FinalizationRegistry?FinalizationRegistry:i;export{e as REGISTRY_FINALIZE_AFTER,t as REGISTRY_SWEEP_INTERVAL,i as TimerBasedFinalizationRegistry,r as UniversalFinalizationRegistry};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{makeObservable as r}from"mobx";import{useState as o}from"react";if(!o)throw new Error("mobx-react-lite requires React with Hooks support");if(!r)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{configure as o}from"mobx";function e(o){o()}function t(t){t||(t=e,"production"!==process.env.NODE_ENV&&console.warn("[MobX] Failed to get unstable_batched updates from react-dom / react-native")),o({reactionScheduler:t})}export{e as defaultNoopBatch,t as observerBatching};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{UniversalFinalizationRegistry as i}from"./UniversalFinalizationRegistry.js";var n=new i((function(i){var n;null===(n=i.reaction)||void 0===n||n.dispose(),i.reaction=null}));export{n as observerFinalizationRegistry};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getDependencyTree as o}from"mobx";function r(r){return o(r)}export{r as printDebugValue};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { InputLabel, InputPlaceholder, RequiredInput } from "../../../models/modal/step/elements/form";
|
|
3
3
|
import { FormInputSettings } from "../../../models/modal/step/elements/form/form-settings";
|
|
4
|
+
import { SFProps } from "popup-renderer/components";
|
|
4
5
|
type Props = {
|
|
5
6
|
placeholder?: InputPlaceholder | null;
|
|
6
7
|
isRequired?: RequiredInput | null;
|
|
@@ -10,6 +11,8 @@ type Props = {
|
|
|
10
11
|
formInputSettings: FormInputSettings;
|
|
11
12
|
onValueChange: (value: string) => void;
|
|
12
13
|
validationErrorMessage: null | string;
|
|
14
|
+
isPhoneInput?: boolean;
|
|
15
|
+
sfProps?: SFProps;
|
|
13
16
|
};
|
|
14
17
|
declare const InputItemView: React.FC<Props>;
|
|
15
18
|
export default InputItemView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{observer as t}from"mobx-react";import{generateRandomId as r}from"../../../helpers/index.js";var
|
|
1
|
+
import e from"react";import{observer as t}from"mobx-react";import{generateRandomId as r}from"../../../helpers/index.js";import{PhoneNumberInput as o}from"../phone-input-item-view/index.js";var n=t((function(t){var n=e.useState(!1),l=n[0],a=n[1];e.useRef(null);var i=e.useMemo((function(){return r()}),[]),c=t.placeholder,u=t.isRequired,s=t.inputLabel;t.updateCurrentInfo;var p=t.validationErrorMessage,d=t.formInputSettings,m=t.value,f=t.onValueChange,x=t.isPhoneInput,h=t.sfProps,v={width:"100%",backgroundColor:d.bgColor?"".concat(d.bgColor):"transparent",border:"".concat(d.borderWidth,"px solid ").concat(l?d.focusBorderColor:d.borderColor),borderRadius:"".concat(d.borderRadius,"px"),fontSize:"14px",padding:"10px 12px",height:"".concat(d.height,"px"),outline:"none"},g=function(e){f(e),u&&u.hasError&&e.length>0&&(u.hasError=!1)},y=u?((null==c?void 0:c.text)||"")+" *":(null==c?void 0:c.text)||"";return e.createElement("div",{style:{width:"100%",display:"flex",gap:2,flexDirection:"column"}},(s||u)&&e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:"6px"}},e.createElement("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"}},s&&e.createElement("label",{style:{color:d.titleColor,fontSize:"14px"}},s.text)),u&&u.hasError&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},u.validationErrorMessage),!!p&&e.createElement("div",{style:{color:"red",fontSize:"12px"}},p)),x?e.createElement(o,{onChange:function(e){return g(e)},placeholder:y,value:m||"",inputStyle:v,defaultCountry:null==h?void 0:h.currentCountryCode,className:"ikas-form-input-item-view-".concat(i)}):e.createElement("input",{type:"text",placeholder:y,value:m||"",onChange:function(e){return g(e.target.value)},style:v,onFocus:function(){return a(!0)},onBlur:function(){return a(!1)},className:"ikas-form-input-item-view-".concat(i)}),e.createElement("style",null,"\n .ikas-form-input-item-view-".concat(i,"::placeholder {\n color: ").concat(d.placeholderColor,";\n }\n ")))}));export{n as default};
|
package/build/popup-renderer/components/form-element-renderer/phone-input-item-view/get-countries.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as o}from'./../../../../ext/tslib/tslib.es6.mjs.js';import'./../../../../ext/libphonenumber-js/es6/PhoneNumberMatcher.js';import'./../../../../ext/libphonenumber-js/es6/AsYouTypeFormatter.js';import'./../../../../ext/libphonenumber-js/min/exports/PhoneNumberMatcher.js';import'./../../../../ext/libphonenumber-js/min/exports/AsYouType.js';import{getCountries as n}from'./../../../../ext/libphonenumber-js/min/exports/getCountries.js';import'./../../../../ext/libphonenumber-js/min/exports/Metadata.js';import'./../../../../ext/libphonenumber-js/es6/findNumbers/isValidCandidate.js';import'./../../../../ext/libphonenumber-js/index.es6.exports/PhoneNumberSearch.js';var s=function(){return e(void 0,void 0,void 0,(function(){var e;return o(this,(function(o){switch(o.label){case 0:return"https://cdn.myikas.com/sf/static/locale/country/en.json",[4,fetch("https://cdn.myikas.com/sf/static/locale/country/en.json")];case 1:return[4,o.sent().json()];case 2:return e=o.sent(),[2,n().map((function(o){return{value:o,label:e[o]}})).sort((function(e,o){return function(e,o){return e.localeCompare(o)}(e.label,o.label)}))]}}))}))};export{s as default};
|
package/build/popup-renderer/components/form-element-renderer/phone-input-item-view/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type Props = {
|
|
3
|
+
defaultCountry?: string | null;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
placeholder: string | undefined;
|
|
6
|
+
value: string;
|
|
7
|
+
onChange: (value: string) => void;
|
|
8
|
+
inputStyle?: React.CSSProperties;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const PhoneNumberInput: React.FC<Props>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{__awaiter as e,__generator as t}from'./../../../../ext/tslib/tslib.es6.mjs.js';import*as o from"react";import'./../../../../ext/mobx-react-lite/es/index.js';import r from'./../../../../ext/libphonenumber-js/es6/parseIncompletePhoneNumber.js';import'./../../../../ext/libphonenumber-js/es6/PhoneNumberMatcher.js';import'./../../../../ext/libphonenumber-js/es6/AsYouTypeFormatter.js';import{parsePhoneNumber as n}from'./../../../../ext/libphonenumber-js/min/exports/parsePhoneNumber.js';import'./../../../../ext/libphonenumber-js/min/exports/PhoneNumberMatcher.js';import'./../../../../ext/libphonenumber-js/min/exports/AsYouType.js';import{isSupportedCountry as i}from'./../../../../ext/libphonenumber-js/min/exports/isSupportedCountry.js';import{getCountryCallingCode as s}from'./../../../../ext/libphonenumber-js/min/exports/getCountryCallingCode.js';import'./../../../../ext/libphonenumber-js/min/exports/Metadata.js';import{formatIncompletePhoneNumber as l}from'./../../../../ext/libphonenumber-js/min/exports/formatIncompletePhoneNumber.js';import'./../../../../ext/libphonenumber-js/es6/findNumbers/isValidCandidate.js';import'./../../../../ext/libphonenumber-js/index.es6.exports/PhoneNumberSearch.js';import m from"./get-countries.js";import{observer as a}from'./../../../../ext/mobx-react-lite/es/observer.js';var u=a((function(a){var u=a.defaultCountry,d=a.disabled,p=void 0!==d&&d,c=a.placeholder,b=a.value,h=a.onChange,f=a.inputStyle,v=a.className,x=o.useState([]),j=x[0],g=x[1],y=o.useState(u||"TR"),_=y[0],C=y[1],E=o.useState(""),N=E[0],S=E[1];o.useEffect((function(){w();var e=_;if(i(e)||(e="US"),b){var t=n(b);t&&t.country&&(e=t.country),S(l(b,e))}else P(e);C(e)}),[u]);var w=function(){return e(void 0,void 0,void 0,(function(){var e;return t(this,(function(t){switch(t.label){case 0:return[4,m()];case 1:return e=t.sent(),g(e),[2]}}))}))},P=function(e){var t=s(e);S("+".concat(t))},T=function(e){return l(e,_)};return o.createElement(o.Fragment,null,o.createElement("div",{style:{position:"absolute",top:"26px",left:"16px"}},o.createElement("div",{style:{position:"relative",width:"35px",height:"24px",flex:"0 0 35px"}},o.createElement("div",{style:{position:"relative",width:"35px",height:"24px",display:"flex",alignItems:"center"}},o.createElement("img",{style:{width:"24px",flex:"0 0 24px"},alt:_,src:"https://cdn.myikas.com/sf/assets/flags/3x2/".concat(_,".svg")}),o.createElement("div",{style:{display:"block",width:"0.3em",height:"0.3em",marginLeft:"0.35em",marginTop:"-0.2em",borderStyle:"solid",borderColor:"inherit",borderTopWidth:0,borderBottomWidth:"1px",borderLeftWidth:0,borderRightWidth:"1px",transform:"rotate(45deg)",opacity:.45,flex:"0 0 0.3em"}})),o.createElement("select",{style:{position:"absolute",top:0,left:0,zIndex:1,padding:0,opacity:0,border:0,width:"100%",height:"100%",cursor:"pointer"},value:_,onChange:function(e){if(e.target.value){var t=e.target.value;C(t),P(t)}},disabled:p},j.map((function(e){return o.createElement("option",{key:e.value,value:e.value},e.label)}))))),o.createElement("input",{type:"tel",autoComplete:"tel",value:N,onChange:function(e){var t=j.find((function(t){var o;return t.value===(null===(o=n(e.target.value))||void 0===o?void 0:o.country)}));t&&C(t.value);var o=T(e.target.value);S(o),h(o?r(o):e.target.value)},placeholder:c,disabled:p,style:f,className:v}))}));export{u as PhoneNumberInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeObservable as o,observable as r}from"mobx";import{IkasPopupRendererFontFamily as e}from"../../base/index.js";var t=function(t){var l,d;void 0===t&&(t={}),this.formInputSettings=t.formInputSettings?new i(t.formInputSettings):new i({borderColor:"#E3E8EF",focusBorderColor:"#000000"}),this.gapBetweenItems=null!==(l=t.gapBetweenItems)&&void 0!==l?l:12,this.fontFamily=new e(t.fontFamily),this.fontSize=null!==(d=t.fontSize)&&void 0!==d?d:14,o(this,{formInputSettings:r,gapBetweenItems:r,fontFamily:r,fontSize:r})},i=function(e){var t,i,l;void 0===e&&(e={}),this.bgColor=e.bgColor||"",this.borderWidth=null!==(t=e.borderWidth)&&void 0!==t?t:1,this.borderRadius=null!==(i=e.borderRadius)&&void 0!==i?i:4,this.borderColor=e.borderColor||"",this.focusBorderColor=e.focusBorderColor||"",this.height=null!==(l=e.height)&&void 0!==l?l:40,this.placeholderColor=e.placeholderColor?e.placeholderColor:"#
|
|
1
|
+
import{makeObservable as o,observable as r}from"mobx";import{IkasPopupRendererFontFamily as e}from"../../base/index.js";var t=function(t){var l,d;void 0===t&&(t={}),this.formInputSettings=t.formInputSettings?new i(t.formInputSettings):new i({borderColor:"#E3E8EF",focusBorderColor:"#000000"}),this.gapBetweenItems=null!==(l=t.gapBetweenItems)&&void 0!==l?l:12,this.fontFamily=new e(t.fontFamily),this.fontSize=null!==(d=t.fontSize)&&void 0!==d?d:14,o(this,{formInputSettings:r,gapBetweenItems:r,fontFamily:r,fontSize:r})},i=function(e){var t,i,l;void 0===e&&(e={}),this.bgColor=e.bgColor||"",this.borderWidth=null!==(t=e.borderWidth)&&void 0!==t?t:1,this.borderRadius=null!==(i=e.borderRadius)&&void 0!==i?i:4,this.borderColor=e.borderColor||"",this.focusBorderColor=e.focusBorderColor||"",this.height=null!==(l=e.height)&&void 0!==l?l:40,this.placeholderColor=e.placeholderColor?e.placeholderColor:"#697586",this.titleColor=e.titleColor?e.titleColor:"#121926",this.checkboxTextColor=e.checkboxTextColor?e.checkboxTextColor:"#121926",o(this,{bgColor:r,borderWidth:r,borderRadius:r,borderColor:r,focusBorderColor:r,height:r,placeholderColor:r,titleColor:r,checkboxTextColor:r})};export{i as FormInputSettings,t as FormSettings};
|