@alphakits/ui 1.5.1 → 1.5.5
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/{_commonjsHelpers-5fce18b9.js → _commonjsHelpers-44a40746.js} +0 -0
- 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/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/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/use-calendar.d.ts +4 -4
- package/dist/calendar-input/component.d.ts +4 -4
- package/dist/calendar-input/component.js +1 -1
- package/dist/calendar-input/index.js +1 -1
- package/dist/calendar-input/utils.d.ts +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.d.ts +5 -5
- 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/collapse/component.js +1 -1
- package/dist/collapse/index.js +1 -1
- package/dist/{colors.module-3ac50c01.js → colors.module-1a7eb34c.js} +0 -0
- package/dist/{common.module-08bcad2e.js → common.module-8f0c3d12.js} +0 -0
- package/dist/{component-8a1c16a9.d.ts → component-b844abd6.d.ts} +0 -0
- package/dist/{component-8a1c16a9.js → component-b844abd6.js} +0 -0
- package/dist/{contact-block-099b4c49.d.ts → contact-block-99767e93.d.ts} +0 -0
- package/dist/{contact-block-099b4c49.js → contact-block-99767e93.js} +0 -0
- package/dist/copy-button/component.js +1 -1
- package/dist/copy-button/index.js +1 -1
- package/dist/date/component.d.ts +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/components/contacts-block.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/form-loading/index.d.ts +2 -1
- package/dist/form/components/form-updating/index.d.ts +4 -0
- package/dist/form/components/form-updating/index.js +1 -0
- package/dist/form/components/form-wrapper/index.d.ts +2 -3
- package/dist/form/components/form-wrapper/index.js +1 -1
- package/dist/form/components/index.d.ts +4 -0
- 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.d.ts +6 -4
- package/dist/form/templates/rest-form/index.js +1 -1
- package/dist/form/utils/get-default-values.js +1 -1
- package/dist/form/utils/remove-undefined-from-object.d.ts +2 -1
- package/dist/form-control/component.d.ts +5 -5
- package/dist/form-control/component.js +1 -1
- package/dist/form-control/index.js +1 -1
- package/dist/{formik.esm-58b6f66e.js → formik.esm-1b7e6cfd.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/{gutters.module-fe5fa340.js → gutters.module-e202d003.js} +0 -0
- package/dist/heading/component.js +1 -1
- package/dist/heading/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-crud-form-requests/index.d.ts +1 -0
- package/dist/hooks/use-crud-form-requests/index.js +1 -1
- package/dist/hooks/{use-get-ine → use-get-one}/index.d.ts +2 -0
- package/dist/hooks/use-get-one/index.js +1 -0
- package/dist/icon-button/component.d.ts +2 -2
- 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/index.js +1 -1
- package/dist/image/use-image-render-component.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 +6 -6
- package/dist/input/component.js +1 -1
- package/dist/input/index.js +1 -1
- package/dist/{intersection-observer-c8ff2ba1.js → intersection-observer-50a09ddd.js} +0 -0
- package/dist/link/component.d.ts +2 -2
- 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.d.ts +6 -3
- package/dist/masked-input/component.js +1 -1
- package/dist/masked-input/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.d.ts +2 -2
- 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-6a5f3f6a.d.ts → parse-query-params-e3a0eb1c.d.ts} +0 -0
- package/dist/{parse-query-params-6a5f3f6a.js → parse-query-params-e3a0eb1c.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.d.ts +5 -5
- 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.d.ts +21 -2
- 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.d.ts +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.d.ts +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/select/utils.d.ts +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.d.ts +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.d.ts +5 -5
- 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.d.ts +2 -2
- 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.d.ts +1 -1
- package/dist/table/components/empty-list/index.js +1 -1
- package/dist/table/components/error/index.d.ts +1 -1
- package/dist/table/components/error/index.js +1 -1
- package/dist/table/components/pagination/index.js +1 -1
- package/dist/table/components/row/component.js +1 -1
- package/dist/table/components/row/index.js +1 -1
- package/dist/table/components/rows/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.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/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.d.ts +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.d.ts +4 -4
- 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/{tslib.es6-445d95a5.js → tslib.es6-b9f64d6a.js} +0 -0
- 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/{use-image-render-component-be77f521.d.ts → use-image-render-component-91d507fc.d.ts} +0 -0
- package/dist/{use-image-render-component-be77f521.js → use-image-render-component-91d507fc.js} +1 -1
- package/dist/utils/get-service-error/index.d.ts +21 -0
- package/dist/utils/get-service-error/index.js +1 -0
- package/dist/utils/get-service-error/is-axios-error.d.ts +3 -0
- package/dist/utils/get-service-error/is-axios-error.js +1 -0
- package/dist/utils/get-service-error/is-network-error.d.ts +2 -0
- package/dist/utils/get-service-error/is-network-error.js +1 -0
- package/dist/utils/index.js +1 -1
- package/dist/utils/show-toast/index.js +1 -1
- package/dist/with-suffix/component.d.ts +34 -3
- package/dist/with-suffix/component.js +1 -1
- package/dist/with-suffix/index.js +1 -1
- package/package.json +2 -2
- package/dist/hooks/use-get-ine/index.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"classnames";import a from"react";import{c as t}from"../../colors.module-
|
|
1
|
+
import e from"classnames";import a from"react";import{c as t}from"../../colors.module-1a7eb34c.js";var o=function(o){var r=o.tag,m=void 0===r?"div":r,i=o.view,s=void 0===i?"medium":i,d=o.weight,c=void 0===d?"medium":d,n=o.defaultMargins,l=void 0!==n&&n,v=o.color,u=o.className,f=o.dataTestId,p=o.children,g=o.styles;return a.createElement(m,{className:e(g.component,u,g["montserrat-"+s],l&&g["margins-"+s],g[c],v&&t[v]),"data-test-id":f},p)};export{o as Title};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"../../tslib.es6-
|
|
1
|
+
import{a as m}from"../../tslib.es6-b9f64d6a.js";import e from"react";import{Title as r}from"./component.js";import{c as a}from"../../common.module-8f0c3d12.js";import"classnames";import"../../colors.module-1a7eb34c.js";var s={"montserrat-xlarge":"index-module_montserrat-xlarge__2e0T4","montserrat-large":"index-module_montserrat-large__3IoQZ","montserrat-medium":"index-module_montserrat-medium__1C2-N","montserrat-small":"index-module_montserrat-small__7aq7N","montserrat-xsmall":"index-module_montserrat-xsmall__1snHz","margins-xlarge":"index-module_margins-xlarge__3T9s4","margins-large":"index-module_margins-large__uTKMb","margins-medium":"index-module_margins-medium__2WXDU","margins-small":"index-module_margins-small__3jh4c","margins-xsmall":"index-module_margins-xsmall__Eaiy8"},l=function(l){return e.createElement(r,m({},l,{styles:m(m({},a),s)}))};export{l as Title};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"../../tslib.es6-
|
|
1
|
+
import{a as m}from"../../tslib.es6-b9f64d6a.js";import e from"react";import{Title as r}from"../title/component.js";import{c as a}from"../../common.module-8f0c3d12.js";import"classnames";import"../../colors.module-1a7eb34c.js";var l={"montserrat-xlarge":"index-module_montserrat-xlarge__3_L7c","montserrat-large":"index-module_montserrat-large__25PPi","montserrat-medium":"index-module_montserrat-medium__2-xpj","montserrat-small":"index-module_montserrat-small__iwV-8","montserrat-xsmall":"index-module_montserrat-xsmall__2AlQp","margins-xlarge":"index-module_margins-xlarge__3ay4g","margins-large":"index-module_margins-large__3T8vK","margins-medium":"index-module_margins-medium__1_Ucz","margins-small":"index-module_margins-small__8NNjs","margins-xsmall":"index-module_margins-xsmall__2ENbw"},s=function(s){return e.createElement(r,m({},s,{styles:m(m({},a),l)}))};export{s as TitleResponsive};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{TitleResponsive}from"./component.js";import"../../tslib.es6-
|
|
1
|
+
export{TitleResponsive}from"./component.js";import"../../tslib.es6-b9f64d6a.js";import"react";import"../title/component.js";import"classnames";import"../../colors.module-1a7eb34c.js";import"../../common.module-8f0c3d12.js";
|
package/dist/{use-image-render-component-be77f521.d.ts → use-image-render-component-91d507fc.d.ts}
RENAMED
|
File without changes
|
package/dist/{use-image-render-component-be77f521.js → use-image-render-component-91d507fc.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useRef as t,useMemo as n,useEffect as o}from"react";import{PhotoS as i,PhotoM as r}from"alpha-cli-icons";import _ from"classnames";import{Spinner as d}from"./spinner/component.js";import{Typography as m}from"./typography/component.js";import"./image/typings.js";import{sizes as l,textSizes as a}from"./image/constants.js";import{getSrc as s,getCharsFromText as x}from"./image/utils.js";var c={component:"index-module_component__2SAxI",children:"index-module_children__3-Rrm",default:"index-module_default__9Y9Ry",primary:"index-module_primary__1rcmx","primary-inverted":"index-module_primary-inverted__1Qsti",secondary:"index-module_secondary__V683L","secondary-inverted":"index-module_secondary-inverted__1z_a8",positive:"index-module_positive__11E2V",negative:"index-module_negative__ZEP9w",attention:"index-module_attention__1tSkN",accent:"index-module_accent__3qMH5",broken:"index-module_broken__21rqy",image:"index-module_image__ZF1Gv",hint:"index-module_hint__15-ui",hint_text:"index-module_hint_text__2HO_n",textContent:"index-module_textContent__13aze",xs:"index-module_xs__2Es8v",s:"index-module_s__2D4b3",m:"index-module_m__1Rtr9",l:"index-module_l__3oEwm",xl:"index-module_xl__7Y-se",circle:"index-module_circle__rmY6i",defs:"index-module_defs__-xTo_",textS:"index-module_textS__2QNNE",textXs:"index-module_textXs__ujJjz",textM:"index-module_textM__3vBUB",textL:"index-module_textL__1u8Yh"},u=function(u){var p=u.src,
|
|
1
|
+
import e,{useRef as t,useMemo as n,useEffect as o}from"react";import{PhotoS as i,PhotoM as r}from"alpha-cli-icons";import _ from"classnames";import{Spinner as d}from"./spinner/component.js";import{Typography as m}from"./typography/component.js";import"./image/typings.js";import{sizes as l,textSizes as a}from"./image/constants.js";import{getSrc as s,getCharsFromText as x}from"./image/utils.js";var c={component:"index-module_component__2SAxI",children:"index-module_children__3-Rrm",default:"index-module_default__9Y9Ry",primary:"index-module_primary__1rcmx","primary-inverted":"index-module_primary-inverted__1Qsti",secondary:"index-module_secondary__V683L","secondary-inverted":"index-module_secondary-inverted__1z_a8",positive:"index-module_positive__11E2V",negative:"index-module_negative__ZEP9w",attention:"index-module_attention__1tSkN",accent:"index-module_accent__3qMH5",broken:"index-module_broken__21rqy",image:"index-module_image__ZF1Gv",hint:"index-module_hint__15-ui",hint_text:"index-module_hint_text__2HO_n",textContent:"index-module_textContent__13aze",xs:"index-module_xs__2Es8v",s:"index-module_s__2D4b3",m:"index-module_m__1Rtr9",l:"index-module_l__3oEwm",xl:"index-module_xl__7Y-se",circle:"index-module_circle__rmY6i",ellipse:"index-module_ellipse__20gOm",defs:"index-module_defs__-xTo_",textS:"index-module_textS__2QNNE",textXs:"index-module_textXs__ujJjz",textM:"index-module_textM__3vBUB",textL:"index-module_textL__1u8Yh"},u=function(u){var p=u.src,g=void 0===p?"":p,v=u.resolution,f=u.size,y=u.alt,h=u.text,E=u.icon,w=e.useState("loading"),j=w[0],N=w[1],b=t(0),k=v||l[f],z=n((function(){return s(g,k)}),[k,g]);return o((function(){if(z){b.current=Date.now(),N("loading");var e=new Image;e.src=z,e.onload=function(){N("loaded")},e.onerror=function(){Date.now()-b.current<15e3?setTimeout((function(){e.src=z}),1e3):N("error")}}else N("error")}),[z]),E||("loading"===j?e.createElement(d,{className:c.spinner,size:"s",view:"dark"}):"error"===j&&h?e.createElement(m.Text,{className:_(c.textContent,c[a[f]]),view:"component",color:"tertiary",weight:"bold"},x(h.toUpperCase())):"error"===j?e.createElement(m.Text,{className:c.broken,tag:"div",color:"tertiary",view:"component",weight:"bold"},"xs"===f?e.createElement(i,null):e.createElement(r,null)):e.createElement("img",{className:c.image,src:g,alt:y}))};export{c as s,u};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AxiosError } from 'axios';
|
|
2
|
+
type ErrorData = {
|
|
3
|
+
errorId: string;
|
|
4
|
+
application: string;
|
|
5
|
+
errorCode: string;
|
|
6
|
+
message: string;
|
|
7
|
+
originalErrorCode?: string;
|
|
8
|
+
};
|
|
9
|
+
declare enum ErrorType {
|
|
10
|
+
NETWORK = "NETWORK",
|
|
11
|
+
BUSINESS = "BUSINESS",
|
|
12
|
+
INTERNAL = "INTERNAL"
|
|
13
|
+
}
|
|
14
|
+
type ServiceError = {
|
|
15
|
+
code: string;
|
|
16
|
+
message: string;
|
|
17
|
+
errorType: ErrorType;
|
|
18
|
+
originalError: unknown | AxiosError<ErrorData>;
|
|
19
|
+
};
|
|
20
|
+
declare function getServiceError(error: unknown): ServiceError;
|
|
21
|
+
export { ErrorData, ErrorType, ServiceError, getServiceError };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isAxiosError as r}from"./is-axios-error.js";import{isNetworkError as e}from"./is-network-error.js";var o,E,R;!function(r){r.NETWORK="NETWORK",r.BUSINESS="BUSINESS",r.INTERNAL="INTERNAL"}(R||(R={}));var N=((o={})[R.INTERNAL]="INTERNAL_ERROR",o[R.NETWORK]="NETWORK_ERROR",o),T=((E={})[R.INTERNAL]="Пожалуйста, попробуйте ещё раз позже.",E[R.NETWORK]="Проверьте подключение и попробуйте ещё раз позже.",E),i=["BAD_REQUEST","INTERNAL_SERVER_ERROR","INTERNAL_ERROR","WS_ERROR","DEFAULT"];function s(o){if(e(o))return{code:N[R.NETWORK],message:T[R.NETWORK],errorType:R.NETWORK,originalError:o};if(r(o)){var E=o.response?o.response.data:{errorCode:"500",originalErrorCode:"500",message:"Unhandled error"},s=E.errorCode,n=E.originalErrorCode,a=E.message,I=s,A=R.BUSINESS;return i.includes(I)&&(void 0===n?A=R.INTERNAL:I=n),{code:I,message:a,errorType:A,originalError:o}}return{code:N[R.INTERNAL],message:T[R.INTERNAL],errorType:R.INTERNAL,originalError:o}}export{R as ErrorType,s as getServiceError};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function o(o){return Boolean(o.isAxiosError)}export{o as isAxiosError};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isAxiosError as r}from"./is-axios-error.js";var e=["ENETUNREACH","ECONNABORTED","ENOTCONN"];function o(o){if(r(o)){var s=o.response,N=o.code,i=o.message;return void 0===s&&(e.includes(N||"")||"Network Error"===i)}return!1}export{o as isNetworkError};
|
package/dist/utils/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR,THINSP,formatAmount}from"./format-amount/util.js";export{showError,showSuccess}from"./show-toast/index.js";export{splitAmount}from"./split-amount/util.js";import"./get-currency-symbol/util.js";import"./data/currency-codes.js";import"../toast-notifier/component.js";import"../tslib.es6-
|
|
1
|
+
export{AMOUNT_MAJOR_MINOR_PARTS_SEPARATOR,THINSP,formatAmount}from"./format-amount/util.js";export{showError,showSuccess}from"./show-toast/index.js";export{splitAmount}from"./split-amount/util.js";import"./get-currency-symbol/util.js";import"./data/currency-codes.js";import"../toast-notifier/component.js";import"../tslib.es6-b9f64d6a.js";import"react";import"react-dom";import"classnames";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";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ToastNotifier as t}from"../../toast-notifier/component.js";import"../../tslib.es6-
|
|
1
|
+
import{ToastNotifier as t}from"../../toast-notifier/component.js";import"../../tslib.es6-b9f64d6a.js";import"react";import"react-dom";import"classnames";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 o=function(o){t({view:"positive",title:"Success",text:o,offset:30})},e=function(o){t({view:"negative",title:"Error",text:o,offset:30})};export{e as showError,o as showSuccess};
|
|
@@ -1,12 +1,43 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
4
|
import { InputProps } from "../input/index";
|
|
5
5
|
type WithSuffixProps = InputProps & {
|
|
6
6
|
suffix?: ReactNode;
|
|
7
7
|
suffixContainerClassName?: string;
|
|
8
8
|
};
|
|
9
|
-
declare const withSuffix: (Input:
|
|
9
|
+
declare const withSuffix: (Input: React.FC<Pick<React.InputHTMLAttributes<HTMLInputElement>, "disabled" | "color" | "className" | "children" | "form" | "list" | "slot" | "style" | "title" | "pattern" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "step" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "required" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "readOnly" | "src" | "width"> & {
|
|
10
|
+
value?: string | undefined;
|
|
11
|
+
defaultValue?: string | undefined;
|
|
12
|
+
block?: boolean | undefined;
|
|
13
|
+
required?: boolean | undefined;
|
|
14
|
+
clear?: boolean | undefined;
|
|
15
|
+
size?: "s" | "m" | "l" | undefined;
|
|
16
|
+
error?: string | boolean | undefined;
|
|
17
|
+
success?: boolean | undefined;
|
|
18
|
+
hint?: string | undefined;
|
|
19
|
+
label?: React.ReactNode;
|
|
20
|
+
type?: "number" | "text" | "tel" | "email" | "card" | "money" | "password" | undefined;
|
|
21
|
+
wrapperRef?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
22
|
+
leftAddons?: React.ReactNode;
|
|
23
|
+
rightAddons?: React.ReactNode;
|
|
24
|
+
bottomAddons?: React.ReactNode;
|
|
25
|
+
className?: string | undefined;
|
|
26
|
+
fieldClassName?: string | undefined;
|
|
27
|
+
inputClassName?: string | undefined;
|
|
28
|
+
labelClassName?: string | undefined;
|
|
29
|
+
addonsClassName?: string | undefined;
|
|
30
|
+
focusedClassName?: string | undefined;
|
|
31
|
+
filledClassName?: string | undefined;
|
|
32
|
+
onChange?: ((event: React.ChangeEvent<HTMLInputElement>, payload: {
|
|
33
|
+
value: string;
|
|
34
|
+
}) => void) | undefined;
|
|
35
|
+
onClear?: ((event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void) | undefined;
|
|
36
|
+
onClick?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
|
|
37
|
+
onMouseDown?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
|
|
38
|
+
onMouseUp?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
|
|
39
|
+
dataTestId?: string | undefined;
|
|
40
|
+
} & React.RefAttributes<HTMLInputElement>>) => React.ForwardRefExoticComponent<Pick<React.InputHTMLAttributes<HTMLInputElement>, "disabled" | "color" | "className" | "children" | "form" | "list" | "slot" | "style" | "title" | "pattern" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "step" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "required" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "height" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "readOnly" | "src" | "width"> & {
|
|
10
41
|
value?: string | undefined;
|
|
11
42
|
defaultValue?: string | undefined;
|
|
12
43
|
block?: boolean | undefined;
|
|
@@ -38,7 +69,7 @@ declare const withSuffix: (Input: FC<InputProps & RefAttributes<HTMLInputElement
|
|
|
38
69
|
onMouseUp?: ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void) | undefined;
|
|
39
70
|
dataTestId?: string | undefined;
|
|
40
71
|
} & {
|
|
41
|
-
suffix?: ReactNode;
|
|
72
|
+
suffix?: React.ReactNode;
|
|
42
73
|
suffixContainerClassName?: string | undefined;
|
|
43
74
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
44
75
|
export { WithSuffixProps, withSuffix };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a}from"../tslib.es6-
|
|
1
|
+
import{_ as e,a}from"../tslib.es6-b9f64d6a.js";import l,{forwardRef as n,useRef as r,useState as o,useCallback as t,Fragment as i}from"react";import s from"react-merge-refs";import d from"classnames";import{Portal as m}from"../portal/component.js";import"react-dom";import"../portal/utils.js";var u="index-module_suffixContainer__2PAjv",f="index-module_suffixVisible__2nCIM",c="index-module_hasSuffix__2OETD",_="index-module_spacer__367Gn",p="index-module_suffix__1tJdT",x="index-module_disabled__SEf2T",C="index-module_readOnly__1gCb6",v=function(v){return n((function(n,E){var b,N,h=n.value,g=n.defaultValue,O=n.onChange,j=n.onClear,y=n.suffix,T=void 0===y?"":y,V=n.placeholder,P=n.className,S=n.disabled,A=n.readOnly,B=n.suffixContainerClassName,D=e(n,["value","defaultValue","onChange","onClear","suffix","placeholder","className","disabled","readOnly","suffixContainerClassName"]),G=void 0===h,I=r(null),J=o(g||""),M=J[0],k=J[1],q=t((function(e,a){O&&O(e,a),G&&k(a.value)}),[O,G]),w=t((function(e){G&&k(""),j&&j(e)}),[j,G]),z=t((function(){return I.current.parentElement}),[]),F=G?M:h;return l.createElement(i,null,l.createElement(v,a({ref:s([E,I]),value:F,disabled:S,readOnly:A,onChange:q,onClear:w,placeholder:V,className:d(P,(b={},b[f]=Boolean(F),b[c]=T,b))},D)),l.createElement(m,{getPortalContainer:z},l.createElement("div",{className:d(u,B)},l.createElement("span",{className:_},F),T&&l.createElement("div",{className:d(p,(N={},N[x]=S,N[C]=A,N))},T))))}))};export{v as withSuffix};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{withSuffix}from"./component.js";import"../tslib.es6-
|
|
1
|
+
export{withSuffix}from"./component.js";import"../tslib.es6-b9f64d6a.js";import"react";import"react-merge-refs";import"classnames";import"../portal/component.js";import"react-dom";import"../portal/utils.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alphakits/ui",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.5",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"stylelint": "^13.6.1",
|
|
163
163
|
"ts-loader": "^6.2.1",
|
|
164
164
|
"tslib": "^1.11.1",
|
|
165
|
-
"typescript": "
|
|
165
|
+
"typescript": "3.8.3",
|
|
166
166
|
"typescript-plugin-css-modules": "2.2.0",
|
|
167
167
|
"url-loader": "4.1.0"
|
|
168
168
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as t,d as o}from"../../tslib.es6-445d95a5.js";import{useState as r,useEffect as e}from"react";import s from"axios";import{ToastNotifier as i}from"../../toast-notifier/component.js";import"react-dom";import"classnames";import"../../toast-plate/component.js";import"alpha-cli-icons";import"../../button/component.js";import"react-merge-refs";import"../useFocus/index.js";import"../../loader/component.js";import"../../toast-notifier/use-timer.js";var a=function(a,n){var m=r(!1),c=m[0],p=m[1],d=r({}),u=d[0],f=d[1];return e((function(){a&&t(void 0,void 0,void 0,(function(){var t,r,e,m;return o(this,(function(o){switch(o.label){case 0:p(!0),o.label=1;case 1:return o.trys.push([1,3,,4]),[4,n(a)];case 2:return t=o.sent().data,f(t),p(!1),[3,4];case 3:return r=o.sent(),e=s.isAxiosError(r)?null===(m=r.response)||void 0===m?void 0:m.data.message:r,i({dataTestId:"toastNotifierError",title:"Error",offset:32,view:"negative",text:e}),[3,4];case 4:return[2]}}))}))}),[]),{record:u,loading:c}};export{a as useGetOne};
|