@alphakits/ui 1.30.32 → 1.30.34
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.d.ts +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/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//321/201omponent.d.ts +1 -1
- package/dist/calendar/index.js +1 -1
- package/dist/calendar-input/component.d.ts +1 -1
- package/dist/calendar-input/component.js +1 -1
- package/dist/calendar-input/index.js +1 -1
- package/dist/{capitalize-b4cf3c66.js → capitalize-3cff583e.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/component.js +1 -1
- package/dist/cell/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/empty-page/component.js +1 -1
- package/dist/empty-page/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/index.js +1 -1
- package/dist/form/templates/filters-form/index.js +1 -1
- package/dist/form/templates/rest-form/form.js +1 -1
- package/dist/form/templates/rest-form/index.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/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-uploader/component.js +1 -1
- package/dist/image-uploader/index.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.d.ts +1 -1
- package/dist/input-autocomplete/component.d.ts +2 -2
- package/dist/list-allert/component.js +1 -1
- package/dist/list-allert/index.js +1 -1
- package/dist/masked-input/component.d.ts +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/notification/component.d.ts +1 -1
- package/dist/page-with-controls/component.js +1 -1
- package/dist/page-with-controls/index.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/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.d.ts +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/sidepanel/component.js +1 -1
- package/dist/sidepanel/index.js +1 -1
- package/dist/sidepanel-header/component.js +1 -1
- package/dist/sidepanel-header/index.js +1 -1
- package/dist/stepped-progress-bar/components/step-bar.js +1 -1
- package/dist/stepped-progress-bar/index.d.ts +1 -1
- package/dist/stepped-progress-bar/index.js +1 -1
- package/dist/suffix-input/component.d.ts +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/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/hooks/use-table-data.d.ts +7 -3
- package/dist/table/hooks/use-table-data.js +1 -1
- package/dist/table/index.js +1 -1
- package/dist/table/table.d.ts +2 -1
- package/dist/table/table.js +1 -1
- package/dist/table/utils/prepare-rows.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/textarea/component.d.ts +1 -1
- package/dist/toast/component.d.ts +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/with-suffix/component.d.ts +1 -1
- package/package.json +1 -1
- /package/dist/{colors.module-f47f2595.js → colors.module-aca96920.js} +0 -0
- /package/dist/{contact-block-b6137385.d.ts → contact-block-d9e32ea2.d.ts} +0 -0
- /package/dist/{contact-block-b6137385.js → contact-block-d9e32ea2.js} +0 -0
- /package/dist/{gutters.module-f010f7ff.js → gutters.module-5ccc3a43.js} +0 -0
- /package/dist/{isSymbol-ea415220.js → isSymbol-ad96b73f.js} +0 -0
- /package/dist/{step-bar-688dad73.d.ts → step-bar-372c2003.d.ts} +0 -0
- /package/dist/{step-bar-688dad73.js → step-bar-372c2003.js} +0 -0
- /package/dist/{use-image-render-component-72e1ad3a.d.ts → use-image-render-component-67131bcc.d.ts} +0 -0
- /package/dist/{use-image-render-component-72e1ad3a.js → use-image-render-component-67131bcc.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import r from"@alphakits/icons/dist/ChevronForwardS";import o from"classnames";import{Typography as t}from"../../../typography/component.js";import"../../../typography/text/component.js";import"../../../colors.module-
|
|
1
|
+
import e from"react";import r from"@alphakits/icons/dist/ChevronForwardS";import o from"classnames";import{Typography as t}from"../../../typography/component.js";import"../../../typography/text/component.js";import"../../../colors.module-aca96920.js";import"../../../typography/title/index.js";import"tslib";import"../../../typography/title/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,i=c.order,m=c.addParam;return e.createElement("thead",null,e.createElement("tr",{className:a.header_row},l.map((function(c){var l,d,s=c.accessor&&n===c.accessor,p=s&&"ASC"===i?"DESC":"ASC";return e.createElement("th",{className:o(a.cell,(l={},l[a.clickable]=c.sort,l)),align:c.align,style:{width:c.width||"auto"},onClick:c.sort?function(){return m({order:p,sort:c.accessor})}:void 0},e.createElement(t.Text,{className:a.head_wrapper,view:"caps",tag:"div",color:"secondary",weight:"medium"},c.header,c.sort&&e.createElement("span",{className:o(a.arrow,a[p],(d={},d[a.accent]=s,d))},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/text/component.js";import"classnames";import"../../../colors.module-
|
|
1
|
+
import t from"react";import{Typography as e}from"../../../typography/component.js";import{translate as o}from"../../languages/index.js";import"../../../typography/text/component.js";import"classnames";import"../../../colors.module-aca96920.js";import"../../../typography/title/index.js";import"tslib";import"../../../typography/title/component.js";var r="index-module_empty_list__dwgN3",m=function(m){var p=m.language;return t.createElement("div",{className:r},t.createElement(e.Text,{color:"primary",view:"title"},o(p)("emptyList")))};export{m as EmptyList};
|
|
@@ -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/text/component.js";import"classnames";import"../../../colors.module-
|
|
1
|
+
import t from"react";import{Typography as e}from"../../../typography/component.js";import{translate as o}from"../../languages/index.js";import"../../../typography/text/component.js";import"classnames";import"../../../colors.module-aca96920.js";import"../../../typography/title/index.js";import"tslib";import"../../../typography/title/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,{color:"primary",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";import"../../../cell/component.js";import"../../../cell/base/component.js";import"../../../__internal/utils/getDataTestId.js";import"../../../hooks/useFocus/index.js";import"../../../typography/component.js";import"../../../typography/text/component.js";import"../../../colors.module-
|
|
1
|
+
import t,{memo as e}from"react";import o from"classnames";import{TableCell as r}from"../cell/component.js";import"tslib";import"../../../cell/component.js";import"../../../cell/base/component.js";import"../../../__internal/utils/getDataTestId.js";import"../../../hooks/useFocus/index.js";import"../../../typography/component.js";import"../../../typography/text/component.js";import"../../../colors.module-aca96920.js";import"../../../typography/title/index.js";import"../../../typography/title/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 t from"@alphakits/icons/dist/ChevronForwardS";import n from"classnames";import{Button as o}from"../../../button/component.js";import{Typography as a}from"../../../typography/component.js";import{translate as r}from"../../languages/index.js";import"tslib";import"react-merge-refs";import"../../../hooks/useFocus/index.js";import"../../../loader/component.js";import"../../../typography/text/component.js";import"../../../colors.module-
|
|
1
|
+
import e from"react";import t from"@alphakits/icons/dist/ChevronForwardS";import n from"classnames";import{Button as o}from"../../../button/component.js";import{Typography as a}from"../../../typography/component.js";import{translate as r}from"../../languages/index.js";import"tslib";import"react-merge-refs";import"../../../hooks/useFocus/index.js";import"../../../loader/component.js";import"../../../typography/text/component.js";import"../../../colors.module-aca96920.js";import"../../../typography/title/index.js";import"../../../typography/title/component.js";var i="index-module_pagination_wrap__kmile",m="index-module_pagination__36rf5",l="index-module_pages_info__9QuwE",s="index-module_prev_btn__UnDy5",c="index-module_disabled_btn__G6J6W",p="index-module_pagination_btn__vexgb",d="index-module_btn__-Zrx2",u="index-module_active__F46kP",_="index-module_select__XysEX";var g=function(g){var f,v,h=g.pagesCount,x=g.currentPage,E=g.recordsPerPage,y=void 0===E?30:E,b=g.total,w=g.language,k=g.addParam,j=function(e,t){for(var n=e-2,o=e+2+1,a=[],r=[],i=0,m=1;m<=t;m++)(1===m||m===t||m>=n&&m<o)&&a.push(m);return a.forEach((function(e){i&&(e-i==2?r.push(i+1):e-i!=1&&r.push("...")),r.push(e),i=e})),r}(x,h),N=1===x,C=x===h;return e.createElement("div",{className:i},e.createElement("div",{className:l},e.createElement(a.Text,{view:"title",weight:"medium",color:"secondary"},r(w)("totalCount")),e.createElement(a.Text,{view:"title",weight:"medium",color:"primary"},b)),j.length>1&&e.createElement("div",{className:m},e.createElement(o,{className:n(s,d,(f={},f[c]=N,f)),leftAddons:e.createElement(t,null),view:"ghost",onClick:function(){return k({page:x-1})},disabled:N}),j.map((function(t,a){var r;return Number.isFinite(t)?e.createElement(o,{className:n(p,(r={},r[u]=t===x,r)),size:"xs",view:"ghost",key:t,onClick:function(){return k({page:t})}},t):e.createElement(o,{key:t+a,className:n(p),view:"ghost",disabled:!0},"...")})),e.createElement(o,{className:n(d,(v={},v[c]=C,v)),leftAddons:e.createElement(t,null),view:"ghost",onClick:function(){k({page:x+1})},disabled:C})),e.createElement("select",{value:y,className:_,onChange:function(e){k({page:1,limit:e.target.value})}},[5,10,20,30,40,50].map((function(t){return e.createElement("option",{key:t,value:t},r(w)("resultsOnPage")+" "+t+" ")}))))};export{g as Pagination};
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { TableProps } from "../table";
|
|
2
|
-
import { QueryDTO } from "../types";
|
|
2
|
+
import { Query, QueryDTO } from "../types";
|
|
3
3
|
type Props<T extends object> = {
|
|
4
4
|
promise?: TableProps<T>['promise'];
|
|
5
5
|
records?: T[];
|
|
6
|
+
fromPath?: boolean;
|
|
6
7
|
};
|
|
7
|
-
declare function useTableData<T extends object>({ promise, records }: Props<T>): {
|
|
8
|
+
declare function useTableData<T extends object>({ promise, records, fromPath }: Props<T>): {
|
|
8
9
|
loading: boolean;
|
|
9
10
|
error: boolean;
|
|
10
11
|
data: T[];
|
|
11
12
|
total: number;
|
|
12
13
|
params: QueryDTO | undefined;
|
|
13
14
|
pagesCount: number;
|
|
14
|
-
updateData: () => Promise<void>;
|
|
15
|
+
updateData: (forcedQuery?: QueryDTO | undefined) => Promise<void>;
|
|
16
|
+
addParam: (patch: Query) => void;
|
|
17
|
+
removeParam: (paramName: string, id?: string | undefined) => void;
|
|
18
|
+
resetParams: (patch: Query) => void;
|
|
15
19
|
};
|
|
16
20
|
export { useTableData };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as r,__generator as t}from"tslib";import{useState as
|
|
1
|
+
import{__awaiter as r,__generator as e,__assign as t}from"tslib";import{useState as i,useCallback as a,useEffect as n}from"react";import{addQueryParam as o}from"../utils/add-query-param.js";import{getQueryFromUrl as u}from"../utils/get-query-from-url.js";import"query-string";import{removeQueryParam as s}from"../utils/remove-query-param.js";import{resetQueryParam as l}from"../utils/reset-query-param.js";import{serializeData as m}from"../utils/serialize-data.js";import"../utils/parse-query-params.js";import"../utils/set-query-to-url.js";import"../utils/sort-array.js";var f={page:1,limit:10,where:{}};function p(r,e){var i,a,n=null!=r?r:f,o=t(t(t({},n),e),{where:t(t({},null!==(i=n.where)&&void 0!==i?i:{}),null!==(a=e.where)&&void 0!==a?a:{})});return o.page&&(o.page=+o.page),o.limit&&(o.limit=+o.limit),o}function v(v){var d=this,c=v.promise,h=v.records,y=v.fromPath,w=void 0===y||y,g=i([]),j=g[0],q=g[1],A=i(!0),P=A[0],b=A[1],S=i(!1),x=S[0],z=S[1],C=i(0),D=C[0],I=C[1],k=i(1),B=k[0],E=k[1],F=i(void 0),G=F[0],H=F[1],J=a((function(r){var e;return w?u():null!==(e=null!=r?r:G)&&void 0!==e?e:f}),[w,G]),K=a((function(t){return r(d,void 0,void 0,(function(){var r,i,a,n;return e(this,(function(e){switch(e.label){case 0:if(r=J(t),Array.isArray(h)&&(b(!1),q(m(h,r))),H(r),!c)return[3,5];z(!1),b(!0),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,c(r)];case 2:return i=e.sent().data,a=i.items,n=i.meta,I(n.totalItems),E(n.totalPages),q(a||[]),[3,5];case 3:return e.sent(),z(!0),[3,5];case 4:return b(!1),[7];case 5:return[2]}}))}))}),[J,h,c]),L=a((function(r){if(w)return o(r),void K();var e=p(G,r);H(e),K(e)}),[w,G,K]),M=a((function(r,e){if(w)return s(r,e),void K();var i=function(r,e,i){var a,n,o=null!=r?r:f,u=t(t({},o),{where:t({},null!==(a=o.where)&&void 0!==a?a:{})}),s=null===(n=u.where)||void 0===n?void 0:n[e];if(Array.isArray(s)&&null!=i){var l=s.filter((function(r){return String(r)!==String(i)}));l.length?u.where[e]=l:delete u.where[e]}else u.where&&e in u.where&&delete u.where[e];return u}(G,r,e);H(i),K(i)}),[w,G,K]),N=a((function(r){if(w)return l(r),void K();var e=p(f,r);H(e),K(e)}),[w,K]);return n((function(){K()}),[]),n((function(){if(Array.isArray(h)){var r=J();H(r),b(!1),q(m(h,r))}}),[h]),{loading:P,error:x,data:j,total:D,params:G,pagesCount:B,updateData:K,addParam:L,removeParam:M,resetParams:N}}export{v as useTableData};
|
package/dist/table/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Table}from"./component.js";export{TableCell}from"./components/cell/component.js";import"./table.js";import"react";import"classnames";import"./components/cells/index.js";import"@alphakits/icons/dist/ChevronForwardS";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-
|
|
1
|
+
export{Table}from"./component.js";export{TableCell}from"./components/cell/component.js";import"./table.js";import"react";import"classnames";import"./components/cells/index.js";import"@alphakits/icons/dist/ChevronForwardS";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-aca96920.js";import"../typography/title/index.js";import"tslib";import"../typography/title/component.js";import"./components/empty-list/index.js";import"./languages/index.js";import"./components/error/index.js";import"./components/loading/index.js";import"../cell/component.js";import"../cell/base/component.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"@alphakits/icons/dist/ControllerS";import"@alphakits/icons/dist/PlusS";import"rooks";import"../flex/component.js";import"../header-search/component.js";import"@alphakits/icons/dist/CloseS";import"@alphakits/icons/dist/SearchM";import"./hooks/use-table-data.js";import"./utils/add-query-param.js";import"query-string";import"./utils/parse-query-params.js";import"./utils/set-query-to-url.js";import"./utils/get-query-from-url.js";import"./utils/remove-query-param.js";import"./utils/reset-query-param.js";import"./utils/serialize-data.js";import"./utils/sort-array.js";import"./utils/get-tags.js";import"./utils/prepare-rows.js";import"@alphakits/icons/dist/PhotoM";import"../image/component.js";import"../skeleton/component.js";import"../use-image-render-component-67131bcc.js";import"@alphakits/icons/dist/PhotoS";import"../spinner/component.js";import"../image/types.js";import"../image/utils.js";
|
package/dist/table/table.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ type TableProps<T extends object> = Records<T> & {
|
|
|
33
33
|
refetch?: () => void;
|
|
34
34
|
onRowClick?: (params: T, refech: () => void) => void;
|
|
35
35
|
language: 'de' | 'ru' | 'en';
|
|
36
|
+
fromPath?: boolean;
|
|
36
37
|
} & FiltersButton;
|
|
37
|
-
declare function Table<T extends object>({ columns, searchPlaceholder, records, hideSearch, rightHeaderAddons, leftHeaderAddons, filtersButtonLabel, createButtonLabel, loading, height, tagsBuilder, promise, onRowClick, onCreateClick, onFiltersClick, refetch, language, }: TableProps<T>): JSX.Element;
|
|
38
|
+
declare function Table<T extends object>({ columns, searchPlaceholder, records, hideSearch, rightHeaderAddons, leftHeaderAddons, filtersButtonLabel, createButtonLabel, loading, height, tagsBuilder, promise, onRowClick, onCreateClick, onFiltersClick, refetch, language, fromPath, }: TableProps<T>): JSX.Element;
|
|
38
39
|
export { TableProps, Table };
|
package/dist/table/table.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useCallback as t,useEffect as o,useMemo as r}from"react";import i from"classnames";import{Cells as a}from"./components/cells/index.js";import{EmptyList as n}from"./components/empty-list/index.js";import{Error as
|
|
1
|
+
import e,{useCallback as t,useEffect as o,useMemo as r}from"react";import i from"classnames";import{Cells as a}from"./components/cells/index.js";import{EmptyList as n}from"./components/empty-list/index.js";import{Error as s}from"./components/error/index.js";import{Loading as l}from"./components/loading/index.js";import{Pagination as m}from"./components/pagination/index.js";import{TableHeader as p}from"./components/table-header/index.js";import{useTableData as c}from"./hooks/use-table-data.js";import{getTags as d}from"./utils/get-tags.js";import{prepareRows as u}from"./utils/prepare-rows.js";import"@alphakits/icons/dist/ChevronForwardS";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-aca96920.js";import"../typography/title/index.js";import"tslib";import"../typography/title/component.js";import"./languages/index.js";import"./components/cell/component.js";import"../cell/component.js";import"../cell/base/component.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"@alphakits/icons/dist/ControllerS";import"@alphakits/icons/dist/PlusS";import"rooks";import"../flex/component.js";import"../header-search/component.js";import"@alphakits/icons/dist/CloseS";import"@alphakits/icons/dist/SearchM";import"./utils/add-query-param.js";import"query-string";import"./utils/parse-query-params.js";import"./utils/set-query-to-url.js";import"./utils/get-query-from-url.js";import"./utils/remove-query-param.js";import"./utils/reset-query-param.js";import"./utils/serialize-data.js";import"./utils/sort-array.js";import"@alphakits/icons/dist/PhotoM";import"../image/component.js";import"../skeleton/component.js";import"../use-image-render-component-67131bcc.js";import"@alphakits/icons/dist/PhotoS";import"../spinner/component.js";import"../image/types.js";import"../image/utils.js";var g={table_wrapper:"index-module_table_wrapper__SeB5n",table:"index-module_table__9sbda",fill:"index-module_fill__Q-icF",clickable:"index-module_clickable__k4S8g"};function h(h){var j=h.columns,f=h.searchPlaceholder,b=void 0===f?"Поиск по таблице":f,k=h.records,v=h.hideSearch,y=h.rightHeaderAddons,x=h.leftHeaderAddons,P=h.filtersButtonLabel,_=h.createButtonLabel,C=h.loading,E=h.height,S=void 0===E?"fill":E,w=h.tagsBuilder,B=h.promise,q=h.onRowClick,F=h.onCreateClick,L=h.onFiltersClick,A=h.refetch,H=h.language,D=h.fromPath,N=c({promise:B,records:k,fromPath:void 0===D||D}),T=N.loading,M=N.error,z=N.data,I=N.total,Q=N.params,R=N.pagesCount,V=N.updateData,G=N.addParam,J=N.removeParam,K=N.resetParams,O=F?function(){return F(V)}:void 0,U=t((function(e){K(e)}),[K]);o((function(){V()}),[]);var W=function(){return L?L({submitCallback:function(e){return U(e)},initialValues:Q}):null},X=function(e){G(e)},Y=d({params:(null==Q?void 0:Q.where)||{},onDelete:function(e,t){J(e,t)},tagsBuilder:w,onClick:W}),Z=r((function(){return u({columns:j,data:z,refetch:A||V})}),[z,j]),$=T||C;return e.createElement("div",{className:i(g.table_wrapper,g[S])},(!v||y||x||F||L)&&e.createElement(p,{language:H,hideSearch:v,rightHeaderAddons:y,leftHeaderAddons:x,searchText:(null==Q?void 0:Q.searchText)||"",addParam:X,searchPlaceholder:b,filtersButtonLabel:P,tags:Y,onCreateClick:O,createButtonLabel:_,onFiltersClick:W,showFiltersButton:!!L}),e.createElement("div",{className:g.table},e.createElement("table",{cellSpacing:"0",cellPadding:"0"},e.createElement(a,{sort:null==Q?void 0:Q.sort,order:null==Q?void 0:Q.order,addParam:X,columns:j}),e.createElement("tbody",null,M&&e.createElement(s,{language:H}),!Z.length&&!$&&!M&&e.createElement(n,{language:H}),$&&e.createElement(l,{columnsLength:j.length}),Z.map((function(t){var o,r=t.row,a=t.cells;return e.createElement("tr",{onClick:function(){return e=r,null==q?void 0:q(e,V);var e},className:i((o={},o[g.clickable]=!!q,o)),style:{visibility:$?"collapse":"visible"}},a.map((function(e){return e})))}))))),!!B&&e.createElement(m,{language:H,currentPage:Q?+Q.page:1,recordsPerPage:Q?+Q.limit:10,pagesCount:+R,addParam:X,total:+I}))}export{h as Table};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"react";import t from"@alphakits/icons/dist/PhotoM";import{Image as e}from"../../image/component.js";import{TableCell as i}from"../components/cell/component.js";import"classnames";import"../../skeleton/component.js";import"../../typography/component.js";import"../../typography/text/component.js";import"../../colors.module-
|
|
1
|
+
import o from"react";import t from"@alphakits/icons/dist/PhotoM";import{Image as e}from"../../image/component.js";import{TableCell as i}from"../components/cell/component.js";import"classnames";import"../../skeleton/component.js";import"../../typography/component.js";import"../../typography/text/component.js";import"../../colors.module-aca96920.js";import"../../typography/title/index.js";import"tslib";import"../../typography/title/component.js";import"../../use-image-render-component-67131bcc.js";import"@alphakits/icons/dist/PhotoS";import"../../spinner/component.js";import"../../image/types.js";import"../../image/utils.js";import"../../cell/component.js";import"../../cell/base/component.js";import"../../__internal/utils/getDataTestId.js";import"../../hooks/useFocus/index.js";import"../../cell/pure/component.js";function n(o,t,e){return o?"string"==typeof o?t[o]:"function"==typeof o?o({row:t,refetch:e}):null:null}function r(o,t,e){return o?"string"==typeof o?t[o]:"function"==typeof o?o({row:t,refetch:e}):null:null}function l(l){var s=l.columns,m=l.data,p=l.refetch,c=m.map((function(l){return{row:l,cells:s.map((function(s){var m,c,a,u,d,v,f,g,j,w,y=r((null===(m=s.row)||void 0===m?void 0:m.title)||s.accessor,l,p);if(null===(c=s.row)||void 0===c?void 0:c.image){var h=n(null===(a=s.row)||void 0===a?void 0:a.image,l,p);w=h?o.createElement(e,{bgColor:"secondary",src:h,text:null==y?void 0:y.toString(),view:"ellipse"}):o.createElement(e,{bgColor:"secondary",icon:o.createElement(t,null),text:null==y?void 0:y.toString(),view:"ellipse"})}else if(null===(u=s.row)||void 0===u?void 0:u.icon){var b=n(null===(d=s.row)||void 0===d?void 0:d.icon,l,p);w=o.createElement(e,{icon:b||o.createElement(t,null),text:null==y?void 0:y.toString(),view:"ellipse"})}else(null===(v=s.row)||void 0===v?void 0:v.customAddon)&&(w=n(null===(f=s.row)||void 0===f?void 0:f.customAddon,l,p));return o.createElement(i,{title:y,align:s.align,subtitle:(null===(g=s.row)||void 0===g?void 0:g.subtitle)&&r(null===(j=s.row)||void 0===j?void 0:j.subtitle,l,p),addon:w})}))}}));return c}export{l as prepareRows};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import t from"@alphakits/icons/dist/AlertCircleM";import o from"@alphakits/icons/dist/CancelM";import r from"@alphakits/icons/dist/CheckmarkCircleM";import i from"@alphakits/icons/dist/ClockCircleM";import a from"classnames";import{Typography as l}from"../typography/component.js";import"../typography/text/component.js";import"../colors.module-
|
|
1
|
+
import e from"react";import t from"@alphakits/icons/dist/AlertCircleM";import o from"@alphakits/icons/dist/CancelM";import r from"@alphakits/icons/dist/CheckmarkCircleM";import i from"@alphakits/icons/dist/ClockCircleM";import a from"classnames";import{Typography as l}from"../typography/component.js";import"../typography/text/component.js";import"../colors.module-aca96920.js";import"../typography/title/index.js";import"tslib";import"../typography/title/component.js";var m="index-module_icon__xCdQr",n="index-module_text__0SHQw",c=function(c){var s=c.text,p=c.view,d=void 0===p?"secondary":p,u=c.className,h={negative:e.createElement(o,null),positive:e.createElement(r,null),secondary:e.createElement(i,null),accent:e.createElement(o,null),attention:e.createElement(t,null)};return e.createElement(l.Text,{className:a(n,u),tag:"div",view:"caps",weight:"medium",color:d},e.createElement("span",{className:m},h[d])," ",s)};export{c as TableStatus};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{TableStatus}from"./component.js";import"react";import"@alphakits/icons/dist/AlertCircleM";import"@alphakits/icons/dist/CancelM";import"@alphakits/icons/dist/CheckmarkCircleM";import"@alphakits/icons/dist/ClockCircleM";import"classnames";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-
|
|
1
|
+
export{TableStatus}from"./component.js";import"react";import"@alphakits/icons/dist/AlertCircleM";import"@alphakits/icons/dist/CancelM";import"@alphakits/icons/dist/CheckmarkCircleM";import"@alphakits/icons/dist/ClockCircleM";import"classnames";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-aca96920.js";import"../typography/title/index.js";import"tslib";import"../typography/title/component.js";
|
package/dist/tag/component.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"react";import e from"@alphakits/icons/dist/CloseS";import o from"classnames";import{IconButton as i}from"../icon-button/component.js";import{Typography as r}from"../typography/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/text/component.js";import"../colors.module-
|
|
1
|
+
import t from"react";import e from"@alphakits/icons/dist/CloseS";import o from"classnames";import{IconButton as i}from"../icon-button/component.js";import{Typography as r}from"../typography/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/text/component.js";import"../colors.module-aca96920.js";import"../typography/title/index.js";import"../typography/title/component.js";var n={tag:"index-module_tag__ePuZ7",s:"index-module_s__JQOAw",m:"index-module_m__6q9L4",text:"index-module_text__cc9CM",primary:"index-module_primary__nTVdF","primary-inverted":"index-module_primary-inverted__G6REX",leftAddons:"index-module_leftAddons__EODuG",rightAddons:"index-module_rightAddons__ERYKA"},s=function(s){var a,m=s.text,d=s.onClick,l=s.onCloseClick,p=s.view,c=void 0===p?"primary":p,_=s.weight,u=void 0===_?"regular":_,g=s.leftAddons,x=s.rightAddons,h=s.dataTestId,y=s.size,f=void 0===y?"m":y,A=s.className;return t.createElement("button",{type:"button","data-test-id":h,onClick:d,disabled:!d&&!l,className:o(n.tag,n[c],n[f],(a={},a[n.show_cross]=!!l,a),A)},g&&t.createElement("span",{className:n.leftAddons},g),t.createElement(r.Text,{className:n.text,view:"title",weight:u,color:c},m),x&&t.createElement("span",{className:n.rightAddons},x),!!l&&t.createElement("span",{className:n.rightAddons},t.createElement(i,{icon:e,"data-test-id":h+"_close",type:"button",view:"ghost","aria-label":"close-tag",onClick:function(t){t.stopPropagation(),l()}})))};export{s as Tag};
|
package/dist/tag/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Tag}from"./component.js";import"react";import"@alphakits/icons/dist/CloseS";import"classnames";import"../icon-button/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-
|
|
1
|
+
export{Tag}from"./component.js";import"react";import"@alphakits/icons/dist/CloseS";import"classnames";import"../icon-button/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-aca96920.js";import"../typography/title/index.js";import"../typography/title/component.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"react";import{Tag as t}from"../tag/component.js";import"@alphakits/icons/dist/CloseS";import"classnames";import"../icon-button/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-
|
|
1
|
+
import o from"react";import{Tag as t}from"../tag/component.js";import"@alphakits/icons/dist/CloseS";import"classnames";import"../icon-button/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-aca96920.js";import"../typography/title/index.js";import"../typography/title/component.js";var e="index-module_tags__C28AJ",r=function(r){var i=r.tags,n=r.view,p=void 0===n?"primary":n,m=r.onClick,s=r.onCloseClick;return o.createElement("div",{className:e},(null==i?void 0:i.length)&&i.map((function(e){return o.createElement(t,{key:e,text:e,onClick:m,onCloseClick:s,view:p})})))};export{r as TagsList};
|
package/dist/tags-list/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{TagsList}from"./component.js";import"react";import"../tag/component.js";import"@alphakits/icons/dist/CloseS";import"classnames";import"../icon-button/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-
|
|
1
|
+
export{TagsList}from"./component.js";import"react";import"../tag/component.js";import"@alphakits/icons/dist/CloseS";import"classnames";import"../icon-button/component.js";import"tslib";import"../button/component.js";import"react-merge-refs";import"../hooks/useFocus/index.js";import"../loader/component.js";import"../typography/component.js";import"../typography/text/component.js";import"../colors.module-aca96920.js";import"../typography/title/index.js";import"../typography/title/component.js";
|
|
@@ -29,7 +29,7 @@ type TextareaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'size' |
|
|
|
29
29
|
onHeightChange?: (height?: number) => void;
|
|
30
30
|
dataTestId?: string;
|
|
31
31
|
};
|
|
32
|
-
declare const Textarea: React.ForwardRefExoticComponent<Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "style" | "
|
|
32
|
+
declare const Textarea: React.ForwardRefExoticComponent<Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "style" | "value" | "size" | "defaultValue" | "onChange"> & {
|
|
33
33
|
value?: string | undefined;
|
|
34
34
|
defaultValue?: string | undefined;
|
|
35
35
|
required?: boolean | undefined;
|
|
@@ -13,7 +13,7 @@ declare const Toast: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDi
|
|
|
13
13
|
contentClassName?: string | undefined;
|
|
14
14
|
children?: React.ReactNode;
|
|
15
15
|
title?: React.ReactNode;
|
|
16
|
-
view: "
|
|
16
|
+
view: "attention" | "positive" | "negative" | "default" | "black" | "neutral";
|
|
17
17
|
leftAddons?: React.ReactNode;
|
|
18
18
|
bottomAddons?: React.ReactNode;
|
|
19
19
|
dataTestId?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Text as t}from"./text/component.js";import{Title as o}from"./title/index.js";import"react";import"classnames";import"../colors.module-
|
|
1
|
+
import{Text as t}from"./text/component.js";import{Title as o}from"./title/index.js";import"react";import"classnames";import"../colors.module-aca96920.js";import"tslib";import"./title/component.js";var m={Title:o,Text:t};export{m as Typography};
|
package/dist/typography/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Typography}from"./component.js";import"./text/component.js";import"react";import"classnames";import"../colors.module-
|
|
1
|
+
export{Typography}from"./component.js";import"./text/component.js";import"react";import"classnames";import"../colors.module-aca96920.js";import"./title/index.js";import"tslib";import"./title/component.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import a from"classnames";import{c as r}from"../../colors.module-
|
|
1
|
+
import e from"react";import a from"classnames";import{c as r}from"../../colors.module-aca96920.js";var m={paragraph:"index-module_paragraph__msaC8","primary-medium":"index-module_primary-medium__LhYfj","primary-small":"index-module_primary-small__lYM88",title:"index-module_title__O9czO",caps:"index-module_caps__l7Eqh",uppercase:"index-module_uppercase__JVKeT",bold:"index-module_bold__RuoQM",medium:"index-module_medium__YL230",regular:"index-module_regular__h8gTH",through:"index-module_through__3EDOt",component:"index-module_component__MPBKM"},d=function(d){var o,l,t=d.tag,_=void 0===t?"span":t,i=d.through,p=void 0!==i&&i,u=d.weight,s=void 0===u?"regular":u,n=d.uppercase,c=d.color,h=d.view,g=d.className,x=d.html,v=d.dataTestId,f=d.children;return x?e.createElement(_,{dangerouslySetInnerHTML:{__html:f},className:a((o={},o[m.paragraph]="p"===_,o[m.uppercase]=n,o[m.through]=p,o[m[h]]=h,o),g,c&&r[c],m[s]),"data-test-id":v}):e.createElement(_,{className:a((l={},l[m.paragraph]="p"===_,l[m.uppercase]=n,l[m.through]=p,l[m[h]]=h,l),g,c&&r[c],m[s]),"data-test-id":v},f)};export{d as Text};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Text}from"./component.js";import"react";import"classnames";import"../../colors.module-
|
|
1
|
+
export{Text}from"./component.js";import"react";import"classnames";import"../../colors.module-aca96920.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import r from"classnames";import{c as a}from"../../colors.module-
|
|
1
|
+
import e from"react";import r from"classnames";import{c as a}from"../../colors.module-aca96920.js";var o=function(o){var t,i=o.tag,m=void 0===i?"div":i,s=o.view,d=void 0===s?"medium":s,c=o.weight,n=void 0===c?"medium":c,l=o.defaultMargins,p=void 0!==l&&l,u=o.color,v=void 0===u?"primary":u,g=o.className,h=o.dataTestId,f=o.uppercase,w=o.through,y=o.children,N=o.styles;return e.createElement(m,{className:r(N.component,g,N["montserrat-"+d],p&&N["margins-"+d],(t={},t[N.uppercase]=f,t[N.through]=w,t),N[n],v&&a[v]),"data-test-id":h},y)};export{o as Title};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as m}from"tslib";import e from"react";import{Title as r}from"./component.js";import"classnames";import"../../colors.module-
|
|
1
|
+
import{__assign as m}from"tslib";import e from"react";import{Title as r}from"./component.js";import"classnames";import"../../colors.module-aca96920.js";var o={component:"common-module_component__l-zRT",bold:"common-module_bold__R07W3",medium:"common-module_medium__IcxXn",regular:"common-module_regular__2NoXt"},l={"montserrat-xlarge":"index-module_montserrat-xlarge__hdgbt","montserrat-large":"index-module_montserrat-large__Go4Ju","montserrat-medium":"index-module_montserrat-medium__KJdm0","montserrat-small":"index-module_montserrat-small__T0UeA","montserrat-xsmall":"index-module_montserrat-xsmall__9757S","montserrat-xxsmall":"index-module_montserrat-xxsmall__5pe-b","margins-xlarge":"index-module_margins-xlarge__o0X6K","margins-large":"index-module_margins-large__njSHO","margins-medium":"index-module_margins-medium__ir-Bn","margins-small":"index-module_margins-small__F4y4n","margins-xsmall":"index-module_margins-xsmall__69GSc",uppercase:"index-module_uppercase__NG5Qa",through:"index-module_through__ezTzC"},n=function(n){return e.createElement(r,m({},n,{styles:m(m({},o),l)}))};export{n as Title};
|
|
@@ -6,7 +6,7 @@ type WithSuffixProps = InputProps & {
|
|
|
6
6
|
suffix?: ReactNode;
|
|
7
7
|
suffixContainerClassName?: string;
|
|
8
8
|
};
|
|
9
|
-
declare const withSuffix: (Input: FC<InputProps & RefAttributes<HTMLInputElement>>) => React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
9
|
+
declare const withSuffix: (Input: FC<InputProps & RefAttributes<HTMLInputElement>>) => React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "type" | "size" | "defaultValue" | "onChange" | "onClick" | "onMouseDown"> & {
|
|
10
10
|
value?: string | undefined;
|
|
11
11
|
defaultValue?: string | undefined;
|
|
12
12
|
block?: boolean | undefined;
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{use-image-render-component-72e1ad3a.d.ts → use-image-render-component-67131bcc.d.ts}
RENAMED
|
File without changes
|
/package/dist/{use-image-render-component-72e1ad3a.js → use-image-render-component-67131bcc.js}
RENAMED
|
File without changes
|