@bikdotai/bik-component-library 0.0.13-beta.36 → 0.0.13-beta.37

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../utils/unCamelCase.js");exports.ApiResponseHelper=class{convertToGroupOptions(r,i){var l;if(r){if(Array.isArray(r))return null!==(l=null==r?void 0:r.map((r=>{var l;return{label:e.unCamelCaseWithFirstUppercase(null!==(l=r.name)&&void 0!==l?l:r.id),value:r.id,descriptions:r.desc,selected:!!(null==i?void 0:i.find((e=>e===r.id)))}})))&&void 0!==l?l:[];{const l=[];return Object.keys(r).forEach((s=>{var n;const a=r[s],t=null!==(n=null==a?void 0:a.map((r=>{var l;return{label:e.unCamelCaseWithFirstUppercase(null!==(l=r.name)&&void 0!==l?l:r.id),value:r.id,descriptions:r.desc,selected:!!(null==i?void 0:i.find((e=>e===r.id)))}})))&&void 0!==n?n:[];l.push({label:s,options:t})})),l}}return[]}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../utils/unCamelCase.js");exports.ApiResponseHelper=class{convertToGroupOptions(i,r){var l;if(i){if(Array.isArray(i))return null!==(l=null==i?void 0:i.map((i=>{var l;return{label:e.unCamelCaseWithFirstUppercase(null!==(l=i.name)&&void 0!==l?l:i.id),value:i.id,descriptions:i.description,selected:!!(null==r?void 0:r.find((e=>e===i.id)))}})))&&void 0!==l?l:[];{const l=[];return Object.keys(i).forEach((s=>{var n;const t=i[s],a=null!==(n=null==t?void 0:t.map((i=>{var l;return{label:e.unCamelCaseWithFirstUppercase(null!==(l=i.name)&&void 0!==l?l:i.id),value:i.id,description:i.description,selected:!!(null==r?void 0:r.find((e=>e===i.id)))}})))&&void 0!==n?n:[];l.push({label:s,options:a})})),l}}return[]}};
@@ -9,7 +9,7 @@ export type QueryBuilderAPIPayload<T> = BaseQueryBuilderPayload<T> & {
9
9
  export type QueryBuilderAPIData = {
10
10
  id: string | number;
11
11
  name: string;
12
- desc?: string | null;
12
+ description?: string | null;
13
13
  type?: QueryBuilderConnectorType;
14
14
  needValuesRetrieval?: boolean;
15
15
  };
@@ -14,7 +14,7 @@
14
14
  border-bottom-style: solid;
15
15
  border-bottom-color: ${t.COLORS.stroke.primary};
16
16
  width: 100%;
17
- heigth: 100%;
17
+ height: 100%;
18
18
  `;const d=r.default.div`
19
19
  max-height: ${e=>"number"==typeof e.maxHeight?`${e.maxHeight}px`:e.maxHeight};
20
20
  overflow-y: auto;
@@ -1,3 +1,3 @@
1
1
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("styled-components"),n=require("../../../../checkBox/CheckBox.js"),s=require("../../../../list-item/ListItem.js"),i=require("../../../../TypographyStyle.js"),r=require("../../../../../constants/Theme.js"),o=require("./FreeFormMenu.styled.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const c=l(t).default(s.ListItem)`
2
2
  padding: 14px 16px !important;
3
- `;exports.MenuItem=t=>{let{option:s,isMultiSelect:l,showDescription:a,onSelect:u}=t;var d;function m(e){s.disabled||u(Object.assign(Object.assign({},s),{selected:e}))}return e.jsx(c,{onClick:e=>{e.preventDefault(),m(!s.selected)},onMouseOver:function(){s.descriptions?a(s.label,s.descriptions):a()},listItem:{value:s.value,label:s.label},subText:s.subText,leadingIcon:l?e.jsx(n.CheckBox,{isDisabled:null!==(d=s.disabled)&&void 0!==d&&d,isChecked:!!s.selected,onValueChange:m}):e.jsx(e.Fragment,{}),customComponent:s.customComponent,trailingIcon:s.isFreeForm?e.jsx(o.FreeFormContainer,{children:e.jsx(i.BodyCaption,Object.assign({style:{color:r.COLORS.content.secondary}},{children:"Freeform"}))}):s.trailingIcon?e.jsx(e.Fragment,{children:s.trailingIcon}):e.jsx(e.Fragment,{}),variant:s.disabled?"inactive":s.selected?"selected":"default"})};
3
+ `;exports.MenuItem=t=>{let{option:s,isMultiSelect:l,showDescription:a,onSelect:u}=t;var d;function m(e){s.disabled||u(Object.assign(Object.assign({},s),{selected:e}))}return e.jsx(c,{onClick:e=>{e.preventDefault(),m(!s.selected)},onMouseOver:function(){s.description?a(s.label,s.description):a()},listItem:{value:s.value,label:s.label},subText:s.subText,leadingIcon:l?e.jsx(n.CheckBox,{isDisabled:null!==(d=s.disabled)&&void 0!==d&&d,isChecked:!!s.selected,onValueChange:m}):e.jsx(e.Fragment,{}),customComponent:s.customComponent,trailingIcon:s.isFreeForm?e.jsx(o.FreeFormContainer,{children:e.jsx(i.BodyCaption,Object.assign({style:{color:r.COLORS.content.secondary}},{children:"Freeform"}))}):s.trailingIcon?e.jsx(e.Fragment,{children:s.trailingIcon}):e.jsx(e.Fragment,{}),variant:s.disabled?"inactive":s.selected?"selected":"default"})};
@@ -18,7 +18,7 @@ export type GroupedOption = {
18
18
  export type SingleOption = {
19
19
  label: string;
20
20
  value: string;
21
- descriptions?: string | null;
21
+ description?: string | null;
22
22
  selected?: boolean;
23
23
  disabled?: boolean;
24
24
  isFreeForm?: boolean;
@@ -1 +1 @@
1
- import{unCamelCaseWithFirstUppercase as l}from"../../../utils/unCamelCase.js";class e{convertToGroupOptions(e,i){var r;if(e){if(Array.isArray(e))return null!==(r=null==e?void 0:e.map((e=>{var r;return{label:l(null!==(r=e.name)&&void 0!==r?r:e.id),value:e.id,descriptions:e.desc,selected:!!(null==i?void 0:i.find((l=>l===e.id)))}})))&&void 0!==r?r:[];{const r=[];return Object.keys(e).forEach((n=>{var d;const o=e[n],s=null!==(d=null==o?void 0:o.map((e=>{var r;return{label:l(null!==(r=e.name)&&void 0!==r?r:e.id),value:e.id,descriptions:e.desc,selected:!!(null==i?void 0:i.find((l=>l===e.id)))}})))&&void 0!==d?d:[];r.push({label:n,options:s})})),r}}return[]}}export{e as ApiResponseHelper};
1
+ import{unCamelCaseWithFirstUppercase as i}from"../../../utils/unCamelCase.js";class l{convertToGroupOptions(l,e){var r;if(l){if(Array.isArray(l))return null!==(r=null==l?void 0:l.map((l=>{var r;return{label:i(null!==(r=l.name)&&void 0!==r?r:l.id),value:l.id,descriptions:l.description,selected:!!(null==e?void 0:e.find((i=>i===l.id)))}})))&&void 0!==r?r:[];{const r=[];return Object.keys(l).forEach((n=>{var o;const d=l[n],t=null!==(o=null==d?void 0:d.map((l=>{var r;return{label:i(null!==(r=l.name)&&void 0!==r?r:l.id),value:l.id,description:l.description,selected:!!(null==e?void 0:e.find((i=>i===l.id)))}})))&&void 0!==o?o:[];r.push({label:n,options:t})})),r}}return[]}}export{l as ApiResponseHelper};
@@ -9,7 +9,7 @@ export type QueryBuilderAPIPayload<T> = BaseQueryBuilderPayload<T> & {
9
9
  export type QueryBuilderAPIData = {
10
10
  id: string | number;
11
11
  name: string;
12
- desc?: string | null;
12
+ description?: string | null;
13
13
  type?: QueryBuilderConnectorType;
14
14
  needValuesRetrieval?: boolean;
15
15
  };
@@ -14,7 +14,7 @@ import o from"styled-components";import{COLORS as e}from"../../../../constants/T
14
14
  border-bottom-style: solid;
15
15
  border-bottom-color: ${e.stroke.primary};
16
16
  width: 100%;
17
- heigth: 100%;
17
+ height: 100%;
18
18
  `;const i=o.div`
19
19
  max-height: ${o=>"number"==typeof o.maxHeight?`${o.maxHeight}px`:o.maxHeight};
20
20
  overflow-y: auto;
@@ -1,3 +1,3 @@
1
1
  import{jsx as e,Fragment as t}from"react/jsx-runtime";import o from"styled-components";import{CheckBox as i}from"../../../../checkBox/CheckBox.js";import{ListItem as n}from"../../../../list-item/ListItem.js";import{BodyCaption as s}from"../../../../TypographyStyle.js";import{COLORS as r}from"../../../../../constants/Theme.js";import{FreeFormContainer as l}from"./FreeFormMenu.styled.js";const c=o(n)`
2
2
  padding: 14px 16px !important;
3
- `,a=o=>{let{option:n,isMultiSelect:a,showDescription:m,onSelect:d}=o;var p;function u(e){n.disabled||d(Object.assign(Object.assign({},n),{selected:e}))}return e(c,{onClick:e=>{e.preventDefault(),u(!n.selected)},onMouseOver:function(){n.descriptions?m(n.label,n.descriptions):m()},listItem:{value:n.value,label:n.label},subText:n.subText,leadingIcon:a?e(i,{isDisabled:null!==(p=n.disabled)&&void 0!==p&&p,isChecked:!!n.selected,onValueChange:u}):e(t,{}),customComponent:n.customComponent,trailingIcon:n.isFreeForm?e(l,{children:e(s,Object.assign({style:{color:r.content.secondary}},{children:"Freeform"}))}):n.trailingIcon?e(t,{children:n.trailingIcon}):e(t,{}),variant:n.disabled?"inactive":n.selected?"selected":"default"})};export{a as MenuItem};
3
+ `,a=o=>{let{option:n,isMultiSelect:a,showDescription:m,onSelect:d}=o;var p;function u(e){n.disabled||d(Object.assign(Object.assign({},n),{selected:e}))}return e(c,{onClick:e=>{e.preventDefault(),u(!n.selected)},onMouseOver:function(){n.description?m(n.label,n.description):m()},listItem:{value:n.value,label:n.label},subText:n.subText,leadingIcon:a?e(i,{isDisabled:null!==(p=n.disabled)&&void 0!==p&&p,isChecked:!!n.selected,onValueChange:u}):e(t,{}),customComponent:n.customComponent,trailingIcon:n.isFreeForm?e(l,{children:e(s,Object.assign({style:{color:r.content.secondary}},{children:"Freeform"}))}):n.trailingIcon?e(t,{children:n.trailingIcon}):e(t,{}),variant:n.disabled?"inactive":n.selected?"selected":"default"})};export{a as MenuItem};
@@ -18,7 +18,7 @@ export type GroupedOption = {
18
18
  export type SingleOption = {
19
19
  label: string;
20
20
  value: string;
21
- descriptions?: string | null;
21
+ description?: string | null;
22
22
  selected?: boolean;
23
23
  disabled?: boolean;
24
24
  isFreeForm?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.13-beta.36",
3
+ "version": "0.0.13-beta.37",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",