@diplodoc/client 3.7.1 → 3.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -231,8 +231,8 @@ var config = __webpack_require__(64216);
231
231
  var InterfaceContext = __webpack_require__(6790);
232
232
  // EXTERNAL MODULE: ./node_modules/@diplodoc/components/build/esm/contexts/RenderBodyHooksContext.js + 1 modules
233
233
  var RenderBodyHooksContext = __webpack_require__(84274);
234
- // EXTERNAL MODULE: ./node_modules/@diplodoc/components/build/esm/components/ConsentPopup/ConsentPopup.js + 47 modules
235
- var ConsentPopup = __webpack_require__(9199);
234
+ // EXTERNAL MODULE: ./node_modules/@diplodoc/components/build/esm/components/ConsentPopup/ConsentPopup.js + 50 modules
235
+ var ConsentPopup = __webpack_require__(9091);
236
236
  // EXTERNAL MODULE: ./node_modules/@diplodoc/transform/dist/js/yfm.js
237
237
  var yfm = __webpack_require__(20553);
238
238
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js
@@ -317,24 +317,24 @@ var AlgoliaProvider = /*#__PURE__*/function () {
317
317
  value: function () {
318
318
  var _suggest = asyncToGenerator_default()(/*#__PURE__*/regenerator_default().mark(function _callee(query) {
319
319
  var message;
320
- return regenerator_default().wrap(function (_context) {
320
+ return regenerator_default().wrap(function _callee$(_context) {
321
321
  while (1) switch (_context.prev = _context.next) {
322
322
  case 0:
323
323
  if (!(!query || query.trim() === '')) {
324
- _context.next = 1;
324
+ _context.next = 2;
325
325
  break;
326
326
  }
327
327
  return _context.abrupt("return", []);
328
- case 1:
328
+ case 2:
329
329
  message = {
330
330
  type: 'suggest',
331
331
  query: query
332
332
  };
333
- _context.next = 2;
333
+ _context.next = 5;
334
334
  return this.request(message);
335
- case 2:
335
+ case 5:
336
336
  return _context.abrupt("return", _context.sent);
337
- case 3:
337
+ case 6:
338
338
  case "end":
339
339
  return _context.stop();
340
340
  }
@@ -353,28 +353,28 @@ var AlgoliaProvider = /*#__PURE__*/function () {
353
353
  count,
354
354
  message,
355
355
  _args2 = arguments;
356
- return regenerator_default().wrap(function (_context2) {
356
+ return regenerator_default().wrap(function _callee2$(_context2) {
357
357
  while (1) switch (_context2.prev = _context2.next) {
358
358
  case 0:
359
359
  page = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : 1;
360
360
  count = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : 10;
361
361
  if (!(!query || query.trim() === '')) {
362
- _context2.next = 1;
362
+ _context2.next = 4;
363
363
  break;
364
364
  }
365
365
  return _context2.abrupt("return", []);
366
- case 1:
366
+ case 4:
367
367
  message = {
368
368
  type: 'search',
369
369
  query: query,
370
370
  page: page,
371
371
  count: count
372
372
  };
373
- _context2.next = 2;
373
+ _context2.next = 7;
374
374
  return this.request(message);
375
- case 2:
375
+ case 7:
376
376
  return _context2.abrupt("return", _context2.sent);
377
- case 3:
377
+ case 8:
378
378
  case "end":
379
379
  return _context2.stop();
380
380
  }
@@ -396,18 +396,18 @@ var AlgoliaProvider = /*#__PURE__*/function () {
396
396
  value: function () {
397
397
  var _request2 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default().mark(function _callee3(message) {
398
398
  var worker;
399
- return regenerator_default().wrap(function (_context3) {
399
+ return regenerator_default().wrap(function _callee3$(_context3) {
400
400
  while (1) switch (_context3.prev = _context3.next) {
401
401
  case 0:
402
- _context3.next = 1;
402
+ _context3.next = 2;
403
403
  return this.worker;
404
- case 1:
404
+ case 2:
405
405
  worker = _context3.sent;
406
- _context3.next = 2;
406
+ _context3.next = 5;
407
407
  return _request(worker, message);
408
- case 2:
408
+ case 5:
409
409
  return _context3.abrupt("return", _context3.sent);
410
- case 3:
410
+ case 6:
411
411
  case "end":
412
412
  return _context3.stop();
413
413
  }
@@ -426,22 +426,22 @@ function loadWorker() {
426
426
  }
427
427
  function _loadWorker() {
428
428
  _loadWorker = asyncToGenerator_default()(/*#__PURE__*/regenerator_default().mark(function _callee4() {
429
- var match, url, blob, _t;
430
- return regenerator_default().wrap(function (_context4) {
429
+ var match, url, blob;
430
+ return regenerator_default().wrap(function _callee4$(_context4) {
431
431
  while (1) switch (_context4.prev = _context4.next) {
432
432
  case 0:
433
433
  _context4.prev = 0;
434
- return _context4.abrupt("return", new Worker(new URL(/* worker import */ __webpack_require__.p + __webpack_require__.u(112), __webpack_require__.b)));
435
- case 1:
436
- _context4.prev = 1;
437
- _t = _context4["catch"](0);
438
- if (!(_t instanceof DOMException)) {
439
- _context4.next = 2;
434
+ return _context4.abrupt("return", new Worker(new URL(/* worker import */ __webpack_require__.p + __webpack_require__.u(63), __webpack_require__.b)));
435
+ case 4:
436
+ _context4.prev = 4;
437
+ _context4.t0 = _context4["catch"](0);
438
+ if (!(_context4.t0 instanceof DOMException)) {
439
+ _context4.next = 12;
440
440
  break;
441
441
  }
442
- match = BAD_ORIGIN_ERROR.exec(_t.message);
442
+ match = BAD_ORIGIN_ERROR.exec(_context4.t0.message);
443
443
  if (!match) {
444
- _context4.next = 2;
444
+ _context4.next = 12;
445
445
  break;
446
446
  }
447
447
  url = match[1];
@@ -449,13 +449,13 @@ function _loadWorker() {
449
449
  type: 'text/javascript'
450
450
  });
451
451
  return _context4.abrupt("return", new Worker(URL.createObjectURL(blob)));
452
- case 2:
453
- throw _t;
454
- case 3:
452
+ case 12:
453
+ throw _context4.t0;
454
+ case 13:
455
455
  case "end":
456
456
  return _context4.stop();
457
457
  }
458
- }, _callee4, null, [[0, 1]]);
458
+ }, _callee4, null, [[0, 4]]);
459
459
  }));
460
460
  return _loadWorker.apply(this, arguments);
461
461
  }
@@ -465,20 +465,20 @@ function initWorker(_x4) {
465
465
  function _initWorker() {
466
466
  _initWorker = asyncToGenerator_default()(/*#__PURE__*/regenerator_default().mark(function _callee5(config) {
467
467
  var worker;
468
- return regenerator_default().wrap(function (_context5) {
468
+ return regenerator_default().wrap(function _callee5$(_context5) {
469
469
  while (1) switch (_context5.prev = _context5.next) {
470
470
  case 0:
471
- _context5.next = 1;
471
+ _context5.next = 2;
472
472
  return loadWorker();
473
- case 1:
473
+ case 2:
474
474
  worker = _context5.sent;
475
- _context5.next = 2;
475
+ _context5.next = 5;
476
476
  return _request(worker, _objectSpread(_objectSpread({}, config), {}, {
477
477
  type: 'init'
478
478
  }));
479
- case 2:
479
+ case 5:
480
480
  return _context5.abrupt("return", worker);
481
- case 3:
481
+ case 6:
482
482
  case "end":
483
483
  return _context5.stop();
484
484
  }
@@ -532,7 +532,7 @@ var LocalSearchProvider = /*#__PURE__*/function () {
532
532
  key: "suggest",
533
533
  value: function () {
534
534
  var _suggest = asyncToGenerator_default()(/*#__PURE__*/regenerator_default().mark(function _callee(query) {
535
- return regenerator_default().wrap(function (_context) {
535
+ return regenerator_default().wrap(function _callee$(_context) {
536
536
  while (1) switch (_context.prev = _context.next) {
537
537
  case 0:
538
538
  return _context.abrupt("return", this.request({
@@ -557,7 +557,7 @@ var LocalSearchProvider = /*#__PURE__*/function () {
557
557
  var page,
558
558
  count,
559
559
  _args2 = arguments;
560
- return regenerator_default().wrap(function (_context2) {
560
+ return regenerator_default().wrap(function _callee2$(_context2) {
561
561
  while (1) switch (_context2.prev = _context2.next) {
562
562
  case 0:
563
563
  page = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : 1;
@@ -568,7 +568,7 @@ var LocalSearchProvider = /*#__PURE__*/function () {
568
568
  page: page,
569
569
  count: count
570
570
  }));
571
- case 1:
571
+ case 3:
572
572
  case "end":
573
573
  return _context2.stop();
574
574
  }
@@ -588,18 +588,17 @@ var LocalSearchProvider = /*#__PURE__*/function () {
588
588
  key: "request",
589
589
  value: function () {
590
590
  var _request2 = asyncToGenerator_default()(/*#__PURE__*/regenerator_default().mark(function _callee3(message) {
591
- var _t, _t2, _t3;
592
- return regenerator_default().wrap(function (_context3) {
591
+ return regenerator_default().wrap(function _callee3$(_context3) {
593
592
  while (1) switch (_context3.prev = _context3.next) {
594
593
  case 0:
595
- _t = provider_request;
596
- _context3.next = 1;
594
+ _context3.t0 = provider_request;
595
+ _context3.next = 3;
597
596
  return this.worker;
598
- case 1:
599
- _t2 = _context3.sent;
600
- _t3 = message;
601
- return _context3.abrupt("return", _t(_t2, _t3));
602
- case 2:
597
+ case 3:
598
+ _context3.t1 = _context3.sent;
599
+ _context3.t2 = message;
600
+ return _context3.abrupt("return", (0, _context3.t0)(_context3.t1, _context3.t2));
601
+ case 6:
603
602
  case "end":
604
603
  return _context3.stop();
605
604
  }
@@ -618,22 +617,22 @@ function provider_loadWorker() {
618
617
  }
619
618
  function Search_provider_loadWorker() {
620
619
  Search_provider_loadWorker = asyncToGenerator_default()(/*#__PURE__*/regenerator_default().mark(function _callee4() {
621
- var match, url, blob, _t4;
622
- return regenerator_default().wrap(function (_context4) {
620
+ var match, url, blob;
621
+ return regenerator_default().wrap(function _callee4$(_context4) {
623
622
  while (1) switch (_context4.prev = _context4.next) {
624
623
  case 0:
625
624
  _context4.prev = 0;
626
- return _context4.abrupt("return", new Worker(new URL(/* worker import */ __webpack_require__.p + __webpack_require__.u(731), __webpack_require__.b)));
627
- case 1:
628
- _context4.prev = 1;
629
- _t4 = _context4["catch"](0);
630
- if (!(_t4 instanceof DOMException)) {
631
- _context4.next = 2;
625
+ return _context4.abrupt("return", new Worker(new URL(/* worker import */ __webpack_require__.p + __webpack_require__.u(444), __webpack_require__.b)));
626
+ case 4:
627
+ _context4.prev = 4;
628
+ _context4.t0 = _context4["catch"](0);
629
+ if (!(_context4.t0 instanceof DOMException)) {
630
+ _context4.next = 12;
632
631
  break;
633
632
  }
634
- match = provider_BAD_ORIGIN_ERROR.exec(_t4.message);
633
+ match = provider_BAD_ORIGIN_ERROR.exec(_context4.t0.message);
635
634
  if (!match) {
636
- _context4.next = 2;
635
+ _context4.next = 12;
637
636
  break;
638
637
  }
639
638
  url = match[1];
@@ -641,13 +640,13 @@ function Search_provider_loadWorker() {
641
640
  type: 'text/javascript'
642
641
  });
643
642
  return _context4.abrupt("return", new Worker(URL.createObjectURL(blob)));
644
- case 2:
645
- throw _t4;
646
- case 3:
643
+ case 12:
644
+ throw _context4.t0;
645
+ case 13:
647
646
  case "end":
648
647
  return _context4.stop();
649
648
  }
650
- }, _callee4, null, [[0, 1]]);
649
+ }, _callee4, null, [[0, 4]]);
651
650
  }));
652
651
  return Search_provider_loadWorker.apply(this, arguments);
653
652
  }
@@ -657,20 +656,20 @@ function provider_initWorker(_x4) {
657
656
  function Search_provider_initWorker() {
658
657
  Search_provider_initWorker = asyncToGenerator_default()(/*#__PURE__*/regenerator_default().mark(function _callee5(config) {
659
658
  var worker;
660
- return regenerator_default().wrap(function (_context5) {
659
+ return regenerator_default().wrap(function _callee5$(_context5) {
661
660
  while (1) switch (_context5.prev = _context5.next) {
662
661
  case 0:
663
- _context5.next = 1;
662
+ _context5.next = 2;
664
663
  return provider_loadWorker();
665
- case 1:
664
+ case 2:
666
665
  worker = _context5.sent;
667
- _context5.next = 2;
666
+ _context5.next = 5;
668
667
  return provider_request(worker, provider_objectSpread(provider_objectSpread({}, config), {}, {
669
668
  type: 'init'
670
669
  }));
671
- case 2:
670
+ case 5:
672
671
  return _context5.abrupt("return", worker);
673
- case 3:
672
+ case 6:
674
673
  case "end":
675
674
  return _context5.stop();
676
675
  }
@@ -798,9 +797,9 @@ var Search = function Search() {
798
797
  total = _useState8[0],
799
798
  setTotal = _useState8[1];
800
799
  var _useState9 = useState(false),
801
- _useState0 = _slicedToArray(_useState9, 2),
802
- loading = _useState0[0],
803
- setLoading = _useState0[1];
800
+ _useState10 = _slicedToArray(_useState9, 2),
801
+ loading = _useState10[0],
802
+ setLoading = _useState10[1];
804
803
  var providerRef = useRef(null);
805
804
  useEffect(function () {
806
805
  var _provider$init;
@@ -816,37 +815,37 @@ var Search = function Search() {
816
815
  }, [router]);
817
816
  var performSearch = useCallback(/*#__PURE__*/function () {
818
817
  var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(searchQuery, currentPage) {
819
- var _providerRef$current, searchResults, formatted, isLastPage, totalItems, _t;
820
- return _regeneratorRuntime.wrap(function (_context) {
818
+ var _providerRef$current, searchResults, formatted, isLastPage, totalItems;
819
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
821
820
  while (1) switch (_context.prev = _context.next) {
822
821
  case 0:
823
822
  setLoading(true);
824
823
  _context.prev = 1;
825
- _context.next = 2;
824
+ _context.next = 4;
826
825
  return (_providerRef$current = providerRef.current) === null || _providerRef$current === void 0 ? void 0 : _providerRef$current.search(searchQuery, currentPage, ITEMS_PER_PAGE);
827
- case 2:
826
+ case 4:
828
827
  searchResults = _context.sent;
829
828
  formatted = formatResults(searchResults !== null && searchResults !== void 0 ? searchResults : []);
830
829
  setResults(formatted);
831
830
  isLastPage = formatted.length < ITEMS_PER_PAGE;
832
831
  totalItems = isLastPage ? (currentPage - 1) * ITEMS_PER_PAGE + formatted.length : currentPage * ITEMS_PER_PAGE + 1;
833
832
  setTotal(formatted.length > 0 ? totalItems : 0);
834
- _context.next = 4;
833
+ _context.next = 16;
835
834
  break;
836
- case 3:
837
- _context.prev = 3;
838
- _t = _context["catch"](1);
835
+ case 12:
836
+ _context.prev = 12;
837
+ _context.t0 = _context["catch"](1);
839
838
  setResults([]);
840
839
  setTotal(0);
841
- case 4:
842
- _context.prev = 4;
840
+ case 16:
841
+ _context.prev = 16;
843
842
  setLoading(false);
844
- return _context.finish(4);
845
- case 5:
843
+ return _context.finish(16);
844
+ case 19:
846
845
  case "end":
847
846
  return _context.stop();
848
847
  }
849
- }, _callee, null, [[1, 3, 4, 5]]);
848
+ }, _callee, null, [[1, 12, 16, 19]]);
850
849
  }));
851
850
  return function (_x, _x2) {
852
851
  return _ref.apply(this, arguments);
@@ -1020,8 +1019,8 @@ var objectWithoutProperties = __webpack_require__(91847);
1020
1019
  var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
1021
1020
  // EXTERNAL MODULE: ./node_modules/@gravity-ui/page-constructor/build/esm/containers/PageConstructor/Provider.js
1022
1021
  var Provider = __webpack_require__(47658);
1023
- // EXTERNAL MODULE: ./node_modules/@gravity-ui/page-constructor/build/esm/containers/PageConstructor/PageConstructor.js + 10 modules
1024
- var PageConstructor = __webpack_require__(13224);
1022
+ // EXTERNAL MODULE: ./node_modules/@gravity-ui/page-constructor/build/esm/containers/PageConstructor/PageConstructor.js + 18 modules
1023
+ var PageConstructor = __webpack_require__(27638);
1025
1024
  ;// ./src/components/Layout/index.tsx
1026
1025
 
1027
1026
  function Layout_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -1451,8 +1450,8 @@ function filterControls(controls, omitProps) {
1451
1450
  var build_react = __webpack_require__(58498);
1452
1451
  // EXTERNAL MODULE: ./node_modules/@diplodoc/latex-extension/build/react/index.js
1453
1452
  var latex_extension_build_react = __webpack_require__(89457);
1454
- // EXTERNAL MODULE: ./node_modules/@diplodoc/openapi-extension/build/runtime/index.min.js + 39 modules
1455
- var index_min = __webpack_require__(49081);
1453
+ // EXTERNAL MODULE: ./node_modules/@diplodoc/openapi-extension/build/runtime/index.min.js + 14 modules
1454
+ var index_min = __webpack_require__(81761);
1456
1455
  // EXTERNAL MODULE: ./node_modules/@gravity-ui/uikit/build/esm/components/theme/useTheme.js
1457
1456
  var theme_useTheme = __webpack_require__(65277);
1458
1457
  // EXTERNAL MODULE: ./node_modules/@diplodoc/tabs-extension/build/react/index.js
@@ -1562,8 +1561,8 @@ function useMobile() {
1562
1561
  }, [onResizeHandler]);
1563
1562
  return mobileView;
1564
1563
  }
1565
- // EXTERNAL MODULE: ./node_modules/@diplodoc/mdx-extension/build/esm/index.js + 14 modules
1566
- var esm = __webpack_require__(46835);
1564
+ // EXTERNAL MODULE: ./node_modules/@diplodoc/mdx-extension/build/esm/index.js + 20 modules
1565
+ var esm = __webpack_require__(2097);
1567
1566
  ;// ./src/components/App/withMdxInit.tsx
1568
1567
 
1569
1568
  function withMdxInit_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }