@bigbinary/neeto-team-members-frontend 5.0.28 → 5.0.30

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.
Files changed (194) hide show
  1. package/app/javascript/src/translations/ar.json +6 -4
  2. package/app/javascript/src/translations/bg.json +6 -4
  3. package/app/javascript/src/translations/ca.json +8 -6
  4. package/app/javascript/src/translations/cs.json +4 -2
  5. package/app/javascript/src/translations/da.json +4 -2
  6. package/app/javascript/src/translations/de.json +4 -2
  7. package/app/javascript/src/translations/en.json +8 -6
  8. package/app/javascript/src/translations/es-MX.json +8 -6
  9. package/app/javascript/src/translations/es.json +8 -6
  10. package/app/javascript/src/translations/et.json +6 -4
  11. package/app/javascript/src/translations/fi.json +4 -2
  12. package/app/javascript/src/translations/fil.json +9 -7
  13. package/app/javascript/src/translations/fr.json +5 -3
  14. package/app/javascript/src/translations/he.json +5 -3
  15. package/app/javascript/src/translations/hi.json +7 -5
  16. package/app/javascript/src/translations/hr.json +4 -2
  17. package/app/javascript/src/translations/hu.json +4 -2
  18. package/app/javascript/src/translations/id.json +10 -8
  19. package/app/javascript/src/translations/it.json +8 -6
  20. package/app/javascript/src/translations/ja.json +6 -4
  21. package/app/javascript/src/translations/ko.json +4 -2
  22. package/app/javascript/src/translations/nl.json +7 -5
  23. package/app/javascript/src/translations/pl.json +5 -3
  24. package/app/javascript/src/translations/pt-BR.json +10 -8
  25. package/app/javascript/src/translations/pt.json +10 -8
  26. package/app/javascript/src/translations/ro.json +9 -7
  27. package/app/javascript/src/translations/ru.json +5 -3
  28. package/app/javascript/src/translations/sk.json +6 -4
  29. package/app/javascript/src/translations/sl.json +7 -5
  30. package/app/javascript/src/translations/sv.json +4 -2
  31. package/app/javascript/src/translations/th.json +5 -3
  32. package/app/javascript/src/translations/tr.json +10 -8
  33. package/app/javascript/src/translations/uk.json +7 -5
  34. package/app/javascript/src/translations/vi.json +7 -5
  35. package/app/javascript/src/translations/zh-CN.json +6 -4
  36. package/app/javascript/src/translations/zh-TW.json +5 -3
  37. package/dist/.ready +1 -1
  38. package/dist/ActionBlock-C9Iy0jGZ.js +53 -0
  39. package/dist/ActionBlock-C9Iy0jGZ.js.map +1 -0
  40. package/dist/ActionBlock-jgw1N-As.js +46 -0
  41. package/dist/ActionBlock-jgw1N-As.js.map +1 -0
  42. package/dist/Groups.js +1 -0
  43. package/dist/Groups.js.map +1 -1
  44. package/dist/InviteLinkError-AphtWLhe.js +63 -0
  45. package/dist/InviteLinkError-AphtWLhe.js.map +1 -0
  46. package/dist/InviteLinkError-C6OLGrD0.js +41 -0
  47. package/dist/InviteLinkError-C6OLGrD0.js.map +1 -0
  48. package/dist/ManageMember.js +3 -2
  49. package/dist/ManageMember.js.map +1 -1
  50. package/dist/MembersInvite.js +1 -38
  51. package/dist/MembersInvite.js.map +1 -1
  52. package/dist/Permissions-Bd6kLoPt.js +233 -0
  53. package/dist/Permissions-Bd6kLoPt.js.map +1 -0
  54. package/dist/Permissions-Bn862irP.js +244 -0
  55. package/dist/Permissions-Bn862irP.js.map +1 -0
  56. package/dist/Profile.js +125 -106
  57. package/dist/Profile.js.map +1 -1
  58. package/dist/{ProfileImage-Cpprgo-V.js → ProfileImage-QeSzsfzl.js} +1 -7
  59. package/dist/{ProfileImage-B_gfcE6b.js.map → ProfileImage-QeSzsfzl.js.map} +1 -1
  60. package/dist/{ProfileImage-B_gfcE6b.js → ProfileImage-Ypf3HreX.js} +2 -7
  61. package/dist/{ProfileImage-Cpprgo-V.js.map → ProfileImage-Ypf3HreX.js.map} +1 -1
  62. package/dist/Roles.js +3 -1398
  63. package/dist/Roles.js.map +1 -1
  64. package/dist/RolesRadioGroup-fBmS68cW.js +393 -0
  65. package/dist/RolesRadioGroup-fBmS68cW.js.map +1 -0
  66. package/dist/RolesRadioGroup-tSNC-Wtu.js +352 -0
  67. package/dist/RolesRadioGroup-tSNC-Wtu.js.map +1 -0
  68. package/dist/Select-CshPoN2b.js +119 -0
  69. package/dist/Select-CshPoN2b.js.map +1 -0
  70. package/dist/Select-DZ56UG-l.js +109 -0
  71. package/dist/Select-DZ56UG-l.js.map +1 -0
  72. package/dist/TeamMembers.js +3 -2
  73. package/dist/TeamMembers.js.map +1 -1
  74. package/dist/cjs/Groups.js +1 -0
  75. package/dist/cjs/Groups.js.map +1 -1
  76. package/dist/cjs/ManageMember.js +3 -2
  77. package/dist/cjs/ManageMember.js.map +1 -1
  78. package/dist/cjs/MembersInvite.js +2 -39
  79. package/dist/cjs/MembersInvite.js.map +1 -1
  80. package/dist/cjs/Profile.js +125 -104
  81. package/dist/cjs/Profile.js.map +1 -1
  82. package/dist/cjs/Roles.js +6 -1402
  83. package/dist/cjs/Roles.js.map +1 -1
  84. package/dist/cjs/TeamMembers.js +3 -2
  85. package/dist/cjs/TeamMembers.js.map +1 -1
  86. package/dist/cjs/index.js +6 -2
  87. package/dist/cjs/index.js.map +1 -1
  88. package/dist/cjs/utils.js +3 -512
  89. package/dist/cjs/utils.js.map +1 -1
  90. package/dist/cjs/v2/Groups.js +781 -0
  91. package/dist/cjs/v2/Groups.js.map +1 -0
  92. package/dist/cjs/v2/ManageMember.js +49 -0
  93. package/dist/cjs/v2/ManageMember.js.map +1 -0
  94. package/dist/cjs/v2/MembersDropdown.js +200 -0
  95. package/dist/cjs/v2/MembersDropdown.js.map +1 -0
  96. package/dist/cjs/v2/MembersInvite.js +270 -0
  97. package/dist/cjs/v2/MembersInvite.js.map +1 -0
  98. package/dist/cjs/v2/Permissions.js +19 -0
  99. package/dist/cjs/v2/Permissions.js.map +1 -0
  100. package/dist/cjs/v2/Profile.js +686 -0
  101. package/dist/cjs/v2/Profile.js.map +1 -0
  102. package/dist/cjs/v2/Roles.js +1258 -0
  103. package/dist/cjs/v2/Roles.js.map +1 -0
  104. package/dist/cjs/v2/RolesRadioGroup.js +26 -0
  105. package/dist/cjs/v2/RolesRadioGroup.js.map +1 -0
  106. package/dist/cjs/v2/TeamMembers.js +949 -0
  107. package/dist/cjs/v2/TeamMembers.js.map +1 -0
  108. package/dist/cjs/v2/TeamsAndMembersDropdown.js +438 -0
  109. package/dist/cjs/v2/TeamsAndMembersDropdown.js.map +1 -0
  110. package/dist/cjs/v2/TeamsDropdown.js +112 -0
  111. package/dist/cjs/v2/TeamsDropdown.js.map +1 -0
  112. package/dist/cjs/v2/constants.js +28 -0
  113. package/dist/cjs/v2/constants.js.map +1 -0
  114. package/dist/cjs/v2/hooks.js +33 -0
  115. package/dist/cjs/v2/hooks.js.map +1 -0
  116. package/dist/cjs/v2/utils.js +34 -0
  117. package/dist/cjs/v2/utils.js.map +1 -0
  118. package/dist/constants-B1L6arSR.js +49 -0
  119. package/dist/constants-B1L6arSR.js.map +1 -0
  120. package/dist/constants-CMNbKvoF.js +61 -0
  121. package/dist/constants-CMNbKvoF.js.map +1 -0
  122. package/dist/index-BkEJugj1.js +184 -0
  123. package/dist/index-BkEJugj1.js.map +1 -0
  124. package/dist/index-C6ph58Vg.js +169 -0
  125. package/dist/index-C6ph58Vg.js.map +1 -0
  126. package/dist/{index-C26Vdbk5.js → index-DFFRcH_S.js} +2 -2
  127. package/dist/{index-C26Vdbk5.js.map → index-DFFRcH_S.js.map} +1 -1
  128. package/dist/{index-CeAVMlhg.js → index-DTONHIze.js} +2 -2
  129. package/dist/{index-CeAVMlhg.js.map → index-DTONHIze.js.map} +1 -1
  130. package/dist/index-DeYRFiJy.js +119 -0
  131. package/dist/index-DeYRFiJy.js.map +1 -0
  132. package/dist/index-DgxgaCRt.js +1317 -0
  133. package/dist/index-DgxgaCRt.js.map +1 -0
  134. package/dist/index-DqqXniGT.js +126 -0
  135. package/dist/index-DqqXniGT.js.map +1 -0
  136. package/dist/index-Dus0cbgo.js +1407 -0
  137. package/dist/index-Dus0cbgo.js.map +1 -0
  138. package/dist/index-aJIUa1Bd.js +1342 -0
  139. package/dist/index-aJIUa1Bd.js.map +1 -0
  140. package/dist/index-ureO6U2w.js +1401 -0
  141. package/dist/index-ureO6U2w.js.map +1 -0
  142. package/dist/index.js +6 -2
  143. package/dist/index.js.map +1 -1
  144. package/dist/pluralize-BoSEafiC.js +514 -0
  145. package/dist/pluralize-BoSEafiC.js.map +1 -0
  146. package/dist/pluralize-CFlSRsRn.js +516 -0
  147. package/dist/pluralize-CFlSRsRn.js.map +1 -0
  148. package/dist/queryClient-B-JFya8X.js +16 -0
  149. package/dist/queryClient-B-JFya8X.js.map +1 -0
  150. package/dist/queryClient-BncpekSV.js +14 -0
  151. package/dist/queryClient-BncpekSV.js.map +1 -0
  152. package/dist/useCountries-CQdvJz0R.js +249 -0
  153. package/dist/useCountries-CQdvJz0R.js.map +1 -0
  154. package/dist/useCountries-DePOPtue.js +235 -0
  155. package/dist/useCountries-DePOPtue.js.map +1 -0
  156. package/dist/useTeamsApi-CWp4G7JZ.js +179 -0
  157. package/dist/useTeamsApi-CWp4G7JZ.js.map +1 -0
  158. package/dist/useTeamsApi-Ch5sHR2_.js +197 -0
  159. package/dist/useTeamsApi-Ch5sHR2_.js.map +1 -0
  160. package/dist/utils.js +2 -511
  161. package/dist/utils.js.map +1 -1
  162. package/dist/v2/Groups.js +749 -0
  163. package/dist/v2/Groups.js.map +1 -0
  164. package/dist/v2/ManageMember.js +43 -0
  165. package/dist/v2/ManageMember.js.map +1 -0
  166. package/dist/v2/MembersDropdown.js +193 -0
  167. package/dist/v2/MembersDropdown.js.map +1 -0
  168. package/dist/v2/MembersInvite.js +242 -0
  169. package/dist/v2/MembersInvite.js.map +1 -0
  170. package/dist/v2/Permissions.js +13 -0
  171. package/dist/v2/Permissions.js.map +1 -0
  172. package/dist/v2/Profile.js +656 -0
  173. package/dist/v2/Profile.js.map +1 -0
  174. package/dist/v2/Roles.js +1242 -0
  175. package/dist/v2/Roles.js.map +1 -0
  176. package/dist/v2/RolesRadioGroup.js +20 -0
  177. package/dist/v2/RolesRadioGroup.js.map +1 -0
  178. package/dist/v2/TeamMembers.js +937 -0
  179. package/dist/v2/TeamMembers.js.map +1 -0
  180. package/dist/v2/TeamsAndMembersDropdown.js +430 -0
  181. package/dist/v2/TeamsAndMembersDropdown.js.map +1 -0
  182. package/dist/v2/TeamsDropdown.js +106 -0
  183. package/dist/v2/TeamsDropdown.js.map +1 -0
  184. package/dist/v2/constants.js +21 -0
  185. package/dist/v2/constants.js.map +1 -0
  186. package/dist/v2/hooks.js +29 -0
  187. package/dist/v2/hooks.js.map +1 -0
  188. package/dist/v2/utils.js +30 -0
  189. package/dist/v2/utils.js.map +1 -0
  190. package/dist/withReactQuery-CSuiy5RK.js +20 -0
  191. package/dist/withReactQuery-CSuiy5RK.js.map +1 -0
  192. package/dist/withReactQuery-DvSkXhEx.js +26 -0
  193. package/dist/withReactQuery-DvSkXhEx.js.map +1 -0
  194. package/package.json +31 -17
