hrm_ui_lib 2.0.0-alpha.37 → 2.0.0-alpha.38
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/components/Alert/consts.d.ts +3 -2
- package/components/Alert/consts.js +1 -1
- package/components/Checkbox/Checkbox.js +6 -6
- package/components/Checkbox/consts.d.ts +3 -0
- package/components/Checkbox/consts.js +1 -0
- package/components/DatePicker/CustomHeader/CustomHeader.js +2 -2
- package/components/Select/FilterSelect/FilterSelect.js +3 -3
- package/components/Select/MultiSelect/MultiSelect.js +3 -3
- package/components/Select/MultiSelect/OptionsWrapper.js +1 -1
- package/components/Select/SharedComponents/Actions.js +2 -2
- package/components/Snackbar/consts.d.ts +3 -2
- package/components/Snackbar/consts.js +1 -1
- package/components/TableV2/AdvancedPagination.js +3 -3
- package/components/TableV2/ColumnSettings.js +2 -2
- package/helperComponents/ErrorMessage/ErrorMessage.js +3 -1
- package/helperComponents/ErrorMessage/consts.d.ts +3 -0
- package/helperComponents/ErrorMessage/consts.js +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TSVGIconType } from '../SVGIcons/types';
|
|
2
2
|
import type React from 'react';
|
|
3
|
+
import { IconComponent } from '../SVGIcons/icon-registry';
|
|
3
4
|
export declare const TYPE_MAPPING: {
|
|
4
5
|
[key: string]: TSVGIconType;
|
|
5
6
|
};
|
|
6
|
-
export declare const ICONS_MAPPING: Record<string, React.LazyExoticComponent<
|
|
7
|
+
export declare const ICONS_MAPPING: Record<string, React.LazyExoticComponent<IconComponent>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getIcon as n}from"../SVGIcons/icon-registry.js";const r={warning:"warning",success:"success",error:"danger",information:"information",discovery:"discovery"},i={warning:n("IconWarningFilled"),success:n("IconCheckmarkFilled"),error:n("IconErrorCircleFilled"),information:n("IconInfoFilled"),discovery:n("IconInfoFilled")};export{i as ICONS_MAPPING,r as TYPE_MAPPING};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{jsx as e,jsxs as o,Fragment as d}from"react/jsx-runtime";import{forwardRef as
|
|
2
|
-
/* @__PURE__ */e(
|
|
3
|
-
return e(d,{children:/* @__PURE__ */o("label",{className:
|
|
4
|
-
/* @__PURE__ */e("input",{"data-id":
|
|
5
|
-
/* @__PURE__ */e("span",{className:"controller__icon"}),
|
|
6
|
-
/* @__PURE__ */o("div",{className:"flexbox",children:[
|
|
1
|
+
import{jsx as e,jsxs as o,Fragment as d}from"react/jsx-runtime";import{forwardRef as $,useRef as A,useMemo as F,Suspense as M}from"react";import O from"classnames";import{Popover as S}from"../Popover/Popover.js";import{Link as T}from"../Link/Link.js";import{Text as m}from"../Text/Text.js";import q from"../SVGIcons/IconInfo.js";import{ICONS_MAPPING as w}from"./consts.js";const B=$((l,a)=>{const{label:r,disabled:s,required:n=!1,link:i,name:c,setFieldValue:t,selectedValue:p,value:h,className:b="",iconProps:u={name:"checkmark"},dataId:k="",onClick:f,beforeLink:x,afterLink:N,helperText:y="",popoverAddons:_,isInvalid:v,stopPropagation:I=!1}=l,g=A(null),j=a&&Object.keys(a).length?a:g,P=!!h||p,C=w[u.name]||null,L=e=>{I&&e.stopPropagation(),c&&t&&t(c,!P,{shouldValidate:!P}),f&&f(!P)},$=_?/* @__PURE__ */e(S,{id:`${_.id}`,..._,children:/* @__PURE__ */e("div",{id:`${_.id}`,children:/* @__PURE__ */e(q,{dataId:`${k}-icon`,type:"information",size:"xsmall",className:"ml-4 pointer",onClick:L})})}):null,V=F(()=>r?"string"!=typeof r?r:/* @__PURE__ */e(m,i?{type:s?"disabled":"primary",className:"controller__label",children:/* @__PURE__ */o(d,{children:[x&&/* @__PURE__ */e("span",{className:"mr-4",children:x}),
|
|
2
|
+
/* @__PURE__ */e(T,{dataId:k,url:i,target:"_blank",children:r}),N&&/* @__PURE__ */e("span",{className:"ml-4",children:N}),n&&/* @__PURE__ */e("sup",{children:"*"})]})}:{type:s?"disabled":"primary",className:"controller__label",children:/* @__PURE__ */o(d,{children:[r,n&&/* @__PURE__ */e("sup",{children:"*"})]})}):null,[r,i]);/* @__PURE__ */
|
|
3
|
+
return e(d,{children:/* @__PURE__ */o("label",{className:O("controller",{"controller--checkbox":!0,"controller--disabled":s,"controller--error":v,[b]:!!b}),onClick:e=>I&&e.stopPropagation(),children:[
|
|
4
|
+
/* @__PURE__ */e("input",{"data-id":k,type:"checkbox",ref:j,tabIndex:0,onChange:L,checked:!!P,disabled:s}),
|
|
5
|
+
/* @__PURE__ */e("span",{className:"controller__icon",children:C&&/* @__PURE__ */e(M,{fallback:null,children:/* @__PURE__ */e(C,{size:"xxsmall",type:s?"disabled":"inverse",className:"controller__mark"})})}),V?/* @__PURE__ */o("div",{className:"controller__right",children:[
|
|
6
|
+
/* @__PURE__ */o("div",{className:"flexbox",children:[V,$]}),y?/* @__PURE__ */e(m,{size:"small",type:s?"disabled":"secondary",children:y}):null]}):null]})})});B.displayName="Checkbox";export{B as Checkbox};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getIcon as c}from"../SVGIcons/icon-registry.js";const r={checkmark:c("IconCheckmark")};export{r as ICONS_MAPPING};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{jsxs as p,jsx as r}from"react/jsx-runtime";import"../../Select/Select/Select.js";import"../../Select/MultiSelect/MultiSelect.js";import"react";import"../../Input/Input.js";import"classnames";import{noop as d,getYearOptions as N}from"../../../utils/helpers.js";import"../../../consts/index.js";import"../../../context/types.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import{ButtonSelect as h}from"../../Select/ButtonSelect/ButtonSelect.js";import C from"../../SVGIcons/IconChevronLeft.js";import S from"../../SVGIcons/IconChevronRight.js";import{generateMonthOptions as Y}from"./helpers.js";const
|
|
1
|
+
import{jsxs as p,jsx as r}from"react/jsx-runtime";import"../../Select/Select/Select.js";import"../../Select/MultiSelect/MultiSelect.js";import"react";import"../../Input/Input.js";import"classnames";import{noop as d,getYearOptions as N}from"../../../utils/helpers.js";import"../../../consts/index.js";import"../../../context/types.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import"../../../helperComponents/ErrorMessage/consts.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import{ButtonSelect as h}from"../../Select/ButtonSelect/ButtonSelect.js";import C from"../../SVGIcons/IconChevronLeft.js";import S from"../../SVGIcons/IconChevronRight.js";import{generateMonthOptions as Y}from"./helpers.js";const J=e=>{const{date:t,dataPrefix:o,changeYear:s,changeMonth:l,decreaseMonth:a,increaseMonth:i,startYear:n,endYear:c,prevMonthButtonDisabled:m,nextMonthButtonDisabled:u,locale:f,isMobile:j=!1}=e,I=Y(f),x=null==t?void 0:t.getMonth(),b=null==t?void 0:t.getFullYear();/* @__PURE__ */
|
|
2
2
|
return p("div",{className:"flexbox custom_header_container",children:[
|
|
3
3
|
/* @__PURE__ */r(C,{size:"small",className:"cursor-pointer",dataId:o?`${o}-prev-month-button`:"",onClick:m?d:a,type:m?"disabled":"primary"}),
|
|
4
4
|
/* @__PURE__ */p("div",{className:"selects_container",children:[
|
|
5
5
|
/* @__PURE__ */r(h,{size:"small",type:"tertiary",className:"date_picker_select",offsets:j?{}:{top:42,left:48},placeHolder:(e=>{const t=I.find(t=>t.value===e);return null==t?void 0:t.label.toString()})(x),dataId:o?`${o}-month-select`:"",options:I,selectedItem:x,setSelectedItem:e=>l(e),dropdownWidth:150,isRequiredField:!0}),
|
|
6
6
|
/* @__PURE__ */r(h,{type:"tertiary",className:"date_picker_select",offsets:j?{}:{top:42,left:138},placeHolder:b.toString(),dataId:o?`${o}-year-select`:"",size:"small",options:N(n,c),selectedItem:b,setSelectedItem:e=>s(e),dropdownWidth:100,isRequiredField:!0})]}),
|
|
7
|
-
/* @__PURE__ */r(S,{size:"small",className:"cursor-pointer",dataId:o?`${o}-next-month-button`:"",onClick:u?d:i,type:u?"disabled":"primary"})]})};export{
|
|
7
|
+
/* @__PURE__ */r(S,{size:"small",className:"cursor-pointer",dataId:o?`${o}-next-month-button`:"",onClick:u?d:i,type:u?"disabled":"primary"})]})};export{J as CustomHeader};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsx as t,Fragment as y,jsxs as z}from"react/jsx-runtime";import{useState as c,useId as G,useCallback as h}from"react";import{createPortal as H}from"react-dom";import{useHideOnScroll as L}from"../../../hooks/useHideOnScroll.js";import"../../../context/types.js";import{useOnOutsideClick as A}from"../../../hooks/useOnOutsideClick.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import{FilterDropdownContent as B}from"./FilterDropdown.js";import{FilterGroupDropdownContent as q}from"./FilterGroupDropdown.js";import{Footer as E}from"../SharedComponents/Footer.js";import"classnames";import"dayjs";import"../../../consts/index.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import"motion/react";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../SharedComponents/ContentTop.js";import{Loading as J}from"../SharedComponents/Loading.js";import{Input as K}from"../../Input/Input.js";import M from"../../SVGIcons/IconSearchFilled.js";import Q from"../../SVGIcons/IconDismissFilled.js";const
|
|
2
|
-
/* @__PURE__ */t("div",{className:"select filter",children:/* @__PURE__ */z("div",{className:"select__options",ref:
|
|
1
|
+
import{jsx as t,Fragment as y,jsxs as z}from"react/jsx-runtime";import{useState as c,useId as G,useCallback as h}from"react";import{createPortal as H}from"react-dom";import{useHideOnScroll as L}from"../../../hooks/useHideOnScroll.js";import"../../../context/types.js";import{useOnOutsideClick as A}from"../../../hooks/useOnOutsideClick.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import{FilterDropdownContent as B}from"./FilterDropdown.js";import{FilterGroupDropdownContent as q}from"./FilterGroupDropdown.js";import{Footer as E}from"../SharedComponents/Footer.js";import"classnames";import"dayjs";import"../../../consts/index.js";import"../../../helperComponents/ErrorMessage/consts.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import"motion/react";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../SharedComponents/ContentTop.js";import{Loading as J}from"../SharedComponents/Loading.js";import{Input as K}from"../../Input/Input.js";import M from"../../SVGIcons/IconSearchFilled.js";import Q from"../../SVGIcons/IconDismissFilled.js";const Se=e=>{const{isLoading:o,isGrouped:s,options:r,isOpen:l,setFieldValue:n,name:a,footerButtonProps:i,selectedItems:p,setSelectedItems:m,closeHandler:d,parentRef:u,language:f="en",...j}=e,[C,S]=c(null),[F,I]=c(p),[g,k]=c("");A(C,d,l,G()),L(d);const v=h(e=>{I(o=>[...o,e])},[]),x=e=>{m&&m(e),a&&n&&n(a,e),d()},D=e=>void 0!==F.find(o=>o.value===e),_=h(()=>{x(F),d()},[F]),O=({value:e})=>{I(o=>o.filter(o=>o.value!==e))};return l?/* @__PURE__ */t(y,{children:H(
|
|
2
|
+
/* @__PURE__ */t("div",{className:"select filter",children:/* @__PURE__ */z("div",{className:"select__options",ref:S,children:[
|
|
3
3
|
/* @__PURE__ */t(K,{onChange:e=>{e.preventDefault(),e.stopPropagation(),k(e.target.value)},className:"filter__input",size:"small",currentValue:g,rightIconProps:{size:""===g?"small":"xsmall",Component:""===g?M:Q,onClick:()=>{k("")}}}),
|
|
4
|
-
/* @__PURE__ */t("div",{className:"select__options__scroll scrollbar scrollbar--vertical ",children:o?/* @__PURE__ */t(J,{}):/* @__PURE__ */t(s?q:B,{checkIsSelected:D,onItemDeselect:O,filterValue:g,onItemSelect:v,options:r,...j})}),o?null:/* @__PURE__ */t(E,{buttonProps:i,onCancel:()=>{x(p),I(p),d()},onApply:_,language:f})]})}),u)}):null};export{
|
|
4
|
+
/* @__PURE__ */t("div",{className:"select__options__scroll scrollbar scrollbar--vertical ",children:o?/* @__PURE__ */t(J,{}):/* @__PURE__ */t(s?q:B,{checkIsSelected:D,onItemDeselect:O,filterValue:g,onItemSelect:v,options:r,...j})}),o?null:/* @__PURE__ */t(E,{buttonProps:i,onCancel:()=>{x(p),I(p),d()},onApply:_,language:f})]})}),u)}):null};export{Se as FilterSelect};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsx as f,jsxs as U,Fragment as V}from"react/jsx-runtime";import{forwardRef as X,useState as l,useMemo as Y,useEffect as C,useId as Z}from"react";import{OptionsWrapper as $}from"./OptionsWrapper.js";import{Footer as ee}from"../SharedComponents/Footer.js";import"classnames";import"react-dom";import"../../../consts/index.js";import"../../../context/types.js";import{useOnOutsideClick as oe}from"../../../hooks/useOnOutsideClick.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import"dayjs";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import"motion/react";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../SharedComponents/ContentTop.js";import{InputSelectWrapper as te}from"../SharedComponents/InputSelectWrapper/InputSelectWrapper.js";import{ButtonSelectWrapper as re}from"../SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js";import{useIsMobile as ne}from"../../../hooks/useGetIsMobile.js";import{SELECT_TRANSLATIONS as se}from"../localization.js";const le=X((e,o)=>{const{isMobileFullScreen:
|
|
2
|
-
return f(L,{dropdownRef:v,isOpen:
|
|
3
|
-
/* @__PURE__ */f($,{options:
|
|
1
|
+
import{jsx as f,jsxs as U,Fragment as V}from"react/jsx-runtime";import{forwardRef as X,useState as l,useMemo as Y,useEffect as C,useId as Z}from"react";import{OptionsWrapper as $}from"./OptionsWrapper.js";import{Footer as ee}from"../SharedComponents/Footer.js";import"classnames";import"react-dom";import"../../../consts/index.js";import"../../../context/types.js";import{useOnOutsideClick as oe}from"../../../hooks/useOnOutsideClick.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import"dayjs";import"../../../helperComponents/ErrorMessage/consts.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import"motion/react";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../SharedComponents/ContentTop.js";import{InputSelectWrapper as te}from"../SharedComponents/InputSelectWrapper/InputSelectWrapper.js";import{ButtonSelectWrapper as re}from"../SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js";import{useIsMobile as ne}from"../../../hooks/useGetIsMobile.js";import{SELECT_TRANSLATIONS as se}from"../localization.js";const le=X((e,o)=>{const{isMobileFullScreen:s=!0,options:t,footerButtonProps:r,selectedItems:n,setSelectedItems:a,name:p,setFieldValue:i,value:d,label:c,placeHolder:m,isRequiredField:u,labelAddons:h,className:S="",disabled:j,dropdownWidth:b,align:I="left",size:x,isButtonSelect:O,checkboxInfo:g,translations:F,hasError:W,language:k="en",hideSelectedOptions:w=!1,...R}=e,[v,M]=l(null),z=d||n||[],[E,T]=l(!1),[y,A]=l(z),[B,N]=l(null),D=()=>T(!1),G=Y(()=>(null==y?void 0:y.length)!==(null==z?void 0:z.length)||-1!==(null==y?void 0:y.findIndex(e=>-1===(null==z?void 0:z.findIndex(o=>o.value===e.value)))),[y,z]);C(()=>{A(d||[])},[d]),C(()=>{n&&A(n||[])},[n]);const q=()=>{A(z),D()};oe(B,q,E,Z());const H=(e=!1)=>{((e,o)=>{a&&a(e,o),p&&i&&i(p,e),D()})(y,e)},L=O?re:te,P={...se[k],...F},X=ne();/* @__PURE__ */
|
|
2
|
+
return f(L,{dropdownRef:v,isOpen:E,setIsOpen:T,containerRef:B,setContainerRef:N,dropdownWidth:b,setDropdownRef:M,size:x,label:c,align:I,disabled:j,className:S,labelAddons:h,placeHolder:m,selectedValues:y,isRequiredField:u,overflowText:P.overflowText,hasError:W,applySelectedItems:H,isMobile:X&&s,hideSelectedOptions:w,children:/* @__PURE__ */U(V,{children:[
|
|
3
|
+
/* @__PURE__ */f($,{options:t,isOpen:E,translations:P,setIsOpen:T,dropdownRef:v,openDropdown:()=>T(!0),selectedValues:y,setSelectedValues:A,containerRef:B,dropdownWidth:b,isMobileFullScreen:s,...R}),!t.length||X&&s?null:/* @__PURE__ */f(ee,{checkboxInfo:g,hasChange:G,buttonProps:r,onCancel:q,onApply:H,language:k})]})})});le.displayName="MultiSelect";export{le as MultiSelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as u}from"react/jsx-runtime";import{useRef as v,useCallback as B,useMemo as L}from"react";import"classnames";import"../../Checkbox/Checkbox.js";import"react-dom";import{useGetElemSizes as R}from"../../../hooks/useGetElemSizes.js";import"../../../consts/index.js";import"../../../context/types.js";import"../../../hooks/useScreenSize.js";import{useGetHasBottomSpace as V,useGetHasTopSpace as x}from"../../../hooks/useGetHasBottomSpace.js";import"react-hook-form";import{getStringWidth as y}from"../../../utils/helpers.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"motion/react";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../SharedComponents/ContentTop.js";import{Loading as D}from"../SharedComponents/Loading.js";import"../../Input/Input.js";import{useIsMobile as H}from"../../../hooks/useGetIsMobile.js";import{MultiSelectGrouped as k}from"./MultiSelectGrouped/MultiSelectGrouped.js";import{MultiBase as N}from"./MultiBase/MultiBase.js";import{MultiSelectWithTabs as j}from"./MultiSelectWithTabs/MultiSelectWithTabs.js";import{SELECTED_VISIBLE_MIN_COUNT as z}from"../constants.js";const
|
|
1
|
+
import{jsx as u}from"react/jsx-runtime";import{useRef as v,useCallback as B,useMemo as L}from"react";import"classnames";import"../../Checkbox/Checkbox.js";import"react-dom";import{useGetElemSizes as R}from"../../../hooks/useGetElemSizes.js";import"../../../consts/index.js";import"../../../context/types.js";import"../../../hooks/useScreenSize.js";import{useGetHasBottomSpace as V,useGetHasTopSpace as x}from"../../../hooks/useGetHasBottomSpace.js";import"react-hook-form";import{getStringWidth as y}from"../../../utils/helpers.js";import"../../../helperComponents/ErrorMessage/consts.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"motion/react";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../SharedComponents/ContentTop.js";import{Loading as D}from"../SharedComponents/Loading.js";import"../../Input/Input.js";import{useIsMobile as H}from"../../../hooks/useGetIsMobile.js";import{MultiSelectGrouped as k}from"./MultiSelectGrouped/MultiSelectGrouped.js";import{MultiBase as N}from"./MultiBase/MultiBase.js";import{MultiSelectWithTabs as j}from"./MultiSelectWithTabs/MultiSelectWithTabs.js";import{SELECTED_VISIBLE_MIN_COUNT as z}from"../constants.js";const ft=e=>{const{isLoading:t,withTabs:o,isGrouped:s,isOpen:r,containerRef:i,options:a,selectedValues:l,setSelectedValues:p,setIsOpen:m,dropdownRef:n,isMobileFullScreen:c,...S}=e,{width:d}=R(i),h=v(null),f=o?j:s?k:N,M=B(e=>y(e,14)>d-80,[d]),b=L(()=>s||o?a.reduce((e,t)=>{const{data:o}=t;return e+o.length},0):a.length,[a]),{hasBottomSpace:C,bottomSpace:G}=V({element:n,input:h.current}),I=x({element:n,input:h.current}),g=H()&&c;return t?/* @__PURE__ */u(D,{}):/* @__PURE__ */u(f,{options:a,isOpen:r,isMobile:g,hasBottomSpace:C,selectedValues:l,onItemSelect:e=>{p([...l,e])},onItemDeselect:e=>{p(l.filter(t=>t.value!==e.value))},setSelectedValues:p,closeDropdown:()=>m(!1),checkIsValueOverflowed:M,isSearchAvailable:b>z,scrollableContentStyle:{...C||I?{}:{maxHeight:G-65-56}},...S})};export{ft as OptionsWrapper};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsxs as i,jsx as t}from"react/jsx-runtime";import{useState as s}from"react";import{Button as u}from"../../Button/Button.js";import{Menu as f}from"../../Menu/Menu.js";import"react-dom";import"../../../consts/index.js";import"../../../context/types.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import"classnames";import"motion/react";import{Text as b}from"../../Text/Text.js";import"dayjs";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import d from"../../SVGIcons/IconMore.js";const
|
|
1
|
+
import{jsxs as i,jsx as t}from"react/jsx-runtime";import{useState as s}from"react";import{Button as u}from"../../Button/Button.js";import{Menu as f}from"../../Menu/Menu.js";import"react-dom";import"../../../consts/index.js";import"../../../context/types.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import"classnames";import"motion/react";import{Text as b}from"../../Text/Text.js";import"dayjs";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../../../helperComponents/ErrorMessage/consts.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import d from"../../SVGIcons/IconMore.js";const P=o=>{const{selectActions:e,innerLabel:r}=o,[n,a]=s(!1),[l,m]=s(null);return e.length?/* @__PURE__ */i("div",{className:"action-bar",children:[r?/* @__PURE__ */t(b,{size:"xsmall",type:"secondary",className:"action-bar__label",children:r}):null,
|
|
2
2
|
/* @__PURE__ */i("div",{ref:m,className:"action-bar__right",children:[
|
|
3
|
-
/* @__PURE__ */t(u,{type:"tertiary",onClick:()=>a(!0),iconProps:{Component:d},size:"small"}),l?/* @__PURE__ */t(f,{menuItems:e,parentRef:l,onClose:()=>a(!1),position:"bottom-left",isOpen:n}):null]})]}):null};export{
|
|
3
|
+
/* @__PURE__ */t(u,{type:"tertiary",onClick:()=>a(!0),iconProps:{Component:d},size:"small"}),l?/* @__PURE__ */t(f,{menuItems:e,parentRef:l,onClose:()=>a(!1),position:"bottom-left",isOpen:n}):null]})]}):null};export{P as Actions};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TSVGIconType } from '../SVGIcons/types';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { IconComponent } from '../SVGIcons/icon-registry';
|
|
3
4
|
export declare const TYPE_MAPPING: {
|
|
4
5
|
[key: string]: TSVGIconType;
|
|
5
6
|
};
|
|
6
|
-
export declare const ICONS_MAPPING: Record<string, React.LazyExoticComponent<
|
|
7
|
+
export declare const ICONS_MAPPING: Record<string, React.LazyExoticComponent<IconComponent>>;
|
|
7
8
|
export declare const DEFAULT_DURATION = 6000;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getIcon as n}from"../SVGIcons/icon-registry.js";const o={warning:"warning",success:"success",error:"danger",information:"information"},c={warning:n("IconWarningFilled"),success:n("IconCheckmarkFilled"),error:n("IconErrorCircleFilled"),information:n("IconInfoFilled")},i=6e3;export{i as DEFAULT_DURATION,c as ICONS_MAPPING,o as TYPE_MAPPING};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as r,jsx as i}from"react/jsx-runtime";import{useState as v,useEffect as C}from"react";import{Input as x}from"../Input/Input.js";import{Button as N}from"../Button/Button.js";import{Select as _}from"../Select/Select/Select.js";import"../Select/MultiSelect/MultiSelect.js";import I from"classnames";import{Text as z}from"../Text/Text.js";import"../../consts/index.js";import"../../context/types.js";import"../../hooks/useScreenSize.js";import"react-hook-form";import"dayjs";import"../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../Checkbox/Checkbox.js";import"react-dom";import"motion/react";import S from"../SVGIcons/IconChevronRight.js";import"../Collapse/CollapseGroup/CollapseGroup.js";import m from"../SVGIcons/IconMore.js";import"../Select/SharedComponents/ContentTop.js";import{OPTIONS as k}from"./constants/index.js";import $ from"../SVGIcons/IconChevronLeft.js";import y from"../SVGIcons/IconChevronDoubleLeft.js";import T from"../SVGIcons/IconChevronDoubleRight.js";function
|
|
1
|
+
import{jsxs as r,jsx as i}from"react/jsx-runtime";import{useState as v,useEffect as C}from"react";import{Input as x}from"../Input/Input.js";import{Button as N}from"../Button/Button.js";import{Select as _}from"../Select/Select/Select.js";import"../Select/MultiSelect/MultiSelect.js";import I from"classnames";import{Text as z}from"../Text/Text.js";import"../../consts/index.js";import"../../context/types.js";import"../../hooks/useScreenSize.js";import"react-hook-form";import"dayjs";import"../../helperComponents/ErrorMessage/consts.js";import"../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../Checkbox/Checkbox.js";import"react-dom";import"motion/react";import S from"../SVGIcons/IconChevronRight.js";import"../Collapse/CollapseGroup/CollapseGroup.js";import m from"../SVGIcons/IconMore.js";import"../Select/SharedComponents/ContentTop.js";import{OPTIONS as k}from"./constants/index.js";import $ from"../SVGIcons/IconChevronLeft.js";import y from"../SVGIcons/IconChevronDoubleLeft.js";import T from"../SVGIcons/IconChevronDoubleRight.js";function oe({table:e,totalCount:t,buttonText:o}){const[a,n]=v("1"),s=e.getState().pagination.pageIndex,l=e.getState().pagination.pageSize;return C(()=>{e.getPageCount()<Number(a)&&n("1")},[e.getPageCount(),e.getState().pagination]),/* @__PURE__ */r("div",{className:"advanced-table__pagination",children:[
|
|
2
2
|
/* @__PURE__ */i(_,{setSelectedItem:t=>(t=>{t&&e.setPagination({pageIndex:0,pageSize:Number(t)})})(t),selectedItem:`${l}`,className:"no-border",options:k}),
|
|
3
3
|
/* @__PURE__ */r("div",{className:"advanced-table__pagination__right",children:[
|
|
4
4
|
/* @__PURE__ */r(z,{type:"tertiary",children:[s*l+1," - ",(s+1)*l," / ",t]}),
|
|
@@ -7,6 +7,6 @@ import{jsxs as r,jsx as i}from"react/jsx-runtime";import{useState as v,useEffect
|
|
|
7
7
|
/* @__PURE__ */i(N,{onClick:()=>{const t=a?Number(a)-1:0;e.setPageIndex(t)},type:"secondary",size:"medium",buttonText:o??"Go to page"})]}),
|
|
8
8
|
/* @__PURE__ */r("ul",{className:"pagination",children:[
|
|
9
9
|
/* @__PURE__ */i("li",{className:"previous "+(e.getCanPreviousPage()?"":"disabled"),children:/* @__PURE__ */i("a",{rel:"prev",role:"button",onClick:()=>e.firstPage(),children:/* @__PURE__ */i(y,{size:"small"})})}),
|
|
10
|
-
/* @__PURE__ */i("li",{className:"previous "+(e.getCanPreviousPage()?"":"disabled"),children:/* @__PURE__ */i("a",{rel:"prev",role:"button",onClick:()=>e.previousPage(),children:/* @__PURE__ */i($,{size:"small"})})}),(()=>{const t=s,
|
|
10
|
+
/* @__PURE__ */i("li",{className:"previous "+(e.getCanPreviousPage()?"":"disabled"),children:/* @__PURE__ */i("a",{rel:"prev",role:"button",onClick:()=>e.previousPage(),children:/* @__PURE__ */i($,{size:"small"})})}),(()=>{const t=s,o=e.getPageCount(),i=[];return o<=7?Array.from({length:o},(e,t)=>t+1):(i.push(1),t<=3?i.push(2,3,4,5,"+++",o):t>o-5?i.push("---",o-4,o-3,o-2,o-1,o):i.push("---",t,t+1,t+2,"+++",o),i)})().map((t,o)=>"---"===t?/* @__PURE__ */i("li",{className:"pagination__more",children:/* @__PURE__ */i("a",{role:"button",onClick:()=>e.setPageIndex(+s-3),children:/* @__PURE__ */i(m,{size:"small"})})},`ellipsis-${o}`):"+++"===t?/* @__PURE__ */i("li",{className:"pagination__more",children:/* @__PURE__ */i("a",{role:"button",onClick:()=>e.setPageIndex(+s+3),children:/* @__PURE__ */i(m,{size:"small"})})},`ellipsis-${o}`):/* @__PURE__ */i("li",{className:I({active:t===s+1}),children:/* @__PURE__ */i("a",{role:"button",onClick:()=>e.setPageIndex(+t-1),children:t})},t)),
|
|
11
11
|
/* @__PURE__ */i("li",{className:"next "+(e.getCanNextPage()?"":"disabled"),children:/* @__PURE__ */i("a",{rel:"next",role:"button",onClick:()=>e.nextPage(),children:/* @__PURE__ */i(S,{size:"small"})})}),
|
|
12
|
-
/* @__PURE__ */i("li",{className:"next "+(e.getCanNextPage()?"":"disabled"),children:/* @__PURE__ */i("a",{rel:"next",role:"button",onClick:()=>e.lastPage(),children:/* @__PURE__ */i(T,{size:"small"})})})]})]})]})}export{
|
|
12
|
+
/* @__PURE__ */i("li",{className:"next "+(e.getCanNextPage()?"":"disabled"),children:/* @__PURE__ */i("a",{rel:"next",role:"button",onClick:()=>e.lastPage(),children:/* @__PURE__ */i(T,{size:"small"})})})]})]})]})}export{oe as AdvancedPagination};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{jsxs as n,jsx as i}from"react/jsx-runtime";import{useState as d}from"react";import{Button as h}from"../Button/Button.js";import _ from"../SVGIcons/IconSettings.js";import{Switcher as a}from"../Switcher/Switcher.js";import{Menu as b}from"../Menu/Menu.js";import"react-dom";import{Positions as v}from"../Tooltip/types.js";import"../../consts/index.js";import"../../context/types.js";import"../../hooks/useScreenSize.js";import"react-hook-form";import"classnames";import"motion/react";import"dayjs";import"../Collapse/CollapseGroup/CollapseGroup.js";import"../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import{Tooltip as y}from"../Tooltip/Tooltip.js";import"../Checkbox/Checkbox.js";const N=["select","actions","expand"];function
|
|
1
|
+
import{jsxs as n,jsx as i}from"react/jsx-runtime";import{useState as d}from"react";import{Button as h}from"../Button/Button.js";import _ from"../SVGIcons/IconSettings.js";import{Switcher as a}from"../Switcher/Switcher.js";import{Menu as b}from"../Menu/Menu.js";import"react-dom";import{Positions as v}from"../Tooltip/types.js";import"../../consts/index.js";import"../../context/types.js";import"../../hooks/useScreenSize.js";import"react-hook-form";import"classnames";import"motion/react";import"dayjs";import"../Collapse/CollapseGroup/CollapseGroup.js";import"../../helperComponents/ErrorMessage/consts.js";import"../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import{Tooltip as y}from"../Tooltip/Tooltip.js";import"../Checkbox/Checkbox.js";const N=["select","actions","expand"];function q({table:e,tooltipText:o,hiddenColumns:t=[],allToggleText:s="All"}){const[l,r]=d(null),[c,m]=d(!1),p=N.concat(t);/* @__PURE__ */
|
|
2
2
|
return n("div",{ref:r,children:[
|
|
3
3
|
/* @__PURE__ */i(h,{type:"secondary",iconProps:{Component:_},onClick:()=>m(e=>!e)}),
|
|
4
4
|
/* @__PURE__ */i(b,{className:"settings-menu",position:"top-left",onClose:()=>{m(!1)},isOpen:c,parentRef:l,children:/* @__PURE__ */n("div",{className:"settings-menu__dropdown",children:[
|
|
5
5
|
/* @__PURE__ */i("div",{className:"relative",children:/* @__PURE__ */i("div",{className:"settings-menu__dropdown__option sticky",children:/* @__PURE__ */i(a,{label:s,selectedValue:e.getIsAllColumnsVisible(),onClick:()=>e.toggleAllColumnsVisible(),inlineType:!0,size:"small"})})}),
|
|
6
6
|
/* @__PURE__ */i("div",{className:"scrollbar--content scrollbar scrollbar--vertical",children:e.getAllLeafColumns().map(e=>{if(null==p||!p.includes(e.id)){const t="string"==typeof e.columnDef.header?e.columnDef.header:e.columnDef.id;/* @__PURE__ */
|
|
7
7
|
return n("div",{className:"settings-menu__dropdown__option",children:[o&&!e.getCanHide()&&/* @__PURE__ */i(y,{position:v.TOP_CENTER,text:o,id:e.columnDef.id}),
|
|
8
|
-
/* @__PURE__ */i(a,{label:t,id:e.columnDef.id,selectedValue:e.getIsVisible(),onClick:()=>(e=>{const o=e.getToggleVisibilityHandler();o&&o({target:{checked:!e.getIsVisible()}})})(e),disabled:!e.getCanHide(),inlineType:!0,size:"small"})]},e.id)}})})]})})]})}export{
|
|
8
|
+
/* @__PURE__ */i(a,{label:t,id:e.columnDef.id,selectedValue:e.getIsVisible(),onClick:()=>(e=>{const o=e.getToggleVisibilityHandler();o&&o({target:{checked:!e.getIsVisible()}})})(e),disabled:!e.getCanHide(),inlineType:!0,size:"small"})]},e.id)}})})]})})]})}export{q as ColumnSettings};
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
import{jsx as r,Fragment as
|
|
1
|
+
import{jsx as r,jsxs as l,Fragment as t}from"react/jsx-runtime";import{Suspense as n}from"react";import{Text as i}from"../../components/Text/Text.js";import{generateDataTestId as c}from"../../utils/helpers.js";import p from"classnames";import{ICONS_MAPPING as d}from"./consts.js";const u=({message:s,icon:e="infoFilled",dataId:a,className:m})=>{const o=d[e]||null;/* @__PURE__ */
|
|
2
|
+
return r(i,{className:p("error-message",m),size:"small",type:"danger",dataId:c("error-message",a),children:/* @__PURE__ */l(t,{children:[o&&/* @__PURE__ */r(n,{fallback:null,children:/* @__PURE__ */r(o,{className:"mr-4",size:"xsmall",type:"danger"})}),
|
|
3
|
+
/* @__PURE__ */r("span",{children:s})]})})};export{u as ErrorMessage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getIcon as o}from"../../components/SVGIcons/icon-registry.js";const I={infoFilled:o("IconInfoFilled")};export{I as ICONS_MAPPING};
|