@steroidsjs/core 3.1.8 → 3.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ClientStorageComponent.js +2 -1
- package/components/JwtHttpComponent.d.ts +1 -1
- package/components/JwtHttpComponent.js +2 -2
- package/components/StoreComponent.d.ts +1 -1
- package/components/StoreComponent.js +1 -0
- package/hooks/useList.d.ts +1 -1
- package/hooks/useList.js +1 -1
- package/hooks/useListField.d.ts +1 -1
- package/hooks/useListField.js +4 -4
- package/hooks/useSaveCursorPosition.js +0 -1
- package/hooks/useTree.d.ts +1 -1
- package/package.json +3 -2
- package/ui/content/CalendarSystem/CalendarSystem.d.ts +3 -3
- package/ui/content/CalendarSystem/CalendarSystem.js +0 -1
- package/ui/content/Chat/utils/addNewMessageIntoGroupedMessages.d.ts +1 -1
- package/ui/content/Chat/utils/addNewMessageIntoGroupedMessages.js +1 -1
- package/ui/content/CopyToClipboard/CopyToClipboard.js +5 -3
- package/ui/content/Kanban/Kanban.d.ts +4 -4
- package/ui/content/Kanban/hooks/useKanban.d.ts +1 -1
- package/ui/form/DateField/DateField.d.ts +1 -1
- package/ui/form/DateField/useDateRange.d.ts +1 -1
- package/ui/form/DateField/useDateRange.js +1 -1
- package/ui/form/DateTimeField/utils.js +1 -1
- package/ui/form/DateTimeRangeField/DateTimeRangeField.d.ts +1 -1
- package/ui/form/DateTimeRangeField/DateTimeRangeField.js +1 -1
- package/ui/form/EmailField/hooks/useInputTypeEmail.js +0 -1
- package/ui/form/Field/fieldWrapper.d.ts +1 -1
- package/ui/form/Form/Form.d.ts +1 -1
- package/ui/form/Form/Form.js +1 -0
- package/ui/form/InputField/InputField.d.ts +1 -1
- package/ui/form/InputField/hooks/useInputFieldWarningByType.js +4 -5
- package/ui/form/NumberField/NumberField.d.ts +1 -1
- package/ui/form/PasswordField/PasswordField.js +4 -2
- package/ui/form/PhoneField/PhoneField.d.ts +4 -4
- package/ui/form/PhoneField/PhoneField.js +2 -2
- package/ui/form/WizardForm/WizardForm.d.ts +1 -1
- package/ui/form/WizardForm/utils.d.ts +1 -1
- package/ui/format/TimeFormatter/TimeFormatter.js +1 -1
- package/ui/list/TreeTable/TreeTable.d.ts +1 -1
- package/ui/list/TreeTable/TreeTable.js +3 -3
|
@@ -27,7 +27,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
27
27
|
};
|
|
28
28
|
exports.__esModule = true;
|
|
29
29
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
30
|
-
/* eslint-disable no-unused-expressions */
|
|
31
30
|
var dayjs_1 = __importDefault(require("dayjs"));
|
|
32
31
|
var cookie = __importStar(require("js-cookie"));
|
|
33
32
|
/**
|
|
@@ -97,6 +96,7 @@ var ClientStorageComponent = /** @class */ (function () {
|
|
|
97
96
|
if (expires && process.env.IS_SSR) {
|
|
98
97
|
options.expires = (0, dayjs_1["default"])().add(options.expires, 'days').utc().toDate();
|
|
99
98
|
}
|
|
99
|
+
// eslint-disable-next-line no-unused-expressions
|
|
100
100
|
process.env.IS_SSR ? this._ssrCookie.set(name, value, options) : cookie.set(name, value, options);
|
|
101
101
|
}
|
|
102
102
|
};
|
|
@@ -115,6 +115,7 @@ var ClientStorageComponent = /** @class */ (function () {
|
|
|
115
115
|
if (domain) {
|
|
116
116
|
options.domain = domain;
|
|
117
117
|
}
|
|
118
|
+
// eslint-disable-next-line no-unused-expressions
|
|
118
119
|
process.env.IS_SSR ? this._ssrCookie.remove(name, options) : cookie.remove(name, options);
|
|
119
120
|
}
|
|
120
121
|
};
|
|
@@ -54,9 +54,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
54
54
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
55
55
|
};
|
|
56
56
|
exports.__esModule = true;
|
|
57
|
-
var auth_1 = require("@steroidsjs/core/actions/auth");
|
|
58
|
-
var HttpComponent_1 = __importDefault(require("@steroidsjs/core/components/HttpComponent"));
|
|
59
57
|
var axios_1 = __importDefault(require("axios"));
|
|
58
|
+
var HttpComponent_1 = __importDefault(require("./HttpComponent"));
|
|
59
|
+
var auth_1 = require("../actions/auth");
|
|
60
60
|
/**
|
|
61
61
|
* JwtHttpComponent
|
|
62
62
|
* Вариация HttpComponent с функционалом обновления токена авторизации
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IComponents } from '@steroidsjs/core/providers/ComponentsProvider';
|
|
2
1
|
import { RouterState } from 'connected-react-router';
|
|
3
2
|
import { History, LocationState } from 'history';
|
|
4
3
|
import { Store, Dispatch, Unsubscribe, Reducer, AnyAction } from 'redux';
|
|
4
|
+
import { IComponents } from '../providers/ComponentsProvider';
|
|
5
5
|
declare global {
|
|
6
6
|
interface Window {
|
|
7
7
|
APP_REDUX_PRELOAD_STATES?: [any];
|
|
@@ -14,6 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
exports.__esModule = true;
|
|
17
|
+
/* eslint-disable no-restricted-globals */
|
|
17
18
|
var connected_react_router_1 = require("connected-react-router");
|
|
18
19
|
var history_1 = require("history");
|
|
19
20
|
var get_1 = __importDefault(require("lodash-es/get"));
|
package/hooks/useList.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IInfiniteScrollProps } from '@steroidsjs/core/ui/list/InfiniteScroll/InfiniteScroll';
|
|
2
1
|
import { IList } from '../actions/list';
|
|
3
2
|
import { Model } from '../components/MetaComponent';
|
|
4
3
|
import { IAddressBarConfig } from '../hooks/useAddressBar';
|
|
5
4
|
import { IFormProps } from '../ui/form/Form/Form';
|
|
6
5
|
import { IEmptyProps } from '../ui/list/Empty/Empty';
|
|
6
|
+
import { IInfiniteScrollProps } from '../ui/list/InfiniteScroll/InfiniteScroll';
|
|
7
7
|
import { ILayoutNamesProps } from '../ui/list/LayoutNames/LayoutNames';
|
|
8
8
|
import { IPaginationProps } from '../ui/list/Pagination/Pagination';
|
|
9
9
|
import { IPaginationSizeProps } from '../ui/list/PaginationSize/PaginationSize';
|
package/hooks/useList.js
CHANGED
|
@@ -17,7 +17,6 @@ exports.__esModule = true;
|
|
|
17
17
|
exports.createInitialValues = exports.getDefaultSearchModel = exports.normalizeSortProps = exports.defaultConfig = void 0;
|
|
18
18
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
19
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
20
|
-
var InfiniteScroll_1 = require("@steroidsjs/core/ui/list/InfiniteScroll/InfiniteScroll");
|
|
21
20
|
var get_1 = __importDefault(require("lodash-es/get"));
|
|
22
21
|
var isEqual_1 = __importDefault(require("lodash-es/isEqual"));
|
|
23
22
|
var union_1 = __importDefault(require("lodash-es/union"));
|
|
@@ -34,6 +33,7 @@ var form_2 = require("../reducers/form");
|
|
|
34
33
|
var list_2 = require("../reducers/list");
|
|
35
34
|
var layout_1 = require("../ui/layout");
|
|
36
35
|
var Empty_1 = require("../ui/list/Empty/Empty");
|
|
36
|
+
var InfiniteScroll_1 = require("../ui/list/InfiniteScroll/InfiniteScroll");
|
|
37
37
|
var LayoutNames_1 = require("../ui/list/LayoutNames/LayoutNames");
|
|
38
38
|
var Pagination_1 = require("../ui/list/Pagination/Pagination");
|
|
39
39
|
var PaginationSize_1 = require("../ui/list/PaginationSize/PaginationSize");
|
package/hooks/useListField.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DataProviderItems, IDataProvider } from '
|
|
2
|
+
import { DataProviderItems, IDataProvider } from './useDataProvider';
|
|
3
3
|
import { IInputParams } from '../ui/form/Field/fieldWrapper';
|
|
4
4
|
interface IUseListFieldProps {
|
|
5
5
|
defaultItemView: string;
|
package/hooks/useListField.js
CHANGED
|
@@ -15,21 +15,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
exports.__esModule = true;
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
|
-
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
19
18
|
var isEqual_1 = __importDefault(require("lodash-es/isEqual"));
|
|
20
19
|
var react_1 = require("react");
|
|
21
20
|
var react_use_1 = require("react-use");
|
|
21
|
+
var _1 = require(".");
|
|
22
22
|
function useListField(props) {
|
|
23
|
-
var components = (0,
|
|
23
|
+
var components = (0, _1.useComponents)();
|
|
24
24
|
var inputSelectedIds = (0, react_1.useMemo)(function () { return props.selectedIds || [].concat(props.input.value || []); }, [props.input.value, props.selectedIds]);
|
|
25
25
|
// Data provider
|
|
26
|
-
var items = (0,
|
|
26
|
+
var items = (0, _1.useDataProvider)({
|
|
27
27
|
items: props.items,
|
|
28
28
|
initialSelectedIds: inputSelectedIds,
|
|
29
29
|
dataProvider: props.dataProvider
|
|
30
30
|
}).items;
|
|
31
31
|
// Data select
|
|
32
|
-
var _a = (0,
|
|
32
|
+
var _a = (0, _1.useDataSelect)({
|
|
33
33
|
multiple: props.multiple,
|
|
34
34
|
selectedIds: inputSelectedIds,
|
|
35
35
|
selectFirst: props.selectFirst,
|
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
exports.__esModule = true;
|
|
6
6
|
/* eslint-disable consistent-return */
|
|
7
7
|
/* eslint-disable no-return-assign */
|
|
8
|
-
/* eslint-disable no-unused-expressions */
|
|
9
8
|
var debounce_1 = __importDefault(require("lodash-es/debounce"));
|
|
10
9
|
var isNull_1 = __importDefault(require("lodash-es/isNull"));
|
|
11
10
|
var react_1 = require("react");
|
package/hooks/useTree.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steroidsjs/core",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Vladimir Kozhin <hello@kozhindev.com>",
|
|
6
6
|
"repository": {
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"docs": "node docs/docs-autogen.js",
|
|
22
22
|
"test": "jest",
|
|
23
23
|
"lint": "eslint -c ./.eslintrc --ext .js,.jsx,.ts,.tsx ./src ./tests --quiet",
|
|
24
|
-
"
|
|
24
|
+
"typecheck": "tsc",
|
|
25
|
+
"build": "tsc -p tsconfig.build.json && cp package.json LICENSE README.md dist/ && cp src/index.d.ts dist/ && cp docs/docs-autogen-result.json dist/ && cp docs/locales/en.json dist/",
|
|
25
26
|
"watch": "tsc -p tsconfig-debug.json"
|
|
26
27
|
},
|
|
27
28
|
"dependencies": {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactNode, MouseEvent } from 'react';
|
|
2
2
|
import { ICustomViews } from './hooks/useCustomViews';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { ICheckboxListFieldProps } from '../../form/CheckboxListField/CheckboxListField';
|
|
4
|
+
import { IModalProps } from '../../modal/Modal/Modal';
|
|
5
|
+
import { ICalendarProps } from '../Calendar/Calendar';
|
|
6
6
|
export type CalendarSystemModalFields = 'title' | 'eventGroupId' | 'description' | 'startDate' | 'endDate' | 'id' | 'usersIds';
|
|
7
7
|
export type CalendarSystemEventGroupModalFields = 'label' | 'color';
|
|
8
8
|
export interface IEventInitialValues extends IEvent {
|
|
@@ -17,7 +17,6 @@ exports.__esModule = true;
|
|
|
17
17
|
/* eslint-disable max-len */
|
|
18
18
|
/* eslint-disable no-return-assign */
|
|
19
19
|
/* eslint-disable default-case */
|
|
20
|
-
/* eslint-disable no-unused-expressions */
|
|
21
20
|
/* eslint-disable no-plusplus */
|
|
22
21
|
var dayjs_1 = __importDefault(require("dayjs"));
|
|
23
22
|
var localeData_1 = __importDefault(require("dayjs/plugin/localeData"));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IChatMessage } from '
|
|
1
|
+
import { IChatMessage } from '../Chat';
|
|
2
2
|
import { IGroupedMessage, IGroupedMessagesByDates } from '../hooks/useChat';
|
|
3
3
|
export declare const addNewMessageIntoGroupedMessages: (newMessage: IChatMessage, groupedMessagesByDates: IGroupedMessagesByDates) => {
|
|
4
4
|
[x: string]: IGroupedMessage[][];
|
|
@@ -26,8 +26,8 @@ exports.__esModule = true;
|
|
|
26
26
|
exports.addNewMessageIntoGroupedMessages = void 0;
|
|
27
27
|
var dayjs_1 = __importDefault(require("dayjs"));
|
|
28
28
|
var last_1 = __importDefault(require("lodash-es/last"));
|
|
29
|
+
var getMessagesGroupedByDate_1 = require("./getMessagesGroupedByDate");
|
|
29
30
|
var timeTemplatesAndUnits_1 = require("../constants/timeTemplatesAndUnits");
|
|
30
|
-
var getMessagesGroupedByDate_1 = require("../utils/getMessagesGroupedByDate");
|
|
31
31
|
var addMessageToExistingGroup = function (newMessage, groupedMessagesByDates, dateKey) {
|
|
32
32
|
var _a;
|
|
33
33
|
var currentGroupedMessagesByDates = __spreadArray([], groupedMessagesByDates[dateKey], true);
|
|
@@ -48,6 +48,7 @@ function CopyToClipboard(props) {
|
|
|
48
48
|
var dispatch = (0, hooks_1.useDispatch)();
|
|
49
49
|
var notification = props.notification;
|
|
50
50
|
var onClick = (0, react_1.useCallback)(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
51
|
+
var dispatchAction;
|
|
51
52
|
return __generator(this, function (_a) {
|
|
52
53
|
switch (_a.label) {
|
|
53
54
|
case 0:
|
|
@@ -65,9 +66,10 @@ function CopyToClipboard(props) {
|
|
|
65
66
|
_a.label = 2;
|
|
66
67
|
case 2:
|
|
67
68
|
if (notification) {
|
|
68
|
-
typeof notification === 'string'
|
|
69
|
-
?
|
|
70
|
-
:
|
|
69
|
+
dispatchAction = typeof notification === 'string'
|
|
70
|
+
? (0, notifications_1.showNotification)(notification, DEFAULT_NOTIFICATION_LEVEL)
|
|
71
|
+
: (0, notifications_1.showNotification)(notification.message, notification.level || DEFAULT_NOTIFICATION_LEVEL, notification.params);
|
|
72
|
+
dispatch(dispatchAction);
|
|
71
73
|
}
|
|
72
74
|
setIsCopied(true);
|
|
73
75
|
setTimeout(function () { return setIsCopied(false); }, 1000);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { IDropDownFieldItem } from '
|
|
2
|
+
import { KanbanModalTypeEnum } from './enums';
|
|
3
|
+
import { IKanbanConfig } from './hooks/useKanban';
|
|
4
|
+
import { IBem } from '../../../hooks/useBem';
|
|
5
|
+
import { IDropDownFieldItem } from '../../form/DropDownField/DropDownField';
|
|
6
6
|
import { IModalProps } from '../../modal/Modal/Modal';
|
|
7
7
|
export interface ITaskTag {
|
|
8
8
|
id: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IHtmlFieldProps } from '
|
|
1
|
+
import { IHtmlFieldProps } from '../../../form/HtmlField/HtmlField';
|
|
2
2
|
import { IDragEndResult, IKanbanColumn, IKanbanTask, ITaskAssigner, ITaskTag } from '../Kanban';
|
|
3
3
|
export interface IKanbanConfig {
|
|
4
4
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MaskitoOptions } from '@maskito/core';
|
|
2
|
-
import { IAbsolutePositioningInputProps } from '@steroidsjs/core/hooks/useAbsolutePositioning';
|
|
3
2
|
import { RefCallback } from 'react';
|
|
4
3
|
import { IDateInputStateInput, IDateInputStateOutput } from './useDateInputState';
|
|
4
|
+
import { IAbsolutePositioningInputProps } from '../../../hooks/useAbsolutePositioning';
|
|
5
5
|
import { ICalendarProps } from '../../content/Calendar/Calendar';
|
|
6
6
|
/**
|
|
7
7
|
* DateField
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDateInputStateInput } from '
|
|
1
|
+
import { IDateInputStateInput } from './useDateInputState';
|
|
2
2
|
interface IUseDateRangeProps extends Pick<IDateInputStateInput, 'displayFormat' | 'valueFormat' | 'useUTC' | 'dateInUTC'> {
|
|
3
3
|
onCloseFrom: any;
|
|
4
4
|
onCloseTo: any;
|
|
@@ -14,11 +14,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
exports.__esModule = true;
|
|
17
|
-
var calendar_1 = require("@steroidsjs/core/utils/calendar");
|
|
18
17
|
var dayjs_1 = __importDefault(require("dayjs"));
|
|
19
18
|
var isNil_1 = __importDefault(require("lodash-es/isNil"));
|
|
20
19
|
var react_1 = require("react");
|
|
21
20
|
var react_use_1 = require("react-use");
|
|
21
|
+
var calendar_1 = require("../../../utils/calendar");
|
|
22
22
|
var isOneRangeValueEmpty = function (valueFrom, valueTo) { return !valueFrom || !valueTo; };
|
|
23
23
|
function useDateRange(props) {
|
|
24
24
|
// Tracking focus for input being edited
|
|
@@ -22,7 +22,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
22
22
|
exports.__esModule = true;
|
|
23
23
|
exports.createDateTimeMask = void 0;
|
|
24
24
|
var kit_1 = require("@maskito/kit");
|
|
25
|
-
var utils_1 = require("
|
|
25
|
+
var utils_1 = require("../TimeField/utils");
|
|
26
26
|
var TIME_REGEXP = /(\d{2}:\d{2})$/;
|
|
27
27
|
var clampTime = function (minutes, fromMin, toMin, step) {
|
|
28
28
|
// Жёсткие границы
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MaskitoOptions } from '@maskito/core';
|
|
2
2
|
import { ICalendarProps } from '../../content/Calendar/Calendar';
|
|
3
3
|
import { IDateInputStateInput, IDateInputStateOutput } from '../../form/DateField/useDateInputState';
|
|
4
|
-
import { IDateRangeButton, IDateRangeFieldProps } from '../../form/DateRangeField/DateRangeField';
|
|
5
4
|
import { IFieldWrapperInputProps, IFieldWrapperOutputProps } from '../../form/Field/fieldWrapper';
|
|
5
|
+
import { IDateRangeButton, IDateRangeFieldProps } from '../DateRangeField/DateRangeField';
|
|
6
6
|
/**
|
|
7
7
|
* DateTimeRangeField
|
|
8
8
|
*
|
|
@@ -15,7 +15,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
exports.__esModule = true;
|
|
17
17
|
var react_1 = require("@maskito/react");
|
|
18
|
-
var utils_1 = require("@steroidsjs/core/ui/form/DateTimeField/utils");
|
|
19
18
|
var react_2 = require("react");
|
|
20
19
|
var enums_1 = require("../../../enums");
|
|
21
20
|
var hooks_1 = require("../../../hooks");
|
|
@@ -23,6 +22,7 @@ var useDateInputState_1 = __importDefault(require("../../form/DateField/useDateI
|
|
|
23
22
|
var useDateRange_1 = __importDefault(require("../../form/DateField/useDateRange"));
|
|
24
23
|
var useDateTime_1 = __importDefault(require("../../form/DateField/useDateTime"));
|
|
25
24
|
var fieldWrapper_1 = __importDefault(require("../../form/Field/fieldWrapper"));
|
|
25
|
+
var utils_1 = require("../DateTimeField/utils");
|
|
26
26
|
var DATE_TIME_SEPARATOR = ', ';
|
|
27
27
|
function DateTimeRangeField(props) {
|
|
28
28
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
package/ui/form/Form/Form.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IButtonProps } from '@steroidsjs/core/ui/form/Button/Button';
|
|
2
1
|
import { Dispatch, ReactNode } from 'react';
|
|
3
2
|
import { IAddressBarConfig } from '../../../hooks/useAddressBar';
|
|
4
3
|
import { providers } from '../../../utils/form';
|
|
4
|
+
import { IButtonProps } from '../Button/Button';
|
|
5
5
|
import { IFieldProps } from '../Field/Field';
|
|
6
6
|
/**
|
|
7
7
|
* Form
|
package/ui/form/Form/Form.js
CHANGED
|
@@ -52,6 +52,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
52
52
|
exports.__esModule = true;
|
|
53
53
|
exports.FormContext = void 0;
|
|
54
54
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
55
|
+
/* eslint-disable react/prop-types */
|
|
55
56
|
var cloneDeep_1 = __importDefault(require("lodash-es/cloneDeep"));
|
|
56
57
|
var get_1 = __importDefault(require("lodash-es/get"));
|
|
57
58
|
var isEmpty_1 = __importDefault(require("lodash-es/isEmpty"));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MaskitoOptions } from '@maskito/core';
|
|
2
|
-
import { ISaveCursorPositionDebounceConfig } from '@steroidsjs/core/hooks/useSaveCursorPosition';
|
|
3
2
|
import { InputHTMLAttributes, ReactElement, ReactNode, FocusEvent, MouseEvent } from 'react';
|
|
3
|
+
import { ISaveCursorPositionDebounceConfig } from '../../../hooks/useSaveCursorPosition';
|
|
4
4
|
import { IFieldWrapperInputProps, IFieldWrapperOutputProps } from '../Field/fieldWrapper';
|
|
5
5
|
export declare const MASK_PRESETS: {
|
|
6
6
|
date: Required<MaskitoOptions>;
|
|
@@ -3,7 +3,6 @@ exports.__esModule = true;
|
|
|
3
3
|
exports.useInputFieldWarningByType = exports.INPUT_TYPES_SUPPORTED_SELECTION = void 0;
|
|
4
4
|
/* eslint-disable no-console */
|
|
5
5
|
/* eslint-disable max-len */
|
|
6
|
-
/* eslint-disable no-unused-expressions */
|
|
7
6
|
var react_use_1 = require("react-use");
|
|
8
7
|
var enums_1 = require("../../../../enums");
|
|
9
8
|
exports.INPUT_TYPES_SUPPORTED_SELECTION = ['text', 'search', 'tel', 'url', 'password'];
|
|
@@ -28,10 +27,10 @@ var INPUT_TYPES_REPLACEMENT_HASH = {
|
|
|
28
27
|
var useInputFieldWarningByType = function (type) {
|
|
29
28
|
(0, react_use_1.useMount)(function () {
|
|
30
29
|
if (!exports.INPUT_TYPES_SUPPORTED_SELECTION.includes(type)) {
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
var warnMessage = INPUT_TYPES_REPLACEMENT_HASH[type]
|
|
31
|
+
? "<InputField /> with \"".concat(type, "\" type does not support setSelectionRange() method. Try to use <").concat(INPUT_TYPES_REPLACEMENT_HASH[type], " /> instead.")
|
|
32
|
+
: "<InputField /> with \"".concat(type, "\" type does not support setSelectionRange() method. Try to use native <input /> tag.");
|
|
33
|
+
console.warn(warnMessage);
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
36
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ISaveCursorPositionDebounceConfig } from '@steroidsjs/core/hooks/useSaveCursorPosition';
|
|
2
1
|
import { ChangeEvent, MutableRefObject, FocusEvent } from 'react';
|
|
2
|
+
import { ISaveCursorPositionDebounceConfig } from '../../../hooks/useSaveCursorPosition';
|
|
3
3
|
import { IFieldWrapperInputProps, IFieldWrapperOutputProps } from '../Field/fieldWrapper';
|
|
4
4
|
import { IBaseFieldProps } from '../InputField/InputField';
|
|
5
5
|
/**
|
|
@@ -15,7 +15,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
exports.__esModule = true;
|
|
17
17
|
exports.checkPassword = exports.InputType = void 0;
|
|
18
|
-
/* eslint-disable no-unused-expressions */
|
|
19
18
|
var react_1 = require("react");
|
|
20
19
|
var enums_1 = require("../../../enums");
|
|
21
20
|
var hooks_1 = require("../../../hooks");
|
|
@@ -61,7 +60,10 @@ function PasswordField(props) {
|
|
|
61
60
|
}), inputRef = _b.inputRef, onChange = _b.onChange;
|
|
62
61
|
var onClear = (0, react_1.useCallback)(function () { return props.input.onChange(''); }, [props.input]);
|
|
63
62
|
var onShowButtonClick = (0, react_1.useCallback)(function () {
|
|
64
|
-
|
|
63
|
+
var typeToBeSet = InputType.PASSWORD
|
|
64
|
+
? InputType.TEXT
|
|
65
|
+
: InputType.PASSWORD;
|
|
66
|
+
setType(typeToBeSet);
|
|
65
67
|
}, [type]);
|
|
66
68
|
var inputProps = (0, react_1.useMemo)(function () {
|
|
67
69
|
var _a;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IDropDownFieldItem } from '
|
|
2
|
-
import { IFieldWrapperInputProps, IFieldWrapperOutputProps } from '
|
|
3
|
-
import { IBaseFieldProps, IInputFieldProps } from '
|
|
1
|
+
import { IDropDownFieldItem } from '../DropDownField/DropDownField';
|
|
2
|
+
import { IFieldWrapperInputProps, IFieldWrapperOutputProps } from '../Field/fieldWrapper';
|
|
3
|
+
import { IBaseFieldProps, IInputFieldProps } from '../InputField/InputField';
|
|
4
4
|
export interface ICountryPhoneMask extends IDropDownFieldItem {
|
|
5
5
|
phoneCode: string;
|
|
6
6
|
phoneMask?: (string | RegExp)[];
|
|
@@ -36,5 +36,5 @@ export interface IPhoneFieldDropdownProps {
|
|
|
36
36
|
export interface IPhoneFieldViewProps extends IPhoneFieldProps, IFieldWrapperOutputProps {
|
|
37
37
|
dropDownProps: IPhoneFieldDropdownProps;
|
|
38
38
|
}
|
|
39
|
-
declare const _default: import("
|
|
39
|
+
declare const _default: import("../Field/fieldWrapper").FieldWrapperComponent<IInputFieldProps>;
|
|
40
40
|
export default _default;
|
|
@@ -15,9 +15,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
15
15
|
};
|
|
16
16
|
exports.__esModule = true;
|
|
17
17
|
var react_1 = require("@maskito/react");
|
|
18
|
-
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
19
|
-
var fieldWrapper_1 = __importDefault(require("@steroidsjs/core/ui/form/Field/fieldWrapper"));
|
|
20
18
|
var react_2 = require("react");
|
|
19
|
+
var hooks_1 = require("../../../hooks");
|
|
20
|
+
var fieldWrapper_1 = __importDefault(require("../Field/fieldWrapper"));
|
|
21
21
|
function PhoneField(props) {
|
|
22
22
|
var components = (0, hooks_1.useComponents)();
|
|
23
23
|
var _a = (0, react_2.useState)(props.initialCountryCode.toUpperCase()), selectedCountryCode = _a[0], setSelectedCountryCode = _a[1];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IFieldProps } from '@steroidsjs/core/ui/form/Field/Field';
|
|
2
1
|
import { ReactNode } from 'react';
|
|
3
2
|
import { IStepsProps, IStepItem } from '../../list/Steps/Steps';
|
|
4
3
|
import { IButtonProps } from '../Button/Button';
|
|
4
|
+
import { IFieldProps } from '../Field/Field';
|
|
5
5
|
import { IFormProps } from '../Form/Form';
|
|
6
6
|
export interface IWizardStepItem extends Partial<IStepItem> {
|
|
7
7
|
fields?: IFieldProps[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IWizardStepItem } from '@steroidsjs/core/ui/form/WizardForm/WizardForm';
|
|
2
1
|
import { ReactElement } from 'react';
|
|
2
|
+
import { IWizardStepItem } from './WizardForm';
|
|
3
3
|
export declare const generateFieldStepMap: (arr?: any[]) => any;
|
|
4
4
|
export declare const normalizeSteps: (steps: IWizardStepItem[]) => {
|
|
5
5
|
id: number;
|
|
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
exports.__esModule = true;
|
|
6
|
-
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
7
6
|
var dayjs_1 = __importDefault(require("dayjs"));
|
|
7
|
+
var hooks_1 = require("../../../hooks");
|
|
8
8
|
var defaultProps = {
|
|
9
9
|
format: 'HH:mm'
|
|
10
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ITreeProps } from '@steroidsjs/core/ui/nav/Tree/Tree';
|
|
2
1
|
import { ReactElement } from 'react';
|
|
3
2
|
import { IPreparedTreeItem, ITreeItem } from '../../../hooks/useTree';
|
|
3
|
+
import { ITreeProps } from '../../nav/Tree/Tree';
|
|
4
4
|
import { IColumnViewProps, IGridColumn, IGridProps } from '../Grid/Grid';
|
|
5
5
|
export interface ITreeColumnViewProps extends IColumnViewProps, Pick<ITreeTableProps, 'levelPadding' | 'customIcon'> {
|
|
6
6
|
item: IPreparedTreeItem;
|
|
@@ -25,15 +25,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
exports.__esModule = true;
|
|
26
26
|
exports.addTreeColumnFieldsToFirstColumn = void 0;
|
|
27
27
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
-
var hooks_1 = require("@steroidsjs/core/hooks");
|
|
29
|
-
var Format_1 = __importDefault(require("@steroidsjs/core/ui/format/Format"));
|
|
30
|
-
var ControlsColumn_1 = __importDefault(require("@steroidsjs/core/ui/list/ControlsColumn"));
|
|
31
28
|
var isString_1 = __importDefault(require("lodash-es/isString"));
|
|
32
29
|
var merge_1 = __importDefault(require("lodash-es/merge"));
|
|
33
30
|
var upperFirst_1 = __importDefault(require("lodash-es/upperFirst"));
|
|
34
31
|
var react_1 = require("react");
|
|
32
|
+
var hooks_1 = require("../../../hooks");
|
|
35
33
|
var useList_1 = __importDefault(require("../../../hooks/useList"));
|
|
36
34
|
var useTree_1 = __importDefault(require("../../../hooks/useTree"));
|
|
35
|
+
var Format_1 = __importDefault(require("../../format/Format"));
|
|
36
|
+
var ControlsColumn_1 = __importDefault(require("../ControlsColumn"));
|
|
37
37
|
var TREE_COLUMN_VIEW_FIELDS = {
|
|
38
38
|
valueView: 'TreeColumnView',
|
|
39
39
|
headerClassName: 'TreeColumnHeader'
|