@veeqo/transfigure 1.1.5 → 1.1.7
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/components/ActionsDropdown/ActionsDropdown.d.ts +2 -0
- package/dist/components/ActionsDropdown/index.d.ts +1 -0
- package/dist/components/ActionsDropdown/types.d.ts +7 -0
- package/dist/components/Filters/Fields/NumberRangeFilter/MuiSlider.d.ts +1 -1
- package/dist/components/Views/PillNotifications/variants/styled.d.ts +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +146 -144
- package/dist/index100.cjs +1 -1
- package/dist/index100.js +29 -21
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +21 -24
- package/dist/index102.cjs +16 -77
- package/dist/index102.js +19 -96
- package/dist/index103.cjs +12 -1
- package/dist/index103.js +16 -2
- package/dist/index104.cjs +80 -1
- package/dist/index104.js +101 -19
- package/dist/index105.cjs +1 -1
- package/dist/index105.js +18 -7
- package/dist/index106.cjs +1 -1
- package/dist/index106.js +7 -63
- package/dist/index107.cjs +1 -1
- package/dist/index107.js +60 -26
- package/dist/index108.cjs +1 -13
- package/dist/index108.js +30 -17
- package/dist/index109.cjs +13 -1
- package/dist/index109.js +15 -24
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +27 -18
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +2 -36
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +35 -46
- package/dist/index112.cjs +1 -1
- package/dist/index112.js +25 -62
- package/dist/index113.cjs +1 -7
- package/dist/index113.js +47 -10
- package/dist/index114.cjs +1 -0
- package/dist/index114.js +65 -0
- package/dist/index115.cjs +7 -0
- package/dist/index115.js +12 -0
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +18 -21
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +19 -41
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +41 -23
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +24 -36
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +37 -33
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +32 -49
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +47 -38
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +29 -29
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +41 -58
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +48 -42
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +50 -44
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +46 -7
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +7 -11
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +11 -64
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +40 -39
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +60 -37
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +36 -53
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +54 -51
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +2 -2
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +50 -81
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +81 -35
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +38 -33
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +33 -10
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +10 -39
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +38 -102
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +103 -19
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +17 -134
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +135 -49
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +51 -32
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +2 -2
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +31 -53
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +54 -48
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +41 -81
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +81 -41
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +48 -5
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +5 -45
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +44 -41
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +42 -19
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +19 -8
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +7 -22
- package/dist/index5.cjs +1 -1
- package/dist/index5.js +2 -2
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +23 -2
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +2 -4
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +4 -11
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +10 -12
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +12 -11
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +11 -184
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +183 -25
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +26 -24
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +19 -22
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +25 -97
- package/dist/index6.cjs +1 -1
- package/dist/index6.js +2 -2
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +99 -8
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +8 -51
- package/dist/index62.cjs +1 -1
- package/dist/index62.js +50 -60
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +57 -18
- package/dist/index64.cjs +1 -1
- package/dist/index64.js +22 -18
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +16 -26
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +27 -56
- package/dist/index67.cjs +1 -1
- package/dist/index67.js +57 -341
- package/dist/index68.cjs +1 -1
- package/dist/index68.js +337 -55
- package/dist/index69.cjs +1 -1
- package/dist/index69.js +50 -47
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +4 -4
- package/dist/index70.cjs +1 -1
- package/dist/index70.js +51 -32
- package/dist/index71.cjs +1 -1
- package/dist/index71.js +30 -24
- package/dist/index72.cjs +1 -1
- package/dist/index72.js +26 -32
- package/dist/index73.cjs +1 -1
- package/dist/index73.js +37 -12
- package/dist/index74.cjs +1 -1
- package/dist/index74.js +13 -9
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +9 -17
- package/dist/index76.cjs +1 -1
- package/dist/index76.js +14 -16
- package/dist/index77.cjs +1 -1
- package/dist/index77.js +18 -49
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +50 -21
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +21 -7
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +7 -2
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +2 -9
- package/dist/index82.cjs +1 -3
- package/dist/index82.js +8 -13
- package/dist/index83.cjs +3 -1
- package/dist/index83.js +13 -8
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +9 -41
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +4 -8
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +39 -116
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +9 -19
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +118 -13
- package/dist/index89.cjs +1 -104
- package/dist/index89.js +17 -118
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +13 -68
- package/dist/index91.cjs +104 -1
- package/dist/index91.js +119 -28
- package/dist/index92.cjs +1 -1
- package/dist/index92.js +68 -2
- package/dist/index93.cjs +1 -1
- package/dist/index93.js +27 -39
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +2 -11
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +37 -29
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +11 -29
- package/dist/index97.cjs +1 -19
- package/dist/index97.js +24 -24
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +1 -1
- package/dist/index99.cjs +1 -12
- package/dist/index99.js +33 -16
- package/package.json +1 -1
package/dist/index38.js
CHANGED
|
@@ -1,53 +1,139 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { Card as x, Alert as O, Stack as c, TextField as _, Text as $, SegmentedControl as A, Checkbox as E, Button as p } from "@veeqo/ui";
|
|
3
|
+
import { useForm as L, Controller as d } from "react-hook-form";
|
|
4
|
+
import { useCustomViews as j } from "./index65.js";
|
|
5
|
+
import { SHARING_OPTIONS as F } from "./index45.js";
|
|
6
|
+
import { useBusinessLogic as M } from "./index8.js";
|
|
7
|
+
const w = 60, z = ({
|
|
8
|
+
tab: n,
|
|
9
|
+
viewName: v,
|
|
10
|
+
shouldShowDropdown: g,
|
|
11
|
+
onCloseDropdown: f,
|
|
12
|
+
onDelete: b,
|
|
13
|
+
onSave: y,
|
|
14
|
+
headerText: C,
|
|
15
|
+
e2ePrefix: s,
|
|
16
|
+
activeOption: S
|
|
13
17
|
}) => {
|
|
14
|
-
const {
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
18
|
+
const { VIEW_TYPE: V } = M(), { canDeleteCustomViews: m, canUpdateCustomViews: o, canShareCustomViews: r, defaultCustomViewId: u } = j({
|
|
19
|
+
type: V
|
|
20
|
+
}), k = n.id === u, { handleSubmit: D, control: l, formState: h } = L({
|
|
21
|
+
mode: "onChange",
|
|
22
|
+
defaultValues: {
|
|
23
|
+
viewName: v,
|
|
24
|
+
isDefault: n.id === u,
|
|
25
|
+
shareOption: S.key
|
|
26
|
+
}
|
|
27
|
+
}), T = Object.values(F).map((t) => ({
|
|
28
|
+
key: t.key,
|
|
29
|
+
value: t.key,
|
|
30
|
+
label: t.text
|
|
31
|
+
}));
|
|
32
|
+
if (!g) return null;
|
|
33
|
+
const I = n.originalView === void 0;
|
|
34
|
+
return /* @__PURE__ */ e("form", { onSubmit: D(y), children: /* @__PURE__ */ a(
|
|
35
|
+
x,
|
|
36
|
+
{
|
|
37
|
+
style: { width: "400px" },
|
|
38
|
+
title: C,
|
|
39
|
+
subtitle: "Any filters you've applied and your chosen sort direction will be stored in this view",
|
|
40
|
+
onClose: f,
|
|
41
|
+
renderFooter: () => m || o || r ? /* @__PURE__ */ a(c, { direction: "horizontal", alignX: "end", children: [
|
|
42
|
+
m && /* @__PURE__ */ e(
|
|
43
|
+
p,
|
|
44
|
+
{
|
|
45
|
+
variant: "destructive",
|
|
46
|
+
onClick: b,
|
|
47
|
+
className: `act-react-listing-custom-view-${s}-delete`,
|
|
48
|
+
children: "Delete"
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
(o || r) && /* @__PURE__ */ e(
|
|
52
|
+
p,
|
|
53
|
+
{
|
|
54
|
+
variant: "primary",
|
|
55
|
+
type: "submit",
|
|
56
|
+
className: `act-react-listing-custom-view-${s}-save`,
|
|
57
|
+
disabled: !h.isDirty && I || h.isSubmitting,
|
|
58
|
+
children: "Save"
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
] }) : null,
|
|
62
|
+
className: `act-react-listing-custom-view-${s}`,
|
|
63
|
+
children: [
|
|
64
|
+
!o && /* @__PURE__ */ e(
|
|
65
|
+
O,
|
|
66
|
+
{
|
|
67
|
+
variant: "warning",
|
|
68
|
+
title: "You need permission to edit this view",
|
|
69
|
+
message: "This is a company shared view"
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ a(c, { alignX: "stretch", children: [
|
|
73
|
+
/* @__PURE__ */ e(
|
|
74
|
+
d,
|
|
75
|
+
{
|
|
76
|
+
name: "viewName",
|
|
77
|
+
control: l,
|
|
78
|
+
render: ({ onChange: t, value: i }) => /* @__PURE__ */ e(
|
|
79
|
+
_,
|
|
80
|
+
{
|
|
81
|
+
id: "view-name",
|
|
82
|
+
className: `act-react-listing-custom-view-${s}-field`,
|
|
83
|
+
label: "View name",
|
|
84
|
+
placeholder: "View name",
|
|
85
|
+
value: i,
|
|
86
|
+
onChange: t,
|
|
87
|
+
disabled: !n.editable,
|
|
88
|
+
maxLength: w,
|
|
89
|
+
hint: `${i.length} / ${w} characters`,
|
|
90
|
+
required: !0
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ a(c, { children: [
|
|
96
|
+
/* @__PURE__ */ e($, { variant: "inputLabel", children: "Sharing options" }),
|
|
97
|
+
/* @__PURE__ */ e(
|
|
98
|
+
d,
|
|
99
|
+
{
|
|
100
|
+
name: "shareOption",
|
|
101
|
+
control: l,
|
|
102
|
+
render: ({ onChange: t, value: i }) => /* @__PURE__ */ e(
|
|
103
|
+
A,
|
|
104
|
+
{
|
|
105
|
+
onChange: (N) => r && t(N),
|
|
106
|
+
options: T,
|
|
107
|
+
selected: i
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ e(
|
|
114
|
+
d,
|
|
115
|
+
{
|
|
116
|
+
name: "isDefault",
|
|
117
|
+
control: l,
|
|
118
|
+
render: ({ onChange: t, value: i }) => /* @__PURE__ */ e(
|
|
119
|
+
E,
|
|
120
|
+
{
|
|
121
|
+
disabled: k,
|
|
122
|
+
name: "makeViewDefault",
|
|
123
|
+
label: "Make default view",
|
|
124
|
+
checked: i,
|
|
125
|
+
onChange: t,
|
|
126
|
+
hint: "This will be the view this page will always open on"
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
] })
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
) });
|
|
50
135
|
};
|
|
51
136
|
export {
|
|
52
|
-
|
|
137
|
+
z as EditDropdown,
|
|
138
|
+
w as VIEWS_TITLE_MAX_CHAR_LIMIT
|
|
53
139
|
};
|
package/dist/index39.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index102.cjs"),g=require("./index52.cjs"),j=require("./index51.cjs"),M=({tab:i,onMakeDefault:l,onEdit:n,onDuplicate:s,onDelete:o,shouldShowDropdown:a,handleCloseDropdown:c})=>{const{openModal:r}=g.useModal(),d=()=>{r(j.ModalId.ORDERS_TABLE_MANAGEMENT),c()},m=i.label!=="Picking In Progress"&&i.editable,u=i.default!==!1&&i.editable,p=i.editable,b=i.editable;return a?e.jsxs(t.MenuItems,{children:[u&&e.jsx(t.Item,{onClick:l,className:"act-react-listing-custom-view-make-default-menu-item",children:"Make default view"}),b&&e.jsx(t.Item,{onClick:n,className:"act-react-listing-custom-view-edit-menu-item",role:"option",children:"Edit"}),e.jsx(t.Item,{onClick:s,className:"act-react-listing-custom-view-duplicate-menu-item",role:"option",children:"Duplicate"}),m&&e.jsx(t.Item,{onClick:o,className:"act-react-listing-custom-view-delete-menu-item",role:"option",children:"Delete"}),p&&e.jsxs(e.Fragment,{children:[e.jsx(t.Divider,{}),e.jsx(t.Item,{onClick:d,role:"option",children:"Table management"})]})]}):null};exports.OptionsDropdown=M;
|
package/dist/index39.js
CHANGED
|
@@ -1,34 +1,53 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
import { jsxs as t, jsx as i, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { MenuItems as M, Item as l, Divider as h } from "./index102.js";
|
|
3
|
+
import { useModal as k } from "./index52.js";
|
|
4
|
+
import { ModalId as T } from "./index51.js";
|
|
5
|
+
const N = ({
|
|
6
|
+
tab: e,
|
|
7
|
+
onMakeDefault: n,
|
|
8
|
+
onEdit: a,
|
|
9
|
+
onDuplicate: o,
|
|
10
|
+
onDelete: c,
|
|
11
|
+
shouldShowDropdown: s,
|
|
12
|
+
handleCloseDropdown: r
|
|
13
|
+
}) => {
|
|
14
|
+
const { openModal: m } = k(), d = () => {
|
|
15
|
+
m(T.ORDERS_TABLE_MANAGEMENT), r();
|
|
16
|
+
}, u = e.label !== "Picking In Progress" && e.editable, p = e.default !== !1 && e.editable, b = e.editable, g = e.editable;
|
|
17
|
+
return s ? /* @__PURE__ */ t(M, { children: [
|
|
18
|
+
p && /* @__PURE__ */ i(
|
|
19
|
+
l,
|
|
20
|
+
{
|
|
21
|
+
onClick: n,
|
|
22
|
+
className: "act-react-listing-custom-view-make-default-menu-item",
|
|
23
|
+
children: "Make default view"
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
g && /* @__PURE__ */ i(l, { onClick: a, className: "act-react-listing-custom-view-edit-menu-item", role: "option", children: "Edit" }),
|
|
27
|
+
/* @__PURE__ */ i(
|
|
28
|
+
l,
|
|
29
|
+
{
|
|
30
|
+
onClick: o,
|
|
31
|
+
className: "act-react-listing-custom-view-duplicate-menu-item",
|
|
32
|
+
role: "option",
|
|
33
|
+
children: "Duplicate"
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
u && /* @__PURE__ */ i(
|
|
37
|
+
l,
|
|
38
|
+
{
|
|
39
|
+
onClick: c,
|
|
40
|
+
className: "act-react-listing-custom-view-delete-menu-item",
|
|
41
|
+
role: "option",
|
|
42
|
+
children: "Delete"
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
b && /* @__PURE__ */ t(f, { children: [
|
|
46
|
+
/* @__PURE__ */ i(h, {}),
|
|
47
|
+
/* @__PURE__ */ i(l, { onClick: d, role: "option", children: "Table management" })
|
|
48
|
+
] })
|
|
49
|
+
] }) : null;
|
|
50
|
+
};
|
|
32
51
|
export {
|
|
33
|
-
|
|
52
|
+
N as OptionsDropdown
|
|
34
53
|
};
|
package/dist/index4.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index7.cjs"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index7.cjs"),t=require("./index53.cjs"),s=require("./index54.cjs"),n=(r={})=>e.axios.patch("/current_user",{user:r},t.withCSRF(s.vndAPI));exports.patchCurrentUser=n;
|
package/dist/index4.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { axios as t } from "./index7.js";
|
|
2
|
-
import { withCSRF as o } from "./
|
|
3
|
-
import { vndAPI as e } from "./
|
|
2
|
+
import { withCSRF as o } from "./index53.js";
|
|
3
|
+
import { vndAPI as e } from "./index54.js";
|
|
4
4
|
const s = (r = {}) => t.patch("/current_user", { user: r }, o(e));
|
|
5
5
|
export {
|
|
6
6
|
s as patchCurrentUser
|
package/dist/index40.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 e=require("react/jsx-runtime"),P=require("mobx-react"),g=require("./index62.cjs"),o=require("framer-motion"),m=require("./index61.cjs"),v=require("./index101.cjs"),f=require("./index42.cjs"),h=P.observer(({tabType:s,isActive:r,shouldShowCreateViewNotification:a,handleSaveDraft:i})=>{var t;const{Filters:{hasUnsavedChanges:c,discardChanges:l,activeViewId:n}}=m.useStores(),{viewsMap:u}=g.useViews(),d=n&&((t=u.get(n))==null?void 0:t.label);return e.jsxs(e.Fragment,{children:[e.jsx(o.AnimatePresence,{children:s==="draft"&&r&&a&&e.jsx(v.DraftPill,{onClick:i})}),e.jsx(o.AnimatePresence,{children:c&&r&&s==="saved"&&e.jsx(f.UnsavedChangesPill,{viewName:d,onDiscard:()=>l(),onSaveDraft:i})})]})});exports.PillNotifications=h;
|
package/dist/index40.js
CHANGED
|
@@ -1,56 +1,34 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
import { jsxs as f, Fragment as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { observer as h } from "mobx-react";
|
|
3
|
+
import { useViews as v } from "./index62.js";
|
|
4
|
+
import { AnimatePresence as n } from "framer-motion";
|
|
5
|
+
import { useStores as g } from "./index61.js";
|
|
6
|
+
import { DraftPill as w } from "./index101.js";
|
|
7
|
+
import { UnsavedChangesPill as C } from "./index42.js";
|
|
8
|
+
const U = h(
|
|
9
|
+
({
|
|
10
|
+
tabType: e,
|
|
11
|
+
isActive: o,
|
|
12
|
+
shouldShowCreateViewNotification: m,
|
|
13
|
+
handleSaveDraft: i
|
|
14
|
+
}) => {
|
|
15
|
+
var t;
|
|
16
|
+
const {
|
|
17
|
+
Filters: { hasUnsavedChanges: a, discardChanges: c, activeViewId: s }
|
|
18
|
+
} = g(), { viewsMap: l } = v(), d = s && ((t = l.get(s)) == null ? void 0 : t.label);
|
|
19
|
+
return /* @__PURE__ */ f(p, { children: [
|
|
20
|
+
/* @__PURE__ */ r(n, { children: e === "draft" && o && m && /* @__PURE__ */ r(w, { onClick: i }) }),
|
|
21
|
+
/* @__PURE__ */ r(n, { children: a && o && e === "saved" && /* @__PURE__ */ r(
|
|
22
|
+
C,
|
|
23
|
+
{
|
|
24
|
+
viewName: d,
|
|
25
|
+
onDiscard: () => c(),
|
|
26
|
+
onSaveDraft: i
|
|
24
27
|
}
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
...t.settings,
|
|
30
|
-
custom_view_positions: {
|
|
31
|
-
...t.settings.custom_view_positions,
|
|
32
|
-
order: i
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}),
|
|
36
|
-
{ revalidate: !1 }
|
|
37
|
-
);
|
|
38
|
-
} catch {
|
|
39
|
-
e(s), c({
|
|
40
|
-
type: "error",
|
|
41
|
-
text: "Failed to update order of views"
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
return a || !s.length ? null : /* @__PURE__ */ r(v, { children: /* @__PURE__ */ r(
|
|
46
|
-
w,
|
|
47
|
-
{
|
|
48
|
-
views: u,
|
|
49
|
-
onChange: p,
|
|
50
|
-
className: "act-sortable-views"
|
|
51
|
-
}
|
|
52
|
-
) });
|
|
53
|
-
};
|
|
28
|
+
) })
|
|
29
|
+
] });
|
|
30
|
+
}
|
|
31
|
+
);
|
|
54
32
|
export {
|
|
55
|
-
|
|
33
|
+
U as PillNotifications
|
|
56
34
|
};
|
package/dist/index41.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 i=require("react/jsx-runtime"),n=require("react"),m=require("./index98.cjs"),g=require("./index65.cjs"),S=require("./index62.cjs"),b=require("./index4.cjs"),y=require("./index8.cjs"),V=require("./index61.cjs"),p=require("./index12.cjs"),q=()=>{const{VIEW_TYPE:u}=y.useBusinessLogic(),{sortedCustomViews:s,isLoading:a}=S.useViews(),{mutate:c}=g.useCustomViews({type:u}),[l,t]=n.useState(s);n.useEffect(()=>{t(s)},[s]);const{Notifications:{notify:w}}=V.useStores(),d=async o=>{t(o);const r=o.map(e=>e.id);try{await b.patchCurrentUser({user_setting_attributes:{custom_view_positions:{order:r}}}),await c(e=>({...e,settings:{...e.settings,custom_view_positions:{...e.settings.custom_view_positions,order:r}}}),{revalidate:!1})}catch{t(s),w({type:"error",text:"Failed to update order of views"})}};return a||!s.length?null:i.jsx(p.ErrorBoundary,{children:i.jsx(m.LegacySortableViews,{views:l,onChange:d,className:"act-sortable-views"})})};exports.SortableViews=q;
|
package/dist/index41.js
CHANGED
|
@@ -1,50 +1,56 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f, useEffect as l } from "react";
|
|
3
|
+
import { LegacySortableViews as w } from "./index98.js";
|
|
4
|
+
import { useCustomViews as d } from "./index65.js";
|
|
5
|
+
import { useViews as g } from "./index62.js";
|
|
6
|
+
import { patchCurrentUser as _ } from "./index4.js";
|
|
7
|
+
import { useBusinessLogic as S } from "./index8.js";
|
|
8
|
+
import { useStores as b } from "./index61.js";
|
|
9
|
+
import { ErrorBoundary as v } from "./index12.js";
|
|
10
|
+
const T = () => {
|
|
11
|
+
const { VIEW_TYPE: m } = S(), { sortedCustomViews: s, isLoading: a } = g(), { mutate: n } = d({ type: m }), [u, e] = f(s);
|
|
12
|
+
l(() => {
|
|
13
|
+
e(s);
|
|
14
|
+
}, [s]);
|
|
15
|
+
const { Notifications: { notify: c } } = b(), p = async (o) => {
|
|
16
|
+
e(o);
|
|
17
|
+
const i = o.map((t) => t.id);
|
|
18
|
+
try {
|
|
19
|
+
await _({
|
|
20
|
+
user_setting_attributes: {
|
|
21
|
+
custom_view_positions: {
|
|
22
|
+
order: i
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}), await n(
|
|
26
|
+
(t) => ({
|
|
27
|
+
...t,
|
|
28
|
+
settings: {
|
|
29
|
+
...t.settings,
|
|
30
|
+
custom_view_positions: {
|
|
31
|
+
...t.settings.custom_view_positions,
|
|
32
|
+
order: i
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}),
|
|
36
|
+
{ revalidate: !1 }
|
|
37
|
+
);
|
|
38
|
+
} catch {
|
|
39
|
+
e(s), c({
|
|
40
|
+
type: "error",
|
|
41
|
+
text: "Failed to update order of views"
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
return a || !s.length ? null : /* @__PURE__ */ r(v, { children: /* @__PURE__ */ r(
|
|
46
|
+
w,
|
|
47
|
+
{
|
|
48
|
+
views: u,
|
|
49
|
+
onChange: p,
|
|
50
|
+
className: "act-sortable-views"
|
|
51
|
+
}
|
|
52
|
+
) });
|
|
53
|
+
};
|
|
48
54
|
export {
|
|
49
|
-
|
|
55
|
+
T as SortableViews
|
|
50
56
|
};
|
package/dist/index42.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("@veeqo/ui"),c=require("mobx-react"),l=require("./index60.cjs"),n=require("./index104.cjs"),d=i.theme.colors.secondary.blue.base,h=c.observer(({onDiscard:r,viewName:s,onSaveDraft:a})=>{const{saveChanges:o,isSubmitting:t}=l.usePersistUnsavedChanges();return e.jsx(n.Notification,{children:e.jsx(n.Container,{children:e.jsxs(i.Stack,{direction:"horizontal",alignY:"center",children:[e.jsx(n.Glyph,{ariaLabel:"attention",name:"attention",color:d}),e.jsxs(n.Wrap,{children:[e.jsx(n.Text,{variant:"body",margin:"0 4px 0 0",children:"You have unsaved changes to"}),s&&e.jsxs(n.Bold,{variant:"bodyBoldDark",children:["'",s,"'"]})]}),e.jsx(i.Button,{onClick:r,size:"sm",children:"Discard changes"}),e.jsxs(i.ActionMenu,{ctaProps:{children:"Save changes",variant:"primary"},children:[e.jsx(i.ActionMenu.Item,{onAction:a,isDisabled:t,children:e.jsx(n.Text,{variant:"body",children:"Create new view"})}),e.jsx(i.ActionMenu.Item,{onAction:o,isDisabled:t,children:e.jsxs(i.Stack,{direction:"horizontal",spacing:1,alignY:"center",children:[e.jsx(n.Text,{variant:"body",children:"Save changes to"}),e.jsx(n.Text,{variant:"bodyBold",children:s})]})})]})]})})})});exports.UnsavedChangesPill=h;
|