@digi-frontend/dgate-api-documentation 1.0.32 → 1.0.33
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/_virtual/index5.js +1 -1
- package/dist/_virtual/index6.js +1 -1
- package/dist/node_modules/yup/index.esm.js +1 -1
- package/dist/src/components/InfoForm/InfoForm.js +1 -1
- package/dist/src/components/InfoForm/InfoForm.js.map +1 -1
- package/dist/styles.css +339 -339
- package/package.json +1 -1
- package/src/components/InfoForm/InfoForm.tsx +4 -2
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__require as
|
|
1
|
+
import{__require as e}from"../node_modules/tiny-case/index.js";var r=e();export{r as t};
|
|
2
2
|
//# sourceMappingURL=index5.js.map
|
package/dist/_virtual/index6.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__require as
|
|
1
|
+
import{__require as r}from"../node_modules/property-expr/index.js";var e=r();export{e as p};
|
|
2
2
|
//# sourceMappingURL=index6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e}from"../../_virtual/index5.js";import{t}from"../../_virtual/index6.js";import s from"../../_virtual/index3.js";const r=Object.prototype.toString,n=Error.prototype.toString,i=RegExp.prototype.toString,a="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",o=/^Symbol\((.*)\)(.*)$/;function l(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const s=typeof e;if("number"===s)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===s)return t?`"${e}"`:e;if("function"===s)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===s)return a.call(e).replace(o,"Symbol($1)");const l=r.call(e).slice(8,-1);return"Date"===l?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===l||e instanceof Error?"["+n.call(e)+"]":"RegExp"===l?i.call(e):null}function u(e,t){let s=l(e,t);return null!==s?s:JSON.stringify(e,(function(e,s){let r=l(this[e],t);return null!==r?r:s}),2)}function c(e){return null==e?[]:[].concat(e)}let h,p,d,f=/\$\{\s*(\w+)\s*\}/g;h=Symbol.toStringTag;class m{constructor(e,t,s,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[h]="Error",this.name="ValidationError",this.value=t,this.path=s,this.type=r,this.errors=[],this.inner=[],c(e).forEach((e=>{if(y.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}p=Symbol.hasInstance,d=Symbol.toStringTag;class y extends Error{static formatError(e,t){const s=t.label||t.path||"this";return t=Object.assign({},t,{path:s,originalPath:t.path}),"string"==typeof e?e.replace(f,((e,s)=>u(t[s]))):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,s,r,n){const i=new m(e,t,s,r);if(n)return i;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[d]="Error",this.name=i.name,this.message=i.message,this.type=i.type,this.value=i.value,this.path=i.path,this.errors=i.errors,this.inner=i.inner,Error.captureStackTrace&&Error.captureStackTrace(this,y)}static[p](e){return m[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let v={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:s,originalValue:r})=>{const n=null!=r&&r!==s?` (cast from the value \`${u(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${u(s,!0)}\``+n:`${e} must match the configured type. The validated value was: \`${u(s,!0)}\``+n}},g={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},b={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},F={isValue:"${path} field must be ${value}"},_={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},w={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},x={notType:e=>{const{path:t,value:s,spec:r}=e,n=r.types.length;if(Array.isArray(s)){if(s.length<n)return`${t} tuple value has too few items, expected a length of ${n} but got ${s.length} for value: \`${u(s,!0)}\``;if(s.length>n)return`${t} tuple value has too many items, expected a length of ${n} but got ${s.length} for value: \`${u(s,!0)}\``}return y.formatError(v.notType,e)}};Object.assign(Object.create(null),{mixed:v,string:g,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:b,object:_,array:w,boolean:F,tuple:x});const T=e=>e&&e.__isYupSchema__;class ${static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:r,otherwise:n}=t,i="function"==typeof s?s:(...e)=>e.every((e=>e===s));return new $(e,((e,t)=>{var s;let a=i(...e)?r:n;return null!=(s=null==a?void 0:a(t))?s:t}))}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let s=this.refs.map((e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context))),r=this.fn(s,e,t);if(void 0===r||r===e)return e;if(!T(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}const O="$",k=".";class E{constructor(t,s={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof t)throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),""===t)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===O,this.isValue=this.key[0]===k,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?O:this.isValue?k:"";this.path=this.key.slice(r.length),this.getter=this.path&&e.getter(this.path,!0),this.map=s.map}getValue(e,t,s){let r=this.isContext?s:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}E.prototype.__isYupRef=!0;const S=e=>null==e;function j(e){function t({value:t,path:s="",options:r,originalValue:n,schema:i},a,o){const{name:l,test:u,params:c,message:h,skipAbsent:p}=e;let{parent:d,context:f,abortEarly:m=i.spec.abortEarly,disableStackTrace:v=i.spec.disableStackTrace}=r;function g(e){return E.isRef(e)?e.getValue(t,d,f):e}function b(e={}){const r=Object.assign({value:t,originalValue:n,label:i.spec.label,path:e.path||s,spec:i.spec,disableStackTrace:e.disableStackTrace||v},c,e.params);for(const e of Object.keys(r))r[e]=g(r[e]);const a=new y(y.formatError(e.message||h,r),t,r.path,e.type||l,r.disableStackTrace);return a.params=r,a}const F=m?a:o;let _={path:s,parent:d,type:l,from:r.from,createError:b,resolve:g,options:r,originalValue:n,schema:i};const w=e=>{y.isError(e)?F(e):e?o(null):F(b())},x=e=>{y.isError(e)?F(e):a(e)};if(p&&S(t))return w(!0);let T;try{var $;if(T=u.call(_,t,_),"function"==typeof(null==($=T)?void 0:$.then)){if(r.sync)throw new Error(`Validation test of type: "${_.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(T).then(w,x)}}catch(e){return void x(e)}w(T)}return t.OPTIONS=e,t}function A(t,s,r,n=r){let i,a,o;return s?(e.forEach(s,((e,l,u)=>{let c=l?e.slice(1,e.length-1):e,h="tuple"===(t=t.resolve({context:n,parent:i,value:r})).type,p=u?parseInt(c,10):0;if(t.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&p>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${e}, in the path: ${s}. because there is no value at that index. `);i=r,r=r&&r[p],t=h?t.spec.types[p]:t.innerType}if(!u){if(!t.fields||!t.fields[c])throw new Error(`The schema does not contain the path: ${s}. (failed at: ${o} which is a type: "${t.type}")`);i=r,r=r&&r[c],t=t.fields[c]}a=c,o=l?"["+e+"]":"."+e})),{schema:t,parent:i,parentPath:a}):{parent:i,parentPath:s,schema:t}}class D extends Set{describe(){const e=[];for(const t of this.values())e.push(E.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const s of this.values())t.push(e(s));return t}clone(){return new D(this.values())}merge(e,t){const s=this.clone();return e.forEach((e=>s.add(e))),t.forEach((e=>s.delete(e))),s}}function C(e,t=new Map){if(T(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let s;if(e instanceof Date)s=new Date(e.getTime()),t.set(e,s);else if(e instanceof RegExp)s=new RegExp(e),t.set(e,s);else if(Array.isArray(e)){s=new Array(e.length),t.set(e,s);for(let r=0;r<e.length;r++)s[r]=C(e[r],t)}else if(e instanceof Map){s=new Map,t.set(e,s);for(const[r,n]of e.entries())s.set(r,C(n,t))}else if(e instanceof Set){s=new Set,t.set(e,s);for(const r of e)s.add(C(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);s={},t.set(e,s);for(const[r,n]of Object.entries(e))s[r]=C(n,t)}return s}class V{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new D,this._blacklist=new D,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(v.notType)})),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation((e=>{e.nonNullable()}))}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=C(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let s=e(this);return this._mutate=t,s}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,s=e.clone();const r=Object.assign({},t.spec,s.spec);return s.spec=r,s.internalTests=Object.assign({},t.internalTests,s.internalTests),s._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),s._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),s.tests=t.tests,s.exclusiveTests=t.exclusiveTests,s.withMutation((t=>{e.tests.forEach((e=>{t.test(e.OPTIONS)}))})),s.transforms=[...t.transforms,...s.transforms],s}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let s=t.conditions;t=t.clone(),t.conditions=[],t=s.reduce(((t,s)=>s.resolve(t,e)),t),t=t.resolve(e)}return t}resolveOptions(e){var t,s,r,n;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(s=e.abortEarly)?s:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(n=e.disableStackTrace)?n:this.spec.disableStackTrace})}cast(e,t={}){let s=this.resolve(Object.assign({value:e},t)),r="ignore-optionality"===t.assert,n=s._cast(e,t);if(!1!==t.assert&&!s.isType(n)){if(r&&S(n))return n;let i=u(e),a=u(n);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}". \n\nattempted value: ${i} \n`+(a!==i?`result of cast: ${a}`:""))}return n}_cast(e,t){let s=void 0===e?e:this.transforms.reduce(((t,s)=>s.call(this,t,e,this)),e);return void 0===s&&(s=this.getDefault(t)),s}_validate(e,t={},s,r){let{path:n,originalValue:i=e,strict:a=this.spec.strict}=t,o=e;a||(o=this._cast(o,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:n,value:o,originalValue:i,options:t,tests:l},s,(e=>{if(e.length)return r(e,o);this.runTests({path:n,value:o,originalValue:i,options:t,tests:this.tests},s,r)}))}runTests(e,t,s){let r=!1,{tests:n,value:i,originalValue:a,path:o,options:l}=e,u=e=>{r||(r=!0,t(e,i))},c=e=>{r||(r=!0,s(e,i))},h=n.length,p=[];if(!h)return c([]);let d={value:i,originalValue:a,path:o,options:l,schema:this};for(let e=0;e<n.length;e++){(0,n[e])(d,u,(function(e){e&&(Array.isArray(e)?p.push(...e):p.push(e)),--h<=0&&c(p)}))}}asNestedTest({key:e,index:t,parent:s,parentPath:r,originalParent:n,options:i}){const a=null!=e?e:t;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const o="number"==typeof a;let l=s[a];const u=Object.assign({},i,{strict:!0,parent:s,value:l,originalValue:n[a],key:void 0,[o?"index":"key"]:a,path:o||a.includes(".")?`${r||""}[${o?a:`"${a}"`}]`:(r?`${r}.`:"")+e});return(e,t,s)=>this.resolve(u)._validate(l,u,t,s)}validate(e,t){var s;let r=this.resolve(Object.assign({},t,{value:e})),n=null!=(s=null==t?void 0:t.disableStackTrace)?s:r.spec.disableStackTrace;return new Promise(((s,i)=>r._validate(e,t,((e,t)=>{y.isError(e)&&(e.value=t),i(e)}),((e,t)=>{e.length?i(new y(e,t,void 0,void 0,n)):s(t)}))))}validateSync(e,t){var s;let r,n=this.resolve(Object.assign({},t,{value:e})),i=null!=(s=null==t?void 0:t.disableStackTrace)?s:n.spec.disableStackTrace;return n._validate(e,Object.assign({},t,{sync:!0}),((e,t)=>{throw y.isError(e)&&(e.value=t),e}),((t,s)=>{if(t.length)throw new y(t,e,void 0,void 0,i);r=s})),r}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(y.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(y.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):C(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const s=this.clone({nullable:e});return s.internalTests.nullable=j({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),s}optionality(e,t){const s=this.clone({optional:e});return s.internalTests.optionality=j({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),s}optional(){return this.optionality(!0)}defined(e=v.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=v.notNull){return this.nullability(!1,e)}required(e=v.required){return this.clone().withMutation((t=>t.nonNullable(e).defined(e)))}notRequired(){return this.clone().withMutation((e=>e.nullable().optional()))}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=v.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let s=this.clone(),r=j(t),n=t.exclusive||t.name&&!0===s.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(s.exclusiveTests[t.name]=!!t.exclusive),s.tests=s.tests.filter((e=>{if(e.OPTIONS.name===t.name){if(n)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0})),s.tests.push(r),s}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let s=this.clone(),r=c(e).map((e=>new E(e)));return r.forEach((e=>{e.isSibling&&s.deps.push(e.key)})),s.conditions.push("function"==typeof t?new $(r,t):$.fromOptions(r,t)),s}typeError(e){let t=this.clone();return t.internalTests.typeError=j({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=v.oneOf){let s=this.clone();return e.forEach((e=>{s._whitelist.add(e),s._blacklist.delete(e)})),s.internalTests.whiteList=j({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,s=t.resolveAll(this.resolve);return!!s.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:s}})}}),s}notOneOf(e,t=v.notOneOf){let s=this.clone();return e.forEach((e=>{s._blacklist.add(e),s._whitelist.delete(e)})),s.internalTests.blacklist=j({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,s=t.resolveAll(this.resolve);return!s.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:s}})}}),s}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:s,meta:r,optional:n,nullable:i}=t.spec;return{meta:r,label:s,optional:n,nullable:i,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map((e=>({name:e.OPTIONS.name,params:e.OPTIONS.params}))).filter(((e,t,s)=>s.findIndex((t=>t.name===e.name))===t))}}}V.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])V.prototype[`${e}At`]=function(t,s,r={}){const{parent:n,parentPath:i,schema:a}=A(this,t,s,r.context);return a[e](n&&n[i],Object.assign({},r,{parent:n,path:t}))};for(const e of["equals","is"])V.prototype[e]=V.prototype.oneOf;for(const e of["not","nope"])V.prototype[e]=V.prototype.notOneOf;const N=()=>!0;function z(e){return new P(e)}class P extends V{constructor(e){super("function"==typeof e?{type:"mixed",check:e}:Object.assign({type:"mixed",check:N},e))}}function q(){return new I}z.prototype=P.prototype;class I extends V{constructor(){super({type:"boolean",check:e=>(e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,s)=>{if(s.spec.coerce&&!s.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e}))}))}isTrue(e=F.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>S(e)||!0===e})}isFalse(e=F.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>S(e)||!1===e})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}}q.prototype=I.prototype;const M=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function R(e){var t,s;const r=M.exec(e);return r?{year:U(r[1]),month:U(r[2],1)-1,day:U(r[3],1),hour:U(r[4]),minute:U(r[5]),second:U(r[6]),millisecond:r[7]?U(r[7].substring(0,3)):0,precision:null!=(t=null==(s=r[7])?void 0:s.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:U(r[10]),minuteOffset:U(r[11])}:null}function U(e,t=0){return Number(e)||t}let Z=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Y=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,L=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,K=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),J=e=>S(e)||e===e.trim(),B={}.toString();function G(){return new H}class H extends V{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,s)=>{if(!s.spec.coerce||s.isType(e))return e;if(Array.isArray(e))return e;const r=null!=e&&e.toString?e.toString():e;return r===B?e:r}))}))}required(e){return super.required(e).withMutation((t=>t.test({message:e||v.required,name:"required",skipAbsent:!0,test:e=>!!e.length})))}notRequired(){return super.notRequired().withMutation((e=>(e.tests=e.tests.filter((e=>"required"!==e.OPTIONS.name)),e)))}length(e,t=g.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=g.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=g.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let s,r,n=!1;return t&&("object"==typeof t?({excludeEmptyString:n=!1,message:s,name:r}=t):s=t),this.test({name:r||"matches",message:s||g.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&n||-1!==t.search(e)})}email(e=g.email){return this.matches(Z,{name:"email",message:e,excludeEmptyString:!0})}url(e=g.url){return this.matches(Y,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=g.uuid){return this.matches(L,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,s,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:s}=e):r=e),this.matches(K,{name:"datetime",message:r||g.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||g.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const s=R(e);return!!s&&!!s.z}}).test({name:"datetime_precision",message:r||g.datetime_precision,params:{precision:s},skipAbsent:!0,test:e=>{if(!e||null==s)return!0;const t=R(e);return!!t&&t.precision===s}})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(e=g.trim){return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:J})}lowercase(e=g.lowercase){return this.transform((e=>S(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>S(e)||e===e.toLowerCase()})}uppercase(e=g.uppercase){return this.transform((e=>S(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>S(e)||e===e.toUpperCase()})}}G.prototype=H.prototype;let Q=new Date("");class W extends V{constructor(){super({type:"date",check(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),this.withMutation((()=>{this.transform(((e,t,s)=>!s.spec.coerce||s.isType(e)||null===e?e:(e=function(e){const t=R(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let s=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(s=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(s=0-s)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+s,t.second,t.millisecond)}(e),isNaN(e)?W.INVALID_DATE:new Date(e))))}))}prepareParam(e,t){let s;if(E.isRef(e))s=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);s=r}return s}min(e,t=b.min){let s=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(s)}})}max(e,t=b.max){let s=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(s)}})}}function X(e,t){let s=1/0;return e.some(((e,r)=>{var n;if(null!=(n=t.path)&&n.includes(e))return s=r,!0})),s}function ee(e){return(t,s)=>X(e,t)-X(e,s)}W.INVALID_DATE=Q,W.prototype;const te=(e,t,s)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return s.isType(r)?r:e};function se(e){if("fields"in e){const t={};for(const[s,r]of Object.entries(e.fields))t[s]=se(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=se(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(se)}):"optional"in e?e.optional():e}let re=e=>"[object Object]"===Object.prototype.toString.call(e);function ne(e,t){let s=Object.keys(e.fields);return Object.keys(t).filter((e=>-1===s.indexOf(e)))}const ie=ee([]);function ae(e){return new oe(e)}class oe extends V{constructor(e){super({type:"object",check:e=>re(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=ie,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{e&&this.shape(e)}))}_cast(e,t={}){var s;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let n=this.fields,i=null!=(s=t.stripUnknown)?s:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(r).filter((e=>!this._nodes.includes(e)))),o={},l=Object.assign({},t,{parent:o,__validating:t.__validating||!1}),u=!1;for(const e of a){let s=n[e],a=e in r;if(s){let n,i=r[e];l.path=(t.path?`${t.path}.`:"")+e,s=s.resolve({value:i,context:t.context,parent:o});let a=s instanceof V?s.spec:void 0,c=null==a?void 0:a.strict;if(null!=a&&a.strip){u=u||e in r;continue}n=t.__validating&&c?r[e]:s.cast(r[e],l),void 0!==n&&(o[e]=n)}else a&&!i&&(o[e]=r[e]);a===e in o&&o[e]===r[e]||(u=!0)}return u?o:r}_validate(e,t={},s,r){let{from:n=[],originalValue:i=e,recursive:a=this.spec.recursive}=t;t.from=[{schema:this,value:i},...n],t.__validating=!0,t.originalValue=i,super._validate(e,t,s,((e,n)=>{if(!a||!re(n))return void r(e,n);i=i||n;let o=[];for(let e of this._nodes){let s=this.fields[e];s&&!E.isRef(s)&&o.push(s.asNestedTest({options:t,key:e,parent:n,parentPath:t.path,originalParent:i}))}this.runTests({tests:o,value:n,originalValue:i,options:t},s,(t=>{r(t.sort(this._sortErrors).concat(e),n)}))}))}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),s=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=s[e];s[e]=void 0===r?t:r}return t.withMutation((t=>t.setFields(s,[...this._excludedEdges,...e._excludedEdges])))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach((s=>{var r;const n=this.fields[s];let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[s]})),t[s]=n&&"getDefault"in n?n.getDefault(i):void 0})),t}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=function(t,r=[]){let n=[],i=new Set,a=new Set(r.map((([e,t])=>`${e}-${t}`)));function o(t,s){let r=e.split(t)[0];i.add(r),a.has(`${s}-${r}`)||n.push([s,r])}for(const e of Object.keys(t)){let s=t[e];i.add(e),E.isRef(s)&&s.isSibling?o(s.path,e):T(s)&&"deps"in s&&s.deps.forEach((t=>o(t,e)))}return s.array(Array.from(i),n).reverse()}(t,r),n._sortErrors=ee(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(e,t=[]){return this.clone().withMutation((s=>{let r=s._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...s._excludedEdges,...t]),s.setFields(Object.assign(s.fields,e),r)}))}partial(){const e={};for(const[t,s]of Object.entries(this.fields))e[t]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(e)}deepPartial(){return se(this)}pick(e){const t={};for(const s of e)this.fields[s]&&(t[s]=this.fields[s]);return this.setFields(t,this._excludedEdges.filter((([t,s])=>e.includes(t)&&e.includes(s))))}omit(e){const t=[];for(const s of Object.keys(this.fields))e.includes(s)||t.push(s);return this.pick(t)}from(t,s,r){let n=e.getter(t,!0);return this.transform((i=>{if(!i)return i;let a=i;return((t,s)=>{const r=[...e.normalizePath(s)];if(1===r.length)return r[0]in t;let n=r.pop(),i=e.getter(e.join(r),!0)(t);return!(!i||!(n in i))})(i,t)&&(a=Object.assign({},i),r||delete a[t],a[s]=n(i)),a}))}json(){return this.transform(te)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||_.exact,test(e){if(null==e)return!0;const t=ne(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=_.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const s=ne(this.schema,t);return!e||0===s.length||this.createError({params:{unknown:s.join(", ")}})}});return s.spec.noUnknown=e,s}unknown(e=!0,t=_.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>{if(!t)return t;const s={};for(const r of Object.keys(t))s[e(r)]=t[r];return s}))}camelCase(){return this.transformKeys(t.camelCase)}snakeCase(){return this.transformKeys(t.snakeCase)}constantCase(){return this.transformKeys((e=>t.snakeCase(e).toUpperCase()))}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);s.fields={};for(const[n,i]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[n]})),s.fields[n]=i.describe(t)}return s}}function le(e){return new ue(e)}ae.prototype=oe.prototype;class ue extends V{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const s=super._cast(e,t);if(!this._typeCheck(s)||!this.innerType)return s;let r=!1;const n=s.map(((e,s)=>{const n=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${s}]`}));return n!==e&&(r=!0),n}));return r?n:s}_validate(e,t={},s,r){var n;let i=this.innerType,a=null!=(n=t.recursive)?n:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,s,((n,o)=>{var l;if(!a||!i||!this._typeCheck(o))return void r(n,o);let u=new Array(o.length);for(let s=0;s<o.length;s++){var c;u[s]=i.asNestedTest({options:t,index:s,parent:o,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:o,tests:u,originalValue:null!=(l=t.originalValue)?l:e,options:t},s,(e=>r(e.concat(n),o)))}))}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(te)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!T(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+u(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=w.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return t=t||w.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return t=t||w.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default((()=>[])).transform(((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t)))}compact(e){let t=e?(t,s,r)=>!e(t,s,r):e=>!!e;return this.transform((e=>null!=e?e.filter(t):e))}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);if(t.innerType){var r;let n=e;null!=(r=n)&&r.value&&(n=Object.assign({},n,{parent:n.value,value:n.value[0]})),s.innerType=t.innerType.describe(n)}return s}}function ce(e){return new pe(e)}function he(e){try{return e()}catch(e){if(y.isError(e))return Promise.reject(e);throw e}}le.prototype=ue.prototype;class pe{constructor(e){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(e,t={})=>{let s=this.builder(e,t);if(!T(s))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(s=s.optional()),s.resolve(t)},this.builder=e,this.spec={meta:void 0,optional:!1}}clone(e){const t=new pe(this.builder);return t.spec=Object.assign({},this.spec,e),t}optionality(e){return this.clone({optional:e})}optional(){return this.optionality(!0)}resolve(e){return this._resolve(e.value,e)}cast(e,t){return this._resolve(e,t).cast(e,t)}asNestedTest(e){let{key:t,index:s,parent:r,options:n}=e,i=r[null!=s?s:t];return this._resolve(i,Object.assign({},n,{value:i,parent:r})).asNestedTest(e)}validate(e,t){return he((()=>this._resolve(e,t).validate(e,t)))}validateSync(e,t){return this._resolve(e,t).validateSync(e,t)}validateAt(e,t,s){return he((()=>this._resolve(t,s).validateAt(e,t,s)))}validateSyncAt(e,t,s){return this._resolve(t,s).validateSyncAt(e,t,s)}isValid(e,t){try{return this._resolve(e,t).isValid(e,t)}catch(e){if(y.isError(e))return Promise.resolve(!1);throw e}}isValidSync(e,t){return this._resolve(e,t).isValidSync(e,t)}describe(e){return e?this.resolve(e).describe(e):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}}export{ue as ArraySchema,I as BooleanSchema,W as DateSchema,pe as LazySchema,P as MixedSchema,oe as ObjectSchema,V as Schema,H as StringSchema,y as ValidationError,le as array,q as bool,q as boolean,A as getIn,T as isSchema,ce as lazy,z as mixed,ae as object,u as printValue,G as string};
|
|
1
|
+
import{p as e}from"../../_virtual/index6.js";import{t}from"../../_virtual/index5.js";import s from"../../_virtual/index3.js";const r=Object.prototype.toString,n=Error.prototype.toString,i=RegExp.prototype.toString,a="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",o=/^Symbol\((.*)\)(.*)$/;function l(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const s=typeof e;if("number"===s)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===s)return t?`"${e}"`:e;if("function"===s)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===s)return a.call(e).replace(o,"Symbol($1)");const l=r.call(e).slice(8,-1);return"Date"===l?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===l||e instanceof Error?"["+n.call(e)+"]":"RegExp"===l?i.call(e):null}function u(e,t){let s=l(e,t);return null!==s?s:JSON.stringify(e,(function(e,s){let r=l(this[e],t);return null!==r?r:s}),2)}function c(e){return null==e?[]:[].concat(e)}let h,p,d,f=/\$\{\s*(\w+)\s*\}/g;h=Symbol.toStringTag;class m{constructor(e,t,s,r){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[h]="Error",this.name="ValidationError",this.value=t,this.path=s,this.type=r,this.errors=[],this.inner=[],c(e).forEach((e=>{if(y.isError(e)){this.errors.push(...e.errors);const t=e.inner.length?e.inner:[e];this.inner.push(...t)}else this.errors.push(e)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}p=Symbol.hasInstance,d=Symbol.toStringTag;class y extends Error{static formatError(e,t){const s=t.label||t.path||"this";return t=Object.assign({},t,{path:s,originalPath:t.path}),"string"==typeof e?e.replace(f,((e,s)=>u(t[s]))):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,s,r,n){const i=new m(e,t,s,r);if(n)return i;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[d]="Error",this.name=i.name,this.message=i.message,this.type=i.type,this.value=i.value,this.path=i.path,this.errors=i.errors,this.inner=i.inner,Error.captureStackTrace&&Error.captureStackTrace(this,y)}static[p](e){return m[Symbol.hasInstance](e)||super[Symbol.hasInstance](e)}}let v={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:s,originalValue:r})=>{const n=null!=r&&r!==s?` (cast from the value \`${u(r,!0)}\`).`:".";return"mixed"!==t?`${e} must be a \`${t}\` type, but the final value was: \`${u(s,!0)}\``+n:`${e} must match the configured type. The validated value was: \`${u(s,!0)}\``+n}},g={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},b={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},F={isValue:"${path} field must be ${value}"},_={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},w={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},x={notType:e=>{const{path:t,value:s,spec:r}=e,n=r.types.length;if(Array.isArray(s)){if(s.length<n)return`${t} tuple value has too few items, expected a length of ${n} but got ${s.length} for value: \`${u(s,!0)}\``;if(s.length>n)return`${t} tuple value has too many items, expected a length of ${n} but got ${s.length} for value: \`${u(s,!0)}\``}return y.formatError(v.notType,e)}};Object.assign(Object.create(null),{mixed:v,string:g,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:b,object:_,array:w,boolean:F,tuple:x});const T=e=>e&&e.__isYupSchema__;class ${static fromOptions(e,t){if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:s,then:r,otherwise:n}=t,i="function"==typeof s?s:(...e)=>e.every((e=>e===s));return new $(e,((e,t)=>{var s;let a=i(...e)?r:n;return null!=(s=null==a?void 0:a(t))?s:t}))}constructor(e,t){this.fn=void 0,this.refs=e,this.refs=e,this.fn=t}resolve(e,t){let s=this.refs.map((e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context))),r=this.fn(s,e,t);if(void 0===r||r===e)return e;if(!T(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}const O="$",k=".";class E{constructor(t,s={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof t)throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),""===t)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===O,this.isValue=this.key[0]===k,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?O:this.isValue?k:"";this.path=this.key.slice(r.length),this.getter=this.path&&e.getter(this.path,!0),this.map=s.map}getValue(e,t,s){let r=this.isContext?s:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}E.prototype.__isYupRef=!0;const S=e=>null==e;function j(e){function t({value:t,path:s="",options:r,originalValue:n,schema:i},a,o){const{name:l,test:u,params:c,message:h,skipAbsent:p}=e;let{parent:d,context:f,abortEarly:m=i.spec.abortEarly,disableStackTrace:v=i.spec.disableStackTrace}=r;function g(e){return E.isRef(e)?e.getValue(t,d,f):e}function b(e={}){const r=Object.assign({value:t,originalValue:n,label:i.spec.label,path:e.path||s,spec:i.spec,disableStackTrace:e.disableStackTrace||v},c,e.params);for(const e of Object.keys(r))r[e]=g(r[e]);const a=new y(y.formatError(e.message||h,r),t,r.path,e.type||l,r.disableStackTrace);return a.params=r,a}const F=m?a:o;let _={path:s,parent:d,type:l,from:r.from,createError:b,resolve:g,options:r,originalValue:n,schema:i};const w=e=>{y.isError(e)?F(e):e?o(null):F(b())},x=e=>{y.isError(e)?F(e):a(e)};if(p&&S(t))return w(!0);let T;try{var $;if(T=u.call(_,t,_),"function"==typeof(null==($=T)?void 0:$.then)){if(r.sync)throw new Error(`Validation test of type: "${_.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(T).then(w,x)}}catch(e){return void x(e)}w(T)}return t.OPTIONS=e,t}function A(t,s,r,n=r){let i,a,o;return s?(e.forEach(s,((e,l,u)=>{let c=l?e.slice(1,e.length-1):e,h="tuple"===(t=t.resolve({context:n,parent:i,value:r})).type,p=u?parseInt(c,10):0;if(t.innerType||h){if(h&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&p>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${e}, in the path: ${s}. because there is no value at that index. `);i=r,r=r&&r[p],t=h?t.spec.types[p]:t.innerType}if(!u){if(!t.fields||!t.fields[c])throw new Error(`The schema does not contain the path: ${s}. (failed at: ${o} which is a type: "${t.type}")`);i=r,r=r&&r[c],t=t.fields[c]}a=c,o=l?"["+e+"]":"."+e})),{schema:t,parent:i,parentPath:a}):{parent:i,parentPath:s,schema:t}}class D extends Set{describe(){const e=[];for(const t of this.values())e.push(E.isRef(t)?t.describe():t);return e}resolveAll(e){let t=[];for(const s of this.values())t.push(e(s));return t}clone(){return new D(this.values())}merge(e,t){const s=this.clone();return e.forEach((e=>s.add(e))),t.forEach((e=>s.delete(e))),s}}function C(e,t=new Map){if(T(e)||!e||"object"!=typeof e)return e;if(t.has(e))return t.get(e);let s;if(e instanceof Date)s=new Date(e.getTime()),t.set(e,s);else if(e instanceof RegExp)s=new RegExp(e),t.set(e,s);else if(Array.isArray(e)){s=new Array(e.length),t.set(e,s);for(let r=0;r<e.length;r++)s[r]=C(e[r],t)}else if(e instanceof Map){s=new Map,t.set(e,s);for(const[r,n]of e.entries())s.set(r,C(n,t))}else if(e instanceof Set){s=new Set,t.set(e,s);for(const r of e)s.add(C(r,t))}else{if(!(e instanceof Object))throw Error(`Unable to clone ${e}`);s={},t.set(e,s);for(const[r,n]of Object.entries(e))s[r]=C(n,t)}return s}class V{constructor(e){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new D,this._blacklist=new D,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(v.notType)})),this.type=e.type,this._typeCheck=e.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},null==e?void 0:e.spec),this.withMutation((e=>{e.nonNullable()}))}get _type(){return this.type}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeCheck=this._typeCheck,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.internalTests=Object.assign({},this.internalTests),t.exclusiveTests=Object.assign({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=C(Object.assign({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let s=e(this);return this._mutate=t,s}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,s=e.clone();const r=Object.assign({},t.spec,s.spec);return s.spec=r,s.internalTests=Object.assign({},t.internalTests,s.internalTests),s._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),s._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),s.tests=t.tests,s.exclusiveTests=t.exclusiveTests,s.withMutation((t=>{e.tests.forEach((e=>{t.test(e.OPTIONS)}))})),s.transforms=[...t.transforms,...s.transforms],s}isType(e){return null==e?!(!this.spec.nullable||null!==e)||!(!this.spec.optional||void 0!==e):this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let s=t.conditions;t=t.clone(),t.conditions=[],t=s.reduce(((t,s)=>s.resolve(t,e)),t),t=t.resolve(e)}return t}resolveOptions(e){var t,s,r,n;return Object.assign({},e,{from:e.from||[],strict:null!=(t=e.strict)?t:this.spec.strict,abortEarly:null!=(s=e.abortEarly)?s:this.spec.abortEarly,recursive:null!=(r=e.recursive)?r:this.spec.recursive,disableStackTrace:null!=(n=e.disableStackTrace)?n:this.spec.disableStackTrace})}cast(e,t={}){let s=this.resolve(Object.assign({value:e},t)),r="ignore-optionality"===t.assert,n=s._cast(e,t);if(!1!==t.assert&&!s.isType(n)){if(r&&S(n))return n;let i=u(e),a=u(n);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${s.type}". \n\nattempted value: ${i} \n`+(a!==i?`result of cast: ${a}`:""))}return n}_cast(e,t){let s=void 0===e?e:this.transforms.reduce(((t,s)=>s.call(this,t,e,this)),e);return void 0===s&&(s=this.getDefault(t)),s}_validate(e,t={},s,r){let{path:n,originalValue:i=e,strict:a=this.spec.strict}=t,o=e;a||(o=this._cast(o,Object.assign({assert:!1},t)));let l=[];for(let e of Object.values(this.internalTests))e&&l.push(e);this.runTests({path:n,value:o,originalValue:i,options:t,tests:l},s,(e=>{if(e.length)return r(e,o);this.runTests({path:n,value:o,originalValue:i,options:t,tests:this.tests},s,r)}))}runTests(e,t,s){let r=!1,{tests:n,value:i,originalValue:a,path:o,options:l}=e,u=e=>{r||(r=!0,t(e,i))},c=e=>{r||(r=!0,s(e,i))},h=n.length,p=[];if(!h)return c([]);let d={value:i,originalValue:a,path:o,options:l,schema:this};for(let e=0;e<n.length;e++){(0,n[e])(d,u,(function(e){e&&(Array.isArray(e)?p.push(...e):p.push(e)),--h<=0&&c(p)}))}}asNestedTest({key:e,index:t,parent:s,parentPath:r,originalParent:n,options:i}){const a=null!=e?e:t;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const o="number"==typeof a;let l=s[a];const u=Object.assign({},i,{strict:!0,parent:s,value:l,originalValue:n[a],key:void 0,[o?"index":"key"]:a,path:o||a.includes(".")?`${r||""}[${o?a:`"${a}"`}]`:(r?`${r}.`:"")+e});return(e,t,s)=>this.resolve(u)._validate(l,u,t,s)}validate(e,t){var s;let r=this.resolve(Object.assign({},t,{value:e})),n=null!=(s=null==t?void 0:t.disableStackTrace)?s:r.spec.disableStackTrace;return new Promise(((s,i)=>r._validate(e,t,((e,t)=>{y.isError(e)&&(e.value=t),i(e)}),((e,t)=>{e.length?i(new y(e,t,void 0,void 0,n)):s(t)}))))}validateSync(e,t){var s;let r,n=this.resolve(Object.assign({},t,{value:e})),i=null!=(s=null==t?void 0:t.disableStackTrace)?s:n.spec.disableStackTrace;return n._validate(e,Object.assign({},t,{sync:!0}),((e,t)=>{throw y.isError(e)&&(e.value=t),e}),((t,s)=>{if(t.length)throw new y(t,e,void 0,void 0,i);r=s})),r}isValid(e,t){return this.validate(e,t).then((()=>!0),(e=>{if(y.isError(e))return!1;throw e}))}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(y.isError(e))return!1;throw e}}_getDefault(e){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this,e):C(t)}getDefault(e){return this.resolve(e||{})._getDefault(e)}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){return this.clone({strict:e})}nullability(e,t){const s=this.clone({nullable:e});return s.internalTests.nullable=j({message:t,name:"nullable",test(e){return null!==e||this.schema.spec.nullable}}),s}optionality(e,t){const s=this.clone({optional:e});return s.internalTests.optionality=j({message:t,name:"optionality",test(e){return void 0!==e||this.schema.spec.optional}}),s}optional(){return this.optionality(!0)}defined(e=v.defined){return this.optionality(!1,e)}nullable(){return this.nullability(!0)}nonNullable(e=v.notNull){return this.nullability(!1,e)}required(e=v.required){return this.clone().withMutation((t=>t.nonNullable(e).defined(e)))}notRequired(){return this.clone().withMutation((e=>e.nullable().optional()))}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=v.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let s=this.clone(),r=j(t),n=t.exclusive||t.name&&!0===s.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(s.exclusiveTests[t.name]=!!t.exclusive),s.tests=s.tests.filter((e=>{if(e.OPTIONS.name===t.name){if(n)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0})),s.tests.push(r),s}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let s=this.clone(),r=c(e).map((e=>new E(e)));return r.forEach((e=>{e.isSibling&&s.deps.push(e.key)})),s.conditions.push("function"==typeof t?new $(r,t):$.fromOptions(r,t)),s}typeError(e){let t=this.clone();return t.internalTests.typeError=j({message:e,name:"typeError",skipAbsent:!0,test(e){return!!this.schema._typeCheck(e)||this.createError({params:{type:this.schema.type}})}}),t}oneOf(e,t=v.oneOf){let s=this.clone();return e.forEach((e=>{s._whitelist.add(e),s._blacklist.delete(e)})),s.internalTests.whiteList=j({message:t,name:"oneOf",skipAbsent:!0,test(e){let t=this.schema._whitelist,s=t.resolveAll(this.resolve);return!!s.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:s}})}}),s}notOneOf(e,t=v.notOneOf){let s=this.clone();return e.forEach((e=>{s._blacklist.add(e),s._whitelist.delete(e)})),s.internalTests.blacklist=j({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,s=t.resolveAll(this.resolve);return!s.includes(e)||this.createError({params:{values:Array.from(t).join(", "),resolved:s}})}}),s}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(e){const t=(e?this.resolve(e):this).clone(),{label:s,meta:r,optional:n,nullable:i}=t.spec;return{meta:r,label:s,optional:n,nullable:i,default:t.getDefault(e),type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map((e=>({name:e.OPTIONS.name,params:e.OPTIONS.params}))).filter(((e,t,s)=>s.findIndex((t=>t.name===e.name))===t))}}}V.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])V.prototype[`${e}At`]=function(t,s,r={}){const{parent:n,parentPath:i,schema:a}=A(this,t,s,r.context);return a[e](n&&n[i],Object.assign({},r,{parent:n,path:t}))};for(const e of["equals","is"])V.prototype[e]=V.prototype.oneOf;for(const e of["not","nope"])V.prototype[e]=V.prototype.notOneOf;const N=()=>!0;function z(e){return new P(e)}class P extends V{constructor(e){super("function"==typeof e?{type:"mixed",check:e}:Object.assign({type:"mixed",check:N},e))}}function q(){return new I}z.prototype=P.prototype;class I extends V{constructor(){super({type:"boolean",check:e=>(e instanceof Boolean&&(e=e.valueOf()),"boolean"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,s)=>{if(s.spec.coerce&&!s.isType(e)){if(/^(true|1)$/i.test(String(e)))return!0;if(/^(false|0)$/i.test(String(e)))return!1}return e}))}))}isTrue(e=F.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"true"},test:e=>S(e)||!0===e})}isFalse(e=F.isValue){return this.test({message:e,name:"is-value",exclusive:!0,params:{value:"false"},test:e=>S(e)||!1===e})}default(e){return super.default(e)}defined(e){return super.defined(e)}optional(){return super.optional()}required(e){return super.required(e)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(e){return super.nonNullable(e)}strip(e){return super.strip(e)}}q.prototype=I.prototype;const M=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function R(e){var t,s;const r=M.exec(e);return r?{year:U(r[1]),month:U(r[2],1)-1,day:U(r[3],1),hour:U(r[4]),minute:U(r[5]),second:U(r[6]),millisecond:r[7]?U(r[7].substring(0,3)):0,precision:null!=(t=null==(s=r[7])?void 0:s.length)?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:U(r[10]),minuteOffset:U(r[11])}:null}function U(e,t=0){return Number(e)||t}let Z=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Y=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(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:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,K=new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),J=e=>S(e)||e===e.trim(),B={}.toString();function G(){return new H}class H extends V{constructor(){super({type:"string",check:e=>(e instanceof String&&(e=e.valueOf()),"string"==typeof e)}),this.withMutation((()=>{this.transform(((e,t,s)=>{if(!s.spec.coerce||s.isType(e))return e;if(Array.isArray(e))return e;const r=null!=e&&e.toString?e.toString():e;return r===B?e:r}))}))}required(e){return super.required(e).withMutation((t=>t.test({message:e||v.required,name:"required",skipAbsent:!0,test:e=>!!e.length})))}notRequired(){return super.notRequired().withMutation((e=>(e.tests=e.tests.filter((e=>"required"!==e.OPTIONS.name)),e)))}length(e,t=g.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t=g.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t=g.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}matches(e,t){let s,r,n=!1;return t&&("object"==typeof t?({excludeEmptyString:n=!1,message:s,name:r}=t):s=t),this.test({name:r||"matches",message:s||g.matches,params:{regex:e},skipAbsent:!0,test:t=>""===t&&n||-1!==t.search(e)})}email(e=g.email){return this.matches(Z,{name:"email",message:e,excludeEmptyString:!0})}url(e=g.url){return this.matches(Y,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=g.uuid){return this.matches(L,{name:"uuid",message:e,excludeEmptyString:!1})}datetime(e){let t,s,r="";return e&&("object"==typeof e?({message:r="",allowOffset:t=!1,precision:s}=e):r=e),this.matches(K,{name:"datetime",message:r||g.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||g.datetime_offset,params:{allowOffset:t},skipAbsent:!0,test:e=>{if(!e||t)return!0;const s=R(e);return!!s&&!!s.z}}).test({name:"datetime_precision",message:r||g.datetime_precision,params:{precision:s},skipAbsent:!0,test:e=>{if(!e||null==s)return!0;const t=R(e);return!!t&&t.precision===s}})}ensure(){return this.default("").transform((e=>null===e?"":e))}trim(e=g.trim){return this.transform((e=>null!=e?e.trim():e)).test({message:e,name:"trim",test:J})}lowercase(e=g.lowercase){return this.transform((e=>S(e)?e:e.toLowerCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>S(e)||e===e.toLowerCase()})}uppercase(e=g.uppercase){return this.transform((e=>S(e)?e:e.toUpperCase())).test({message:e,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>S(e)||e===e.toUpperCase()})}}G.prototype=H.prototype;let Q=new Date("");class W extends V{constructor(){super({type:"date",check(e){return t=e,"[object Date]"===Object.prototype.toString.call(t)&&!isNaN(e.getTime());var t}}),this.withMutation((()=>{this.transform(((e,t,s)=>!s.spec.coerce||s.isType(e)||null===e?e:(e=function(e){const t=R(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(void 0===t.z&&void 0===t.plusMinus)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let s=0;return"Z"!==t.z&&void 0!==t.plusMinus&&(s=60*t.hourOffset+t.minuteOffset,"+"===t.plusMinus&&(s=0-s)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+s,t.second,t.millisecond)}(e),isNaN(e)?W.INVALID_DATE:new Date(e))))}))}prepareParam(e,t){let s;if(E.isRef(e))s=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);s=r}return s}min(e,t=b.min){let s=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(e){return e>=this.resolve(s)}})}max(e,t=b.max){let s=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(e){return e<=this.resolve(s)}})}}function X(e,t){let s=1/0;return e.some(((e,r)=>{var n;if(null!=(n=t.path)&&n.includes(e))return s=r,!0})),s}function ee(e){return(t,s)=>X(e,t)-X(e,s)}W.INVALID_DATE=Q,W.prototype;const te=(e,t,s)=>{if("string"!=typeof e)return e;let r=e;try{r=JSON.parse(e)}catch(e){}return s.isType(r)?r:e};function se(e){if("fields"in e){const t={};for(const[s,r]of Object.entries(e.fields))t[s]=se(r);return e.setFields(t)}if("array"===e.type){const t=e.optional();return t.innerType&&(t.innerType=se(t.innerType)),t}return"tuple"===e.type?e.optional().clone({types:e.spec.types.map(se)}):"optional"in e?e.optional():e}let re=e=>"[object Object]"===Object.prototype.toString.call(e);function ne(e,t){let s=Object.keys(e.fields);return Object.keys(t).filter((e=>-1===s.indexOf(e)))}const ie=ee([]);function ae(e){return new oe(e)}class oe extends V{constructor(e){super({type:"object",check:e=>re(e)||"function"==typeof e}),this.fields=Object.create(null),this._sortErrors=ie,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{e&&this.shape(e)}))}_cast(e,t={}){var s;let r=super._cast(e,t);if(void 0===r)return this.getDefault(t);if(!this._typeCheck(r))return r;let n=this.fields,i=null!=(s=t.stripUnknown)?s:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(r).filter((e=>!this._nodes.includes(e)))),o={},l=Object.assign({},t,{parent:o,__validating:t.__validating||!1}),u=!1;for(const e of a){let s=n[e],a=e in r;if(s){let n,i=r[e];l.path=(t.path?`${t.path}.`:"")+e,s=s.resolve({value:i,context:t.context,parent:o});let a=s instanceof V?s.spec:void 0,c=null==a?void 0:a.strict;if(null!=a&&a.strip){u=u||e in r;continue}n=t.__validating&&c?r[e]:s.cast(r[e],l),void 0!==n&&(o[e]=n)}else a&&!i&&(o[e]=r[e]);a===e in o&&o[e]===r[e]||(u=!0)}return u?o:r}_validate(e,t={},s,r){let{from:n=[],originalValue:i=e,recursive:a=this.spec.recursive}=t;t.from=[{schema:this,value:i},...n],t.__validating=!0,t.originalValue=i,super._validate(e,t,s,((e,n)=>{if(!a||!re(n))return void r(e,n);i=i||n;let o=[];for(let e of this._nodes){let s=this.fields[e];s&&!E.isRef(s)&&o.push(s.asNestedTest({options:t,key:e,parent:n,parentPath:t.path,originalParent:i}))}this.runTests({tests:o,value:n,originalValue:i,options:t},s,(t=>{r(t.sort(this._sortErrors).concat(e),n)}))}))}clone(e){const t=super.clone(e);return t.fields=Object.assign({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),s=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=s[e];s[e]=void 0===r?t:r}return t.withMutation((t=>t.setFields(s,[...this._excludedEdges,...e._excludedEdges])))}_getDefault(e){if("default"in this.spec)return super._getDefault(e);if(!this._nodes.length)return;let t={};return this._nodes.forEach((s=>{var r;const n=this.fields[s];let i=e;null!=(r=i)&&r.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[s]})),t[s]=n&&"getDefault"in n?n.getDefault(i):void 0})),t}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=function(t,r=[]){let n=[],i=new Set,a=new Set(r.map((([e,t])=>`${e}-${t}`)));function o(t,s){let r=e.split(t)[0];i.add(r),a.has(`${s}-${r}`)||n.push([s,r])}for(const e of Object.keys(t)){let s=t[e];i.add(e),E.isRef(s)&&s.isSibling?o(s.path,e):T(s)&&"deps"in s&&s.deps.forEach((t=>o(t,e)))}return s.array(Array.from(i),n).reverse()}(t,r),n._sortErrors=ee(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(e,t=[]){return this.clone().withMutation((s=>{let r=s._excludedEdges;return t.length&&(Array.isArray(t[0])||(t=[t]),r=[...s._excludedEdges,...t]),s.setFields(Object.assign(s.fields,e),r)}))}partial(){const e={};for(const[t,s]of Object.entries(this.fields))e[t]="optional"in s&&s.optional instanceof Function?s.optional():s;return this.setFields(e)}deepPartial(){return se(this)}pick(e){const t={};for(const s of e)this.fields[s]&&(t[s]=this.fields[s]);return this.setFields(t,this._excludedEdges.filter((([t,s])=>e.includes(t)&&e.includes(s))))}omit(e){const t=[];for(const s of Object.keys(this.fields))e.includes(s)||t.push(s);return this.pick(t)}from(t,s,r){let n=e.getter(t,!0);return this.transform((i=>{if(!i)return i;let a=i;return((t,s)=>{const r=[...e.normalizePath(s)];if(1===r.length)return r[0]in t;let n=r.pop(),i=e.getter(e.join(r),!0)(t);return!(!i||!(n in i))})(i,t)&&(a=Object.assign({},i),r||delete a[t],a[s]=n(i)),a}))}json(){return this.transform(te)}exact(e){return this.test({name:"exact",exclusive:!0,message:e||_.exact,test(e){if(null==e)return!0;const t=ne(this.schema,e);return 0===t.length||this.createError({params:{properties:t.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(e=!0,t=_.noUnknown){"boolean"!=typeof e&&(t=e,e=!0);let s=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const s=ne(this.schema,t);return!e||0===s.length||this.createError({params:{unknown:s.join(", ")}})}});return s.spec.noUnknown=e,s}unknown(e=!0,t=_.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform((t=>{if(!t)return t;const s={};for(const r of Object.keys(t))s[e(r)]=t[r];return s}))}camelCase(){return this.transformKeys(t.camelCase)}snakeCase(){return this.transformKeys(t.snakeCase)}constantCase(){return this.transformKeys((e=>t.snakeCase(e).toUpperCase()))}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);s.fields={};for(const[n,i]of Object.entries(t.fields)){var r;let t=e;null!=(r=t)&&r.value&&(t=Object.assign({},t,{parent:t.value,value:t.value[n]})),s.fields[n]=i.describe(t)}return s}}function le(e){return new ue(e)}ae.prototype=oe.prototype;class ue extends V{constructor(e){super({type:"array",spec:{types:e},check:e=>Array.isArray(e)}),this.innerType=void 0,this.innerType=e}_cast(e,t){const s=super._cast(e,t);if(!this._typeCheck(s)||!this.innerType)return s;let r=!1;const n=s.map(((e,s)=>{const n=this.innerType.cast(e,Object.assign({},t,{path:`${t.path||""}[${s}]`}));return n!==e&&(r=!0),n}));return r?n:s}_validate(e,t={},s,r){var n;let i=this.innerType,a=null!=(n=t.recursive)?n:this.spec.recursive;null!=t.originalValue&&t.originalValue,super._validate(e,t,s,((n,o)=>{var l;if(!a||!i||!this._typeCheck(o))return void r(n,o);let u=new Array(o.length);for(let s=0;s<o.length;s++){var c;u[s]=i.asNestedTest({options:t,index:s,parent:o,parentPath:t.path,originalParent:null!=(c=t.originalValue)?c:e})}this.runTests({value:o,tests:u,originalValue:null!=(l=t.originalValue)?l:e,options:t},s,(e=>r(e.concat(n),o)))}))}clone(e){const t=super.clone(e);return t.innerType=this.innerType,t}json(){return this.transform(te)}concat(e){let t=super.concat(e);return t.innerType=this.innerType,e.innerType&&(t.innerType=t.innerType?t.innerType.concat(e.innerType):e.innerType),t}of(e){let t=this.clone();if(!T(e))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+u(e));return t.innerType=e,t.spec=Object.assign({},t.spec,{types:e}),t}length(e,t=w.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},skipAbsent:!0,test(t){return t.length===this.resolve(e)}})}min(e,t){return t=t||w.min,this.test({message:t,name:"min",exclusive:!0,params:{min:e},skipAbsent:!0,test(t){return t.length>=this.resolve(e)}})}max(e,t){return t=t||w.max,this.test({message:t,name:"max",exclusive:!0,params:{max:e},skipAbsent:!0,test(t){return t.length<=this.resolve(e)}})}ensure(){return this.default((()=>[])).transform(((e,t)=>this._typeCheck(e)?e:null==t?[]:[].concat(t)))}compact(e){let t=e?(t,s,r)=>!e(t,s,r):e=>!!e;return this.transform((e=>null!=e?e.filter(t):e))}describe(e){const t=(e?this.resolve(e):this).clone(),s=super.describe(e);if(t.innerType){var r;let n=e;null!=(r=n)&&r.value&&(n=Object.assign({},n,{parent:n.value,value:n.value[0]})),s.innerType=t.innerType.describe(n)}return s}}function ce(e){return new pe(e)}function he(e){try{return e()}catch(e){if(y.isError(e))return Promise.reject(e);throw e}}le.prototype=ue.prototype;class pe{constructor(e){this.type="lazy",this.__isYupSchema__=!0,this.spec=void 0,this._resolve=(e,t={})=>{let s=this.builder(e,t);if(!T(s))throw new TypeError("lazy() functions must return a valid schema");return this.spec.optional&&(s=s.optional()),s.resolve(t)},this.builder=e,this.spec={meta:void 0,optional:!1}}clone(e){const t=new pe(this.builder);return t.spec=Object.assign({},this.spec,e),t}optionality(e){return this.clone({optional:e})}optional(){return this.optionality(!0)}resolve(e){return this._resolve(e.value,e)}cast(e,t){return this._resolve(e,t).cast(e,t)}asNestedTest(e){let{key:t,index:s,parent:r,options:n}=e,i=r[null!=s?s:t];return this._resolve(i,Object.assign({},n,{value:i,parent:r})).asNestedTest(e)}validate(e,t){return he((()=>this._resolve(e,t).validate(e,t)))}validateSync(e,t){return this._resolve(e,t).validateSync(e,t)}validateAt(e,t,s){return he((()=>this._resolve(t,s).validateAt(e,t,s)))}validateSyncAt(e,t,s){return this._resolve(t,s).validateSyncAt(e,t,s)}isValid(e,t){try{return this._resolve(e,t).isValid(e,t)}catch(e){if(y.isError(e))return Promise.resolve(!1);throw e}}isValidSync(e,t){return this._resolve(e,t).isValidSync(e,t)}describe(e){return e?this.resolve(e).describe(e):{type:"lazy",meta:this.spec.meta,label:void 0}}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}}export{ue as ArraySchema,I as BooleanSchema,W as DateSchema,pe as LazySchema,P as MixedSchema,oe as ObjectSchema,V as Schema,H as StringSchema,y as ValidationError,le as array,q as bool,q as boolean,A as getIn,T as isSchema,ce as lazy,z as mixed,ae as object,u as printValue,G as string};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as e}from"../../../_virtual/jsx-runtime.js";import{useState as t,useEffect as i}from"react";import{useFormikContext as n}from"../../../node_modules/formik/dist/formik.esm.js";import{d as
|
|
1
|
+
import{j as e}from"../../../_virtual/jsx-runtime.js";import{useState as t,useEffect as i}from"react";import{useFormikContext as n}from"../../../node_modules/formik/dist/formik.esm.js";import{d as s}from"../../../_virtual/index.js";import o from"./InfoForm.module.scss.js";import l from"../../constants/regex.js";import r from"../Tooltip/Tooltip.js";import a from"../../assets/icons/DeleteIcon.svg.js";import d from"../../assets/icons/EditIcon.svg.js";import c from"../../assets/icons/deleteOutlinedIcon.svg.js";import m from"../SVGLoader/SVGLoader.js";import v from"../dialog/index.js";import{tagsTableHeaders as p}from"../../constants/index.js";import u from"../table/tags-table.js";const g=({readOnly:g})=>{var x,h,j,D,f;const[b,C]=t([]),[y,I]=t(),[N,k]=t(""),[A,w]=t(""),[T,O]=t(""),{values:S,setFieldValue:B,errors:L}=n(),[_,E]=t({}),[z,W]=t({}),[P,R]=t(null),[V,F]=t(null),[q,M]=t(!1),[$,G]=t(!1);i((()=>{if(S&&S.components&&S.components.securitySchemes){const e=Object.keys(S.components.securitySchemes);if(e.length){const t=S.components.securitySchemes[e[0]].scheme||S.components.securitySchemes[e[0]].type;k(t&&"public"==t.toLowerCase()?"Keyless":t)}}}),[]),i((()=>{I(K(b))}),[b]),i((()=>{S.tags&&S.tags.length&&C(S.tags)}),[S.tags]);const H=(e,t,i)=>{const n=b.map(((n,s)=>s===i?Object.assign(Object.assign({},n),{[e]:t}):n));C(n)},K=t=>t.map(((t,i)=>{var n,c,v,p,u,x,h,j,D,f,b,C,y,I,N,k,L,P,V,q;return{id:i,tagName:t.name,description:e.jsxs("div",{className:o.paramDescContainer,children:[e.jsx(r,{allowHTML:!0,disabled:(null===(n=S.tags[i].description)||void 0===n?void 0:n.length)<=12,content:e.jsx("div",{style:{padding:"0.625rem"},children:S.tags[i].description}),arrowWithBorder:!0,placement:"bottom-end",type:"function",delay:[0,0],onShow:()=>{var e;return null===(e=z[i])||void 0===e?void 0:e.hide()},children:e.jsxs("p",{style:{alignSelf:"center",fontWeight:600,fontSize:"1rem"},children:[S.tags[i].description?S.tags[i].description.substring(0,12):g&&"-",S.tags[i].description&&S.tags[i].description.length>12?"...":""]})},`${i}-description`),e.jsx(r,{arrowWithBorder:!0,placement:"bottom-end",type:"function",trigger:"click",delay:[0,0],onCreate:e=>W((t=>Object.assign(Object.assign({},t),{[i]:e}))),content:e.jsxs("div",{className:o.editDescTooltipContent,children:[e.jsx("p",{className:o.editDescTooltipContent_header,children:"Description"}),e.jsx(s.TextArea,{placeholder:"Describe tag...",value:t.description,disabled:g,onChange:e=>{(""===e||l.ASCII.test(e))&&H("description",e,i)},maxLength:25}),!g&&e.jsx(s.Button,{className:o.editDescTooltipContent_btn,variant:"outlined",size:"small",onClick:()=>{var e,n;B(`tags[${i}].description`,null===(e=t.description)||void 0===e?void 0:e.trim()),null===(n=z[i])||void 0===n||n.hide()},disabled:!(null===(c=t.description)||void 0===c?void 0:c.trim()),children:"Apply"})]}),children:g||S.tags[i].description?e.jsx(s.Button,{className:o.editDescBtn,variant:"link",color:"action",endIcon:e.jsx(m,{src:d,width:"1.5rem",height:"1.5rem"})}):e.jsx(s.Button,{className:o.editDescBtn,variant:"link",color:"action",endIcon:e.jsx(m,{src:d,width:"1.5rem",height:"1.5rem"}),children:g||S.tags[i].description?"View Description":"Add Description"})})]}),externalDocs:e.jsxs("div",{className:o.paramDescContainer,children:[(null===(v=S.tags[i].externalDocs)||void 0===v?void 0:v.description)&&(null===(p=S.tags[i].externalDocs)||void 0===p?void 0:p.url)&&e.jsxs("a",{className:o.externalDocsLink,href:null===(u=S.tags[i].externalDocs)||void 0===u?void 0:u.url,target:"_blank",style:(null===(x=S.tags[i].externalDocs)||void 0===x?void 0:x.description)?{}:{textDecoration:"none",pointerEvents:"none"},children:[(null===(h=S.tags[i].externalDocs)||void 0===h?void 0:h.description)?null===(D=null===(j=S.tags[i].externalDocs)||void 0===j?void 0:j.description)||void 0===D?void 0:D.substring(0,12):g&&"-",(null===(f=S.tags[i].externalDocs)||void 0===f?void 0:f.description)&&(null===(C=null===(b=S.tags[i].externalDocs)||void 0===b?void 0:b.description)||void 0===C?void 0:C.length)>12?"...":""]}),e.jsx(r,{arrowWithBorder:!0,placement:"bottom-end",type:"function",trigger:"click",delay:[0,0],onCreate:e=>E((t=>Object.assign(Object.assign({},t),{[i]:e}))),content:e.jsxs("div",{className:o.editDescTooltipContent,children:[e.jsx("p",{className:o.editDescTooltipContent_header,children:"External Docs Description"}),e.jsx(s.TextArea,{placeholder:"Describe External Doc...",value:null===(y=t.externalDocs)||void 0===y?void 0:y.description,disabled:g,maxLength:25,onChange:e=>{(""===e||l.ASCII.test(e))&&(H("externalDocs",Object.assign(Object.assign({},t.externalDocs),{description:e}),i),w(e))}}),e.jsx("p",{className:o.editDescTooltipContent_header,children:"External Docs Link"}),e.jsx(s.TextArea,{placeholder:"External Docs Link...",value:null===(I=t.externalDocs)||void 0===I?void 0:I.url,disabled:g,maxLength:200,restrictedCharsRegex:l.urlRegex,onChange:e=>{(""===e||l.ASCII.test(e))&&(H("externalDocs",Object.assign(Object.assign({},t.externalDocs),{url:e}),i),O(e))}}),!g&&e.jsx(s.Button,{className:o.editDescTooltipContent_btn,variant:"outlined",size:"small",onClick:()=>{var e;B(`tags[${i}].externalDocs`,{description:null==A?void 0:A.trim(),url:null==T?void 0:T.trim()}),w(""),O(""),null===(e=_[i])||void 0===e||e.hide()},disabled:!((null===(N=S.tags[i].externalDocs)||void 0===N?void 0:N.url)&&!(null==T?void 0:T.trim())||(null==T?void 0:T.trim())&&l.urlRegex.test(T)),children:"Apply"})]}),children:g||(null===(k=S.tags[i].externalDocs)||void 0===k?void 0:k.description)?e.jsx("div",{className:o.editExternalDocs,children:e.jsx(m,{src:d,width:"1.5rem",height:"1.5rem",onClick:e=>{var i,n;null==e||e.stopPropagation(),w(null===(i=t.externalDocs)||void 0===i?void 0:i.description),O(null===(n=t.externalDocs)||void 0===n?void 0:n.url)}})}):e.jsxs(s.Button,{className:o.editDescBtn,variant:"link",color:"action",endIcon:e.jsx(m,{src:d,width:"1.5rem",height:"1.5rem"}),onClick:()=>{var e,i;w(null===(e=t.externalDocs)||void 0===e?void 0:e.description),O(null===(i=t.externalDocs)||void 0===i?void 0:i.url)},children:[g||(null===(L=S.tags[i])||void 0===L?void 0:L.externalDocs)&&((null===(V=null===(P=S.tags[i])||void 0===P?void 0:P.externalDocs)||void 0===V?void 0:V.url)||(null===(q=S.tags[i].externalDocs)||void 0===q?void 0:q.description))?"View ":"Add "," ","External Docs Link"]})}),!g&&e.jsx("div",{className:o.paramDescContainer_separator}),!g&&e.jsx(s.Button,{className:o.deleteParamBtn,variant:"link",color:"error",endIcon:e.jsx(m,{src:a,width:"1.125rem",height:"1.125rem"}),onClick:()=>{return e=i,n=t.name,R(e),F(n),void M(!0);var e,n}})]})}}));return e.jsxs("form",{className:o.apiInfoForm,onSubmit:e=>e.preventDefault(),children:[e.jsx(s.Input,{size:"large",placeholder:"e.g. Payments",label:"API Name",required:!0,value:null===(x=null==S?void 0:S.info)||void 0===x?void 0:x.title,maxLength:35,onChange:e=>{B("info.title",e)},onClear:()=>{B("info.title","")},errorMsg:null===(h=null==L?void 0:L.info)||void 0===h?void 0:h.title,restrictedCharactersRegex:l.basic}),e.jsxs("div",{className:o.apiDocRow,children:[e.jsx(s.Input,{size:"large",label:"API Authentication Type",required:!0,value:(U=N,U?U.charAt(0).toUpperCase()+U.slice(1):""),disabled:!0}),e.jsx(s.Input,{size:"large",label:"Version",required:!0,value:null===(j=null==S?void 0:S.info)||void 0===j?void 0:j.version,disabled:!0})]}),e.jsx(s.TextArea,{size:"large",placeholder:"Enter a description of the API's functionality...",label:"Description",value:null===(D=null==S?void 0:S.info)||void 0===D?void 0:D.description,maxLength:120,required:!0,onChange:e=>{(""===e||l.ASCII.test(e))&&B("info.description",e)},onClear:()=>{B("info.description","")},errorMsg:null===(f=null==L?void 0:L.info)||void 0===f?void 0:f.description}),e.jsx("div",{className:o.paramsTable,children:e.jsx(u,{id:"paramter-table",data:y,headCells:p,isFormOpen:$,setIsFormOpen:G,saveNewRow:e=>{C([...b,e]);const t=S.tags||[];B("tags",[...t,e])},readOnly:g})}),e.jsx(v,{status:"error",content:e.jsxs("p",{style:{textAlign:"center",fontWeight:400,fontSize:"1rem",lineHeight:"1.4375rem"},className:"delete-msg-container",children:["Are you sure you want to delete",e.jsxs("span",{className:"plan-name",children:[" ","Tag ",e.jsx("strong",{children:V})]}),"?"]}),onSubmit:{onClick:()=>{var e;null!==P&&(C((e=>e.filter(((e,t)=>t!==P)))),B("tags",null===(e=S.tags)||void 0===e?void 0:e.filter(((e,t)=>t!==P)))),M(!1),R(null)},text:"Delete",color:"error",fullWidth:!0},onCancel:{text:"Cancel",color:"normal",fullWidth:!0},onClose:()=>M(!1),open:q,icon:e.jsx(m,{src:c,width:"4.0625rem",height:"4.0625rem"})})]});var U};export{g as default};
|
|
2
2
|
//# sourceMappingURL=InfoForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoForm.js","sources":["../../../../src/components/InfoForm/InfoForm.tsx"],"sourcesContent":["import { useEffect, useState } from 'react'\r\n// @ts-ignore\r\nimport { useFormikContext } from 'formik'\r\nimport { Button, Input, TextArea } from 'digitinary-ui'\r\nimport styles from './InfoForm.module.scss'\r\nimport regex from '../../constants/regex'\r\nimport { TransformedOpenApi } from '../../types/transformedOpenApi'\r\nimport Tooltip from '../../components/Tooltip/Tooltip'\r\nimport { DeleteIcon, deleteOutlinedIcon, EditIcon } from '../../assets/icons'\r\nimport SVGLoader from '../../components/SVGLoader/SVGLoader'\r\nimport CommonDialog from '../../components/dialog'\r\nimport { tagsTableHeaders } from '../../constants/index'\r\nimport TagsTable from '../../components/table/tags-table'\r\n\r\nconst InfoForm = ({ readOnly }: { readOnly?: boolean }) => {\r\n const [tableData, setTableData] = useState([])\r\n const [tableRecords, setTableRecords] = useState()\r\n const [authType, setAuthType] = useState('')\r\n const [description, setDescription] = useState('')\r\n const [url, setURL] = useState('')\r\n const { values, setFieldValue, errors } = useFormikContext<TransformedOpenApi>()\r\n const [externalTooltipRefs, setExternalTooltipRefs] = useState<{ [key: number]: any }>({})\r\n const [tooltipRefs, setTooltipRefs] = useState<{ [key: number]: any }>({})\r\n const [selectedTagIndex, setSelectedTagIndex] = useState<number | null>(null)\r\n const [selectedTagName, setSelectedTagName] = useState<string | null>(null)\r\n const [openDeleteDialog, setOpenDeleteDialog] = useState(false)\r\n const [isFormOpen, setIsFormOpen] = useState(false)\r\n\r\n useEffect(() => {\r\n if (values && values.components && values.components.securitySchemes) {\r\n const authenticatorKeys = Object.keys(values.components.securitySchemes)\r\n if (authenticatorKeys.length) {\r\n setAuthType(\r\n values.components.securitySchemes[authenticatorKeys[0]].scheme ||\r\n values.components.securitySchemes[authenticatorKeys[0]].type\r\n )\r\n }\r\n }\r\n }, [])\r\n\r\n useEffect(() => {\r\n setTableRecords(generateTableRecords(tableData))\r\n }, [tableData])\r\n\r\n useEffect(() => {\r\n if (values.tags && values.tags.length) {\r\n setTableData(values.tags)\r\n }\r\n }, [values.tags])\r\n\r\n const confirmDeleteTag = () => {\r\n if (selectedTagIndex !== null) {\r\n setTableData((prev) => prev.filter((_, i) => i !== selectedTagIndex))\r\n setFieldValue(\r\n `tags`,\r\n values.tags?.filter((_, i) => i !== selectedTagIndex)\r\n )\r\n }\r\n setOpenDeleteDialog(false)\r\n setSelectedTagIndex(null)\r\n }\r\n\r\n const capitalize = (str) => {\r\n if (!str) return ''\r\n return str.charAt(0).toUpperCase() + str.slice(1)\r\n }\r\n\r\n const onTableChange = (key, value, index) => {\r\n const newTableData = tableData.map((item, tIndex) => {\r\n if (tIndex === index) {\r\n return { ...item, [key]: value }\r\n } else {\r\n return item\r\n }\r\n })\r\n\r\n setTableData(newTableData)\r\n }\r\n\r\n const saveNewRow = (tag) => {\r\n setTableData([...tableData, tag])\r\n const oldTags = values.tags || []\r\n setFieldValue(`tags`, [...oldTags, tag])\r\n }\r\n\r\n const handleDeleteClick = (id: number, name: string) => {\r\n setSelectedTagIndex(id)\r\n setSelectedTagName(name)\r\n\r\n setOpenDeleteDialog(true)\r\n }\r\n\r\n const generateTableRecords = (items) => {\r\n return items.map((item, index) => ({\r\n id: index,\r\n tagName: item.name,\r\n description: (\r\n <div className={styles.paramDescContainer}>\r\n <Tooltip\r\n key={`${index}-description`}\r\n allowHTML\r\n disabled={values.tags[index].description?.length <= 12}\r\n content={<div style={{ padding: '0.625rem' }}>{values.tags[index].description}</div>}\r\n arrowWithBorder\r\n placement=\"bottom-end\"\r\n type=\"function\"\r\n delay={[0, 0]}\r\n onShow={() => tooltipRefs[index]?.hide()}\r\n >\r\n <p style={{ alignSelf: 'center', fontWeight: 600, fontSize: '1rem' }}>\r\n {values.tags[index].description\r\n ? values.tags[index].description.substring(0, 12)\r\n : readOnly && '-'}\r\n {values.tags[index].description && values.tags[index].description.length > 12\r\n ? '...'\r\n : ''}\r\n </p>\r\n </Tooltip>\r\n <Tooltip\r\n arrowWithBorder\r\n placement=\"bottom-end\"\r\n type=\"function\"\r\n trigger=\"click\"\r\n delay={[0, 0]}\r\n onCreate={(instance) =>\r\n setTooltipRefs((prev) => ({\r\n ...prev,\r\n [index]: instance,\r\n }))\r\n }\r\n content={\r\n <div className={styles.editDescTooltipContent}>\r\n <p className={styles.editDescTooltipContent_header}>Description</p>\r\n <TextArea\r\n placeholder=\"Describe tag...\"\r\n value={item.description}\r\n disabled={readOnly}\r\n onChange={(value) => {\r\n if (value === '' || regex.ASCII.test(value))\r\n onTableChange('description', value, index)\r\n }}\r\n maxLength={25}\r\n />\r\n {!readOnly && (\r\n <Button\r\n className={styles.editDescTooltipContent_btn}\r\n variant=\"outlined\"\r\n size=\"small\"\r\n onClick={() => {\r\n setFieldValue(`tags[${index}].description`, item.description?.trim())\r\n tooltipRefs[index]?.hide()\r\n }}\r\n disabled={!item.description?.trim()}\r\n >\r\n Apply\r\n </Button>\r\n )}\r\n </div>\r\n }\r\n >\r\n {readOnly || values.tags[index].description ? (\r\n <Button\r\n className={styles.editDescBtn}\r\n variant=\"link\"\r\n color=\"action\"\r\n endIcon={<SVGLoader src={EditIcon} width=\"1.5rem\" height=\"1.5rem\" />}\r\n ></Button>\r\n ) : (\r\n <Button\r\n className={styles.editDescBtn}\r\n variant=\"link\"\r\n color=\"action\"\r\n endIcon={<SVGLoader src={EditIcon} width=\"1.5rem\" height=\"1.5rem\" />}\r\n >\r\n {readOnly || values.tags[index].description\r\n ? 'View Description'\r\n : 'Add Description'}\r\n </Button>\r\n )}\r\n </Tooltip>\r\n </div>\r\n ),\r\n externalDocs: (\r\n <div className={styles.paramDescContainer}>\r\n {values.tags[index].externalDocs?.description && values.tags[index].externalDocs?.url && (\r\n <a\r\n className={styles.externalDocsLink}\r\n href={values.tags[index].externalDocs?.url}\r\n target=\"_blank\"\r\n style={\r\n !values.tags[index].externalDocs?.description\r\n ? { textDecoration: 'none', pointerEvents: 'none' }\r\n : {}\r\n }\r\n >\r\n {values.tags[index].externalDocs?.description\r\n ? values.tags[index].externalDocs?.description?.substring(0, 12)\r\n : readOnly && '-'}\r\n {values.tags[index].externalDocs?.description &&\r\n values.tags[index].externalDocs?.description?.length > 12\r\n ? '...'\r\n : ''}\r\n </a>\r\n )}\r\n\r\n <Tooltip\r\n arrowWithBorder\r\n placement=\"bottom-end\"\r\n type=\"function\"\r\n trigger=\"click\"\r\n delay={[0, 0]}\r\n onCreate={(instance) =>\r\n setExternalTooltipRefs((prev) => ({\r\n ...prev,\r\n [index]: instance,\r\n }))\r\n }\r\n content={\r\n <div className={styles.editDescTooltipContent}>\r\n <p className={styles.editDescTooltipContent_header}>External Docs Description</p>\r\n <TextArea\r\n placeholder=\"Describe External Doc...\"\r\n value={item.externalDocs?.description}\r\n disabled={readOnly}\r\n maxLength={25}\r\n onChange={(value) => {\r\n if (value === '' || regex.ASCII.test(value)) {\r\n onTableChange(\r\n 'externalDocs',\r\n { ...item.externalDocs, description: value },\r\n index\r\n )\r\n setDescription(value)\r\n }\r\n }}\r\n />\r\n <p className={styles.editDescTooltipContent_header}>External Docs Link</p>\r\n <TextArea\r\n placeholder=\"External Docs Link...\"\r\n value={item.externalDocs?.url}\r\n disabled={readOnly}\r\n maxLength={200}\r\n restrictedCharsRegex={regex.urlRegex}\r\n onChange={(value) => {\r\n if (value === '' || regex.ASCII.test(value)) {\r\n onTableChange('externalDocs', { ...item.externalDocs, url: value }, index)\r\n setURL(value)\r\n }\r\n }}\r\n />\r\n {!readOnly && (\r\n <Button\r\n className={styles.editDescTooltipContent_btn}\r\n variant=\"outlined\"\r\n size=\"small\"\r\n onClick={() => {\r\n setFieldValue(`tags[${index}].externalDocs`, {\r\n description: description?.trim(),\r\n url: url?.trim(),\r\n })\r\n setDescription('')\r\n setURL('')\r\n externalTooltipRefs[index]?.hide()\r\n }}\r\n disabled={\r\n !(\r\n (values.tags[index].externalDocs?.url && !url?.trim()) ||\r\n (url?.trim() && regex.urlRegex.test(url))\r\n )\r\n }\r\n >\r\n Apply\r\n </Button>\r\n )}\r\n </div>\r\n }\r\n >\r\n {readOnly || values.tags[index].externalDocs?.description ? (\r\n <div className={styles.editExternalDocs}>\r\n <SVGLoader\r\n src={EditIcon}\r\n width=\"1.5rem\"\r\n height=\"1.5rem\"\r\n onClick={(e) => {\r\n e?.stopPropagation()\r\n setDescription(item.externalDocs?.description)\r\n setURL(item.externalDocs?.url)\r\n }}\r\n />\r\n </div>\r\n ) : (\r\n <Button\r\n className={styles.editDescBtn}\r\n variant=\"link\"\r\n color=\"action\"\r\n endIcon={<SVGLoader src={EditIcon} width=\"1.5rem\" height=\"1.5rem\" />}\r\n onClick={() => {\r\n setDescription(item.externalDocs?.description)\r\n setURL(item.externalDocs?.url)\r\n }}\r\n >\r\n {readOnly ||\r\n (values.tags[index]?.externalDocs &&\r\n (values.tags[index]?.externalDocs?.url ||\r\n values.tags[index].externalDocs?.description))\r\n ? 'View '\r\n : 'Add '}{' '}\r\n External Docs Link\r\n </Button>\r\n )}\r\n </Tooltip>\r\n\r\n {!readOnly && <div className={styles.paramDescContainer_separator}></div>}\r\n\r\n {!readOnly && (\r\n <Button\r\n className={styles.deleteParamBtn}\r\n variant=\"link\"\r\n color=\"error\"\r\n endIcon={<SVGLoader src={DeleteIcon} width=\"1.125rem\" height=\"1.125rem\" />}\r\n onClick={() => handleDeleteClick(index, item.name)}\r\n ></Button>\r\n )}\r\n </div>\r\n ),\r\n }))\r\n }\r\n\r\n return (\r\n <form className={styles.apiInfoForm} onSubmit={(e) => e.preventDefault()}>\r\n <Input\r\n size=\"large\"\r\n placeholder=\"e.g. Payments\"\r\n label=\"API Name\"\r\n required\r\n value={values?.info?.title}\r\n maxLength={35}\r\n onChange={(value) => {\r\n setFieldValue('info.title', value)\r\n }}\r\n onClear={() => {\r\n setFieldValue('info.title', '')\r\n }}\r\n errorMsg={errors?.info?.title}\r\n restrictedCharactersRegex={regex.basic}\r\n />\r\n <div className={styles.apiDocRow}>\r\n <Input\r\n size=\"large\"\r\n label=\"API Authentication Type\"\r\n required\r\n value={capitalize(authType)}\r\n disabled\r\n />\r\n <Input size=\"large\" label=\"Version\" required value={values?.info?.version} disabled />\r\n </div>\r\n <TextArea\r\n size=\"large\"\r\n placeholder=\"Enter a description of the API's functionality...\"\r\n label=\"Description\"\r\n value={values?.info?.description}\r\n maxLength={120}\r\n required\r\n onChange={(value: string) => {\r\n if (value === '' || regex.ASCII.test(value)) {\r\n setFieldValue('info.description', value)\r\n }\r\n }}\r\n onClear={() => {\r\n setFieldValue('info.description', '')\r\n }}\r\n errorMsg={errors?.info?.description}\r\n />\r\n <div className={styles.paramsTable}>\r\n <TagsTable\r\n id=\"paramter-table\"\r\n data={tableRecords}\r\n headCells={tagsTableHeaders}\r\n isFormOpen={isFormOpen}\r\n setIsFormOpen={setIsFormOpen}\r\n saveNewRow={saveNewRow}\r\n readOnly={readOnly}\r\n />\r\n </div>\r\n <CommonDialog\r\n status=\"error\"\r\n content={\r\n <p\r\n style={{\r\n textAlign: 'center',\r\n fontWeight: 400,\r\n fontSize: '1rem',\r\n lineHeight: '1.4375rem',\r\n }}\r\n className=\"delete-msg-container\"\r\n >\r\n Are you sure you want to delete\r\n <span className=\"plan-name\">\r\n {' '}\r\n Tag <strong>{selectedTagName}</strong>\r\n </span>\r\n ?\r\n </p>\r\n }\r\n onSubmit={{\r\n onClick: confirmDeleteTag,\r\n text: 'Delete',\r\n color: 'error',\r\n fullWidth: true,\r\n }}\r\n onCancel={{\r\n text: 'Cancel',\r\n color: 'normal',\r\n fullWidth: true,\r\n }}\r\n onClose={() => setOpenDeleteDialog(false)}\r\n open={openDeleteDialog}\r\n icon={<SVGLoader src={deleteOutlinedIcon} width=\"4.0625rem\" height=\"4.0625rem\" />}\r\n />\r\n </form>\r\n )\r\n}\r\n\r\nexport default InfoForm\r\n"],"names":["InfoForm","readOnly","tableData","setTableData","useState","tableRecords","setTableRecords","authType","setAuthType","description","setDescription","url","setURL","values","setFieldValue","errors","useFormikContext","externalTooltipRefs","setExternalTooltipRefs","tooltipRefs","setTooltipRefs","selectedTagIndex","setSelectedTagIndex","selectedTagName","setSelectedTagName","openDeleteDialog","setOpenDeleteDialog","isFormOpen","setIsFormOpen","useEffect","components","securitySchemes","authenticatorKeys","Object","keys","length","scheme","type","generateTableRecords","tags","onTableChange","key","value","index","newTableData","map","item","tIndex","assign","items","id","tagName","name","_jsxs","className","styles","paramDescContainer","children","_jsx","Tooltip","allowHTML","disabled","_a","content","style","padding","arrowWithBorder","placement","delay","onShow","hide","jsxs","alignSelf","fontWeight","fontSize","substring","trigger","onCreate","instance","prev","editDescTooltipContent","editDescTooltipContent_header","TextArea","placeholder","onChange","regex","ASCII","test","maxLength","jsx","Button","editDescTooltipContent_btn","variant","size","onClick","trim","_b","editDescBtn","color","endIcon","SVGLoader","src","EditIcon","width","height","externalDocs","_c","_d","externalDocsLink","href","_e","target","_f","textDecoration","pointerEvents","_j","_h","_k","_m","_l","_o","_p","restrictedCharsRegex","urlRegex","_q","_r","editExternalDocs","e","stopPropagation","_s","_u","_t","_v","paramDescContainer_separator","deleteParamBtn","DeleteIcon","handleDeleteClick","apiInfoForm","onSubmit","preventDefault","Input","label","required","info","title","onClear","errorMsg","restrictedCharactersRegex","basic","apiDocRow","str","charAt","toUpperCase","slice","version","paramsTable","TagsTable","data","headCells","tagsTableHeaders","saveNewRow","tag","oldTags","CommonDialog","status","textAlign","lineHeight","filter","_","i","text","fullWidth","onCancel","onClose","open","icon","deleteOutlinedIcon"],"mappings":"4qBAcA,MAAMA,EAAW,EAAGC,6BAClB,MAAOC,EAAWC,GAAgBC,EAAS,KACpCC,EAAcC,GAAmBF,KACjCG,EAAUC,GAAeJ,EAAS,KAClCK,EAAaC,GAAkBN,EAAS,KACxCO,EAAKC,GAAUR,EAAS,KACzBS,OAAEA,EAAMC,cAAEA,EAAaC,OAAEA,GAAWC,KACnCC,EAAqBC,GAA0Bd,EAAiC,CAAE,IAClFe,EAAaC,GAAkBhB,EAAiC,CAAE,IAClEiB,EAAkBC,GAAuBlB,EAAwB,OACjEmB,EAAiBC,GAAsBpB,EAAwB,OAC/DqB,EAAkBC,GAAuBtB,GAAS,IAClDuB,EAAYC,GAAiBxB,GAAS,GAE7CyB,GAAU,KACR,GAAIhB,GAAUA,EAAOiB,YAAcjB,EAAOiB,WAAWC,gBAAiB,CACpE,MAAMC,EAAoBC,OAAOC,KAAKrB,EAAOiB,WAAWC,iBACpDC,EAAkBG,QACpB3B,EACEK,EAAOiB,WAAWC,gBAAgBC,EAAkB,IAAII,QACtDvB,EAAOiB,WAAWC,gBAAgBC,EAAkB,IAAIK,KAG/D,IACA,IAEHR,GAAU,KACRvB,EAAgBgC,EAAqBpC,GAAW,GAC/C,CAACA,IAEJ2B,GAAU,KACJhB,EAAO0B,MAAQ1B,EAAO0B,KAAKJ,QAC7BhC,EAAaU,EAAO0B,KACrB,GACA,CAAC1B,EAAO0B,OAEX,MAiBMC,EAAgB,CAACC,EAAKC,EAAOC,KACjC,MAAMC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,SAAsB,QAAZpC,EAAA/F,aAAM,EAANA,EAAQgI,YAAI,IAAAjC,OAAA,EAAAA,EAAErG,cAE1BiD,MAAK,MAAA,CAAAJ,UAAWC,EAAOoG,qBACrBjG,EAAAA,IAACkG,EACC,CAAA1G,GAAG,iBACH2G,KAAMxJ,EACNyJ,UAAWC,EACXpI,WAAYA,EACZC,cAAeA,EACfoI,WA7SYC,IAClB9J,EAAa,IAAID,EAAW+J,IAC5B,MAAMC,EAAUrJ,EAAO0B,MAAQ,GAC/BzB,EAAc,OAAQ,IAAIoJ,EAASD,GAAK,EA2SlChK,SAAUA,MAGdyD,EAAAA,IAACyG,EACC,CAAAC,OAAO,QACPrG,QACEV,EAAAA,KAAA,IAAA,CACEW,MAAO,CACLqG,UAAW,SACX5F,WAAY,IACZC,SAAU,OACV4F,WAAY,aAEdhH,UAAU,mEAGVD,OAAM,OAAA,CAAAC,UAAU,YAAWG,SAAA,CACxB,IAAG,OACAC,yBAASnC,OAGb,OAENmH,SAAU,CACR5C,QAnWiB,WACE,OAArBzE,IACFlB,GAAc4E,GAASA,EAAKwF,QAAO,CAACC,EAAGC,IAAMA,IAAMpJ,MACnDP,EACE,OACa,QAAbgD,EAAAjD,EAAO0B,YAAM,IAAAuB,OAAA,EAAAA,EAAAyG,QAAO,CAACC,EAAGC,IAAMA,IAAMpJ,MAGxCK,GAAoB,GACpBJ,EAAoB,KAAK,EA2VnBoJ,KAAM,SACNxE,MAAO,QACPyE,WAAW,GAEbC,SAAU,CACRF,KAAM,SACNxE,MAAO,SACPyE,WAAW,GAEbE,QAAS,IAAMnJ,GAAoB,GACnCoJ,KAAMrJ,EACNsJ,KAAMrH,EAAAA,IAAC0C,EAAS,CAACC,IAAK2E,EAAoBzE,MAAM,YAAYC,OAAO,mBAnWtD,IAAC8C,CAsWnB"}
|
|
1
|
+
{"version":3,"file":"InfoForm.js","sources":["../../../../src/components/InfoForm/InfoForm.tsx"],"sourcesContent":["import { useEffect, useState } from 'react'\r\n// @ts-ignore\r\nimport { useFormikContext } from 'formik'\r\nimport { Button, Input, TextArea } from 'digitinary-ui'\r\nimport styles from './InfoForm.module.scss'\r\nimport regex from '../../constants/regex'\r\nimport { TransformedOpenApi } from '../../types/transformedOpenApi'\r\nimport Tooltip from '../../components/Tooltip/Tooltip'\r\nimport { DeleteIcon, deleteOutlinedIcon, EditIcon } from '../../assets/icons'\r\nimport SVGLoader from '../../components/SVGLoader/SVGLoader'\r\nimport CommonDialog from '../../components/dialog'\r\nimport { tagsTableHeaders } from '../../constants/index'\r\nimport TagsTable from '../../components/table/tags-table'\r\n\r\nconst InfoForm = ({ readOnly }: { readOnly?: boolean }) => {\r\n const [tableData, setTableData] = useState([])\r\n const [tableRecords, setTableRecords] = useState()\r\n const [authType, setAuthType] = useState('')\r\n const [description, setDescription] = useState('')\r\n const [url, setURL] = useState('')\r\n const { values, setFieldValue, errors } = useFormikContext<TransformedOpenApi>()\r\n const [externalTooltipRefs, setExternalTooltipRefs] = useState<{ [key: number]: any }>({})\r\n const [tooltipRefs, setTooltipRefs] = useState<{ [key: number]: any }>({})\r\n const [selectedTagIndex, setSelectedTagIndex] = useState<number | null>(null)\r\n const [selectedTagName, setSelectedTagName] = useState<string | null>(null)\r\n const [openDeleteDialog, setOpenDeleteDialog] = useState(false)\r\n const [isFormOpen, setIsFormOpen] = useState(false)\r\n\r\n useEffect(() => {\r\n if (values && values.components && values.components.securitySchemes) {\r\n const authenticatorKeys = Object.keys(values.components.securitySchemes)\r\n if (authenticatorKeys.length) {\r\n const _authType = values.components.securitySchemes[authenticatorKeys[0]].scheme ||\r\n values.components.securitySchemes[authenticatorKeys[0]].type;\r\n \r\n setAuthType(\r\n _authType && _authType.toLowerCase() == 'public' ? 'Keyless': _authType \r\n )\r\n }\r\n }\r\n }, [])\r\n\r\n useEffect(() => {\r\n setTableRecords(generateTableRecords(tableData))\r\n }, [tableData])\r\n\r\n useEffect(() => {\r\n if (values.tags && values.tags.length) {\r\n setTableData(values.tags)\r\n }\r\n }, [values.tags])\r\n\r\n const confirmDeleteTag = () => {\r\n if (selectedTagIndex !== null) {\r\n setTableData((prev) => prev.filter((_, i) => i !== selectedTagIndex))\r\n setFieldValue(\r\n `tags`,\r\n values.tags?.filter((_, i) => i !== selectedTagIndex)\r\n )\r\n }\r\n setOpenDeleteDialog(false)\r\n setSelectedTagIndex(null)\r\n }\r\n\r\n const capitalize = (str) => {\r\n if (!str) return ''\r\n return str.charAt(0).toUpperCase() + str.slice(1)\r\n }\r\n\r\n const onTableChange = (key, value, index) => {\r\n const newTableData = tableData.map((item, tIndex) => {\r\n if (tIndex === index) {\r\n return { ...item, [key]: value }\r\n } else {\r\n return item\r\n }\r\n })\r\n\r\n setTableData(newTableData)\r\n }\r\n\r\n const saveNewRow = (tag) => {\r\n setTableData([...tableData, tag])\r\n const oldTags = values.tags || []\r\n setFieldValue(`tags`, [...oldTags, tag])\r\n }\r\n\r\n const handleDeleteClick = (id: number, name: string) => {\r\n setSelectedTagIndex(id)\r\n setSelectedTagName(name)\r\n\r\n setOpenDeleteDialog(true)\r\n }\r\n\r\n const generateTableRecords = (items) => {\r\n return items.map((item, index) => ({\r\n id: index,\r\n tagName: item.name,\r\n description: (\r\n <div className={styles.paramDescContainer}>\r\n <Tooltip\r\n key={`${index}-description`}\r\n allowHTML\r\n disabled={values.tags[index].description?.length <= 12}\r\n content={<div style={{ padding: '0.625rem' }}>{values.tags[index].description}</div>}\r\n arrowWithBorder\r\n placement=\"bottom-end\"\r\n type=\"function\"\r\n delay={[0, 0]}\r\n onShow={() => tooltipRefs[index]?.hide()}\r\n >\r\n <p style={{ alignSelf: 'center', fontWeight: 600, fontSize: '1rem' }}>\r\n {values.tags[index].description\r\n ? values.tags[index].description.substring(0, 12)\r\n : readOnly && '-'}\r\n {values.tags[index].description && values.tags[index].description.length > 12\r\n ? '...'\r\n : ''}\r\n </p>\r\n </Tooltip>\r\n <Tooltip\r\n arrowWithBorder\r\n placement=\"bottom-end\"\r\n type=\"function\"\r\n trigger=\"click\"\r\n delay={[0, 0]}\r\n onCreate={(instance) =>\r\n setTooltipRefs((prev) => ({\r\n ...prev,\r\n [index]: instance,\r\n }))\r\n }\r\n content={\r\n <div className={styles.editDescTooltipContent}>\r\n <p className={styles.editDescTooltipContent_header}>Description</p>\r\n <TextArea\r\n placeholder=\"Describe tag...\"\r\n value={item.description}\r\n disabled={readOnly}\r\n onChange={(value) => {\r\n if (value === '' || regex.ASCII.test(value))\r\n onTableChange('description', value, index)\r\n }}\r\n maxLength={25}\r\n />\r\n {!readOnly && (\r\n <Button\r\n className={styles.editDescTooltipContent_btn}\r\n variant=\"outlined\"\r\n size=\"small\"\r\n onClick={() => {\r\n setFieldValue(`tags[${index}].description`, item.description?.trim())\r\n tooltipRefs[index]?.hide()\r\n }}\r\n disabled={!item.description?.trim()}\r\n >\r\n Apply\r\n </Button>\r\n )}\r\n </div>\r\n }\r\n >\r\n {readOnly || values.tags[index].description ? (\r\n <Button\r\n className={styles.editDescBtn}\r\n variant=\"link\"\r\n color=\"action\"\r\n endIcon={<SVGLoader src={EditIcon} width=\"1.5rem\" height=\"1.5rem\" />}\r\n ></Button>\r\n ) : (\r\n <Button\r\n className={styles.editDescBtn}\r\n variant=\"link\"\r\n color=\"action\"\r\n endIcon={<SVGLoader src={EditIcon} width=\"1.5rem\" height=\"1.5rem\" />}\r\n >\r\n {readOnly || values.tags[index].description\r\n ? 'View Description'\r\n : 'Add Description'}\r\n </Button>\r\n )}\r\n </Tooltip>\r\n </div>\r\n ),\r\n externalDocs: (\r\n <div className={styles.paramDescContainer}>\r\n {values.tags[index].externalDocs?.description && values.tags[index].externalDocs?.url && (\r\n <a\r\n className={styles.externalDocsLink}\r\n href={values.tags[index].externalDocs?.url}\r\n target=\"_blank\"\r\n style={\r\n !values.tags[index].externalDocs?.description\r\n ? { textDecoration: 'none', pointerEvents: 'none' }\r\n : {}\r\n }\r\n >\r\n {values.tags[index].externalDocs?.description\r\n ? values.tags[index].externalDocs?.description?.substring(0, 12)\r\n : readOnly && '-'}\r\n {values.tags[index].externalDocs?.description &&\r\n values.tags[index].externalDocs?.description?.length > 12\r\n ? '...'\r\n : ''}\r\n </a>\r\n )}\r\n\r\n <Tooltip\r\n arrowWithBorder\r\n placement=\"bottom-end\"\r\n type=\"function\"\r\n trigger=\"click\"\r\n delay={[0, 0]}\r\n onCreate={(instance) =>\r\n setExternalTooltipRefs((prev) => ({\r\n ...prev,\r\n [index]: instance,\r\n }))\r\n }\r\n content={\r\n <div className={styles.editDescTooltipContent}>\r\n <p className={styles.editDescTooltipContent_header}>External Docs Description</p>\r\n <TextArea\r\n placeholder=\"Describe External Doc...\"\r\n value={item.externalDocs?.description}\r\n disabled={readOnly}\r\n maxLength={25}\r\n onChange={(value) => {\r\n if (value === '' || regex.ASCII.test(value)) {\r\n onTableChange(\r\n 'externalDocs',\r\n { ...item.externalDocs, description: value },\r\n index\r\n )\r\n setDescription(value)\r\n }\r\n }}\r\n />\r\n <p className={styles.editDescTooltipContent_header}>External Docs Link</p>\r\n <TextArea\r\n placeholder=\"External Docs Link...\"\r\n value={item.externalDocs?.url}\r\n disabled={readOnly}\r\n maxLength={200}\r\n restrictedCharsRegex={regex.urlRegex}\r\n onChange={(value) => {\r\n if (value === '' || regex.ASCII.test(value)) {\r\n onTableChange('externalDocs', { ...item.externalDocs, url: value }, index)\r\n setURL(value)\r\n }\r\n }}\r\n />\r\n {!readOnly && (\r\n <Button\r\n className={styles.editDescTooltipContent_btn}\r\n variant=\"outlined\"\r\n size=\"small\"\r\n onClick={() => {\r\n setFieldValue(`tags[${index}].externalDocs`, {\r\n description: description?.trim(),\r\n url: url?.trim(),\r\n })\r\n setDescription('')\r\n setURL('')\r\n externalTooltipRefs[index]?.hide()\r\n }}\r\n disabled={\r\n !(\r\n (values.tags[index].externalDocs?.url && !url?.trim()) ||\r\n (url?.trim() && regex.urlRegex.test(url))\r\n )\r\n }\r\n >\r\n Apply\r\n </Button>\r\n )}\r\n </div>\r\n }\r\n >\r\n {readOnly || values.tags[index].externalDocs?.description ? (\r\n <div className={styles.editExternalDocs}>\r\n <SVGLoader\r\n src={EditIcon}\r\n width=\"1.5rem\"\r\n height=\"1.5rem\"\r\n onClick={(e) => {\r\n e?.stopPropagation()\r\n setDescription(item.externalDocs?.description)\r\n setURL(item.externalDocs?.url)\r\n }}\r\n />\r\n </div>\r\n ) : (\r\n <Button\r\n className={styles.editDescBtn}\r\n variant=\"link\"\r\n color=\"action\"\r\n endIcon={<SVGLoader src={EditIcon} width=\"1.5rem\" height=\"1.5rem\" />}\r\n onClick={() => {\r\n setDescription(item.externalDocs?.description)\r\n setURL(item.externalDocs?.url)\r\n }}\r\n >\r\n {readOnly ||\r\n (values.tags[index]?.externalDocs &&\r\n (values.tags[index]?.externalDocs?.url ||\r\n values.tags[index].externalDocs?.description))\r\n ? 'View '\r\n : 'Add '}{' '}\r\n External Docs Link\r\n </Button>\r\n )}\r\n </Tooltip>\r\n\r\n {!readOnly && <div className={styles.paramDescContainer_separator}></div>}\r\n\r\n {!readOnly && (\r\n <Button\r\n className={styles.deleteParamBtn}\r\n variant=\"link\"\r\n color=\"error\"\r\n endIcon={<SVGLoader src={DeleteIcon} width=\"1.125rem\" height=\"1.125rem\" />}\r\n onClick={() => handleDeleteClick(index, item.name)}\r\n ></Button>\r\n )}\r\n </div>\r\n ),\r\n }))\r\n }\r\n\r\n return (\r\n <form className={styles.apiInfoForm} onSubmit={(e) => e.preventDefault()}>\r\n <Input\r\n size=\"large\"\r\n placeholder=\"e.g. Payments\"\r\n label=\"API Name\"\r\n required\r\n value={values?.info?.title}\r\n maxLength={35}\r\n onChange={(value) => {\r\n setFieldValue('info.title', value)\r\n }}\r\n onClear={() => {\r\n setFieldValue('info.title', '')\r\n }}\r\n errorMsg={errors?.info?.title}\r\n restrictedCharactersRegex={regex.basic}\r\n />\r\n <div className={styles.apiDocRow}>\r\n <Input\r\n size=\"large\"\r\n label=\"API Authentication Type\"\r\n required\r\n value={capitalize(authType)}\r\n disabled\r\n />\r\n <Input size=\"large\" label=\"Version\" required value={values?.info?.version} disabled />\r\n </div>\r\n <TextArea\r\n size=\"large\"\r\n placeholder=\"Enter a description of the API's functionality...\"\r\n label=\"Description\"\r\n value={values?.info?.description}\r\n maxLength={120}\r\n required\r\n onChange={(value: string) => {\r\n if (value === '' || regex.ASCII.test(value)) {\r\n setFieldValue('info.description', value)\r\n }\r\n }}\r\n onClear={() => {\r\n setFieldValue('info.description', '')\r\n }}\r\n errorMsg={errors?.info?.description}\r\n />\r\n <div className={styles.paramsTable}>\r\n <TagsTable\r\n id=\"paramter-table\"\r\n data={tableRecords}\r\n headCells={tagsTableHeaders}\r\n isFormOpen={isFormOpen}\r\n setIsFormOpen={setIsFormOpen}\r\n saveNewRow={saveNewRow}\r\n readOnly={readOnly}\r\n />\r\n </div>\r\n <CommonDialog\r\n status=\"error\"\r\n content={\r\n <p\r\n style={{\r\n textAlign: 'center',\r\n fontWeight: 400,\r\n fontSize: '1rem',\r\n lineHeight: '1.4375rem',\r\n }}\r\n className=\"delete-msg-container\"\r\n >\r\n Are you sure you want to delete\r\n <span className=\"plan-name\">\r\n {' '}\r\n Tag <strong>{selectedTagName}</strong>\r\n </span>\r\n ?\r\n </p>\r\n }\r\n onSubmit={{\r\n onClick: confirmDeleteTag,\r\n text: 'Delete',\r\n color: 'error',\r\n fullWidth: true,\r\n }}\r\n onCancel={{\r\n text: 'Cancel',\r\n color: 'normal',\r\n fullWidth: true,\r\n }}\r\n onClose={() => setOpenDeleteDialog(false)}\r\n open={openDeleteDialog}\r\n icon={<SVGLoader src={deleteOutlinedIcon} width=\"4.0625rem\" height=\"4.0625rem\" />}\r\n />\r\n </form>\r\n )\r\n}\r\n\r\nexport default InfoForm\r\n"],"names":["InfoForm","readOnly","tableData","setTableData","useState","tableRecords","setTableRecords","authType","setAuthType","description","setDescription","url","setURL","values","setFieldValue","errors","useFormikContext","externalTooltipRefs","setExternalTooltipRefs","tooltipRefs","setTooltipRefs","selectedTagIndex","setSelectedTagIndex","selectedTagName","setSelectedTagName","openDeleteDialog","setOpenDeleteDialog","isFormOpen","setIsFormOpen","useEffect","components","securitySchemes","authenticatorKeys","Object","keys","length","_authType","scheme","type","toLowerCase","generateTableRecords","tags","onTableChange","key","value","index","newTableData","map","item","tIndex","assign","items","id","tagName","name","_jsxs","className","styles","paramDescContainer","children","_jsx","Tooltip","allowHTML","disabled","_a","content","style","padding","arrowWithBorder","placement","delay","onShow","hide","jsxs","alignSelf","fontWeight","fontSize","substring","trigger","onCreate","instance","prev","editDescTooltipContent","editDescTooltipContent_header","TextArea","placeholder","onChange","regex","ASCII","test","maxLength","jsx","Button","editDescTooltipContent_btn","variant","size","onClick","trim","_b","editDescBtn","color","endIcon","SVGLoader","src","EditIcon","width","height","externalDocs","_c","_d","externalDocsLink","href","_e","target","_f","textDecoration","pointerEvents","_j","_h","_k","_m","_l","_o","_p","restrictedCharsRegex","urlRegex","_q","_r","editExternalDocs","e","stopPropagation","_s","_u","_t","_v","paramDescContainer_separator","deleteParamBtn","DeleteIcon","handleDeleteClick","apiInfoForm","onSubmit","preventDefault","Input","label","required","info","title","onClear","errorMsg","restrictedCharactersRegex","basic","apiDocRow","str","charAt","toUpperCase","slice","version","paramsTable","TagsTable","data","headCells","tagsTableHeaders","saveNewRow","tag","oldTags","CommonDialog","status","textAlign","lineHeight","filter","_","i","text","fullWidth","onCancel","onClose","open","icon","deleteOutlinedIcon"],"mappings":"4qBAcA,MAAMA,EAAW,EAAGC,6BAClB,MAAOC,EAAWC,GAAgBC,EAAS,KACpCC,EAAcC,GAAmBF,KACjCG,EAAUC,GAAeJ,EAAS,KAClCK,EAAaC,GAAkBN,EAAS,KACxCO,EAAKC,GAAUR,EAAS,KACzBS,OAAEA,EAAMC,cAAEA,EAAaC,OAAEA,GAAWC,KACnCC,EAAqBC,GAA0Bd,EAAiC,CAAE,IAClFe,EAAaC,GAAkBhB,EAAiC,CAAE,IAClEiB,EAAkBC,GAAuBlB,EAAwB,OACjEmB,EAAiBC,GAA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SAAA,CACxB,IAAG,OACAC,yBAASrC,OAGb,OAENqH,SAAU,CACR5C,QAnWiB,WACE,OAArB3E,IACFlB,GAAc8E,GAASA,EAAKwF,QAAO,CAACC,EAAGC,IAAMA,IAAMtJ,MACnDP,EACE,OACa,QAAbkD,EAAAnD,EAAO4B,YAAM,IAAAuB,OAAA,EAAAA,EAAAyG,QAAO,CAACC,EAAGC,IAAMA,IAAMtJ,MAGxCK,GAAoB,GACpBJ,EAAoB,KAAK,EA2VnBsJ,KAAM,SACNxE,MAAO,QACPyE,WAAW,GAEbC,SAAU,CACRF,KAAM,SACNxE,MAAO,SACPyE,WAAW,GAEbE,QAAS,IAAMrJ,GAAoB,GACnCsJ,KAAMvJ,EACNwJ,KAAMrH,EAAAA,IAAC0C,EAAS,CAACC,IAAK2E,EAAoBzE,MAAM,YAAYC,OAAO,mBAnWtD,IAAC8C,CAsWnB"}
|
package/dist/styles.css
CHANGED
|
@@ -1,121 +1,26 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
gap: 1.25rem;
|
|
5
|
-
}
|
|
6
|
-
.apiInfoForm .paramsTable .paramDescContainer {
|
|
7
|
-
display: flex;
|
|
8
|
-
}
|
|
9
|
-
.apiInfoForm .paramsTable .paramDescContainer .paramDescContainer_separator {
|
|
10
|
-
height: inherit;
|
|
11
|
-
width: 1px;
|
|
12
|
-
background-color: #d8dae5;
|
|
13
|
-
}
|
|
14
|
-
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn) svg path {
|
|
15
|
-
stroke-width: 0.1;
|
|
16
|
-
}
|
|
17
|
-
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn {
|
|
18
|
-
padding: 0;
|
|
19
|
-
margin-right: 1.25rem;
|
|
20
|
-
}
|
|
21
|
-
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn :global(.btnContentWrapper) {
|
|
22
|
-
display: flex;
|
|
23
|
-
align-items: center;
|
|
24
|
-
padding: 0;
|
|
25
|
-
font-size: 0.875rem;
|
|
26
|
-
}
|
|
27
|
-
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn :global(.btnContentWrapper) :global(.endBtnIcon) {
|
|
28
|
-
margin-block: auto;
|
|
29
|
-
}
|
|
30
|
-
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn :global(.btnContentWrapper) :global(.endBtnIcon) svg path {
|
|
31
|
-
fill: #12131a;
|
|
32
|
-
}
|
|
33
|
-
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).deleteParamBtn {
|
|
34
|
-
padding: 0;
|
|
35
|
-
border-width: 0 !important;
|
|
36
|
-
}
|
|
37
|
-
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).deleteParamBtn :global(.btnContentWrapper) :global(.endBtnIcon) {
|
|
38
|
-
margin-block: auto;
|
|
39
|
-
}
|
|
40
|
-
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).deleteParamBtn :global(.btnContentWrapper) :global(.endBtnIcon) svg {
|
|
41
|
-
width: 1.125rem;
|
|
42
|
-
}
|
|
43
|
-
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn):not(:global(.disabled)):global(.success) :global(.endBtnIcon) {
|
|
44
|
-
margin-block: auto;
|
|
45
|
-
}
|
|
46
|
-
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn):not(:global(.disabled)):global(.success) :global(.endBtnIcon) svg {
|
|
47
|
-
width: 1.125rem;
|
|
48
|
-
}
|
|
49
|
-
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn):not(:global(.disabled)):global(.success) :global(.endBtnIcon) svg path {
|
|
50
|
-
fill: #3aaa35;
|
|
51
|
-
}
|
|
52
|
-
.apiInfoForm .paramsTable .externalDocsLink {
|
|
53
|
-
font-size: 0.875rem;
|
|
54
|
-
line-height: 1.25rem;
|
|
55
|
-
cursor: pointer;
|
|
56
|
-
align-self: center;
|
|
57
|
-
margin-right: 2rem;
|
|
58
|
-
}
|
|
59
|
-
.apiInfoForm .paramsTable .editExternalDocs {
|
|
1
|
+
.containerTitleDrawer {
|
|
2
|
+
height: 64px;
|
|
3
|
+
min-height: 64px;
|
|
60
4
|
display: flex;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
justify-content: space-between;
|
|
61
7
|
align-items: center;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
cursor: pointer;
|
|
66
|
-
}
|
|
67
|
-
.apiInfoForm .paramsTable .editExternalDocs svg path {
|
|
68
|
-
fill: #12131a;
|
|
69
|
-
}
|
|
70
|
-
.apiInfoForm .paramsTable .editDescTooltipContent {
|
|
71
|
-
display: flex;
|
|
72
|
-
flex-direction: column;
|
|
73
|
-
gap: 0.625rem;
|
|
74
|
-
padding-bottom: 0.625rem;
|
|
75
|
-
}
|
|
76
|
-
.apiInfoForm .paramsTable .editDescTooltipContent > *:not(.editDescTooltipContent_header) {
|
|
77
|
-
margin-inline: 0.625rem;
|
|
8
|
+
background-color: #f1f2f6;
|
|
9
|
+
padding: 0 30px 0 30px;
|
|
10
|
+
width: 100%;
|
|
78
11
|
}
|
|
79
|
-
.
|
|
12
|
+
.containerTitleDrawer span {
|
|
13
|
+
color: #12131a;
|
|
80
14
|
font-weight: 600;
|
|
81
|
-
font-size:
|
|
82
|
-
line-height:
|
|
83
|
-
|
|
84
|
-
border-bottom: 1px solid #d8dae5;
|
|
85
|
-
}
|
|
86
|
-
.apiInfoForm .paramsTable :global(.requiredParam) :global(.headContainer)::after {
|
|
87
|
-
content: "*";
|
|
88
|
-
color: red;
|
|
89
|
-
transform: translateX(0.125rem);
|
|
90
|
-
}
|
|
91
|
-
.apiInfoForm .apiDocRow {
|
|
92
|
-
display: grid;
|
|
93
|
-
grid-template-columns: 1fr 1fr;
|
|
94
|
-
gap: 1.25rem;
|
|
95
|
-
}
|
|
96
|
-
.apiInfoForm .apiInfoForm_tagsChips {
|
|
97
|
-
margin-top: -1.25rem;
|
|
98
|
-
}
|
|
99
|
-
.apiInfoForm .editDescTooltipContent {
|
|
100
|
-
display: flex;
|
|
101
|
-
flex-direction: column;
|
|
102
|
-
gap: 0.625rem;
|
|
103
|
-
padding-bottom: 0.625rem;
|
|
104
|
-
}
|
|
105
|
-
.apiInfoForm .editDescTooltipContent > *:not(.editDescTooltipContent_header) {
|
|
106
|
-
margin-inline: 0.625rem;
|
|
15
|
+
font-size: 18px;
|
|
16
|
+
line-height: 25px;
|
|
17
|
+
letter-spacing: 0em;
|
|
107
18
|
}
|
|
108
|
-
.
|
|
109
|
-
|
|
110
|
-
font-size: 0.875rem;
|
|
111
|
-
line-height: 1.25rem;
|
|
112
|
-
padding: 0.75rem 1.25rem;
|
|
113
|
-
border-bottom: 1px solid #d8dae5;
|
|
19
|
+
.containerTitleDrawer svg path {
|
|
20
|
+
stroke: #000 !important;
|
|
114
21
|
}
|
|
115
|
-
.
|
|
116
|
-
|
|
117
|
-
color: red;
|
|
118
|
-
transform: translateX(0.125rem);
|
|
22
|
+
.containerTitleDrawer .closeIcon {
|
|
23
|
+
cursor: pointer;
|
|
119
24
|
}.methodAccordion {
|
|
120
25
|
border: none !important;
|
|
121
26
|
box-shadow: none !important;
|
|
@@ -389,120 +294,124 @@
|
|
|
389
294
|
}
|
|
390
295
|
.methodAccordion.readOnly .methodSummaryContainer .methodExpandArrowContainer {
|
|
391
296
|
background-color: #ebecf2;
|
|
392
|
-
}.
|
|
393
|
-
display:
|
|
394
|
-
|
|
395
|
-
align-items: center;
|
|
396
|
-
flex-wrap: wrap;
|
|
397
|
-
max-width: 100%;
|
|
297
|
+
}.apiInfoForm {
|
|
298
|
+
display: grid;
|
|
299
|
+
padding: 1.25rem 1.875rem;
|
|
398
300
|
gap: 1.25rem;
|
|
399
301
|
}
|
|
400
|
-
.
|
|
401
|
-
font-size: 40px;
|
|
402
|
-
line-height: 30px;
|
|
403
|
-
font-weight: 500;
|
|
404
|
-
word-wrap: break-word;
|
|
405
|
-
overflow-wrap: break-word;
|
|
406
|
-
word-break: break-all;
|
|
407
|
-
}
|
|
408
|
-
.livePreviewContainer .titleContainer .livePreviewChip {
|
|
409
|
-
background-color: #ebecf2;
|
|
410
|
-
color: #12131a;
|
|
411
|
-
}.tooltip-custom-wrapper {
|
|
302
|
+
.apiInfoForm .paramsTable .paramDescContainer {
|
|
412
303
|
display: flex;
|
|
413
304
|
}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
305
|
+
.apiInfoForm .paramsTable .paramDescContainer .paramDescContainer_separator {
|
|
306
|
+
height: inherit;
|
|
307
|
+
width: 1px;
|
|
308
|
+
background-color: #d8dae5;
|
|
417
309
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
310
|
+
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn) svg path {
|
|
311
|
+
stroke-width: 0.1;
|
|
312
|
+
}
|
|
313
|
+
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn {
|
|
314
|
+
padding: 0;
|
|
315
|
+
margin-right: 1.25rem;
|
|
316
|
+
}
|
|
317
|
+
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn :global(.btnContentWrapper) {
|
|
318
|
+
display: flex;
|
|
319
|
+
align-items: center;
|
|
320
|
+
padding: 0;
|
|
421
321
|
font-size: 0.875rem;
|
|
422
|
-
border-radius: 0.3125rem;
|
|
423
|
-
width: max-content;
|
|
424
|
-
max-width: 100%;
|
|
425
|
-
overflow-wrap: break-word;
|
|
426
|
-
word-break: break-word;
|
|
427
|
-
position: relative;
|
|
428
|
-
border: 1px solid #d8dae5;
|
|
429
|
-
z-index: 2;
|
|
430
322
|
}
|
|
431
|
-
.
|
|
432
|
-
|
|
433
|
-
color: #000 !important;
|
|
323
|
+
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn :global(.btnContentWrapper) :global(.endBtnIcon) {
|
|
324
|
+
margin-block: auto;
|
|
434
325
|
}
|
|
435
|
-
.
|
|
436
|
-
|
|
326
|
+
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).editDescBtn :global(.btnContentWrapper) :global(.endBtnIcon) svg path {
|
|
327
|
+
fill: #12131a;
|
|
437
328
|
}
|
|
438
|
-
.
|
|
439
|
-
|
|
329
|
+
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).deleteParamBtn {
|
|
330
|
+
padding: 0;
|
|
331
|
+
border-width: 0 !important;
|
|
440
332
|
}
|
|
441
|
-
.
|
|
442
|
-
|
|
443
|
-
background-color: #3aaa35;
|
|
444
|
-
padding-inline: 0.625rem;
|
|
333
|
+
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).deleteParamBtn :global(.btnContentWrapper) :global(.endBtnIcon) {
|
|
334
|
+
margin-block: auto;
|
|
445
335
|
}
|
|
446
|
-
.
|
|
447
|
-
|
|
336
|
+
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn).deleteParamBtn :global(.btnContentWrapper) :global(.endBtnIcon) svg {
|
|
337
|
+
width: 1.125rem;
|
|
338
|
+
}
|
|
339
|
+
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn):not(:global(.disabled)):global(.success) :global(.endBtnIcon) {
|
|
340
|
+
margin-block: auto;
|
|
341
|
+
}
|
|
342
|
+
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn):not(:global(.disabled)):global(.success) :global(.endBtnIcon) svg {
|
|
343
|
+
width: 1.125rem;
|
|
344
|
+
}
|
|
345
|
+
.apiInfoForm .paramsTable .paramDescContainer :global(.customBtn):not(:global(.disabled)):global(.success) :global(.endBtnIcon) svg path {
|
|
346
|
+
fill: #3aaa35;
|
|
347
|
+
}
|
|
348
|
+
.apiInfoForm .paramsTable .externalDocsLink {
|
|
448
349
|
font-size: 0.875rem;
|
|
449
350
|
line-height: 1.25rem;
|
|
450
|
-
|
|
351
|
+
cursor: pointer;
|
|
352
|
+
align-self: center;
|
|
353
|
+
margin-right: 2rem;
|
|
451
354
|
}
|
|
452
|
-
.
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
355
|
+
.apiInfoForm .paramsTable .editExternalDocs {
|
|
356
|
+
display: flex;
|
|
357
|
+
align-items: center;
|
|
358
|
+
padding-right: 0.625rem;
|
|
456
359
|
}
|
|
457
|
-
.
|
|
458
|
-
|
|
459
|
-
border-width: 0.5rem 0.5rem 0 !important;
|
|
360
|
+
.apiInfoForm .paramsTable .editExternalDocs svg {
|
|
361
|
+
cursor: pointer;
|
|
460
362
|
}
|
|
461
|
-
.
|
|
462
|
-
|
|
463
|
-
border-width: 0.5rem 0.5rem 0.5rem 0 !important;
|
|
363
|
+
.apiInfoForm .paramsTable .editExternalDocs svg path {
|
|
364
|
+
fill: #12131a;
|
|
464
365
|
}
|
|
465
|
-
.
|
|
466
|
-
|
|
467
|
-
|
|
366
|
+
.apiInfoForm .paramsTable .editDescTooltipContent {
|
|
367
|
+
display: flex;
|
|
368
|
+
flex-direction: column;
|
|
369
|
+
gap: 0.625rem;
|
|
370
|
+
padding-bottom: 0.625rem;
|
|
468
371
|
}
|
|
469
|
-
.
|
|
470
|
-
|
|
471
|
-
border-width: 0.5rem 0 0.5rem 0.5rem !important;
|
|
372
|
+
.apiInfoForm .paramsTable .editDescTooltipContent > *:not(.editDescTooltipContent_header) {
|
|
373
|
+
margin-inline: 0.625rem;
|
|
472
374
|
}
|
|
473
|
-
.
|
|
474
|
-
|
|
375
|
+
.apiInfoForm .paramsTable .editDescTooltipContent .editDescTooltipContent_header {
|
|
376
|
+
font-weight: 600;
|
|
377
|
+
font-size: 0.875rem;
|
|
378
|
+
line-height: 1.25rem;
|
|
379
|
+
padding: 0.75rem 1.25rem;
|
|
380
|
+
border-bottom: 1px solid #d8dae5;
|
|
475
381
|
}
|
|
476
|
-
.
|
|
477
|
-
|
|
478
|
-
|
|
382
|
+
.apiInfoForm .paramsTable :global(.requiredParam) :global(.headContainer)::after {
|
|
383
|
+
content: "*";
|
|
384
|
+
color: red;
|
|
385
|
+
transform: translateX(0.125rem);
|
|
479
386
|
}
|
|
480
|
-
.
|
|
481
|
-
|
|
387
|
+
.apiInfoForm .apiDocRow {
|
|
388
|
+
display: grid;
|
|
389
|
+
grid-template-columns: 1fr 1fr;
|
|
390
|
+
gap: 1.25rem;
|
|
482
391
|
}
|
|
483
|
-
.
|
|
484
|
-
|
|
392
|
+
.apiInfoForm .apiInfoForm_tagsChips {
|
|
393
|
+
margin-top: -1.25rem;
|
|
485
394
|
}
|
|
486
|
-
.
|
|
487
|
-
|
|
395
|
+
.apiInfoForm .editDescTooltipContent {
|
|
396
|
+
display: flex;
|
|
397
|
+
flex-direction: column;
|
|
398
|
+
gap: 0.625rem;
|
|
399
|
+
padding-bottom: 0.625rem;
|
|
488
400
|
}
|
|
489
|
-
.
|
|
490
|
-
|
|
491
|
-
background-color: white;
|
|
492
|
-
z-index: 2;
|
|
493
|
-
height: 1px;
|
|
401
|
+
.apiInfoForm .editDescTooltipContent > *:not(.editDescTooltipContent_header) {
|
|
402
|
+
margin-inline: 0.625rem;
|
|
494
403
|
}
|
|
495
|
-
.
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
border:
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
transform
|
|
404
|
+
.apiInfoForm .editDescTooltipContent .editDescTooltipContent_header {
|
|
405
|
+
font-weight: 600;
|
|
406
|
+
font-size: 0.875rem;
|
|
407
|
+
line-height: 1.25rem;
|
|
408
|
+
padding: 0.75rem 1.25rem;
|
|
409
|
+
border-bottom: 1px solid #d8dae5;
|
|
410
|
+
}
|
|
411
|
+
.apiInfoForm :global(.requiredParam) :global(.headContainer)::after {
|
|
412
|
+
content: "*";
|
|
413
|
+
color: red;
|
|
414
|
+
transform: translateX(0.125rem);
|
|
506
415
|
}#common-dialog.dialog-content-wrapper {
|
|
507
416
|
overflow: visible !important;
|
|
508
417
|
max-height: 100%;
|
|
@@ -568,152 +477,37 @@
|
|
|
568
477
|
font-weight: 500;
|
|
569
478
|
line-height: 1.875rem;
|
|
570
479
|
text-align: center;
|
|
571
|
-
margin-bottom: 0.625rem;
|
|
572
|
-
}
|
|
573
|
-
#common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-title.error-title {
|
|
574
|
-
color: #da3f3f;
|
|
575
|
-
}
|
|
576
|
-
#common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-title.warning-title {
|
|
577
|
-
color: #faad14;
|
|
578
|
-
}
|
|
579
|
-
#common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-footer {
|
|
580
|
-
display: flex;
|
|
581
|
-
gap: 1.25rem;
|
|
582
|
-
margin-top: 1.875rem;
|
|
583
|
-
}.json-editor-container {
|
|
584
|
-
overflow: hidden;
|
|
585
|
-
border-bottom-right-radius: 0.3125rem;
|
|
586
|
-
border-bottom-left-radius: 0.3125rem;
|
|
587
|
-
}
|
|
588
|
-
.json-editor-container .json-editor-label {
|
|
589
|
-
font-size: 0.875rem;
|
|
590
|
-
font-weight: 600;
|
|
591
|
-
line-height: 1.25rem;
|
|
592
|
-
margin-bottom: 0.3125rem;
|
|
593
|
-
}
|
|
594
|
-
.json-editor-container .json-editor {
|
|
595
|
-
display: flex;
|
|
596
|
-
flex-direction: column;
|
|
597
|
-
background-color: #142452;
|
|
598
|
-
width: 100%;
|
|
599
|
-
outline: 1px solid transparent;
|
|
600
|
-
position: relative;
|
|
601
|
-
overflow: hidden;
|
|
602
|
-
}
|
|
603
|
-
.json-editor-container .json-editor .actions-container {
|
|
604
|
-
width: 100%;
|
|
605
|
-
height: 5rem;
|
|
606
|
-
padding: 1.25rem;
|
|
607
|
-
border-radius: 0 0 0.3125rem 0.3125rem;
|
|
608
|
-
background: #101e47;
|
|
609
|
-
display: flex;
|
|
610
|
-
flex-direction: row;
|
|
611
|
-
gap: 1.25rem;
|
|
612
|
-
align-items: center;
|
|
613
|
-
}
|
|
614
|
-
.json-editor-container .json-editor .actions-container .validate {
|
|
615
|
-
color: #fff;
|
|
616
|
-
text-align: center;
|
|
617
|
-
font-size: 1rem;
|
|
618
|
-
font-style: normal;
|
|
619
|
-
font-weight: 600;
|
|
620
|
-
line-height: 1.25rem;
|
|
621
|
-
width: 8.75rem;
|
|
622
|
-
padding: 0.625rem 2.25rem;
|
|
623
|
-
background-color: rgba(240, 248, 255, 0);
|
|
624
|
-
border-radius: 0.3125rem;
|
|
625
|
-
border: 0.0625rem solid #4d75d8;
|
|
626
|
-
cursor: pointer;
|
|
627
|
-
}
|
|
628
|
-
.json-editor-container .json-editor .actions-container .validate:disabled {
|
|
629
|
-
color: #babdcc;
|
|
630
|
-
border-color: #a2a5b6;
|
|
631
|
-
}
|
|
632
|
-
.json-editor-container .json-editor .actions-container .beautify {
|
|
633
|
-
color: #fff;
|
|
634
|
-
text-align: center;
|
|
635
|
-
font-size: 1rem;
|
|
636
|
-
font-style: normal;
|
|
637
|
-
font-weight: 600;
|
|
638
|
-
line-height: 1.25rem;
|
|
639
|
-
width: 8.75rem;
|
|
640
|
-
padding: 0.625rem 2.25rem;
|
|
641
|
-
background-color: rgba(240, 248, 255, 0);
|
|
642
|
-
border-radius: 0.3125rem;
|
|
643
|
-
border: 1px solid #babdcc;
|
|
644
|
-
cursor: pointer;
|
|
645
|
-
}
|
|
646
|
-
.json-editor-container .json-editor .actions-container .beautify:disabled {
|
|
647
|
-
color: #a2a5b6;
|
|
648
|
-
border-color: #a2a5b6;
|
|
649
|
-
}
|
|
650
|
-
.json-editor-container .json-editor textarea {
|
|
651
|
-
width: 100%;
|
|
652
|
-
padding: 1.25rem;
|
|
653
|
-
font-size: 0.875rem;
|
|
654
|
-
font-style: normal;
|
|
655
|
-
font-weight: 400;
|
|
656
|
-
line-height: 1.25rem;
|
|
657
|
-
color: white;
|
|
658
|
-
height: 25rem;
|
|
659
|
-
background-color: #142452;
|
|
660
|
-
border: none;
|
|
661
|
-
resize: none;
|
|
662
|
-
}
|
|
663
|
-
.json-editor-container .json-editor textarea:focus, .json-editor-container .json-editor textarea:focus-within, .json-editor-container .json-editor textarea:focus-visible .json-editor-container .json-editor textarea:active {
|
|
664
|
-
outline: none;
|
|
665
|
-
border: none;
|
|
666
|
-
}
|
|
667
|
-
.json-editor-container .json-editor textarea::-webkit-scrollbar {
|
|
668
|
-
width: 0.5rem;
|
|
669
|
-
}
|
|
670
|
-
.json-editor-container .json-editor textarea::-webkit-scrollbar-track {
|
|
671
|
-
background-color: #828699;
|
|
672
|
-
border: none;
|
|
673
|
-
border-color: transparent;
|
|
674
|
-
border-top-left-radius: 0;
|
|
675
|
-
}
|
|
676
|
-
.json-editor-container .json-editor textarea::-webkit-scrollbar-thumb {
|
|
677
|
-
background-color: #d8dae5;
|
|
678
|
-
border: none;
|
|
679
|
-
border-color: transparent;
|
|
680
|
-
border-radius: 0;
|
|
480
|
+
margin-bottom: 0.625rem;
|
|
681
481
|
}
|
|
682
|
-
.
|
|
683
|
-
|
|
482
|
+
#common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-title.error-title {
|
|
483
|
+
color: #da3f3f;
|
|
684
484
|
}
|
|
685
|
-
.
|
|
686
|
-
color: #
|
|
687
|
-
font-size: 0.75rem;
|
|
688
|
-
line-height: 1.25rem;
|
|
689
|
-
margin-top: 0.625rem;
|
|
485
|
+
#common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-title.warning-title {
|
|
486
|
+
color: #faad14;
|
|
690
487
|
}
|
|
691
|
-
.
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
min-height: 64px;
|
|
488
|
+
#common-dialog.dialog-content-wrapper .dialog-content-root .dialog-content .common-dialog .confirmation-dialog-footer {
|
|
489
|
+
display: flex;
|
|
490
|
+
gap: 1.25rem;
|
|
491
|
+
margin-top: 1.875rem;
|
|
492
|
+
}.livePreviewContainer .titleContainer {
|
|
697
493
|
display: flex;
|
|
698
|
-
flex-direction: row;
|
|
699
494
|
justify-content: space-between;
|
|
700
495
|
align-items: center;
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
}
|
|
705
|
-
.containerTitleDrawer span {
|
|
706
|
-
color: #12131a;
|
|
707
|
-
font-weight: 600;
|
|
708
|
-
font-size: 18px;
|
|
709
|
-
line-height: 25px;
|
|
710
|
-
letter-spacing: 0em;
|
|
496
|
+
flex-wrap: wrap;
|
|
497
|
+
max-width: 100%;
|
|
498
|
+
gap: 1.25rem;
|
|
711
499
|
}
|
|
712
|
-
.
|
|
713
|
-
|
|
500
|
+
.livePreviewContainer .titleContainer p.apiName {
|
|
501
|
+
font-size: 40px;
|
|
502
|
+
line-height: 30px;
|
|
503
|
+
font-weight: 500;
|
|
504
|
+
word-wrap: break-word;
|
|
505
|
+
overflow-wrap: break-word;
|
|
506
|
+
word-break: break-all;
|
|
714
507
|
}
|
|
715
|
-
.
|
|
716
|
-
|
|
508
|
+
.livePreviewContainer .titleContainer .livePreviewChip {
|
|
509
|
+
background-color: #ebecf2;
|
|
510
|
+
color: #12131a;
|
|
717
511
|
}:root {
|
|
718
512
|
--white: #fff;
|
|
719
513
|
--Gray-5: #f1f2f6;
|
|
@@ -1054,4 +848,210 @@
|
|
|
1054
848
|
.tableSectionContainer .descArrow path,
|
|
1055
849
|
.tableSectionContainer .defaultSortArrow path {
|
|
1056
850
|
fill: var(--Gray-50);
|
|
851
|
+
}.tooltip-custom-wrapper {
|
|
852
|
+
display: flex;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
[data-tippy-root] {
|
|
856
|
+
z-index: 2 !important;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
.tippy-box {
|
|
860
|
+
background-color: #202f5b;
|
|
861
|
+
font-size: 0.875rem;
|
|
862
|
+
border-radius: 0.3125rem;
|
|
863
|
+
width: max-content;
|
|
864
|
+
max-width: 100%;
|
|
865
|
+
overflow-wrap: break-word;
|
|
866
|
+
word-break: break-word;
|
|
867
|
+
position: relative;
|
|
868
|
+
border: 1px solid #d8dae5;
|
|
869
|
+
z-index: 2;
|
|
870
|
+
}
|
|
871
|
+
.tippy-box.function .tippy-content {
|
|
872
|
+
background-color: #fff !important;
|
|
873
|
+
color: #000 !important;
|
|
874
|
+
}
|
|
875
|
+
.tippy-box.function[data-placement] > .tippy-arrow:before {
|
|
876
|
+
color: #fff !important;
|
|
877
|
+
}
|
|
878
|
+
.tippy-box.info .tippy-arrow {
|
|
879
|
+
color: #202f5b;
|
|
880
|
+
}
|
|
881
|
+
.tippy-box.success {
|
|
882
|
+
border-radius: 1.875rem;
|
|
883
|
+
background-color: #3aaa35;
|
|
884
|
+
padding-inline: 0.625rem;
|
|
885
|
+
}
|
|
886
|
+
.tippy-box .tippy-content {
|
|
887
|
+
text-align: justify;
|
|
888
|
+
font-size: 0.875rem;
|
|
889
|
+
line-height: 1.25rem;
|
|
890
|
+
padding: 0.625rem;
|
|
891
|
+
}
|
|
892
|
+
.tippy-box .tippy-arrow {
|
|
893
|
+
position: relative;
|
|
894
|
+
width: 1rem;
|
|
895
|
+
height: 1rem;
|
|
896
|
+
}
|
|
897
|
+
.tippy-box[data-placement^=top] .tippy-arrow:before {
|
|
898
|
+
bottom: -0.4375rem;
|
|
899
|
+
border-width: 0.5rem 0.5rem 0 !important;
|
|
900
|
+
}
|
|
901
|
+
.tippy-box[data-placement^=right] .tippy-arrow:before {
|
|
902
|
+
left: -0.4375rem;
|
|
903
|
+
border-width: 0.5rem 0.5rem 0.5rem 0 !important;
|
|
904
|
+
}
|
|
905
|
+
.tippy-box[data-placement^=bottom] .tippy-arrow:before {
|
|
906
|
+
top: -0.4375rem;
|
|
907
|
+
border-width: 0 0.5rem 0.5rem !important;
|
|
908
|
+
}
|
|
909
|
+
.tippy-box[data-placement^=left] .tippy-arrow:before {
|
|
910
|
+
right: -0.4375rem;
|
|
911
|
+
border-width: 0.5rem 0 0.5rem 0.5rem !important;
|
|
912
|
+
}
|
|
913
|
+
.tippy-box[data-placement^=bottom-start] .tippy-arrow {
|
|
914
|
+
transform: translate(0.937rem, 0) !important;
|
|
915
|
+
}
|
|
916
|
+
.tippy-box[data-placement^=bottom-end] .tippy-arrow {
|
|
917
|
+
margin-left: calc(100% - 1.937rem);
|
|
918
|
+
transform: translate(0, 0) !important;
|
|
919
|
+
}
|
|
920
|
+
.tippy-box[data-placement^=top-start] .tippy-arrow {
|
|
921
|
+
transform: translate(0.937rem, 0) !important;
|
|
922
|
+
}
|
|
923
|
+
.tippy-box[data-placement^=top-end] .tippy-arrow {
|
|
924
|
+
transform: translate(0.937rem, 0) !important;
|
|
925
|
+
}
|
|
926
|
+
.tippy-box.arrow-with-border {
|
|
927
|
+
border: 1px solid #d8dae5;
|
|
928
|
+
}
|
|
929
|
+
.tippy-box.arrow-with-border[data-placement] .tippy-arrow {
|
|
930
|
+
top: 1px;
|
|
931
|
+
background-color: white;
|
|
932
|
+
z-index: 2;
|
|
933
|
+
height: 1px;
|
|
934
|
+
}
|
|
935
|
+
.tippy-box.arrow-with-border[data-placement] .tippy-arrow:before {
|
|
936
|
+
width: 0.625rem;
|
|
937
|
+
height: 0.625rem;
|
|
938
|
+
background-color: white;
|
|
939
|
+
transform: rotate(45deg);
|
|
940
|
+
border: none;
|
|
941
|
+
border-left: 1px solid #d8dae5 !important;
|
|
942
|
+
border-top: 1px solid #d8dae5 !important;
|
|
943
|
+
z-index: 2;
|
|
944
|
+
top: -0.45rem;
|
|
945
|
+
transform-origin: center !important;
|
|
946
|
+
}.json-editor-container {
|
|
947
|
+
overflow: hidden;
|
|
948
|
+
border-bottom-right-radius: 0.3125rem;
|
|
949
|
+
border-bottom-left-radius: 0.3125rem;
|
|
950
|
+
}
|
|
951
|
+
.json-editor-container .json-editor-label {
|
|
952
|
+
font-size: 0.875rem;
|
|
953
|
+
font-weight: 600;
|
|
954
|
+
line-height: 1.25rem;
|
|
955
|
+
margin-bottom: 0.3125rem;
|
|
956
|
+
}
|
|
957
|
+
.json-editor-container .json-editor {
|
|
958
|
+
display: flex;
|
|
959
|
+
flex-direction: column;
|
|
960
|
+
background-color: #142452;
|
|
961
|
+
width: 100%;
|
|
962
|
+
outline: 1px solid transparent;
|
|
963
|
+
position: relative;
|
|
964
|
+
overflow: hidden;
|
|
965
|
+
}
|
|
966
|
+
.json-editor-container .json-editor .actions-container {
|
|
967
|
+
width: 100%;
|
|
968
|
+
height: 5rem;
|
|
969
|
+
padding: 1.25rem;
|
|
970
|
+
border-radius: 0 0 0.3125rem 0.3125rem;
|
|
971
|
+
background: #101e47;
|
|
972
|
+
display: flex;
|
|
973
|
+
flex-direction: row;
|
|
974
|
+
gap: 1.25rem;
|
|
975
|
+
align-items: center;
|
|
976
|
+
}
|
|
977
|
+
.json-editor-container .json-editor .actions-container .validate {
|
|
978
|
+
color: #fff;
|
|
979
|
+
text-align: center;
|
|
980
|
+
font-size: 1rem;
|
|
981
|
+
font-style: normal;
|
|
982
|
+
font-weight: 600;
|
|
983
|
+
line-height: 1.25rem;
|
|
984
|
+
width: 8.75rem;
|
|
985
|
+
padding: 0.625rem 2.25rem;
|
|
986
|
+
background-color: rgba(240, 248, 255, 0);
|
|
987
|
+
border-radius: 0.3125rem;
|
|
988
|
+
border: 0.0625rem solid #4d75d8;
|
|
989
|
+
cursor: pointer;
|
|
990
|
+
}
|
|
991
|
+
.json-editor-container .json-editor .actions-container .validate:disabled {
|
|
992
|
+
color: #babdcc;
|
|
993
|
+
border-color: #a2a5b6;
|
|
994
|
+
}
|
|
995
|
+
.json-editor-container .json-editor .actions-container .beautify {
|
|
996
|
+
color: #fff;
|
|
997
|
+
text-align: center;
|
|
998
|
+
font-size: 1rem;
|
|
999
|
+
font-style: normal;
|
|
1000
|
+
font-weight: 600;
|
|
1001
|
+
line-height: 1.25rem;
|
|
1002
|
+
width: 8.75rem;
|
|
1003
|
+
padding: 0.625rem 2.25rem;
|
|
1004
|
+
background-color: rgba(240, 248, 255, 0);
|
|
1005
|
+
border-radius: 0.3125rem;
|
|
1006
|
+
border: 1px solid #babdcc;
|
|
1007
|
+
cursor: pointer;
|
|
1008
|
+
}
|
|
1009
|
+
.json-editor-container .json-editor .actions-container .beautify:disabled {
|
|
1010
|
+
color: #a2a5b6;
|
|
1011
|
+
border-color: #a2a5b6;
|
|
1012
|
+
}
|
|
1013
|
+
.json-editor-container .json-editor textarea {
|
|
1014
|
+
width: 100%;
|
|
1015
|
+
padding: 1.25rem;
|
|
1016
|
+
font-size: 0.875rem;
|
|
1017
|
+
font-style: normal;
|
|
1018
|
+
font-weight: 400;
|
|
1019
|
+
line-height: 1.25rem;
|
|
1020
|
+
color: white;
|
|
1021
|
+
height: 25rem;
|
|
1022
|
+
background-color: #142452;
|
|
1023
|
+
border: none;
|
|
1024
|
+
resize: none;
|
|
1025
|
+
}
|
|
1026
|
+
.json-editor-container .json-editor textarea:focus, .json-editor-container .json-editor textarea:focus-within, .json-editor-container .json-editor textarea:focus-visible .json-editor-container .json-editor textarea:active {
|
|
1027
|
+
outline: none;
|
|
1028
|
+
border: none;
|
|
1029
|
+
}
|
|
1030
|
+
.json-editor-container .json-editor textarea::-webkit-scrollbar {
|
|
1031
|
+
width: 0.5rem;
|
|
1032
|
+
}
|
|
1033
|
+
.json-editor-container .json-editor textarea::-webkit-scrollbar-track {
|
|
1034
|
+
background-color: #828699;
|
|
1035
|
+
border: none;
|
|
1036
|
+
border-color: transparent;
|
|
1037
|
+
border-top-left-radius: 0;
|
|
1038
|
+
}
|
|
1039
|
+
.json-editor-container .json-editor textarea::-webkit-scrollbar-thumb {
|
|
1040
|
+
background-color: #d8dae5;
|
|
1041
|
+
border: none;
|
|
1042
|
+
border-color: transparent;
|
|
1043
|
+
border-radius: 0;
|
|
1044
|
+
}
|
|
1045
|
+
.json-editor-container .json-editor.invalid {
|
|
1046
|
+
outline: 1px solid #ce2828 !important;
|
|
1047
|
+
}
|
|
1048
|
+
.json-editor-container .error-message {
|
|
1049
|
+
color: #ce2828;
|
|
1050
|
+
font-size: 0.75rem;
|
|
1051
|
+
line-height: 1.25rem;
|
|
1052
|
+
margin-top: 0.625rem;
|
|
1053
|
+
}
|
|
1054
|
+
.json-editor-container.disabled .json-editor textarea {
|
|
1055
|
+
background-color: white;
|
|
1056
|
+
color: #12131a;
|
|
1057
1057
|
}
|
package/package.json
CHANGED
|
@@ -30,9 +30,11 @@ const InfoForm = ({ readOnly }: { readOnly?: boolean }) => {
|
|
|
30
30
|
if (values && values.components && values.components.securitySchemes) {
|
|
31
31
|
const authenticatorKeys = Object.keys(values.components.securitySchemes)
|
|
32
32
|
if (authenticatorKeys.length) {
|
|
33
|
+
const _authType = values.components.securitySchemes[authenticatorKeys[0]].scheme ||
|
|
34
|
+
values.components.securitySchemes[authenticatorKeys[0]].type;
|
|
35
|
+
|
|
33
36
|
setAuthType(
|
|
34
|
-
|
|
35
|
-
values.components.securitySchemes[authenticatorKeys[0]].type
|
|
37
|
+
_authType && _authType.toLowerCase() == 'public' ? 'Keyless': _authType
|
|
36
38
|
)
|
|
37
39
|
}
|
|
38
40
|
}
|