@alphakits/ui 1.19.7 → 1.19.8
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/amount/component.js +1 -1
- package/dist/amount/index.js +1 -1
- package/dist/amount-input/component.js +1 -1
- package/dist/amount-input/index.js +1 -1
- package/dist/avatar/component.js +1 -1
- package/dist/avatar/index.js +1 -1
- package/dist/base-card/component.js +1 -1
- package/dist/base-card/index.js +1 -1
- package/dist/bottom-sheet/component.js +1 -1
- package/dist/bottom-sheet/index.js +1 -1
- package/dist/button/component.js +1 -1
- package/dist/button/index.js +1 -1
- package/dist/calendar/component.js +1 -1
- package/dist/calendar/components/days-table/component.js +1 -1
- package/dist/calendar/components/days-table/index.js +1 -1
- package/dist/calendar/components/header/index.js +1 -1
- package/dist/calendar/components/header//321/201omponent.js +1 -1
- package/dist/calendar/components/months-table/index.js +1 -1
- package/dist/calendar/components/months-table//321/201omponent.js +1 -1
- package/dist/calendar/components/select-button/index.js +1 -1
- package/dist/calendar/components/select-button//321/201omponent.js +1 -1
- package/dist/calendar/components/years-table/index.js +1 -1
- package/dist/calendar/components/years-table//321/201omponent.js +1 -1
- package/dist/calendar/index.js +1 -1
- package/dist/calendar-input/component.js +1 -1
- package/dist/calendar-input/index.js +1 -1
- package/dist/card/component.js +1 -1
- package/dist/card/images/index.js +1 -1
- package/dist/card/index.js +1 -1
- package/dist/cell/base/component.js +1 -1
- package/dist/cell/base/index.d.ts +1 -1
- package/dist/cell/base/index.js +1 -1
- package/dist/cell/component.js +1 -1
- package/dist/cell/index.js +1 -1
- package/dist/cell/pure/component.js +1 -1
- package/dist/cell/pure/index.js +1 -1
- package/dist/checkbox/component.js +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/checkbox-group/component.js +1 -1
- package/dist/checkbox-group/index.js +1 -1
- package/dist/checkbox-lists/component.js +1 -1
- package/dist/checkbox-lists/index.js +1 -1
- package/dist/collapsable-row/addons.js +1 -1
- package/dist/collapsable-row/component.js +1 -1
- package/dist/collapsable-row/index.js +1 -1
- package/dist/collapse/component.js +1 -1
- package/dist/collapse/index.js +1 -1
- package/dist/copy-button/component.js +1 -1
- package/dist/copy-button/index.js +1 -1
- package/dist/date/component.js +1 -1
- package/dist/date/index.js +1 -1
- package/dist/date-switcher/component.js +1 -1
- package/dist/date-switcher/index.js +1 -1
- package/dist/footer/component.js +1 -1
- package/dist/footer/contact-block.js +1 -1
- package/dist/footer/index.js +1 -1
- package/dist/form/component.js +1 -1
- package/dist/form/components/form-footer/index.js +1 -1
- package/dist/form/components/index.js +1 -1
- package/dist/form/index.js +1 -1
- package/dist/form/templates/crud-form/index.js +1 -1
- package/dist/form/templates/filters-form/index.js +1 -1
- package/dist/form/templates/rest-form/index.js +1 -1
- package/dist/form/utils/get-default-values.js +1 -1
- package/dist/form-control/component.js +1 -1
- package/dist/form-control/index.js +1 -1
- package/dist/{formik.esm-45246439.js → formik.esm-0e80d68e.js} +1 -1
- package/dist/grid/col/component.js +1 -1
- package/dist/grid/col/index.js +1 -1
- package/dist/grid/component.js +1 -1
- package/dist/grid/index.js +1 -1
- package/dist/grid/row/component.js +1 -1
- package/dist/grid/row/index.js +1 -1
- package/dist/header-search/component.js +1 -1
- package/dist/header-search/index.js +1 -1
- package/dist/heading/component.js +1 -1
- package/dist/heading/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-crud-form-requests/index.js +1 -1
- package/dist/hooks/use-get-one/index.js +1 -1
- package/dist/icon-button/component.js +1 -1
- package/dist/icon-button/index.js +1 -1
- package/dist/image/component.js +1 -1
- package/dist/image/image-base.js +1 -1
- package/dist/image/index.js +1 -1
- package/dist/image/use-image-render-component.js +1 -1
- package/dist/image-gallery/component.js +1 -1
- package/dist/image-gallery/components/header/index.js +1 -1
- package/dist/image-gallery/components/header-info-block/index.js +1 -1
- package/dist/image-gallery/components/image-viewer/index.js +1 -1
- package/dist/image-gallery/components/image-viewer/slide.js +1 -1
- package/dist/image-gallery/components/index.js +1 -1
- package/dist/image-gallery/index.js +1 -1
- package/dist/image-uploader/component.js +1 -1
- package/dist/image-uploader/index.js +1 -1
- package/dist/{index-9e2416b7.js → index-add194ef.js} +1 -1
- package/dist/index.css +1 -1
- package/dist/info-block-header/component.js +1 -1
- package/dist/info-block-header/index.js +1 -1
- package/dist/info-block-item/component.js +1 -1
- package/dist/info-block-item/index.js +1 -1
- package/dist/input/component.js +1 -1
- package/dist/input/index.js +1 -1
- package/dist/link/component.js +1 -1
- package/dist/link/index.js +1 -1
- package/dist/list-allert/component.js +1 -1
- package/dist/list-allert/index.js +1 -1
- package/dist/masked-input/component.js +1 -1
- package/dist/masked-input/index.js +1 -1
- package/dist/menu/component.js +1 -1
- package/dist/menu/components/content-header/index.js +1 -1
- package/dist/menu/components/index.js +1 -1
- package/dist/menu/components/menu-avatar/index.js +1 -1
- package/dist/menu/components/menu-button/index.js +1 -1
- package/dist/menu/components/menu-buttons-list/index.js +1 -1
- package/dist/menu/components/user-button/index.js +1 -1
- package/dist/menu/index.js +1 -1
- package/dist/message/component.js +1 -1
- package/dist/message/index.js +1 -1
- package/dist/modal/components/modals/index.js +1 -1
- package/dist/modal/context.js +1 -1
- package/dist/modal/hooks/use-modal.js +1 -1
- package/dist/modal/index.js +1 -1
- package/dist/not-found/component.js +1 -1
- package/dist/not-found/index.js +1 -1
- package/dist/notification/component.js +1 -1
- package/dist/notification/index.js +1 -1
- package/dist/{parse-query-params-2f3fee4e.js → parse-query-params-e1b1327a.js} +1 -1
- package/dist/picker-button/common/index.js +1 -1
- package/dist/picker-button/common/labeled-button/index.js +1 -1
- package/dist/picker-button/component.js +1 -1
- package/dist/picker-button/field/Component.js +1 -1
- package/dist/picker-button/field/index.js +1 -1
- package/dist/picker-button/index.js +1 -1
- package/dist/popover/component.js +1 -1
- package/dist/popover/index.js +1 -1
- package/dist/progress-bar/component.js +1 -1
- package/dist/progress-bar/index.js +1 -1
- package/dist/progress-index/component.js +1 -1
- package/dist/progress-index/index.js +1 -1
- package/dist/radio/component.js +1 -1
- package/dist/radio/index.js +1 -1
- package/dist/radio-group/component.js +1 -1
- package/dist/radio-group/index.js +1 -1
- package/dist/radio-groups/component.js +1 -1
- package/dist/radio-groups/index.js +1 -1
- package/dist/select/component.js +1 -1
- package/dist/select/components/base-select/component.js +1 -1
- package/dist/select/components/base-select/index.js +1 -1
- package/dist/select/components/field/component.js +1 -1
- package/dist/select/components/field/index.js +1 -1
- package/dist/select/components/index.js +1 -1
- package/dist/select/components/native-select/component.js +1 -1
- package/dist/select/components/native-select/index.js +1 -1
- package/dist/select/components/option/component.js +1 -1
- package/dist/select/components/option/index.js +1 -1
- package/dist/select/components/virtual-options-list/component.js +1 -1
- package/dist/select/components/virtual-options-list/index.js +1 -1
- package/dist/select/index.js +1 -1
- package/dist/select/presets/index.js +1 -1
- package/dist/select/presets/use-lazy-loading/index.js +1 -1
- package/dist/select/presets/use-select-with-loading/hook.js +1 -1
- package/dist/sidepanel-header/component.js +1 -1
- package/dist/sidepanel-header/index.js +1 -1
- package/dist/space/Item.js +1 -1
- package/dist/space/component.js +1 -1
- package/dist/space/index.js +1 -1
- package/dist/suffix-input/component.js +1 -1
- package/dist/suffix-input/index.js +1 -1
- package/dist/super-list-header/component.js +1 -1
- package/dist/super-list-header/index.js +1 -1
- package/dist/super-list-item/component.js +1 -1
- package/dist/super-list-item/index.js +1 -1
- package/dist/switch/component.js +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/table/columns.js +1 -1
- package/dist/table/component.js +1 -1
- package/dist/table/components/cell/component.js +1 -1
- package/dist/table/components/cell/index.js +1 -1
- package/dist/table/components/cells/index.js +1 -1
- package/dist/table/components/empty-list/index.js +1 -1
- package/dist/table/components/error/index.js +1 -1
- package/dist/table/components/loading/index.js +1 -1
- package/dist/table/components/pagination/index.js +1 -1
- package/dist/table/components/table-header/index.js +1 -1
- package/dist/table/hooks/use-table-data.js +1 -1
- package/dist/table/index.d.ts +1 -1
- package/dist/table/index.js +1 -1
- package/dist/table/table.js +1 -1
- package/dist/table/utils/add-query-param.js +1 -1
- package/dist/table/utils/get-query-from-url.js +1 -1
- package/dist/table/utils/index.d.ts +1 -1
- package/dist/table/utils/index.js +1 -1
- package/dist/table/utils/parse-query-params.js +1 -1
- package/dist/table/utils/prepare-rows.js +1 -1
- package/dist/table/utils/query-adapter.js +1 -1
- package/dist/table/utils/remove-query-param.js +1 -1
- package/dist/table/utils/reset-query-param.js +1 -1
- package/dist/table-status/component.js +1 -1
- package/dist/table-status/index.js +1 -1
- package/dist/tag/component.js +1 -1
- package/dist/tag/index.js +1 -1
- package/dist/tags-list/component.js +1 -1
- package/dist/tags-list/index.js +1 -1
- package/dist/tariff-builder/component.js +1 -1
- package/dist/tariff-builder/index.js +1 -1
- package/dist/textarea/component.js +1 -1
- package/dist/textarea/index.js +1 -1
- package/dist/toast/component.js +1 -1
- package/dist/toast/index.js +1 -1
- package/dist/toast-notifier/component.js +1 -1
- package/dist/toast-notifier/index.js +1 -1
- package/dist/toast-plate/component.js +1 -1
- package/dist/toast-plate/index.js +1 -1
- package/dist/tooltip/component.js +1 -1
- package/dist/tooltip/index.js +1 -1
- package/dist/typography/component.js +1 -1
- package/dist/typography/index.js +1 -1
- package/dist/typography/text/component.js +1 -1
- package/dist/typography/text/index.js +1 -1
- package/dist/typography/title/component.js +1 -1
- package/dist/typography/title/index.js +1 -1
- package/dist/typography/title-responsive/component.js +1 -1
- package/dist/typography/title-responsive/index.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/show-toast/index.js +1 -1
- package/dist/with-suffix/component.js +1 -1
- package/dist/with-suffix/index.js +1 -1
- package/package.json +1 -1
- /package/dist/{_commonjsHelpers-4a8dc264.js → _commonjsHelpers-8dcafa78.js} +0 -0
- /package/dist/{colors.module-af749297.js → colors.module-e1ab3734.js} +0 -0
- /package/dist/{common.module-cc8800a6.js → common.module-5f5cfa97.js} +0 -0
- /package/dist/{component-2723d590.d.ts → component-622d4e41.d.ts} +0 -0
- /package/dist/{component-2723d590.js → component-622d4e41.js} +0 -0
- /package/dist/{component-fc93714b.d.ts → component-fcd83d7e.d.ts} +0 -0
- /package/dist/{component-fc93714b.js → component-fcd83d7e.js} +0 -0
- /package/dist/{contact-block-007632e6.d.ts → contact-block-4d43447c.d.ts} +0 -0
- /package/dist/{contact-block-007632e6.js → contact-block-4d43447c.js} +0 -0
- /package/dist/{gutters.module-8bdd6d3f.js → gutters.module-161862d0.js} +0 -0
- /package/dist/{intersection-observer-3f745a8a.js → intersection-observer-1da95e4e.js} +0 -0
- /package/dist/{parse-query-params-2f3fee4e.d.ts → parse-query-params-e1b1327a.d.ts} +0 -0
- /package/dist/{slide-a98d64fc.d.ts → slide-5b531e44.d.ts} +0 -0
- /package/dist/{slide-a98d64fc.js → slide-5b531e44.js} +0 -0
- /package/dist/{tslib.es6-984a105f.js → tslib.es6-d79b1619.js} +0 -0
- /package/dist/{use-image-render-component-e9c9dcd9.d.ts → use-image-render-component-96e779fb.d.ts} +0 -0
- /package/dist/{use-image-render-component-e9c9dcd9.js → use-image-render-component-96e779fb.js} +0 -0
package/dist/radio/component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a}from"../tslib.es6-
|
|
1
|
+
import{_ as e,a}from"../tslib.es6-d79b1619.js";import d,{forwardRef as n,useRef as l}from"react";import c from"react-merge-refs";import o from"classnames";import{useFocus as t}from"../hooks/useFocus/index.js";var s={container:"index-module_container__NjKG8",checked:"index-module_checked__DggTk",disabled:"index-module_disabled__I93VR",circle:"index-module_circle__IS2Pq",label:"index-module_label__P4KpD",hint:"index-module_hint__jS9lo",focused:"index-module_focused__uweBa",m:"index-module_m__LBuKe",s:"index-module_s__IS3y5",content:"index-module_content__u8t0O",start:"index-module_start__rPJkZ",center:"index-module_center__e5lXo",addons:"index-module_addons__2cNoB",block:"index-module_block__Qhaf7"},i=n((function(n,i){var m,_=n.onChange,r=n.className,u=n.name,b=n.disabled,h=n.dataTestId,k=n.label,x=n.checked,p=n.hint,f=n.size,N=void 0===f?"m":f,g=n.align,E=void 0===g?"center":g,I=n.addons,j=n.block,v=e(n,["onChange","className","name","disabled","dataTestId","label","checked","hint","size","align","addons","block"]),y=l(null),B=t(y,"keyboard")[0];return d.createElement("label",{className:o(s.container,s[N],s[E],r,(m={},m[s.disabled]=b,m[s.checked]=x,m[s.focused]=B,m[s.block]=j,m)),ref:c([y,i])},d.createElement("input",a({type:"radio",onChange:function(e){_&&_(e,{checked:e.target.checked,name:u})},"data-test-id":h,disabled:b,checked:x,name:u},v)),d.createElement("span",{className:s.circle}),d.createElement("span",{className:s.content},d.createElement("span",{className:s.label},k),p&&d.createElement("span",{className:s.hint},p)),I&&d.createElement("span",{className:s.addons},I))}));export{i as Radio};
|
package/dist/radio/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Radio}from"./component.js";import"../tslib.es6-
|
|
1
|
+
export{Radio}from"./component.js";import"../tslib.es6-d79b1619.js";import"react";import"react-merge-refs";import"classnames";import"../hooks/useFocus/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import t from"classnames";import{FlexColumns as o}from"../flex-columns/component.js";import{Radio as r}from"../radio/component.js";import{Typography as n}from"../typography/component.js";import"../tslib.es6-
|
|
1
|
+
import e from"react";import t from"classnames";import{FlexColumns as o}from"../flex-columns/component.js";import{Radio as r}from"../radio/component.js";import{Typography as n}from"../typography/component.js";import"../tslib.es6-d79b1619.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-e1ab3734.js";import"../common.module-5f5cfa97.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";var i="index-module_text__OqiF5",m="index-module_subtitle__bsdlx",a="index-module_error__UDYSU",l="index-module_buttons_wrap__6IipS",c="index-module_buttons_wrap_error__kYt2M",s="index-module_button__jxsYA",d="index-module_selected__ctGlJ",p=function(p){var u,_=p.title,y=p.subtitle,g=p.selected,v=p.data,x=void 0===v?[]:v,f=p.onChange,h=p.columns,b=void 0===h?1:h,k=p.gr,j=void 0===k?20:k,w=p.gc,E=void 0===w?20:w,T=p.dataTestId,N=p.error,C=p.view,I=void 0===C?"default":C,Y=function(e){return T?"radio_"+T+"_"+e:"radio_"+e};return e.createElement("div",null,(_||y)&&e.createElement("div",{className:i},_&&e.createElement(n.Text,{tag:"div",view:"title",color:"primary",weight:"bold"},_),y&&e.createElement(n.Text,{className:m,tag:"div",view:"caps",color:"secondary",weight:"medium"},y)),"default"===I?e.createElement(o,{columns:b,gr:j,gc:E},null==x?void 0:x.map((function(t,o){return e.createElement(r,{key:t.key+t.content,dataTestId:Y(o),onChange:function(){return f(t.key)},checked:t.key===g,label:t.content})}))):e.createElement(o,{columns:x.length,gc:0,gr:0,className:t(l,(u={},u[c]=!!N,u))},x.map((function(o){var r;return e.createElement("button",{type:"button",onClick:function(){return f(o.key)},key:o.key+o.content,className:t(s,(r={},r[d]=o.key===g,r))},e.createElement(n.Text,{view:"title",weight:"regular",color:o.key===g?"primary-inverted":"primary"},o.content))}))),!!N&&e.createElement(n.Text,{className:a,view:"caps",weight:"medium",color:"negative"},N))};export{p as RadioGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{RadioGroup}from"./component.js";import"react";import"classnames";import"../flex-columns/component.js";import"../radio/component.js";import"../tslib.es6-
|
|
1
|
+
export{RadioGroup}from"./component.js";import"react";import"classnames";import"../flex-columns/component.js";import"../radio/component.js";import"../tslib.es6-d79b1619.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../typography/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-e1ab3734.js";import"../common.module-5f5cfa97.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useState as o}from"react";import{ChevronDownS as t}from"alpha-cli-icons";import n from"classnames";import{Collapse as r}from"../collapse/component.js";import{Divider as l}from"../divider/component.js";import{FlexColumns as c}from"../flex-columns/component.js";import{IconButton as i}from"../icon-button/component.js";import{Padding as p}from"../padding/component.js";import{Radio as a}from"../radio/component.js";import{Typography as m}from"../typography/component.js";import"../_commonjsHelpers-
|
|
1
|
+
import e,{useState as o}from"react";import{ChevronDownS as t}from"alpha-cli-icons";import n from"classnames";import{Collapse as r}from"../collapse/component.js";import{Divider as l}from"../divider/component.js";import{FlexColumns as c}from"../flex-columns/component.js";import{IconButton as i}from"../icon-button/component.js";import{Padding as p}from"../padding/component.js";import{Radio as a}from"../radio/component.js";import{Typography as m}from"../typography/component.js";import"../_commonjsHelpers-8dcafa78.js";import"resize-observer";import"../link/component.js";import"../tslib.es6-d79b1619.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../button/component.js";import"../loader/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-e1ab3734.js";import"../common.module-5f5cfa97.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";var s={list_head:"index-module_list_head__jX5KV",collapse_btn:"index-module_collapse_btn__K-UQd",collapse_btn_collapsed:"index-module_collapse_btn_collapsed__won-f"},d=function(d){var u=d.parents,f=d.childs,h=d.selected,_=d.collapsable,j=d.onChange,b=[];null==u||u.forEach((function(e){var o={parent:{},childs:[],collapsed:!1};null==f||f.forEach((function(t){t.locationId===e.id&&(o.parent=e,o.childs.push(t))})),o.parent.id&&b.push(o)}));var v=o(b),g=v[0],y=v[1];return e.createElement("div",null,g.map((function(o,d){var u;return e.createElement(e.Fragment,{key:o.parent.id},e.createElement("div",{className:s.list_head},e.createElement(m.Text,{view:"title",color:"primary",weight:"medium"},o.parent.title),_&&e.createElement(i,{onClick:function(){return function(e){var o=g.map((function(o,t){return t===e&&(o.collapsed?o.collapsed=!1:o.collapsed=!0),o})),t=g.concat(o);y(t.filter((function(e,o){return t.indexOf(e)===o})))}(d)},size:"s",className:n(s.collapse_btn,(u={},u[s.collapse_btn_collapsed]=o.collapsed,u)),icon:t})),!o.collapsed&&e.createElement(p,{padding:"16px 0 0 0"}),e.createElement(r,{expanded:!o.collapsed},e.createElement("div",{className:s.content},e.createElement(c,{columns:1},o.childs.map((function(o){return e.createElement(a,{onChange:function(){return j(o.id)},checked:h===o.id,key:o.id,label:o.title})}))))),d!==(null==g?void 0:g.length)-1&&e.createElement(l,{size:"m"}))})))};export{d as RadioGroups};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{RadioGroups}from"./component.js";import"react";import"alpha-cli-icons";import"classnames";import"../collapse/component.js";import"../_commonjsHelpers-
|
|
1
|
+
export{RadioGroups}from"./component.js";import"react";import"alpha-cli-icons";import"classnames";import"../collapse/component.js";import"../_commonjsHelpers-8dcafa78.js";import"resize-observer";import"../link/component.js";import"../tslib.es6-d79b1619.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../divider/component.js";import"../flex-columns/component.js";import"../icon-button/component.js";import"../button/component.js";import"../loader/component.js";import"../padding/component.js";import"../radio/component.js";import"../typography/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-e1ab3734.js";import"../common.module-5f5cfa97.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";
|
package/dist/select/component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as o,a as t}from"../tslib.es6-
|
|
1
|
+
import{_ as o,a as t}from"../tslib.es6-d79b1619.js";import r,{forwardRef as p}from"react";import{Arrow as n}from"./components/arrow/component.js";import{BaseSelect as e}from"./components/base-select/component.js";import{Field as m}from"./components/field/component.js";import{Optgroup as s}from"./components/optgroup/component.js";import{Option as i}from"./components/option/component.js";import{OptionsList as c}from"./components/options-list/component.js";import"classnames";import"react-merge-refs";import"downshift";import"resize-observer";import"../__internal/utils/getDataTestId.js";import"../popover/component.js";import"react-popper";import"react-transition-group";import"../portal/component.js";import"react-dom";import"../portal/utils.js";import"../stack/context.js";import"../stack/component.js";import"./utils.js";import"./components/native-select/component.js";import"../form-control/component.js";import"../hooks/useFocus/index.js";import"../skeleton/component.js";import"./components/checkmark/component.js";var a=p((function(p,a){var j=p.Arrow,l=p.Field,f=p.OptionsList,u=p.Optgroup,d=p.Option,O=o(p,["Arrow","Field","OptionsList","Optgroup","Option"]);return r.createElement(e,t({ref:a,Option:d||i,Field:l||m,Optgroup:u||s,OptionsList:f||c,Arrow:j||n},O))}));export{a as Select};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as t,_ as n}from"../../../tslib.es6-
|
|
1
|
+
import{a as e,b as t,_ as n}from"../../../tslib.es6-d79b1619.js";import o,{forwardRef as i,useRef as r,useMemo as a,useCallback as s,useEffect as l,useLayoutEffect as d}from"react";import c from"react-merge-refs";import p from"classnames";import{useMultipleSelection as u,useCombobox as m}from"downshift";import{ResizeObserver as v}from"resize-observer";import{getDataTestId as f}from"../../../__internal/utils/getDataTestId.js";import{Popover as g}from"../../../popover/component.js";import{processOptions as h}from"../../utils.js";import{NativeSelect as b}from"../native-select/component.js";import"react-popper";import"react-transition-group";import"../../../portal/component.js";import"react-dom";import"../../../portal/utils.js";import"../../../stack/context.js";import"../../../stack/component.js";var I="index-module_component__vbM1x",x="index-module_popoverInner__UhT2m",y="index-module_optionsList__catD5",k="index-module_nativeSelect__SsnnZ",w="index-module_block__kBj0n",O=i((function(i,O){var _,N=i.dataTestId,C=void 0===N?"":N,E=i.className,P=i.fieldClassName,S=i.popoverOuterClassname,T=i.optionsListClassName,D=i.optionClassName,j=i.options,z=i.autocomplete,L=void 0!==z&&z,M=i.multiple,B=void 0!==M&&M,F=i.allowUnselect,R=void 0!==F&&F,A=i.disabled,K=void 0!==A&&A,U=i.closeOnSelect,W=void 0===U?!B:U,q=i.circularNavigation,H=void 0!==q&&q,Z=i.nativeSelect,G=void 0!==Z&&Z,J=i.defaultOpen,Q=void 0!==J&&J,V=i.open,X=i.popoverPosition,Y=void 0===X?"bottom-start":X,$=i.offset,ee=i.withArrow,te=i.preventFlip,ne=void 0===te||te,oe=i.optionsListWidth,ie=void 0===oe?"field":oe,re=i.name,ae=i.id,se=i.required,le=i.selected,de=i.size,ce=void 0===de?"m":de,pe=i.optionsSize,ue=void 0===pe?ce:pe,me=i.error,ve=i.hint,fe=i.block,ge=void 0===fe||fe,he=i.label,be=i.placeholder,Ie=i.fieldProps,xe=void 0===Ie?{}:Ie,ye=i.optionsListProps,ke=void 0===ye?{}:ye,we=i.optionProps,Oe=void 0===we?{}:we,_e=i.valueRenderer,Ne=i.onChange,Ce=i.onOpen,Ee=i.onFocus,Pe=i.onBlur,Se=i.onScroll,Te=i.Arrow,De=i.Field,je=void 0===De?function(){return null}:De,ze=i.OptionsList,Le=void 0===ze?function(){return null}:ze,Me=i.Optgroup,Be=void 0===Me?function(){return null}:Me,Fe=i.Option,Re=void 0===Fe?function(){return null}:Fe,Ae=i.updatePopover,Ke=i.zIndexPopover,Ue=i.showEmptyOptionsList,We=void 0!==Ue&&Ue,qe=i.visibleOptions,He=r(null),Ze=r(null),Ge=r(null),Je=function(e){return e?e.key.toString():""},Qe=a((function(){return h(j||[],le)}),[j,le]),Ve=Qe.flatOptions,Xe=Qe.selectedOptions,Ye={itemToString:Je,onSelectedItemsChange:function(e){if(Ne){var t=e.selectedItems,n=void 0===t?[]:t;Ne({selectedMultiple:n,selected:n.length?n[0]:null,name:re})}},stateReducer:function(e,t){var n=t.type,o=t.changes;return R||n!==u.stateChangeTypes.DropdownKeyDownBackspace?o:e}};void 0!==le&&(Ye.selectedItems=Xe);var $e=u(Ye),et=$e.selectedItems,tt=$e.addSelectedItem,nt=$e.setSelectedItems,ot=$e.removeSelectedItem,it=$e.getDropdownProps,rt=m({id:ae,isOpen:V,circularNavigation:H,items:Ve,itemToString:Je,defaultHighlightedIndex:0===et.length?-1:void 0,onIsOpenChange:function(e){Ce&&setTimeout((function(){Ce({open:e.isOpen,name:re})}),0)},stateReducer:function(t,n){var o=n.type,i=n.changes,r=i.selectedItem;switch(o){case m.stateChangeTypes.InputKeyDownEnter:case m.stateChangeTypes.ItemClick:if(r&&!r.disabled){var a=et.includes(r),s=R||B&&et.length>1;a&&s&&ot(r),a||(B?tt(r):nt([r]))}return e(e({},i),{isOpen:!W,highlightedIndex:t.isOpen&&!W?t.highlightedIndex:i.highlightedIndex});default:return i}}}),at=rt.isOpen,st=rt.getMenuProps,lt=rt.getInputProps,dt=rt.getItemProps,ct=rt.getComboboxProps,pt=rt.getLabelProps,ut=rt.highlightedIndex,mt=rt.toggleMenu,vt=rt.openMenu,ft=st({ref:Ge},{suppressRefError:!0}),gt=lt(it({ref:c([O,Ze])})),ht=s((function(e){nt(t([],e.target.options).reduce((function(e,t,n){return t.selected?e.concat(Ve[n]):e}),[]))}),[Ve,nt]),bt=s((function(t){var i=t.option,r=t.index,a=n(t,["option","index"]);return o.createElement(o.Fragment,{key:i.key},Re(e(e(e({},Oe),a),{className:D,innerProps:dt({index:r,item:i,disabled:i.disabled,onMouseDown:function(e){return e.preventDefault()}}),index:r,option:i,size:ue,disabled:i.disabled,highlighted:r===ut,selected:et.includes(i)})))}),[Oe,D,dt,ue,ut,et,Re]);l((function(){Q&&vt()}),[Q,vt]),l((function(){V&&vt()}),[]);var It=s((function(){if(Ge.current){var e="field"===ie?"width":"minWidth",t=He.current?He.current.getBoundingClientRect().width:0;Ge.current.setAttribute("style",""),Ge.current.style[e]=t+"px"}}),[ie]);l((function(){var e=new v(It);return He.current&&e.observe(He.current),function(){e.disconnect()}}),[It,at,ie]),d(It,[at,ie,j,et]);var xt=s((function(){return et.map((function(e){return o.createElement("input",{type:"hidden",name:re,value:e.key,key:e.key})}))}),[et,re]),yt=s((function(){var t=B?et.map((function(e){return e.key.toString()})):(et[0]||{}).key.toString();return o.createElement(b,e({},ft,{className:k,disabled:K,multiple:B,name:re,value:t,onChange:ht,options:j}))}),[B,et,K,re,ht,j,ft]),kt=Ve.length>0||We;return o.createElement("div",e({},ct(e(e({ref:He},K&&{"aria-disabled":!0}),{className:p(I,(_={},_[w]=ge,_),E)})),{onKeyDown:K?void 0:function(e){gt.onKeyDown(e),L&&!at&&1===e.key.length&&vt(),![" ","Enter"].includes(e.key)||L||G||"INPUT"===e.target.tagName||(e.preventDefault(),at&&-1!==ut||mt())},tabIndex:-1,id:"kekekekekek","data-test-id":f("combobox",C)}),G&&yt(),o.createElement(je,e({selectedMultiple:et,selected:et[0],multiple:B,open:at,disabled:K,size:ce,placeholder:be,label:he&&o.createElement("span",e({},pt()),se?he+" *":he),Arrow:Te&&o.createElement(Te,{open:at}),error:me,hint:ve,valueRenderer:_e,className:P,innerProps:{onBlur:function(e){var t;(null===(t=Ge.current)||void 0===t?void 0:t.contains(e.relatedTarget||document.activeElement))||(Pe&&Pe(e),gt.onBlur(e))},onFocus:K?void 0:function(e){Ee&&Ee(e),L&&!at&&vt()},onClick:K?void 0:function(e){L&&"INPUT"===e.target.tagName?vt():mt()},tabIndex:G||K?-1:0,ref:c([gt.ref]),id:gt.id,"aria-labelledby":gt["aria-labelledby"],"aria-controls":gt["aria-controls"],"aria-autocomplete":L?gt["aria-autocomplete"]:void 0},dataTestId:f("field",C)},xe)),re&&!G&&xt(),!G&&o.createElement(g,{open:at,withTransition:!1,anchorElement:Ze.current,position:Y,offset:$,withArrow:ee,preventFlip:ne,className:S,popperClassName:x,update:Ae,zIndex:Ke},kt&&o.createElement("div",e({},ft,{className:p(T,y)}),o.createElement(Le,e({},ke,{flatOptions:Ve,highlightedIndex:ut,open:at,size:ce,options:j,Optgroup:Be,Option:bt,visibleOptions:qe,onScroll:Se,dataTestId:f("options-list",C)})))))}));export{O as BaseSelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{BaseSelect}from"./component.js";import"../../../tslib.es6-
|
|
1
|
+
export{BaseSelect}from"./component.js";import"../../../tslib.es6-d79b1619.js";import"react";import"react-merge-refs";import"classnames";import"downshift";import"resize-observer";import"../../../__internal/utils/getDataTestId.js";import"../../../popover/component.js";import"react-popper";import"react-transition-group";import"../../../portal/component.js";import"react-dom";import"../../../portal/utils.js";import"../../../stack/context.js";import"../../../stack/component.js";import"../../utils.js";import"../native-select/component.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as l}from"../../../tslib.es6-
|
|
1
|
+
import{_ as e,a as l}from"../../../tslib.es6-d79b1619.js";import r,{useState as o,useRef as d,useCallback as t}from"react";import s from"classnames";import{FormControl as a}from"../../../form-control/component.js";import{useFocus as n}from"../../../hooks/useFocus/index.js";import{joinOptions as i}from"../../utils.js";var m="index-module_component__kQ9oL",c="index-module_field__WxOYl",u="index-module_disabled__GQwpw",p="index-module_arrow__4fEBK",_="index-module_placeholder__FY2iP",f="index-module_contentWrapper__MkCc3",b="index-module_value__0Arew",v="index-module_focusVisible__qhc9s",h=function(h){var x,E=h.size,N=void 0===E?"m":E,w=h.open;h.multiple;var A=h.error,k=h.hint,g=h.disabled,j=h.label,C=h.placeholder,F=h.selectedMultiple,M=void 0===F?[]:F,z=h.selected,B=h.rightAddons,P=h.valueRenderer,I=void 0===P?i:P,Q=h.Arrow,R=h.innerProps,T=h.dataTestId,W=h.fieldClassName,Y=e(h,["size","open","multiple","error","hint","disabled","label","placeholder","selectedMultiple","selected","rightAddons","valueRenderer","Arrow","innerProps","dataTestId","fieldClassName"]),q=o(!1),y=q[0],G=q[1],K=d(null),L=n(K,"keyboard")[0],O=t((function(){return G(!0)}),[]),V=t((function(){return G(!1)}),[]),D=I({selected:z,selectedMultiple:M}),H=Boolean(D),J=!!j&&(H||!C);return r.createElement("div",{className:m,ref:K,onFocus:O,onBlur:V},r.createElement(a,l({fieldClassName:s(c,W,(x={},x[u]=g,x[v]=L,x)),block:!0,size:N,focused:w||y,disabled:g,filled:H,label:J&&j,error:A,hint:k,rightAddons:(Q||B)&&r.createElement(r.Fragment,null,B,Q?r.cloneElement(Q,{className:p}):null),"data-test-id":T},Y,R),r.createElement("div",{className:f},C&&!H&&r.createElement("span",{className:_},C),H&&r.createElement("div",{className:b},D))))};export{h as Field};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Field}from"./component.js";import"../../../tslib.es6-
|
|
1
|
+
export{Field}from"./component.js";import"../../../tslib.es6-d79b1619.js";import"react";import"classnames";import"../../../form-control/component.js";import"../../../hooks/useFocus/index.js";import"../../utils.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Arrow}from"./arrow/component.js";export{BaseSelect}from"./base-select/component.js";export{Field}from"./field/component.js";export{Optgroup}from"./optgroup/component.js";export{Option}from"./option/component.js";export{OptionsList}from"./options-list/component.js";export{VirtualOptionsList}from"./virtual-options-list/component.js";import"react";import"classnames";import"../../tslib.es6-
|
|
1
|
+
export{Arrow}from"./arrow/component.js";export{BaseSelect}from"./base-select/component.js";export{Field}from"./field/component.js";export{Optgroup}from"./optgroup/component.js";export{Option}from"./option/component.js";export{OptionsList}from"./options-list/component.js";export{VirtualOptionsList}from"./virtual-options-list/component.js";import"react";import"classnames";import"../../tslib.es6-d79b1619.js";import"react-merge-refs";import"downshift";import"resize-observer";import"../../__internal/utils/getDataTestId.js";import"../../popover/component.js";import"react-popper";import"react-transition-group";import"../../portal/component.js";import"react-dom";import"../../portal/utils.js";import"../../stack/context.js";import"../../stack/component.js";import"../utils.js";import"./native-select/component.js";import"../../form-control/component.js";import"../../hooks/useFocus/index.js";import"../../skeleton/component.js";import"./checkmark/component.js";import"react-virtual";import"../../hooks/usePrevious/index.js";import"../../utils/get-service-error/index.js";import"../../utils/get-service-error/is-axios-error.js";import"../../utils/get-service-error/is-network-error.js";import"../../toast-notifier/component.js";import"../../toast-plate/component.js";import"alpha-cli-icons";import"../../button/component.js";import"../../loader/component.js";import"../../toast-notifier/use-timer.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as t}from"../../../tslib.es6-
|
|
1
|
+
import{_ as e,a as t}from"../../../tslib.es6-d79b1619.js";import n,{forwardRef as a,useCallback as o}from"react";import{isGroup as l}from"../../utils.js";var r=function(e){var t=e.option;return n.createElement("option",{value:t.key,disabled:t.disabled},"string"==typeof t.content?t.content:t.key)},i=function(e){var t=e.label,a=e.options;return n.createElement("optgroup",{label:t},a.map((function(e){return n.createElement(r,{option:e,key:e.key})})))},s=a((function(a,s){var m=a.className,p=a.disabled,c=a.multiple,u=a.value,d=a.name,f=a.options,b=a.onChange,k=e(a,["className","disabled","multiple","value","name","options","onChange"]),v=o((function(e){e.stopPropagation()}),[]);return n.createElement("select",t({className:m,disabled:p,multiple:c,name:d,value:u,onChange:b,onClick:v,ref:s},k),f.map((function(e){return l(e)?n.createElement(i,t({},e,{key:e.label})):n.createElement(r,{option:e,key:e.key})})))}));export{s as NativeSelect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{NativeSelect}from"./component.js";import"../../../tslib.es6-
|
|
1
|
+
export{NativeSelect}from"./component.js";import"../../../tslib.es6-d79b1619.js";import"react";import"../../utils.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"../../../tslib.es6-
|
|
1
|
+
import{a as e}from"../../../tslib.es6-d79b1619.js";import t,{isValidElement as o}from"react";import n from"classnames";import{Skeleton as d}from"../../../skeleton/component.js";import{Checkmark as i}from"../checkmark/component.js";var l={option:"index-module_option__LdOw-",disabled:"index-module_disabled__axDUG",s:"index-module_s__0noye",m:"index-module_m__C5xtP",l:"index-module_l__yH1C-",xl:"index-module_xl__WL6cZ",selected:"index-module_selected__OyyTI",highlighted:"index-module_highlighted__WtdTW",content:"index-module_content__H3UDz",textContent:"index-module_textContent__Hx88Y",skeleton:"index-module_skeleton__braSy"},s=function(s){var m,_,a=s.size,c=void 0===a?"s":a,r=s.className,x=s.option,h=s.children,p=s.selected,u=s.highlighted,g=s.disabled,k=s.Checkmark,b=void 0===k?i:k,v=s.innerProps,f=s.index,y=h||x.content||x.key;return t.createElement("div",e({},v,{className:n(l.option,l[c],r,(m={},m[l.highlighted]=u,m[l.selected]=p,m[l.disabled]=g,m)),"data-test-id":"option-"+f}),b&&t.createElement(b,{selected:p}),t.createElement("div",{className:n(l.content,(_={},_[l.textContent]=!o(y),_))},t.createElement(d,{className:l.skeleton,visible:null==x?void 0:x.loading},y)))};export{s as Option};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Option}from"./component.js";import"../../../tslib.es6-
|
|
1
|
+
export{Option}from"./component.js";import"../../../tslib.es6-d79b1619.js";import"react";import"classnames";import"../../../skeleton/component.js";import"../checkmark/component.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useRef as t,useState as i,useEffect as o,useMemo as r}from"react";import{useVirtual as n}from"react-virtual";import l from"classnames";import{usePrevious as s}from"../../../hooks/usePrevious/index.js";import"../../../utils/get-service-error/index.js";import"../../../toast-notifier/component.js";import{lastIndexOf as a,useVisibleOptions as
|
|
1
|
+
import e,{useRef as t,useState as i,useEffect as o,useMemo as r}from"react";import{useVirtual as n}from"react-virtual";import l from"classnames";import{usePrevious as s}from"../../../hooks/usePrevious/index.js";import"../../../utils/get-service-error/index.js";import"../../../toast-notifier/component.js";import{lastIndexOf as a,useVisibleOptions as d,isGroup as m}from"../../utils.js";import{Optgroup as p}from"../optgroup/component.js";import"../../../utils/get-service-error/is-axios-error.js";import"../../../utils/get-service-error/is-network-error.js";import"../../../tslib.es6-d79b1619.js";import"react-dom";import"../../../toast-plate/component.js";import"alpha-cli-icons";import"../../../button/component.js";import"react-merge-refs";import"../../../hooks/useFocus/index.js";import"../../../loader/component.js";import"../../../toast-notifier/use-timer.js";var u={virtualOptionsList:"index-module_virtualOptionsList__2eWn8",inner:"index-module_inner__6DZqj",virtualRow:"index-module_virtualRow__0huMi",highlighted:"index-module_highlighted__Uxj8l",emptyPlaceholder:"index-module_emptyPlaceholder__ONTop",l:"index-module_l__Z0I4S",xl:"index-module_xl__SNx-j"},c=function(c){var v=c.size,x=void 0===v?"s":v,h=c.flatOptions,f=void 0===h?[]:h,g=c.highlightedIndex,_=void 0===g?-1:g,j=c.className,I=c.Option,O=c.open,b=c.options,y=void 0===b?[]:b,N=c.overscan,R=void 0===N?10:N,T=c.Optgroup,E=void 0===T?p:T,P=c.dataTestId,k=c.emptyPlaceholder,w=c.visibleOptions,z=void 0===w?5:w,L=t(null),S=t(null),Z=i(0),q=Z[0],D=Z[1],F=s(_)||-1,M=n({size:f.length,parentRef:S,overscan:R});o((function(){O&&M.scrollToIndex(_,{align:"end"})}),[O]),o((function(){-1!==_&&(M.virtualItems.some((function(e){return e.index===_}))||M.scrollToIndex(_,{align:"end"}))}),[_]),o((function(){var e=function(e){return!e.disabled},t=f.findIndex(e),i=a(f,e);F<=t&&_===f.length-1&&M.scrollToIndex(i),F>=i&&0===_&&M.scrollToIndex(0)}),[F,_]),o((function(){D(M.virtualItems.length>1?f.length:1)}),[M.virtualItems.length,f.length]),d({visibleOptions:z,invalidate:q,listRef:L,styleTargetRef:S,open:O});var U=r((function(){var e=0;return y.reduce((function(t,i,o){return m(i)?(t[e]=o,e+=i.options.length):e+=1,t}),{})}),[y]);return e.createElement("div",{className:l(u.virtualOptionsList,u[x],j),ref:S,"data-test-id":P},e.createElement("div",{className:u.inner,style:{height:M.totalSize+"px"},ref:L},M.virtualItems.map((function(t){var i,o=f[t.index],r=y[U[t.index]];return e.createElement("div",{key:t.index,ref:t.measureRef,className:l(u.virtualRow,(i={},i[u.highlighted]=_===t.index,i)),style:{transform:"translateY("+t.start+"px)"}},r&&e.createElement(E,{label:r.label}),!m(o)&&I({option:o,index:t.index}))}))),k&&0===y.length&&e.createElement("div",{className:u.emptyPlaceholder},k))};export{c as VirtualOptionsList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{VirtualOptionsList}from"./component.js";import"react";import"react-virtual";import"classnames";import"../../../hooks/usePrevious/index.js";import"../../../utils/get-service-error/index.js";import"../../../utils/get-service-error/is-axios-error.js";import"../../../utils/get-service-error/is-network-error.js";import"../../../toast-notifier/component.js";import"../../../tslib.es6-
|
|
1
|
+
export{VirtualOptionsList}from"./component.js";import"react";import"react-virtual";import"classnames";import"../../../hooks/usePrevious/index.js";import"../../../utils/get-service-error/index.js";import"../../../utils/get-service-error/is-axios-error.js";import"../../../utils/get-service-error/is-network-error.js";import"../../../toast-notifier/component.js";import"../../../tslib.es6-d79b1619.js";import"react-dom";import"../../../toast-plate/component.js";import"alpha-cli-icons";import"../../../button/component.js";import"react-merge-refs";import"../../../hooks/useFocus/index.js";import"../../../loader/component.js";import"../../../toast-notifier/use-timer.js";import"../../utils.js";import"../optgroup/component.js";
|
package/dist/select/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Select}from"./component.js";export{Arrow}from"./components/arrow/component.js";export{BaseSelect}from"./components/base-select/component.js";export{Field}from"./components/field/component.js";export{Optgroup}from"./components/optgroup/component.js";export{Option}from"./components/option/component.js";export{OptionsList}from"./components/options-list/component.js";export{VirtualOptionsList}from"./components/virtual-options-list/component.js";export{useSelectWithLoading}from"./presets/use-select-with-loading/hook.js";export{useLazyLoading}from"./presets/use-lazy-loading/index.js";export{convertToOptions,isGroup,isOptionShape,joinOptions,lastIndexOf,processOptions,useVisibleOptions}from"./utils.js";import"../tslib.es6-
|
|
1
|
+
export{Select}from"./component.js";export{Arrow}from"./components/arrow/component.js";export{BaseSelect}from"./components/base-select/component.js";export{Field}from"./components/field/component.js";export{Optgroup}from"./components/optgroup/component.js";export{Option}from"./components/option/component.js";export{OptionsList}from"./components/options-list/component.js";export{VirtualOptionsList}from"./components/virtual-options-list/component.js";export{useSelectWithLoading}from"./presets/use-select-with-loading/hook.js";export{useLazyLoading}from"./presets/use-lazy-loading/index.js";export{convertToOptions,isGroup,isOptionShape,joinOptions,lastIndexOf,processOptions,useVisibleOptions}from"./utils.js";import"../tslib.es6-d79b1619.js";import"react";import"classnames";import"react-merge-refs";import"downshift";import"resize-observer";import"../__internal/utils/getDataTestId.js";import"../popover/component.js";import"react-popper";import"react-transition-group";import"../portal/component.js";import"react-dom";import"../portal/utils.js";import"../stack/context.js";import"../stack/component.js";import"./components/native-select/component.js";import"../form-control/component.js";import"../hooks/useFocus/index.js";import"../skeleton/component.js";import"./components/checkmark/component.js";import"react-virtual";import"../hooks/usePrevious/index.js";import"../utils/get-service-error/index.js";import"../utils/get-service-error/is-axios-error.js";import"../utils/get-service-error/is-network-error.js";import"../toast-notifier/component.js";import"../toast-plate/component.js";import"alpha-cli-icons";import"../button/component.js";import"../loader/component.js";import"../toast-notifier/use-timer.js";import"../intersection-observer-1da95e4e.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useSelectWithLoading}from"./use-select-with-loading/hook.js";export{useLazyLoading}from"./use-lazy-loading/index.js";import"../../tslib.es6-
|
|
1
|
+
export{useSelectWithLoading}from"./use-select-with-loading/hook.js";export{useLazyLoading}from"./use-lazy-loading/index.js";import"../../tslib.es6-d79b1619.js";import"react";import"../../skeleton/component.js";import"classnames";import"../components/option/component.js";import"../components/checkmark/component.js";import"../utils.js";import"../../intersection-observer-1da95e4e.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n,b as e}from"../../../tslib.es6-
|
|
1
|
+
import{a as n,b as e}from"../../../tslib.es6-d79b1619.js";import t,{useReducer as o,useRef as r,useCallback as i,useEffect as a,useMemo as l}from"react";import{Option as c}from"../../components/option/component.js";import{convertToOptions as u}from"../../utils.js";import"../../../intersection-observer-1da95e4e.js";import"classnames";import"../../../skeleton/component.js";import"../../components/checkmark/component.js";var p=function(){return{type:"FETCH_OPTIONS_START"}},s=function(){return{type:"FETCH_OPTIONS_BREAK"}},d=function(n){return{type:"FETCH_OPTIONS_SUCCESS",payload:n}},f=function(n){return{type:"SET_IS_OPENED",payload:n}},T=function(n){return{type:"SET_QUERY_STRING",payload:n}},g=function(){return{type:"RESET"}};function m(m){var v=m.limit,h=void 0===v?10:v,E=m.initialPage,S=void 0===E?0:E,O=m.optionsFetcher,_=[],y={opened:!1,page:S,options:_,loading:!1,allOptionsLoaded:!1,searchText:""},P=o((function(t,o){switch(o.type){case"FETCH_OPTIONS_START":return n(n({},t),{loading:!0});case"FETCH_OPTIONS_BREAK":return n(n({},t),{loading:!1});case"FETCH_OPTIONS_SUCCESS":return n(n({},t),{options:e(e([],t.options),o.payload.options),page:t.page+(o.payload.options.length?1:0),allOptionsLoaded:!o.payload.hasMore,loading:!1});case"SET_IS_OPENED":return n(n({},t),{opened:o.payload});case"SET_QUERY_STRING":return n(n({},y),{opened:t.opened,loading:!0,searchText:o.payload});case"RESET":return n({},y);default:return t}}),y),I=P[0],C=I.opened,N=I.page,R=I.options,b=I.loading,F=I.allOptionsLoaded,j=I.searchText,A=P[1],H=r(),x=i((function(){A(p()),new Promise((function(n,e){var t;null===(t=H.current)||void 0===t||t.call(H),H.current=e,O({page:N,limit:h,searchText:j}).then((function(e){n(e)}))})).then((function(n){var e=u(n.items),t=n.meta,o=t.totalPages,r=t.currentPage;A(d({options:e,hasMore:r<o})),H.current=void 0})).catch((function(n){console.log(n)}))}),[N,h,j,O]),k=r(null);a((function(){var n,e;if(C&&!b&&!F){e=new IntersectionObserver((function(n){n[0].isIntersecting&&(e&&e.disconnect(),x())}),{root:k.current});var t=null===(n=k.current)||void 0===n?void 0:n.querySelectorAll('[role="option"]'),o=null==t?void 0:t[t.length-1];o&&e.observe(o)}return function(){e&&e.disconnect()}}),[N,C,F,S,b,x]);var L=i((function(n){var e,t;n.open?R.length===_.length&&x():(null===(e=H.current)||void 0===e||e.call(H),A(s())),A(f(null!==(t=n.open)&&void 0!==t&&t))}),[_.length,R.length,x]),U=r(),w=r();a((function(){U.current=x}),[x]);var B=i((function(n,e){var t,o;A(T(e.value)),null===(t=H.current)||void 0===t||t.call(H),null===(o=k.current)||void 0===o||o.scrollTo({top:0}),w.current&&clearTimeout(w.current),w.current=setTimeout((function(){var n;null===(n=U.current)||void 0===n||n.call(U)}),300)}),[]),D=l((function(){return Array(b?h:0).fill(0).map((function(n,e){return{key:e,disabled:!0,content:"",loading:!0}}))}),[b,h]),G=i((function(){A(g())}),[]);return{optionsProps:{Option:i((function(e){return t.createElement(c,n({},e,{highlighted:!b&&e.highlighted}))}),[b]),options:e(e([],R),D),optionsListProps:{ref:k,inputProps:{onChange:B,value:j}},onOpen:L},reset:G}}export{m as useLazyLoading};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"../../../tslib.es6-
|
|
1
|
+
import{a as o}from"../../../tslib.es6-d79b1619.js";import e,{useCallback as n}from"react";import{Skeleton as t}from"../../../skeleton/component.js";import{Option as i}from"../../components/option/component.js";import"classnames";import"../../components/checkmark/component.js";var r="index-module_skeleton__9Xlnt";function m(m){var l=m.loading,s=void 0!==l&&l,a=m.visibleOptions,c=void 0===a?6:a,p=n((function(n){return e.createElement(i,o({},n,{Checkmark:null,highlighted:!s&&n.highlighted}))}),[s]),d=Array(c).fill(0).map((function(o,n){return{key:n,disabled:!0,content:e.createElement(t,{className:r,visible:!0})}}));return s?{Option:p,options:d}:null}export{m as useSelectWithLoading};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import t from"classnames";import{Typography as o}from"../typography/component.js";import"../typography/title/index.js";import"../tslib.es6-
|
|
1
|
+
import e from"react";import t from"classnames";import{Typography as o}from"../typography/component.js";import"../typography/title/index.js";import"../tslib.es6-d79b1619.js";import"../typography/title/component.js";import"../colors.module-e1ab3734.js";import"../common.module-5f5cfa97.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";var m="index-module_wrapper__QxqDy",r="index-module_heading__XGDyC",a="index-module_bottomAddons__3yzd0",i="index-module_border__lFf3f",d=function(d){var s,l=d.className,n=d.dataTestId,p=d.title,c=d.rightAddons,y=d.bottomAddons,_=d.border;return e.createElement("div",{"data-test-id":n,className:t(m,l,(s={},s[i]=_,s))},e.createElement("div",{className:r},e.createElement(o.Title,{tag:"h3",view:"xsmall",weight:"bold"},p),c&&e.createElement("div",null,c)),y&&e.createElement("div",{className:a},y))};export{d as SidepanelHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SidepanelHeader}from"./component.js";import"react";import"classnames";import"../typography/component.js";import"../typography/title/index.js";import"../tslib.es6-
|
|
1
|
+
export{SidepanelHeader}from"./component.js";import"react";import"classnames";import"../typography/component.js";import"../typography/title/index.js";import"../tslib.es6-d79b1619.js";import"../typography/title/component.js";import"../colors.module-e1ab3734.js";import"../common.module-5f5cfa97.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";
|
package/dist/space/Item.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"../tslib.es6-
|
|
1
|
+
import{a as e}from"../tslib.es6-d79b1619.js";import*as t from"react";var a=function(a){var r=a.className,i=a.horizontalSize,l=a.verticalSize,n=a.length,m=a.direction,o=a.index,s=a.children,c=a.divider,d=a.wrap,g={};return"vertical"===m?o<n&&(g={marginBottom:i/(c?2:1)}):g=e(e({},o<n&&{marginRight:i/(c?2:1)}),d&&{paddingBottom:l}),null==s?null:t.createElement(t.Fragment,null,t.createElement("div",{className:r,style:g},s),o<n-1&&c&&t.createElement("span",{style:e({width:"100%"},g)},c))};export{a as default};
|
package/dist/space/component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"../tslib.es6-
|
|
1
|
+
import{a as e}from"../tslib.es6-d79b1619.js";import t,{forwardRef as i,Children as r}from"react";import n from"classnames";import a from"./Item.js";var l={spaceContainer:"index-module_spaceContainer__Onnxn",spaceContainerFullWidth:"index-module_spaceContainerFullWidth__W7-9v",vertical:"index-module_vertical__EjIme",center:"index-module_center__VDiFi",start:"index-module_start__WKuO-",end:"index-module_end__FzVWP",spaceItemFullWidth:"index-module_spaceItemFullWidth__C58tA",spaceItem:"index-module_spaceItem__oUYtC"},o={s:12,m:16,l:20},d=i((function(i,d){var m,s,c=i.children,u=i.className,p=i.align,_=void 0===p?"start":p,v=i.direction,f=void 0===v?"vertical":v,h=i.size,x=void 0===h?"m":h,W=i.wrap,C=void 0!==W&&W,F=i.divider,I=void 0!==F&&F,g=i.fullWidth,y=void 0!==g&&g,z=t.useMemo((function(){return(Array.isArray(x)?x:[x,x]).map((function(e){return function(e){return"string"==typeof e?o[e]:e||0}(e)}))}),[x]),A=z[0],j=z[1],w=r.toArray(c);if(0===w.length)return null;var E=n(l.spaceContainer,l[f],((m={})[l[_]]=_,m[l.spaceContainerFullWidth]=y,m),u),N=n(l.spaceItem,((s={})[l.spaceItemFullWidth]=y,s)),b=w.map((function(e,i){return t.createElement(a,{className:N,key:N+"-"+i,direction:f,horizontalSize:A,verticalSize:j,length:w.length,index:i,wrap:C,divider:I},e)}));return t.createElement("div",{className:E,style:e({},C&&{flexWrap:"wrap",marginBottom:-j}),ref:d},b)}));export{d as Space};
|
package/dist/space/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Space}from"./component.js";import"../tslib.es6-
|
|
1
|
+
export{Space}from"./component.js";import"../tslib.es6-d79b1619.js";import"react";import"classnames";import"./Item.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as o}from"../tslib.es6-
|
|
1
|
+
import{_ as e,a as o}from"../tslib.es6-d79b1619.js";import n,{forwardRef as r,useState as t,useEffect as a,useCallback as i,Fragment as l}from"react";import s from"classnames";import{Input as m}from"../input/component.js";import{withSuffix as d}from"../with-suffix/component.js";import"react-merge-refs";import"../button/component.js";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../form-control/component.js";import"../portal/component.js";import"react-dom";import"../portal/utils.js";var c={container:"index-module_container__tczFF",minorPartAndCurrency:"index-module_minorPartAndCurrency__0K7XF",bold:"index-module_bold__r3hvn",input:"index-module_input__SIj3W",suffixContainer:"index-module_suffixContainer__8eIxg",filled:"index-module_filled__nKrpt"},u=d(m),f=r((function(r,m){var d,f=r.value,p=r.suffix,_=r.placeholder,C=void 0===_?"":_,x=r.bold,v=void 0===x||x,j=r.className,N=r.focusedClassName,h=r.required,b=r.dataTestId,g=r.clear,E=void 0!==g&&g,F=r.onChange,I=r.onClear,q=e(r,["value","suffix","placeholder","bold","className","focusedClassName","required","dataTestId","clear","onChange","onClear"]),A=t(f),w=A[0],y=A[1];a((function(){return w!==f?y(f):function(){}}),[f]);var P=i((function(e){y(""),I&&I(e)}),[I]);return n.createElement("div",{className:s(c.container,(d={},d[c.bold]=v,d[c.filled]=Boolean(w),d))},n.createElement(u,o({},q,{suffix:n.createElement(l,null,w,n.createElement("span",{className:c.minorPartAndCurrency}," ",p)),suffixContainerClassName:c.suffixContainer,clear:E,required:h,placeholder:C,value:w,className:s(c.component,j),focusedClassName:N,inputClassName:c.input,onChange:function(e){var o=e.target,n=o.value;if(n===w){var r=o.selectionStart;window.requestAnimationFrame((function(){o.selectionStart=r,o.selectionEnd=r}))}y(n),F&&F(e,{value:n})},onClear:P,dataTestId:b,ref:m})))}));export{f as SuffixInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SuffixInput}from"./component.js";import"../tslib.es6-
|
|
1
|
+
export{SuffixInput}from"./component.js";import"../tslib.es6-d79b1619.js";import"react";import"classnames";import"../input/component.js";import"react-merge-refs";import"../button/component.js";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../form-control/component.js";import"../with-suffix/component.js";import"../portal/component.js";import"react-dom";import"../portal/utils.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{Typography as t}from"../typography/component.js";import"../typography/title/index.js";import"../tslib.es6-
|
|
1
|
+
import e from"react";import{Typography as t}from"../typography/component.js";import"../typography/title/index.js";import"../tslib.es6-d79b1619.js";import"../typography/title/component.js";import"classnames";import"../colors.module-e1ab3734.js";import"../common.module-5f5cfa97.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";var o="index-module_component__cofLq",m="index-module_leftSide__qNA7Y",n="index-module_leftAddons__l-m-3",r="index-module_rightAddons__m-u4n",i=function(i){var s=i.text,p=i.leftAddons,a=i.rightAddons;return e.createElement("div",{className:o},e.createElement("div",{className:m},e.createElement(t.Text,{weight:"bold",tag:"span"},s),p&&e.createElement("div",{className:n},p)),a&&e.createElement("div",{className:r},a))};export{i as SuperListHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SuperListHeader}from"./component.js";import"react";import"../typography/component.js";import"../typography/title/index.js";import"../tslib.es6-
|
|
1
|
+
export{SuperListHeader}from"./component.js";import"react";import"../typography/component.js";import"../typography/title/index.js";import"../tslib.es6-d79b1619.js";import"../typography/title/component.js";import"classnames";import"../colors.module-e1ab3734.js";import"../common.module-5f5cfa97.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import t from"classnames";import{Typography as o}from"../typography/component.js";import"../typography/title/index.js";import"../tslib.es6-
|
|
1
|
+
import e from"react";import t from"classnames";import{Typography as o}from"../typography/component.js";import"../typography/title/index.js";import"../tslib.es6-d79b1619.js";import"../typography/title/component.js";import"../colors.module-e1ab3734.js";import"../common.module-5f5cfa97.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";var m="index-module_component__exnSI",a="index-module_leftSide__t9PJZ",r="index-module_leftAddons__AhXk-",s="index-module_disabled_dot__Ret4Z",i="index-module_rightAddons__UjV9O",n=function(n){var d=n.text,l=n.rightAddons,p=n.leftAddons,c=n.color,_=void 0===c?"secondary":c,g=n.disabled,v=n.className,x=n.weight,y=void 0===x?"regular":x;return e.createElement("div",{className:t(m,v)},e.createElement("div",{className:a},p&&!g&&e.createElement("div",{className:r},p),g&&e.createElement("div",{className:r},e.createElement("span",{className:s})),e.createElement(o.Text,{weight:y,color:_,view:"title",tag:"span"},d)),l&&e.createElement("div",{className:i},l))};export{n as SuperListItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{SuperListItem}from"./component.js";import"react";import"classnames";import"../typography/component.js";import"../typography/title/index.js";import"../tslib.es6-
|
|
1
|
+
export{SuperListItem}from"./component.js";import"react";import"classnames";import"../typography/component.js";import"../typography/title/index.js";import"../tslib.es6-d79b1619.js";import"../typography/title/component.js";import"../colors.module-e1ab3734.js";import"../common.module-5f5cfa97.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";
|
package/dist/switch/component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a}from"../tslib.es6-
|
|
1
|
+
import{_ as e,a}from"../tslib.es6-d79b1619.js";import d,{forwardRef as n,useRef as s,useCallback as t}from"react";import o from"react-merge-refs";import l from"classnames";import{useFocus as c}from"../hooks/useFocus/index.js";var m={component:"index-module_component__uXwqU",checked:"index-module_checked__dMpWF",switch:"index-module_switch__c7Qyf",start:"index-module_start__6RfRJ",center:"index-module_center__1n6sQ",addons:"index-module_addons__ZqO-o",block:"index-module_block__m7SjH",content:"index-module_content__hoWfv",label:"index-module_label__earxI",hint:"index-module_hint__LstQQ",reversed:"index-module_reversed__fS7Bs",disabled:"index-module_disabled__s1L6d",focused:"index-module_focused__v7jCm"},r=n((function(n,r){var i,_=n.reversed,u=void 0!==_&&_,h=n.checked,b=void 0!==h&&h,p=n.align,x=void 0===p?"start":p,f=n.addons,k=n.block,v=n.disabled,N=n.label,g=n.hint,E=n.name,j=n.value,w=n.className,C=n.onChange,Q=n.dataTestId,y=e(n,["reversed","checked","align","addons","block","disabled","label","hint","name","value","className","onChange","dataTestId"]),I=s(null),q=c(I,"keyboard")[0],F=t((function(e){C&&C(e,{checked:e.target.checked,name:E})}),[C,E]);return d.createElement("label",{className:l(m.component,m[x],w,(i={},i[m.disabled]=v,i[m.checked]=b,i[m.reversed]=u,i[m.focused]=q,i[m.block]=k,i)),ref:o([I,r])},d.createElement("input",a({type:"checkbox",onChange:F,disabled:v,checked:b,name:E,value:j,"data-test-id":Q},y)),d.createElement("span",{className:m.switch}),(N||g)&&d.createElement("span",{className:m.content},N&&d.createElement("span",{className:m.label},N),g&&d.createElement("span",{className:m.hint},g)),f&&d.createElement("span",{className:m.addons},f))}));export{r as Switch};
|
package/dist/switch/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Switch}from"./component.js";import"../tslib.es6-
|
|
1
|
+
export{Switch}from"./component.js";import"../tslib.es6-d79b1619.js";import"react";import"react-merge-refs";import"classnames";import"../hooks/useFocus/index.js";
|
package/dist/table/columns.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"react";import{ChevronForwardS as e}from"alpha-cli-icons";import{Button as o}from"../button/component.js";import"../tslib.es6-
|
|
1
|
+
import t from"react";import{ChevronForwardS as e}from"alpha-cli-icons";import{Button as o}from"../button/component.js";import"../tslib.es6-d79b1619.js";import"react-merge-refs";import"classnames";import"../hooks/useFocus/index.js";import"../loader/component.js";var r=function(){return[{header:"Title",accessor:"title",sort:!0,row:{image:function(){return"https://via.placeholder.com/150"},subtitle:"title"}},{header:"Photo",accessor:"photo",sort:!0,row:{title:function(t){return t.row.title+"awdawd"},image:function(t){return t.row.photo}}},{header:"icon",row:{title:"title",icon:function(){return t.createElement(e,null)}}},{header:"Button",row:{title:function(e){var r=e.refetch;return t.createElement(o,{onClick:r},"Refetch")}}},{header:"Button",width:"50px",row:{title:null}}]};export{r as NewColumns};
|
package/dist/table/component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./components/cell/component.js";export{T as Table}from"../component-
|
|
1
|
+
import"./components/cell/component.js";export{T as Table}from"../component-622d4e41.js";import"../tslib.es6-d79b1619.js";import"react";import"classnames";import"../component-fcd83d7e.js";import"../__internal/utils/getDataTestId.js";import"../hooks/useFocus/index.js";import"../typography/component.js";import"../typography/title/index.js";import"../typography/title/component.js";import"../colors.module-e1ab3734.js";import"../common.module-5f5cfa97.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";import"../cell/pure/component.js";import"./components/cells/index.js";import"alpha-cli-icons";import"./components/empty-list/index.js";import"./languages/index.js";import"./components/error/index.js";import"./components/loading/index.js";import"./components/pagination/index.js";import"../button/component.js";import"react-merge-refs";import"../loader/component.js";import"./components/table-header/index.js";import"rooks";import"../header-search/component.js";import"./hooks/use-table-data.js";import"../parse-query-params-e1b1327a.js";import"../_commonjsHelpers-8dcafa78.js";import"./utils/get-query-from-url.js";import"./utils/serialize-data.js";import"./utils/sort-array.js";import"./utils/is-object.js";import"./utils/add-query-param.js";import"./utils/set-query-to-url.js";import"./utils/get-tags.js";import"../image/component.js";import"../skeleton/component.js";import"../use-image-render-component-96e779fb.js";import"../spinner/component.js";import"../image/typings.js";import"../image/constants.js";import"../image/utils.js";import"./utils/remove-query-param.js";import"./utils/reset-query-param.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"../../../tslib.es6-
|
|
1
|
+
import{a as t}from"../../../tslib.es6-d79b1619.js";import e from"react";import o from"classnames";import{C as i}from"../../../component-fcd83d7e.js";import"../../../__internal/utils/getDataTestId.js";import"../../../hooks/useFocus/index.js";import"../../../typography/component.js";import"../../../typography/title/index.js";import"../../../typography/title/component.js";import"../../../colors.module-e1ab3734.js";import"../../../common.module-5f5cfa97.js";import"../../../typography/text/component.js";import"../../../typography/title-responsive/component.js";import"../../../cell/pure/component.js";var s="index-module_cell__SVZPV",r="index-module_children__X0572",m="index-module_is_div__XHlH-",a=function(a){var p,l=a.dataTestID,n=a.className,d=a.children,c=a.title,u=a.subtitle,j=a.tableProps,_=a.cellProps,y=a.addon,h=a.width,f=a.tag,v=void 0===f?"td":f;return e.createElement(v,t({"data-test-id":l,className:o(s,n,(p={},p[m]="div"===v,p)),style:{width:h}},j),d?e.createElement("div",{className:o(r)},d):e.createElement(i.Base,t({title:void 0===c?"-":c,subtitle:u,addon:y},_)))};export{a as TableCell};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{TableCell}from"./component.js";import"../../../tslib.es6-
|
|
1
|
+
export{TableCell}from"./component.js";import"../../../tslib.es6-d79b1619.js";import"react";import"classnames";import"../../../component-fcd83d7e.js";import"../../../__internal/utils/getDataTestId.js";import"../../../hooks/useFocus/index.js";import"../../../typography/component.js";import"../../../typography/title/index.js";import"../../../typography/title/component.js";import"../../../colors.module-e1ab3734.js";import"../../../common.module-5f5cfa97.js";import"../../../typography/text/component.js";import"../../../typography/title-responsive/component.js";import"../../../cell/pure/component.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{ChevronForwardS as r}from"alpha-cli-icons";import o from"classnames";import{Typography as t}from"../../../typography/component.js";import"../../../typography/title/index.js";import"../../../tslib.es6-
|
|
1
|
+
import e from"react";import{ChevronForwardS as r}from"alpha-cli-icons";import o from"classnames";import{Typography as t}from"../../../typography/component.js";import"../../../typography/title/index.js";import"../../../tslib.es6-d79b1619.js";import"../../../typography/title/component.js";import"../../../colors.module-e1ab3734.js";import"../../../common.module-5f5cfa97.js";import"../../../typography/text/component.js";import"../../../typography/title-responsive/component.js";var a={header_row:"index-module_header_row__-IYYq",cell:"index-module_cell__c2wSL",clickable:"index-module_clickable__uhIIg",head_wrapper:"index-module_head_wrapper__WjtNB",arrow:"index-module_arrow__svnkJ",accent:"index-module_accent__5Dn8Q",DESC:"index-module_DESC__p2eV7",ASC:"index-module_ASC__fIiQ-"};function c(c){var l=c.columns,n=c.sort,m=c.order,i=c.addParam;return e.createElement("thead",null,e.createElement("tr",{className:a.header_row},l.map((function(c){var l,s,p=c.accessor&&n===c.accessor,d=p&&"ASC"===m?"DESC":"ASC";return e.createElement("th",{className:o(a.cell,(l={},l[a.clickable]=c.sort,l)),align:"left",style:{width:c.width||"auto"},onClick:c.sort?function(){return i({order:d,sort:c.accessor})}:void 0},e.createElement(t.Text,{className:a.head_wrapper,view:"caps",color:"secondary",weight:"medium"},c.header,c.sort&&e.createElement("span",{className:o(a.arrow,a[d],(s={},s[a.accent]=p,s))},e.createElement(r,null))))}))))}export{c as Cells};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"react";import{Typography as e}from"../../../typography/component.js";import{translate as o}from"../../languages/index.js";import"../../../typography/title/index.js";import"../../../tslib.es6-
|
|
1
|
+
import t from"react";import{Typography as e}from"../../../typography/component.js";import{translate as o}from"../../languages/index.js";import"../../../typography/title/index.js";import"../../../tslib.es6-d79b1619.js";import"../../../typography/title/component.js";import"classnames";import"../../../colors.module-e1ab3734.js";import"../../../common.module-5f5cfa97.js";import"../../../typography/text/component.js";import"../../../typography/title-responsive/component.js";var m="index-module_empty_list__dwgN3",p=function(p){var r=p.language;return t.createElement("div",{className:m},t.createElement(e.Text,{view:"title"},o(r)("emptyList")))};export{p as EmptyList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"react";import{Typography as
|
|
1
|
+
import t from"react";import{Typography as e}from"../../../typography/component.js";import{translate as o}from"../../languages/index.js";import"../../../typography/title/index.js";import"../../../tslib.es6-d79b1619.js";import"../../../typography/title/component.js";import"classnames";import"../../../colors.module-e1ab3734.js";import"../../../common.module-5f5cfa97.js";import"../../../typography/text/component.js";import"../../../typography/title-responsive/component.js";var r="index-module_empty_list__FWx71",m=function(m){var p=m.language;return t.createElement("div",{className:r},t.createElement(e.Text,{view:"title"},o(p)("error")))};export{m as Error};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t,{memo as e}from"react";import o from"classnames";import{TableCell as r}from"../cell/component.js";import"../../../tslib.es6-
|
|
1
|
+
import t,{memo as e}from"react";import o from"classnames";import{TableCell as r}from"../cell/component.js";import"../../../tslib.es6-d79b1619.js";import"../../../component-fcd83d7e.js";import"../../../__internal/utils/getDataTestId.js";import"../../../hooks/useFocus/index.js";import"../../../typography/component.js";import"../../../typography/title/index.js";import"../../../typography/title/component.js";import"../../../colors.module-e1ab3734.js";import"../../../common.module-5f5cfa97.js";import"../../../typography/text/component.js";import"../../../typography/title-responsive/component.js";import"../../../cell/pure/component.js";var n={td:"index-module_td__tJ38Q",tr:"index-module_tr__bQ4Yc",aniVertical:"index-module_aniVertical__QAeK7"},m=e((function(e){var m=e.columnsLength;return t.createElement(t.Fragment,null,new Array(5).fill(1).map((function(){return t.createElement("tr",{className:o(n.row,n.tr)},new Array(m).fill(1).map((function(){return t.createElement(r,null,t.createElement("div",{className:n.td,style:{width:Math.floor(51*Math.random())+50+"%"}}))})))})))}));export{m as Loading};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{ChevronForwardS as t}from"alpha-cli-icons";import n from"classnames";import{Button as o}from"../../../button/component.js";import{Typography as
|
|
1
|
+
import e from"react";import{ChevronForwardS as t}from"alpha-cli-icons";import n from"classnames";import{Button as o}from"../../../button/component.js";import{Typography as r}from"../../../typography/component.js";import{translate as a}from"../../languages/index.js";import"../../../tslib.es6-d79b1619.js";import"react-merge-refs";import"../../../hooks/useFocus/index.js";import"../../../loader/component.js";import"../../../typography/title/index.js";import"../../../typography/title/component.js";import"../../../colors.module-e1ab3734.js";import"../../../common.module-5f5cfa97.js";import"../../../typography/text/component.js";import"../../../typography/title-responsive/component.js";var i="index-module_pagination_wrap__kmile",l="index-module_pagination__36rf5",m="index-module_pages_info__9QuwE",s="index-module_prev_btn__UnDy5",c="index-module_disabled_btn__G6J6W",p="index-module_pagination_btn__vexgb",u="index-module_btn__-Zrx2",d="index-module_active__F46kP",g="index-module_select__XysEX";var _=function(_){var f,v,h,x,E,y=_.pagesCount,b=_.currentPage,j=_.recordsPerPage,k=void 0===j?30:j,N=_.total,w=_.language,C=_.addParam,P=function(e,t){for(var n=e-2,o=e+2+1,r=[],a=[],i=0,l=1;l<=t;l++)(1===l||l===t||l>=n&&l<o)&&r.push(l);return r.forEach((function(e){i&&(e-i==2?a.push(i+1):e-i!=1&&a.push("...")),a.push(e),i=e})),a}(b,y),F=1===b,A=b===y;return e.createElement("div",{className:i},e.createElement("div",{className:m},(h=1===b?1:(b-1)*k,E=(x=k*b)>N?N:x,e.createElement(r.Text,{view:"title",weight:"medium",color:"secondary"},a(w)("resultsFromTo")," ",a(w)("from")," ",e.createElement("strong",null,h," "),a(w)("to")," ",e.createElement("strong",null,E," "),a(w)("totalCount")," ",e.createElement("strong",null,N," ")))),P.length>1&&e.createElement("div",{className:l},e.createElement(o,{className:n(s,u,(f={},f[c]=F,f)),leftAddons:e.createElement(t,null),view:"ghost",onClick:function(){return C({page:b-1})},disabled:F}),P.map((function(t,r){var a;return Number.isFinite(t)?e.createElement(o,{className:n(p,(a={},a[d]=t===b,a)),size:"xs",view:"ghost",key:t,onClick:function(){return C({page:t})}},t):e.createElement(o,{key:t+r,className:n(p),view:"ghost",disabled:!0},"...")})),e.createElement(o,{className:n(u,(v={},v[c]=A,v)),leftAddons:e.createElement(t,null),view:"ghost",onClick:function(){C({page:b+1})},disabled:A})),e.createElement("select",{value:k,className:g,onChange:function(e){C({page:1,limit:e.target.value})}},[5,10,20,30,40,50].map((function(t){return e.createElement("option",{key:t,value:t},a(w)("resultsOnPage")+" "+t+" ")}))))};export{_ as Pagination};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useState as t,useEffect as o,useCallback as a}from"react";import{PlusS as r,ControllerS as n}from"alpha-cli-icons";import{useDebounce as l}from"rooks";import{Button as i}from"../../../button/component.js";import{HeaderSearch as s}from"../../../header-search/component.js";import{translate as m}from"../../languages/index.js";import"../../../tslib.es6-
|
|
1
|
+
import e,{useState as t,useEffect as o,useCallback as a}from"react";import{PlusS as r,ControllerS as n}from"alpha-cli-icons";import{useDebounce as l}from"rooks";import{Button as i}from"../../../button/component.js";import{HeaderSearch as s}from"../../../header-search/component.js";import{translate as m}from"../../languages/index.js";import"../../../tslib.es6-d79b1619.js";import"react-merge-refs";import"classnames";import"../../../hooks/useFocus/index.js";import"../../../loader/component.js";var c="index-module_table_header__GXu4u",d="index-module_actions__GZKJC",p="index-module_tags__PpKzF",u="index-module_buttons__3CQYG",h=function(h){var f=h.tags,x=h.searchPlaceholder,_=void 0===x?"Type something..":x,v=h.searchText,g=h.addParam,C=h.onCreateClick,E=h.onDownloadClick,k=h.onFiltersClick,b=h.showFiltersButton,j=h.language,w=t(v),z=w[0],F=w[1],N=t(v),T=N[0],G=N[1];o((function(){g({searchText:T,page:1})}),[T]);var P=l(G,500),y=a((function(e){F(e),P(e)}),[]);return e.createElement("div",{className:c},e.createElement("div",{className:d},e.createElement(s,{value:z,onChange:y,placeholder:_}),e.createElement("div",{className:u},!!C&&e.createElement(i,{dataTestId:"createbtn",onClick:C,view:"primary",leftAddons:e.createElement(r,null),size:"xs"},m(j)("create")),!!E&&e.createElement(i,{view:"outlined",size:"xs",onClick:E},m(j)("export")),b&&e.createElement(i,{leftAddons:e.createElement(n,null),onClick:k,view:"outlined",size:"xs"},m(j)("filters")))),!!f.length&&e.createElement("div",{className:p},f))};export{h as TableHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,d as t}from"../../tslib.es6-
|
|
1
|
+
import{c as r,d as t}from"../../tslib.es6-d79b1619.js";import{useState as e,useCallback as s,useEffect as a}from"react";import"../../parse-query-params-e1b1327a.js";import{getQueryFromUrl as o}from"../utils/get-query-from-url.js";import{serializeData as i}from"../utils/serialize-data.js";import"../../_commonjsHelpers-8dcafa78.js";import"../utils/sort-array.js";import"../utils/is-object.js";function n(n){var u=this,m=n.promise,c=n.records,l=e(c||[]),p=l[0],f=l[1],d=e(!0),j=d[0],b=d[1],g=e(!1),h=g[0],v=g[1],y=e(0),q=y[0],w=y[1],x=e(1),z=x[0],C=x[1],D=e(),H=D[0],I=D[1],P=s((function(){return r(u,void 0,void 0,(function(){var r,e,s,a;return t(this,(function(t){switch(t.label){case 0:if(r=o(),I(r),!m)return[3,5];v(!1),b(!0),t.label=1;case 1:return t.trys.push([1,3,,4]),[4,m(r)];case 2:return e=t.sent().data,s=e.items,a=e.meta,w(a.totalItems),C(a.totalPages),f(s||[]),[3,4];case 3:return t.sent(),v(!0),[3,4];case 4:return[3,6];case 5:f(i(c||[],r)),t.label=6;case 6:return b(!1),[2]}}))}))}),[]);return a((function(){P()}),[]),{loading:j,error:h,data:p,total:q,params:H,pagesCount:z,updateData:P}}export{n as useTableData};
|
package/dist/table/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "../component-
|
|
1
|
+
export * from "../component-622d4e41";
|
|
2
2
|
export * from "./components/cell/index";
|
package/dist/table/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{T as Table}from"../component-
|
|
1
|
+
export{T as Table}from"../component-622d4e41.js";export{TableCell}from"./components/cell/component.js";import"react";import"classnames";import"./components/cells/index.js";import"alpha-cli-icons";import"../typography/component.js";import"../typography/title/index.js";import"../tslib.es6-d79b1619.js";import"../typography/title/component.js";import"../colors.module-e1ab3734.js";import"../common.module-5f5cfa97.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";import"./components/empty-list/index.js";import"./languages/index.js";import"./components/error/index.js";import"./components/loading/index.js";import"../component-fcd83d7e.js";import"../__internal/utils/getDataTestId.js";import"../hooks/useFocus/index.js";import"../cell/pure/component.js";import"./components/pagination/index.js";import"../button/component.js";import"react-merge-refs";import"../loader/component.js";import"./components/table-header/index.js";import"rooks";import"../header-search/component.js";import"./hooks/use-table-data.js";import"../parse-query-params-e1b1327a.js";import"../_commonjsHelpers-8dcafa78.js";import"./utils/get-query-from-url.js";import"./utils/serialize-data.js";import"./utils/sort-array.js";import"./utils/is-object.js";import"./utils/add-query-param.js";import"./utils/set-query-to-url.js";import"./utils/get-tags.js";import"../image/component.js";import"../skeleton/component.js";import"../use-image-render-component-96e779fb.js";import"../spinner/component.js";import"../image/typings.js";import"../image/constants.js";import"../image/utils.js";import"./utils/remove-query-param.js";import"./utils/reset-query-param.js";
|
package/dist/table/table.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react";import"classnames";import"./components/cells/index.js";import"./components/empty-list/index.js";import"./components/error/index.js";import"./components/loading/index.js";import"./components/pagination/index.js";import"./components/table-header/index.js";import"./hooks/use-table-data.js";import"./utils/add-query-param.js";import"./utils/get-tags.js";export{a as Table}from"../component-
|
|
1
|
+
import"react";import"classnames";import"./components/cells/index.js";import"./components/empty-list/index.js";import"./components/error/index.js";import"./components/loading/index.js";import"./components/pagination/index.js";import"./components/table-header/index.js";import"./hooks/use-table-data.js";import"./utils/add-query-param.js";import"./utils/get-tags.js";export{a as Table}from"../component-622d4e41.js";import"./utils/remove-query-param.js";import"./utils/reset-query-param.js";import"alpha-cli-icons";import"../typography/component.js";import"../typography/title/index.js";import"../tslib.es6-d79b1619.js";import"../typography/title/component.js";import"../colors.module-e1ab3734.js";import"../common.module-5f5cfa97.js";import"../typography/text/component.js";import"../typography/title-responsive/component.js";import"./languages/index.js";import"./components/cell/component.js";import"../component-fcd83d7e.js";import"../__internal/utils/getDataTestId.js";import"../hooks/useFocus/index.js";import"../cell/pure/component.js";import"../button/component.js";import"react-merge-refs";import"../loader/component.js";import"rooks";import"../header-search/component.js";import"../parse-query-params-e1b1327a.js";import"../_commonjsHelpers-8dcafa78.js";import"./utils/get-query-from-url.js";import"./utils/serialize-data.js";import"./utils/sort-array.js";import"./utils/is-object.js";import"./utils/set-query-to-url.js";import"../image/component.js";import"../skeleton/component.js";import"../use-image-render-component-96e779fb.js";import"../spinner/component.js";import"../image/typings.js";import"../image/constants.js";import"../image/utils.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"../../tslib.es6-
|
|
1
|
+
import{a as r}from"../../tslib.es6-d79b1619.js";import{q as s,p as o}from"../../parse-query-params-e1b1327a.js";import{setQueryToUrl as a}from"./set-query-to-url.js";import"../../_commonjsHelpers-8dcafa78.js";var e=function(e){return a(s(r(r({},o()),e)))};export{e as addQueryParam};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as r}from"../../tslib.es6-
|
|
1
|
+
import{_ as r}from"../../tslib.es6-d79b1619.js";import{p as e}from"../../parse-query-params-e1b1327a.js";import"../../_commonjsHelpers-8dcafa78.js";function t(){var t=e(),s=t.limit,o=t.page,a=t.searchText,i=t.sort,m=t.order,p={where:r(t,["limit","page","searchText","sort","order"]),limit:Number(s)||10,page:Number(o)||1};return"ASC"!==m&&"DESC"!==m||(p.order=m),"string"==typeof a&&(p.searchText=a),"string"==typeof i&&(p.sort=i),p}export{t as getQueryFromUrl};
|