@synerise/ds-factors 1.11.11 → 1.11.13
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 +8 -0
- package/dist/FactorTypeSelector/FactorTypeSelector.d.ts +2 -2
- package/dist/FactorTypeSelector/FactorTypeSelector.js +37 -58
- package/dist/FactorTypeSelector/FactorTypeSelector.styles.d.ts +18 -18
- package/dist/FactorTypeSelector/FactorTypeSelector.styles.js +10 -10
- package/dist/FactorValue/Array/Array.const.js +8 -3
- package/dist/FactorValue/Array/Array.d.ts +2 -2
- package/dist/FactorValue/Array/Array.js +45 -57
- package/dist/FactorValue/Array/Array.styles.d.ts +39 -39
- package/dist/FactorValue/Array/Array.styles.js +44 -33
- package/dist/FactorValue/Array/Array.types.d.ts +3 -3
- package/dist/FactorValue/Array/Array.types.js +1 -1
- package/dist/FactorValue/Array/Array.utils.d.ts +2 -2
- package/dist/FactorValue/Array/Array.utils.js +21 -18
- package/dist/FactorValue/Array/components/ArrayCollector.d.ts +2 -2
- package/dist/FactorValue/Array/components/ArrayCollector.js +70 -94
- package/dist/FactorValue/Array/components/ArrayCreator.d.ts +2 -2
- package/dist/FactorValue/Array/components/ArrayCreator.js +43 -75
- package/dist/FactorValue/Array/components/ArrayLimit.d.ts +2 -2
- package/dist/FactorValue/Array/components/ArrayLimit.js +16 -14
- package/dist/FactorValue/Array/components/ArrayModal.d.ts +2 -2
- package/dist/FactorValue/Array/components/ArrayModal.js +78 -143
- package/dist/FactorValue/Array/components/ArrayRaw.d.ts +2 -2
- package/dist/FactorValue/Array/components/ArrayRaw.js +47 -58
- package/dist/FactorValue/Array/components/CopyButton.d.ts +2 -2
- package/dist/FactorValue/Array/components/CopyButton.js +20 -30
- package/dist/FactorValue/Array/hooks/useCollector.d.ts +3 -3
- package/dist/FactorValue/Array/hooks/useCollector.js +21 -22
- package/dist/FactorValue/Date/Date.d.ts +2 -2
- package/dist/FactorValue/Date/Date.js +38 -53
- package/dist/FactorValue/DateRange/DateRange.d.ts +2 -2
- package/dist/FactorValue/DateRange/DateRange.js +26 -41
- package/dist/FactorValue/DynamicKey/DynamicKey.d.ts +2 -2
- package/dist/FactorValue/DynamicKey/DynamicKey.js +37 -66
- package/dist/FactorValue/DynamicKey/DynamicKey.style.d.ts +2 -2
- package/dist/FactorValue/DynamicKey/DynamicKey.style.js +10 -8
- package/dist/FactorValue/FactorValue.d.ts +2 -2
- package/dist/FactorValue/FactorValue.js +68 -70
- package/dist/FactorValue/FactorValue.style.d.ts +1 -1
- package/dist/FactorValue/FactorValue.style.js +20 -20
- package/dist/FactorValue/Formula/Formula.d.ts +2 -2
- package/dist/FactorValue/Formula/Formula.js +36 -54
- package/dist/FactorValue/Formula/Formula.styles.d.ts +1 -1
- package/dist/FactorValue/Formula/Formula.styles.js +6 -5
- package/dist/FactorValue/Formula/FormulaModal.d.ts +2 -2
- package/dist/FactorValue/Formula/FormulaModal.js +27 -42
- package/dist/FactorValue/Number/NumberInput.d.ts +2 -2
- package/dist/FactorValue/Number/NumberInput.js +21 -31
- package/dist/FactorValue/Parameter/Parameter.constants.d.ts +1 -1
- package/dist/FactorValue/Parameter/Parameter.constants.js +27 -13
- package/dist/FactorValue/Parameter/Parameter.d.ts +2 -2
- package/dist/FactorValue/Parameter/Parameter.js +82 -127
- package/dist/FactorValue/Parameter/Parameter.style.d.ts +28 -28
- package/dist/FactorValue/Parameter/Parameter.style.js +34 -31
- package/dist/FactorValue/Parameter/Parameter.types.d.ts +2 -2
- package/dist/FactorValue/Parameter/Parameter.types.js +1 -1
- package/dist/FactorValue/Parameter/ParameterDropdown.d.ts +2 -2
- package/dist/FactorValue/Parameter/ParameterDropdown.js +155 -226
- package/dist/FactorValue/Parameter/ParameterDropdownItem.d.ts +3 -3
- package/dist/FactorValue/Parameter/ParameterDropdownItem.js +27 -33
- package/dist/FactorValue/Parameter/useGroups.d.ts +2 -2
- package/dist/FactorValue/Parameter/useGroups.js +30 -42
- package/dist/FactorValue/Parameter/utils.d.ts +2 -2
- package/dist/FactorValue/Parameter/utils.js +22 -17
- package/dist/FactorValue/RelativeDate/RelativeDate.const.d.ts +1 -1
- package/dist/FactorValue/RelativeDate/RelativeDate.const.js +12 -5
- package/dist/FactorValue/RelativeDate/RelativeDate.d.ts +2 -2
- package/dist/FactorValue/RelativeDate/RelativeDate.js +57 -88
- package/dist/FactorValue/RelativeDate/RelativeDate.utils.d.ts +1 -1
- package/dist/FactorValue/RelativeDate/RelativeDate.utils.js +14 -10
- package/dist/FactorValue/RelativeDate/RelativeDateDropdown.d.ts +2 -2
- package/dist/FactorValue/RelativeDate/RelativeDateDropdown.js +56 -87
- package/dist/FactorValue/RelativeDate/RelativeDateDropdown.styles.d.ts +7 -7
- package/dist/FactorValue/RelativeDate/RelativeDateDropdown.styles.js +23 -20
- package/dist/FactorValue/Text/Text.d.ts +2 -2
- package/dist/FactorValue/Text/Text.js +56 -121
- package/dist/FactorValue/Text/Text.styles.d.ts +3 -3
- package/dist/FactorValue/Text/Text.styles.js +11 -10
- package/dist/FactorValue/Text/TextModal.d.ts +2 -2
- package/dist/FactorValue/Text/TextModal.js +19 -33
- package/dist/Factors.d.ts +2 -2
- package/dist/Factors.js +95 -132
- package/dist/Factors.types.d.ts +9 -9
- package/dist/Factors.types.js +8 -3
- package/dist/hooks/useTexts.d.ts +2 -2
- package/dist/hooks/useTexts.js +287 -291
- package/dist/index.js +7 -6
- package/dist/modules.d.js +1 -1
- package/dist/modules.d.ts +0 -0
- package/dist/style/Factors.style.d.ts +1 -1
- package/dist/style/Factors.style.js +10 -11
- package/package.json +32 -32
package/dist/hooks/useTexts.js
CHANGED
|
@@ -1,297 +1,293 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
valuePlaceholder: intl.formatMessage({
|
|
35
|
-
id: 'DS.FACTORS.DYNAMIC_KEY.VALUE_PLACEHOLDER',
|
|
36
|
-
defaultMessage: 'Value'
|
|
37
|
-
})
|
|
38
|
-
},
|
|
39
|
-
relativeDate: {
|
|
40
|
-
currentDatetime: intl.formatMessage({
|
|
41
|
-
id: 'DS.FACTORS.RELATIVE_DATE.CURRENT_DATETIME',
|
|
42
|
-
defaultMessage: 'current datetime'
|
|
43
|
-
}),
|
|
44
|
-
seconds: intl.formatMessage({
|
|
45
|
-
id: 'DS.FACTORS.RELATIVE_DATE.SECONDS',
|
|
46
|
-
defaultMessage: 'Seconds'
|
|
47
|
-
}),
|
|
48
|
-
minutes: intl.formatMessage({
|
|
49
|
-
id: 'DS.FACTORS.RELATIVE_DATE.MINUTE',
|
|
50
|
-
defaultMessage: 'Minutes'
|
|
51
|
-
}),
|
|
52
|
-
hours: intl.formatMessage({
|
|
53
|
-
id: 'DS.FACTORS.RELATIVE_DATE.HOURS',
|
|
54
|
-
defaultMessage: 'Hours'
|
|
55
|
-
}),
|
|
56
|
-
days: intl.formatMessage({
|
|
57
|
-
id: 'DS.FACTORS.RELATIVE_DATE.DAYS',
|
|
58
|
-
defaultMessage: 'Days'
|
|
59
|
-
}),
|
|
60
|
-
weeks: intl.formatMessage({
|
|
61
|
-
id: 'DS.FACTORS.RELATIVE_DATE.WEEKS',
|
|
62
|
-
defaultMessage: 'Weeks'
|
|
63
|
-
}),
|
|
64
|
-
months: intl.formatMessage({
|
|
65
|
-
id: 'DS.FACTORS.RELATIVE_DATE.MONTHS',
|
|
66
|
-
defaultMessage: 'Months'
|
|
67
|
-
}),
|
|
68
|
-
years: intl.formatMessage({
|
|
69
|
-
id: 'DS.FACTORS.RELATIVE_DATE.YEARS',
|
|
70
|
-
defaultMessage: 'Years'
|
|
71
|
-
}),
|
|
72
|
-
before: intl.formatMessage({
|
|
73
|
-
id: 'DS.FACTORS.RELATIVE_DATE.BEFORE',
|
|
74
|
-
defaultMessage: 'Before'
|
|
75
|
-
}),
|
|
76
|
-
after: intl.formatMessage({
|
|
77
|
-
id: 'DS.FACTORS.RELATIVE_DATE.AFTER',
|
|
78
|
-
defaultMessage: 'After'
|
|
79
|
-
}),
|
|
80
|
-
apply: intl.formatMessage({
|
|
81
|
-
id: 'DS.FACTORS.RELATIVE_DATE.APPLY',
|
|
82
|
-
defaultMessage: 'Apply'
|
|
83
|
-
}),
|
|
84
|
-
cancel: intl.formatMessage({
|
|
85
|
-
id: 'DS.FACTORS.RELATIVE_DATE.CANCEL',
|
|
86
|
-
defaultMessage: 'Cancel'
|
|
87
|
-
}),
|
|
88
|
-
triggerPlaceholder: intl.formatMessage({
|
|
89
|
-
id: 'DS.FACTORS.RELATIVE_DATE.TRIGGER_PLACEHOLDER',
|
|
90
|
-
defaultMessage: 'Select date'
|
|
91
|
-
}),
|
|
92
|
-
triggerValue: intl.formatMessage({
|
|
93
|
-
id: 'DS.FACTORS.RELATIVE_DATE.TRIGGER_VALUE',
|
|
94
|
-
defaultMessage: '{value} {interval} {timeRelation} current datetime'
|
|
95
|
-
}, {
|
|
96
|
-
value: '1',
|
|
97
|
-
interval: 'days',
|
|
98
|
-
timeRelation: 'before'
|
|
99
|
-
})
|
|
100
|
-
},
|
|
101
|
-
formula: {
|
|
102
|
-
buttonPlaceholder: intl.formatMessage({
|
|
103
|
-
id: 'DS.FACTORS.FORMULA.BUTTON_PLACEHOLDER',
|
|
104
|
-
defaultMessage: 'Formula'
|
|
105
|
-
}),
|
|
106
|
-
defaultName: intl.formatMessage({
|
|
107
|
-
id: 'DS.FACTORS.FORMULA.DEFAULT_NAME',
|
|
108
|
-
defaultMessage: 'Formula'
|
|
109
|
-
})
|
|
110
|
-
},
|
|
111
|
-
array: {
|
|
112
|
-
triggerLabel: intl.formatMessage({
|
|
113
|
-
id: 'DS.FACTORS.ARRAY.TRIGGER_LABEL',
|
|
114
|
-
defaultMessage: 'Define array'
|
|
115
|
-
}),
|
|
116
|
-
modalTitle: intl.formatMessage({
|
|
117
|
-
id: 'DS.FACTORS.ARRAY.MODAL_TITLE',
|
|
118
|
-
defaultMessage: 'Array'
|
|
119
|
-
}),
|
|
120
|
-
clearButtonLabel: intl.formatMessage({
|
|
121
|
-
id: 'DS.FACTORS.ARRAY.CLEAR_BUTTON',
|
|
122
|
-
defaultMessage: 'Clear all'
|
|
123
|
-
}),
|
|
124
|
-
creatorButtonLabel: intl.formatMessage({
|
|
125
|
-
id: 'DS.FACTORS.ARRAY.CREATOR',
|
|
126
|
-
defaultMessage: 'Creator'
|
|
127
|
-
}),
|
|
128
|
-
rawButtonLabel: intl.formatMessage({
|
|
129
|
-
id: 'DS.FACTORS.ARRAY.RAW_BUTTON_LABEL',
|
|
130
|
-
defaultMessage: 'Raw'
|
|
131
|
-
}),
|
|
132
|
-
searchPlaceholder: intl.formatMessage({
|
|
133
|
-
id: 'DS.FACTORS.ARRAY.SEARCH_PLACEHOLDER',
|
|
134
|
-
defaultMessage: 'Search'
|
|
135
|
-
}),
|
|
136
|
-
collectorPlaceholder: intl.formatMessage({
|
|
137
|
-
id: 'DS.FACTORS.ARRAY.COLLECTOR_PLACEHOLDER',
|
|
138
|
-
defaultMessage: 'Separate values by {delimiterShortCut} or type {escapeShortCut} to add string containing comma'
|
|
139
|
-
}, {
|
|
140
|
-
escapeShortCut: /*#__PURE__*/React.createElement(ShortCuts, {
|
|
141
|
-
color: "light",
|
|
142
|
-
size: "L"
|
|
143
|
-
}, "```"),
|
|
144
|
-
delimiterShortCut: /*#__PURE__*/React.createElement(ShortCuts, {
|
|
145
|
-
color: "light",
|
|
146
|
-
size: "L"
|
|
147
|
-
}, ",")
|
|
148
|
-
}),
|
|
149
|
-
collectorAdd: intl.formatMessage({
|
|
150
|
-
id: 'DS.FACTORS.ARRAY.COLLECTOR_ADD',
|
|
151
|
-
defaultMessage: 'Add'
|
|
152
|
-
}),
|
|
153
|
-
collectorCancel: intl.formatMessage({
|
|
154
|
-
id: 'DS.FACTORS.ARRAY.COLLECTOR_CANCEL',
|
|
155
|
-
defaultMessage: 'Cancel'
|
|
156
|
-
}),
|
|
157
|
-
searchClearTooltip: intl.formatMessage({
|
|
158
|
-
id: 'DS.FACTORS.ARRAY.SEARCH_CLEAR_TOOLTIP',
|
|
159
|
-
defaultMessage: 'Clear'
|
|
160
|
-
}),
|
|
161
|
-
deleteItemTooltip: intl.formatMessage({
|
|
162
|
-
id: 'DS.FACTORS.ARRAY.DELETE_ITEM_TOOLTIP',
|
|
163
|
-
defaultMessage: 'Delete'
|
|
164
|
-
}),
|
|
165
|
-
emptyTitle: intl.formatMessage({
|
|
166
|
-
id: 'DS.FACTORS.ARRAY.EMPTY_TITLE',
|
|
167
|
-
defaultMessage: 'No items defined yet'
|
|
168
|
-
}),
|
|
169
|
-
emptyDescription: intl.formatMessage({
|
|
170
|
-
id: 'DS.FACTORS.ARRAY.EMPTY_DESCRIPTION',
|
|
171
|
-
defaultMessage: 'This is a simple empty state example text. You can easily change it.'
|
|
172
|
-
}),
|
|
173
|
-
emptyResultsTitle: intl.formatMessage({
|
|
174
|
-
id: 'DS.FACTORS.ARRAY.EMPTY_RESULTS_TITLE',
|
|
175
|
-
defaultMessage: 'No items match your query'
|
|
176
|
-
}),
|
|
177
|
-
emptyResultsDescription: intl.formatMessage({
|
|
178
|
-
id: 'DS.FACTORS.ARRAY.EMPTY_RESULTS_DESCRIPTION',
|
|
179
|
-
defaultMessage: 'This is a simple empty state example text. You can easily change it.'
|
|
180
|
-
}),
|
|
181
|
-
limitPrefix: intl.formatMessage({
|
|
182
|
-
id: 'DS.FACTORS.ARRAY.LIMIT_PREFIX',
|
|
183
|
-
defaultMessage: 'Limit'
|
|
184
|
-
}),
|
|
185
|
-
numericValidationError: intl.formatMessage({
|
|
186
|
-
id: 'DS.FACTORS.ARRAY.NUMERIC_VALIDATION_ERROR',
|
|
187
|
-
defaultMessage: 'Some of the values are not a number'
|
|
188
|
-
}),
|
|
189
|
-
stringUnclosedBacktickError: intl.formatMessage({
|
|
190
|
-
id: 'DS.FACTORS.ARRAY.UNCLOSED_BACKTICK_ERROR',
|
|
191
|
-
defaultMessage: "There's an unclosed backtick sequence in the string"
|
|
192
|
-
}),
|
|
193
|
-
limitReached: intl.formatMessage({
|
|
194
|
-
id: 'DS.FACTORS.ARRAY.LIMIT_REACHED',
|
|
195
|
-
defaultMessage: 'Limit has been reached'
|
|
196
|
-
}),
|
|
197
|
-
limitExceeded: intl.formatMessage({
|
|
198
|
-
id: 'DS.FACTORS.ARRAY.LIMIT_EXCEEDED',
|
|
199
|
-
defaultMessage: 'Adding these items will exceed maximum items limit'
|
|
200
|
-
}),
|
|
201
|
-
copiedTooltip: intl.formatMessage({
|
|
202
|
-
id: 'DS.FACTORS.ARRAY.COPIED',
|
|
203
|
-
defaultMessage: 'Copied'
|
|
204
|
-
}),
|
|
205
|
-
copyTooltip: intl.formatMessage({
|
|
206
|
-
id: 'DS.FACTORS.ARRAY.COPY-VALUE',
|
|
207
|
-
defaultMessage: 'Copy value'
|
|
208
|
-
})
|
|
209
|
-
},
|
|
210
|
-
parameter: {
|
|
211
|
-
searchPlaceholder: intl.formatMessage({
|
|
212
|
-
id: 'DS.FACTORS.PARAMETER.SEARCH_PLACEHOLDER',
|
|
213
|
-
defaultMessage: 'Search'
|
|
214
|
-
}),
|
|
215
|
-
noResults: intl.formatMessage({
|
|
216
|
-
id: 'DS.FACTORS.PARAMETER.NO_RESULTS',
|
|
217
|
-
defaultMessage: 'No results'
|
|
218
|
-
}),
|
|
219
|
-
loadingParameter: intl.formatMessage({
|
|
220
|
-
id: 'DS.FACTORS.PARAMETER.LOADING_PARAMETERS',
|
|
221
|
-
defaultMessage: 'Loading parameters'
|
|
222
|
-
}),
|
|
223
|
-
showMore: intl.formatMessage({
|
|
224
|
-
id: 'DS.FACTORS.PARAMETER.SHOW_MORE',
|
|
225
|
-
defaultMessage: 'Show more'
|
|
226
|
-
}),
|
|
227
|
-
recentItemsGroupName: intl.formatMessage({
|
|
228
|
-
id: 'DS.FACTORS.PARAMETER.RECENT',
|
|
229
|
-
defaultMessage: 'Recent'
|
|
230
|
-
}),
|
|
231
|
-
allItemsGroupName: intl.formatMessage({
|
|
232
|
-
id: 'DS.FACTORS.PARAMETER.ALL',
|
|
233
|
-
defaultMessage: 'All'
|
|
234
|
-
})
|
|
235
|
-
},
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import merge from "lodash.merge";
|
|
3
|
+
import { useMemo } from "react";
|
|
4
|
+
import { useIntl } from "react-intl";
|
|
5
|
+
import { utils } from "@synerise/ds-date-range-picker";
|
|
6
|
+
import ShortCuts from "@synerise/ds-short-cuts";
|
|
7
|
+
const useTexts = (defaultTexts) => {
|
|
8
|
+
const intl = useIntl();
|
|
9
|
+
const texts = useMemo(() => merge({
|
|
10
|
+
dateRangePicker: utils.getDefaultTexts(intl),
|
|
11
|
+
datePicker: {
|
|
12
|
+
apply: intl.formatMessage({
|
|
13
|
+
id: "DS.FACTORS.DATE_PICKER.APPLY",
|
|
14
|
+
defaultMessage: "Apply"
|
|
15
|
+
}),
|
|
16
|
+
clearTooltip: intl.formatMessage({
|
|
17
|
+
id: "DS.FACTORS.DATE_PICKER.CLEAR_TOOLTIP",
|
|
18
|
+
defaultMessage: "Clear"
|
|
19
|
+
}),
|
|
20
|
+
inputPlaceholder: intl.formatMessage({
|
|
21
|
+
id: "DS.FACTORS.DATE_PICKER.INPUT_PLACEHOLDER",
|
|
22
|
+
defaultMessage: "Select date"
|
|
23
|
+
}),
|
|
24
|
+
now: intl.formatMessage({
|
|
25
|
+
id: "DS.FACTORS.DATE_PICKER.NOW",
|
|
26
|
+
defaultMessage: "Now"
|
|
27
|
+
})
|
|
28
|
+
},
|
|
29
|
+
dynamicKey: {
|
|
30
|
+
keyPlaceholder: intl.formatMessage({
|
|
31
|
+
id: "DS.FACTORS.DYNAMIC_KEY.KEY_PLACEHOLDER",
|
|
32
|
+
defaultMessage: "Key"
|
|
33
|
+
}),
|
|
236
34
|
valuePlaceholder: intl.formatMessage({
|
|
237
|
-
id:
|
|
238
|
-
defaultMessage:
|
|
35
|
+
id: "DS.FACTORS.DYNAMIC_KEY.VALUE_PLACEHOLDER",
|
|
36
|
+
defaultMessage: "Value"
|
|
37
|
+
})
|
|
38
|
+
},
|
|
39
|
+
relativeDate: {
|
|
40
|
+
currentDatetime: intl.formatMessage({
|
|
41
|
+
id: "DS.FACTORS.RELATIVE_DATE.CURRENT_DATETIME",
|
|
42
|
+
defaultMessage: "current datetime"
|
|
43
|
+
}),
|
|
44
|
+
seconds: intl.formatMessage({
|
|
45
|
+
id: "DS.FACTORS.RELATIVE_DATE.SECONDS",
|
|
46
|
+
defaultMessage: "Seconds"
|
|
47
|
+
}),
|
|
48
|
+
minutes: intl.formatMessage({
|
|
49
|
+
id: "DS.FACTORS.RELATIVE_DATE.MINUTE",
|
|
50
|
+
defaultMessage: "Minutes"
|
|
51
|
+
}),
|
|
52
|
+
hours: intl.formatMessage({
|
|
53
|
+
id: "DS.FACTORS.RELATIVE_DATE.HOURS",
|
|
54
|
+
defaultMessage: "Hours"
|
|
55
|
+
}),
|
|
56
|
+
days: intl.formatMessage({
|
|
57
|
+
id: "DS.FACTORS.RELATIVE_DATE.DAYS",
|
|
58
|
+
defaultMessage: "Days"
|
|
59
|
+
}),
|
|
60
|
+
weeks: intl.formatMessage({
|
|
61
|
+
id: "DS.FACTORS.RELATIVE_DATE.WEEKS",
|
|
62
|
+
defaultMessage: "Weeks"
|
|
63
|
+
}),
|
|
64
|
+
months: intl.formatMessage({
|
|
65
|
+
id: "DS.FACTORS.RELATIVE_DATE.MONTHS",
|
|
66
|
+
defaultMessage: "Months"
|
|
67
|
+
}),
|
|
68
|
+
years: intl.formatMessage({
|
|
69
|
+
id: "DS.FACTORS.RELATIVE_DATE.YEARS",
|
|
70
|
+
defaultMessage: "Years"
|
|
71
|
+
}),
|
|
72
|
+
before: intl.formatMessage({
|
|
73
|
+
id: "DS.FACTORS.RELATIVE_DATE.BEFORE",
|
|
74
|
+
defaultMessage: "Before"
|
|
75
|
+
}),
|
|
76
|
+
after: intl.formatMessage({
|
|
77
|
+
id: "DS.FACTORS.RELATIVE_DATE.AFTER",
|
|
78
|
+
defaultMessage: "After"
|
|
239
79
|
}),
|
|
240
|
-
|
|
241
|
-
id:
|
|
242
|
-
defaultMessage:
|
|
80
|
+
apply: intl.formatMessage({
|
|
81
|
+
id: "DS.FACTORS.RELATIVE_DATE.APPLY",
|
|
82
|
+
defaultMessage: "Apply"
|
|
243
83
|
}),
|
|
244
|
-
|
|
245
|
-
id:
|
|
246
|
-
defaultMessage:
|
|
84
|
+
cancel: intl.formatMessage({
|
|
85
|
+
id: "DS.FACTORS.RELATIVE_DATE.CANCEL",
|
|
86
|
+
defaultMessage: "Cancel"
|
|
87
|
+
}),
|
|
88
|
+
triggerPlaceholder: intl.formatMessage({
|
|
89
|
+
id: "DS.FACTORS.RELATIVE_DATE.TRIGGER_PLACEHOLDER",
|
|
90
|
+
defaultMessage: "Select date"
|
|
91
|
+
}),
|
|
92
|
+
triggerValue: intl.formatMessage({
|
|
93
|
+
id: "DS.FACTORS.RELATIVE_DATE.TRIGGER_VALUE",
|
|
94
|
+
defaultMessage: "{value} {interval} {timeRelation} current datetime"
|
|
95
|
+
}, {
|
|
96
|
+
value: "1",
|
|
97
|
+
interval: "days",
|
|
98
|
+
timeRelation: "before"
|
|
99
|
+
})
|
|
100
|
+
},
|
|
101
|
+
formula: {
|
|
102
|
+
buttonPlaceholder: intl.formatMessage({
|
|
103
|
+
id: "DS.FACTORS.FORMULA.BUTTON_PLACEHOLDER",
|
|
104
|
+
defaultMessage: "Formula"
|
|
105
|
+
}),
|
|
106
|
+
defaultName: intl.formatMessage({
|
|
107
|
+
id: "DS.FACTORS.FORMULA.DEFAULT_NAME",
|
|
108
|
+
defaultMessage: "Formula"
|
|
109
|
+
})
|
|
110
|
+
},
|
|
111
|
+
array: {
|
|
112
|
+
triggerLabel: intl.formatMessage({
|
|
113
|
+
id: "DS.FACTORS.ARRAY.TRIGGER_LABEL",
|
|
114
|
+
defaultMessage: "Define array"
|
|
247
115
|
}),
|
|
248
116
|
modalTitle: intl.formatMessage({
|
|
249
|
-
id:
|
|
250
|
-
defaultMessage:
|
|
251
|
-
}),
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
}),
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
117
|
+
id: "DS.FACTORS.ARRAY.MODAL_TITLE",
|
|
118
|
+
defaultMessage: "Array"
|
|
119
|
+
}),
|
|
120
|
+
clearButtonLabel: intl.formatMessage({
|
|
121
|
+
id: "DS.FACTORS.ARRAY.CLEAR_BUTTON",
|
|
122
|
+
defaultMessage: "Clear all"
|
|
123
|
+
}),
|
|
124
|
+
creatorButtonLabel: intl.formatMessage({
|
|
125
|
+
id: "DS.FACTORS.ARRAY.CREATOR",
|
|
126
|
+
defaultMessage: "Creator"
|
|
127
|
+
}),
|
|
128
|
+
rawButtonLabel: intl.formatMessage({
|
|
129
|
+
id: "DS.FACTORS.ARRAY.RAW_BUTTON_LABEL",
|
|
130
|
+
defaultMessage: "Raw"
|
|
131
|
+
}),
|
|
132
|
+
searchPlaceholder: intl.formatMessage({
|
|
133
|
+
id: "DS.FACTORS.ARRAY.SEARCH_PLACEHOLDER",
|
|
134
|
+
defaultMessage: "Search"
|
|
135
|
+
}),
|
|
136
|
+
collectorPlaceholder: intl.formatMessage({
|
|
137
|
+
id: "DS.FACTORS.ARRAY.COLLECTOR_PLACEHOLDER",
|
|
138
|
+
defaultMessage: "Separate values by {delimiterShortCut} or type {escapeShortCut} to add string containing comma"
|
|
139
|
+
}, {
|
|
140
|
+
escapeShortCut: /* @__PURE__ */ jsx(ShortCuts, { color: "light", size: "L", children: "```" }),
|
|
141
|
+
delimiterShortCut: /* @__PURE__ */ jsx(ShortCuts, { color: "light", size: "L", children: "," })
|
|
142
|
+
}),
|
|
143
|
+
collectorAdd: intl.formatMessage({
|
|
144
|
+
id: "DS.FACTORS.ARRAY.COLLECTOR_ADD",
|
|
145
|
+
defaultMessage: "Add"
|
|
146
|
+
}),
|
|
147
|
+
collectorCancel: intl.formatMessage({
|
|
148
|
+
id: "DS.FACTORS.ARRAY.COLLECTOR_CANCEL",
|
|
149
|
+
defaultMessage: "Cancel"
|
|
150
|
+
}),
|
|
151
|
+
searchClearTooltip: intl.formatMessage({
|
|
152
|
+
id: "DS.FACTORS.ARRAY.SEARCH_CLEAR_TOOLTIP",
|
|
153
|
+
defaultMessage: "Clear"
|
|
154
|
+
}),
|
|
155
|
+
deleteItemTooltip: intl.formatMessage({
|
|
156
|
+
id: "DS.FACTORS.ARRAY.DELETE_ITEM_TOOLTIP",
|
|
157
|
+
defaultMessage: "Delete"
|
|
158
|
+
}),
|
|
159
|
+
emptyTitle: intl.formatMessage({
|
|
160
|
+
id: "DS.FACTORS.ARRAY.EMPTY_TITLE",
|
|
161
|
+
defaultMessage: "No items defined yet"
|
|
162
|
+
}),
|
|
163
|
+
emptyDescription: intl.formatMessage({
|
|
164
|
+
id: "DS.FACTORS.ARRAY.EMPTY_DESCRIPTION",
|
|
165
|
+
defaultMessage: "This is a simple empty state example text. You can easily change it."
|
|
166
|
+
}),
|
|
167
|
+
emptyResultsTitle: intl.formatMessage({
|
|
168
|
+
id: "DS.FACTORS.ARRAY.EMPTY_RESULTS_TITLE",
|
|
169
|
+
defaultMessage: "No items match your query"
|
|
170
|
+
}),
|
|
171
|
+
emptyResultsDescription: intl.formatMessage({
|
|
172
|
+
id: "DS.FACTORS.ARRAY.EMPTY_RESULTS_DESCRIPTION",
|
|
173
|
+
defaultMessage: "This is a simple empty state example text. You can easily change it."
|
|
174
|
+
}),
|
|
175
|
+
limitPrefix: intl.formatMessage({
|
|
176
|
+
id: "DS.FACTORS.ARRAY.LIMIT_PREFIX",
|
|
177
|
+
defaultMessage: "Limit"
|
|
178
|
+
}),
|
|
179
|
+
numericValidationError: intl.formatMessage({
|
|
180
|
+
id: "DS.FACTORS.ARRAY.NUMERIC_VALIDATION_ERROR",
|
|
181
|
+
defaultMessage: "Some of the values are not a number"
|
|
182
|
+
}),
|
|
183
|
+
stringUnclosedBacktickError: intl.formatMessage({
|
|
184
|
+
id: "DS.FACTORS.ARRAY.UNCLOSED_BACKTICK_ERROR",
|
|
185
|
+
defaultMessage: "There's an unclosed backtick sequence in the string"
|
|
186
|
+
}),
|
|
187
|
+
limitReached: intl.formatMessage({
|
|
188
|
+
id: "DS.FACTORS.ARRAY.LIMIT_REACHED",
|
|
189
|
+
defaultMessage: "Limit has been reached"
|
|
190
|
+
}),
|
|
191
|
+
limitExceeded: intl.formatMessage({
|
|
192
|
+
id: "DS.FACTORS.ARRAY.LIMIT_EXCEEDED",
|
|
193
|
+
defaultMessage: "Adding these items will exceed maximum items limit"
|
|
194
|
+
}),
|
|
195
|
+
copiedTooltip: intl.formatMessage({
|
|
196
|
+
id: "DS.FACTORS.ARRAY.COPIED",
|
|
197
|
+
defaultMessage: "Copied"
|
|
198
|
+
}),
|
|
199
|
+
copyTooltip: intl.formatMessage({
|
|
200
|
+
id: "DS.FACTORS.ARRAY.COPY-VALUE",
|
|
201
|
+
defaultMessage: "Copy value"
|
|
202
|
+
})
|
|
203
|
+
},
|
|
204
|
+
parameter: {
|
|
205
|
+
searchPlaceholder: intl.formatMessage({
|
|
206
|
+
id: "DS.FACTORS.PARAMETER.SEARCH_PLACEHOLDER",
|
|
207
|
+
defaultMessage: "Search"
|
|
208
|
+
}),
|
|
209
|
+
noResults: intl.formatMessage({
|
|
210
|
+
id: "DS.FACTORS.PARAMETER.NO_RESULTS",
|
|
211
|
+
defaultMessage: "No results"
|
|
212
|
+
}),
|
|
213
|
+
loadingParameter: intl.formatMessage({
|
|
214
|
+
id: "DS.FACTORS.PARAMETER.LOADING_PARAMETERS",
|
|
215
|
+
defaultMessage: "Loading parameters"
|
|
216
|
+
}),
|
|
217
|
+
showMore: intl.formatMessage({
|
|
218
|
+
id: "DS.FACTORS.PARAMETER.SHOW_MORE",
|
|
219
|
+
defaultMessage: "Show more"
|
|
220
|
+
}),
|
|
221
|
+
recentItemsGroupName: intl.formatMessage({
|
|
222
|
+
id: "DS.FACTORS.PARAMETER.RECENT",
|
|
223
|
+
defaultMessage: "Recent"
|
|
224
|
+
}),
|
|
225
|
+
allItemsGroupName: intl.formatMessage({
|
|
226
|
+
id: "DS.FACTORS.PARAMETER.ALL",
|
|
227
|
+
defaultMessage: "All"
|
|
228
|
+
})
|
|
229
|
+
},
|
|
230
|
+
valuePlaceholder: intl.formatMessage({
|
|
231
|
+
id: "DS.FACTORS.VALUE_PLACEHOLDER",
|
|
232
|
+
defaultMessage: "Value"
|
|
233
|
+
}),
|
|
234
|
+
modalApply: intl.formatMessage({
|
|
235
|
+
id: "DS.FACTORS.MODAL_APPLY",
|
|
236
|
+
defaultMessage: "Apply"
|
|
237
|
+
}),
|
|
238
|
+
modalCancel: intl.formatMessage({
|
|
239
|
+
id: "DS.FACTORS.MODAL_CANCEL",
|
|
240
|
+
defaultMessage: "Cancel"
|
|
241
|
+
}),
|
|
242
|
+
modalTitle: intl.formatMessage({
|
|
243
|
+
id: "DS.FACTORS.MODAL_TITLE",
|
|
244
|
+
defaultMessage: "Value"
|
|
245
|
+
}),
|
|
246
|
+
factorTypes: {
|
|
247
|
+
text: intl.formatMessage({
|
|
248
|
+
id: "DS.FACTORS.FACTOR_TYPES.TEXT",
|
|
249
|
+
defaultMessage: "Text"
|
|
250
|
+
}),
|
|
251
|
+
number: intl.formatMessage({
|
|
252
|
+
id: "DS.FACTORS.FACTOR_TYPES.NUMBER",
|
|
253
|
+
defaultMessage: "Number"
|
|
254
|
+
}),
|
|
255
|
+
parameter: intl.formatMessage({
|
|
256
|
+
id: "DS.FACTORS.FACTOR_TYPES.PARAMETER",
|
|
257
|
+
defaultMessage: "Parameter"
|
|
258
|
+
}),
|
|
259
|
+
contextParameter: intl.formatMessage({
|
|
260
|
+
id: "DS.FACTORS.FACTOR_TYPES.CONTEXT_PARAMETER",
|
|
261
|
+
defaultMessage: "Context parameter"
|
|
262
|
+
}),
|
|
263
|
+
dynamicKey: intl.formatMessage({
|
|
264
|
+
id: "DS.FACTORS.FACTOR_TYPES.DYNAMIC_KEY",
|
|
265
|
+
defaultMessage: "Dynamic key"
|
|
266
|
+
}),
|
|
267
|
+
formula: intl.formatMessage({
|
|
268
|
+
id: "DS.FACTORS.FACTOR_TYPES.FORMULA",
|
|
269
|
+
defaultMessage: "Formula"
|
|
270
|
+
}),
|
|
271
|
+
array: intl.formatMessage({
|
|
272
|
+
id: "DS.FACTORS.FACTOR_TYPES.ARRAY",
|
|
273
|
+
defaultMessage: "Array"
|
|
274
|
+
}),
|
|
275
|
+
date: intl.formatMessage({
|
|
276
|
+
id: "DS.FACTORS.FACTOR_TYPES.DATE",
|
|
277
|
+
defaultMessage: "Date"
|
|
278
|
+
}),
|
|
279
|
+
relativeDate: intl.formatMessage({
|
|
280
|
+
id: "DS.FACTORS.FACTOR_TYPES.RELATIVE_DATE",
|
|
281
|
+
defaultMessage: "Relative date"
|
|
282
|
+
}),
|
|
283
|
+
dateRange: intl.formatMessage({
|
|
284
|
+
id: "DS.FACTORS.FACTOR_TYPES.DATE_RANGE",
|
|
285
|
+
defaultMessage: "Date range"
|
|
286
|
+
})
|
|
287
|
+
}
|
|
288
|
+
}, defaultTexts), [defaultTexts, intl]);
|
|
296
289
|
return texts;
|
|
297
|
-
};
|
|
290
|
+
};
|
|
291
|
+
export {
|
|
292
|
+
useTexts
|
|
293
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { default as default2, FACTOR_TYPE_MAPPING } from "./Factors.js";
|
|
2
|
+
import { ALL_FACTOR_TYPES } from "./Factors.types.js";
|
|
3
|
+
export {
|
|
4
|
+
ALL_FACTOR_TYPES,
|
|
5
|
+
default2 as default,
|
|
6
|
+
FACTOR_TYPE_MAPPING as factorTypes
|
|
7
|
+
};
|
package/dist/modules.d.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
File without changes
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const Group: import(
|
|
1
|
+
export declare const Group: import('styled-components').StyledComponent<({ children, label, errors, description, resetMargin, tooltip, tooltipConfig, ...antdInputGroupProps }: import('@synerise/ds-input/dist/InputGroup.types').Props) => React.JSX.Element, any, {
|
|
2
2
|
withoutTypeSelector: boolean;
|
|
3
3
|
}, never>;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import styled from
|
|
2
|
-
import { InputGroup } from
|
|
3
|
-
import { OuterWrapper } from
|
|
4
|
-
import {
|
|
5
|
-
import { FactorInput } from
|
|
6
|
-
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { InputGroup } from "@synerise/ds-input";
|
|
3
|
+
import { OuterWrapper } from "@synerise/ds-input/dist/Input.styles";
|
|
4
|
+
import { InputGroupWrapper, InputGroupItem } from "@synerise/ds-input/dist/InputGroup.styles";
|
|
5
|
+
import { FactorInput } from "../FactorValue/FactorValue.style.js";
|
|
6
|
+
const Group = /* @__PURE__ */ styled(InputGroup).withConfig({
|
|
7
7
|
displayName: "Factorsstyle__Group",
|
|
8
8
|
componentId: "sc-1kkuis0-0"
|
|
9
|
-
})(["&&&{display:flex;> ", "{flex-grow:1;min-width:0;> .ds-input-group-item-0{", "}> .ds-input-group-item-1{.ant-btn{border-radius:0 3px 3px 0;}}}&.ds-factors-parameter,&.ds-factors-contextParameter,&.ds-factors-formula{", "{&.ds-input-group-item-1{flex-grow:0;}}}&.ds-factors-text,&.ds-factors-array{", "{&.ds-input-group-item-1{min-width:0;}}}", "{margin:0;}", "{> *{border-radius:", ";}}}"], InputGroupWrapper,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
9
|
+
})(["&&&{display:flex;> ", "{flex-grow:1;min-width:0;> .ds-input-group-item-0{", "}> .ds-input-group-item-1{.ant-btn{border-radius:0 3px 3px 0;}}}&.ds-factors-parameter,&.ds-factors-contextParameter,&.ds-factors-formula{", "{&.ds-input-group-item-1{flex-grow:0;}}}&.ds-factors-text,&.ds-factors-array{", "{&.ds-input-group-item-1{min-width:0;}}}", "{margin:0;}", "{> *{border-radius:", ";}}}"], InputGroupWrapper, (props) => props.withoutTypeSelector ? "" : "flex: 0 0 auto", InputGroupItem, InputGroupItem, OuterWrapper, FactorInput, (props) => props.withoutTypeSelector ? "3px" : "0 3px 3px 0");
|
|
10
|
+
export {
|
|
11
|
+
Group
|
|
12
|
+
};
|