@bikdotai/bik-component-library 0.0.536-beta.tp-5 → 0.0.536-beta.tp-6
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/cjs/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/cjs/components/template-context-mapper/modalElements/QueryParamsComponent.js +3 -3
- package/dist/esm/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/esm/components/template-context-mapper/modalElements/QueryParamsComponent.js +3 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/delete.svg.js"),n=require("../../../assets/icons/PlusIcon.js"),s=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/delete.svg.js"),n=require("../../../assets/icons/PlusIcon.js"),s=require("react"),i=require("styled-components"),a=require("../../button/Button.js"),r=require("../../checkBox/CheckBox.js"),l=require("../../icon-button/IconButton.js"),o=require("../../input/Input.js"),c=require("../../TypographyStyle.js"),u=require("../../../constants/Theme.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const p=d(i).default.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
.button-container {
|
|
7
7
|
display: flex;
|
|
8
8
|
justify-content: center;
|
|
9
|
-
padding:
|
|
9
|
+
padding: 12px !important;
|
|
10
10
|
}
|
|
11
|
-
`;exports.QueryParamsComponent=
|
|
11
|
+
`;exports.QueryParamsComponent=i=>{const{params:d,onChange:j,isError:x}=i,[h,y]=s.useState(d.length>0),[g,f]=s.useState(d);return e.jsxs(p,{children:[e.jsxs("div",Object.assign({style:{display:"flex"}},{children:[e.jsx(r.CheckBox,{isChecked:h,onValueChange:e=>{f([]),j([]),y(e)}}),e.jsx(c.TitleSmall,Object.assign({style:{marginLeft:8}},{children:"Add custom query params"}))]})),h&&g.map(((n,s)=>e.jsxs("div",Object.assign({style:{display:"flex",gap:"8px"}},{children:[e.jsx(o.Input,{placeholder:"Key",value:n.key,onChangeText:e=>{const t=g.map(((t,n)=>n===s?Object.assign(Object.assign({},t),{key:e}):t));f(t),j(t)},state:x&&!n.key.length?"invalid":"none"}),e.jsx(o.Input,{placeholder:"Value",value:n.value,onChangeText:e=>{const t=g.map(((t,n)=>n===s?Object.assign(Object.assign({},t),{value:e}):t));f(t),j(t)},state:x&&!n.value.length?"invalid":"none"}),e.jsx(l.IconButton,{Icon:t.default,width:20,height:20,onClick:()=>{const e=g.filter(((e,t)=>t!=s));f(e),j(e)}})]}),s))),h&&d.length<10&&e.jsx(a.Button,{buttonText:"Add Params",buttonType:"dashRegular",style:{display:"flex",alignItems:"center",justifyContent:"center"},IconComponent:()=>e.jsx("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px"}},{children:e.jsx(n.default,{width:16,height:16,color:u.COLORS.content.primary})})),onClick:()=>{const e=[...g,{key:"",value:""}];f(e),j(e)}})]})};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import n from"../../../assets/icons/delete.svg.js";import o from"../../../assets/icons/PlusIcon.js";import{useState as s}from"react";import i from"styled-components";import{Button as a}from"../../button/Button.js";import{CheckBox as r}from"../../checkBox/CheckBox.js";import{IconButton as l}from"../../icon-button/IconButton.js";import{Input as c}from"../../input/Input.js";import{
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import n from"../../../assets/icons/delete.svg.js";import o from"../../../assets/icons/PlusIcon.js";import{useState as s}from"react";import i from"styled-components";import{Button as a}from"../../button/Button.js";import{CheckBox as r}from"../../checkBox/CheckBox.js";import{IconButton as l}from"../../icon-button/IconButton.js";import{Input as c}from"../../input/Input.js";import{TitleSmall as p}from"../../TypographyStyle.js";import{COLORS as m}from"../../../constants/Theme.js";const d=i=>{const{params:d,onChange:g,isError:u}=i,[y,f]=s(d.length>0),[j,x]=s(d);return e(h,{children:[e("div",Object.assign({style:{display:"flex"}},{children:[t(r,{isChecked:y,onValueChange:e=>{x([]),g([]),f(e)}}),t(p,Object.assign({style:{marginLeft:8}},{children:"Add custom query params"}))]})),y&&j.map(((o,s)=>e("div",Object.assign({style:{display:"flex",gap:"8px"}},{children:[t(c,{placeholder:"Key",value:o.key,onChangeText:e=>{const t=j.map(((t,n)=>n===s?Object.assign(Object.assign({},t),{key:e}):t));x(t),g(t)},state:u&&!o.key.length?"invalid":"none"}),t(c,{placeholder:"Value",value:o.value,onChangeText:e=>{const t=j.map(((t,n)=>n===s?Object.assign(Object.assign({},t),{value:e}):t));x(t),g(t)},state:u&&!o.value.length?"invalid":"none"}),t(l,{Icon:n,width:20,height:20,onClick:()=>{const e=j.filter(((e,t)=>t!=s));x(e),g(e)}})]}),s))),y&&d.length<10&&t(a,{buttonText:"Add Params",buttonType:"dashRegular",style:{display:"flex",alignItems:"center",justifyContent:"center"},IconComponent:()=>t("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px"}},{children:t(o,{width:16,height:16,color:m.content.primary})})),onClick:()=>{const e=[...j,{key:"",value:""}];x(e),g(e)}})]})},h=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: 12px;
|
|
@@ -6,6 +6,6 @@ import{jsxs as e,jsx as t}from"react/jsx-runtime";import n from"../../../assets/
|
|
|
6
6
|
.button-container {
|
|
7
7
|
display: flex;
|
|
8
8
|
justify-content: center;
|
|
9
|
-
padding:
|
|
9
|
+
padding: 12px !important;
|
|
10
10
|
}
|
|
11
|
-
`;export{
|
|
11
|
+
`;export{d as QueryParamsComponent};
|