@overmap-ai/core 1.0.57-component-asset-renames.0 → 1.0.57-export-overmap-reducer.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -0
- package/dist/contexts/overmap.d.ts +2 -2
- package/dist/contexts/sdk/globals.d.ts +3 -3
- package/dist/contexts/sdk/sdk.d.ts +4 -4
- package/dist/overmap-core.js +60 -339
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +60 -339
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/sdk.d.ts +4 -4
- package/dist/sdk/services/AgentService.d.ts +2 -21
- package/dist/store/index.d.ts +0 -1
- package/dist/store/slices/agentsSlice.d.ts +3 -3
- package/dist/store/slices/assetSlice.d.ts +6 -6
- package/dist/store/slices/assetStageCompletionSlice.d.ts +2 -2
- package/dist/store/slices/assetStageSlice.d.ts +3 -3
- package/dist/store/slices/assetTypeSlice.d.ts +4 -4
- package/dist/store/slices/authSlice.d.ts +3 -3
- package/dist/store/slices/categorySlice.d.ts +5 -5
- package/dist/store/slices/documentSlice.d.ts +6 -6
- package/dist/store/slices/formRevisionSlice.d.ts +2 -2
- package/dist/store/slices/issueSlice.d.ts +14 -14
- package/dist/store/slices/mapSlice.d.ts +4 -4
- package/dist/store/slices/organizationAccessSlice.d.ts +3 -3
- package/dist/store/slices/outboxSlice.d.ts +3 -3
- package/dist/store/slices/projectAccessSlice.d.ts +2 -2
- package/dist/store/slices/projectFileSlice.d.ts +3 -3
- package/dist/store/slices/projectSlice.d.ts +8 -8
- package/dist/store/slices/rehydratedSlice.d.ts +2 -2
- package/dist/store/slices/settingsSlice.d.ts +9 -9
- package/dist/store/slices/userSlice.d.ts +4 -4
- package/dist/store/slices/workspaceSlice.d.ts +2 -2
- package/dist/store/store.d.ts +3 -36
- package/dist/typings/models/access.d.ts +1 -0
- package/dist/typings/models/store.d.ts +2 -3
- package/dist/typings/store.d.ts +4 -4
- package/dist/utils/utils.d.ts +3 -3
- package/package.json +1 -1
- package/dist/store/hooks.d.ts +0 -4
package/LICENSE
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
UNLICENSED (ALL RIGHTS RESERVED)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
|
|
3
|
-
import {
|
|
3
|
+
import { OvermapRootState } from "../typings";
|
|
4
4
|
interface OvermapProviderProps {
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
production?: boolean;
|
|
7
7
|
disableDefaultTheme?: boolean;
|
|
8
|
-
store: ToolkitStore<
|
|
8
|
+
store: ToolkitStore<OvermapRootState>;
|
|
9
9
|
}
|
|
10
10
|
declare const OvermapContext: React.Context<null>;
|
|
11
11
|
declare const OvermapProvider: (props: OvermapProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
|
|
2
|
-
import {
|
|
3
|
-
export declare function setClientStore(store: ToolkitStore<
|
|
4
|
-
export declare function getClientStore(): ToolkitStore<
|
|
2
|
+
import { OvermapRootState } from "../../typings";
|
|
3
|
+
export declare function setClientStore(store: ToolkitStore<OvermapRootState>): void;
|
|
4
|
+
export declare function getClientStore(): ToolkitStore<OvermapRootState> | undefined;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { OvermapSDK } from "../../sdk";
|
|
3
3
|
import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
|
|
4
|
-
import {
|
|
4
|
+
import { OvermapRootState } from "../../typings";
|
|
5
5
|
export interface ISDKContext {
|
|
6
6
|
sdk: OvermapSDK;
|
|
7
7
|
}
|
|
8
|
-
interface SDKProviderProps {
|
|
8
|
+
interface SDKProviderProps<TStore extends ToolkitStore<OvermapRootState>> {
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
API_URL: string;
|
|
11
|
-
store:
|
|
11
|
+
store: TStore;
|
|
12
12
|
}
|
|
13
13
|
declare const SDKContext: React.Context<ISDKContext>;
|
|
14
|
-
declare const SDKProvider:
|
|
14
|
+
declare const SDKProvider: <TStore extends ToolkitStore<OvermapRootState, import("redux").AnyAction, readonly import("redux").Middleware<{}, OvermapRootState, import("redux").Dispatch<import("redux").AnyAction>>[]>>(props: SDKProviderProps<TStore>) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export { SDKProvider, SDKContext };
|
package/dist/overmap-core.js
CHANGED
|
@@ -6,7 +6,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6
6
|
};
|
|
7
7
|
var _a;
|
|
8
8
|
import * as React from "react";
|
|
9
|
-
import React__default, { useState, useEffect, useRef,
|
|
9
|
+
import React__default, { useState, useEffect, useRef, useMemo, memo, useCallback, createContext, createElement, useContext, forwardRef, Children, isValidElement, cloneElement, Fragment as Fragment$1, useLayoutEffect, useReducer, lazy, Suspense } from "react";
|
|
10
10
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
11
11
|
import { unsafeShowToast, AlertDialogProvider, ToastProvider, DefaultTheme, Flex as Flex$1, IconButton, RiIcon, Text as Text$1, useSeverityColor, TextArea, Select, useToast, Badge, MultiSelect, Overlay, Button, Spinner, useViewportSize, ButtonGroup, IconColorUtility, Tooltip, Popover, useSize, ToggleButton, Separator, OvermapItem, ButtonList, divButtonProps, OvermapDropdownMenu, Checkbox as Checkbox$1, Input, useAlertDialog } from "@overmap-ai/blocks";
|
|
12
12
|
import { DepGraph } from "dependency-graph";
|
|
@@ -15,11 +15,11 @@ import { offline as offline$1 } from "@redux-offline/redux-offline";
|
|
|
15
15
|
import offlineConfig from "@redux-offline/redux-offline/lib/defaults";
|
|
16
16
|
import localforage from "localforage";
|
|
17
17
|
import createMigration from "redux-persist-migrate";
|
|
18
|
-
import { createSlice, createSelector, combineReducers,
|
|
18
|
+
import { createSlice, createSelector, combineReducers, createNextState } from "@reduxjs/toolkit";
|
|
19
19
|
import request from "superagent";
|
|
20
|
-
import { shallowEqual as shallowEqual$1, useDispatch, useSelector } from "react-redux";
|
|
21
20
|
import { v4 } from "uuid";
|
|
22
21
|
import ColorCls from "color";
|
|
22
|
+
import { shallowEqual as shallowEqual$1, useSelector } from "react-redux";
|
|
23
23
|
import jwtDecode from "jwt-decode";
|
|
24
24
|
import { RESET_STATE } from "@redux-offline/redux-offline/lib/constants";
|
|
25
25
|
import { openDB } from "idb";
|
|
@@ -384,257 +384,6 @@ function downloadFile(file) {
|
|
|
384
384
|
const blob = new Blob([file]);
|
|
385
385
|
saveAs(blob, file.name);
|
|
386
386
|
}
|
|
387
|
-
const global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
|
|
388
|
-
function defaultSetTimout() {
|
|
389
|
-
throw new Error("setTimeout has not been defined");
|
|
390
|
-
}
|
|
391
|
-
function defaultClearTimeout() {
|
|
392
|
-
throw new Error("clearTimeout has not been defined");
|
|
393
|
-
}
|
|
394
|
-
var cachedSetTimeout = defaultSetTimout;
|
|
395
|
-
var cachedClearTimeout = defaultClearTimeout;
|
|
396
|
-
if (typeof global$1.setTimeout === "function") {
|
|
397
|
-
cachedSetTimeout = setTimeout;
|
|
398
|
-
}
|
|
399
|
-
if (typeof global$1.clearTimeout === "function") {
|
|
400
|
-
cachedClearTimeout = clearTimeout;
|
|
401
|
-
}
|
|
402
|
-
function runTimeout(fun) {
|
|
403
|
-
if (cachedSetTimeout === setTimeout) {
|
|
404
|
-
return setTimeout(fun, 0);
|
|
405
|
-
}
|
|
406
|
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
407
|
-
cachedSetTimeout = setTimeout;
|
|
408
|
-
return setTimeout(fun, 0);
|
|
409
|
-
}
|
|
410
|
-
try {
|
|
411
|
-
return cachedSetTimeout(fun, 0);
|
|
412
|
-
} catch (e) {
|
|
413
|
-
try {
|
|
414
|
-
return cachedSetTimeout.call(null, fun, 0);
|
|
415
|
-
} catch (e2) {
|
|
416
|
-
return cachedSetTimeout.call(this, fun, 0);
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
function runClearTimeout(marker) {
|
|
421
|
-
if (cachedClearTimeout === clearTimeout) {
|
|
422
|
-
return clearTimeout(marker);
|
|
423
|
-
}
|
|
424
|
-
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
425
|
-
cachedClearTimeout = clearTimeout;
|
|
426
|
-
return clearTimeout(marker);
|
|
427
|
-
}
|
|
428
|
-
try {
|
|
429
|
-
return cachedClearTimeout(marker);
|
|
430
|
-
} catch (e) {
|
|
431
|
-
try {
|
|
432
|
-
return cachedClearTimeout.call(null, marker);
|
|
433
|
-
} catch (e2) {
|
|
434
|
-
return cachedClearTimeout.call(this, marker);
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
var queue = [];
|
|
439
|
-
var draining = false;
|
|
440
|
-
var currentQueue;
|
|
441
|
-
var queueIndex = -1;
|
|
442
|
-
function cleanUpNextTick() {
|
|
443
|
-
if (!draining || !currentQueue) {
|
|
444
|
-
return;
|
|
445
|
-
}
|
|
446
|
-
draining = false;
|
|
447
|
-
if (currentQueue.length) {
|
|
448
|
-
queue = currentQueue.concat(queue);
|
|
449
|
-
} else {
|
|
450
|
-
queueIndex = -1;
|
|
451
|
-
}
|
|
452
|
-
if (queue.length) {
|
|
453
|
-
drainQueue();
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
function drainQueue() {
|
|
457
|
-
if (draining) {
|
|
458
|
-
return;
|
|
459
|
-
}
|
|
460
|
-
var timeout = runTimeout(cleanUpNextTick);
|
|
461
|
-
draining = true;
|
|
462
|
-
var len = queue.length;
|
|
463
|
-
while (len) {
|
|
464
|
-
currentQueue = queue;
|
|
465
|
-
queue = [];
|
|
466
|
-
while (++queueIndex < len) {
|
|
467
|
-
if (currentQueue) {
|
|
468
|
-
currentQueue[queueIndex].run();
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
queueIndex = -1;
|
|
472
|
-
len = queue.length;
|
|
473
|
-
}
|
|
474
|
-
currentQueue = null;
|
|
475
|
-
draining = false;
|
|
476
|
-
runClearTimeout(timeout);
|
|
477
|
-
}
|
|
478
|
-
function nextTick(fun) {
|
|
479
|
-
var args = new Array(arguments.length - 1);
|
|
480
|
-
if (arguments.length > 1) {
|
|
481
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
482
|
-
args[i - 1] = arguments[i];
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
queue.push(new Item(fun, args));
|
|
486
|
-
if (queue.length === 1 && !draining) {
|
|
487
|
-
runTimeout(drainQueue);
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
function Item(fun, array) {
|
|
491
|
-
this.fun = fun;
|
|
492
|
-
this.array = array;
|
|
493
|
-
}
|
|
494
|
-
Item.prototype.run = function() {
|
|
495
|
-
this.fun.apply(null, this.array);
|
|
496
|
-
};
|
|
497
|
-
var title$1 = "browser";
|
|
498
|
-
var platform = "browser";
|
|
499
|
-
var browser = true;
|
|
500
|
-
var env = {};
|
|
501
|
-
var argv = [];
|
|
502
|
-
var version = "";
|
|
503
|
-
var versions = {};
|
|
504
|
-
var release = {};
|
|
505
|
-
var config = {};
|
|
506
|
-
function noop() {
|
|
507
|
-
}
|
|
508
|
-
var on = noop;
|
|
509
|
-
var addListener = noop;
|
|
510
|
-
var once = noop;
|
|
511
|
-
var off = noop;
|
|
512
|
-
var removeListener = noop;
|
|
513
|
-
var removeAllListeners = noop;
|
|
514
|
-
var emit = noop;
|
|
515
|
-
function binding(name) {
|
|
516
|
-
throw new Error("process.binding is not supported");
|
|
517
|
-
}
|
|
518
|
-
function cwd() {
|
|
519
|
-
return "/";
|
|
520
|
-
}
|
|
521
|
-
function chdir(dir) {
|
|
522
|
-
throw new Error("process.chdir is not supported");
|
|
523
|
-
}
|
|
524
|
-
function umask() {
|
|
525
|
-
return 0;
|
|
526
|
-
}
|
|
527
|
-
var performance = global$1.performance || {};
|
|
528
|
-
var performanceNow = performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow || function() {
|
|
529
|
-
return (/* @__PURE__ */ new Date()).getTime();
|
|
530
|
-
};
|
|
531
|
-
function hrtime(previousTimestamp) {
|
|
532
|
-
var clocktime = performanceNow.call(performance) * 1e-3;
|
|
533
|
-
var seconds = Math.floor(clocktime);
|
|
534
|
-
var nanoseconds = Math.floor(clocktime % 1 * 1e9);
|
|
535
|
-
if (previousTimestamp) {
|
|
536
|
-
seconds = seconds - previousTimestamp[0];
|
|
537
|
-
nanoseconds = nanoseconds - previousTimestamp[1];
|
|
538
|
-
if (nanoseconds < 0) {
|
|
539
|
-
seconds--;
|
|
540
|
-
nanoseconds += 1e9;
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
return [seconds, nanoseconds];
|
|
544
|
-
}
|
|
545
|
-
var startTime = /* @__PURE__ */ new Date();
|
|
546
|
-
function uptime() {
|
|
547
|
-
var currentTime = /* @__PURE__ */ new Date();
|
|
548
|
-
var dif = currentTime - startTime;
|
|
549
|
-
return dif / 1e3;
|
|
550
|
-
}
|
|
551
|
-
var browser$1 = {
|
|
552
|
-
nextTick,
|
|
553
|
-
title: title$1,
|
|
554
|
-
browser,
|
|
555
|
-
env,
|
|
556
|
-
argv,
|
|
557
|
-
version,
|
|
558
|
-
versions,
|
|
559
|
-
on,
|
|
560
|
-
addListener,
|
|
561
|
-
once,
|
|
562
|
-
off,
|
|
563
|
-
removeListener,
|
|
564
|
-
removeAllListeners,
|
|
565
|
-
emit,
|
|
566
|
-
binding,
|
|
567
|
-
cwd,
|
|
568
|
-
chdir,
|
|
569
|
-
umask,
|
|
570
|
-
hrtime,
|
|
571
|
-
platform,
|
|
572
|
-
release,
|
|
573
|
-
config,
|
|
574
|
-
uptime
|
|
575
|
-
};
|
|
576
|
-
function _typeof(o) {
|
|
577
|
-
"@babel/helpers - typeof";
|
|
578
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
|
|
579
|
-
return typeof o2;
|
|
580
|
-
} : function(o2) {
|
|
581
|
-
return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
|
|
582
|
-
}, _typeof(o);
|
|
583
|
-
}
|
|
584
|
-
function _toPrimitive$1(input, hint) {
|
|
585
|
-
if (_typeof(input) !== "object" || input === null)
|
|
586
|
-
return input;
|
|
587
|
-
var prim = input[Symbol.toPrimitive];
|
|
588
|
-
if (prim !== void 0) {
|
|
589
|
-
var res = prim.call(input, hint || "default");
|
|
590
|
-
if (_typeof(res) !== "object")
|
|
591
|
-
return res;
|
|
592
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
593
|
-
}
|
|
594
|
-
return (hint === "string" ? String : Number)(input);
|
|
595
|
-
}
|
|
596
|
-
function _toPropertyKey$1(arg) {
|
|
597
|
-
var key = _toPrimitive$1(arg, "string");
|
|
598
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
599
|
-
}
|
|
600
|
-
function _defineProperty$1(obj, key, value) {
|
|
601
|
-
key = _toPropertyKey$1(key);
|
|
602
|
-
if (key in obj) {
|
|
603
|
-
Object.defineProperty(obj, key, {
|
|
604
|
-
value,
|
|
605
|
-
enumerable: true,
|
|
606
|
-
configurable: true,
|
|
607
|
-
writable: true
|
|
608
|
-
});
|
|
609
|
-
} else {
|
|
610
|
-
obj[key] = value;
|
|
611
|
-
}
|
|
612
|
-
return obj;
|
|
613
|
-
}
|
|
614
|
-
function ownKeys$1(e, r) {
|
|
615
|
-
var t = Object.keys(e);
|
|
616
|
-
if (Object.getOwnPropertySymbols) {
|
|
617
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
618
|
-
r && (o = o.filter(function(r2) {
|
|
619
|
-
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
620
|
-
})), t.push.apply(t, o);
|
|
621
|
-
}
|
|
622
|
-
return t;
|
|
623
|
-
}
|
|
624
|
-
function _objectSpread2(e) {
|
|
625
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
626
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
627
|
-
r % 2 ? ownKeys$1(Object(t), true).forEach(function(r2) {
|
|
628
|
-
_defineProperty$1(e, r2, t[r2]);
|
|
629
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r2) {
|
|
630
|
-
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
631
|
-
});
|
|
632
|
-
}
|
|
633
|
-
return e;
|
|
634
|
-
}
|
|
635
|
-
function formatProdErrorMessage(code) {
|
|
636
|
-
return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or use the non-minified dev environment for full errors. ";
|
|
637
|
-
}
|
|
638
387
|
var randomString = function randomString2() {
|
|
639
388
|
return Math.random().toString(36).substring(7).split("").join(".");
|
|
640
389
|
};
|
|
@@ -663,32 +412,6 @@ function compose() {
|
|
|
663
412
|
};
|
|
664
413
|
});
|
|
665
414
|
}
|
|
666
|
-
function applyMiddleware() {
|
|
667
|
-
for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
668
|
-
middlewares[_key] = arguments[_key];
|
|
669
|
-
}
|
|
670
|
-
return function(createStore) {
|
|
671
|
-
return function() {
|
|
672
|
-
var store = createStore.apply(void 0, arguments);
|
|
673
|
-
var _dispatch = function dispatch() {
|
|
674
|
-
throw new Error(browser$1.env.NODE_ENV === "production" ? formatProdErrorMessage(15) : "Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.");
|
|
675
|
-
};
|
|
676
|
-
var middlewareAPI = {
|
|
677
|
-
getState: store.getState,
|
|
678
|
-
dispatch: function dispatch() {
|
|
679
|
-
return _dispatch.apply(void 0, arguments);
|
|
680
|
-
}
|
|
681
|
-
};
|
|
682
|
-
var chain = middlewares.map(function(middleware) {
|
|
683
|
-
return middleware(middlewareAPI);
|
|
684
|
-
});
|
|
685
|
-
_dispatch = compose.apply(void 0, chain)(store.dispatch);
|
|
686
|
-
return _objectSpread2(_objectSpread2({}, store), {}, {
|
|
687
|
-
dispatch: _dispatch
|
|
688
|
-
});
|
|
689
|
-
};
|
|
690
|
-
};
|
|
691
|
-
}
|
|
692
415
|
var HttpMethod = /* @__PURE__ */ ((HttpMethod2) => {
|
|
693
416
|
HttpMethod2["GET"] = "GET";
|
|
694
417
|
HttpMethod2["POST"] = "POST";
|
|
@@ -1967,9 +1690,12 @@ const selectStage = restructureCreateSelectorWithArgs(
|
|
|
1967
1690
|
return stageMapping[stageId];
|
|
1968
1691
|
})
|
|
1969
1692
|
);
|
|
1970
|
-
const selectStages = createSelector(
|
|
1971
|
-
|
|
1972
|
-
|
|
1693
|
+
const selectStages = createSelector(
|
|
1694
|
+
[selectStageMapping],
|
|
1695
|
+
(stageMapping) => {
|
|
1696
|
+
return Object.values(stageMapping);
|
|
1697
|
+
}
|
|
1698
|
+
);
|
|
1973
1699
|
const selectStagesFromAssetTypeIds = restructureCreateSelectorWithArgs(
|
|
1974
1700
|
createSelector([selectStages, (_state, assetTypeIds) => assetTypeIds], (stages, assetTypeIds) => {
|
|
1975
1701
|
const assetTypeIdsSet = new Set(assetTypeIds);
|
|
@@ -2393,9 +2119,12 @@ const selectCommentsOfIssue = restructureCreateSelectorWithArgs(
|
|
|
2393
2119
|
);
|
|
2394
2120
|
const selectIssueUpdateMapping = (state) => state.issueReducer.updates;
|
|
2395
2121
|
const selectIssueUpdatesOfIssue = restructureCreateSelectorWithArgs(
|
|
2396
|
-
createSelector(
|
|
2397
|
-
|
|
2398
|
-
|
|
2122
|
+
createSelector(
|
|
2123
|
+
[selectIssueUpdateMapping, (_state, issueId) => issueId],
|
|
2124
|
+
(updates, issueId) => {
|
|
2125
|
+
return Object.values(updates).filter((update) => update.issue === issueId);
|
|
2126
|
+
}
|
|
2127
|
+
)
|
|
2399
2128
|
);
|
|
2400
2129
|
const selectAttachmentsOfIssue = restructureCreateSelectorWithArgs(
|
|
2401
2130
|
createSelector(
|
|
@@ -3507,6 +3236,8 @@ const initialState$8 = {
|
|
|
3507
3236
|
},
|
|
3508
3237
|
appearance: "dark",
|
|
3509
3238
|
isFetchingInitialData: false,
|
|
3239
|
+
// TODO: this is being used only in the custom hook in /web called useRetrySDK, which has something to do with licences
|
|
3240
|
+
// this has no purpose of being put into /core, it should be removed from here. But licences need to be fixed before this is done.
|
|
3510
3241
|
isLoading: false
|
|
3511
3242
|
};
|
|
3512
3243
|
const settingSlice = createSlice({
|
|
@@ -3703,11 +3434,14 @@ const selectLatestFormRevisionOfForm = restructureCreateSelectorWithArgs(
|
|
|
3703
3434
|
})
|
|
3704
3435
|
);
|
|
3705
3436
|
const selectFormRevisionsOfForm = restructureCreateSelectorWithArgs(
|
|
3706
|
-
createSelector(
|
|
3707
|
-
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3437
|
+
createSelector(
|
|
3438
|
+
[selectFormRevisions, (_state, formId2) => formId2],
|
|
3439
|
+
(revisions, formId2) => {
|
|
3440
|
+
return revisions.filter((revision) => {
|
|
3441
|
+
return revision.form === formId2;
|
|
3442
|
+
});
|
|
3443
|
+
}
|
|
3444
|
+
)
|
|
3711
3445
|
);
|
|
3712
3446
|
const selectLatestFormRevisionsOfAssetTypes = restructureCreateSelectorWithArgs(
|
|
3713
3447
|
createSelector(
|
|
@@ -4592,7 +4326,7 @@ function handleWorkspaceRemoval(draft, action) {
|
|
|
4592
4326
|
form.index_workspace = mainWorkspace.offline_id;
|
|
4593
4327
|
}
|
|
4594
4328
|
}
|
|
4595
|
-
const
|
|
4329
|
+
const overmapRootReducer = (state, action) => {
|
|
4596
4330
|
if (action.type === "auth/setLoggedIn" && !action.payload) {
|
|
4597
4331
|
return overmapReducer(void 0, action);
|
|
4598
4332
|
}
|
|
@@ -4680,17 +4414,6 @@ const customConfig = {
|
|
|
4680
4414
|
};
|
|
4681
4415
|
const migration = createMigration(manifest, VERSION_REDUCER_KEY);
|
|
4682
4416
|
const overmapEnhancer = compose(offline$1(customConfig), migration);
|
|
4683
|
-
const defaultStore = configureStore({
|
|
4684
|
-
reducer: rootReducer,
|
|
4685
|
-
enhancers: [compose(applyMiddleware(), overmapEnhancer)],
|
|
4686
|
-
middleware: (getDefaultMiddleware) => {
|
|
4687
|
-
return getDefaultMiddleware({
|
|
4688
|
-
// TODO: Enable periodically to find problems
|
|
4689
|
-
serializableCheck: false,
|
|
4690
|
-
immutableCheck: false
|
|
4691
|
-
});
|
|
4692
|
-
}
|
|
4693
|
-
});
|
|
4694
4417
|
function extractResponseFromError(error2) {
|
|
4695
4418
|
function isResponse(response) {
|
|
4696
4419
|
const knownKeys = ["ok", "redirect", "clientError", "serverError", "error"];
|
|
@@ -4994,8 +4717,6 @@ function retry(_action, _retries) {
|
|
|
4994
4717
|
getClientStore().dispatch(_setLatestRetryTime((/* @__PURE__ */ new Date()).getTime()));
|
|
4995
4718
|
return OUTBOX_RETRY_DELAY;
|
|
4996
4719
|
}
|
|
4997
|
-
const useAppDispatch = () => useDispatch();
|
|
4998
|
-
const useAppSelector = useSelector;
|
|
4999
4720
|
const EXPIRING_SOON_THRESHOLD = 1800;
|
|
5000
4721
|
function parseTokens(response) {
|
|
5001
4722
|
if (!response.access)
|
|
@@ -8288,13 +8009,16 @@ class AgentService extends BaseApiService {
|
|
|
8288
8009
|
queryParams: { conversation_id: conversationId }
|
|
8289
8010
|
}).then((response) => {
|
|
8290
8011
|
const conversation = store.getState().agentsReducer.conversations[conversationId];
|
|
8291
|
-
if (!conversation) {
|
|
8012
|
+
if (!(conversation == null ? void 0 : conversation.offline_id)) {
|
|
8292
8013
|
throw new Error("Conversation not found");
|
|
8293
8014
|
}
|
|
8015
|
+
if (!Array.isArray(response)) {
|
|
8016
|
+
response = [response];
|
|
8017
|
+
}
|
|
8294
8018
|
store.dispatch(
|
|
8295
8019
|
updateConversation({
|
|
8296
|
-
|
|
8297
|
-
tiptap_content: [...conversation.tiptap_content || [], response
|
|
8020
|
+
...conversation,
|
|
8021
|
+
tiptap_content: [...conversation.tiptap_content || [], ...response]
|
|
8298
8022
|
})
|
|
8299
8023
|
);
|
|
8300
8024
|
});
|
|
@@ -8631,14 +8355,14 @@ class OvermapSDK {
|
|
|
8631
8355
|
}
|
|
8632
8356
|
const makeClient = (apiUrl, store) => new OvermapSDK(apiUrl, store);
|
|
8633
8357
|
const SDKContext = React__default.createContext({});
|
|
8634
|
-
const SDKProvider =
|
|
8358
|
+
const SDKProvider = genericMemo(function SDKProvider2(props) {
|
|
8359
|
+
const { children, API_URL, store } = props;
|
|
8635
8360
|
const client = useMemo(() => makeClient(API_URL, store), [API_URL, store]);
|
|
8636
8361
|
useEffect(() => {
|
|
8637
8362
|
setClientStore(store);
|
|
8638
8363
|
}, [store]);
|
|
8639
8364
|
return /* @__PURE__ */ jsx(SDKContext.Provider, { value: { sdk: client }, children });
|
|
8640
8365
|
});
|
|
8641
|
-
SDKProvider.displayName = "SDKProvider";
|
|
8642
8366
|
const useSDK = () => {
|
|
8643
8367
|
return React__default.useContext(SDKContext);
|
|
8644
8368
|
};
|
|
@@ -14354,7 +14078,7 @@ const FileViewerContext = createContext(() => {
|
|
|
14354
14078
|
const useFileViewer = () => useContext(FileViewerContext);
|
|
14355
14079
|
const FileViewerProvider = memo((props) => {
|
|
14356
14080
|
const { children } = props;
|
|
14357
|
-
const [
|
|
14081
|
+
const [config, setConfig] = useState(null);
|
|
14358
14082
|
const [fileType, setFileType] = useState(null);
|
|
14359
14083
|
const closeFileViewer = useCallback(() => {
|
|
14360
14084
|
setConfig(null);
|
|
@@ -14367,16 +14091,16 @@ const FileViewerProvider = memo((props) => {
|
|
|
14367
14091
|
[closeFileViewer]
|
|
14368
14092
|
);
|
|
14369
14093
|
const handleClose = useCallback(() => {
|
|
14370
|
-
if (!
|
|
14094
|
+
if (!config)
|
|
14371
14095
|
return;
|
|
14372
|
-
if (
|
|
14373
|
-
|
|
14096
|
+
if (config.onClose)
|
|
14097
|
+
config.onClose();
|
|
14374
14098
|
closeFileViewer();
|
|
14375
|
-
}, [closeFileViewer,
|
|
14099
|
+
}, [closeFileViewer, config]);
|
|
14376
14100
|
useEffect(() => {
|
|
14377
|
-
if (!
|
|
14101
|
+
if (!config)
|
|
14378
14102
|
return;
|
|
14379
|
-
const { file } =
|
|
14103
|
+
const { file } = config;
|
|
14380
14104
|
if (SUPPORTED_SPREADSHEET_FILE_EXTENSIONS.includes(file.type)) {
|
|
14381
14105
|
setFileType("spreadsheet");
|
|
14382
14106
|
return;
|
|
@@ -14389,14 +14113,14 @@ const FileViewerProvider = memo((props) => {
|
|
|
14389
14113
|
setFileType("image");
|
|
14390
14114
|
return;
|
|
14391
14115
|
}
|
|
14392
|
-
}, [
|
|
14116
|
+
}, [config]);
|
|
14393
14117
|
const value = useMemo(() => openFileViewer, [openFileViewer]);
|
|
14394
14118
|
return /* @__PURE__ */ jsxs(FileViewerContext.Provider, { value, children: [
|
|
14395
14119
|
children,
|
|
14396
|
-
|
|
14397
|
-
fileType === "spreadsheet" && /* @__PURE__ */ jsx(SpreadsheetViewer, { file:
|
|
14398
|
-
fileType === "pdf" && /* @__PURE__ */ jsx(PDFViewer, { file:
|
|
14399
|
-
fileType === "image" && /* @__PURE__ */ jsx(ImageViewer, { file:
|
|
14120
|
+
config && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14121
|
+
fileType === "spreadsheet" && /* @__PURE__ */ jsx(SpreadsheetViewer, { file: config.file, onDelete: config.onDelete, onClose: handleClose }),
|
|
14122
|
+
fileType === "pdf" && /* @__PURE__ */ jsx(PDFViewer, { file: config.file, onDelete: config.onDelete, onClose: handleClose }),
|
|
14123
|
+
fileType === "image" && /* @__PURE__ */ jsx(ImageViewer, { file: config.file, onDelete: config.onDelete, onClose: handleClose })
|
|
14400
14124
|
] })
|
|
14401
14125
|
] });
|
|
14402
14126
|
});
|
|
@@ -15095,7 +14819,7 @@ const initialFormValues = (fields, values) => {
|
|
|
15095
14819
|
};
|
|
15096
14820
|
const useAttachImagesToFormRevisionFields = (revision) => {
|
|
15097
14821
|
const { sdk } = useSDK();
|
|
15098
|
-
const attachments =
|
|
14822
|
+
const attachments = useSelector(selectAttachmentsOfFormRevision((revision == null ? void 0 : revision.offline_id) ?? ""));
|
|
15099
14823
|
return useMemo(() => {
|
|
15100
14824
|
if (!revision || !attachments)
|
|
15101
14825
|
return revision;
|
|
@@ -15177,7 +14901,7 @@ const FormRenderer = memo(
|
|
|
15177
14901
|
const FormSubmissionViewer = memo(
|
|
15178
14902
|
forwardRef((props, ref) => {
|
|
15179
14903
|
const { submission, showFormDescription = false, showFormTitle = true } = props;
|
|
15180
|
-
const revision =
|
|
14904
|
+
const revision = useSelector(selectFormRevision(submission.form_revision));
|
|
15181
14905
|
const { sdk } = useSDK();
|
|
15182
14906
|
if (!revision) {
|
|
15183
14907
|
throw new Error(
|
|
@@ -15242,8 +14966,8 @@ const FormBrowser = memo(
|
|
|
15242
14966
|
}
|
|
15243
14967
|
return ret;
|
|
15244
14968
|
}, [filter, maxResults, ownerFilter]);
|
|
15245
|
-
const userForms =
|
|
15246
|
-
const userFormMapping =
|
|
14969
|
+
const userForms = useSelector(selectFilteredForms(ownerFilterOptions)) ?? [];
|
|
14970
|
+
const userFormMapping = useSelector(selectFormMapping);
|
|
15247
14971
|
const attachableUserForms = userForms.filter((form) => !form.asset_type && !form.issue_type);
|
|
15248
14972
|
const attachableUserFormMapping = Object.values(userFormMapping).filter(
|
|
15249
14973
|
(form) => !form.asset_type
|
|
@@ -15276,7 +15000,7 @@ const FormBrowser = memo(
|
|
|
15276
15000
|
const handleChange = useCallback((e) => {
|
|
15277
15001
|
setFilter(e.currentTarget.value);
|
|
15278
15002
|
}, []);
|
|
15279
|
-
const numberOfForms =
|
|
15003
|
+
const numberOfForms = useSelector(selectGeneralFormCount) || 0;
|
|
15280
15004
|
const numberOfHiddenForms = numberOfForms - attachableUserForms.length;
|
|
15281
15005
|
const overflowMessage = attachableUserForms.length == maxResults && numberOfHiddenForms > 0 ? `Only the first ${maxResults} results are shown (${numberOfHiddenForms} hidden)` : numberOfHiddenForms > 0 && `${numberOfHiddenForms} hidden forms`;
|
|
15282
15006
|
return /* @__PURE__ */ jsxs(Flex$1, { ref, direction: "column", gap: "2", children: [
|
|
@@ -15311,9 +15035,9 @@ const FormBrowser = memo(
|
|
|
15311
15035
|
const FormBrowserEntry = (props) => {
|
|
15312
15036
|
var _a2;
|
|
15313
15037
|
const { form, onSelectForm, isFavoriteEditable, handleToggleFavorite } = props;
|
|
15314
|
-
const ownerOrganization = (_a2 =
|
|
15315
|
-
const ownerUser =
|
|
15316
|
-
const currentUserId =
|
|
15038
|
+
const ownerOrganization = (_a2 = useSelector(selectOrganization(form.owner_organization || -1))) == null ? void 0 : _a2.name;
|
|
15039
|
+
const ownerUser = useSelector(selectUser(form.owner_user || -1));
|
|
15040
|
+
const currentUserId = useSelector(selectCurrentUser).id;
|
|
15317
15041
|
const ownedByCurrentUser = !!ownerUser && ownerUser.id === currentUserId;
|
|
15318
15042
|
const owner = ownerOrganization ?? (ownedByCurrentUser ? "You" : ownerUser == null ? void 0 : ownerUser.username) ?? "Unknown";
|
|
15319
15043
|
const handleFavoriteClick = useCallback(
|
|
@@ -15368,15 +15092,15 @@ const styles$2 = {
|
|
|
15368
15092
|
const FormSubmissionBrowserEntry = memo((props) => {
|
|
15369
15093
|
var _a2;
|
|
15370
15094
|
const { submission, onSubmissionClick, compact, labelType, rowDecorator } = props;
|
|
15371
|
-
const currentUser =
|
|
15372
|
-
const createdBy =
|
|
15095
|
+
const currentUser = useSelector(selectCurrentUser);
|
|
15096
|
+
const createdBy = useSelector(selectUser("created_by" in submission ? submission.created_by : currentUser.id));
|
|
15373
15097
|
const dateToUse = submission.submitted_at;
|
|
15374
15098
|
const formattedDateTime = getLocalDateString(dateToUse);
|
|
15375
|
-
const revision =
|
|
15099
|
+
const revision = useSelector(selectFormRevision(submission.form_revision));
|
|
15376
15100
|
if (!revision) {
|
|
15377
15101
|
throw new Error(`Could not find revision ${submission.form_revision} for submission ${submission.offline_id}.`);
|
|
15378
15102
|
}
|
|
15379
|
-
const latestRevisionNumber = (_a2 =
|
|
15103
|
+
const latestRevisionNumber = (_a2 = useSelector(selectLatestFormRevisionOfForm(revision.form))) == null ? void 0 : _a2.revision;
|
|
15380
15104
|
const creatorProfileSrc = useFileSrc({
|
|
15381
15105
|
file: (createdBy == null ? void 0 : createdBy.profile.file) ?? null,
|
|
15382
15106
|
fileSha1: (createdBy == null ? void 0 : createdBy.profile.file_sha1) ?? null
|
|
@@ -15420,7 +15144,7 @@ const FormSubmissionBrowser = memo((props) => {
|
|
|
15420
15144
|
if (!!formId2 === !!propSubmissions) {
|
|
15421
15145
|
throw new Error("Either formId or submissions must be provided, but not both.");
|
|
15422
15146
|
}
|
|
15423
|
-
const submissions =
|
|
15147
|
+
const submissions = useSelector(propSubmissions ? () => propSubmissions : selectFormSubmissionsOfForm(formId2));
|
|
15424
15148
|
const sortedSubmissions = useMemo(
|
|
15425
15149
|
() => submissions == null ? void 0 : submissions.sort((a, b) => {
|
|
15426
15150
|
return a.submitted_at.localeCompare(b.submitted_at);
|
|
@@ -16838,7 +16562,6 @@ export {
|
|
|
16838
16562
|
createOfflineAction,
|
|
16839
16563
|
createPointMarker,
|
|
16840
16564
|
defaultBadgeColor,
|
|
16841
|
-
defaultStore,
|
|
16842
16565
|
deleteAssetType,
|
|
16843
16566
|
deleteForm,
|
|
16844
16567
|
deleteFormRevision,
|
|
@@ -16938,6 +16661,7 @@ export {
|
|
|
16938
16661
|
overmapEnhancer,
|
|
16939
16662
|
overmapReducer,
|
|
16940
16663
|
overmapReducers,
|
|
16664
|
+
overmapRootReducer,
|
|
16941
16665
|
patchCategory,
|
|
16942
16666
|
performRequest,
|
|
16943
16667
|
primaryColor,
|
|
@@ -16989,7 +16713,6 @@ export {
|
|
|
16989
16713
|
resetRecentIssues,
|
|
16990
16714
|
resetStore,
|
|
16991
16715
|
restructureCreateSelectorWithArgs,
|
|
16992
|
-
rootReducer,
|
|
16993
16716
|
saveActiveProjectFileBounds,
|
|
16994
16717
|
searchIssues,
|
|
16995
16718
|
selectAccessToken,
|
|
@@ -17290,8 +17013,6 @@ export {
|
|
|
17290
17013
|
updateProjectAttachments,
|
|
17291
17014
|
updateStages,
|
|
17292
17015
|
updateTeam,
|
|
17293
|
-
useAppDispatch,
|
|
17294
|
-
useAppSelector,
|
|
17295
17016
|
useFieldInput,
|
|
17296
17017
|
useFieldInputs,
|
|
17297
17018
|
useFileSrc,
|