@synerise/ds-factors 0.27.0 → 0.27.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 +20 -0
- package/dist/FactorValue/DynamicKey/DynamicKey.js +7 -3
- package/dist/FactorValue/Parameter/Parameter.js +8 -4
- package/dist/FactorValue/Parameter/ParameterDropdown.js +8 -4
- package/dist/FactorValue/Parameter/ParameterDropdownItem.js +1 -1
- package/dist/FactorValue/Parameter/useGroups.js +7 -3
- package/dist/FactorValue/Text/Text.js +1 -1
- package/dist/Factors.js +4 -353
- package/dist/Factors.types.d.ts +6 -5
- package/dist/hooks/useTexts.d.ts +3 -0
- package/dist/hooks/useTexts.js +131 -0
- package/dist/index.d.ts +1 -1
- package/package.json +23 -23
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.27.2](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@0.27.1...@synerise/ds-factors@0.27.2) (2024-11-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **core:** onError fn types ([c34bdfe](https://github.com/Synerise/synerise-design/commit/c34bdfe9da898d7999c605f9fbcbba4716dfb6d4))
|
|
12
|
+
* **factors:** deep merge of default and prop texts ([787b436](https://github.com/Synerise/synerise-design/commit/787b4367213922eca21292a0a933c7ff5c241dd9))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [0.27.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@0.27.0...@synerise/ds-factors@0.27.1) (2024-11-12)
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @synerise/ds-factors
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
6
26
|
# [0.27.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-factors@0.26.5...@synerise/ds-factors@0.27.0) (2024-11-12)
|
|
7
27
|
|
|
8
28
|
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
2
|
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
4
|
|
|
5
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
8
|
+
|
|
9
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
10
|
|
|
7
11
|
import React from 'react';
|
|
8
12
|
import { RawInput } from '@synerise/ds-input';
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
var _excluded = ["buttonIcon", "buttonLabel", "selectedButtonColored", "dropdownDimensionsConfig"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
6
|
|
|
7
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
8
|
|
|
9
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
10
|
+
|
|
11
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
12
|
+
|
|
13
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
10
14
|
|
|
11
15
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
16
|
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
4
|
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
|
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
8
|
+
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
10
|
+
|
|
11
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
8
12
|
|
|
9
13
|
import React, { useRef, useState, useMemo, useCallback, useEffect } from 'react';
|
|
10
14
|
import { v4 as uuid } from 'uuid';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var _excluded = ["id", "icon"];
|
|
2
2
|
|
|
3
|
-
function _extends() { _extends = Object.assign
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
6
6
|
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
1
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2
2
|
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
4
|
|
|
5
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
8
|
+
|
|
9
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
10
|
|
|
7
11
|
import { useMemo } from 'react';
|
|
8
12
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
1
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
2
|
|
|
3
3
|
import React, { useCallback, useEffect, useMemo, useState, useRef } from 'react';
|
|
4
4
|
import { debounce } from 'lodash';
|
package/dist/Factors.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
2
|
-
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
4
|
-
|
|
5
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
-
|
|
7
1
|
import React, { useMemo } from 'react';
|
|
8
|
-
import { useIntl } from 'react-intl';
|
|
9
2
|
import { BookM, Calendar2M, DynamicKeyM, FormulaM, HashM, ListM, ShowM, TextM } from '@synerise/ds-icon';
|
|
10
3
|
import * as S from './style/Factors.style';
|
|
11
4
|
import FactorTypeSelector from './FactorTypeSelector/FactorTypeSelector';
|
|
@@ -17,6 +10,7 @@ import TextInput from './FactorValue/Text/Text';
|
|
|
17
10
|
import ParameterInput from './FactorValue/Parameter/Parameter';
|
|
18
11
|
import NumberInput from './FactorValue/Number/NumberInput';
|
|
19
12
|
import DateRangeInput from './FactorValue/DateRange/DateRange';
|
|
13
|
+
import { useTexts } from './hooks/useTexts';
|
|
20
14
|
export var factorTypes = {
|
|
21
15
|
text: {
|
|
22
16
|
icon: /*#__PURE__*/React.createElement(TextM, null),
|
|
@@ -99,350 +93,7 @@ var Factors = function Factors(_ref) {
|
|
|
99
93
|
inputProps = _ref.inputProps,
|
|
100
94
|
readOnly = _ref.readOnly,
|
|
101
95
|
getMenuEntryProps = _ref.getMenuEntryProps;
|
|
102
|
-
|
|
103
|
-
var _useIntl = useIntl(),
|
|
104
|
-
formatMessage = _useIntl.formatMessage;
|
|
105
|
-
|
|
106
|
-
var text = useMemo(function () {
|
|
107
|
-
return _objectSpread({
|
|
108
|
-
dateRangePicker: {
|
|
109
|
-
after: formatMessage({
|
|
110
|
-
id: "DS.DATE-RANGE-PICKER.AFTER",
|
|
111
|
-
defaultMessage: 'after'
|
|
112
|
-
}),
|
|
113
|
-
allTime: formatMessage({
|
|
114
|
-
id: "DS.DATE-RANGE-PICKER.ALL-TIME",
|
|
115
|
-
defaultMessage: 'Lifetime'
|
|
116
|
-
}),
|
|
117
|
-
apply: formatMessage({
|
|
118
|
-
id: "DS.DATE-RANGE-PICKER.APPLY",
|
|
119
|
-
defaultMessage: 'Apply'
|
|
120
|
-
}),
|
|
121
|
-
before: formatMessage({
|
|
122
|
-
id: "DS.DATE-RANGE-PICKER.BEFORE",
|
|
123
|
-
defaultMessage: 'before'
|
|
124
|
-
}),
|
|
125
|
-
clear: formatMessage({
|
|
126
|
-
id: "DS.DATE-RANGE-PICKER.CLEAR",
|
|
127
|
-
defaultMessage: 'Clear'
|
|
128
|
-
}),
|
|
129
|
-
clearRange: formatMessage({
|
|
130
|
-
id: "DS.DATE-RANGE-PICKER.CLEAR-RANGE",
|
|
131
|
-
defaultMessage: ' Clear range'
|
|
132
|
-
}),
|
|
133
|
-
copyRange: formatMessage({
|
|
134
|
-
id: "DS.DATE-RANGE-PICKER.COPY-RANGE",
|
|
135
|
-
defaultMessage: 'Copy range'
|
|
136
|
-
}),
|
|
137
|
-
custom: formatMessage({
|
|
138
|
-
id: "DS.DATE-RANGE-PICKER.CUSTOM",
|
|
139
|
-
defaultMessage: 'Custom'
|
|
140
|
-
}),
|
|
141
|
-
days: formatMessage({
|
|
142
|
-
id: "DS.DATE-RANGE-PICKER.DAYS",
|
|
143
|
-
defaultMessage: 'Days'
|
|
144
|
-
}),
|
|
145
|
-
emptyDateError: formatMessage({
|
|
146
|
-
id: "DS.DATE-RANGE-PICKER.EMPTY-DATE-ERROR",
|
|
147
|
-
defaultMessage: 'Date cannot be empty'
|
|
148
|
-
}),
|
|
149
|
-
endDate: formatMessage({
|
|
150
|
-
id: "DS.DATE-RANGE-PICKER.END-DATE",
|
|
151
|
-
defaultMessage: 'End date'
|
|
152
|
-
}),
|
|
153
|
-
endDatePlaceholder: formatMessage({
|
|
154
|
-
id: "DS.DATE-RANGE-PICKER.END-DATE-PLACEHOLDER",
|
|
155
|
-
defaultMessage: 'End date'
|
|
156
|
-
}),
|
|
157
|
-
filter: formatMessage({
|
|
158
|
-
id: "DS.DATE-RANGE-PICKER.FILTER",
|
|
159
|
-
defaultMessage: 'Date filter'
|
|
160
|
-
}),
|
|
161
|
-
hours: formatMessage({
|
|
162
|
-
id: "DS.DATE-RANGE-PICKER.HOURS",
|
|
163
|
-
defaultMessage: 'Hours'
|
|
164
|
-
}),
|
|
165
|
-
last3Months: formatMessage({
|
|
166
|
-
id: "DS.DATE-RANGE-PICKER.LAST-3-MONTHS",
|
|
167
|
-
defaultMessage: 'Last 3 months'
|
|
168
|
-
}),
|
|
169
|
-
last6Months: formatMessage({
|
|
170
|
-
id: "DS.DATE-RANGE-PICKER.LAST-6-MONTHS",
|
|
171
|
-
defaultMessage: 'Last 6 months'
|
|
172
|
-
}),
|
|
173
|
-
last7Days: formatMessage({
|
|
174
|
-
id: "DS.DATE-RANGE-PICKER.LAST-7-DAYS",
|
|
175
|
-
defaultMessage: 'Last 7 days'
|
|
176
|
-
}),
|
|
177
|
-
last: formatMessage({
|
|
178
|
-
id: "DS.DATE-RANGE-PICKER.LAST",
|
|
179
|
-
defaultMessage: 'Last'
|
|
180
|
-
}),
|
|
181
|
-
lastMonth: formatMessage({
|
|
182
|
-
id: "DS.DATE-RANGE-PICKER.LAST-MONTH",
|
|
183
|
-
defaultMessage: 'Last month'
|
|
184
|
-
}),
|
|
185
|
-
lastWeek: formatMessage({
|
|
186
|
-
id: "DS.DATE-RANGE-PICKER.LAST-WEEK",
|
|
187
|
-
defaultMessage: 'Last week'
|
|
188
|
-
}),
|
|
189
|
-
lastYear: formatMessage({
|
|
190
|
-
id: "DS.DATE-RANGE-PICKER.LAST-YEAR",
|
|
191
|
-
defaultMessage: 'Last year'
|
|
192
|
-
}),
|
|
193
|
-
minutes: formatMessage({
|
|
194
|
-
id: "DS.DATE-RANGE-PICKER.MINUTES",
|
|
195
|
-
defaultMessage: 'Minutes'
|
|
196
|
-
}),
|
|
197
|
-
months: formatMessage({
|
|
198
|
-
id: "DS.DATE-RANGE-PICKER.MONTHS",
|
|
199
|
-
defaultMessage: 'Months'
|
|
200
|
-
}),
|
|
201
|
-
more: formatMessage({
|
|
202
|
-
id: "DS.DATE-RANGE-PICKER.MORE",
|
|
203
|
-
defaultMessage: 'More'
|
|
204
|
-
}),
|
|
205
|
-
next3Months: formatMessage({
|
|
206
|
-
id: "DS.DATE-RANGE-PICKER.NEXT-3-MONTHS",
|
|
207
|
-
defaultMessage: 'Next 3 months'
|
|
208
|
-
}),
|
|
209
|
-
next6Months: formatMessage({
|
|
210
|
-
id: "DS.DATE-RANGE-PICKER.NEXT-6-MONTHS",
|
|
211
|
-
defaultMessage: 'Next 6 months'
|
|
212
|
-
}),
|
|
213
|
-
next7Days: formatMessage({
|
|
214
|
-
id: "DS.DATE-RANGE-PICKER.NEXT-7-DAYS",
|
|
215
|
-
defaultMessage: 'Next 7 days'
|
|
216
|
-
}),
|
|
217
|
-
next: formatMessage({
|
|
218
|
-
id: "DS.DATE-RANGE-PICKER.NEXT",
|
|
219
|
-
defaultMessage: 'Next'
|
|
220
|
-
}),
|
|
221
|
-
nextMonth: formatMessage({
|
|
222
|
-
id: "DS.DATE-RANGE-PICKER.NEXT-MONTH",
|
|
223
|
-
defaultMessage: 'Next month'
|
|
224
|
-
}),
|
|
225
|
-
nextWeek: formatMessage({
|
|
226
|
-
id: "DS.DATE-RANGE-PICKER.NEXT-WEEK",
|
|
227
|
-
defaultMessage: 'Next week'
|
|
228
|
-
}),
|
|
229
|
-
nextYear: formatMessage({
|
|
230
|
-
id: "DS.DATE-RANGE-PICKER.NEXT-YEAR",
|
|
231
|
-
defaultMessage: 'Next year'
|
|
232
|
-
}),
|
|
233
|
-
now: formatMessage({
|
|
234
|
-
id: "DS.DATE-RANGE-PICKER.NOW",
|
|
235
|
-
defaultMessage: 'Now'
|
|
236
|
-
}),
|
|
237
|
-
pasteRange: formatMessage({
|
|
238
|
-
id: "DS.DATE-RANGE-PICKER.PASTE-RANGE",
|
|
239
|
-
defaultMessage: 'Paste range'
|
|
240
|
-
}),
|
|
241
|
-
relativeDateRange: formatMessage({
|
|
242
|
-
id: "DS.DATE-RANGE-PICKER.RELATIVE-DATE-RANGE",
|
|
243
|
-
defaultMessage: 'Relative date range'
|
|
244
|
-
}),
|
|
245
|
-
remove: formatMessage({
|
|
246
|
-
id: "DS.DATE-RANGE-PICKER.REMOVE",
|
|
247
|
-
defaultMessage: 'Remove'
|
|
248
|
-
}),
|
|
249
|
-
savedFiltersTrigger: formatMessage({
|
|
250
|
-
id: "DS.DATE-RANGE-PICKER.SAVED-FILTERS",
|
|
251
|
-
defaultMessage: 'Saved filters'
|
|
252
|
-
}),
|
|
253
|
-
seconds: formatMessage({
|
|
254
|
-
id: "DS.DATE-RANGE-PICKER.SECONDS",
|
|
255
|
-
defaultMessage: 'Seconds'
|
|
256
|
-
}),
|
|
257
|
-
selectDate: formatMessage({
|
|
258
|
-
id: "DS.DATE-RANGE-PICKER.SELECT-DATE",
|
|
259
|
-
defaultMessage: 'Select date'
|
|
260
|
-
}),
|
|
261
|
-
selectTime: formatMessage({
|
|
262
|
-
id: "DS.DATE-RANGE-PICKER.SELECT-TIME",
|
|
263
|
-
defaultMessage: 'Select time'
|
|
264
|
-
}),
|
|
265
|
-
since: formatMessage({
|
|
266
|
-
id: "DS.DATE-RANGE-PICKER.SINCE",
|
|
267
|
-
defaultMessage: 'Since'
|
|
268
|
-
}),
|
|
269
|
-
startDate: formatMessage({
|
|
270
|
-
id: "DS.DATE-RANGE-PICKER.START-DATE",
|
|
271
|
-
defaultMessage: 'Start date'
|
|
272
|
-
}),
|
|
273
|
-
startDatePlaceholder: formatMessage({
|
|
274
|
-
id: "DS.DATE-RANGE-PICKER.START-DATE-PLACEHOLDER",
|
|
275
|
-
defaultMessage: 'Start date'
|
|
276
|
-
}),
|
|
277
|
-
thisMonth: formatMessage({
|
|
278
|
-
id: "DS.DATE-RANGE-PICKER.THIS-MONTH",
|
|
279
|
-
defaultMessage: 'This month'
|
|
280
|
-
}),
|
|
281
|
-
thisWeek: formatMessage({
|
|
282
|
-
id: "DS.DATE-RANGE-PICKER.THIS-WEEK",
|
|
283
|
-
defaultMessage: 'This week'
|
|
284
|
-
}),
|
|
285
|
-
timestampLast: formatMessage({
|
|
286
|
-
id: "DS.DATE-RANGE-PICKER.TIMESTAMP-LAST",
|
|
287
|
-
defaultMessage: 'Last'
|
|
288
|
-
}),
|
|
289
|
-
timestampNext: formatMessage({
|
|
290
|
-
id: "DS.DATE-RANGE-PICKER.TIMESTAMP-NEXT",
|
|
291
|
-
defaultMessage: 'Next'
|
|
292
|
-
}),
|
|
293
|
-
timestampTill: formatMessage({
|
|
294
|
-
id: "DS.DATE-RANGE-PICKER.TIMESTAMP-TILL",
|
|
295
|
-
defaultMessage: 'till'
|
|
296
|
-
}),
|
|
297
|
-
today: formatMessage({
|
|
298
|
-
id: "DS.DATE-RANGE-PICKER.TODAY",
|
|
299
|
-
defaultMessage: 'Today'
|
|
300
|
-
}),
|
|
301
|
-
tomorrow: formatMessage({
|
|
302
|
-
id: "DS.DATE-RANGE-PICKER.TOMORROW",
|
|
303
|
-
defaultMessage: 'Tomorrow'
|
|
304
|
-
}),
|
|
305
|
-
weeks: formatMessage({
|
|
306
|
-
id: "DS.DATE-RANGE-PICKER.WEEKS",
|
|
307
|
-
defaultMessage: 'Weeks'
|
|
308
|
-
}),
|
|
309
|
-
years: formatMessage({
|
|
310
|
-
id: "DS.DATE-RANGE-PICKER.YEARS",
|
|
311
|
-
defaultMessage: 'Years'
|
|
312
|
-
}),
|
|
313
|
-
yesterday: formatMessage({
|
|
314
|
-
id: "DS.DATE-RANGE-PICKER.YESTERDAY",
|
|
315
|
-
defaultMessage: 'Yesterday'
|
|
316
|
-
}),
|
|
317
|
-
range: formatMessage({
|
|
318
|
-
id: "DS.DATE-RANGE-PICKER.RANGE",
|
|
319
|
-
defaultMessage: 'Range'
|
|
320
|
-
}),
|
|
321
|
-
hour: formatMessage({
|
|
322
|
-
id: "DS.DATE-RANGE-PICKER.HOUR",
|
|
323
|
-
defaultMessage: 'Hour'
|
|
324
|
-
})
|
|
325
|
-
},
|
|
326
|
-
datePicker: {
|
|
327
|
-
apply: formatMessage({
|
|
328
|
-
id: 'DS.FACTORS.DATE_PICKER.APPLY',
|
|
329
|
-
defaultMessage: 'Apply'
|
|
330
|
-
}),
|
|
331
|
-
clearTooltip: formatMessage({
|
|
332
|
-
id: 'DS.FACTORS.DATE_PICKER.CLEAR_TOOLTIP',
|
|
333
|
-
defaultMessage: 'Clear'
|
|
334
|
-
}),
|
|
335
|
-
inputPlaceholder: formatMessage({
|
|
336
|
-
id: 'DS.FACTORS.DATE_PICKER.INPUT_PLACEHOLDER',
|
|
337
|
-
defaultMessage: 'Select date'
|
|
338
|
-
}),
|
|
339
|
-
now: formatMessage({
|
|
340
|
-
id: 'DS.FACTORS.DATE_PICKER.NOW',
|
|
341
|
-
defaultMessage: 'Now'
|
|
342
|
-
})
|
|
343
|
-
},
|
|
344
|
-
dynamicKey: {
|
|
345
|
-
keyPlaceholder: formatMessage({
|
|
346
|
-
id: 'DS.FACTORS.DYNAMIC_KEY.KEY_PLACEHOLDER',
|
|
347
|
-
defaultMessage: 'Key'
|
|
348
|
-
}),
|
|
349
|
-
valuePlaceholder: formatMessage({
|
|
350
|
-
id: 'DS.FACTORS.DYNAMIC_KEY.VALUE_PLACEHOLDER',
|
|
351
|
-
defaultMessage: 'Value'
|
|
352
|
-
})
|
|
353
|
-
},
|
|
354
|
-
formula: {
|
|
355
|
-
buttonPlaceholder: formatMessage({
|
|
356
|
-
id: 'DS.FACTORS.FORMULA.BUTTON_PLACEHOLDER',
|
|
357
|
-
defaultMessage: 'Formula'
|
|
358
|
-
}),
|
|
359
|
-
defaultName: formatMessage({
|
|
360
|
-
id: 'DS.FACTORS.FORMULA.DEFAULT_NAME',
|
|
361
|
-
defaultMessage: 'Formula'
|
|
362
|
-
})
|
|
363
|
-
},
|
|
364
|
-
parameter: {
|
|
365
|
-
searchPlaceholder: formatMessage({
|
|
366
|
-
id: 'DS.FACTORS.PARAMETER.SEARCH_PLACEHOLDER',
|
|
367
|
-
defaultMessage: 'Search'
|
|
368
|
-
}),
|
|
369
|
-
noResults: formatMessage({
|
|
370
|
-
id: 'DS.FACTORS.PARAMETER.NO_RESULTS',
|
|
371
|
-
defaultMessage: 'No results'
|
|
372
|
-
}),
|
|
373
|
-
loadingParameter: formatMessage({
|
|
374
|
-
id: 'DS.FACTORS.PARAMETER.LOADING_PARAMETERS',
|
|
375
|
-
defaultMessage: 'Loading parameters'
|
|
376
|
-
}),
|
|
377
|
-
showMore: formatMessage({
|
|
378
|
-
id: 'DS.FACTORS.PARAMETER.SHOW_MORE',
|
|
379
|
-
defaultMessage: 'Show more'
|
|
380
|
-
}),
|
|
381
|
-
recentItemsGroupName: formatMessage({
|
|
382
|
-
id: 'DS.FACTORS.PARAMETER.RECENT',
|
|
383
|
-
defaultMessage: 'Recent'
|
|
384
|
-
}),
|
|
385
|
-
allItemsGroupName: formatMessage({
|
|
386
|
-
id: 'DS.FACTORS.PARAMETER.ALL',
|
|
387
|
-
defaultMessage: 'All'
|
|
388
|
-
})
|
|
389
|
-
},
|
|
390
|
-
valuePlaceholder: formatMessage({
|
|
391
|
-
id: 'DS.FACTORS.VALUE_PLACEHOLDER',
|
|
392
|
-
defaultMessage: 'Value'
|
|
393
|
-
}),
|
|
394
|
-
modalApply: formatMessage({
|
|
395
|
-
id: 'DS.FACTORS.MODAL_APPLY',
|
|
396
|
-
defaultMessage: 'Apply'
|
|
397
|
-
}),
|
|
398
|
-
modalCancel: formatMessage({
|
|
399
|
-
id: 'DS.FACTORS.MODAL_CANCEL',
|
|
400
|
-
defaultMessage: 'Cancel'
|
|
401
|
-
}),
|
|
402
|
-
modalTitle: formatMessage({
|
|
403
|
-
id: 'DS.FACTORS.MODAL_TITLE',
|
|
404
|
-
defaultMessage: 'Value'
|
|
405
|
-
}),
|
|
406
|
-
factorTypes: {
|
|
407
|
-
text: formatMessage({
|
|
408
|
-
id: 'DS.FACTORS.FACTOR_TYPES.TEXT',
|
|
409
|
-
defaultMessage: 'Text'
|
|
410
|
-
}),
|
|
411
|
-
number: formatMessage({
|
|
412
|
-
id: 'DS.FACTORS.FACTOR_TYPES.NUMBER',
|
|
413
|
-
defaultMessage: 'Number'
|
|
414
|
-
}),
|
|
415
|
-
parameter: formatMessage({
|
|
416
|
-
id: 'DS.FACTORS.FACTOR_TYPES.PARAMETER',
|
|
417
|
-
defaultMessage: 'Parameter'
|
|
418
|
-
}),
|
|
419
|
-
contextParameter: formatMessage({
|
|
420
|
-
id: 'DS.FACTORS.FACTOR_TYPES.CONTEXT_PARAMETER',
|
|
421
|
-
defaultMessage: 'Context parameter'
|
|
422
|
-
}),
|
|
423
|
-
dynamicKey: formatMessage({
|
|
424
|
-
id: 'DS.FACTORS.FACTOR_TYPES.DYNAMIC_KEY',
|
|
425
|
-
defaultMessage: 'Dynamic key'
|
|
426
|
-
}),
|
|
427
|
-
formula: formatMessage({
|
|
428
|
-
id: 'DS.FACTORS.FACTOR_TYPES.FORMULA',
|
|
429
|
-
defaultMessage: 'Formula'
|
|
430
|
-
}),
|
|
431
|
-
array: formatMessage({
|
|
432
|
-
id: 'DS.FACTORS.FACTOR_TYPES.ARRAY',
|
|
433
|
-
defaultMessage: 'Array'
|
|
434
|
-
}),
|
|
435
|
-
date: formatMessage({
|
|
436
|
-
id: 'DS.FACTORS.FACTOR_TYPES.DATE',
|
|
437
|
-
defaultMessage: 'Date'
|
|
438
|
-
}),
|
|
439
|
-
dateRange: formatMessage({
|
|
440
|
-
id: 'DS.FACTORS.FACTOR_TYPES.DATE_RANGE',
|
|
441
|
-
defaultMessage: 'Date range'
|
|
442
|
-
})
|
|
443
|
-
}
|
|
444
|
-
}, texts);
|
|
445
|
-
}, [texts, formatMessage]);
|
|
96
|
+
var allTexts = useTexts(texts);
|
|
446
97
|
var factorType = useMemo(function () {
|
|
447
98
|
return selectedFactorType || defaultFactorType;
|
|
448
99
|
}, [selectedFactorType, defaultFactorType]);
|
|
@@ -455,7 +106,7 @@ var Factors = function Factors(_ref) {
|
|
|
455
106
|
withoutTypeSelector: withoutTypeSelector,
|
|
456
107
|
className: "ds-factors ds-factors-" + factorType
|
|
457
108
|
}, !withoutTypeSelector && setSelectedFactorType && /*#__PURE__*/React.createElement(FactorTypeSelector, {
|
|
458
|
-
texts:
|
|
109
|
+
texts: allTexts.factorTypes,
|
|
459
110
|
selectedFactorType: factorType,
|
|
460
111
|
setSelectedFactorType: setSelectedFactorType,
|
|
461
112
|
selectedFactor: selectedFactor,
|
|
@@ -473,7 +124,7 @@ var Factors = function Factors(_ref) {
|
|
|
473
124
|
autocompleteText: autocompleteText,
|
|
474
125
|
withoutTypeSelector: withoutTypeSelector,
|
|
475
126
|
formulaEditor: formulaEditor,
|
|
476
|
-
texts:
|
|
127
|
+
texts: allTexts,
|
|
477
128
|
opened: opened,
|
|
478
129
|
inputProps: inputProps,
|
|
479
130
|
loading: loading,
|
package/dist/Factors.types.d.ts
CHANGED
|
@@ -5,8 +5,9 @@ import type { MenuItemProps } from '@synerise/ds-menu';
|
|
|
5
5
|
import type { AutoResizeProp } from '@synerise/ds-input';
|
|
6
6
|
import type { InformationCardProps } from '@synerise/ds-information-card';
|
|
7
7
|
import type { ListItemProps } from '@synerise/ds-list-item';
|
|
8
|
+
import type { LiteralStringUnion, DeepPartial } from '@synerise/ds-utils';
|
|
8
9
|
export declare const ALL_FACTOR_TYPES: readonly ["text", "number", "parameter", "contextParameter", "dynamicKey", "formula", "array", "date", "dateRange"];
|
|
9
|
-
export type FactorType = typeof ALL_FACTOR_TYPES[number]
|
|
10
|
+
export type FactorType = LiteralStringUnion<typeof ALL_FACTOR_TYPES[number]>;
|
|
10
11
|
export type DefinedFactorTypes = typeof ALL_FACTOR_TYPES[number];
|
|
11
12
|
export type DynamicKeyValueType = {
|
|
12
13
|
key: ReactText;
|
|
@@ -51,7 +52,7 @@ export type SelectedFactorType = {
|
|
|
51
52
|
input: ElementType;
|
|
52
53
|
};
|
|
53
54
|
export type FactorsTexts = {
|
|
54
|
-
dateRangePicker:
|
|
55
|
+
dateRangePicker: DateRangeTexts;
|
|
55
56
|
datePicker: {
|
|
56
57
|
apply: string;
|
|
57
58
|
clearTooltip: string;
|
|
@@ -78,7 +79,7 @@ export type FactorsTexts = {
|
|
|
78
79
|
modalApply: string;
|
|
79
80
|
modalCancel: string;
|
|
80
81
|
modalTitle: string;
|
|
81
|
-
factorTypes
|
|
82
|
+
factorTypes: {
|
|
82
83
|
[k in DefinedFactorTypes]: string;
|
|
83
84
|
};
|
|
84
85
|
};
|
|
@@ -97,7 +98,7 @@ export type FactorsProps = {
|
|
|
97
98
|
onDeactivate?: () => void;
|
|
98
99
|
onChangeValue: (value: FactorValueType) => void;
|
|
99
100
|
value: FactorValueType;
|
|
100
|
-
textType?: 'autocomplete' | 'expansible' | 'default'
|
|
101
|
+
textType?: LiteralStringUnion<'autocomplete' | 'expansible' | 'default'>;
|
|
101
102
|
autoResize?: AutoResizeProp;
|
|
102
103
|
autocompleteText?: {
|
|
103
104
|
options: string[];
|
|
@@ -119,7 +120,7 @@ export type FactorsProps = {
|
|
|
119
120
|
};
|
|
120
121
|
onParamsClick?: () => void;
|
|
121
122
|
formulaEditor?: ReactNode;
|
|
122
|
-
texts?:
|
|
123
|
+
texts?: DeepPartial<FactorsTexts>;
|
|
123
124
|
opened?: boolean;
|
|
124
125
|
allowClear?: boolean;
|
|
125
126
|
loading?: boolean;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useIntl } from 'react-intl';
|
|
3
|
+
import { merge } from 'lodash';
|
|
4
|
+
import { utils as dateRangePickerUtils } from '@synerise/ds-date-range-picker';
|
|
5
|
+
export var useTexts = function useTexts(defaultTexts) {
|
|
6
|
+
var intl = useIntl();
|
|
7
|
+
var texts = useMemo(function () {
|
|
8
|
+
return merge({
|
|
9
|
+
dateRangePicker: dateRangePickerUtils.getDefaultTexts(intl),
|
|
10
|
+
datePicker: {
|
|
11
|
+
apply: intl.formatMessage({
|
|
12
|
+
id: 'DS.FACTORS.DATE_PICKER.APPLY',
|
|
13
|
+
defaultMessage: 'Apply'
|
|
14
|
+
}),
|
|
15
|
+
clearTooltip: intl.formatMessage({
|
|
16
|
+
id: 'DS.FACTORS.DATE_PICKER.CLEAR_TOOLTIP',
|
|
17
|
+
defaultMessage: 'Clear'
|
|
18
|
+
}),
|
|
19
|
+
inputPlaceholder: intl.formatMessage({
|
|
20
|
+
id: 'DS.FACTORS.DATE_PICKER.INPUT_PLACEHOLDER',
|
|
21
|
+
defaultMessage: 'Select date'
|
|
22
|
+
}),
|
|
23
|
+
now: intl.formatMessage({
|
|
24
|
+
id: 'DS.FACTORS.DATE_PICKER.NOW',
|
|
25
|
+
defaultMessage: 'Now'
|
|
26
|
+
})
|
|
27
|
+
},
|
|
28
|
+
dynamicKey: {
|
|
29
|
+
keyPlaceholder: intl.formatMessage({
|
|
30
|
+
id: 'DS.FACTORS.DYNAMIC_KEY.KEY_PLACEHOLDER',
|
|
31
|
+
defaultMessage: 'Key'
|
|
32
|
+
}),
|
|
33
|
+
valuePlaceholder: intl.formatMessage({
|
|
34
|
+
id: 'DS.FACTORS.DYNAMIC_KEY.VALUE_PLACEHOLDER',
|
|
35
|
+
defaultMessage: 'Value'
|
|
36
|
+
})
|
|
37
|
+
},
|
|
38
|
+
formula: {
|
|
39
|
+
buttonPlaceholder: intl.formatMessage({
|
|
40
|
+
id: 'DS.FACTORS.FORMULA.BUTTON_PLACEHOLDER',
|
|
41
|
+
defaultMessage: 'Formula'
|
|
42
|
+
}),
|
|
43
|
+
defaultName: intl.formatMessage({
|
|
44
|
+
id: 'DS.FACTORS.FORMULA.DEFAULT_NAME',
|
|
45
|
+
defaultMessage: 'Formula'
|
|
46
|
+
})
|
|
47
|
+
},
|
|
48
|
+
parameter: {
|
|
49
|
+
searchPlaceholder: intl.formatMessage({
|
|
50
|
+
id: 'DS.FACTORS.PARAMETER.SEARCH_PLACEHOLDER',
|
|
51
|
+
defaultMessage: 'Search'
|
|
52
|
+
}),
|
|
53
|
+
noResults: intl.formatMessage({
|
|
54
|
+
id: 'DS.FACTORS.PARAMETER.NO_RESULTS',
|
|
55
|
+
defaultMessage: 'No results'
|
|
56
|
+
}),
|
|
57
|
+
loadingParameter: intl.formatMessage({
|
|
58
|
+
id: 'DS.FACTORS.PARAMETER.LOADING_PARAMETERS',
|
|
59
|
+
defaultMessage: 'Loading parameters'
|
|
60
|
+
}),
|
|
61
|
+
showMore: intl.formatMessage({
|
|
62
|
+
id: 'DS.FACTORS.PARAMETER.SHOW_MORE',
|
|
63
|
+
defaultMessage: 'Show more'
|
|
64
|
+
}),
|
|
65
|
+
recentItemsGroupName: intl.formatMessage({
|
|
66
|
+
id: 'DS.FACTORS.PARAMETER.RECENT',
|
|
67
|
+
defaultMessage: 'Recent'
|
|
68
|
+
}),
|
|
69
|
+
allItemsGroupName: intl.formatMessage({
|
|
70
|
+
id: 'DS.FACTORS.PARAMETER.ALL',
|
|
71
|
+
defaultMessage: 'All'
|
|
72
|
+
})
|
|
73
|
+
},
|
|
74
|
+
valuePlaceholder: intl.formatMessage({
|
|
75
|
+
id: 'DS.FACTORS.VALUE_PLACEHOLDER',
|
|
76
|
+
defaultMessage: 'Value'
|
|
77
|
+
}),
|
|
78
|
+
modalApply: intl.formatMessage({
|
|
79
|
+
id: 'DS.FACTORS.MODAL_APPLY',
|
|
80
|
+
defaultMessage: 'Apply'
|
|
81
|
+
}),
|
|
82
|
+
modalCancel: intl.formatMessage({
|
|
83
|
+
id: 'DS.FACTORS.MODAL_CANCEL',
|
|
84
|
+
defaultMessage: 'Cancel'
|
|
85
|
+
}),
|
|
86
|
+
modalTitle: intl.formatMessage({
|
|
87
|
+
id: 'DS.FACTORS.MODAL_TITLE',
|
|
88
|
+
defaultMessage: 'Value'
|
|
89
|
+
}),
|
|
90
|
+
factorTypes: {
|
|
91
|
+
text: intl.formatMessage({
|
|
92
|
+
id: 'DS.FACTORS.FACTOR_TYPES.TEXT',
|
|
93
|
+
defaultMessage: 'Text'
|
|
94
|
+
}),
|
|
95
|
+
number: intl.formatMessage({
|
|
96
|
+
id: 'DS.FACTORS.FACTOR_TYPES.NUMBER',
|
|
97
|
+
defaultMessage: 'Number'
|
|
98
|
+
}),
|
|
99
|
+
parameter: intl.formatMessage({
|
|
100
|
+
id: 'DS.FACTORS.FACTOR_TYPES.PARAMETER',
|
|
101
|
+
defaultMessage: 'Parameter'
|
|
102
|
+
}),
|
|
103
|
+
contextParameter: intl.formatMessage({
|
|
104
|
+
id: 'DS.FACTORS.FACTOR_TYPES.CONTEXT_PARAMETER',
|
|
105
|
+
defaultMessage: 'Context parameter'
|
|
106
|
+
}),
|
|
107
|
+
dynamicKey: intl.formatMessage({
|
|
108
|
+
id: 'DS.FACTORS.FACTOR_TYPES.DYNAMIC_KEY',
|
|
109
|
+
defaultMessage: 'Dynamic key'
|
|
110
|
+
}),
|
|
111
|
+
formula: intl.formatMessage({
|
|
112
|
+
id: 'DS.FACTORS.FACTOR_TYPES.FORMULA',
|
|
113
|
+
defaultMessage: 'Formula'
|
|
114
|
+
}),
|
|
115
|
+
array: intl.formatMessage({
|
|
116
|
+
id: 'DS.FACTORS.FACTOR_TYPES.ARRAY',
|
|
117
|
+
defaultMessage: 'Array'
|
|
118
|
+
}),
|
|
119
|
+
date: intl.formatMessage({
|
|
120
|
+
id: 'DS.FACTORS.FACTOR_TYPES.DATE',
|
|
121
|
+
defaultMessage: 'Date'
|
|
122
|
+
}),
|
|
123
|
+
dateRange: intl.formatMessage({
|
|
124
|
+
id: 'DS.FACTORS.FACTOR_TYPES.DATE_RANGE',
|
|
125
|
+
defaultMessage: 'Date range'
|
|
126
|
+
})
|
|
127
|
+
}
|
|
128
|
+
}, defaultTexts);
|
|
129
|
+
}, [defaultTexts, intl]);
|
|
130
|
+
return texts;
|
|
131
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default, factorTypes } from './Factors';
|
|
2
2
|
export { ALL_FACTOR_TYPES } from './Factors.types';
|
|
3
|
-
export type { FactorsProps, ParameterValueType, InputProps, FactorValueType } from './Factors.types';
|
|
3
|
+
export type { FactorsProps, ParameterValueType, ParameterItem, ParameterGroup, InputProps, FactorType, FactorValueType, DynamicKeyValueType, } from './Factors.types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-factors",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.2",
|
|
4
4
|
"description": "Factors UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -34,28 +34,27 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-autocomplete": "^0.8.
|
|
38
|
-
"@synerise/ds-badge": "^0.8.
|
|
39
|
-
"@synerise/ds-button": "^0.21.
|
|
40
|
-
"@synerise/ds-date-picker": "^0.13.
|
|
41
|
-
"@synerise/ds-date-range-picker": "^0.31.
|
|
42
|
-
"@synerise/ds-dropdown": "^0.18.
|
|
43
|
-
"@synerise/ds-icon": "^0.
|
|
44
|
-
"@synerise/ds-information-card": "^0.6.
|
|
45
|
-
"@synerise/ds-inline-edit": "^0.
|
|
46
|
-
"@synerise/ds-input": "^0.24.
|
|
47
|
-
"@synerise/ds-input-number": "^0.10.
|
|
48
|
-
"@synerise/ds-list-item": "^0.4.
|
|
49
|
-
"@synerise/ds-menu": "^0.20.
|
|
50
|
-
"@synerise/ds-modal": "^0.17.
|
|
51
|
-
"@synerise/ds-result": "^0.7.
|
|
52
|
-
"@synerise/ds-scrollbar": "^0.11.
|
|
53
|
-
"@synerise/ds-skeleton": "^0.6.
|
|
54
|
-
"@synerise/ds-tabs": "^0.17.
|
|
55
|
-
"@synerise/ds-tooltip": "^0.14.
|
|
56
|
-
"@synerise/ds-utils": "^0.31.
|
|
37
|
+
"@synerise/ds-autocomplete": "^0.8.28",
|
|
38
|
+
"@synerise/ds-badge": "^0.8.19",
|
|
39
|
+
"@synerise/ds-button": "^0.21.19",
|
|
40
|
+
"@synerise/ds-date-picker": "^0.13.2",
|
|
41
|
+
"@synerise/ds-date-range-picker": "^0.31.2",
|
|
42
|
+
"@synerise/ds-dropdown": "^0.18.24",
|
|
43
|
+
"@synerise/ds-icon": "^0.67.0",
|
|
44
|
+
"@synerise/ds-information-card": "^0.6.2",
|
|
45
|
+
"@synerise/ds-inline-edit": "^0.9.1",
|
|
46
|
+
"@synerise/ds-input": "^0.24.14",
|
|
47
|
+
"@synerise/ds-input-number": "^0.10.15",
|
|
48
|
+
"@synerise/ds-list-item": "^0.4.19",
|
|
49
|
+
"@synerise/ds-menu": "^0.20.6",
|
|
50
|
+
"@synerise/ds-modal": "^0.17.51",
|
|
51
|
+
"@synerise/ds-result": "^0.7.14",
|
|
52
|
+
"@synerise/ds-scrollbar": "^0.11.19",
|
|
53
|
+
"@synerise/ds-skeleton": "^0.6.18",
|
|
54
|
+
"@synerise/ds-tabs": "^0.17.7",
|
|
55
|
+
"@synerise/ds-tooltip": "^0.14.49",
|
|
56
|
+
"@synerise/ds-utils": "^0.31.2",
|
|
57
57
|
"lodash": "^4.17.21",
|
|
58
|
-
"react-intl": "6.8.4",
|
|
59
58
|
"react-window": "1.8.5",
|
|
60
59
|
"uuid": "^8.3.2"
|
|
61
60
|
},
|
|
@@ -63,7 +62,8 @@
|
|
|
63
62
|
"@synerise/ds-core": "*",
|
|
64
63
|
"antd": "4.7.0",
|
|
65
64
|
"react": ">=16.9.0 <= 17.0.2",
|
|
65
|
+
"react-intl": ">=3.12.0 <= 6.8",
|
|
66
66
|
"styled-components": "5.0.1"
|
|
67
67
|
},
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "05f083c767e2cec3c2f91c9475aee89852a77d6c"
|
|
69
69
|
}
|