ode-explorer 1.4.1 → 1.4.2-develop-pedago.202403201825
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/dist/index.html +1 -0
- package/dist/index.js +16 -10
- package/dist/version.txt +1 -1
- package/lib/components/Explorer.d.ts +1 -1
- package/lib/config/getExplorerConfig.d.ts +9 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -2
- package/lib/index2.js +566 -544
- package/lib/store/index.d.ts +4 -2
- package/package.json +10 -10
- package/lib/utils/getAppParams.d.ts +0 -10
package/dist/index.html
CHANGED
package/dist/index.js
CHANGED
|
@@ -35,7 +35,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
35
35
|
return method;
|
|
36
36
|
};
|
|
37
37
|
var _focused, _cleanup, _setup, _a, _online, _cleanup2, _setup2, _b, _gcTimeout, _c, _initialState, _revertState, _cache, _promise, _retryer, _observers, _defaultOptions, _abortSignalConsumed, _setOptions, setOptions_fn, _dispatch, dispatch_fn, _d, _queries, _e, _observers2, _defaultOptions2, _mutationCache, _retryer2, _dispatch2, dispatch_fn2, _f, _mutations, _mutationId, _resuming, _g, _queryCache, _mutationCache2, _defaultOptions3, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline, _h, _client, _currentQuery, _currentQueryInitialState, _currentResult, _currentResultState, _currentResultOptions, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _executeFetch, executeFetch_fn, _updateStaleTimeout, updateStaleTimeout_fn, _computeRefetchInterval, computeRefetchInterval_fn, _updateRefetchInterval, updateRefetchInterval_fn, _updateTimers, updateTimers_fn, _clearStaleTimeout, clearStaleTimeout_fn, _clearRefetchInterval, clearRefetchInterval_fn, _updateQuery, updateQuery_fn, _notify, notify_fn, _i, _client2, _currentResult2, _currentMutation, _mutateOptions, _updateResult, updateResult_fn, _notify2, notify_fn2, _j;
|
|
38
|
-
import { odeServices, FOLDER, ACTION } from "/assets/js/edifice-ts-client/index.js";
|
|
38
|
+
import { odeServices, FOLDER, SORT_ORDER, ACTION } from "/assets/js/edifice-ts-client/index.js";
|
|
39
39
|
function _mergeNamespaces(n2, m2) {
|
|
40
40
|
for (var i2 = 0; i2 < m2.length; i2++) {
|
|
41
41
|
const e2 = m2[i2];
|
|
@@ -65457,7 +65457,7 @@ const defaultActions = [{
|
|
|
65457
65457
|
}
|
|
65458
65458
|
}
|
|
65459
65459
|
};
|
|
65460
|
-
}, initialState = {
|
|
65460
|
+
}, initialState$2 = {
|
|
65461
65461
|
isSharing: false,
|
|
65462
65462
|
shareRights: {
|
|
65463
65463
|
rights: [],
|
|
@@ -65510,7 +65510,7 @@ function useShare({
|
|
|
65510
65510
|
avatar
|
|
65511
65511
|
} = useUser(), toast2 = useToast(), {
|
|
65512
65512
|
t: t2
|
|
65513
|
-
} = useTranslation(), [state, dispatch] = reactExports.useReducer(reducer, initialState);
|
|
65513
|
+
} = useTranslation(), [state, dispatch] = reactExports.useReducer(reducer, initialState$2);
|
|
65514
65514
|
return reactExports.useEffect(() => {
|
|
65515
65515
|
resource && (async () => {
|
|
65516
65516
|
const shareRightActions = await odeServices.share().getActionsForApp(appCode), shareRights = await odeServices.share().getRightsForResource(appCode, resource == null ? void 0 : resource.assetId);
|
|
@@ -66273,7 +66273,10 @@ function getExplorerConfig() {
|
|
|
66273
66273
|
const { explorerConfig } = rootElement.dataset;
|
|
66274
66274
|
try {
|
|
66275
66275
|
const parsedConfig = JSON.parse(explorerConfig);
|
|
66276
|
-
config =
|
|
66276
|
+
config = {
|
|
66277
|
+
...parsedConfig,
|
|
66278
|
+
enableOnboarding: parsedConfig.enableOnboarding !== void 0 ? parsedConfig.enableOnboarding : true
|
|
66279
|
+
};
|
|
66277
66280
|
} catch (e2) {
|
|
66278
66281
|
console.error(
|
|
66279
66282
|
"[Explorer Config] could not parse app params from root data attributes:",
|
|
@@ -66686,17 +66689,17 @@ const wrapTreeNode = (treeNode, folders, parentId) => {
|
|
|
66686
66689
|
return node2;
|
|
66687
66690
|
});
|
|
66688
66691
|
};
|
|
66689
|
-
const
|
|
66692
|
+
const initialState = {
|
|
66690
66693
|
config: null,
|
|
66691
66694
|
searchConfig: { minLength: 1 },
|
|
66692
66695
|
searchParams: {
|
|
66693
66696
|
filters: {
|
|
66694
|
-
folder:
|
|
66697
|
+
folder: FOLDER.DEFAULT,
|
|
66695
66698
|
owner: void 0,
|
|
66696
66699
|
shared: void 0,
|
|
66697
66700
|
public: void 0
|
|
66698
66701
|
},
|
|
66699
|
-
orders: { updatedAt:
|
|
66702
|
+
orders: { updatedAt: SORT_ORDER.DESC },
|
|
66700
66703
|
application: "",
|
|
66701
66704
|
types: [],
|
|
66702
66705
|
pagination: {
|
|
@@ -66722,7 +66725,10 @@ const useStoreContext = create()((set2, get2) => ({
|
|
|
66722
66725
|
resourceIds: [],
|
|
66723
66726
|
resourceIsTrash: false,
|
|
66724
66727
|
resourceActionDisable: false,
|
|
66725
|
-
status: void 0
|
|
66728
|
+
status: void 0
|
|
66729
|
+
};
|
|
66730
|
+
const useStoreContext = create()((set2, get2) => ({
|
|
66731
|
+
...initialState,
|
|
66726
66732
|
updaters: {
|
|
66727
66733
|
setConfig: (config2) => set2({ config: config2 }),
|
|
66728
66734
|
setSearchConfig: (searchConfig) => set2((state) => ({
|
|
@@ -67480,7 +67486,7 @@ const useCopyResource = () => {
|
|
|
67480
67486
|
}
|
|
67481
67487
|
);
|
|
67482
67488
|
}
|
|
67483
|
-
if (currentFolder.id && currentFolder.id !==
|
|
67489
|
+
if (currentFolder.id && currentFolder.id !== FOLDER.DEFAULT) {
|
|
67484
67490
|
moveToFolder({
|
|
67485
67491
|
searchParams,
|
|
67486
67492
|
resourceIds: [data.duplicateId],
|
|
@@ -68274,7 +68280,7 @@ const Explorer = ({ config: config2 }) => {
|
|
|
68274
68280
|
] }),
|
|
68275
68281
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingScreen$1, {}), children: [
|
|
68276
68282
|
/* @__PURE__ */ jsxRuntimeExports.jsx(ActionBar, {}),
|
|
68277
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
68283
|
+
config2.enableOnboarding && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
68278
68284
|
OnboardingModal$1,
|
|
68279
68285
|
{
|
|
68280
68286
|
id: "showOnboardingTrash",
|
package/dist/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ode-explorer=1.0-b2school-SNAPSHOT
|
|
1
|
+
ode-explorer=1.0-b2school-SNAPSHOT 20/03/2024 18:25:47
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { type App, type ResourceType, type IAction, type IFilter, type IOrder } from "edifice-ts-client";
|
|
2
2
|
export interface AppParams {
|
|
3
|
+
/** Application code */
|
|
3
4
|
app: App;
|
|
5
|
+
/** Array of ResourceType */
|
|
4
6
|
types: ResourceType[];
|
|
7
|
+
/** Array of IFilter */
|
|
5
8
|
filters: IFilter[];
|
|
9
|
+
/** Array of IOrder */
|
|
6
10
|
orders: IOrder[];
|
|
11
|
+
/** Array of IAction */
|
|
7
12
|
actions: IAction[];
|
|
13
|
+
/** Array of trashable IAction */
|
|
8
14
|
trashActions: IAction[];
|
|
15
|
+
/** BPR application code */
|
|
9
16
|
libraryAppFilter?: string;
|
|
17
|
+
/** Enable or disable Explorer Onboarding Modal */
|
|
18
|
+
enableOnboarding?: boolean;
|
|
10
19
|
}
|
|
11
20
|
export declare function getExplorerConfig(): AppParams;
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as l } from "./index2.js";
|
|
1
|
+
import { E as g, z as l } from "./index2.js";
|
|
2
2
|
import "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import "@edifice-ui/react";
|
|
@@ -9,5 +9,6 @@ import "i18next";
|
|
|
9
9
|
import "zustand";
|
|
10
10
|
import "@tanstack/react-query";
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
g as Explorer,
|
|
13
|
+
l as getExplorerConfig
|
|
13
14
|
};
|