@veeqo/transfigure 1.2.1 → 1.2.3
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/BusinessLogic/types.d.ts +1 -0
- package/dist/components/Views/ViewList/ViewsList.d.ts +5 -1
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +14 -13
- package/dist/index103.cjs +19 -1
- package/dist/index103.js +23 -14
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +21 -24
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +15 -7
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +1 -1
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +1 -1
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +32 -22
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +22 -32
- package/dist/index115.cjs +1 -7
- package/dist/index115.js +63 -10
- package/dist/index116.cjs +7 -1
- package/dist/index116.js +10 -63
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +1 -1
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +1 -1
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +1 -1
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +62 -60
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +1 -1
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +1 -1
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +36 -34
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +2 -2
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +2 -2
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +71 -71
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +39 -38
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +1 -1
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +5 -41
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +41 -9
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +8 -117
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +117 -18
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +19 -5
- package/dist/index98.cjs +1 -19
- package/dist/index98.js +7 -24
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +24 -21
- package/dist/storybookHelpers/Code.d.ts +3 -0
- package/package.json +1 -1
package/dist/index56.js
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
import { useState as w } from "react";
|
|
2
|
-
import { ALL_VIEW_ID as
|
|
2
|
+
import { ALL_VIEW_ID as f } from "./index79.js";
|
|
3
3
|
import { viewsAdapter as R } from "./index78.js";
|
|
4
4
|
import { useCustomViews as q } from "./index65.js";
|
|
5
5
|
import { useDuplicateActiveView as B } from "./index57.js";
|
|
6
6
|
import { usePersistUnsavedChanges as T } from "./index60.js";
|
|
7
7
|
import { useViews as W } from "./index62.js";
|
|
8
|
-
import { SHARING_OPTIONS as
|
|
9
|
-
import { patchCurrentUser as
|
|
8
|
+
import { SHARING_OPTIONS as n } from "./index45.js";
|
|
9
|
+
import { patchCurrentUser as N } from "./index4.js";
|
|
10
10
|
import { deleteCustomView as G } from "./index3.js";
|
|
11
11
|
import { useBusinessLogic as H } from "./index8.js";
|
|
12
12
|
import { useStores as b } from "./index61.js";
|
|
13
13
|
import { createCustomView as j } from "./index6.js";
|
|
14
14
|
import { patchCustomView as z } from "./index5.js";
|
|
15
|
-
const
|
|
16
|
-
const { VIEW_TYPE:
|
|
17
|
-
canDeleteCustomViews:
|
|
18
|
-
defaultCustomViewId:
|
|
19
|
-
canUpdateCustomViews:
|
|
20
|
-
mutate:
|
|
15
|
+
const Ve = (e) => {
|
|
16
|
+
const { VIEW_TYPE: d } = H(), { duplicateView: A } = B(), { getActiveViewInAPIFormat: P } = T(), {
|
|
17
|
+
canDeleteCustomViews: O,
|
|
18
|
+
defaultCustomViewId: M,
|
|
19
|
+
canUpdateCustomViews: F,
|
|
20
|
+
mutate: Y
|
|
21
21
|
} = q({
|
|
22
|
-
type:
|
|
23
|
-
}), { mutate:
|
|
24
|
-
Views: { removeDraftViewById:
|
|
25
|
-
Filters: { initFiltersFromView:
|
|
26
|
-
Notifications: { notify:
|
|
22
|
+
type: d
|
|
23
|
+
}), { mutate: p, viewsMap: l, viewsArray: t } = W(), [x, a] = w(!1), [E, m] = w(!1), [h, c] = w(!1), [k, D] = w(!1), {
|
|
24
|
+
Views: { removeDraftViewById: V, draftViewsMap: L },
|
|
25
|
+
Filters: { initFiltersFromView: r, updateUrl: u, setActiveViewId: y },
|
|
26
|
+
Notifications: { notify: s }
|
|
27
27
|
} = b();
|
|
28
28
|
return {
|
|
29
29
|
actions: {
|
|
30
30
|
delete: {
|
|
31
31
|
handleDeleteDraftView: () => {
|
|
32
32
|
if (!e.originalView) throw Error("No draft view found");
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
36
|
-
|
|
33
|
+
V(e.id);
|
|
34
|
+
const o = l.get(M);
|
|
35
|
+
if (o)
|
|
36
|
+
o && r(o);
|
|
37
37
|
else {
|
|
38
|
-
const
|
|
39
|
-
|
|
38
|
+
const i = l.get(f);
|
|
39
|
+
i ? r(i) : t != null && t[0] && r(t[0]);
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
u();
|
|
42
42
|
},
|
|
43
43
|
handleDelete: async () => {
|
|
44
44
|
try {
|
|
45
|
-
if (
|
|
46
|
-
await G(Number(e.id)), await
|
|
47
|
-
const
|
|
48
|
-
t &&
|
|
45
|
+
if (O) {
|
|
46
|
+
await G(Number(e.id)), await p();
|
|
47
|
+
const o = l.get(f);
|
|
48
|
+
o ? r(o) : t != null && t[0] && r(t[0]), u(), E && m(!1), h && c(h), s({
|
|
49
49
|
type: "success",
|
|
50
50
|
text: `'${e.label}' has been deleted`
|
|
51
51
|
});
|
|
52
52
|
} else
|
|
53
|
-
|
|
53
|
+
s({
|
|
54
54
|
type: "info",
|
|
55
55
|
text: "You require additional user permissions to delete a company shared view"
|
|
56
56
|
});
|
|
57
57
|
} catch {
|
|
58
|
-
|
|
58
|
+
s({
|
|
59
59
|
type: "error",
|
|
60
60
|
text: "Failed to delete view"
|
|
61
61
|
});
|
|
@@ -63,67 +63,67 @@ const ye = (e) => {
|
|
|
63
63
|
},
|
|
64
64
|
handleShowDeleteConfirmation: () => {
|
|
65
65
|
if (L.has(e.id)) {
|
|
66
|
-
|
|
66
|
+
V(e.id), e.originalView ? y(e.originalView.id) : l.has(f) ? y(f) : t != null && t[0] && y(t[0].id);
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
|
-
|
|
69
|
+
O ? m(!0) : s({
|
|
70
70
|
type: "info",
|
|
71
71
|
text: "You require additional user permissions to delete a company shared view"
|
|
72
72
|
});
|
|
73
73
|
},
|
|
74
|
-
closeDeleteConfirmation: () =>
|
|
74
|
+
closeDeleteConfirmation: () => m(!1)
|
|
75
75
|
},
|
|
76
76
|
edit: {
|
|
77
77
|
handleShowEditDropdown: () => {
|
|
78
|
-
a(!1),
|
|
78
|
+
a(!1), c(!0);
|
|
79
79
|
},
|
|
80
|
-
closeEditDropdown: () =>
|
|
80
|
+
closeEditDropdown: () => c(!1)
|
|
81
81
|
},
|
|
82
82
|
menu: {
|
|
83
|
-
handleSave: async (
|
|
83
|
+
handleSave: async (o) => {
|
|
84
84
|
try {
|
|
85
|
-
const { viewName:
|
|
85
|
+
const { viewName: i, shareOption: S, isDefault: v } = o, C = S === "company" ? n.COMPANY : n.PERSONAL, _ = {
|
|
86
86
|
attributes: {
|
|
87
|
-
title:
|
|
88
|
-
shared:
|
|
87
|
+
title: i,
|
|
88
|
+
shared: C.key === n.COMPANY.key
|
|
89
89
|
}
|
|
90
90
|
};
|
|
91
|
-
await z(e.id,
|
|
91
|
+
await z(e.id, _), v && (await N({
|
|
92
92
|
user_setting_attributes: {
|
|
93
93
|
default_custom_view: {
|
|
94
94
|
id: Number(e.id),
|
|
95
|
-
type:
|
|
95
|
+
type: d
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
}), await
|
|
98
|
+
}), await Y()), await p(), u(), s({
|
|
99
99
|
type: "success",
|
|
100
|
-
text: `'${
|
|
101
|
-
}),
|
|
100
|
+
text: `'${i}' view updated`
|
|
101
|
+
}), c(!1);
|
|
102
102
|
} catch {
|
|
103
|
-
|
|
103
|
+
s({
|
|
104
104
|
type: "error",
|
|
105
105
|
text: "Failed to save view"
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
109
|
handleDuplicate: () => {
|
|
110
|
-
|
|
110
|
+
A(), a(!1);
|
|
111
111
|
},
|
|
112
112
|
handleMakeDefault: async () => {
|
|
113
113
|
try {
|
|
114
|
-
await
|
|
114
|
+
await N({
|
|
115
115
|
user_setting_attributes: {
|
|
116
116
|
default_custom_view: {
|
|
117
117
|
id: Number(e.id),
|
|
118
|
-
type:
|
|
118
|
+
type: d
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
}),
|
|
121
|
+
}), s({
|
|
122
122
|
type: "success",
|
|
123
123
|
text: `'${e.label}' is now your default view`
|
|
124
124
|
}), a(!1);
|
|
125
125
|
} catch {
|
|
126
|
-
|
|
126
|
+
s({
|
|
127
127
|
type: "error",
|
|
128
128
|
text: "Failed to set default view"
|
|
129
129
|
});
|
|
@@ -131,57 +131,57 @@ const ye = (e) => {
|
|
|
131
131
|
},
|
|
132
132
|
openDropdown: () => a(!0),
|
|
133
133
|
closeDropdown: () => a(!1),
|
|
134
|
-
toggleDropdown: () => a(!
|
|
134
|
+
toggleDropdown: () => a(!x)
|
|
135
135
|
},
|
|
136
136
|
create: {
|
|
137
|
-
handleCreate: async (
|
|
137
|
+
handleCreate: async (o) => {
|
|
138
138
|
try {
|
|
139
|
-
const { viewName:
|
|
139
|
+
const { viewName: i, shareOption: S, isDefault: v } = o, C = S === "company" ? n.COMPANY : n.PERSONAL, { arg: _ } = P(), { data: g } = await j({
|
|
140
140
|
attributes: {
|
|
141
|
-
...
|
|
142
|
-
title:
|
|
143
|
-
shared:
|
|
141
|
+
..._,
|
|
142
|
+
title: i,
|
|
143
|
+
shared: C.key === n.COMPANY.key
|
|
144
144
|
}
|
|
145
|
-
}),
|
|
146
|
-
|
|
145
|
+
}), I = t.map(($) => $.id);
|
|
146
|
+
I.push(g.id), await N({
|
|
147
147
|
user_setting_attributes: {
|
|
148
148
|
custom_view_positions: {
|
|
149
|
-
order:
|
|
149
|
+
order: I
|
|
150
150
|
},
|
|
151
|
-
...
|
|
151
|
+
...v ? {
|
|
152
152
|
default_custom_view: {
|
|
153
|
-
id: Number(
|
|
154
|
-
type:
|
|
153
|
+
id: Number(g.id),
|
|
154
|
+
type: d
|
|
155
155
|
}
|
|
156
156
|
} : {}
|
|
157
157
|
}
|
|
158
|
-
}), await
|
|
159
|
-
const U = R({ view:
|
|
160
|
-
|
|
158
|
+
}), await p(), V(e.id);
|
|
159
|
+
const U = R({ view: g, canUpdateCustomViews: F });
|
|
160
|
+
r(U), u(), D(!1), s({
|
|
161
161
|
type: "success",
|
|
162
|
-
text: `New view '${
|
|
162
|
+
text: `New view '${i}' created`
|
|
163
163
|
});
|
|
164
|
-
} catch (
|
|
165
|
-
console.log(
|
|
164
|
+
} catch (i) {
|
|
165
|
+
console.log(i), s({
|
|
166
166
|
type: "error",
|
|
167
167
|
text: "Failed to save draft view"
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
},
|
|
171
|
-
closeCreateDropdown: () =>
|
|
171
|
+
closeCreateDropdown: () => D(!1),
|
|
172
172
|
handleSaveDraft: async () => {
|
|
173
|
-
|
|
173
|
+
D(!0);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
},
|
|
177
177
|
state: {
|
|
178
|
-
shouldShowDropdown:
|
|
179
|
-
shouldShowEditDropdown:
|
|
178
|
+
shouldShowDropdown: x,
|
|
179
|
+
shouldShowEditDropdown: h,
|
|
180
180
|
shouldShowCreateDropdown: k,
|
|
181
|
-
shouldShowDeleteConfirmation:
|
|
181
|
+
shouldShowDeleteConfirmation: E
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
184
|
};
|
|
185
185
|
export {
|
|
186
|
-
|
|
186
|
+
Ve as useDropdownManager
|
|
187
187
|
};
|
package/dist/index63.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),E=require("./index79.cjs"),I=require("./index65.cjs"),C=require("./index62.cjs"),S=require("./index8.cjs"),F=require("./index61.cjs"),q=()=>{const{VIEW_TYPE:L,SEARCH_FILTER_ID:u}=S.useBusinessLogic(),{Filters:{activeViewId:f,initFiltersFromView:e,initFromUrl:t,discardChanges:w,updateUrl:p,setFilter:g}}=F.useStores(),{isLoading:v}=I.useCustomViews({type:L}),{viewsMap:s,defaultCustomViewId:l,isLoading:h,viewsArray:o}=C.useViews(),V=h||v;m.useEffect(()=>{if(V)return;const i=new URLSearchParams(window.location.search),d=i.get("view"),r=i.get(u),n=i.size>0;if(!f){if(d){const a=s.get(d);if(a)e(a),n&&t();else{const c=s.get(l);c&&(e(c),n&&t(!1))}}else{const a=s.get(l);if(a)e(a),w(!0),n&&t();else{const c=s.get(E.ALL_VIEW_ID);c?e(c):o!=null&&o[0]&&e(o[0])}}r&&g(u,r)}},[u,f,l,w,e,t,V,g,p,s,o]),m.useEffect(()=>{const i=()=>{const r=new URLSearchParams(window.location.search).get("view");if(!r)return;const n=s.get(r);n&&(e(n),t())};return window.addEventListener("popstate",i),()=>window.removeEventListener("popstate",i)},[w,e,t,s])};exports.useViewUrlChange=q;
|
package/dist/index63.js
CHANGED
|
@@ -1,64 +1,65 @@
|
|
|
1
|
-
import { useEffect as
|
|
2
|
-
import { ALL_VIEW_ID as
|
|
3
|
-
import { useCustomViews as
|
|
4
|
-
import { useViews as
|
|
5
|
-
import { useBusinessLogic as
|
|
6
|
-
import { useStores as
|
|
7
|
-
const
|
|
8
|
-
const { VIEW_TYPE:
|
|
1
|
+
import { useEffect as g } from "react";
|
|
2
|
+
import { ALL_VIEW_ID as I } from "./index79.js";
|
|
3
|
+
import { useCustomViews as E } from "./index65.js";
|
|
4
|
+
import { useViews as F } from "./index62.js";
|
|
5
|
+
import { useBusinessLogic as C } from "./index8.js";
|
|
6
|
+
import { useStores as D } from "./index61.js";
|
|
7
|
+
const T = () => {
|
|
8
|
+
const { VIEW_TYPE: L, SEARCH_FILTER_ID: w } = C(), {
|
|
9
9
|
Filters: {
|
|
10
|
-
activeViewId:
|
|
10
|
+
activeViewId: l,
|
|
11
11
|
initFiltersFromView: e,
|
|
12
12
|
initFromUrl: i,
|
|
13
|
-
discardChanges:
|
|
14
|
-
updateUrl:
|
|
15
|
-
setFilter:
|
|
13
|
+
discardChanges: f,
|
|
14
|
+
updateUrl: V,
|
|
15
|
+
setFilter: p
|
|
16
16
|
}
|
|
17
|
-
} =
|
|
18
|
-
|
|
19
|
-
if (
|
|
20
|
-
const s = new URLSearchParams(window.location.search),
|
|
21
|
-
if (!
|
|
22
|
-
if (
|
|
23
|
-
const r = t.get(
|
|
17
|
+
} = D(), { isLoading: v } = E({ type: L }), { viewsMap: t, defaultCustomViewId: m, isLoading: h, viewsArray: a } = F(), u = h || v;
|
|
18
|
+
g(() => {
|
|
19
|
+
if (u) return;
|
|
20
|
+
const s = new URLSearchParams(window.location.search), d = s.get("view"), n = s.get(w), o = s.size > 0;
|
|
21
|
+
if (!l) {
|
|
22
|
+
if (d) {
|
|
23
|
+
const r = t.get(d);
|
|
24
24
|
if (r)
|
|
25
25
|
e(r), o && i();
|
|
26
26
|
else {
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
const c = t.get(m);
|
|
28
|
+
c && (e(c), o && i(!1));
|
|
29
29
|
}
|
|
30
30
|
} else {
|
|
31
|
-
const r = t.get(
|
|
31
|
+
const r = t.get(m);
|
|
32
32
|
if (r)
|
|
33
|
-
e(r),
|
|
33
|
+
e(r), f(!0), o && i();
|
|
34
34
|
else {
|
|
35
|
-
const
|
|
36
|
-
|
|
35
|
+
const c = t.get(I);
|
|
36
|
+
c ? e(c) : a != null && a[0] && e(a[0]);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
n && p(w, n);
|
|
40
40
|
}
|
|
41
41
|
}, [
|
|
42
|
-
c,
|
|
43
|
-
d,
|
|
44
|
-
f,
|
|
45
42
|
w,
|
|
43
|
+
l,
|
|
44
|
+
m,
|
|
45
|
+
f,
|
|
46
46
|
e,
|
|
47
47
|
i,
|
|
48
|
+
u,
|
|
48
49
|
p,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
]),
|
|
50
|
+
V,
|
|
51
|
+
t,
|
|
52
|
+
a
|
|
53
|
+
]), g(() => {
|
|
53
54
|
const s = () => {
|
|
54
|
-
const
|
|
55
|
-
if (!
|
|
56
|
-
const o = t.get(
|
|
55
|
+
const n = new URLSearchParams(window.location.search).get("view");
|
|
56
|
+
if (!n) return;
|
|
57
|
+
const o = t.get(n);
|
|
57
58
|
o && (e(o), i());
|
|
58
59
|
};
|
|
59
60
|
return window.addEventListener("popstate", s), () => window.removeEventListener("popstate", s);
|
|
60
|
-
}, [
|
|
61
|
+
}, [f, e, i, t]);
|
|
61
62
|
};
|
|
62
63
|
export {
|
|
63
|
-
|
|
64
|
+
T as useViewUrlChange
|
|
64
65
|
};
|
package/dist/index80.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index98.cjs"),w=require("./index79.cjs"),V=require("./index78.cjs"),d=({data:n,canUpdateCustomViews:u})=>{const l={fixedViews:[...r.INITIAL_VIEWS_STATE.fixedViews],customViews:[...r.INITIAL_VIEWS_STATE.customViews],viewsMap:new Map(r.INITIAL_VIEWS_STATE.viewsMap)};if(!n)return l;let o=!1;const i=n.reduce((e,s)=>{const t=V.viewsAdapter({view:s,canUpdateCustomViews:u});return e.viewsMap.set(s.id,t),s.editable?e.customViews.push(t):e.fixedViews.push(t),s.title==="All"&&(o=!0),e},l);return o&&(i.viewsMap.delete(w.ALL_VIEW_ID),i.fixedViews.shift()),i};exports.organiseViews=d;
|
package/dist/index80.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { INITIAL_VIEWS_STATE as r } from "./
|
|
1
|
+
import { INITIAL_VIEWS_STATE as r } from "./index98.js";
|
|
2
2
|
import { ALL_VIEW_ID as p } from "./index79.js";
|
|
3
3
|
import { viewsAdapter as u } from "./index78.js";
|
|
4
4
|
const m = ({ data: o, canUpdateCustomViews: w }) => {
|
package/dist/index86.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_actionsHeaderContainer_fgqms_1",t={actionsHeaderContainer:e};exports.actionsHeaderContainer=e;exports.default=t;
|
package/dist/index86.js
CHANGED
|
@@ -1,43 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import { useStores as L } from "./index61.js";
|
|
5
|
-
import { useUrlParams as v } from "./index67.js";
|
|
6
|
-
import { fetcherV2 as V } from "./index55.js";
|
|
7
|
-
function T() {
|
|
8
|
-
const { TABLE_DATA_URL: h } = S(), {
|
|
9
|
-
Filters: {
|
|
10
|
-
pageSize: n,
|
|
11
|
-
activeViewId: s
|
|
12
|
-
}
|
|
13
|
-
} = L(), { queryParams: m } = v();
|
|
14
|
-
async function r() {
|
|
15
|
-
const e = `${h}?${m}`, g = await V(e);
|
|
16
|
-
return JSON.stringify(g);
|
|
17
|
-
}
|
|
18
|
-
const [c, a] = t(null), [l, u] = t(!1), [f, C] = t(s), [w, y] = t(n), i = 3e5, [D, o] = t(i);
|
|
19
|
-
return p(() => {
|
|
20
|
-
const e = () => {
|
|
21
|
-
document.hidden ? o(null) : o(i);
|
|
22
|
-
};
|
|
23
|
-
return document.addEventListener("visibilitychange", e), () => {
|
|
24
|
-
document.removeEventListener("visibilitychange", e);
|
|
25
|
-
};
|
|
26
|
-
}, []), P(
|
|
27
|
-
async () => {
|
|
28
|
-
const e = await r();
|
|
29
|
-
if (c === null || f !== s || w !== n) {
|
|
30
|
-
a(e), C(s), y(n);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const d = e !== c;
|
|
34
|
-
d && (a(e), u(d));
|
|
35
|
-
},
|
|
36
|
-
l ? null : D
|
|
37
|
-
), { hasChanges: l, acknowledgeButtonClick: async () => {
|
|
38
|
-
u(!1), o(i), a(await r());
|
|
39
|
-
} };
|
|
40
|
-
}
|
|
1
|
+
const e = "_actionsHeaderContainer_fgqms_1", a = {
|
|
2
|
+
actionsHeaderContainer: e
|
|
3
|
+
};
|
|
41
4
|
export {
|
|
42
|
-
|
|
5
|
+
e as actionsHeaderContainer,
|
|
6
|
+
a as default
|
|
43
7
|
};
|
package/dist/index87.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),w=require("react-use"),L=require("./index8.cjs"),m=require("./index61.cjs"),v=require("./index67.cjs"),q=require("./index55.cjs");function V(){const{TABLE_DATA_URL:h}=L.useBusinessLogic(),{Filters:{pageSize:s,activeViewId:n}}=m.useStores(),{queryParams:S}=v.useUrlParams();async function c(){const e=`${h}?${S}`,g=await q.fetcherV2(e);return JSON.stringify(g)}const[u,a]=t.useState(null),[o,l]=t.useState(!1),[f,C]=t.useState(n),[y,P]=t.useState(s),i=3e5,[D,r]=t.useState(i);return t.useEffect(()=>{const e=()=>{document.hidden?r(null):r(i)};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[]),w.useInterval(async()=>{const e=await c();if(u===null||f!==n||y!==s){a(e),C(n),P(s);return}const d=e!==u;d&&(a(e),l(d))},o?null:D),{hasChanges:o,acknowledgeButtonClick:async()=>{l(!1),r(i),a(await c())}}}exports.usePollData=V;
|
package/dist/index87.js
CHANGED
|
@@ -1,11 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
1
|
+
import { useState as t, useEffect as p } from "react";
|
|
2
|
+
import { useInterval as P } from "react-use";
|
|
3
|
+
import { useBusinessLogic as S } from "./index8.js";
|
|
4
|
+
import { useStores as L } from "./index61.js";
|
|
5
|
+
import { useUrlParams as v } from "./index67.js";
|
|
6
|
+
import { fetcherV2 as V } from "./index55.js";
|
|
7
|
+
function T() {
|
|
8
|
+
const { TABLE_DATA_URL: h } = S(), {
|
|
9
|
+
Filters: {
|
|
10
|
+
pageSize: n,
|
|
11
|
+
activeViewId: s
|
|
12
|
+
}
|
|
13
|
+
} = L(), { queryParams: m } = v();
|
|
14
|
+
async function r() {
|
|
15
|
+
const e = `${h}?${m}`, g = await V(e);
|
|
16
|
+
return JSON.stringify(g);
|
|
17
|
+
}
|
|
18
|
+
const [c, a] = t(null), [l, u] = t(!1), [f, C] = t(s), [w, y] = t(n), i = 3e5, [D, o] = t(i);
|
|
19
|
+
return p(() => {
|
|
20
|
+
const e = () => {
|
|
21
|
+
document.hidden ? o(null) : o(i);
|
|
22
|
+
};
|
|
23
|
+
return document.addEventListener("visibilitychange", e), () => {
|
|
24
|
+
document.removeEventListener("visibilitychange", e);
|
|
25
|
+
};
|
|
26
|
+
}, []), P(
|
|
27
|
+
async () => {
|
|
28
|
+
const e = await r();
|
|
29
|
+
if (c === null || f !== s || w !== n) {
|
|
30
|
+
a(e), C(s), y(n);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const d = e !== c;
|
|
34
|
+
d && (a(e), u(d));
|
|
35
|
+
},
|
|
36
|
+
l ? null : D
|
|
37
|
+
), { hasChanges: l, acknowledgeButtonClick: async () => {
|
|
38
|
+
u(!1), o(i), a(await r());
|
|
39
|
+
} };
|
|
40
|
+
}
|
|
6
41
|
export {
|
|
7
|
-
|
|
8
|
-
r as refreshButton,
|
|
9
|
-
t as refreshIndicator,
|
|
10
|
-
e as refreshTooltip
|
|
42
|
+
T as usePollData
|
|
11
43
|
};
|
package/dist/index88.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_refreshTooltip_v0eu8_1",r="_refreshButton_v0eu8_5",t="_refreshIndicator_v0eu8_9",o={refreshTooltip:e,refreshButton:r,refreshIndicator:t};exports.default=o;exports.refreshButton=r;exports.refreshIndicator=t;exports.refreshTooltip=e;
|
package/dist/index88.js
CHANGED
|
@@ -1,120 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { ColumnGroup as w } from "./index91.js";
|
|
6
|
-
import { Container as Y, ColumnGroupsGrid as j, VerticalSeparator as z, VerticalText as B, HeaderContainer as L, ColumnSearch as Q } from "./index92.js";
|
|
7
|
-
import { DndContainer as R } from "./index93.js";
|
|
8
|
-
import { ColumnItem as q } from "./index94.js";
|
|
9
|
-
import { ColumnGroupIds as n } from "./index95.js";
|
|
10
|
-
import { TableManagementGlyph as P } from "./index89.js";
|
|
11
|
-
import { usePersistColumns as _ } from "./index96.js";
|
|
12
|
-
import { filterColumnsBySearch as V } from "./index97.js";
|
|
13
|
-
const { Glyph: E } = I, te = ({
|
|
14
|
-
onClose: l,
|
|
15
|
-
columnDefinitions: k,
|
|
16
|
-
hiddenColumns: s,
|
|
17
|
-
visibleColumns: m,
|
|
18
|
-
pinnedLeftColumnIds: D,
|
|
19
|
-
pinnedRightColumnIds: H
|
|
20
|
-
}) => {
|
|
21
|
-
const [o, b] = v(""), i = f(() => new Map(k.map((a) => [a.id, a])), []), [t, u] = v(() => ({
|
|
22
|
-
[n.Hidden]: s,
|
|
23
|
-
[n.Visible]: m
|
|
24
|
-
})), M = f(() => {
|
|
25
|
-
const a = t[n.Visible].map((r) => i.get(`${r}`));
|
|
26
|
-
return V(a, o);
|
|
27
|
-
}, [t, i, o]), x = f(() => {
|
|
28
|
-
const a = t[n.Hidden].map((r) => i.get(`${r}`));
|
|
29
|
-
return V(a, o);
|
|
30
|
-
}, [t, i, o]), { isSavingColumns: d, saveColumns: G } = _({ pinnedLeftColumnIds: D, pinnedRightColumnIds: H }), T = () => {
|
|
31
|
-
b(""), u({
|
|
32
|
-
[n.Hidden]: s,
|
|
33
|
-
[n.Visible]: m
|
|
34
|
-
});
|
|
35
|
-
}, C = y(
|
|
36
|
-
(a) => {
|
|
37
|
-
if (b(a), !a) {
|
|
38
|
-
const r = /* @__PURE__ */ new Set([...s, ...m]);
|
|
39
|
-
u((S) => ({
|
|
40
|
-
[n.Hidden]: S[n.Hidden].filter((g) => r.has(`${g}`)),
|
|
41
|
-
[n.Visible]: S[n.Visible].filter((g) => r.has(`${g}`))
|
|
42
|
-
}));
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
[s, m]
|
|
46
|
-
), $ = y(
|
|
47
|
-
(a) => {
|
|
48
|
-
const r = i.get(`${a}`);
|
|
49
|
-
return r ? /* @__PURE__ */ e(q, { column: r, isDragOverlay: !0 }) : null;
|
|
50
|
-
},
|
|
51
|
-
[i]
|
|
52
|
-
);
|
|
53
|
-
return /* @__PURE__ */ e(
|
|
54
|
-
O,
|
|
55
|
-
{
|
|
56
|
-
variant: "lg",
|
|
57
|
-
style: { overflowY: "hidden" },
|
|
58
|
-
shouldShow: !0,
|
|
59
|
-
onClose: () => l == null ? void 0 : l(),
|
|
60
|
-
headerSlot: /* @__PURE__ */ c(L, { children: [
|
|
61
|
-
/* @__PURE__ */ c(h, { direction: "horizontal", alignX: "between", alignY: "center", children: [
|
|
62
|
-
/* @__PURE__ */ c(h, { direction: "horizontal", alignX: "start", alignY: "center", spacing: "sm", children: [
|
|
63
|
-
/* @__PURE__ */ e(P, { height: 32, width: 32 }),
|
|
64
|
-
/* @__PURE__ */ e(p, { variant: "headingLarge", as: "h1", children: "Table management" })
|
|
65
|
-
] }),
|
|
66
|
-
/* @__PURE__ */ e(X, { "aria-label": "Close modal", onClick: l, variant: "flat", iconSlot: /* @__PURE__ */ e(E, { name: "close" }) })
|
|
67
|
-
] }),
|
|
68
|
-
/* @__PURE__ */ c(p, { variant: "subheadingMedium", children: [
|
|
69
|
-
"Show, hide, or change the order of the columns in the view, so you always see the data that's most important to you. Learn more with our",
|
|
70
|
-
" ",
|
|
71
|
-
/* @__PURE__ */ e(A, { href: "#", target: "_blank", children: "help guide (TODO)" }),
|
|
72
|
-
"."
|
|
73
|
-
] }),
|
|
74
|
-
/* @__PURE__ */ e(p, { variant: "headingSmall", children: "Column management" }),
|
|
75
|
-
/* @__PURE__ */ e(
|
|
76
|
-
Q,
|
|
77
|
-
{
|
|
78
|
-
name: "column-search-query",
|
|
79
|
-
placeholder: "Search",
|
|
80
|
-
value: o,
|
|
81
|
-
onChange: C,
|
|
82
|
-
onClearClick: () => C(""),
|
|
83
|
-
fill: "100%"
|
|
84
|
-
}
|
|
85
|
-
)
|
|
86
|
-
] }),
|
|
87
|
-
leftActions: [
|
|
88
|
-
{
|
|
89
|
-
label: "Reset",
|
|
90
|
-
onClick: T,
|
|
91
|
-
variant: "default",
|
|
92
|
-
disabled: d
|
|
93
|
-
}
|
|
94
|
-
],
|
|
95
|
-
rightActions: [
|
|
96
|
-
{
|
|
97
|
-
label: "Cancel",
|
|
98
|
-
onClick: l,
|
|
99
|
-
variant: "default",
|
|
100
|
-
disabled: d
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
label: "Save",
|
|
104
|
-
onClick: () => G({ visibleColumns: t[n.Visible] }),
|
|
105
|
-
variant: "primary",
|
|
106
|
-
disabled: d,
|
|
107
|
-
loading: d
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
children: /* @__PURE__ */ e(h, { spacing: "md", alignX: "stretch", children: /* @__PURE__ */ e(h, { spacing: 4, alignX: "stretch", children: /* @__PURE__ */ e(R, { items: t, setItems: u, renderDragOverlay: $, children: /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ c(j, { columns: 2, spacing: "xl", children: [
|
|
111
|
-
/* @__PURE__ */ e(w, { id: n.Visible, title: "Shown columns:", columns: M }),
|
|
112
|
-
/* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(B, { children: "Drag & Drop columns" }) }),
|
|
113
|
-
/* @__PURE__ */ e(w, { id: n.Hidden, title: "Hidden columns:", columns: x })
|
|
114
|
-
] }) }) }) }) })
|
|
115
|
-
}
|
|
116
|
-
);
|
|
1
|
+
const e = "_refreshTooltip_v0eu8_1", r = "_refreshButton_v0eu8_5", t = "_refreshIndicator_v0eu8_9", o = {
|
|
2
|
+
refreshTooltip: e,
|
|
3
|
+
refreshButton: r,
|
|
4
|
+
refreshIndicator: t
|
|
117
5
|
};
|
|
118
6
|
export {
|
|
119
|
-
|
|
7
|
+
o as default,
|
|
8
|
+
r as refreshButton,
|
|
9
|
+
t as refreshIndicator,
|
|
10
|
+
e as refreshTooltip
|
|
120
11
|
};
|