@synerise/ds-factors 1.3.1 → 1.3.2
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/CHANGELOG.md +775 -2403
- package/dist/FactorTypeSelector/FactorTypeSelector.d.ts +1 -1
- package/dist/FactorTypeSelector/FactorTypeSelector.js +6 -4
- package/dist/FactorValue/Array/Array.d.ts +1 -1
- package/dist/FactorValue/Array/Array.js +5 -3
- package/dist/FactorValue/Array/Array.styles.js +2 -2
- package/dist/FactorValue/Array/Array.types.d.ts +1 -1
- package/dist/FactorValue/Array/Array.utils.d.ts +1 -1
- package/dist/FactorValue/Array/components/ArrayCollector.d.ts +1 -1
- package/dist/FactorValue/Array/components/ArrayCollector.js +1 -1
- package/dist/FactorValue/Array/components/ArrayCreator.js +1 -1
- package/dist/FactorValue/Array/components/ArrayLimit.d.ts +1 -1
- package/dist/FactorValue/Array/components/ArrayModal.d.ts +1 -1
- package/dist/FactorValue/Array/components/ArrayModal.js +3 -4
- package/dist/FactorValue/Array/components/ArrayRaw.d.ts +1 -1
- package/dist/FactorValue/Array/components/ArrayRaw.js +1 -1
- package/dist/FactorValue/Array/components/CopyButton.d.ts +1 -1
- package/dist/FactorValue/Array/components/CopyButton.js +2 -2
- package/dist/FactorValue/Array/hooks/useCollector.d.ts +1 -1
- package/dist/FactorValue/Array/hooks/useCollector.js +1 -1
- package/dist/FactorValue/Date/Date.d.ts +1 -1
- package/dist/FactorValue/Date/Date.js +1 -1
- package/dist/FactorValue/DateRange/DateRange.d.ts +1 -1
- package/dist/FactorValue/DateRange/DateRange.js +1 -1
- package/dist/FactorValue/DynamicKey/DynamicKey.d.ts +1 -1
- package/dist/FactorValue/DynamicKey/DynamicKey.style.js +0 -2
- package/dist/FactorValue/FactorValue.d.ts +1 -1
- package/dist/FactorValue/FactorValue.style.js +0 -1
- package/dist/FactorValue/Formula/Formula.d.ts +1 -1
- package/dist/FactorValue/Formula/Formula.js +3 -3
- package/dist/FactorValue/Formula/Formula.styles.js +0 -2
- package/dist/FactorValue/Formula/FormulaModal.d.ts +1 -1
- package/dist/FactorValue/Formula/FormulaModal.js +1 -1
- package/dist/FactorValue/Number/NumberInput.d.ts +1 -1
- package/dist/FactorValue/Parameter/Parameter.constants.d.ts +1 -1
- package/dist/FactorValue/Parameter/Parameter.d.ts +1 -1
- package/dist/FactorValue/Parameter/Parameter.js +7 -7
- package/dist/FactorValue/Parameter/Parameter.style.d.ts +1 -1
- package/dist/FactorValue/Parameter/Parameter.style.js +3 -1
- package/dist/FactorValue/Parameter/Parameter.types.d.ts +2 -2
- package/dist/FactorValue/Parameter/ParameterDropdown.d.ts +1 -1
- package/dist/FactorValue/Parameter/ParameterDropdown.js +11 -11
- package/dist/FactorValue/Parameter/ParameterDropdownItem.d.ts +2 -2
- package/dist/FactorValue/Parameter/useGroups.d.ts +1 -1
- package/dist/FactorValue/Parameter/utils.d.ts +3 -3
- package/dist/FactorValue/RelativeDate/RelativeDate.const.d.ts +1 -1
- package/dist/FactorValue/RelativeDate/RelativeDate.d.ts +1 -1
- package/dist/FactorValue/RelativeDate/RelativeDate.js +8 -6
- package/dist/FactorValue/RelativeDate/RelativeDateDropdown.d.ts +1 -1
- package/dist/FactorValue/RelativeDate/RelativeDateDropdown.js +2 -2
- package/dist/FactorValue/RelativeDate/RelativeDateDropdown.styles.js +2 -2
- package/dist/FactorValue/Text/Text.d.ts +1 -1
- package/dist/FactorValue/Text/Text.js +2 -2
- package/dist/FactorValue/Text/Text.styles.js +0 -2
- package/dist/FactorValue/Text/TextModal.d.ts +1 -1
- package/dist/FactorValue/Text/TextModal.js +3 -2
- package/dist/Factors.d.ts +1 -1
- package/dist/Factors.js +7 -8
- package/dist/Factors.types.d.ts +7 -7
- package/dist/hooks/useTexts.d.ts +1 -1
- package/dist/hooks/useTexts.js +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +5 -1
- package/dist/style/Factors.style.js +1 -1
- package/package.json +30 -30
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import ModalProxy from '@synerise/ds-modal';
|
|
3
2
|
import Textarea from '@synerise/ds-input/dist/Textarea/Textarea';
|
|
3
|
+
import ModalProxy from '@synerise/ds-modal';
|
|
4
4
|
var TextModal = function TextModal(_ref) {
|
|
5
5
|
var value = _ref.value,
|
|
6
6
|
onApply = _ref.onApply,
|
|
7
7
|
onCancel = _ref.onCancel,
|
|
8
8
|
visible = _ref.visible,
|
|
9
9
|
texts = _ref.texts;
|
|
10
|
-
|
|
10
|
+
// const [expandValue, setExpandValue] = React.useState('' || value); // TESTME
|
|
11
|
+
var _React$useState = React.useState(value),
|
|
11
12
|
expandValue = _React$useState[0],
|
|
12
13
|
setExpandValue = _React$useState[1];
|
|
13
14
|
React.useEffect(function () {
|
package/dist/Factors.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { DefinedFactorTypes, FactorsProps, SelectedFactorType } from './Factors.types';
|
|
2
|
+
import { type DefinedFactorTypes, type FactorsProps, type SelectedFactorType } from './Factors.types';
|
|
3
3
|
export declare const FACTOR_TYPE_MAPPING: Record<DefinedFactorTypes, SelectedFactorType>;
|
|
4
4
|
declare const Factors: ({ selectedFactorType, setSelectedFactorType, onChangeValue, onParamsClick, value, defaultFactorType, textType, unavailableFactorTypes, availableFactorTypes, parameters, autocompleteText, allowClear, withoutTypeSelector, texts, formulaEditor, opened, loading, factorKey, preventAutoloadData, onActivate, onDeactivate, getPopupContainerOverride, customFactorValueComponents, error, inputProps, arrayProps, readOnly, getMenuEntryProps, }: FactorsProps) => React.JSX.Element;
|
|
5
5
|
export default Factors;
|
package/dist/Factors.js
CHANGED
|
@@ -2,19 +2,19 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
2
2
|
import React, { useMemo } from 'react';
|
|
3
3
|
import { BookM, Calendar2M, CalendarSwitchM, DynamicKeyM, FormulaM, HashM, ListM, ShowM, TextM } from '@synerise/ds-icon';
|
|
4
4
|
import { NOOP } from '@synerise/ds-utils';
|
|
5
|
-
import * as S from './style/Factors.style';
|
|
6
5
|
import FactorTypeSelector from './FactorTypeSelector/FactorTypeSelector';
|
|
7
|
-
import
|
|
8
|
-
import DynamicKey from './FactorValue/DynamicKey/DynamicKey';
|
|
6
|
+
import { Array } from './FactorValue/Array/Array';
|
|
9
7
|
import DateInput from './FactorValue/Date/Date';
|
|
8
|
+
import DateRangeInput from './FactorValue/DateRange/DateRange';
|
|
9
|
+
import DynamicKey from './FactorValue/DynamicKey/DynamicKey';
|
|
10
|
+
import FactorValue from './FactorValue/FactorValue';
|
|
10
11
|
import FormulaInput from './FactorValue/Formula/Formula';
|
|
11
|
-
import TextInput from './FactorValue/Text/Text';
|
|
12
|
-
import ParameterInput from './FactorValue/Parameter/Parameter';
|
|
13
12
|
import NumberInput from './FactorValue/Number/NumberInput';
|
|
14
|
-
import
|
|
13
|
+
import ParameterInput from './FactorValue/Parameter/Parameter';
|
|
15
14
|
import RelativeDateInput from './FactorValue/RelativeDate/RelativeDate';
|
|
15
|
+
import TextInput from './FactorValue/Text/Text';
|
|
16
16
|
import { useTexts } from './hooks/useTexts';
|
|
17
|
-
import
|
|
17
|
+
import * as S from './style/Factors.style';
|
|
18
18
|
export var FACTOR_TYPE_MAPPING = {
|
|
19
19
|
text: {
|
|
20
20
|
icon: /*#__PURE__*/React.createElement(TextM, null),
|
|
@@ -114,7 +114,6 @@ var Factors = function Factors(_ref) {
|
|
|
114
114
|
}).reduce(function (result, _ref3) {
|
|
115
115
|
var type = _ref3[0],
|
|
116
116
|
factorTypeData = _ref3[1];
|
|
117
|
-
// eslint-disable-next-line no-param-reassign
|
|
118
117
|
result[type] = factorTypeData;
|
|
119
118
|
return result;
|
|
120
119
|
}, {});
|
package/dist/Factors.types.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentType, ReactNode, ReactText } from 'react';
|
|
2
2
|
import type { CollectorValue } from '@synerise/ds-collector';
|
|
3
|
+
import type { Texts as DateRangeTexts } from '@synerise/ds-date-range-picker/dist/DateRangePicker.types';
|
|
3
4
|
import type { DateFilter, RelativeUnits } from '@synerise/ds-date-range-picker/dist/date.types';
|
|
4
|
-
import type { DateRangePickerTexts as DateRangeTexts } from '@synerise/ds-date-range-picker';
|
|
5
|
-
import type { MenuItemProps } from '@synerise/ds-menu';
|
|
6
|
-
import type { AutoResizeProp, InputProps } from '@synerise/ds-input';
|
|
7
5
|
import type { InformationCardProps } from '@synerise/ds-information-card';
|
|
6
|
+
import type { AutoResizeProp, InputProps } from '@synerise/ds-input';
|
|
8
7
|
import type { ListItemProps } from '@synerise/ds-list-item';
|
|
9
|
-
import type {
|
|
8
|
+
import type { MenuItemProps } from '@synerise/ds-menu';
|
|
9
|
+
import type { DeepPartial, LiteralStringUnion } from '@synerise/ds-utils';
|
|
10
10
|
import type { ArrayValueElement } from './FactorValue/Array/Array.types';
|
|
11
11
|
export declare const ALL_FACTOR_TYPES: readonly ["text", "number", "parameter", "contextParameter", "dynamicKey", "formula", "array", "date", "relativeDate", "dateRange"];
|
|
12
|
-
export type FactorType = LiteralStringUnion<typeof ALL_FACTOR_TYPES[number]>;
|
|
13
|
-
export type DefinedFactorTypes = typeof ALL_FACTOR_TYPES[number];
|
|
12
|
+
export type FactorType = LiteralStringUnion<(typeof ALL_FACTOR_TYPES)[number]>;
|
|
13
|
+
export type DefinedFactorTypes = (typeof ALL_FACTOR_TYPES)[number];
|
|
14
14
|
export type RelativeDateUnit = Exclude<RelativeUnits, 'SINCE'>;
|
|
15
15
|
export type RelativeTimeRelation = 'BEFORE' | 'AFTER';
|
|
16
16
|
export type RelativeDateValueType = {
|
package/dist/hooks/useTexts.d.ts
CHANGED
package/dist/hooks/useTexts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { merge } from 'lodash';
|
|
1
2
|
import { useMemo } from 'react';
|
|
2
3
|
import { useIntl } from 'react-intl';
|
|
3
|
-
import { merge } from 'lodash';
|
|
4
4
|
import { utils as dateRangePickerUtils } from '@synerise/ds-date-range-picker';
|
|
5
5
|
export var useTexts = function useTexts(defaultTexts) {
|
|
6
6
|
var intl = useIntl();
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { default, FACTOR_TYPE_MAPPING as factorTypes } from './Factors';
|
|
2
|
-
export { ALL_FACTOR_TYPES
|
|
3
|
-
export type { FactorType, DefinedFactorTypes, FactorsProps, FactorsTexts, ParameterValueType, ParameterItem, ParameterGroup, FactorValueComponentProps,
|
|
2
|
+
export { ALL_FACTOR_TYPES, type FactorType, type DefinedFactorTypes, type FactorsProps, type FactorsTexts, type ParameterValueType, type ParameterItem, type ParameterGroup, type FactorValueComponentProps,
|
|
4
3
|
/**
|
|
5
4
|
* @deprecated, use FactorValueComponentProps type instead
|
|
6
5
|
*/
|
|
7
|
-
FactorValueComponentProps as InputProps, FactorValueType, FactorValueProps, DynamicKeyValueType, FormulaValueType, FactorTypeSelectorProps, FormulaModalProps, TextModalProps, ParameterDropdownProps, SelectedFactorType, } from './Factors.types';
|
|
6
|
+
type FactorValueComponentProps as InputProps, type FactorValueType, type FactorValueProps, type DynamicKeyValueType, type FormulaValueType, type FactorTypeSelectorProps, type FormulaModalProps, type TextModalProps, type ParameterDropdownProps, type SelectedFactorType, } from './Factors.types';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { InputGroup } from '@synerise/ds-input';
|
|
3
3
|
import { OuterWrapper } from '@synerise/ds-input/dist/Input.styles';
|
|
4
|
-
import {
|
|
4
|
+
import { InputGroupItem, InputGroupWrapper } from '@synerise/ds-input/dist/InputGroup.styles';
|
|
5
5
|
import { FactorInput } from '../FactorValue/FactorValue.style';
|
|
6
6
|
export var Group = styled(InputGroup).withConfig({
|
|
7
7
|
displayName: "Factorsstyle__Group",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-factors",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Factors UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,34 +34,34 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-alert": "^1.1.
|
|
38
|
-
"@synerise/ds-autocomplete": "^1.1.
|
|
39
|
-
"@synerise/ds-badge": "^1.0.
|
|
40
|
-
"@synerise/ds-button": "^1.4.
|
|
41
|
-
"@synerise/ds-button-group": "^1.1.
|
|
42
|
-
"@synerise/ds-collector": "^1.2.
|
|
43
|
-
"@synerise/ds-date-picker": "^1.1.
|
|
44
|
-
"@synerise/ds-date-range-picker": "^1.3.
|
|
45
|
-
"@synerise/ds-divider": "^1.0.
|
|
46
|
-
"@synerise/ds-dropdown": "^1.0.
|
|
47
|
-
"@synerise/ds-empty-states": "^1.0.
|
|
48
|
-
"@synerise/ds-icon": "^1.5.
|
|
49
|
-
"@synerise/ds-information-card": "^1.0.
|
|
50
|
-
"@synerise/ds-inline-edit": "^1.0.
|
|
51
|
-
"@synerise/ds-input": "^1.3.
|
|
52
|
-
"@synerise/ds-input-number": "^1.2.
|
|
53
|
-
"@synerise/ds-list-item": "^1.0.
|
|
54
|
-
"@synerise/ds-menu": "^1.0.
|
|
55
|
-
"@synerise/ds-modal": "^1.2.
|
|
56
|
-
"@synerise/ds-result": "^1.0.
|
|
57
|
-
"@synerise/ds-scrollbar": "^1.1.
|
|
58
|
-
"@synerise/ds-search": "^1.2.
|
|
59
|
-
"@synerise/ds-select": "^1.1.
|
|
60
|
-
"@synerise/ds-skeleton": "^1.0.
|
|
61
|
-
"@synerise/ds-tabs": "^1.0.
|
|
62
|
-
"@synerise/ds-tag": "^1.1.
|
|
63
|
-
"@synerise/ds-tooltip": "^1.1.
|
|
64
|
-
"@synerise/ds-utils": "^1.3.
|
|
37
|
+
"@synerise/ds-alert": "^1.1.7",
|
|
38
|
+
"@synerise/ds-autocomplete": "^1.1.9",
|
|
39
|
+
"@synerise/ds-badge": "^1.0.13",
|
|
40
|
+
"@synerise/ds-button": "^1.4.2",
|
|
41
|
+
"@synerise/ds-button-group": "^1.1.6",
|
|
42
|
+
"@synerise/ds-collector": "^1.2.2",
|
|
43
|
+
"@synerise/ds-date-picker": "^1.1.11",
|
|
44
|
+
"@synerise/ds-date-range-picker": "^1.3.10",
|
|
45
|
+
"@synerise/ds-divider": "^1.0.13",
|
|
46
|
+
"@synerise/ds-dropdown": "^1.0.15",
|
|
47
|
+
"@synerise/ds-empty-states": "^1.0.12",
|
|
48
|
+
"@synerise/ds-icon": "^1.5.4",
|
|
49
|
+
"@synerise/ds-information-card": "^1.0.18",
|
|
50
|
+
"@synerise/ds-inline-edit": "^1.0.17",
|
|
51
|
+
"@synerise/ds-input": "^1.3.2",
|
|
52
|
+
"@synerise/ds-input-number": "^1.2.3",
|
|
53
|
+
"@synerise/ds-list-item": "^1.0.13",
|
|
54
|
+
"@synerise/ds-menu": "^1.0.14",
|
|
55
|
+
"@synerise/ds-modal": "^1.2.2",
|
|
56
|
+
"@synerise/ds-result": "^1.0.14",
|
|
57
|
+
"@synerise/ds-scrollbar": "^1.1.2",
|
|
58
|
+
"@synerise/ds-search": "^1.2.2",
|
|
59
|
+
"@synerise/ds-select": "^1.1.8",
|
|
60
|
+
"@synerise/ds-skeleton": "^1.0.14",
|
|
61
|
+
"@synerise/ds-tabs": "^1.0.16",
|
|
62
|
+
"@synerise/ds-tag": "^1.1.12",
|
|
63
|
+
"@synerise/ds-tooltip": "^1.1.12",
|
|
64
|
+
"@synerise/ds-utils": "^1.3.1",
|
|
65
65
|
"copy-to-clipboard": "^3.3.3",
|
|
66
66
|
"lodash": "^4.17.21",
|
|
67
67
|
"react-window": "^1.8.5",
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"react-intl": ">=3.12.0 <= 6.8",
|
|
75
75
|
"styled-components": "^5.3.3"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "4512641033ba3581a3df208143c547fcfed45895"
|
|
78
78
|
}
|