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