@@ -0,0 +1,1401 @@
1
+ import { c as commonjsGlobal } from './_commonjsHelpers-BFTU3MAI.js';
2
+ import React__default from 'react';
3
+
4
+ var dist = {exports: {}};
5
+
6
+ (function (module, exports$1) {
7
+ (function webpackUniversalModuleDefinition(root, factory) {
8
+ module.exports = factory(React__default);
9
+ })(commonjsGlobal, function(__WEBPACK_EXTERNAL_MODULE_4__) {
10
+ return /******/ (function(modules) { // webpackBootstrap
11
+ /******/ // The module cache
12
+ /******/ var installedModules = {};
13
+ /******/
14
+ /******/ // The require function
15
+ /******/ function __webpack_require__(moduleId) {
16
+ /******/
17
+ /******/ // Check if module is in cache
18
+ /******/ if(installedModules[moduleId]) {
19
+ /******/ return installedModules[moduleId].exports;
20
+ /******/ }
21
+ /******/ // Create a new module (and put it into the cache)
22
+ /******/ var module = installedModules[moduleId] = {
23
+ /******/ i: moduleId,
24
+ /******/ l: false,
25
+ /******/ exports: {}
26
+ /******/ };
27
+ /******/
28
+ /******/ // Execute the module function
29
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
30
+ /******/
31
+ /******/ // Flag the module as loaded
32
+ /******/ module.l = true;
33
+ /******/
34
+ /******/ // Return the exports of the module
35
+ /******/ return module.exports;
36
+ /******/ }
37
+ /******/
38
+ /******/
39
+ /******/ // expose the modules object (__webpack_modules__)
40
+ /******/ __webpack_require__.m = modules;
41
+ /******/
42
+ /******/ // expose the module cache
43
+ /******/ __webpack_require__.c = installedModules;
44
+ /******/
45
+ /******/ // identity function for calling harmony imports with the correct context
46
+ /******/ __webpack_require__.i = function(value) { return value; };
47
+ /******/
48
+ /******/ // define getter function for harmony exports
49
+ /******/ __webpack_require__.d = function(exports$1, name, getter) {
50
+ /******/ if(!__webpack_require__.o(exports$1, name)) {
51
+ /******/ Object.defineProperty(exports$1, name, {
52
+ /******/ configurable: false,
53
+ /******/ enumerable: true,
54
+ /******/ get: getter
55
+ /******/ });
56
+ /******/ }
57
+ /******/ };
58
+ /******/
59
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
60
+ /******/ __webpack_require__.n = function(module) {
61
+ /******/ var getter = module && module.__esModule ?
62
+ /******/ function getDefault() { return module['default']; } :
63
+ /******/ function getModuleExports() { return module; };
64
+ /******/ __webpack_require__.d(getter, 'a', getter);
65
+ /******/ return getter;
66
+ /******/ };
67
+ /******/
68
+ /******/ // Object.prototype.hasOwnProperty.call
69
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
70
+ /******/
71
+ /******/ // __webpack_public_path__
72
+ /******/ __webpack_require__.p = "";
73
+ /******/
74
+ /******/ // Load entry module and return exports
75
+ /******/ return __webpack_require__(__webpack_require__.s = 10);
76
+ /******/ })
77
+ /************************************************************************/
78
+ /******/ ([
79
+ /* 0 */
80
+ /***/ (function(module, exports$1) {
81
+
82
+ // shim for using process in browser
83
+ var process = module.exports = {};
84
+
85
+ // cached from whatever global is present so that test runners that stub it
86
+ // don't break things. But we need to wrap it in a try catch in case it is
87
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
88
+ // function because try/catches deoptimize in certain engines.
89
+
90
+ var cachedSetTimeout;
91
+ var cachedClearTimeout;
92
+
93
+ function defaultSetTimout() {
94
+ throw new Error('setTimeout has not been defined');
95
+ }
96
+ function defaultClearTimeout () {
97
+ throw new Error('clearTimeout has not been defined');
98
+ }
99
+ (function () {
100
+ try {
101
+ if (typeof setTimeout === 'function') {
102
+ cachedSetTimeout = setTimeout;
103
+ } else {
104
+ cachedSetTimeout = defaultSetTimout;
105
+ }
106
+ } catch (e) {
107
+ cachedSetTimeout = defaultSetTimout;
108
+ }
109
+ try {
110
+ if (typeof clearTimeout === 'function') {
111
+ cachedClearTimeout = clearTimeout;
112
+ } else {
113
+ cachedClearTimeout = defaultClearTimeout;
114
+ }
115
+ } catch (e) {
116
+ cachedClearTimeout = defaultClearTimeout;
117
+ }
118
+ } ());
119
+ function runTimeout(fun) {
120
+ if (cachedSetTimeout === setTimeout) {
121
+ //normal enviroments in sane situations
122
+ return setTimeout(fun, 0);
123
+ }
124
+ // if setTimeout wasn't available but was latter defined
125
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
126
+ cachedSetTimeout = setTimeout;
127
+ return setTimeout(fun, 0);
128
+ }
129
+ try {
130
+ // when when somebody has screwed with setTimeout but no I.E. maddness
131
+ return cachedSetTimeout(fun, 0);
132
+ } catch(e){
133
+ try {
134
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
135
+ return cachedSetTimeout.call(null, fun, 0);
136
+ } catch(e){
137
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
138
+ return cachedSetTimeout.call(this, fun, 0);
139
+ }
140
+ }
141
+
142
+
143
+ }
144
+ function runClearTimeout(marker) {
145
+ if (cachedClearTimeout === clearTimeout) {
146
+ //normal enviroments in sane situations
147
+ return clearTimeout(marker);
148
+ }
149
+ // if clearTimeout wasn't available but was latter defined
150
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
151
+ cachedClearTimeout = clearTimeout;
152
+ return clearTimeout(marker);
153
+ }
154
+ try {
155
+ // when when somebody has screwed with setTimeout but no I.E. maddness
156
+ return cachedClearTimeout(marker);
157
+ } catch (e){
158
+ try {
159
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
160
+ return cachedClearTimeout.call(null, marker);
161
+ } catch (e){
162
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
163
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
164
+ return cachedClearTimeout.call(this, marker);
165
+ }
166
+ }
167
+
168
+
169
+
170
+ }
171
+ var queue = [];
172
+ var draining = false;
173
+ var currentQueue;
174
+ var queueIndex = -1;
175
+
176
+ function cleanUpNextTick() {
177
+ if (!draining || !currentQueue) {
178
+ return;
179
+ }
180
+ draining = false;
181
+ if (currentQueue.length) {
182
+ queue = currentQueue.concat(queue);
183
+ } else {
184
+ queueIndex = -1;
185
+ }
186
+ if (queue.length) {
187
+ drainQueue();
188
+ }
189
+ }
190
+
191
+ function drainQueue() {
192
+ if (draining) {
193
+ return;
194
+ }
195
+ var timeout = runTimeout(cleanUpNextTick);
196
+ draining = true;
197
+
198
+ var len = queue.length;
199
+ while(len) {
200
+ currentQueue = queue;
201
+ queue = [];
202
+ while (++queueIndex < len) {
203
+ if (currentQueue) {
204
+ currentQueue[queueIndex].run();
205
+ }
206
+ }
207
+ queueIndex = -1;
208
+ len = queue.length;
209
+ }
210
+ currentQueue = null;
211
+ draining = false;
212
+ runClearTimeout(timeout);
213
+ }
214
+
215
+ process.nextTick = function (fun) {
216
+ var args = new Array(arguments.length - 1);
217
+ if (arguments.length > 1) {
218
+ for (var i = 1; i < arguments.length; i++) {
219
+ args[i - 1] = arguments[i];
220
+ }
221
+ }
222
+ queue.push(new Item(fun, args));
223
+ if (queue.length === 1 && !draining) {
224
+ runTimeout(drainQueue);
225
+ }
226
+ };
227
+
228
+ // v8 likes predictible objects
229
+ function Item(fun, array) {
230
+ this.fun = fun;
231
+ this.array = array;
232
+ }
233
+ Item.prototype.run = function () {
234
+ this.fun.apply(null, this.array);
235
+ };
236
+ process.title = 'browser';
237
+ process.browser = true;
238
+ process.env = {};
239
+ process.argv = [];
240
+ process.version = ''; // empty string to avoid regexp issues
241
+ process.versions = {};
242
+
243
+ function noop() {}
244
+
245
+ process.on = noop;
246
+ process.addListener = noop;
247
+ process.once = noop;
248
+ process.off = noop;
249
+ process.removeListener = noop;
250
+ process.removeAllListeners = noop;
251
+ process.emit = noop;
252
+ process.prependListener = noop;
253
+ process.prependOnceListener = noop;
254
+
255
+ process.listeners = function (name) { return [] };
256
+
257
+ process.binding = function (name) {
258
+ throw new Error('process.binding is not supported');
259
+ };
260
+
261
+ process.cwd = function () { return '/' };
262
+ process.chdir = function (dir) {
263
+ throw new Error('process.chdir is not supported');
264
+ };
265
+ process.umask = function() { return 0; };
266
+
267
+
268
+ /***/ }),
269
+ /* 1 */
270
+ /***/ (function(module, exports$1, __webpack_require__) {
271
+
272
+
273
+ /**
274
+ * Copyright (c) 2013-present, Facebook, Inc.
275
+ * All rights reserved.
276
+ *
277
+ * This source code is licensed under the BSD-style license found in the
278
+ * LICENSE file in the root directory of this source tree. An additional grant
279
+ * of patent rights can be found in the PATENTS file in the same directory.
280
+ *
281
+ *
282
+ */
283
+
284
+ function makeEmptyFunction(arg) {
285
+ return function () {
286
+ return arg;
287
+ };
288
+ }
289
+
290
+ /**
291
+ * This function accepts and discards inputs; it has no side effects. This is
292
+ * primarily useful idiomatically for overridable function endpoints which
293
+ * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
294
+ */
295
+ var emptyFunction = function emptyFunction() {};
296
+
297
+ emptyFunction.thatReturns = makeEmptyFunction;
298
+ emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
299
+ emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
300
+ emptyFunction.thatReturnsNull = makeEmptyFunction(null);
301
+ emptyFunction.thatReturnsThis = function () {
302
+ return this;
303
+ };
304
+ emptyFunction.thatReturnsArgument = function (arg) {
305
+ return arg;
306
+ };
307
+
308
+ module.exports = emptyFunction;
309
+
310
+ /***/ }),
311
+ /* 2 */
312
+ /***/ (function(module, exports$1, __webpack_require__) {
313
+ /* WEBPACK VAR INJECTION */(function(process) {/**
314
+ * Copyright (c) 2013-present, Facebook, Inc.
315
+ * All rights reserved.
316
+ *
317
+ * This source code is licensed under the BSD-style license found in the
318
+ * LICENSE file in the root directory of this source tree. An additional grant
319
+ * of patent rights can be found in the PATENTS file in the same directory.
320
+ *
321
+ */
322
+
323
+ function invariant(condition, format, a, b, c, d, e, f) {
324
+
325
+ if (!condition) {
326
+ var error;
327
+ if (format === undefined) {
328
+ error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
329
+ } else {
330
+ var args = [a, b, c, d, e, f];
331
+ var argIndex = 0;
332
+ error = new Error(format.replace(/%s/g, function () {
333
+ return args[argIndex++];
334
+ }));
335
+ error.name = 'Invariant Violation';
336
+ }
337
+
338
+ error.framesToPop = 1; // we don't care about invariant's own frame
339
+ throw error;
340
+ }
341
+ }
342
+
343
+ module.exports = invariant;
344
+ /* WEBPACK VAR INJECTION */}.call(exports$1, __webpack_require__(0)));
345
+
346
+ /***/ }),
347
+ /* 3 */
348
+ /***/ (function(module, exports$1, __webpack_require__) {
349
+ /**
350
+ * Copyright 2013-present, Facebook, Inc.
351
+ * All rights reserved.
352
+ *
353
+ * This source code is licensed under the BSD-style license found in the
354
+ * LICENSE file in the root directory of this source tree. An additional grant
355
+ * of patent rights can be found in the PATENTS file in the same directory.
356
+ */
357
+
358
+
359
+
360
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
361
+
362
+ module.exports = ReactPropTypesSecret;
363
+
364
+
365
+ /***/ }),
366
+ /* 4 */
367
+ /***/ (function(module, exports$1) {
368
+
369
+ module.exports = __WEBPACK_EXTERNAL_MODULE_4__;
370
+
371
+ /***/ }),
372
+ /* 5 */
373
+ /***/ (function(module, exports$1, __webpack_require__) {
374
+
375
+
376
+ Object.defineProperty(exports$1, "__esModule", {
377
+ value: true
378
+ });
379
+
380
+ var _react = __webpack_require__(4);
381
+
382
+ var _react2 = _interopRequireDefault(_react);
383
+
384
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
385
+
386
+ var ScrollSyncContext = _react2.default.createContext({
387
+ registerPane: function registerPane() {},
388
+ unregisterPane: function unregisterPane() {}
389
+ });
390
+
391
+ exports$1.default = ScrollSyncContext;
392
+ module.exports = exports$1['default'];
393
+
394
+ /***/ }),
395
+ /* 6 */
396
+ /***/ (function(module, exports$1, __webpack_require__) {
397
+ /* WEBPACK VAR INJECTION */(function(process) {/**
398
+ * Copyright 2014-2015, Facebook, Inc.
399
+ * All rights reserved.
400
+ *
401
+ * This source code is licensed under the BSD-style license found in the
402
+ * LICENSE file in the root directory of this source tree. An additional grant
403
+ * of patent rights can be found in the PATENTS file in the same directory.
404
+ *
405
+ */
406
+
407
+
408
+
409
+ var emptyFunction = __webpack_require__(1);
410
+
411
+ /**
412
+ * Similar to invariant but only logs a warning if the condition is not met.
413
+ * This can be used to log issues in development environments in critical
414
+ * paths. Removing the logging code for production environments will keep the
415
+ * same logic and follow the same code paths.
416
+ */
417
+
418
+ var warning = emptyFunction;
419
+
420
+ module.exports = warning;
421
+ /* WEBPACK VAR INJECTION */}.call(exports$1, __webpack_require__(0)));
422
+
423
+ /***/ }),
424
+ /* 7 */
425
+ /***/ (function(module, exports$1, __webpack_require__) {
426
+
427
+ /* WEBPACK VAR INJECTION */(function(process) {/**
428
+ * Copyright 2013-present, Facebook, Inc.
429
+ * All rights reserved.
430
+ *
431
+ * This source code is licensed under the BSD-style license found in the
432
+ * LICENSE file in the root directory of this source tree. An additional grant
433
+ * of patent rights can be found in the PATENTS file in the same directory.
434
+ */
435
+
436
+ {
437
+ // By explicitly using `prop-types` you are opting into new production behavior.
438
+ // http://fb.me/prop-types-in-prod
439
+ module.exports = __webpack_require__(12)();
440
+ }
441
+
442
+ /* WEBPACK VAR INJECTION */}.call(exports$1, __webpack_require__(0)));
443
+
444
+ /***/ }),
445
+ /* 8 */
446
+ /***/ (function(module, exports$1, __webpack_require__) {
447
+
448
+
449
+ Object.defineProperty(exports$1, "__esModule", {
450
+ value: true
451
+ });
452
+
453
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
454
+
455
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
456
+
457
+ var _react = __webpack_require__(4);
458
+
459
+ var _react2 = _interopRequireDefault(_react);
460
+
461
+ var _propTypes = __webpack_require__(7);
462
+
463
+ var _propTypes2 = _interopRequireDefault(_propTypes);
464
+
465
+ var _ScrollSyncContext = __webpack_require__(5);
466
+
467
+ var _ScrollSyncContext2 = _interopRequireDefault(_ScrollSyncContext);
468
+
469
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
470
+
471
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
472
+
473
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
474
+
475
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
476
+
477
+ /**
478
+ * ScrollSync provider component
479
+ *
480
+ */
481
+
482
+ var ScrollSync = function (_Component) {
483
+ _inherits(ScrollSync, _Component);
484
+
485
+ function ScrollSync() {
486
+ var _ref;
487
+
488
+ var _temp, _this, _ret;
489
+
490
+ _classCallCheck(this, ScrollSync);
491
+
492
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
493
+ args[_key] = arguments[_key];
494
+ }
495
+
496
+ return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ScrollSync.__proto__ || Object.getPrototypeOf(ScrollSync)).call.apply(_ref, [this].concat(args))), _this), _this.panes = {}, _this.registerPane = function (node, groups) {
497
+ groups.forEach(function (group) {
498
+ if (!_this.panes[group]) {
499
+ _this.panes[group] = [];
500
+ }
501
+
502
+ if (!_this.findPane(node, group)) {
503
+ if (_this.panes[group].length > 0) {
504
+ _this.syncScrollPosition(_this.panes[group][0], node);
505
+ }
506
+ _this.panes[group].push(node);
507
+ }
508
+ });
509
+ _this.addEvents(node);
510
+ }, _this.unregisterPane = function (node, groups) {
511
+ groups.forEach(function (group) {
512
+ if (_this.findPane(node, group)) {
513
+ _this.removeEvents(node);
514
+ _this.panes[group].splice(_this.panes[group].indexOf(node), 1);
515
+ }
516
+ });
517
+ }, _this.addEvents = function (node) {
518
+ /* For some reason element.addEventListener doesnt work with document.body */
519
+ var nodeGroups = [];
520
+ if (_this.panes && _typeof(_this.panes) === 'object') {
521
+ Object.keys(_this.panes).forEach(function (pane) {
522
+ if (_this.findNode(_this.panes[pane], node)) nodeGroups.push(pane);
523
+ });
524
+ }
525
+ node.onscroll = _this.handlePaneScroll.bind(_this, node, nodeGroups); // eslint-disable-line
526
+ }, _this.removeEvents = function (node) {
527
+ /* For some reason element.removeEventListener doesnt work with document.body */
528
+ node.onscroll = null; // eslint-disable-line
529
+ }, _this.findPane = function (node, group) {
530
+ if (!_this.panes[group]) {
531
+ return false;
532
+ }
533
+
534
+ return _this.panes[group].find(function (pane) {
535
+ return pane === node;
536
+ });
537
+ }, _this.findNode = function (pane, node) {
538
+ if (!pane) {
539
+ return false;
540
+ }
541
+
542
+ return pane.find(function (savedNode) {
543
+ return savedNode === node;
544
+ });
545
+ }, _this.handlePaneScroll = function (node, groups) {
546
+ if (!_this.props.enabled) {
547
+ return;
548
+ }
549
+
550
+ window.requestAnimationFrame(function () {
551
+ _this.syncScrollPositions(node, groups);
552
+ });
553
+ }, _this.syncScrollPositions = function (scrolledPane, groups) {
554
+ groups.forEach(function (group) {
555
+ _this.panes[group].forEach(function (pane) {
556
+ /* For all panes beside the currently scrolling one */
557
+ if (scrolledPane !== pane) {
558
+ /* Remove event listeners from the node that we'll manipulate */
559
+ _this.removeEvents(pane, group);
560
+ _this.syncScrollPosition(scrolledPane, pane);
561
+ /* Re-attach event listeners after we're done scrolling */
562
+ window.requestAnimationFrame(function () {
563
+ _this.addEvents(pane);
564
+ });
565
+ }
566
+ });
567
+ });
568
+ if (_this.props.onSync) _this.props.onSync(scrolledPane);
569
+ }, _temp), _possibleConstructorReturn(_this, _ret);
570
+ }
571
+
572
+ _createClass(ScrollSync, [{
573
+ key: 'getContextValue',
574
+ value: function getContextValue() {
575
+ return {
576
+ registerPane: this.registerPane,
577
+ unregisterPane: this.unregisterPane
578
+ };
579
+ }
580
+ }, {
581
+ key: 'syncScrollPosition',
582
+ value: function syncScrollPosition(scrolledPane, pane) {
583
+ var scrollTop = scrolledPane.scrollTop,
584
+ scrollHeight = scrolledPane.scrollHeight,
585
+ clientHeight = scrolledPane.clientHeight,
586
+ scrollLeft = scrolledPane.scrollLeft,
587
+ scrollWidth = scrolledPane.scrollWidth,
588
+ clientWidth = scrolledPane.clientWidth;
589
+
590
+
591
+ var scrollTopOffset = scrollHeight - clientHeight;
592
+ var scrollLeftOffset = scrollWidth - clientWidth;
593
+
594
+ var _props = this.props,
595
+ proportional = _props.proportional,
596
+ vertical = _props.vertical,
597
+ horizontal = _props.horizontal;
598
+
599
+ /* Calculate the actual pane height */
600
+
601
+ var paneHeight = pane.scrollHeight - clientHeight;
602
+ var paneWidth = pane.scrollWidth - clientWidth;
603
+ /* Adjust the scrollTop position of it accordingly */
604
+ if (vertical && scrollTopOffset > 0) {
605
+ pane.scrollTop = proportional ? paneHeight * scrollTop / scrollTopOffset : scrollTop; // eslint-disable-line
606
+ }
607
+ if (horizontal && scrollLeftOffset > 0) {
608
+ pane.scrollLeft = proportional ? paneWidth * scrollLeft / scrollLeftOffset : scrollLeft; // eslint-disable-line
609
+ }
610
+ }
611
+ }, {
612
+ key: 'render',
613
+ value: function render() {
614
+ return _react2.default.createElement(
615
+ _ScrollSyncContext2.default.Provider,
616
+ { value: this.getContextValue() },
617
+ _react2.default.Children.only(this.props.children)
618
+ );
619
+ }
620
+ }]);
621
+
622
+ return ScrollSync;
623
+ }(_react.Component);
624
+
625
+ ScrollSync.propTypes = {
626
+ /**
627
+ * Callback to be invoked any time synchronization happens
628
+ *
629
+ * @param {Element} el The element that has received the scroll event
630
+ */
631
+ onSync: _propTypes2.default.func,
632
+ children: _propTypes2.default.element.isRequired,
633
+ proportional: _propTypes2.default.bool,
634
+ vertical: _propTypes2.default.bool,
635
+ horizontal: _propTypes2.default.bool,
636
+ enabled: _propTypes2.default.bool
637
+ };
638
+ ScrollSync.defaultProps = {
639
+ proportional: true,
640
+ vertical: true,
641
+ horizontal: true,
642
+ enabled: true
643
+ };
644
+ exports$1.default = ScrollSync;
645
+ module.exports = exports$1['default'];
646
+
647
+ /***/ }),
648
+ /* 9 */
649
+ /***/ (function(module, exports$1, __webpack_require__) {
650
+
651
+
652
+ Object.defineProperty(exports$1, "__esModule", {
653
+ value: true
654
+ });
655
+
656
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
657
+
658
+ var _react = __webpack_require__(4);
659
+
660
+ var _propTypes = __webpack_require__(7);
661
+
662
+ var _propTypes2 = _interopRequireDefault(_propTypes);
663
+
664
+ var _ScrollSyncContext = __webpack_require__(5);
665
+
666
+ var _ScrollSyncContext2 = _interopRequireDefault(_ScrollSyncContext);
667
+
668
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
669
+
670
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
671
+
672
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
673
+
674
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /* eslint react/no-find-dom-node: 0 */
675
+
676
+ /**
677
+ * ScrollSyncPane Component
678
+ *
679
+ * Wrap your content in it to keep its scroll position in sync with other panes
680
+ *
681
+ * @example ./example.md
682
+ */
683
+
684
+ var ScrollSyncPane = function (_Component) {
685
+ _inherits(ScrollSyncPane, _Component);
686
+
687
+ function ScrollSyncPane(props) {
688
+ _classCallCheck(this, ScrollSyncPane);
689
+
690
+ var _this = _possibleConstructorReturn(this, (ScrollSyncPane.__proto__ || Object.getPrototypeOf(ScrollSyncPane)).call(this, props));
691
+
692
+ _this.toArray = function (groups) {
693
+ return [].concat(groups);
694
+ };
695
+
696
+ _this.updateNode = function () {
697
+ if (_this.props.attachTo) {
698
+ _this.node = _this.props.attachTo.current;
699
+ } else {
700
+ _this.node = _this.childRef.current;
701
+ }
702
+ };
703
+
704
+ _this.childRef = props.innerRef ? props.innerRef : (0, _react.createRef)();
705
+ return _this;
706
+ }
707
+
708
+ _createClass(ScrollSyncPane, [{
709
+ key: 'componentDidMount',
710
+ value: function componentDidMount() {
711
+ if (this.props.enabled) {
712
+ this.updateNode();
713
+ if (this.node) {
714
+ this.context.registerPane(this.node, this.toArray(this.props.group));
715
+ }
716
+ }
717
+ }
718
+ }, {
719
+ key: 'componentDidUpdate',
720
+ value: function componentDidUpdate(prevProps) {
721
+ if (this.props.attachTo !== prevProps.attachTo) {
722
+ if (this.node) {
723
+ this.context.unregisterPane(this.node, this.toArray(prevProps.group));
724
+ }
725
+ this.updateNode();
726
+ if (this.node) {
727
+ this.context.registerPane(this.node, this.toArray(prevProps.group));
728
+ }
729
+ }
730
+ if (this.node && this.props.enabled !== prevProps.enabled) {
731
+ if (this.props.enabled) {
732
+ this.context.registerPane(this.node, this.toArray(prevProps.group));
733
+ } else {
734
+ this.context.unregisterPane(this.node, this.toArray(prevProps.group));
735
+ }
736
+ }
737
+ if (this.node && this.props.enabled && this.props.group !== prevProps.group) {
738
+ this.context.unregisterPane(this.node, this.toArray(prevProps.group));
739
+ this.context.registerPane(this.node, this.toArray(this.props.group));
740
+ }
741
+ }
742
+ }, {
743
+ key: 'componentWillUnmount',
744
+ value: function componentWillUnmount() {
745
+ if (this.node && this.props.enabled) {
746
+ this.context.unregisterPane(this.node, this.toArray(this.props.group));
747
+ }
748
+ }
749
+ }, {
750
+ key: 'render',
751
+ value: function render() {
752
+ if (this.props.attachTo) {
753
+ return this.props.children;
754
+ }
755
+ return (0, _react.cloneElement)(_react.Children.only(this.props.children), {
756
+ ref: this.childRef
757
+ });
758
+ }
759
+ }]);
760
+
761
+ return ScrollSyncPane;
762
+ }(_react.Component);
763
+
764
+ ScrollSyncPane.contextType = _ScrollSyncContext2.default;
765
+ ScrollSyncPane.propTypes = {
766
+ children: _propTypes2.default.node.isRequired,
767
+ attachTo: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.shape({ current: _propTypes2.default.any })]),
768
+ group: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.arrayOf(_propTypes2.default.string)]),
769
+ enabled: _propTypes2.default.bool,
770
+ innerRef: _propTypes2.default.oneOfType([// Either a function
771
+ _propTypes2.default.func, _propTypes2.default.shape({ current: _propTypes2.default.any })])
772
+ };
773
+ ScrollSyncPane.defaultProps = {
774
+ group: 'default',
775
+ enabled: true
776
+ };
777
+ exports$1.default = ScrollSyncPane;
778
+ module.exports = exports$1['default'];
779
+
780
+ /***/ }),
781
+ /* 10 */
782
+ /***/ (function(module, exports$1, __webpack_require__) {
783
+
784
+
785
+ Object.defineProperty(exports$1, "__esModule", {
786
+ value: true
787
+ });
788
+
789
+ var _ScrollSync = __webpack_require__(8);
790
+
791
+ Object.defineProperty(exports$1, 'ScrollSync', {
792
+ enumerable: true,
793
+ get: function get() {
794
+ return _interopRequireDefault(_ScrollSync).default;
795
+ }
796
+ });
797
+
798
+ var _ScrollSyncPane = __webpack_require__(9);
799
+
800
+ Object.defineProperty(exports$1, 'ScrollSyncPane', {
801
+ enumerable: true,
802
+ get: function get() {
803
+ return _interopRequireDefault(_ScrollSyncPane).default;
804
+ }
805
+ });
806
+
807
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
808
+
809
+ /***/ }),
810
+ /* 11 */
811
+ /***/ (function(module, exports$1, __webpack_require__) {
812
+ /* WEBPACK VAR INJECTION */(function(process) {/**
813
+ * Copyright 2013-present, Facebook, Inc.
814
+ * All rights reserved.
815
+ *
816
+ * This source code is licensed under the BSD-style license found in the
817
+ * LICENSE file in the root directory of this source tree. An additional grant
818
+ * of patent rights can be found in the PATENTS file in the same directory.
819
+ */
820
+
821
+ /**
822
+ * Assert that the values match with the type specs.
823
+ * Error messages are memorized and will only be shown once.
824
+ *
825
+ * @param {object} typeSpecs Map of name to a ReactPropType
826
+ * @param {object} values Runtime values that need to be type-checked
827
+ * @param {string} location e.g. "prop", "context", "child context"
828
+ * @param {string} componentName Name of the component for error messages.
829
+ * @param {?Function} getStack Returns the component stack.
830
+ * @private
831
+ */
832
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
833
+ }
834
+
835
+ module.exports = checkPropTypes;
836
+
837
+ /* WEBPACK VAR INJECTION */}.call(exports$1, __webpack_require__(0)));
838
+
839
+ /***/ }),
840
+ /* 12 */
841
+ /***/ (function(module, exports$1, __webpack_require__) {
842
+ /**
843
+ * Copyright 2013-present, Facebook, Inc.
844
+ * All rights reserved.
845
+ *
846
+ * This source code is licensed under the BSD-style license found in the
847
+ * LICENSE file in the root directory of this source tree. An additional grant
848
+ * of patent rights can be found in the PATENTS file in the same directory.
849
+ */
850
+
851
+
852
+
853
+ var emptyFunction = __webpack_require__(1);
854
+ var invariant = __webpack_require__(2);
855
+ var ReactPropTypesSecret = __webpack_require__(3);
856
+
857
+ module.exports = function() {
858
+ function shim(props, propName, componentName, location, propFullName, secret) {
859
+ if (secret === ReactPropTypesSecret) {
860
+ // It is still safe when called from React.
861
+ return;
862
+ }
863
+ invariant(
864
+ false,
865
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
866
+ 'Use PropTypes.checkPropTypes() to call them. ' +
867
+ 'Read more at http://fb.me/use-check-prop-types'
868
+ );
869
+ } shim.isRequired = shim;
870
+ function getShim() {
871
+ return shim;
872
+ } // Important!
873
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
874
+ var ReactPropTypes = {
875
+ array: shim,
876
+ bool: shim,
877
+ func: shim,
878
+ number: shim,
879
+ object: shim,
880
+ string: shim,
881
+ symbol: shim,
882
+
883
+ any: shim,
884
+ arrayOf: getShim,
885
+ element: shim,
886
+ instanceOf: getShim,
887
+ node: shim,
888
+ objectOf: getShim,
889
+ oneOf: getShim,
890
+ oneOfType: getShim,
891
+ shape: getShim
892
+ };
893
+
894
+ ReactPropTypes.checkPropTypes = emptyFunction;
895
+ ReactPropTypes.PropTypes = ReactPropTypes;
896
+
897
+ return ReactPropTypes;
898
+ };
899
+
900
+
901
+ /***/ }),
902
+ /* 13 */
903
+ /***/ (function(module, exports$1, __webpack_require__) {
904
+ /* WEBPACK VAR INJECTION */(function(process) {/**
905
+ * Copyright 2013-present, Facebook, Inc.
906
+ * All rights reserved.
907
+ *
908
+ * This source code is licensed under the BSD-style license found in the
909
+ * LICENSE file in the root directory of this source tree. An additional grant
910
+ * of patent rights can be found in the PATENTS file in the same directory.
911
+ */
912
+
913
+
914
+
915
+ var emptyFunction = __webpack_require__(1);
916
+ var invariant = __webpack_require__(2);
917
+ var warning = __webpack_require__(6);
918
+
919
+ var ReactPropTypesSecret = __webpack_require__(3);
920
+ var checkPropTypes = __webpack_require__(11);
921
+
922
+ module.exports = function(isValidElement, throwOnDirectAccess) {
923
+ /* global Symbol */
924
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
925
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
926
+
927
+ /**
928
+ * Returns the iterator method function contained on the iterable object.
929
+ *
930
+ * Be sure to invoke the function with the iterable as context:
931
+ *
932
+ * var iteratorFn = getIteratorFn(myIterable);
933
+ * if (iteratorFn) {
934
+ * var iterator = iteratorFn.call(myIterable);
935
+ * ...
936
+ * }
937
+ *
938
+ * @param {?object} maybeIterable
939
+ * @return {?function}
940
+ */
941
+ function getIteratorFn(maybeIterable) {
942
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
943
+ if (typeof iteratorFn === 'function') {
944
+ return iteratorFn;
945
+ }
946
+ }
947
+
948
+ /**
949
+ * Collection of methods that allow declaration and validation of props that are
950
+ * supplied to React components. Example usage:
951
+ *
952
+ * var Props = require('ReactPropTypes');
953
+ * var MyArticle = React.createClass({
954
+ * propTypes: {
955
+ * // An optional string prop named "description".
956
+ * description: Props.string,
957
+ *
958
+ * // A required enum prop named "category".
959
+ * category: Props.oneOf(['News','Photos']).isRequired,
960
+ *
961
+ * // A prop named "dialog" that requires an instance of Dialog.
962
+ * dialog: Props.instanceOf(Dialog).isRequired
963
+ * },
964
+ * render: function() { ... }
965
+ * });
966
+ *
967
+ * A more formal specification of how these methods are used:
968
+ *
969
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
970
+ * decl := ReactPropTypes.{type}(.isRequired)?
971
+ *
972
+ * Each and every declaration produces a function with the same signature. This
973
+ * allows the creation of custom validation functions. For example:
974
+ *
975
+ * var MyLink = React.createClass({
976
+ * propTypes: {
977
+ * // An optional string or URI prop named "href".
978
+ * href: function(props, propName, componentName) {
979
+ * var propValue = props[propName];
980
+ * if (propValue != null && typeof propValue !== 'string' &&
981
+ * !(propValue instanceof URI)) {
982
+ * return new Error(
983
+ * 'Expected a string or an URI for ' + propName + ' in ' +
984
+ * componentName
985
+ * );
986
+ * }
987
+ * }
988
+ * },
989
+ * render: function() {...}
990
+ * });
991
+ *
992
+ * @internal
993
+ */
994
+
995
+ var ANONYMOUS = '<<anonymous>>';
996
+
997
+ // Important!
998
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
999
+ var ReactPropTypes = {
1000
+ array: createPrimitiveTypeChecker('array'),
1001
+ bool: createPrimitiveTypeChecker('boolean'),
1002
+ func: createPrimitiveTypeChecker('function'),
1003
+ number: createPrimitiveTypeChecker('number'),
1004
+ object: createPrimitiveTypeChecker('object'),
1005
+ string: createPrimitiveTypeChecker('string'),
1006
+ symbol: createPrimitiveTypeChecker('symbol'),
1007
+
1008
+ any: createAnyTypeChecker(),
1009
+ arrayOf: createArrayOfTypeChecker,
1010
+ element: createElementTypeChecker(),
1011
+ instanceOf: createInstanceTypeChecker,
1012
+ node: createNodeChecker(),
1013
+ objectOf: createObjectOfTypeChecker,
1014
+ oneOf: createEnumTypeChecker,
1015
+ oneOfType: createUnionTypeChecker,
1016
+ shape: createShapeTypeChecker
1017
+ };
1018
+
1019
+ /**
1020
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
1021
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
1022
+ */
1023
+ /*eslint-disable no-self-compare*/
1024
+ function is(x, y) {
1025
+ // SameValue algorithm
1026
+ if (x === y) {
1027
+ // Steps 1-5, 7-10
1028
+ // Steps 6.b-6.e: +0 != -0
1029
+ return x !== 0 || 1 / x === 1 / y;
1030
+ } else {
1031
+ // Step 6.a: NaN == NaN
1032
+ return x !== x && y !== y;
1033
+ }
1034
+ }
1035
+ /*eslint-enable no-self-compare*/
1036
+
1037
+ /**
1038
+ * We use an Error-like object for backward compatibility as people may call
1039
+ * PropTypes directly and inspect their output. However, we don't use real
1040
+ * Errors anymore. We don't inspect their stack anyway, and creating them
1041
+ * is prohibitively expensive if they are created too often, such as what
1042
+ * happens in oneOfType() for any type before the one that matched.
1043
+ */
1044
+ function PropTypeError(message) {
1045
+ this.message = message;
1046
+ this.stack = '';
1047
+ }
1048
+ // Make `instanceof Error` still work for returned errors.
1049
+ PropTypeError.prototype = Error.prototype;
1050
+
1051
+ function createChainableTypeChecker(validate) {
1052
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
1053
+ componentName = componentName || ANONYMOUS;
1054
+ propFullName = propFullName || propName;
1055
+
1056
+ if (secret !== ReactPropTypesSecret) {
1057
+ if (throwOnDirectAccess) {
1058
+ // New behavior only for users of `prop-types` package
1059
+ invariant(
1060
+ false,
1061
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1062
+ 'Use `PropTypes.checkPropTypes()` to call them. ' +
1063
+ 'Read more at http://fb.me/use-check-prop-types'
1064
+ );
1065
+ }
1066
+ }
1067
+ if (props[propName] == null) {
1068
+ if (isRequired) {
1069
+ if (props[propName] === null) {
1070
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
1071
+ }
1072
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
1073
+ }
1074
+ return null;
1075
+ } else {
1076
+ return validate(props, propName, componentName, location, propFullName);
1077
+ }
1078
+ }
1079
+
1080
+ var chainedCheckType = checkType.bind(null, false);
1081
+ chainedCheckType.isRequired = checkType.bind(null, true);
1082
+
1083
+ return chainedCheckType;
1084
+ }
1085
+
1086
+ function createPrimitiveTypeChecker(expectedType) {
1087
+ function validate(props, propName, componentName, location, propFullName, secret) {
1088
+ var propValue = props[propName];
1089
+ var propType = getPropType(propValue);
1090
+ if (propType !== expectedType) {
1091
+ // `propValue` being instance of, say, date/regexp, pass the 'object'
1092
+ // check, but we can offer a more precise error message here rather than
1093
+ // 'of type `object`'.
1094
+ var preciseType = getPreciseType(propValue);
1095
+
1096
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
1097
+ }
1098
+ return null;
1099
+ }
1100
+ return createChainableTypeChecker(validate);
1101
+ }
1102
+
1103
+ function createAnyTypeChecker() {
1104
+ return createChainableTypeChecker(emptyFunction.thatReturnsNull);
1105
+ }
1106
+
1107
+ function createArrayOfTypeChecker(typeChecker) {
1108
+ function validate(props, propName, componentName, location, propFullName) {
1109
+ if (typeof typeChecker !== 'function') {
1110
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
1111
+ }
1112
+ var propValue = props[propName];
1113
+ if (!Array.isArray(propValue)) {
1114
+ var propType = getPropType(propValue);
1115
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
1116
+ }
1117
+ for (var i = 0; i < propValue.length; i++) {
1118
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
1119
+ if (error instanceof Error) {
1120
+ return error;
1121
+ }
1122
+ }
1123
+ return null;
1124
+ }
1125
+ return createChainableTypeChecker(validate);
1126
+ }
1127
+
1128
+ function createElementTypeChecker() {
1129
+ function validate(props, propName, componentName, location, propFullName) {
1130
+ var propValue = props[propName];
1131
+ if (!isValidElement(propValue)) {
1132
+ var propType = getPropType(propValue);
1133
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
1134
+ }
1135
+ return null;
1136
+ }
1137
+ return createChainableTypeChecker(validate);
1138
+ }
1139
+
1140
+ function createInstanceTypeChecker(expectedClass) {
1141
+ function validate(props, propName, componentName, location, propFullName) {
1142
+ if (!(props[propName] instanceof expectedClass)) {
1143
+ var expectedClassName = expectedClass.name || ANONYMOUS;
1144
+ var actualClassName = getClassName(props[propName]);
1145
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
1146
+ }
1147
+ return null;
1148
+ }
1149
+ return createChainableTypeChecker(validate);
1150
+ }
1151
+
1152
+ function createEnumTypeChecker(expectedValues) {
1153
+ if (!Array.isArray(expectedValues)) {
1154
+ return emptyFunction.thatReturnsNull;
1155
+ }
1156
+
1157
+ function validate(props, propName, componentName, location, propFullName) {
1158
+ var propValue = props[propName];
1159
+ for (var i = 0; i < expectedValues.length; i++) {
1160
+ if (is(propValue, expectedValues[i])) {
1161
+ return null;
1162
+ }
1163
+ }
1164
+
1165
+ var valuesString = JSON.stringify(expectedValues);
1166
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
1167
+ }
1168
+ return createChainableTypeChecker(validate);
1169
+ }
1170
+
1171
+ function createObjectOfTypeChecker(typeChecker) {
1172
+ function validate(props, propName, componentName, location, propFullName) {
1173
+ if (typeof typeChecker !== 'function') {
1174
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
1175
+ }
1176
+ var propValue = props[propName];
1177
+ var propType = getPropType(propValue);
1178
+ if (propType !== 'object') {
1179
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
1180
+ }
1181
+ for (var key in propValue) {
1182
+ if (propValue.hasOwnProperty(key)) {
1183
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1184
+ if (error instanceof Error) {
1185
+ return error;
1186
+ }
1187
+ }
1188
+ }
1189
+ return null;
1190
+ }
1191
+ return createChainableTypeChecker(validate);
1192
+ }
1193
+
1194
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
1195
+ if (!Array.isArray(arrayOfTypeCheckers)) {
1196
+ return emptyFunction.thatReturnsNull;
1197
+ }
1198
+
1199
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1200
+ var checker = arrayOfTypeCheckers[i];
1201
+ if (typeof checker !== 'function') {
1202
+ warning(
1203
+ false,
1204
+ 'Invalid argument supplid to oneOfType. Expected an array of check functions, but ' +
1205
+ 'received %s at index %s.',
1206
+ getPostfixForTypeWarning(checker),
1207
+ i
1208
+ );
1209
+ return emptyFunction.thatReturnsNull;
1210
+ }
1211
+ }
1212
+
1213
+ function validate(props, propName, componentName, location, propFullName) {
1214
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1215
+ var checker = arrayOfTypeCheckers[i];
1216
+ if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {
1217
+ return null;
1218
+ }
1219
+ }
1220
+
1221
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
1222
+ }
1223
+ return createChainableTypeChecker(validate);
1224
+ }
1225
+
1226
+ function createNodeChecker() {
1227
+ function validate(props, propName, componentName, location, propFullName) {
1228
+ if (!isNode(props[propName])) {
1229
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
1230
+ }
1231
+ return null;
1232
+ }
1233
+ return createChainableTypeChecker(validate);
1234
+ }
1235
+
1236
+ function createShapeTypeChecker(shapeTypes) {
1237
+ function validate(props, propName, componentName, location, propFullName) {
1238
+ var propValue = props[propName];
1239
+ var propType = getPropType(propValue);
1240
+ if (propType !== 'object') {
1241
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1242
+ }
1243
+ for (var key in shapeTypes) {
1244
+ var checker = shapeTypes[key];
1245
+ if (!checker) {
1246
+ continue;
1247
+ }
1248
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1249
+ if (error) {
1250
+ return error;
1251
+ }
1252
+ }
1253
+ return null;
1254
+ }
1255
+ return createChainableTypeChecker(validate);
1256
+ }
1257
+
1258
+ function isNode(propValue) {
1259
+ switch (typeof propValue) {
1260
+ case 'number':
1261
+ case 'string':
1262
+ case 'undefined':
1263
+ return true;
1264
+ case 'boolean':
1265
+ return !propValue;
1266
+ case 'object':
1267
+ if (Array.isArray(propValue)) {
1268
+ return propValue.every(isNode);
1269
+ }
1270
+ if (propValue === null || isValidElement(propValue)) {
1271
+ return true;
1272
+ }
1273
+
1274
+ var iteratorFn = getIteratorFn(propValue);
1275
+ if (iteratorFn) {
1276
+ var iterator = iteratorFn.call(propValue);
1277
+ var step;
1278
+ if (iteratorFn !== propValue.entries) {
1279
+ while (!(step = iterator.next()).done) {
1280
+ if (!isNode(step.value)) {
1281
+ return false;
1282
+ }
1283
+ }
1284
+ } else {
1285
+ // Iterator will provide entry [k,v] tuples rather than values.
1286
+ while (!(step = iterator.next()).done) {
1287
+ var entry = step.value;
1288
+ if (entry) {
1289
+ if (!isNode(entry[1])) {
1290
+ return false;
1291
+ }
1292
+ }
1293
+ }
1294
+ }
1295
+ } else {
1296
+ return false;
1297
+ }
1298
+
1299
+ return true;
1300
+ default:
1301
+ return false;
1302
+ }
1303
+ }
1304
+
1305
+ function isSymbol(propType, propValue) {
1306
+ // Native Symbol.
1307
+ if (propType === 'symbol') {
1308
+ return true;
1309
+ }
1310
+
1311
+ // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1312
+ if (propValue['@@toStringTag'] === 'Symbol') {
1313
+ return true;
1314
+ }
1315
+
1316
+ // Fallback for non-spec compliant Symbols which are polyfilled.
1317
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1318
+ return true;
1319
+ }
1320
+
1321
+ return false;
1322
+ }
1323
+
1324
+ // Equivalent of `typeof` but with special handling for array and regexp.
1325
+ function getPropType(propValue) {
1326
+ var propType = typeof propValue;
1327
+ if (Array.isArray(propValue)) {
1328
+ return 'array';
1329
+ }
1330
+ if (propValue instanceof RegExp) {
1331
+ // Old webkits (at least until Android 4.0) return 'function' rather than
1332
+ // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1333
+ // passes PropTypes.object.
1334
+ return 'object';
1335
+ }
1336
+ if (isSymbol(propType, propValue)) {
1337
+ return 'symbol';
1338
+ }
1339
+ return propType;
1340
+ }
1341
+
1342
+ // This handles more types than `getPropType`. Only used for error messages.
1343
+ // See `createPrimitiveTypeChecker`.
1344
+ function getPreciseType(propValue) {
1345
+ if (typeof propValue === 'undefined' || propValue === null) {
1346
+ return '' + propValue;
1347
+ }
1348
+ var propType = getPropType(propValue);
1349
+ if (propType === 'object') {
1350
+ if (propValue instanceof Date) {
1351
+ return 'date';
1352
+ } else if (propValue instanceof RegExp) {
1353
+ return 'regexp';
1354
+ }
1355
+ }
1356
+ return propType;
1357
+ }
1358
+
1359
+ // Returns a string that is postfixed to a warning about an invalid type.
1360
+ // For example, "undefined" or "of type array"
1361
+ function getPostfixForTypeWarning(value) {
1362
+ var type = getPreciseType(value);
1363
+ switch (type) {
1364
+ case 'array':
1365
+ case 'object':
1366
+ return 'an ' + type;
1367
+ case 'boolean':
1368
+ case 'date':
1369
+ case 'regexp':
1370
+ return 'a ' + type;
1371
+ default:
1372
+ return type;
1373
+ }
1374
+ }
1375
+
1376
+ // Returns class name of the object, if any.
1377
+ function getClassName(propValue) {
1378
+ if (!propValue.constructor || !propValue.constructor.name) {
1379
+ return ANONYMOUS;
1380
+ }
1381
+ return propValue.constructor.name;
1382
+ }
1383
+
1384
+ ReactPropTypes.checkPropTypes = checkPropTypes;
1385
+ ReactPropTypes.PropTypes = ReactPropTypes;
1386
+
1387
+ return ReactPropTypes;
1388
+ };
1389
+
1390
+ /* WEBPACK VAR INJECTION */}.call(exports$1, __webpack_require__(0)));
1391
+
1392
+ /***/ })
1393
+ /******/ ]);
1394
+ });
1395
+
1396
+ } (dist));
1397
+
1398
+ var distExports = dist.exports;
1399
+
1400
+ export { distExports as d };
1401
+ //# sourceMappingURL=index-ureO6U2w.js.map