@bigbinary/neetoui 7.1.0 → 8.0.1
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/DatePicker.js +10 -6
- package/dist/DatePicker.js.map +1 -1
- package/dist/Slider.js +12 -0
- package/dist/Slider.js.map +1 -1
- package/dist/Table.js +12 -1
- package/dist/Table.js.map +1 -1
- package/dist/TimePicker.js +9 -5
- package/dist/TimePicker.js.map +1 -1
- package/dist/Tree.js +12 -0
- package/dist/Tree.js.map +1 -1
- package/dist/TreeSelect.js +9 -0
- package/dist/TreeSelect.js.map +1 -1
- package/dist/cjs/DatePicker.js +10 -6
- package/dist/cjs/DatePicker.js.map +1 -1
- package/dist/cjs/Slider.js +12 -0
- package/dist/cjs/Slider.js.map +1 -1
- package/dist/cjs/Table.js +12 -1
- package/dist/cjs/Table.js.map +1 -1
- package/dist/cjs/TimePicker.js +9 -5
- package/dist/cjs/TimePicker.js.map +1 -1
- package/dist/cjs/Tree.js +12 -0
- package/dist/cjs/Tree.js.map +1 -1
- package/dist/cjs/TreeSelect.js +9 -0
- package/dist/cjs/TreeSelect.js.map +1 -1
- package/dist/cjs/constants.js +34 -0
- package/dist/cjs/constants.js.map +1 -0
- package/dist/cjs/formik/Slider.js +9 -0
- package/dist/cjs/formik/Slider.js.map +1 -1
- package/dist/cjs/formik/TreeSelect.js +8 -0
- package/dist/cjs/formik/TreeSelect.js.map +1 -1
- package/dist/cjs/formik/index.js +8 -0
- package/dist/cjs/formik/index.js.map +1 -1
- package/dist/cjs/{index-e2dbc0bd.js → index-34eccc77.js} +40 -171
- package/dist/cjs/index-34eccc77.js.map +1 -0
- package/dist/cjs/index.js +9 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/constants.js +20 -0
- package/dist/constants.js.map +1 -0
- package/dist/formik/Slider.js +9 -0
- package/dist/formik/Slider.js.map +1 -1
- package/dist/formik/TreeSelect.js +8 -0
- package/dist/formik/TreeSelect.js.map +1 -1
- package/dist/formik/index.js +8 -0
- package/dist/formik/index.js.map +1 -1
- package/dist/{index-266ce6a6.js → index-23406db4.js} +25 -153
- package/dist/index-23406db4.js.map +1 -0
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/index.d.ts +0 -4
- package/package.json +1 -1
- package/dist/DateTimePicker.js +0 -96
- package/dist/DateTimePicker.js.map +0 -1
- package/dist/TimePickerInput.js +0 -263
- package/dist/TimePickerInput.js.map +0 -1
- package/dist/cjs/DateTimePicker.js +0 -102
- package/dist/cjs/DateTimePicker.js.map +0 -1
- package/dist/cjs/TimePickerInput.js +0 -278
- package/dist/cjs/TimePickerInput.js.map +0 -1
- package/dist/cjs/index-e2dbc0bd.js.map +0 -1
- package/dist/index-266ce6a6.js.map +0 -1
- package/types/DateTimePicker.d.ts +0 -26
- package/types/TimePickerInput.d.ts +0 -22
package/dist/Tree.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tree.js","sources":["../src/components/Tree/SwitcherIcon.jsx","../src/components/Tree/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { Down, Right } from \"neetoicons\";\n\nconst SwitcherIcon = ({ expanded }) =>\n expanded ? <Down size={16} /> : <Right size={16} />;\n\nexport default SwitcherIcon;\n","import React from \"react\";\n\nimport { ConfigProvider, Tree as TreeComponent } from \"antd\";\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES } from \"utils\";\n\nimport SwitcherIcon from \"./SwitcherIcon\";\n\nconst Tree = props => (\n <ConfigProvider\n
|
|
1
|
+
{"version":3,"file":"Tree.js","sources":["../src/components/Tree/SwitcherIcon.jsx","../src/components/Tree/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { Down, Right } from \"neetoicons\";\n\nconst SwitcherIcon = ({ expanded }) =>\n expanded ? <Down size={16} /> : <Right size={16} />;\n\nexport default SwitcherIcon;\n","import React from \"react\";\n\nimport { ConfigProvider, Tree as TreeComponent } from \"antd\";\nimport classnames from \"classnames\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { ANTD_LOCALE } from \"components/constants\";\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES } from \"utils\";\n\nimport SwitcherIcon from \"./SwitcherIcon\";\n\nconst Tree = props => {\n const { i18n } = useTranslation();\n\n return (\n <ConfigProvider\n locale={ANTD_LOCALE[i18n.language || \"en\"]}\n theme={{\n token: { ...ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES },\n components: {\n Tree: {\n directoryNodeSelectedBg: \"rgb(var(--neeto-ui-primary-500))\",\n directoryNodeSelectedColor: \"rgb(var(--neeto-ui-white))\",\n nodeHoverBg: \"rgb(var(--neeto-ui-gray-100))\",\n nodeSelectedBg: \"rgb(var(--neeto-ui-primary-100))\",\n },\n },\n }}\n >\n <TreeComponent\n switcherIcon={SwitcherIcon}\n {...props}\n className={classnames(\"neeto-ui-tree\", props.className)}\n />\n </ConfigProvider>\n );\n};\n\nTree.propTypes = {\n /**\n * Whether to allow dropping on the node\n */\n allowDrop: PropTypes.bool,\n /**\n * Whether to automatically expand a parent treeNode\n */\n autoExpandParent: PropTypes.bool,\n /**\n * Whether treeNode fill remaining horizontal space\n */\n blockNode: PropTypes.bool,\n /**\n * Add a Checkbox before the treeNodes.\n */\n checkable: PropTypes.bool,\n /**\n * Specifies the keys of the checked treeNodes\n */\n checkedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Check treeNode precisely; parent treeNode and children treeNodes are not associated\n */\n checkStrictly: PropTypes.bool,\n /**\n * Specifies the keys of the default checked treeNodes.\n */\n defaultCheckedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Specify the keys of the default expanded treeNodes.\n */\n defaultExpandedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Specifies the keys of the default selected treeNodes.\n */\n defaultSelectedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Callback function for when the onCheck event occurs.\n */\n onCheck: PropTypes.func,\n /**\n * Whether disabled the tree\n */\n disabled: PropTypes.bool,\n /**\n * The treeNodes data Array, if set it then you need not to construct children TreeNode. (key should be unique across the whole array).\n */\n treeData: PropTypes.array,\n /**\n * Callback function for when the user clicks a treeNode.\n */\n onSelect: PropTypes.func,\n /**\n * Shows a connecting line.\n */\n showLine: PropTypes.bool,\n /**\n * Config virtual scroll height. Will not support horizontal scroll when enable this.\n */\n height: PropTypes.number,\n /**\n * Specifies whether this Tree or the node is draggable.\n */\n draggable: PropTypes.bool,\n /**\n * Callback function for when the onDragEnter event occurs\n */\n onDragEnter: PropTypes.func,\n /**\n * Callback function for when the onDragStart event occurs\n */\n onDragStart: PropTypes.func,\n /**\n * Callback function for when the onDragEnter event occurs\n */\n onDragEnd: PropTypes.func,\n /**\n * Callback function for when the onDragLeave event occurs\n */\n onDragLeave: PropTypes.func,\n /**\n * Callback function for when the onDragOver event occurs\n */\n onDragOver: PropTypes.func,\n /**\n * Callback function for when the onDrop event occurs\n */\n onDrop: PropTypes.func,\n /**\n * Defines a function to filter (highlight) treeNodes. When the function returns true, the corresponding treeNode will be highlighted\n */\n filterTreeNode: PropTypes.func,\n /**\n * Load data asynchronously\n */\n loadData: PropTypes.func,\n /**\n * Set loaded tree nodes. Need work with loadData\n */\n loadedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Whether can be selected\n */\n selectable: PropTypes.bool,\n /**\n * Specifies the keys of the selected treeNodes, multiple selection needs to set multiple to true\n */\n selectedKeys: PropTypes.arrayOf(PropTypes.string),\n /**\n * Allows selecting multiple treeNodes\n */\n multiple: PropTypes.bool,\n /**\n * Customize tree node title render\n */\n titleRender: PropTypes.func,\n /**\n * Disable virtual scroll when set to false\n */\n virtual: PropTypes.bool,\n /**\n * Callback function for when a treeNode is expanded or collapsed\n */\n onExpand: PropTypes.func,\n /**\n * Callback function for when a treeNode is loaded\n */\n onLoad: PropTypes.func,\n /**\n * Customize collapse/expand icon of tree node\n */\n switcherIcon: PropTypes.node,\n};\n\nexport default Tree;\n"],"names":["SwitcherIcon","_ref","expanded","React","createElement","Down","size","Right","Tree","props","_useTranslation","useTranslation","i18n","_ConfigProvider","locale","ANTD_LOCALE","language","theme","token","_objectSpread","ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES","components","directoryNodeSelectedBg","directoryNodeSelectedColor","nodeHoverBg","nodeSelectedBg","_Tree","_extends","switcherIcon","className","classnames"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,QAAQ,GAAAD,IAAA,CAARC,QAAQ,CAAA;AAAA,EAAA,OAC9BA,QAAQ,gBAAGC,cAAA,CAAAC,aAAA,CAACC,IAAI,EAAA;AAACC,IAAAA,IAAI,EAAE,EAAA;AAAG,GAAA,CAAG,gBAAGH,cAAA,CAAAC,aAAA,CAACG,KAAK,EAAA;AAACD,IAAAA,IAAI,EAAE,EAAA;GAAM,CAAA,CAAA;AAAA,CAAA;;;;ACOrD,IAAME,IAAI,GAAG,SAAPA,IAAIA,CAAGC,KAAK,EAAI;EACpB,IAAAC,eAAA,GAAiBC,cAAc,EAAE;IAAzBC,IAAI,GAAAF,eAAA,CAAJE,IAAI,CAAA;AAEZ,EAAA,oBACET,cAAA,CAAAC,aAAA,CAAAS,eAAA,EAAA;IACEC,MAAM,EAAEC,WAAW,CAACH,IAAI,CAACI,QAAQ,IAAI,IAAI,CAAE;AAC3CC,IAAAA,KAAK,EAAE;AACLC,MAAAA,KAAK,EAAAC,aAAA,CAAOC,EAAAA,EAAAA,iCAAiC,CAAE;AAC/CC,MAAAA,UAAU,EAAE;AACVb,QAAAA,IAAI,EAAE;AACJc,UAAAA,uBAAuB,EAAE,kCAAkC;AAC3DC,UAAAA,0BAA0B,EAAE,4BAA4B;AACxDC,UAAAA,WAAW,EAAE,+BAA+B;AAC5CC,UAAAA,cAAc,EAAE,kCAAA;AAClB,SAAA;AACF,OAAA;AACF,KAAA;AAAE,GAAA,eAEFtB,cAAA,CAAAC,aAAA,CAAAsB,KAAA,EAAAC,QAAA,CAAA;AACEC,IAAAA,YAAY,EAAE5B,YAAAA;AAAa,GAAA,EACvBS,KAAK,EAAA;AACToB,IAAAA,SAAS,EAAEC,UAAU,CAAC,eAAe,EAAErB,KAAK,CAACoB,SAAS,CAAA;AAAE,GAAA,CAAA,CACxD,CACa,CAAA;AAErB;;;;"}
|
package/dist/TreeSelect.js
CHANGED
|
@@ -8,6 +8,7 @@ import classnames from 'classnames';
|
|
|
8
8
|
import { Down } from '@bigbinary/neeto-icons';
|
|
9
9
|
import { useTranslation } from 'react-i18next';
|
|
10
10
|
import { g as getLocale, A as ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES } from './index-9040fef3.js';
|
|
11
|
+
import { ANTD_LOCALE } from './constants.js';
|
|
11
12
|
import Label from './Label.js';
|
|
12
13
|
import '@babel/runtime/helpers/slicedToArray';
|
|
13
14
|
import '@babel/runtime/helpers/classCallCheck';
|
|
@@ -21,6 +22,13 @@ import '@bigbinary/neeto-cist';
|
|
|
21
22
|
import 'qs';
|
|
22
23
|
import 'ramda';
|
|
23
24
|
import './en-ffa387d9.js';
|
|
25
|
+
import 'antd/locale/de_DE';
|
|
26
|
+
import 'antd/locale/en_US';
|
|
27
|
+
import 'antd/locale/es_ES';
|
|
28
|
+
import 'antd/locale/fr_FR';
|
|
29
|
+
import 'antd/locale/nl_NL';
|
|
30
|
+
import 'antd/locale/pl_PL';
|
|
31
|
+
import 'antd/locale/pt_PT';
|
|
24
32
|
import './Button.js';
|
|
25
33
|
import 'react-router-dom';
|
|
26
34
|
import 'framer-motion';
|
|
@@ -65,6 +73,7 @@ var TreeSelect = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
65
73
|
var SuffixIcon = suffixIcon !== null && suffixIcon !== void 0 ? suffixIcon : Down;
|
|
66
74
|
var SwitcherIcon = switcherIcon !== null && switcherIcon !== void 0 ? switcherIcon : Down;
|
|
67
75
|
return /*#__PURE__*/React__default.createElement(_ConfigProvider, {
|
|
76
|
+
locale: ANTD_LOCALE[i18n.language || "en"],
|
|
68
77
|
theme: {
|
|
69
78
|
token: _objectSpread({}, ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES),
|
|
70
79
|
components: {
|
package/dist/TreeSelect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeSelect.js","sources":["../src/components/TreeSelect.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { TreeSelect as AntdTreeSelect, ConfigProvider } from \"antd\";\nimport classnames from \"classnames\";\nimport { Down } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES, getLocale } from \"utils\";\n\nimport Label from \"./Label\";\n\nconst TreeSelect = forwardRef(\n (\n {\n allowClear,\n className,\n disabled = false,\n error,\n fieldNames,\n label = \"\",\n onChange,\n placeholder = \"\",\n required = false,\n showSearch = false,\n size = \"middle\",\n suffixIcon,\n switcherIcon,\n treeData,\n treeDataSimpleMode = true,\n value,\n ...otherProps\n },\n ref\n ) => {\n const { t, i18n } = useTranslation();\n const SuffixIcon = suffixIcon ?? Down;\n\n const SwitcherIcon = switcherIcon ?? Down;\n\n return (\n <ConfigProvider\n theme={{\n token: { ...ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES },\n components: {\n TreeSelect: {\n nodeHoverBg: \"rgb(var(--neeto-ui-gray-100))\",\n nodeSelectedBg: \"rgb(var(--neeto-ui-primary-500))\",\n\n // Global overrides\n colorBgElevated: \"rgb(var(--neeto-ui-white))\",\n },\n },\n }}\n >\n <div className=\"neeto-ui-input__wrapper\">\n {label && (\n <Label {...{ required }} data-testid=\"treeselect-label\">\n {label}\n </Label>\n )}\n <AntdTreeSelect\n {...{\n allowClear,\n disabled,\n fieldNames,\n onChange,\n placeholder,\n ref,\n showSearch,\n size,\n treeData,\n treeDataSimpleMode,\n }}\n data-cy=\"neeto-ui-tree-select-wrapper\"\n dropdownStyle={{ zIndex: 100000 }}\n popupClassName=\"neeto-ui-tree-select-dropdown\"\n suffixIcon={<SuffixIcon />}\n treeNodeFilterProp={fieldNames?.label ?? \"label\"}\n value={value || undefined}\n className={classnames(\"neeto-ui-tree-select__wrapper\", className, {\n \"neeto-ui-tree-select__error\": error,\n })}\n notFoundContent={\n // eslint-disable-next-line @bigbinary/neeto/hard-coded-strings-should-be-localized\n <div className=\"neeto-ui-text-center neeto-ui-p-1\">\n {getLocale(i18n, t, \"neetoui.treeSelect.noOptions\")}\n </div>\n }\n switcherIcon={props => (\n <div {...props}>\n <SwitcherIcon />\n </div>\n )}\n {...otherProps}\n />\n {error && (\n <p className=\"neeto-ui-input__error\" data-testid=\"treeselect-error\">\n {error}\n </p>\n )}\n </div>\n </ConfigProvider>\n );\n }\n);\n\nTreeSelect.displayName = \"TreeSelect\";\n\nTreeSelect.propTypes = {\n /**\n * Controls whether the value is allowed to be cleared or not.\n */\n allowClear: PropTypes.bool,\n /**\n * To specify additional classes.\n */\n className: PropTypes.string,\n /**\n * To disable the TreeSelect component.\n */\n disabled: PropTypes.bool,\n /**\n * To display the specified error.\n */\n error: PropTypes.string,\n /**\n * This prop can be used to override the default keys of label and value pairs in options.\n */\n fieldNames: PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n }),\n /**\n * To display a label above the TreeSelect component.\n */\n label: PropTypes.string,\n /**\n * The callback function that will be triggered when value changes.\n */\n onChange: PropTypes.func,\n /**\n * Callback function to be executed when search input changes that can be\n * used for advanced usecases. This is not necessary as basic search works\n * when `showSearch` is enabled.\n */\n onSearch: PropTypes.func,\n /**\n * The placeholder string to be displayed.\n */\n placeholder: PropTypes.string,\n /**\n * To specify whether TreeSelect field is required or not.\n */\n required: PropTypes.bool,\n /**\n * The search value to make search controlled. This is not required as basic search\n * works when `showSearch` is enabled.\n */\n searchValue: PropTypes.string,\n /**\n * To enable search for the TreeSelect component.\n */\n showSearch: PropTypes.bool,\n /**\n * To specify the size of the TreeSelect component.\n */\n size: PropTypes.oneOf([\"small\", \"middle\", \"large\"]),\n /**\n * To specify the icon at the end of the TreeSelect component.\n */\n suffixIcon: PropTypes.node,\n /**\n * To specify the icon next to options that have children.\n */\n switcherIcon: PropTypes.node,\n /**\n * The options to be passed to the TreeSelect component.\n */\n treeData: PropTypes.oneOfType([\n PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n disabled: PropTypes.bool,\n children: PropTypes.array,\n })\n ),\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n label: PropTypes.string,\n value: PropTypes.string,\n disabled: PropTypes.bool,\n pId: PropTypes.string,\n })\n ),\n ]),\n /**\n * This prop specifies the format of data that has to be passed in the `treeData` prop.\n * When enabled, treeData can be a flat array of the form `{ id, label, value, pId }`.\n */\n treeDataSimpleMode: PropTypes.bool,\n /**\n * The currently selected option.\n */\n value: PropTypes.string,\n};\n\nexport default TreeSelect;\n"],"names":["TreeSelect","forwardRef","_ref","ref","_fieldNames$label","allowClear","className","_ref$disabled","disabled","error","fieldNames","_ref$label","label","onChange","_ref$placeholder","placeholder","_ref$required","required","_ref$showSearch","showSearch","_ref$size","size","suffixIcon","switcherIcon","treeData","_ref$treeDataSimpleMo","treeDataSimpleMode","value","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","i18n","SuffixIcon","Down","SwitcherIcon","React","createElement","_ConfigProvider","theme","token","_objectSpread","ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES","components","nodeHoverBg","nodeSelectedBg","colorBgElevated","Label","_TreeSelect","_extends","dropdownStyle","zIndex","popupClassName","treeNodeFilterProp","undefined","classnames","notFoundContent","getLocale","props","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYMA,IAAAA,UAAU,gBAAGC,UA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ACET,UAAU,CACd,CAAA,EACDnB,KAAK,iBACJ6B,cAAA,CAAAC,aAAA,CAAA,GAAA,EAAA;AAAGjC,IAAAA,SAAS,EAAC,uBAAuB;IAAC,aAAY,EAAA,kBAAA;GAC9CG,EAAAA,KAAK,CAET,CACG,CACS,CAAA;AAErB,CAAC,EACF;AAEDT,UAAU,CAAC6D,WAAW,GAAG,YAAY;;;;"}
|
|
1
|
+
{"version":3,"file":"TreeSelect.js","sources":["../src/components/TreeSelect.jsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\n\nimport { TreeSelect as AntdTreeSelect, ConfigProvider } from \"antd\";\nimport classnames from \"classnames\";\nimport { Down } from \"neetoicons\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES, getLocale } from \"utils\";\n\nimport { ANTD_LOCALE } from \"./constants\";\nimport Label from \"./Label\";\n\nconst TreeSelect = forwardRef(\n (\n {\n allowClear,\n className,\n disabled = false,\n error,\n fieldNames,\n label = \"\",\n onChange,\n placeholder = \"\",\n required = false,\n showSearch = false,\n size = \"middle\",\n suffixIcon,\n switcherIcon,\n treeData,\n treeDataSimpleMode = true,\n value,\n ...otherProps\n },\n ref\n ) => {\n const { t, i18n } = useTranslation();\n const SuffixIcon = suffixIcon ?? Down;\n\n const SwitcherIcon = switcherIcon ?? Down;\n\n return (\n <ConfigProvider\n locale={ANTD_LOCALE[i18n.language || \"en\"]}\n theme={{\n token: { ...ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES },\n components: {\n TreeSelect: {\n nodeHoverBg: \"rgb(var(--neeto-ui-gray-100))\",\n nodeSelectedBg: \"rgb(var(--neeto-ui-primary-500))\",\n\n // Global overrides\n colorBgElevated: \"rgb(var(--neeto-ui-white))\",\n },\n },\n }}\n >\n <div className=\"neeto-ui-input__wrapper\">\n {label && (\n <Label {...{ required }} data-testid=\"treeselect-label\">\n {label}\n </Label>\n )}\n <AntdTreeSelect\n {...{\n allowClear,\n disabled,\n fieldNames,\n onChange,\n placeholder,\n ref,\n showSearch,\n size,\n treeData,\n treeDataSimpleMode,\n }}\n data-cy=\"neeto-ui-tree-select-wrapper\"\n dropdownStyle={{ zIndex: 100000 }}\n popupClassName=\"neeto-ui-tree-select-dropdown\"\n suffixIcon={<SuffixIcon />}\n treeNodeFilterProp={fieldNames?.label ?? \"label\"}\n value={value || undefined}\n className={classnames(\"neeto-ui-tree-select__wrapper\", className, {\n \"neeto-ui-tree-select__error\": error,\n })}\n notFoundContent={\n // eslint-disable-next-line @bigbinary/neeto/hard-coded-strings-should-be-localized\n <div className=\"neeto-ui-text-center neeto-ui-p-1\">\n {getLocale(i18n, t, \"neetoui.treeSelect.noOptions\")}\n </div>\n }\n switcherIcon={props => (\n <div {...props}>\n <SwitcherIcon />\n </div>\n )}\n {...otherProps}\n />\n {error && (\n <p className=\"neeto-ui-input__error\" data-testid=\"treeselect-error\">\n {error}\n </p>\n )}\n </div>\n </ConfigProvider>\n );\n }\n);\n\nTreeSelect.displayName = \"TreeSelect\";\n\nTreeSelect.propTypes = {\n /**\n * Controls whether the value is allowed to be cleared or not.\n */\n allowClear: PropTypes.bool,\n /**\n * To specify additional classes.\n */\n className: PropTypes.string,\n /**\n * To disable the TreeSelect component.\n */\n disabled: PropTypes.bool,\n /**\n * To display the specified error.\n */\n error: PropTypes.string,\n /**\n * This prop can be used to override the default keys of label and value pairs in options.\n */\n fieldNames: PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n }),\n /**\n * To display a label above the TreeSelect component.\n */\n label: PropTypes.string,\n /**\n * The callback function that will be triggered when value changes.\n */\n onChange: PropTypes.func,\n /**\n * Callback function to be executed when search input changes that can be\n * used for advanced usecases. This is not necessary as basic search works\n * when `showSearch` is enabled.\n */\n onSearch: PropTypes.func,\n /**\n * The placeholder string to be displayed.\n */\n placeholder: PropTypes.string,\n /**\n * To specify whether TreeSelect field is required or not.\n */\n required: PropTypes.bool,\n /**\n * The search value to make search controlled. This is not required as basic search\n * works when `showSearch` is enabled.\n */\n searchValue: PropTypes.string,\n /**\n * To enable search for the TreeSelect component.\n */\n showSearch: PropTypes.bool,\n /**\n * To specify the size of the TreeSelect component.\n */\n size: PropTypes.oneOf([\"small\", \"middle\", \"large\"]),\n /**\n * To specify the icon at the end of the TreeSelect component.\n */\n suffixIcon: PropTypes.node,\n /**\n * To specify the icon next to options that have children.\n */\n switcherIcon: PropTypes.node,\n /**\n * The options to be passed to the TreeSelect component.\n */\n treeData: PropTypes.oneOfType([\n PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n value: PropTypes.string,\n disabled: PropTypes.bool,\n children: PropTypes.array,\n })\n ),\n PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n label: PropTypes.string,\n value: PropTypes.string,\n disabled: PropTypes.bool,\n pId: PropTypes.string,\n })\n ),\n ]),\n /**\n * This prop specifies the format of data that has to be passed in the `treeData` prop.\n * When enabled, treeData can be a flat array of the form `{ id, label, value, pId }`.\n */\n treeDataSimpleMode: PropTypes.bool,\n /**\n * The currently selected option.\n */\n value: PropTypes.string,\n};\n\nexport default TreeSelect;\n"],"names":["TreeSelect","forwardRef","_ref","ref","_fieldNames$label","allowClear","className","_ref$disabled","disabled","error","fieldNames","_ref$label","label","onChange","_ref$placeholder","placeholder","_ref$required","required","_ref$showSearch","showSearch","_ref$size","size","suffixIcon","switcherIcon","treeData","_ref$treeDataSimpleMo","treeDataSimpleMode","value","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","i18n","SuffixIcon","Down","SwitcherIcon","React","createElement","_ConfigProvider","locale","ANTD_LOCALE","language","theme","token","_objectSpread","ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES","components","nodeHoverBg","nodeSelectedBg","colorBgElevated","Label","_TreeSelect","_extends","dropdownStyle","zIndex","popupClassName","treeNodeFilterProp","undefined","classnames","notFoundContent","getLocale","props","displayName"],"mappings":";;;;;;;;;;;;;;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,cAAA,CAAAC,aAAA,CAAA,KAAA,EAASwB,KAAK,eACZzB,cAAA,CAAAC,aAAA,CAACF,YAAY,EAAA,IAAA,CAAG,CACZ,CAAA;AAAA,KAAA;AACN,GAAA,EACET,UAAU,CACd,CAAA,EACDnB,KAAK,iBACJ6B,cAAA,CAAAC,aAAA,CAAA,GAAA,EAAA;AAAGjC,IAAAA,SAAS,EAAC,uBAAuB;IAAC,aAAY,EAAA,kBAAA;GAC9CG,EAAAA,KAAK,CAET,CACG,CACS,CAAA;AAErB,CAAC,EACF;AAEDT,UAAU,CAACgE,WAAW,GAAG,YAAY;;;;"}
|
package/dist/cjs/DatePicker.js
CHANGED
|
@@ -25,7 +25,7 @@ require('react-colorful');
|
|
|
25
25
|
require('./tinycolor-b1e9a7b2.js');
|
|
26
26
|
require('./Dropdown.js');
|
|
27
27
|
require('./index-7a8fe498.js');
|
|
28
|
-
var DatePicker = require('./index-
|
|
28
|
+
var DatePicker = require('./index-34eccc77.js');
|
|
29
29
|
require('./Input.js');
|
|
30
30
|
require('./Label.js');
|
|
31
31
|
require('./MultiEmailInput.js');
|
|
@@ -57,6 +57,14 @@ require('@babel/runtime/helpers/esm/defineProperty');
|
|
|
57
57
|
require('@babel/runtime/helpers/esm/toConsumableArray');
|
|
58
58
|
require('antd/lib/config-provider');
|
|
59
59
|
require('antd/lib/slider');
|
|
60
|
+
require('react-i18next');
|
|
61
|
+
require('antd/locale/de_DE');
|
|
62
|
+
require('antd/locale/en_US');
|
|
63
|
+
require('antd/locale/es_ES');
|
|
64
|
+
require('antd/locale/fr_FR');
|
|
65
|
+
require('antd/locale/nl_NL');
|
|
66
|
+
require('antd/locale/pl_PL');
|
|
67
|
+
require('antd/locale/pt_PT');
|
|
60
68
|
require('./Switch.js');
|
|
61
69
|
require('./Tab.js');
|
|
62
70
|
require('antd/lib/table');
|
|
@@ -64,9 +72,7 @@ require('react-drag-listview');
|
|
|
64
72
|
require('./HeaderCellMenu-1eb017e2.js');
|
|
65
73
|
require('react-resizable');
|
|
66
74
|
require('./Tag.js');
|
|
67
|
-
require('./TimePickerInput.js');
|
|
68
75
|
require('./Toastr.js');
|
|
69
|
-
require('react-i18next');
|
|
70
76
|
require('i18next');
|
|
71
77
|
require('antd/lib/tree');
|
|
72
78
|
require('./TreeSelect.js');
|
|
@@ -82,7 +88,7 @@ require('@babel/runtime/helpers/esm/objectWithoutPropertiesLoose');
|
|
|
82
88
|
require('@babel/runtime/helpers/esm/inheritsLoose');
|
|
83
89
|
require('./index-63580e68.js');
|
|
84
90
|
require('@babel/runtime/helpers/esm/assertThisInitialized');
|
|
85
|
-
require('
|
|
91
|
+
require('./constants.js');
|
|
86
92
|
require('@babel/runtime/helpers/toArray');
|
|
87
93
|
require('@babel/runtime/helpers/esm/classCallCheck');
|
|
88
94
|
require('@babel/runtime/helpers/esm/createClass');
|
|
@@ -90,8 +96,6 @@ require('@babel/runtime/helpers/esm/inherits');
|
|
|
90
96
|
require('@babel/runtime/helpers/esm/createSuper');
|
|
91
97
|
require('@babel/runtime/helpers/esm/taggedTemplateLiteral');
|
|
92
98
|
require('@babel/runtime/helpers/esm/typeof');
|
|
93
|
-
require('@wojtekmaj/react-timerange-picker');
|
|
94
|
-
require('react-time-picker');
|
|
95
99
|
require('react-toastify');
|
|
96
100
|
require('linkify-react');
|
|
97
101
|
require('antd/lib/tree-select');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/cjs/Slider.js
CHANGED
|
@@ -6,6 +6,8 @@ var _extends = require('@babel/runtime/helpers/extends');
|
|
|
6
6
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
7
7
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
8
8
|
var React = require('react');
|
|
9
|
+
var reactI18next = require('react-i18next');
|
|
10
|
+
var constants = require('./constants.js');
|
|
9
11
|
var Label = require('./Label.js');
|
|
10
12
|
var useId = require('./useId-4e3deb5c.js');
|
|
11
13
|
require('@babel/runtime/helpers/slicedToArray');
|
|
@@ -14,6 +16,13 @@ require('@bigbinary/neeto-hotkeys');
|
|
|
14
16
|
require('./overlayManager.js');
|
|
15
17
|
var index = require('./index-7a8fe498.js');
|
|
16
18
|
require('qs');
|
|
19
|
+
require('antd/locale/de_DE');
|
|
20
|
+
require('antd/locale/en_US');
|
|
21
|
+
require('antd/locale/es_ES');
|
|
22
|
+
require('antd/locale/fr_FR');
|
|
23
|
+
require('antd/locale/nl_NL');
|
|
24
|
+
require('antd/locale/pl_PL');
|
|
25
|
+
require('antd/locale/pt_PT');
|
|
17
26
|
require('classnames');
|
|
18
27
|
require('@bigbinary/neeto-icons');
|
|
19
28
|
require('./Button.js');
|
|
@@ -68,7 +77,10 @@ var Slider = function Slider(_ref) {
|
|
|
68
77
|
var id = useId.useId(otherProps.id);
|
|
69
78
|
var errorId = "error_".concat(id);
|
|
70
79
|
var helpTextId = "helpText_".concat(id);
|
|
80
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
81
|
+
i18n = _useTranslation.i18n;
|
|
71
82
|
return /*#__PURE__*/React__default["default"].createElement(_ConfigProvider__default["default"], {
|
|
83
|
+
locale: constants.ANTD_LOCALE[i18n.language || "en"],
|
|
72
84
|
theme: {
|
|
73
85
|
token: _objectSpread({}, index.ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES),
|
|
74
86
|
components: {
|
package/dist/cjs/Slider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sources":["../../src/components/Slider/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { Slider as AntdSlider, ConfigProvider } from \"antd\";\nimport PropTypes from \"prop-types\";\n\nimport Label from \"components/Label\";\nimport { useId } from \"hooks\";\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES, hyphenize, noop } from \"utils\";\n\nconst Slider = ({\n min = 0,\n max = 100,\n defaultValue = 0,\n onChange = noop,\n value = undefined,\n label,\n required = false,\n labelProps = {},\n error,\n helpText,\n ...otherProps\n}) => {\n const id = useId(otherProps.id);\n const errorId = `error_${id}`;\n const helpTextId = `helpText_${id}`;\n\n return (\n <ConfigProvider\n theme={{\n token: { ...ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES },\n components: {\n Slider: {\n dotActiveBorderColor: \"rgb(var(--neeto-ui-primary-500))\",\n dotBorderColor: \"rgb(var(--neeto-ui-gray-500))\",\n handleActiveColor: \"rgb(var(--neeto-ui-primary-600))\",\n handleColor: \"rgb(var(--neeto-ui-primary-500))\",\n railBg: \"rgb(var(--neeto-ui-gray-200))\",\n railHoverBg: \"rgb(var(--neeto-ui-gray-300))\",\n trackBg: \"rgb(var(--neeto-ui-primary-500))\",\n trackBgDisabled: \"rgb(var(--neeto-ui-gray-100))\",\n trackHoverBg: \"rgb(var(--neeto-ui-primary-600))\",\n\n // Global overrides\n colorFillContentHover: \"rgb(var(--neeto-ui-gray-600))\",\n },\n },\n }}\n >\n <div className=\"neeto-ui-input__wrapper\">\n <div className=\"neeto-ui-input__label-wrapper\">\n {label && (\n <Label\n {...{ required }}\n data-cy={`${hyphenize(label)}-slider-label`}\n htmlFor={id}\n {...labelProps}\n >\n {label}\n </Label>\n )}\n </div>\n <AntdSlider\n className=\"neeto-ui-w-full\"\n tooltip={{ formatter: null }}\n {...{ defaultValue, max, min, onChange, value, ...otherProps, id }}\n />\n {!!error && (\n <p\n className=\"neeto-ui-input__error\"\n data-cy={`${hyphenize(label)}-input-error`}\n id={errorId}\n >\n {error}\n </p>\n )}\n {helpText && (\n <p\n className=\"neeto-ui-input__help-text\"\n data-cy={`${hyphenize(label)}-input-help`}\n id={helpTextId}\n >\n {helpText}\n </p>\n )}\n </div>\n </ConfigProvider>\n );\n};\n\nSlider.propTypes = {\n /**\n * The minimum value the slider can slide to.\n */\n min: PropTypes.number,\n /**\n * The maximum value the slider can slide to.\n */\n max: PropTypes.number,\n /**\n * Callback function that is fired when the user changes the slider's value.\n */\n onChange: PropTypes.func,\n /**\n * The value of slider. When `range` is false, use number, otherwise, use [number, number]\n */\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.array]),\n /**\n * The value of slider. When `range` is false, use number, otherwise, use [number, number]\n *\n */\n defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.array]),\n};\n\nexport default Slider;\n"],"names":["Slider","_ref","_ref$min","min","_ref$max","max","_ref$defaultValue","defaultValue","_ref$onChange","onChange","noop","_ref$value","value","undefined","label","_ref$required","required","_ref$labelProps","labelProps","error","helpText","otherProps","_objectWithoutProperties","_excluded","id","useId","errorId","concat","helpTextId","React","createElement","_ConfigProvider","theme","token","_objectSpread","ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES","components","dotActiveBorderColor","dotBorderColor","handleActiveColor","handleColor","railBg","railHoverBg","trackBg","trackBgDisabled","trackHoverBg","colorFillContentHover","className","Label","_extends","hyphenize","htmlFor","_Slider","tooltip","formatter"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Slider.js","sources":["../../src/components/Slider/index.jsx"],"sourcesContent":["import React from \"react\";\n\nimport { Slider as AntdSlider, ConfigProvider } from \"antd\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { ANTD_LOCALE } from \"components/constants\";\nimport Label from \"components/Label\";\nimport { useId } from \"hooks\";\nimport { ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES, hyphenize, noop } from \"utils\";\n\nconst Slider = ({\n min = 0,\n max = 100,\n defaultValue = 0,\n onChange = noop,\n value = undefined,\n label,\n required = false,\n labelProps = {},\n error,\n helpText,\n ...otherProps\n}) => {\n const id = useId(otherProps.id);\n const errorId = `error_${id}`;\n const helpTextId = `helpText_${id}`;\n\n const { i18n } = useTranslation();\n\n return (\n <ConfigProvider\n locale={ANTD_LOCALE[i18n.language || \"en\"]}\n theme={{\n token: { ...ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES },\n components: {\n Slider: {\n dotActiveBorderColor: \"rgb(var(--neeto-ui-primary-500))\",\n dotBorderColor: \"rgb(var(--neeto-ui-gray-500))\",\n handleActiveColor: \"rgb(var(--neeto-ui-primary-600))\",\n handleColor: \"rgb(var(--neeto-ui-primary-500))\",\n railBg: \"rgb(var(--neeto-ui-gray-200))\",\n railHoverBg: \"rgb(var(--neeto-ui-gray-300))\",\n trackBg: \"rgb(var(--neeto-ui-primary-500))\",\n trackBgDisabled: \"rgb(var(--neeto-ui-gray-100))\",\n trackHoverBg: \"rgb(var(--neeto-ui-primary-600))\",\n\n // Global overrides\n colorFillContentHover: \"rgb(var(--neeto-ui-gray-600))\",\n },\n },\n }}\n >\n <div className=\"neeto-ui-input__wrapper\">\n <div className=\"neeto-ui-input__label-wrapper\">\n {label && (\n <Label\n {...{ required }}\n data-cy={`${hyphenize(label)}-slider-label`}\n htmlFor={id}\n {...labelProps}\n >\n {label}\n </Label>\n )}\n </div>\n <AntdSlider\n className=\"neeto-ui-w-full\"\n tooltip={{ formatter: null }}\n {...{ defaultValue, max, min, onChange, value, ...otherProps, id }}\n />\n {!!error && (\n <p\n className=\"neeto-ui-input__error\"\n data-cy={`${hyphenize(label)}-input-error`}\n id={errorId}\n >\n {error}\n </p>\n )}\n {helpText && (\n <p\n className=\"neeto-ui-input__help-text\"\n data-cy={`${hyphenize(label)}-input-help`}\n id={helpTextId}\n >\n {helpText}\n </p>\n )}\n </div>\n </ConfigProvider>\n );\n};\n\nSlider.propTypes = {\n /**\n * The minimum value the slider can slide to.\n */\n min: PropTypes.number,\n /**\n * The maximum value the slider can slide to.\n */\n max: PropTypes.number,\n /**\n * Callback function that is fired when the user changes the slider's value.\n */\n onChange: PropTypes.func,\n /**\n * The value of slider. When `range` is false, use number, otherwise, use [number, number]\n */\n value: PropTypes.oneOfType([PropTypes.number, PropTypes.array]),\n /**\n * The value of slider. When `range` is false, use number, otherwise, use [number, number]\n *\n */\n defaultValue: PropTypes.oneOfType([PropTypes.number, PropTypes.array]),\n};\n\nexport default Slider;\n"],"names":["Slider","_ref","_ref$min","min","_ref$max","max","_ref$defaultValue","defaultValue","_ref$onChange","onChange","noop","_ref$value","value","undefined","label","_ref$required","required","_ref$labelProps","labelProps","error","helpText","otherProps","_objectWithoutProperties","_excluded","id","useId","errorId","concat","helpTextId","_useTranslation","useTranslation","i18n","React","createElement","_ConfigProvider","locale","ANTD_LOCALE","language","theme","token","_objectSpread","ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES","components","dotActiveBorderColor","dotBorderColor","handleActiveColor","handleColor","railBg","railHoverBg","trackBg","trackBgDisabled","trackHoverBg","colorFillContentHover","className","Label","_extends","hyphenize","htmlFor","_Slider","tooltip","formatter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAYN;AAAA,EAAA,IAAAC,QAAA,GAAAD,IAAA,CAXJE,GAAG;AAAHA,IAAAA,GAAG,GAAAD,QAAA,KAAG,KAAA,CAAA,GAAA,CAAC,GAAAA,QAAA;IAAAE,QAAA,GAAAH,IAAA,CACPI,GAAG;AAAHA,IAAAA,GAAG,GAAAD,QAAA,KAAG,KAAA,CAAA,GAAA,GAAG,GAAAA,QAAA;IAAAE,iBAAA,GAAAL,IAAA,CACTM,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAG,KAAA,CAAA,GAAA,CAAC,GAAAA,iBAAA;IAAAE,aAAA,GAAAP,IAAA,CAChBQ,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAGE,KAAAA,CAAAA,GAAAA,UAAI,GAAAF,aAAA;I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G,IAAAA,EAAE,EAAFA,EAAAA;AAAE,GAAA,CAAA,CAAA,CAChE,EACD,CAAC,CAACL,KAAK,iBACNa,yBAAA,CAAAC,aAAA,CAAA,GAAA,EAAA;AACEoB,IAAAA,SAAS,EAAC,uBAAuB;AACjC,IAAA,SAAA,EAAA,EAAA,CAAA1B,MAAA,CAAY6B,eAAS,CAAC1C,KAAK,CAAC,EAAe,cAAA,CAAA;AAC3CU,IAAAA,EAAE,EAAEE,OAAAA;AAAQ,GAAA,EAEXP,KAAK,CAET,EACAC,QAAQ,iBACPY,yBAAA,CAAAC,aAAA,CAAA,GAAA,EAAA;AACEoB,IAAAA,SAAS,EAAC,2BAA2B;AACrC,IAAA,SAAA,EAAA,EAAA,CAAA1B,MAAA,CAAY6B,eAAS,CAAC1C,KAAK,CAAC,EAAc,aAAA,CAAA;AAC1CU,IAAAA,EAAE,EAAEI,UAAAA;GAEHR,EAAAA,QAAQ,CAEZ,CACG,CACS,CAAA;AAErB;;;;"}
|
package/dist/cjs/Table.js
CHANGED
|
@@ -12,7 +12,9 @@ var neetoCist = require('@bigbinary/neeto-cist');
|
|
|
12
12
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
13
13
|
var ramda = require('ramda');
|
|
14
14
|
var ReactDragListView = require('react-drag-listview');
|
|
15
|
+
var reactI18next = require('react-i18next');
|
|
15
16
|
var reactRouterDom = require('react-router-dom');
|
|
17
|
+
var constants = require('./constants.js');
|
|
16
18
|
require('@bigbinary/neeto-hotkeys');
|
|
17
19
|
require('./overlayManager.js');
|
|
18
20
|
var index = require('./index-7a8fe498.js');
|
|
@@ -23,6 +25,13 @@ var Typography = require('./Typography.js');
|
|
|
23
25
|
var HeaderCellMenu = require('./HeaderCellMenu-1eb017e2.js');
|
|
24
26
|
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
25
27
|
var reactResizable = require('react-resizable');
|
|
28
|
+
require('antd/locale/de_DE');
|
|
29
|
+
require('antd/locale/en_US');
|
|
30
|
+
require('antd/locale/es_ES');
|
|
31
|
+
require('antd/locale/fr_FR');
|
|
32
|
+
require('antd/locale/nl_NL');
|
|
33
|
+
require('antd/locale/pl_PL');
|
|
34
|
+
require('antd/locale/pt_PT');
|
|
26
35
|
require('@babel/runtime/helpers/classCallCheck');
|
|
27
36
|
require('@babel/runtime/helpers/createClass');
|
|
28
37
|
require('dayjs');
|
|
@@ -36,7 +45,6 @@ require('framer-motion');
|
|
|
36
45
|
require('./Tooltip.js');
|
|
37
46
|
require('@tippyjs/react');
|
|
38
47
|
require('tippy.js');
|
|
39
|
-
require('react-i18next');
|
|
40
48
|
require('./Dropdown.js');
|
|
41
49
|
require('./Popover.js');
|
|
42
50
|
|
|
@@ -501,6 +509,8 @@ var Table = function Table(_ref) {
|
|
|
501
509
|
onMoreActionClick = _ref.onMoreActionClick,
|
|
502
510
|
bulkSelectAllRowsProps = _ref.bulkSelectAllRowsProps,
|
|
503
511
|
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
512
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
513
|
+
i18n = _useTranslation.i18n;
|
|
504
514
|
var _useState = React.useState(null),
|
|
505
515
|
_useState2 = _slicedToArray__default["default"](_useState, 2),
|
|
506
516
|
containerHeight = _useState2[0],
|
|
@@ -678,6 +688,7 @@ var Table = function Table(_ref) {
|
|
|
678
688
|
var neetoUIFontBold = parseInt(getComputedStyle(document.documentElement).getPropertyValue("--neeto-ui-font-bold"), 10);
|
|
679
689
|
var renderTable = function renderTable() {
|
|
680
690
|
return /*#__PURE__*/React__default["default"].createElement(_ConfigProvider__default["default"], {
|
|
691
|
+
locale: constants.ANTD_LOCALE[i18n.language || "en"],
|
|
681
692
|
theme: {
|
|
682
693
|
token: _objectSpread({}, index.ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES),
|
|
683
694
|
components: {
|