@mailstep/design-system 0.5.0-beta.47 → 0.5.0-beta.48
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/package.json +2 -7
- package/ui/Blocks/CommonGrid/CommonGridContainer.js +1 -1
- package/ui/Blocks/CommonGrid/storybook/stories/default.stories.js +2 -1
- package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.js +2 -1
- package/ui/Blocks/CommonGrid/storybook/utils/withTheme.d.ts +2 -0
- package/ui/Blocks/CommonGrid/storybook/utils/withTheme.js +2 -0
- package/ui/Blocks/CommonGrid/translations.js +1 -1
- package/ui/Elements/DatePicker/DatePicker.js +1 -1
- package/ui/ThemeProvider/ThemeProvider.d.ts +3 -1
- package/ui/ThemeProvider/ThemeProvider.js +4 -2
- package/ui/index.d.ts +1 -3
- package/ui/index.es.js +4838 -4870
- package/ui/index.js +1 -3
- package/ui/index.umd.js +297 -297
- package/ui/Providers/LanguageProvider/index.d.ts +0 -8
- package/ui/Providers/LanguageProvider/index.js +0 -13
- package/ui/locales/catalogs.d.ts +0 -9
- package/ui/locales/catalogs.js +0 -16
- package/ui/locales/cs/messages.d.ts +0 -1
- package/ui/locales/cs/messages.js +0 -1
- package/ui/locales/el/messages.d.ts +0 -1
- package/ui/locales/el/messages.js +0 -1
- package/ui/locales/en/messages.d.ts +0 -1
- package/ui/locales/en/messages.js +0 -1
- package/ui/locales/es/messages.d.ts +0 -1
- package/ui/locales/es/messages.js +0 -1
- package/ui/locales/it/messages.d.ts +0 -1
- package/ui/locales/it/messages.js +0 -1
- package/ui/locales/ru/messages.d.ts +0 -1
- package/ui/locales/ru/messages.js +0 -1
- package/ui/locales/sk/messages.d.ts +0 -1
- package/ui/locales/sk/messages.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailstep/design-system",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.48",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./ui/index.js",
|
|
@@ -16,10 +16,7 @@
|
|
|
16
16
|
"build-storybook": "storybook build",
|
|
17
17
|
"deploy": "npm run build && npm publish ./build",
|
|
18
18
|
"dev": "yarn storybook",
|
|
19
|
-
"test": "echo \"The tests are still waiting to be written, but it seems like they're really good at procrastinating!\""
|
|
20
|
-
"locale-clean": "lingui extract --clean",
|
|
21
|
-
"locale-extract": "lingui extract",
|
|
22
|
-
"locale-compile": "lingui compile --typescript"
|
|
19
|
+
"test": "echo \"The tests are still waiting to be written, but it seems like they're really good at procrastinating!\""
|
|
23
20
|
},
|
|
24
21
|
"devDependencies": {
|
|
25
22
|
"@babel/core": "^7.20.12",
|
|
@@ -35,7 +32,6 @@
|
|
|
35
32
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
36
33
|
"@lingui/react": "3.17.2",
|
|
37
34
|
"@lingui/core": "3.17.2",
|
|
38
|
-
"@lingui/cli": "3.17.2",
|
|
39
35
|
"@popperjs/core": "^2.11.8",
|
|
40
36
|
"@storybook/addon-controls": "7.6.8",
|
|
41
37
|
"@storybook/addon-essentials": "7.6.8",
|
|
@@ -103,7 +99,6 @@
|
|
|
103
99
|
"@fortawesome/pro-solid-svg-icons": "^6.3.0",
|
|
104
100
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
105
101
|
"@lingui/react": "3.17.2",
|
|
106
|
-
"@lingui/cli": "3.17.2",
|
|
107
102
|
"@lingui/core": "3.17.2",
|
|
108
103
|
"@popperjs/core": "^2.11.8",
|
|
109
104
|
"@xstyled/styled-components": "^3.8.0",
|
|
@@ -61,6 +61,6 @@ var StyledCommonGrid = function (props) {
|
|
|
61
61
|
gridSelectors: gridSelectors,
|
|
62
62
|
onClose: onClose,
|
|
63
63
|
}), columnsConfigValues = _d.columnsConfigValues, setColumnsConfigOptions = _d.setColumnsConfigOptions, onConfirmForm = _d.onConfirmForm, resetColumnConfig = _d.resetColumnConfig;
|
|
64
|
-
return (_jsxs(ContentContainer, { children: [_jsxs(CommonGridWrap, { children: [_jsx(HidePrint, { children: _jsxs(StyledButtonStrip, { className: "buttonsStrip", children: [!hideControlButtons && (_jsx(ControlButtons, { extraControlButtons: extraControlButtons, gridActions: gridActions, gridSelectors: gridSelectors, eshopSelect: eshopSelect })), _jsx(StyledColumnButton, { type: "button", appearance: "ghost", icon: _jsx(Rows, {}), onClick: openManageColumnForm, children: _jsx(H6, { children: _jsx(Trans, { id: "manageColumn.title", message: "Manage
|
|
64
|
+
return (_jsxs(ContentContainer, { children: [_jsxs(CommonGridWrap, { children: [_jsx(HidePrint, { children: _jsxs(StyledButtonStrip, { className: "buttonsStrip", children: [!hideControlButtons && (_jsx(ControlButtons, { extraControlButtons: extraControlButtons, gridActions: gridActions, gridSelectors: gridSelectors, eshopSelect: eshopSelect })), _jsx(StyledColumnButton, { type: "button", appearance: "ghost", icon: _jsx(Rows, {}), onClick: openManageColumnForm, children: _jsx(H6, { children: _jsx(Trans, { id: "manageColumn.title", message: "Manage column" }) }) })] }) }), _jsx(CommonGridWithStyles, __assign({}, passDownProps, modifiedPassDownProps, { filters: filters, gridRef: gridRef, height: gridHeight, floatingButtonProps: floatingButtonProps, hasColouredRows: true }))] }), _jsx(HidePrint, { children: _jsxs(BottomWrapper, { ref: paginationRef, isAbsolute: !!gridHeight, children: [processCheckedValues && (_jsx(ActionHead, { rowsData: rowsData, onBatchAction: onBatchAction, gridActions: gridActions, gridSelectors: gridSelectors, actionColumn: actionColumnDefinition, processCheckedValues: processCheckedValues, processCheckedValuesTitle: processCheckedValuesTitle })), _jsxs(x.div, { display: "flex", justifyContent: "center", alignItems: "center", className: "paginatorWrapper", w: "100%", h: window.innerWidth > 1204 ? '60px' : '32px', children: [_jsx(Pagination, { page: gridSelectors === null || gridSelectors === void 0 ? void 0 : gridSelectors.page, itemCount: passDownProps === null || passDownProps === void 0 ? void 0 : passDownProps.totalRowsCount, itemPerPage: (gridSelectors === null || gridSelectors === void 0 ? void 0 : gridSelectors.rowsPerPage) || 10, onPageChange: gridActions === null || gridActions === void 0 ? void 0 : gridActions.setPage, customPaginationHandler: customPaginationHandler }), _jsx(TablePagination, { gridActions: gridActions, gridSelectors: gridSelectors, customPaginationHandler: customPaginationHandler })] })] }) }), manageColumnFormVisible && (_jsx(Modal, { title: _jsx(Trans, { id: "manageColumn.title", message: "Manage columns" }), onClose: onClose, onCancel: onClose, onExtraAction: resetColumnConfig, onConfirm: onConfirmForm, width: "auto", minWidth: "350px", hasFooter: true, extraActionLabel: _jsx(Trans, { id: "dataGrid.buttonClearConfig", message: "Reset config" }), cancelLabel: _jsx(Trans, { id: "form.buttonCancel", message: "Cancel" }), confirmLabel: _jsx(Trans, { id: "form.buttonConfirm", message: "Confirm" }), children: _jsx(ManageColumnForm, { columns: columns, columnsConfigValues: columnsConfigValues, setColumnsConfigOptions: setColumnsConfigOptions }) }))] }));
|
|
65
65
|
};
|
|
66
66
|
export default StyledCommonGrid;
|
|
@@ -2,12 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import CommonGrid from '../../CommonGridContainer';
|
|
3
3
|
import { createRandomData, gridSelectors, gridDummyActions } from '../utils/utils';
|
|
4
4
|
import { columnDefinitions } from '../utils/columnDefinition';
|
|
5
|
+
import withTheme from '../utils/withTheme';
|
|
5
6
|
import withRouter from '../utils/withRouter';
|
|
6
7
|
import withRedux from '../utils/withRedux';
|
|
7
8
|
import { LinguiContainer } from '../utils/linguiContainer';
|
|
8
9
|
export default {
|
|
9
10
|
title: '@Blocks/CommonGrid',
|
|
10
|
-
decorators: [withRouter, withRedux],
|
|
11
|
+
decorators: [withTheme, withRouter, withRedux],
|
|
11
12
|
};
|
|
12
13
|
export var Default = function () {
|
|
13
14
|
return (_jsx(LinguiContainer, { children: _jsx(CommonGrid, { columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), gridActions: gridDummyActions, gridSelectors: gridSelectors }) }));
|
|
@@ -2,12 +2,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { ReduxGrid, createRandomData, gridSelectors, gridDummyActions } from '../utils/utils';
|
|
3
3
|
import { onRowAction } from '../utils/actions';
|
|
4
4
|
import { columnDefinitions } from '../utils/columnDefinition';
|
|
5
|
+
import withTheme from '../utils/withTheme';
|
|
5
6
|
import withRouter from '../utils/withRouter';
|
|
6
7
|
import withRedux from '../utils/withRedux';
|
|
7
8
|
import { LinguiContainer } from '../utils/linguiContainer';
|
|
8
9
|
export default {
|
|
9
10
|
title: '@Blocks/CommonGrid',
|
|
10
|
-
decorators: [withRouter, withRedux],
|
|
11
|
+
decorators: [withTheme, withRouter, withRedux],
|
|
11
12
|
};
|
|
12
13
|
export var Styled = function () {
|
|
13
14
|
return (_jsx(LinguiContainer, { children: _jsx("div", { className: "styled", children: _jsx(ReduxGrid, { columnsDefinitions: columnDefinitions, rowsData: createRandomData(10), onRowAction: onRowAction, gridActions: gridDummyActions, gridSelectors: gridSelectors }) }) }));
|
|
@@ -2,5 +2,5 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
import { Trans } from '@lingui/react';
|
|
3
3
|
/** catalog for lungui to track commonGrid translations - DO NOT REMOVE */
|
|
4
4
|
var Translations = function () {
|
|
5
|
-
return (_jsxs(_Fragment, { children: [_jsx(Trans, { id: "dataGrid.status.loadingData", message: "... loading data ..." }), _jsx(Trans, { id: "dataGrid.status.noDataFound", message: "No data found." }), _jsx(Trans, { id: "dataGrid.buttonClearSettings", message: "Reset filters" }), _jsx(Trans, { id: "dataGrid.buttonClearConfig", message: "Reset config" }), _jsx(Trans, { id: "dataGrid.buttonGridConfig", message: "Configure columns" }), _jsx(Trans, { id: "dataGrid.config.title", message: "Configure columns" }), _jsx(Trans, { id: "dataGrid.config.buttonReset", message: "Reset all" }), _jsx(Trans, { id: "dataGrid.resultsPerPage", message: "Results per page" }), _jsx(Trans, { id: "manageColumn.title", message: "Manage
|
|
5
|
+
return (_jsxs(_Fragment, { children: [_jsx(Trans, { id: "dataGrid.status.loadingData", message: "... loading data ..." }), _jsx(Trans, { id: "dataGrid.status.noDataFound", message: "No data found." }), _jsx(Trans, { id: "dataGrid.buttonClearSettings", message: "Reset filters" }), _jsx(Trans, { id: "dataGrid.buttonClearConfig", message: "Reset config" }), _jsx(Trans, { id: "dataGrid.buttonGridConfig", message: "Configure columns" }), _jsx(Trans, { id: "dataGrid.config.title", message: "Configure columns" }), _jsx(Trans, { id: "dataGrid.config.buttonReset", message: "Reset all" }), _jsx(Trans, { id: "dataGrid.resultsPerPage", message: "Results per page" }), _jsx(Trans, { id: "manageColumn.title", message: "Manage column" }), _jsx(Trans, { id: "dataGrid.buttonClearSettings", message: "Reset filters" }), _jsx(Trans, { id: "form.buttonCancel", message: "Cancel" }), _jsx(Trans, { id: "form.buttonConfirm", message: "Confirm" }), ",", _jsx(Trans, { id: "dataGrid.actionOptions.createNew", message: "Create new" }), ",", _jsx(Trans, { id: "form.buttonImport", message: "Import" }), ",", _jsx(Trans, { id: "dataGrid.actionOptions.export", message: "Export" }), ",", _jsx(Trans, { id: "form.buttonConfirm", message: "Confirm" }), ",", _jsx(Trans, { id: "dataGrid.actionOptions.createNew", message: "Create new" }), ",", _jsx(Trans, { id: "dataGrid.checkAll", message: "Check all" }), ",", _jsx(Trans, { id: "datagrid.filterCell.selectAllLabel", message: "select all" }), _jsx(Trans, { id: "datagrid.filterCell.optionsSelectedLabel", message: '{count} options' }), ",", _jsx(Trans, { id: "dataGrid.deleteItem", message: "Delete" }), ",", _jsx(Trans, { id: "dataGrid.columnLot.NA", message: "N/A" }), ",", _jsx(Trans, { id: "dataGrid.buttonActions", message: "Actions" }), ",", _jsx(Trans, { id: "dataGrid.errors.ipValidationError", message: "Value is not valid ip" }), ",", _jsx(Trans, { id: "dataGrid.columnActive.filterOptions.all", message: "All" }), ",", _jsx(Trans, { id: "dataGrid.columnActive.filterOptions.yes", message: "Yes" }), ",", _jsx(Trans, { id: "dataGrid.columnActive.filterOptions.no", message: "No" }), _jsx(Trans, { id: "products.eshopFilterPlaceholder", message: "Select eshop..." }), ",", _jsx(Trans, { id: "dataGrid.checkedRowsCount", message: "Selected {checkedRowsCount} items" }), ",", _jsx(Trans, { id: "dataGrid.filterCell", message: "Type to filter" }), ",", _jsx(Trans, { id: "dataGrid.filterCell.from", message: "From" }), ",", _jsx(Trans, { id: "dataGrid.filterCell.to", message: "To" }), ",", _jsx(Trans, { id: "manageColumn.searchPlaceholder", message: "Find column..." }), ",", _jsx(Trans, { id: "dataGrid.comparator.equals", message: "Equals" }), ",", _jsx(Trans, { id: "dataGrid.comparator.notEquals", message: "Not equal" }), ",", _jsx(Trans, { id: "dataGrid.comparator.lessThan", message: "Less than" }), ",", _jsx(Trans, { id: "dataGrid.comparator.lessThanOrEquals", message: "Less than or equals" }), ",", _jsx(Trans, { id: "dataGrid.comparator.greaterThan", message: "Greater than" }), ",", _jsx(Trans, { id: "dataGrid.comparator.greaterThanOrEquals", message: "Greater than or equal" }), ",", _jsx(Trans, { id: "dataGrid.comparator.contains", message: "Contains" }), ",", _jsx(Trans, { id: "dataGrid.comparator.notContains", message: "Not contains" }), ",", _jsx(Trans, { id: "dataGrid.comparator.startsWith", message: "Starts with'" }), ",", _jsx(Trans, { id: "dataGrid.comparator.endsWith", message: "Ends with" }), ",", _jsx(Trans, { id: "select.noOptions", message: "no options" }), ",", _jsx(Trans, { id: "components.dropdown.loading", message: "Loading..." }), ",", _jsx(Trans, { id: "components.dropdown.placeholder", message: "Select..." }), ",", _jsx(Trans, { id: "components.dropdown.notReact", message: "Select related values first..." }), ",", _jsx(Trans, { id: "components.dropdown.writeMoreChars", message: "Write at least ${asyncLoadMinChars} characters." }), ",", _jsx(Trans, { id: "components.dropdown.noOptions", message: "No options" }), ",", _jsx(Trans, { id: "components.dropdown.newOption", message: "new value" }), ",", _jsx(Trans, { id: "form.general.min2Chars", message: "Minimal length is 2 characters." }), ","] }));
|
|
6
6
|
};
|
|
@@ -34,7 +34,7 @@ import { x } from '@xstyled/styled-components';
|
|
|
34
34
|
import { DatePickerBase } from './styles';
|
|
35
35
|
import SpaceAroundWrap from '../SpaceAround';
|
|
36
36
|
import Input from '../../Forms/Input';
|
|
37
|
-
import { LanguageContext } from '../../
|
|
37
|
+
import { LanguageContext } from '../../ThemeProvider/ThemeProvider';
|
|
38
38
|
var defaultDateFormat = 'DD.MM.YYYY';
|
|
39
39
|
var DatePicker = function (_a) {
|
|
40
40
|
var name = _a.name, value = _a.value, initialViewDate = _a.initialViewDate, error = _a.error, label = _a.label, disabled = _a.disabled, isValidDate = _a.isValidDate, onChange = _a.onChange, _b = _a.dateFormat, dateFormat = _b === void 0 ? defaultDateFormat : _b, _c = _a.timeFormat, timeFormat = _c === void 0 ? false : _c, open = _a.open, _d = _a.secondValue, secondValue = _d === void 0 ? null : _d, input = _a.input, _e = _a.icon, icon = _e === void 0 ? true : _e, _f = _a.showInputLabel, showInputLabel = _f === void 0 ? false : _f, _g = _a.showCalendarLabel, showCalendarLabel = _g === void 0 ? true : _g, _h = _a.spaceAround, spaceAround = _h === void 0 ? false : _h, className = _a.className, onClear = _a.onClear, passProps = __rest(_a, ["name", "value", "initialViewDate", "error", "label", "disabled", "isValidDate", "onChange", "dateFormat", "timeFormat", "open", "secondValue", "input", "icon", "showInputLabel", "showCalendarLabel", "spaceAround", "className", "onClear"]);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { Props } from './types';
|
|
2
|
-
declare const
|
|
3
|
+
export declare const LanguageContext: import("react").Context<string>;
|
|
4
|
+
declare const MailstepThemeProvider: ({ children, theme, preflight, language }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
5
|
export default MailstepThemeProvider;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ThemeProvider, Preflight } from '@xstyled/styled-components';
|
|
3
3
|
import themes from './themes';
|
|
4
|
+
import { createContext } from 'react';
|
|
5
|
+
export var LanguageContext = createContext('en');
|
|
4
6
|
var MailstepThemeProvider = function (_a) {
|
|
5
|
-
var children = _a.children, _b = _a.theme, theme = _b === void 0 ? 'default' : _b, _c = _a.preflight, preflight = _c === void 0 ? true : _c;
|
|
6
|
-
return (_jsxs(ThemeProvider, { theme: themes[theme], children: [preflight && _jsx(Preflight, {}), children] }));
|
|
7
|
+
var children = _a.children, _b = _a.theme, theme = _b === void 0 ? 'default' : _b, _c = _a.preflight, preflight = _c === void 0 ? true : _c, _d = _a.language, language = _d === void 0 ? 'en' : _d;
|
|
8
|
+
return (_jsx(LanguageContext.Provider, { value: language, children: _jsxs(ThemeProvider, { theme: themes[theme], children: [preflight && _jsx(Preflight, {}), children] }) }));
|
|
7
9
|
};
|
|
8
10
|
export default MailstepThemeProvider;
|
package/ui/index.d.ts
CHANGED
|
@@ -41,8 +41,7 @@ import MultiSelect from './Elements/MultiSelect';
|
|
|
41
41
|
import Select from './Elements/Select';
|
|
42
42
|
import DropdownSelect from './Elements/DropdownSelect';
|
|
43
43
|
import TextArea from './Forms/TextArea';
|
|
44
|
-
|
|
45
|
-
export { DropdownSelect, DatePicker, CommonGrid, Popover, SingleSelect, MultiSelect, Select, Card, CornerDialog, ImageList, LightBox, Modal, Tabs, Alert, Avatar, Badge, BorderedBox, Button, Dropdown, ErrorMessage, Icon, Image, Label, Line, Link, Logo, Pagination, Paragraph, Portal, ProgressBar, SimpleLink, SpaceAround, Spinner, Tag, Toast, Toggle, Typography, Checkbox, Input, RadioButton, ThemeProvider, LanguageProvider, utils, TextArea, };
|
|
44
|
+
export { DropdownSelect, DatePicker, CommonGrid, Popover, SingleSelect, MultiSelect, Select, Card, CornerDialog, ImageList, LightBox, Modal, Tabs, Alert, Avatar, Badge, BorderedBox, Button, Dropdown, ErrorMessage, Icon, Image, Label, Line, Link, Logo, Pagination, Paragraph, Portal, ProgressBar, SimpleLink, SpaceAround, Spinner, Tag, Toast, Toggle, Typography, Checkbox, Input, RadioButton, ThemeProvider, utils, TextArea, };
|
|
46
45
|
export * from './Blocks/CornerDialog';
|
|
47
46
|
export * from './Blocks/ImageList';
|
|
48
47
|
export * from './Blocks/LightBox';
|
|
@@ -86,4 +85,3 @@ export * from './Elements/MultiSelect';
|
|
|
86
85
|
export * from './Elements/Select';
|
|
87
86
|
export * from './Elements/DropdownSelect';
|
|
88
87
|
export * from './Forms/TextArea';
|
|
89
|
-
export * from './Providers/LanguageProvider';
|