@veeqo/transfigure 0.0.1 → 0.0.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/README.md +2 -53
- package/dist/BusinessLogic/mocks.d.ts +3 -3
- package/dist/BusinessLogic/types.d.ts +3 -2
- package/dist/components/Filters/ActiveFilters/Categories/index.d.ts +2 -0
- package/dist/components/Filters/ActiveFilters/Variants/ActiveAsyncCheckboxFilter/ActiveAsyncCheckboxFilter.d.ts +8 -0
- package/dist/components/Filters/ActiveFilters/Variants/ActiveAsyncCheckboxFilter/index.d.ts +1 -0
- package/dist/components/Filters/ActiveFilters/Variants/ActiveAsyncRadioFilter/ActiveAsyncRadioFilter.d.ts +8 -0
- package/dist/components/Filters/ActiveFilters/Variants/ActiveAsyncRadioFilter/index.d.ts +1 -0
- package/dist/components/Filters/{Fields → ActiveFilters/Variants/ActiveFilterNumberRangeTag}/FilterNumberRangeFilter/FilterNumberRangeFilter.d.ts +1 -1
- package/dist/components/Filters/ActiveFilters/Variants/index.d.ts +5 -0
- package/dist/components/Filters/ActiveFilters/index.d.ts +2 -3
- package/dist/components/Filters/Fields/index.d.ts +0 -6
- package/dist/components/Filters/{Fields/FilterGroup → FilterGroup}/FilterGroup.d.ts +1 -1
- package/dist/components/Filters/FilterGroup/index.d.ts +1 -0
- package/dist/components/Filters/index.d.ts +1 -0
- package/dist/components/TableControls/TableControls.d.ts +1 -0
- package/dist/components/TableControls/index.d.ts +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +75 -75
- package/dist/index10.js +3 -12
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +19 -19
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +42 -21
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +23 -38
- package/dist/index14.cjs +1 -1
- package/dist/index14.js +39 -37
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +36 -54
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +32 -46
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +50 -42
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +39 -50
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +59 -37
- package/dist/index20.cjs +1 -1
- package/dist/index20.js +53 -37
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +45 -53
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +43 -33
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +56 -57
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +57 -18
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +38 -31
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +55 -39
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +52 -34
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +81 -47
- package/dist/index29.cjs +1 -1
- package/dist/index29.js +36 -107
- package/dist/index3.js +1 -3
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +31 -31
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +10 -30
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +40 -14
- package/dist/index33.js +49 -48
- package/dist/index34.js +12 -11
- package/dist/index35.js +104 -39
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +47 -24
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +43 -22
- package/dist/index38.cjs +1 -1
- package/dist/index38.js +22 -27
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +67 -26
- package/dist/index4.js +1 -8
- package/dist/index40.js +71 -21
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +31 -18
- package/dist/index42.js +2 -8
- package/dist/index43.js +13 -1
- package/dist/index45.js +14 -12
- package/dist/index48.js +1 -3
- package/dist/index5.js +2 -9
- package/dist/index50.js +3 -12
- package/dist/index51.js +8 -42
- package/dist/index52.js +20 -35
- package/dist/index53.js +16 -25
- package/dist/index54.js +18 -27
- package/dist/index55.js +31 -36
- package/dist/index57.js +22 -32
- package/dist/index58.js +14 -15
- package/dist/index59.js +2 -10
- package/dist/index6.js +8 -40
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +226 -209
- package/dist/index61.js +5 -9
- package/dist/index62.js +3 -9
- package/dist/index65.js +1 -6
- package/dist/index66.js +1 -4
- package/dist/index67.js +1 -3
- package/dist/index69.js +28 -23
- package/dist/index75.cjs +1 -1
- package/dist/index75.js +2 -4
- package/dist/index76.js +26 -16
- package/dist/index77.cjs +1 -19
- package/dist/index77.js +14 -29
- package/dist/index78.cjs +19 -1
- package/dist/index78.js +24 -16
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +22 -9
- package/dist/index80.cjs +78 -10
- package/dist/index80.js +92 -13
- package/dist/index81.cjs +10 -78
- package/dist/index81.js +13 -94
- package/dist/index83.cjs +1 -80
- package/dist/index83.js +35 -96
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +62 -35
- package/dist/index85.js +1 -3
- package/dist/index86.cjs +80 -7
- package/dist/index86.js +93 -10
- package/dist/index87.cjs +7 -0
- package/dist/index87.js +12 -0
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +99 -84
- package/dist/mobx/Filters/Filters.d.ts +5 -0
- package/dist/mocks/internal/mockUseStores/index.d.ts +1 -0
- package/dist/mocks/internal/mockUseStores/mockUseStores.d.ts +6 -0
- package/dist/types.d.ts +1 -1
- package/package.json +4 -5
- package/dist/components/Filters/Fields/AsyncInlineCheckboxFilter/AsyncInlineCheckboxFilter.d.ts +0 -8
- package/dist/components/Filters/Fields/AsyncInlineCheckboxFilter/index.d.ts +0 -1
- package/dist/components/Filters/Fields/AsyncInlineRadioFilter/AsyncInlineRadioFilter.d.ts +0 -8
- package/dist/components/Filters/Fields/AsyncInlineRadioFilter/index.d.ts +0 -1
- package/dist/components/Filters/Fields/FilterGroup/index.d.ts +0 -1
- package/dist/components/Table/Table.d.ts +0 -1
- /package/dist/components/Filters/{Fields → ActiveFilters/Categories}/FilterArrayField/FilterArrayField.d.ts +0 -0
- /package/dist/components/Filters/{Fields → ActiveFilters/Categories}/FilterArrayField/index.d.ts +0 -0
- /package/dist/components/Filters/{Fields → ActiveFilters/Categories}/FilterField/FilterField.d.ts +0 -0
- /package/dist/components/Filters/{Fields → ActiveFilters/Categories}/FilterField/index.d.ts +0 -0
- /package/dist/components/Filters/ActiveFilters/{ActiveFilterArrayTag → Variants/ActiveFilterArrayTag}/ActiveFilterArrayTag.d.ts +0 -0
- /package/dist/components/Filters/ActiveFilters/{ActiveFilterArrayTag → Variants/ActiveFilterArrayTag}/index.d.ts +0 -0
- /package/dist/components/Filters/ActiveFilters/{ActiveFilterDateRangeTag → Variants/ActiveFilterDateRangeTag}/ActiveFilterDateRangeTag.d.ts +0 -0
- /package/dist/components/Filters/ActiveFilters/{ActiveFilterDateRangeTag → Variants/ActiveFilterDateRangeTag}/index.d.ts +0 -0
- /package/dist/components/Filters/ActiveFilters/{ActiveFilterNumberRangeTag → Variants/ActiveFilterNumberRangeTag}/ActiveFilterNumberRangeTag.d.ts +0 -0
- /package/dist/components/Filters/{Fields → ActiveFilters/Variants/ActiveFilterNumberRangeTag}/FilterNumberRangeFilter/index.d.ts +0 -0
- /package/dist/components/Filters/ActiveFilters/{ActiveFilterNumberRangeTag → Variants/ActiveFilterNumberRangeTag}/index.d.ts +0 -0
package/dist/index35.js
CHANGED
|
@@ -15,20 +15,9 @@ const p = 60, z = ({
|
|
|
15
15
|
e2ePrefix: n,
|
|
16
16
|
activeOption: S
|
|
17
17
|
}) => {
|
|
18
|
-
const {
|
|
19
|
-
VIEW_TYPE: V
|
|
20
|
-
} = M(), {
|
|
21
|
-
canDeleteCustomViews: m,
|
|
22
|
-
canUpdateCustomViews: o,
|
|
23
|
-
canShareCustomViews: r,
|
|
24
|
-
defaultCustomViewId: u
|
|
25
|
-
} = j({
|
|
18
|
+
const { VIEW_TYPE: V } = M(), { canDeleteCustomViews: m, canUpdateCustomViews: o, canShareCustomViews: r, defaultCustomViewId: u } = j({
|
|
26
19
|
type: V
|
|
27
|
-
}), k = a.id === u, {
|
|
28
|
-
handleSubmit: D,
|
|
29
|
-
control: l,
|
|
30
|
-
formState: h
|
|
31
|
-
} = L({
|
|
20
|
+
}), k = a.id === u, { handleSubmit: D, control: l, formState: h } = L({
|
|
32
21
|
mode: "onChange",
|
|
33
22
|
defaultValues: {
|
|
34
23
|
viewName: v,
|
|
@@ -42,32 +31,108 @@ const p = 60, z = ({
|
|
|
42
31
|
}));
|
|
43
32
|
if (!g) return null;
|
|
44
33
|
const I = a.originalView === void 0;
|
|
45
|
-
return /* @__PURE__ */ e("form", { onSubmit: D(C), children: /* @__PURE__ */ s(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
34
|
+
return /* @__PURE__ */ e("form", { onSubmit: D(C), children: /* @__PURE__ */ s(
|
|
35
|
+
x,
|
|
36
|
+
{
|
|
37
|
+
style: { width: "400px" },
|
|
38
|
+
title: y,
|
|
39
|
+
subtitle: "Active filters and sort direction will be saved in your view",
|
|
40
|
+
onClose: b,
|
|
41
|
+
renderFooter: () => m || o || r ? /* @__PURE__ */ s(c, { direction: "horizontal", alignX: "end", children: [
|
|
42
|
+
m && /* @__PURE__ */ e(
|
|
43
|
+
w,
|
|
44
|
+
{
|
|
45
|
+
variant: "destructive",
|
|
46
|
+
onClick: f,
|
|
47
|
+
className: `act-react-listing-custom-view-${n}-delete`,
|
|
48
|
+
children: "Delete"
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
(o || r) && /* @__PURE__ */ e(
|
|
52
|
+
w,
|
|
53
|
+
{
|
|
54
|
+
variant: "primary",
|
|
55
|
+
type: "submit",
|
|
56
|
+
className: `act-react-listing-custom-view-${n}-save`,
|
|
57
|
+
disabled: !h.isDirty && I || h.isSubmitting,
|
|
58
|
+
children: "Save"
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
] }) : null,
|
|
62
|
+
className: `act-react-listing-custom-view-${n}`,
|
|
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__ */ s(c, { 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-${n}-field`,
|
|
83
|
+
label: "View name",
|
|
84
|
+
placeholder: "View name",
|
|
85
|
+
value: i,
|
|
86
|
+
onChange: t,
|
|
87
|
+
disabled: !a.editable,
|
|
88
|
+
maxLength: p,
|
|
89
|
+
hint: `${i.length} / ${p} characters`,
|
|
90
|
+
required: !0
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ s(c, { children: [
|
|
96
|
+
/* @__PURE__ */ e($, { variant: "inputLabel", children: "Sharing options" }),
|
|
97
|
+
/* @__PURE__ */ e("br", {}),
|
|
98
|
+
/* @__PURE__ */ e(
|
|
99
|
+
d,
|
|
100
|
+
{
|
|
101
|
+
name: "shareOption",
|
|
102
|
+
control: l,
|
|
103
|
+
render: ({ onChange: t, value: i }) => /* @__PURE__ */ e(
|
|
104
|
+
A,
|
|
105
|
+
{
|
|
106
|
+
onChange: (N) => r && t(N),
|
|
107
|
+
options: T,
|
|
108
|
+
selected: i
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
] }),
|
|
114
|
+
/* @__PURE__ */ e(
|
|
115
|
+
d,
|
|
116
|
+
{
|
|
117
|
+
name: "isDefault",
|
|
118
|
+
control: l,
|
|
119
|
+
render: ({ onChange: t, value: i }) => /* @__PURE__ */ e(
|
|
120
|
+
E,
|
|
121
|
+
{
|
|
122
|
+
disabled: k,
|
|
123
|
+
name: "makeViewDefault",
|
|
124
|
+
label: "Make default view",
|
|
125
|
+
checked: i,
|
|
126
|
+
onChange: t,
|
|
127
|
+
hint: "This will be the tab this page will always open on"
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
] })
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
) });
|
|
71
136
|
};
|
|
72
137
|
export {
|
|
73
138
|
z as EditDropdown,
|
package/dist/index36.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./index78.cjs"),g=require("./index47.cjs"),j=require("./index46.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/index36.js
CHANGED
|
@@ -1,30 +1,53 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { MenuItems as
|
|
3
|
-
import { useModal as
|
|
4
|
-
import { ModalId as
|
|
5
|
-
const
|
|
6
|
-
tab:
|
|
7
|
-
onMakeDefault:
|
|
8
|
-
onEdit:
|
|
9
|
-
onDuplicate:
|
|
10
|
-
onDelete:
|
|
11
|
-
shouldShowDropdown:
|
|
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 "./index78.js";
|
|
3
|
+
import { useModal as k } from "./index47.js";
|
|
4
|
+
import { ModalId as T } from "./index46.js";
|
|
5
|
+
const N = ({
|
|
6
|
+
tab: e,
|
|
7
|
+
onMakeDefault: n,
|
|
8
|
+
onEdit: a,
|
|
9
|
+
onDuplicate: o,
|
|
10
|
+
onDelete: c,
|
|
11
|
+
shouldShowDropdown: s,
|
|
12
12
|
handleCloseDropdown: r
|
|
13
13
|
}) => {
|
|
14
|
-
const {
|
|
15
|
-
|
|
16
|
-
} =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
+
] })
|
|
26
49
|
] }) : null;
|
|
27
50
|
};
|
|
28
51
|
export {
|
|
29
|
-
|
|
52
|
+
N as OptionsDropdown
|
|
30
53
|
};
|
package/dist/index37.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react-transition-group"),f=require("mobx-react"),x=require("./index57.cjs"),v=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react-transition-group"),f=require("mobx-react"),x=require("./index57.cjs"),v=require("./index79.cjs"),g=require("./index39.cjs"),h=require("./index56.cjs"),S=f.observer(({tabType:i,isActive:n,shouldShowCreateViewNotification:c,handleSaveDraft:s})=>{var r;const{Filters:{hasUnsavedChanges:l,discardChanges:u,activeViewId:t}}=h.useStores(),d=window.location.pathname==="/orders"?"orders":"variants",{viewsMap:m}=x.useViews(),o=t&&((r=m.get(t))==null?void 0:r.label)||"failure";return e.jsxs(e.Fragment,{children:[e.jsx(a.CSSTransition,{in:i==="draft"&&n&&c,timeout:200,classNames:"notification",unmountOnExit:!0,children:e.jsx(v.InfoPill,{onClick:s,mainEntityLabelPlural:d})}),i!=="fixed"&&o&&e.jsx(a.CSSTransition,{in:l&&n&&i==="saved",timeout:200,classNames:"notification",unmountOnExit:!0,children:e.jsx(g.UnsavedChangesPill,{viewName:o,onDiscard:()=>u(),onSaveDraft:s})})]})});exports.PillNotifications=S;
|
package/dist/index37.js
CHANGED
|
@@ -2,30 +2,51 @@ import { jsxs as u, Fragment as p, jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import { CSSTransition as a } from "react-transition-group";
|
|
3
3
|
import { observer as h } from "mobx-react";
|
|
4
4
|
import { useViews as v } from "./index57.js";
|
|
5
|
-
import { InfoPill as w } from "./
|
|
5
|
+
import { InfoPill as w } from "./index79.js";
|
|
6
6
|
import { UnsavedChangesPill as x } from "./index39.js";
|
|
7
7
|
import { useStores as g } from "./index56.js";
|
|
8
|
-
const F = h(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
hasUnsavedChanges: l,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
8
|
+
const F = h(
|
|
9
|
+
({
|
|
10
|
+
tabType: o,
|
|
11
|
+
isActive: n,
|
|
12
|
+
shouldShowCreateViewNotification: m,
|
|
13
|
+
handleSaveDraft: t
|
|
14
|
+
}) => {
|
|
15
|
+
var s;
|
|
16
|
+
const {
|
|
17
|
+
Filters: { hasUnsavedChanges: l, discardChanges: c, activeViewId: r }
|
|
18
|
+
} = g(), f = window.location.pathname === "/orders" ? "orders" : "variants", { viewsMap: d } = v(), e = r && ((s = d.get(r)) == null ? void 0 : s.label) || "failure";
|
|
19
|
+
return /* @__PURE__ */ u(p, { children: [
|
|
20
|
+
/* @__PURE__ */ i(
|
|
21
|
+
a,
|
|
22
|
+
{
|
|
23
|
+
in: o === "draft" && n && m,
|
|
24
|
+
timeout: 200,
|
|
25
|
+
classNames: "notification",
|
|
26
|
+
unmountOnExit: !0,
|
|
27
|
+
children: /* @__PURE__ */ i(w, { onClick: t, mainEntityLabelPlural: f })
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
o !== "fixed" && e && /* @__PURE__ */ i(
|
|
31
|
+
a,
|
|
32
|
+
{
|
|
33
|
+
in: l && n && o === "saved",
|
|
34
|
+
timeout: 200,
|
|
35
|
+
classNames: "notification",
|
|
36
|
+
unmountOnExit: !0,
|
|
37
|
+
children: /* @__PURE__ */ i(
|
|
38
|
+
x,
|
|
39
|
+
{
|
|
40
|
+
viewName: e,
|
|
41
|
+
onDiscard: () => c(),
|
|
42
|
+
onSaveDraft: t
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
] });
|
|
48
|
+
}
|
|
49
|
+
);
|
|
29
50
|
export {
|
|
30
51
|
F as PillNotifications
|
|
31
52
|
};
|
package/dist/index38.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),d=require("react"),m=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),d=require("react"),m=require("./index77.cjs"),g=require("./index59.cjs"),S=require("./index57.cjs"),b=require("./index3.cjs"),y=require("./index7.cjs"),V=require("./index56.cjs"),p=require("./index10.cjs"),q=()=>{const{VIEW_TYPE:n}=y.useBusinessLogic(),{sortedCustomViews:s,isLoading:u}=S.useViews(),{mutate:a}=g.useCustomViews({type:n}),[c,t]=d.useState(s),{Notifications:{notify:l}}=V.useStores(),w=async o=>{t(o);const r=o.map(e=>e.id);try{await b.patchCurrentUser({user_setting_attributes:{custom_view_positions:{order:r}}}),await a(e=>({...e,settings:{...e.settings,custom_view_positions:{...e.settings.custom_view_positions,order:r}}}),{revalidate:!1})}catch{t(s),l({type:"error",text:"Failed to update order of views"})}};return u||!s.length?null:i.jsx(p.ErrorBoundary,{children:i.jsx(m.LegacySortableViews,{views:c,onChange:w,className:"act-sortable-views"})})};exports.SortableViews=q;
|
package/dist/index38.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as f } from "react";
|
|
3
|
-
import { LegacySortableViews as l } from "./
|
|
3
|
+
import { LegacySortableViews as l } from "./index77.js";
|
|
4
4
|
import { useCustomViews as w } from "./index59.js";
|
|
5
5
|
import { useViews as d } from "./index57.js";
|
|
6
6
|
import { patchCurrentUser as g } from "./index3.js";
|
|
@@ -8,20 +8,7 @@ import { useBusinessLogic as _ } from "./index7.js";
|
|
|
8
8
|
import { useStores as S } from "./index56.js";
|
|
9
9
|
import { ErrorBoundary as b } from "./index10.js";
|
|
10
10
|
const N = () => {
|
|
11
|
-
const {
|
|
12
|
-
VIEW_TYPE: m
|
|
13
|
-
} = _(), {
|
|
14
|
-
sortedCustomViews: s,
|
|
15
|
-
isLoading: a
|
|
16
|
-
} = d(), {
|
|
17
|
-
mutate: n
|
|
18
|
-
} = w({
|
|
19
|
-
type: m
|
|
20
|
-
}), [u, o] = f(s), {
|
|
21
|
-
Notifications: {
|
|
22
|
-
notify: c
|
|
23
|
-
}
|
|
24
|
-
} = S(), p = async (e) => {
|
|
11
|
+
const { VIEW_TYPE: m } = _(), { sortedCustomViews: s, isLoading: a } = d(), { mutate: n } = w({ type: m }), [u, o] = f(s), { Notifications: { notify: c } } = S(), p = async (e) => {
|
|
25
12
|
o(e);
|
|
26
13
|
const i = e.map((t) => t.id);
|
|
27
14
|
try {
|
|
@@ -31,18 +18,19 @@ const N = () => {
|
|
|
31
18
|
order: i
|
|
32
19
|
}
|
|
33
20
|
}
|
|
34
|
-
}), await n(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
21
|
+
}), await n(
|
|
22
|
+
(t) => ({
|
|
23
|
+
...t,
|
|
24
|
+
settings: {
|
|
25
|
+
...t.settings,
|
|
26
|
+
custom_view_positions: {
|
|
27
|
+
...t.settings.custom_view_positions,
|
|
28
|
+
order: i
|
|
29
|
+
}
|
|
41
30
|
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
});
|
|
31
|
+
}),
|
|
32
|
+
{ revalidate: !1 }
|
|
33
|
+
);
|
|
46
34
|
} catch {
|
|
47
35
|
o(s), c({
|
|
48
36
|
type: "error",
|
|
@@ -50,7 +38,14 @@ const N = () => {
|
|
|
50
38
|
});
|
|
51
39
|
}
|
|
52
40
|
};
|
|
53
|
-
return a || !s.length ? null : /* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(
|
|
41
|
+
return a || !s.length ? null : /* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(
|
|
42
|
+
l,
|
|
43
|
+
{
|
|
44
|
+
views: u,
|
|
45
|
+
onChange: p,
|
|
46
|
+
className: "act-sortable-views"
|
|
47
|
+
}
|
|
48
|
+
) });
|
|
54
49
|
};
|
|
55
50
|
export {
|
|
56
51
|
N as SortableViews
|
package/dist/index39.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),s=require("@veeqo/ui"),h=require("mobx-react"),n=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),s=require("@veeqo/ui"),h=require("mobx-react"),n=require("./index80.cjs"),u=require("./index55.cjs"),g=s.theme.colors.secondary.blue.base,v=h.observer(({onDiscard:i,viewName:t,onSaveDraft:c})=>{const{saveChanges:o,isSubmitting:r}=u.usePersistUnsavedChanges(),[d,a]=l.useState(!1);return e.jsx(n.Notification,{children:e.jsx(n.Container,{className:"act-react-listing-custom-notification-unsaved-changes",children:e.jsxs(s.Stack,{direction:"horizontal",alignY:"center",children:[e.jsx(n.Glyph,{name:"attention",color:g}),e.jsxs(n.Wrap,{children:[e.jsx(n.Text,{variant:"body",margin:"0 4px 0 0",children:"You have unsaved changes to"}),e.jsx(n.Bold,{variant:"bodyBoldDark",children:`'${t}'`})]}),e.jsx(n.Button,{className:"act-react-listing-custom-notification-unsaved-changes-discard",onClick:i,size:"sm",children:"Discard changes"}),e.jsxs(s.AnimatedDropdown,{reversed:!0,shouldShowDropdown:d,onClickAway:()=>a(!1),cta:e.jsx(n.Button,{className:"act-react-listing-custom-notification-unsaved-changes-toggle-dropdown",variant:"primary",onClick:()=>a(!0),size:"sm",dropdown:!0,children:"Save changes"}),children:[e.jsx(n.Item,{onClick:c,className:"act-react-listing-custom-notification-unsaved-changes-create-new-view",children:e.jsx(n.Text,{variant:"body",children:"Create new view"})}),e.jsxs(n.Item,{onClick:o,disabled:r,className:"act-react-listing-custom-notification-unsaved-changes-save-to-existing-view",children:[e.jsx(n.Text,{variant:"body",margin:"0 4px 0 0",children:"Save changes to"}),e.jsx(n.Text,{variant:"bodyBoldDark",children:t})]})]})]})})})});exports.UnsavedChangesPill=v;
|
package/dist/index39.js
CHANGED
|
@@ -2,33 +2,74 @@ import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as m } from "react";
|
|
3
3
|
import { Stack as g, theme as u, AnimatedDropdown as v } from "@veeqo/ui";
|
|
4
4
|
import { observer as p } from "mobx-react";
|
|
5
|
-
import { Notification as f, Container as w, Glyph as C, Wrap as b, Text as a, Bold as y, Button as o, Item as r } from "./
|
|
5
|
+
import { Notification as f, Container as w, Glyph as C, Wrap as b, Text as a, Bold as y, Button as o, Item as r } from "./index80.js";
|
|
6
6
|
import { usePersistUnsavedChanges as k } from "./index55.js";
|
|
7
|
-
const S = u.colors.secondary.blue.base, A = p(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
saveChanges: d,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
/* @__PURE__ */ e(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
7
|
+
const S = u.colors.secondary.blue.base, A = p(
|
|
8
|
+
({
|
|
9
|
+
onDiscard: s,
|
|
10
|
+
viewName: i,
|
|
11
|
+
onSaveDraft: c
|
|
12
|
+
}) => {
|
|
13
|
+
const { saveChanges: d, isSubmitting: l } = k(), [h, t] = m(!1);
|
|
14
|
+
return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(w, { className: "act-react-listing-custom-notification-unsaved-changes", children: /* @__PURE__ */ n(g, { direction: "horizontal", alignY: "center", children: [
|
|
15
|
+
/* @__PURE__ */ e(C, { name: "attention", color: S }),
|
|
16
|
+
/* @__PURE__ */ n(b, { children: [
|
|
17
|
+
/* @__PURE__ */ e(a, { variant: "body", margin: "0 4px 0 0", children: "You have unsaved changes to" }),
|
|
18
|
+
/* @__PURE__ */ e(y, { variant: "bodyBoldDark", children: `'${i}'` })
|
|
19
|
+
] }),
|
|
20
|
+
/* @__PURE__ */ e(
|
|
21
|
+
o,
|
|
22
|
+
{
|
|
23
|
+
className: "act-react-listing-custom-notification-unsaved-changes-discard",
|
|
24
|
+
onClick: s,
|
|
25
|
+
size: "sm",
|
|
26
|
+
children: "Discard changes"
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ n(
|
|
30
|
+
v,
|
|
31
|
+
{
|
|
32
|
+
reversed: !0,
|
|
33
|
+
shouldShowDropdown: h,
|
|
34
|
+
onClickAway: () => t(!1),
|
|
35
|
+
cta: /* @__PURE__ */ e(
|
|
36
|
+
o,
|
|
37
|
+
{
|
|
38
|
+
className: "act-react-listing-custom-notification-unsaved-changes-toggle-dropdown",
|
|
39
|
+
variant: "primary",
|
|
40
|
+
onClick: () => t(!0),
|
|
41
|
+
size: "sm",
|
|
42
|
+
dropdown: !0,
|
|
43
|
+
children: "Save changes"
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ e(
|
|
48
|
+
r,
|
|
49
|
+
{
|
|
50
|
+
onClick: c,
|
|
51
|
+
className: "act-react-listing-custom-notification-unsaved-changes-create-new-view",
|
|
52
|
+
children: /* @__PURE__ */ e(a, { variant: "body", children: "Create new view" })
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ n(
|
|
56
|
+
r,
|
|
57
|
+
{
|
|
58
|
+
onClick: d,
|
|
59
|
+
disabled: l,
|
|
60
|
+
className: "act-react-listing-custom-notification-unsaved-changes-save-to-existing-view",
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ e(a, { variant: "body", margin: "0 4px 0 0", children: "Save changes to" }),
|
|
63
|
+
/* @__PURE__ */ e(a, { variant: "bodyBoldDark", children: i })
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
] }) }) });
|
|
71
|
+
}
|
|
72
|
+
);
|
|
32
73
|
export {
|
|
33
74
|
A as UnsavedChangesPill
|
|
34
75
|
};
|
package/dist/index4.js
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import { axios as i } from "./index6.js";
|
|
2
2
|
import { withCSRF as m } from "./index48.js";
|
|
3
3
|
import { vndAPI as p } from "./index49.js";
|
|
4
|
-
const c = (t, {
|
|
5
|
-
attributes: o
|
|
6
|
-
}) => i.patch(`/api/v2/custom_views/${t}`, {
|
|
7
|
-
data: {
|
|
8
|
-
attributes: o,
|
|
9
|
-
type: "custom_view"
|
|
10
|
-
}
|
|
11
|
-
}, m(p));
|
|
4
|
+
const c = (t, { attributes: o }) => i.patch(`/api/v2/custom_views/${t}`, { data: { attributes: o, type: "custom_view" } }, m(p));
|
|
12
5
|
export {
|
|
13
6
|
c as patchCustomView
|
|
14
7
|
};
|
package/dist/index40.js
CHANGED
|
@@ -6,33 +6,83 @@ import { EditDropdown as s } from "./index35.js";
|
|
|
6
6
|
const j = ({
|
|
7
7
|
referenceElement: n,
|
|
8
8
|
tab: e,
|
|
9
|
-
create: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
menu: {
|
|
14
|
-
handleSave: h,
|
|
15
|
-
handleDuplicate: v,
|
|
16
|
-
handleMakeDefault: x,
|
|
17
|
-
closeDropdown: t
|
|
18
|
-
},
|
|
19
|
-
edit: {
|
|
20
|
-
handleShowEditDropdown: S,
|
|
21
|
-
closeEditDropdown: u
|
|
22
|
-
},
|
|
23
|
-
delete: {
|
|
24
|
-
handleShowDeleteConfirmation: d,
|
|
25
|
-
handleDelete: C
|
|
26
|
-
},
|
|
9
|
+
create: { handleCreate: w, closeCreateDropdown: c },
|
|
10
|
+
menu: { handleSave: h, handleDuplicate: v, handleMakeDefault: x, closeDropdown: t },
|
|
11
|
+
edit: { handleShowEditDropdown: S, closeEditDropdown: u },
|
|
12
|
+
delete: { handleShowDeleteConfirmation: d, handleDelete: C },
|
|
27
13
|
shouldShowDropdown: i,
|
|
28
14
|
shouldShowEditDropdown: l,
|
|
29
15
|
shouldShowCreateDropdown: p
|
|
30
16
|
}) => {
|
|
31
17
|
const a = e.isShared ? m.COMPANY : m.PERSONAL;
|
|
32
18
|
return /* @__PURE__ */ D(N, { children: [
|
|
33
|
-
i && /* @__PURE__ */ o(
|
|
34
|
-
|
|
35
|
-
|
|
19
|
+
i && /* @__PURE__ */ o(
|
|
20
|
+
r,
|
|
21
|
+
{
|
|
22
|
+
anchorElement: n,
|
|
23
|
+
placement: "bottom-start",
|
|
24
|
+
onShouldClose: t,
|
|
25
|
+
id: "options-dropdown",
|
|
26
|
+
children: /* @__PURE__ */ o(
|
|
27
|
+
O,
|
|
28
|
+
{
|
|
29
|
+
tab: e,
|
|
30
|
+
onMakeDefault: x,
|
|
31
|
+
onDelete: d,
|
|
32
|
+
onDuplicate: v,
|
|
33
|
+
onEdit: S,
|
|
34
|
+
shouldShowDropdown: i,
|
|
35
|
+
handleCloseDropdown: t
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
l && /* @__PURE__ */ o(
|
|
41
|
+
r,
|
|
42
|
+
{
|
|
43
|
+
anchorElement: n,
|
|
44
|
+
placement: "bottom-start",
|
|
45
|
+
onShouldClose: t,
|
|
46
|
+
id: "edit-dropdown",
|
|
47
|
+
children: /* @__PURE__ */ o(
|
|
48
|
+
s,
|
|
49
|
+
{
|
|
50
|
+
e2ePrefix: "edit-view-dropdown",
|
|
51
|
+
viewName: e.label,
|
|
52
|
+
shouldShowDropdown: l,
|
|
53
|
+
onCloseDropdown: u,
|
|
54
|
+
onSave: h,
|
|
55
|
+
onDelete: C,
|
|
56
|
+
headerText: "Edit view",
|
|
57
|
+
tab: e,
|
|
58
|
+
activeOption: a
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
p && /* @__PURE__ */ o(
|
|
64
|
+
r,
|
|
65
|
+
{
|
|
66
|
+
anchorElement: n,
|
|
67
|
+
placement: "bottom-start",
|
|
68
|
+
onShouldClose: t,
|
|
69
|
+
id: "create-dropdown",
|
|
70
|
+
children: /* @__PURE__ */ o(
|
|
71
|
+
s,
|
|
72
|
+
{
|
|
73
|
+
e2ePrefix: "create-view-dropdown",
|
|
74
|
+
viewName: e.label,
|
|
75
|
+
shouldShowDropdown: p,
|
|
76
|
+
onCloseDropdown: c,
|
|
77
|
+
onSave: w,
|
|
78
|
+
onDelete: d,
|
|
79
|
+
headerText: "Create new view",
|
|
80
|
+
tab: e,
|
|
81
|
+
activeOption: a
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
)
|
|
36
86
|
] });
|
|
37
87
|
};
|
|
38
88
|
export {
|