@atlaskit/smart-user-picker 6.0.3 → 6.0.5
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 +12 -0
- package/dist/cjs/analytics.js +12 -37
- package/dist/cjs/components/MessagesIntlProvider.js +4 -22
- package/dist/cjs/components/SmartUserPicker.js +22 -123
- package/dist/cjs/components/index.js +0 -7
- package/dist/cjs/i18n/cs.js +0 -1
- package/dist/cjs/i18n/da.js +0 -1
- package/dist/cjs/i18n/de.js +0 -1
- package/dist/cjs/i18n/en_ZZ.js +0 -1
- package/dist/cjs/i18n/es.js +0 -1
- package/dist/cjs/i18n/et.js +0 -1
- package/dist/cjs/i18n/fi.js +0 -1
- package/dist/cjs/i18n/fr.js +0 -1
- package/dist/cjs/i18n/hu.js +0 -1
- package/dist/cjs/i18n/index.js +0 -31
- package/dist/cjs/i18n/it.js +0 -1
- package/dist/cjs/i18n/ja.js +0 -1
- package/dist/cjs/i18n/ko.js +0 -1
- package/dist/cjs/i18n/nb.js +0 -1
- package/dist/cjs/i18n/nl.js +0 -1
- package/dist/cjs/i18n/pl.js +0 -1
- package/dist/cjs/i18n/pt_BR.js +0 -1
- package/dist/cjs/i18n/pt_PT.js +0 -1
- package/dist/cjs/i18n/ru.js +0 -1
- package/dist/cjs/i18n/sk.js +0 -1
- package/dist/cjs/i18n/sv.js +0 -1
- package/dist/cjs/i18n/th.js +0 -1
- package/dist/cjs/i18n/tr.js +0 -1
- package/dist/cjs/i18n/uk.js +0 -1
- package/dist/cjs/i18n/vi.js +0 -1
- package/dist/cjs/i18n/zh.js +0 -1
- package/dist/cjs/i18n/zh_TW.js +0 -1
- package/dist/cjs/i18n.js +0 -2
- package/dist/cjs/index.js +0 -4
- package/dist/cjs/service/default-value-hydration-client.js +0 -49
- package/dist/cjs/service/graphqlUtils.js +0 -5
- package/dist/cjs/service/index.js +0 -3
- package/dist/cjs/service/recommendation-client.js +0 -11
- package/dist/cjs/service/teams-client.js +0 -10
- package/dist/cjs/service/users-client.js +2 -20
- package/dist/cjs/service/users-transformer.js +0 -17
- package/dist/cjs/types.js +0 -1
- package/dist/cjs/ufoExperiences.js +8 -26
- package/dist/cjs/util/i18n-util.js +0 -43
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/analytics.js +12 -10
- package/dist/es2019/components/MessagesIntlProvider.js +2 -4
- package/dist/es2019/components/SmartUserPicker.js +23 -55
- package/dist/es2019/components/index.js +0 -2
- package/dist/es2019/config/index.js +0 -4
- package/dist/es2019/index.js +4 -2
- package/dist/es2019/service/default-value-hydration-client.js +4 -22
- package/dist/es2019/service/graphqlUtils.js +0 -4
- package/dist/es2019/service/recommendation-client.js +0 -4
- package/dist/es2019/service/teams-client.js +2 -5
- package/dist/es2019/service/users-client.js +2 -6
- package/dist/es2019/service/users-transformer.js +0 -11
- package/dist/es2019/types.js +0 -1
- package/dist/es2019/ufoExperiences.js +8 -7
- package/dist/es2019/util/i18n-util.js +30 -120
- package/dist/es2019/version.json +1 -1
- package/dist/esm/analytics.js +12 -19
- package/dist/esm/components/MessagesIntlProvider.js +4 -11
- package/dist/esm/components/SmartUserPicker.js +24 -115
- package/dist/esm/components/index.js +0 -2
- package/dist/esm/index.js +4 -2
- package/dist/esm/service/default-value-hydration-client.js +0 -40
- package/dist/esm/service/graphqlUtils.js +0 -4
- package/dist/esm/service/recommendation-client.js +0 -7
- package/dist/esm/service/teams-client.js +0 -7
- package/dist/esm/service/users-client.js +2 -13
- package/dist/esm/service/users-transformer.js +0 -13
- package/dist/esm/types.js +0 -1
- package/dist/esm/ufoExperiences.js +8 -13
- package/dist/esm/util/i18n-util.js +30 -126
- package/dist/esm/version.json +1 -1
- package/package.json +7 -14
- package/report.api.md +26 -5
- package/tmp/api-report-tmp.d.ts +268 -0
- package/dist/types-ts4.0/analytics.d.ts +0 -21
- package/dist/types-ts4.0/components/MessagesIntlProvider.d.ts +0 -9
- package/dist/types-ts4.0/components/SmartUserPicker.d.ts +0 -34
- package/dist/types-ts4.0/components/index.d.ts +0 -4
- package/dist/types-ts4.0/config/index.d.ts +0 -6
- package/dist/types-ts4.0/i18n/cs.d.ts +0 -18
- package/dist/types-ts4.0/i18n/da.d.ts +0 -18
- package/dist/types-ts4.0/i18n/de.d.ts +0 -18
- package/dist/types-ts4.0/i18n/en.d.ts +0 -7
- package/dist/types-ts4.0/i18n/en_GB.d.ts +0 -7
- package/dist/types-ts4.0/i18n/en_ZZ.d.ts +0 -18
- package/dist/types-ts4.0/i18n/es.d.ts +0 -18
- package/dist/types-ts4.0/i18n/et.d.ts +0 -8
- package/dist/types-ts4.0/i18n/fi.d.ts +0 -18
- package/dist/types-ts4.0/i18n/fr.d.ts +0 -18
- package/dist/types-ts4.0/i18n/hu.d.ts +0 -18
- package/dist/types-ts4.0/i18n/index.d.ts +0 -36
- package/dist/types-ts4.0/i18n/is.d.ts +0 -7
- package/dist/types-ts4.0/i18n/it.d.ts +0 -18
- package/dist/types-ts4.0/i18n/ja.d.ts +0 -18
- package/dist/types-ts4.0/i18n/ko.d.ts +0 -18
- package/dist/types-ts4.0/i18n/languages.d.ts +0 -27
- package/dist/types-ts4.0/i18n/nb.d.ts +0 -18
- package/dist/types-ts4.0/i18n/nl.d.ts +0 -18
- package/dist/types-ts4.0/i18n/pl.d.ts +0 -18
- package/dist/types-ts4.0/i18n/pt_BR.d.ts +0 -18
- package/dist/types-ts4.0/i18n/pt_PT.d.ts +0 -8
- package/dist/types-ts4.0/i18n/ro.d.ts +0 -7
- package/dist/types-ts4.0/i18n/ru.d.ts +0 -18
- package/dist/types-ts4.0/i18n/sk.d.ts +0 -8
- package/dist/types-ts4.0/i18n/sv.d.ts +0 -18
- package/dist/types-ts4.0/i18n/th.d.ts +0 -18
- package/dist/types-ts4.0/i18n/tr.d.ts +0 -18
- package/dist/types-ts4.0/i18n/uk.d.ts +0 -18
- package/dist/types-ts4.0/i18n/vi.d.ts +0 -18
- package/dist/types-ts4.0/i18n/zh.d.ts +0 -18
- package/dist/types-ts4.0/i18n/zh_TW.d.ts +0 -18
- package/dist/types-ts4.0/i18n.d.ts +0 -47
- package/dist/types-ts4.0/index.d.ts +0 -5
- package/dist/types-ts4.0/service/constants.d.ts +0 -4
- package/dist/types-ts4.0/service/default-value-hydration-client.d.ts +0 -8
- package/dist/types-ts4.0/service/graphqlUtils.d.ts +0 -14
- package/dist/types-ts4.0/service/index.d.ts +0 -2
- package/dist/types-ts4.0/service/recommendation-client.d.ts +0 -5
- package/dist/types-ts4.0/service/teams-client.d.ts +0 -12
- package/dist/types-ts4.0/service/users-client.d.ts +0 -11
- package/dist/types-ts4.0/service/users-transformer.d.ts +0 -22
- package/dist/types-ts4.0/types.d.ts +0 -207
- package/dist/types-ts4.0/ufoExperiences.d.ts +0 -11
- package/dist/types-ts4.0/util/i18n-util.d.ts +0 -11
|
@@ -12,219 +12,129 @@ export const getMessagesForLocale = async locale => {
|
|
|
12
12
|
switch (locale) {
|
|
13
13
|
case 'cs':
|
|
14
14
|
{
|
|
15
|
-
return import(
|
|
16
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-cs" */
|
|
17
|
-
'../i18n/cs').then(mod => mod.default);
|
|
15
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-cs" */'../i18n/cs').then(mod => mod.default);
|
|
18
16
|
}
|
|
19
|
-
|
|
20
17
|
case 'da':
|
|
21
18
|
{
|
|
22
|
-
return import(
|
|
23
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-da" */
|
|
24
|
-
'../i18n/da').then(mod => mod.default);
|
|
19
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-da" */'../i18n/da').then(mod => mod.default);
|
|
25
20
|
}
|
|
26
|
-
|
|
27
21
|
case 'de':
|
|
28
22
|
{
|
|
29
|
-
return import(
|
|
30
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-de" */
|
|
31
|
-
'../i18n/de').then(mod => mod.default);
|
|
23
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-de" */'../i18n/de').then(mod => mod.default);
|
|
32
24
|
}
|
|
33
|
-
|
|
34
25
|
case 'en':
|
|
35
26
|
{
|
|
36
|
-
return import(
|
|
37
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-en" */
|
|
38
|
-
'../i18n/en').then(mod => mod.default);
|
|
27
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-en" */'../i18n/en').then(mod => mod.default);
|
|
39
28
|
}
|
|
40
|
-
|
|
41
29
|
case 'en_GB':
|
|
42
30
|
{
|
|
43
|
-
return import(
|
|
44
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-en_GB" */
|
|
45
|
-
'../i18n/en_GB').then(mod => mod.default);
|
|
31
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-en_GB" */'../i18n/en_GB').then(mod => mod.default);
|
|
46
32
|
}
|
|
47
|
-
|
|
48
33
|
case 'es':
|
|
49
34
|
{
|
|
50
|
-
return import(
|
|
51
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-es" */
|
|
52
|
-
'../i18n/es').then(mod => mod.default);
|
|
35
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-es" */'../i18n/es').then(mod => mod.default);
|
|
53
36
|
}
|
|
54
|
-
|
|
55
37
|
case 'et':
|
|
56
38
|
{
|
|
57
|
-
return import(
|
|
58
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-et" */
|
|
59
|
-
'../i18n/et').then(mod => mod.default);
|
|
39
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-et" */'../i18n/et').then(mod => mod.default);
|
|
60
40
|
}
|
|
61
|
-
|
|
62
41
|
case 'fi':
|
|
63
42
|
{
|
|
64
|
-
return import(
|
|
65
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-fi" */
|
|
66
|
-
'../i18n/fi').then(mod => mod.default);
|
|
43
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-fi" */'../i18n/fi').then(mod => mod.default);
|
|
67
44
|
}
|
|
68
|
-
|
|
69
45
|
case 'fr':
|
|
70
46
|
{
|
|
71
|
-
return import(
|
|
72
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-fr" */
|
|
73
|
-
'../i18n/fr').then(mod => mod.default);
|
|
47
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-fr" */'../i18n/fr').then(mod => mod.default);
|
|
74
48
|
}
|
|
75
|
-
|
|
76
49
|
case 'hu':
|
|
77
50
|
{
|
|
78
|
-
return import(
|
|
79
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-hu" */
|
|
80
|
-
'../i18n/hu').then(mod => mod.default);
|
|
51
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-hu" */'../i18n/hu').then(mod => mod.default);
|
|
81
52
|
}
|
|
82
|
-
|
|
83
53
|
case 'is':
|
|
84
54
|
{
|
|
85
|
-
return import(
|
|
86
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-is" */
|
|
87
|
-
'../i18n/is').then(mod => mod.default);
|
|
55
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-is" */'../i18n/is').then(mod => mod.default);
|
|
88
56
|
}
|
|
89
|
-
|
|
90
57
|
case 'it':
|
|
91
58
|
{
|
|
92
|
-
return import(
|
|
93
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-it" */
|
|
94
|
-
'../i18n/it').then(mod => mod.default);
|
|
59
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-it" */'../i18n/it').then(mod => mod.default);
|
|
95
60
|
}
|
|
96
|
-
|
|
97
61
|
case 'ja':
|
|
98
62
|
{
|
|
99
|
-
return import(
|
|
100
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-ja" */
|
|
101
|
-
'../i18n/ja').then(mod => mod.default);
|
|
63
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-ja" */'../i18n/ja').then(mod => mod.default);
|
|
102
64
|
}
|
|
103
|
-
|
|
104
65
|
case 'ko':
|
|
105
66
|
{
|
|
106
|
-
return import(
|
|
107
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-ko" */
|
|
108
|
-
'../i18n/ko').then(mod => mod.default);
|
|
67
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-ko" */'../i18n/ko').then(mod => mod.default);
|
|
109
68
|
}
|
|
110
|
-
|
|
111
69
|
case 'nb':
|
|
112
70
|
{
|
|
113
|
-
return import(
|
|
114
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-nb" */
|
|
115
|
-
'../i18n/nb').then(mod => mod.default);
|
|
71
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-nb" */'../i18n/nb').then(mod => mod.default);
|
|
116
72
|
}
|
|
117
|
-
|
|
118
73
|
case 'nl':
|
|
119
74
|
{
|
|
120
|
-
return import(
|
|
121
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-nl" */
|
|
122
|
-
'../i18n/nl').then(mod => mod.default);
|
|
75
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-nl" */'../i18n/nl').then(mod => mod.default);
|
|
123
76
|
}
|
|
124
|
-
|
|
125
77
|
case 'pl':
|
|
126
78
|
{
|
|
127
|
-
return import(
|
|
128
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-pl" */
|
|
129
|
-
'../i18n/pl').then(mod => mod.default);
|
|
79
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-pl" */'../i18n/pl').then(mod => mod.default);
|
|
130
80
|
}
|
|
131
|
-
|
|
132
81
|
case 'pt_BR':
|
|
133
82
|
case 'pt-BR':
|
|
134
83
|
{
|
|
135
|
-
return import(
|
|
136
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-pt_BR" */
|
|
137
|
-
'../i18n/pt_BR').then(mod => mod.default);
|
|
84
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-pt_BR" */'../i18n/pt_BR').then(mod => mod.default);
|
|
138
85
|
}
|
|
139
|
-
|
|
140
86
|
case 'pt_PT':
|
|
141
87
|
case 'pt-PT':
|
|
142
88
|
{
|
|
143
|
-
return import(
|
|
144
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-pt_PT" */
|
|
145
|
-
'../i18n/pt_PT').then(mod => mod.default);
|
|
89
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-pt_PT" */'../i18n/pt_PT').then(mod => mod.default);
|
|
146
90
|
}
|
|
147
|
-
|
|
148
91
|
case 'ro':
|
|
149
92
|
{
|
|
150
|
-
return import(
|
|
151
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-ro" */
|
|
152
|
-
'../i18n/ro').then(mod => mod.default);
|
|
93
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-ro" */'../i18n/ro').then(mod => mod.default);
|
|
153
94
|
}
|
|
154
|
-
|
|
155
95
|
case 'ru':
|
|
156
96
|
{
|
|
157
|
-
return import(
|
|
158
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-ru" */
|
|
159
|
-
'../i18n/ru').then(mod => mod.default);
|
|
97
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-ru" */'../i18n/ru').then(mod => mod.default);
|
|
160
98
|
}
|
|
161
|
-
|
|
162
99
|
case 'sk':
|
|
163
100
|
{
|
|
164
|
-
return import(
|
|
165
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-sk" */
|
|
166
|
-
'../i18n/sk').then(mod => mod.default);
|
|
101
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-sk" */'../i18n/sk').then(mod => mod.default);
|
|
167
102
|
}
|
|
168
|
-
|
|
169
103
|
case 'sv':
|
|
170
104
|
{
|
|
171
|
-
return import(
|
|
172
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-sv" */
|
|
173
|
-
'../i18n/sv').then(mod => mod.default);
|
|
105
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-sv" */'../i18n/sv').then(mod => mod.default);
|
|
174
106
|
}
|
|
175
|
-
|
|
176
107
|
case 'th':
|
|
177
108
|
{
|
|
178
|
-
return import(
|
|
179
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-th" */
|
|
180
|
-
'../i18n/th').then(mod => mod.default);
|
|
109
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-th" */'../i18n/th').then(mod => mod.default);
|
|
181
110
|
}
|
|
182
|
-
|
|
183
111
|
case 'tr':
|
|
184
112
|
{
|
|
185
|
-
return import(
|
|
186
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-tr" */
|
|
187
|
-
'../i18n/tr').then(mod => mod.default);
|
|
113
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-tr" */'../i18n/tr').then(mod => mod.default);
|
|
188
114
|
}
|
|
189
|
-
|
|
190
115
|
case 'uk':
|
|
191
116
|
{
|
|
192
|
-
return import(
|
|
193
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-uk" */
|
|
194
|
-
'../i18n/uk').then(mod => mod.default);
|
|
117
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-uk" */'../i18n/uk').then(mod => mod.default);
|
|
195
118
|
}
|
|
196
|
-
|
|
197
119
|
case 'vi':
|
|
198
120
|
{
|
|
199
|
-
return import(
|
|
200
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-vi" */
|
|
201
|
-
'../i18n/vi').then(mod => mod.default);
|
|
121
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-vi" */'../i18n/vi').then(mod => mod.default);
|
|
202
122
|
}
|
|
203
|
-
|
|
204
123
|
case 'zh_TW':
|
|
205
124
|
{
|
|
206
|
-
return import(
|
|
207
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-zh_TW" */
|
|
208
|
-
'../i18n/zh_TW').then(mod => mod.default);
|
|
125
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-zh_TW" */'../i18n/zh_TW').then(mod => mod.default);
|
|
209
126
|
}
|
|
210
|
-
|
|
211
127
|
case 'zh':
|
|
212
128
|
{
|
|
213
|
-
return import(
|
|
214
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-zh" */
|
|
215
|
-
'../i18n/zh').then(mod => mod.default);
|
|
129
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-zh" */'../i18n/zh').then(mod => mod.default);
|
|
216
130
|
}
|
|
217
|
-
|
|
218
131
|
default:
|
|
219
132
|
{
|
|
220
133
|
const fragments = locale.split(/[_-]/);
|
|
221
|
-
|
|
222
134
|
if (fragments.length === 2) {
|
|
223
135
|
return getMessagesForLocale(fragments[0]);
|
|
224
136
|
} else {
|
|
225
|
-
return import(
|
|
226
|
-
/* webpackChunkName: "@atlaskit-internal_user-picker-i18n-en" */
|
|
227
|
-
'../i18n/en').then(mod => mod.default);
|
|
137
|
+
return import( /* webpackChunkName: "@atlaskit-internal_user-picker-i18n-en" */'../i18n/en').then(mod => mod.default);
|
|
228
138
|
}
|
|
229
139
|
}
|
|
230
140
|
}
|
package/dist/es2019/version.json
CHANGED
package/dist/esm/analytics.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
|
|
3
2
|
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
|
-
|
|
5
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; }
|
|
6
|
-
|
|
7
4
|
import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
8
5
|
import { v4 as uuid } from 'uuid';
|
|
9
6
|
import versionJson from './version.json';
|
|
@@ -20,7 +17,6 @@ export var startSession = function startSession() {
|
|
|
20
17
|
};
|
|
21
18
|
};
|
|
22
19
|
export var createAndFireEventInElementsChannel = createAndFireEvent('fabric-elements');
|
|
23
|
-
|
|
24
20
|
var createEvent = function createEvent(eventType, action, actionSubject) {
|
|
25
21
|
var attributes = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
26
22
|
return {
|
|
@@ -33,22 +29,21 @@ var createEvent = function createEvent(eventType, action, actionSubject) {
|
|
|
33
29
|
}, attributes)
|
|
34
30
|
};
|
|
35
31
|
};
|
|
36
|
-
|
|
37
32
|
var createDefaultSmartPickerAttributes = function createDefaultSmartPickerAttributes(props, state) {
|
|
38
33
|
var fieldId = props.fieldId,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
34
|
+
objectId = props.objectId,
|
|
35
|
+
containerId = props.containerId,
|
|
36
|
+
childObjectId = props.childObjectId,
|
|
37
|
+
prefetch = props.prefetch,
|
|
38
|
+
maxOptions = props.maxOptions,
|
|
39
|
+
includeTeams = props.includeTeams,
|
|
40
|
+
productKey = props.productKey,
|
|
41
|
+
principalId = props.principalId,
|
|
42
|
+
siteId = props.siteId,
|
|
43
|
+
orgId = props.orgId,
|
|
44
|
+
filterOptions = props.filterOptions;
|
|
50
45
|
var sessionId = state.sessionId,
|
|
51
|
-
|
|
46
|
+
query = state.query;
|
|
52
47
|
var maxNumberOfResults = maxOptions || 100;
|
|
53
48
|
return {
|
|
54
49
|
context: fieldId,
|
|
@@ -67,14 +62,12 @@ var createDefaultSmartPickerAttributes = function createDefaultSmartPickerAttrib
|
|
|
67
62
|
sessionId: sessionId
|
|
68
63
|
};
|
|
69
64
|
};
|
|
70
|
-
|
|
71
65
|
var createSmartUserPickerEvent = function createSmartUserPickerEvent(action, actionSubect) {
|
|
72
66
|
var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
73
67
|
return _objectSpread({
|
|
74
68
|
source: 'smart-user-picker'
|
|
75
69
|
}, createEvent('operational', action, actionSubect, attributes));
|
|
76
70
|
};
|
|
77
|
-
|
|
78
71
|
export var preparedUsersLoadedEvent = function preparedUsersLoadedEvent(props, state) {
|
|
79
72
|
var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
80
73
|
return createSmartUserPickerEvent('loaded', 'preparedUsers', _objectSpread(_objectSpread({}, createDefaultSmartPickerAttributes(props, state)), attributes));
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
-
|
|
4
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; }
|
|
5
|
-
|
|
6
4
|
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; }
|
|
7
|
-
|
|
8
5
|
import React, { useMemo } from 'react';
|
|
9
6
|
import { IntlProvider, injectIntl } from 'react-intl-next';
|
|
10
7
|
import { getMessagesForLocale } from '../util/i18n-util';
|
|
11
8
|
var EMPTY = {};
|
|
12
|
-
|
|
13
9
|
var useI18n = function useI18n(locale) {
|
|
14
10
|
var _React$useState = React.useState(EMPTY),
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
12
|
+
messages = _React$useState2[0],
|
|
13
|
+
setMessages = _React$useState2[1];
|
|
19
14
|
React.useEffect(function () {
|
|
20
15
|
var aborted = false;
|
|
21
16
|
setMessages(EMPTY);
|
|
@@ -33,10 +28,9 @@ var useI18n = function useI18n(locale) {
|
|
|
33
28
|
}, [locale]);
|
|
34
29
|
return messages;
|
|
35
30
|
};
|
|
36
|
-
|
|
37
31
|
var MessagesIntlProvider = function MessagesIntlProvider(props) {
|
|
38
32
|
var intl = props.intl,
|
|
39
|
-
|
|
33
|
+
children = props.children;
|
|
40
34
|
var messages = useI18n(intl.locale);
|
|
41
35
|
var mergedMessages = useMemo(function () {
|
|
42
36
|
return _objectSpread(_objectSpread({}, intl.messages), messages);
|
|
@@ -46,5 +40,4 @@ var MessagesIntlProvider = function MessagesIntlProvider(props) {
|
|
|
46
40
|
messages: mergedMessages
|
|
47
41
|
}, children);
|
|
48
42
|
};
|
|
49
|
-
|
|
50
43
|
export default injectIntl(MessagesIntlProvider);
|