@veeqo/transfigure 1.2.4 → 1.2.6
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.cjs +1 -1
- package/dist/index.js +158 -157
- package/dist/index100.cjs +11 -18
- package/dist/index100.js +12 -20
- package/dist/index101.cjs +1 -1
- package/dist/index101.js +37 -14
- package/dist/index102.cjs +1 -1
- package/dist/index102.js +29 -21
- package/dist/index103.cjs +19 -1
- package/dist/index103.js +24 -38
- package/dist/index104.cjs +1 -1
- package/dist/index104.js +21 -29
- package/dist/index105.cjs +1 -12
- package/dist/index105.js +15 -16
- package/dist/index106.cjs +1 -80
- package/dist/index106.js +24 -101
- package/dist/index107.cjs +80 -1
- package/dist/index107.js +101 -19
- package/dist/index108.cjs +1 -1
- package/dist/index108.js +18 -7
- package/dist/index109.cjs +1 -1
- package/dist/index109.js +7 -63
- package/dist/index110.cjs +1 -1
- package/dist/index110.js +60 -26
- package/dist/index111.cjs +1 -1
- package/dist/index111.js +30 -2
- package/dist/index113.cjs +1 -1
- package/dist/index113.js +2 -36
- package/dist/index114.cjs +1 -1
- package/dist/index114.js +32 -22
- package/dist/index115.cjs +1 -1
- package/dist/index115.js +25 -62
- package/dist/index116.cjs +1 -7
- package/dist/index116.js +63 -10
- package/dist/index118.cjs +7 -0
- package/dist/index118.js +12 -0
- package/dist/index2.cjs +1 -1
- package/dist/index2.js +3 -2
- 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 +39 -38
- 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/index42.cjs +1 -1
- package/dist/index42.js +1 -1
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +1 -1
- 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/index68.cjs +1 -1
- package/dist/index68.js +114 -114
- package/dist/index78.cjs +1 -1
- package/dist/index78.js +22 -19
- package/dist/index79.cjs +1 -1
- package/dist/index79.js +7 -5
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +1 -1
- package/dist/index84.cjs +1 -1
- package/dist/index84.js +1 -1
- package/dist/index85.cjs +1 -1
- package/dist/index85.js +1 -1
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +116 -39
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +19 -9
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +39 -116
- package/dist/index90.cjs +1 -1
- package/dist/index90.js +9 -19
- package/dist/index91.cjs +1 -1
- package/dist/index91.js +13 -7
- package/dist/index92.cjs +104 -1
- package/dist/index92.js +120 -13
- package/dist/index93.cjs +1 -104
- package/dist/index93.js +65 -117
- package/dist/index94.cjs +1 -1
- package/dist/index94.js +24 -63
- package/dist/index95.cjs +1 -1
- package/dist/index95.js +2 -29
- package/dist/index96.cjs +1 -1
- package/dist/index96.js +41 -2
- package/dist/index97.cjs +1 -1
- package/dist/index97.js +9 -39
- package/dist/index98.cjs +1 -1
- package/dist/index98.js +17 -10
- package/dist/index99.cjs +1 -1
- package/dist/index99.js +6 -23
- package/dist/storybookHelpers/apiMocks/views/custom_views.d.ts +7 -0
- package/dist/types.d.ts +14 -0
- package/dist/utils/getViewTheme/getViewTheme.d.ts +21 -0
- package/dist/utils/getViewTheme/getViewTheme.test.d.ts +1 -0
- package/dist/utils/getViewTheme/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index97.js
CHANGED
|
@@ -1,43 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const {
|
|
9
|
-
Filters: {
|
|
10
|
-
activeViewId: e
|
|
11
|
-
},
|
|
12
|
-
Notifications: {
|
|
13
|
-
notify: t
|
|
1
|
+
const a = (t, r) => {
|
|
2
|
+
if (!r) return t;
|
|
3
|
+
const i = r.toLowerCase();
|
|
4
|
+
return t.filter(
|
|
5
|
+
(e) => {
|
|
6
|
+
var s, C;
|
|
7
|
+
return ((s = e == null ? void 0 : e.title) == null ? void 0 : s.toLowerCase().includes(i)) || ((C = e == null ? void 0 : e.id) == null ? void 0 : C.toLowerCase().includes(i));
|
|
14
8
|
}
|
|
15
|
-
|
|
16
|
-
return {
|
|
17
|
-
saveColumns: async ({ visibleColumns: n }) => {
|
|
18
|
-
if (e)
|
|
19
|
-
try {
|
|
20
|
-
if (o(!0), n.length < 1) {
|
|
21
|
-
t({ type: "error", text: "You must have at least one visible column." });
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
const r = [...a, ...n, ...i], { arg: f, currentView: s } = c(), p = {
|
|
25
|
-
...f,
|
|
26
|
-
columns: {
|
|
27
|
-
...s == null ? void 0 : s.columns,
|
|
28
|
-
columnIds: r
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
await h(e, { attributes: p }), await m(), u(), t({ type: "success", text: "Columns updated successfully" });
|
|
32
|
-
} catch {
|
|
33
|
-
t({ type: "error", text: "Failed to save columns" });
|
|
34
|
-
} finally {
|
|
35
|
-
o(!1);
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
isSavingColumns: l
|
|
39
|
-
};
|
|
9
|
+
);
|
|
40
10
|
};
|
|
41
11
|
export {
|
|
42
|
-
|
|
12
|
+
a as filterColumnsBySearch
|
|
43
13
|
};
|
package/dist/index98.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 t=require("@veeqo/ui"),r=require("./index2.cjs"),s=o=>{let e={colourPalette:t.theme.colors.secondary.blue,customTextColour:void 0};switch(o){case r.ViewStatusTypes.ERROR:e={colourPalette:t.theme.colors.secondary.red,customTextColour:void 0};break}return e};exports.getViewTheme=s;
|
package/dist/index98.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { theme as o } from "@veeqo/ui";
|
|
2
|
+
import { ViewStatusTypes as r } from "./index2.js";
|
|
3
|
+
const l = (t) => {
|
|
4
|
+
let e = {
|
|
5
|
+
colourPalette: o.colors.secondary.blue,
|
|
6
|
+
customTextColour: void 0
|
|
7
|
+
};
|
|
8
|
+
switch (t) {
|
|
9
|
+
case r.ERROR:
|
|
10
|
+
e = {
|
|
11
|
+
colourPalette: o.colors.secondary.red,
|
|
12
|
+
customTextColour: void 0
|
|
13
|
+
};
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
return e;
|
|
10
17
|
};
|
|
11
18
|
export {
|
|
12
|
-
|
|
19
|
+
l as getViewTheme
|
|
13
20
|
};
|
package/dist/index99.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("./index79.cjs"),e=i.createAllView(),t={fixedViews:[e],customViews:[],viewsMap:new Map([[e.id,e]])};exports.INITIAL_VIEWS_STATE=t;
|
package/dist/index99.js
CHANGED
|
@@ -1,26 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
style: s,
|
|
7
|
-
className: f
|
|
8
|
-
}) => {
|
|
9
|
-
const r = a(null), [i, c] = d(0);
|
|
10
|
-
return m(() => {
|
|
11
|
-
const e = r.current, n = () => {
|
|
12
|
-
if (e) {
|
|
13
|
-
const { top: u } = e.getBoundingClientRect();
|
|
14
|
-
c(u);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
n();
|
|
18
|
-
const t = new ResizeObserver(n);
|
|
19
|
-
return e && t.observe(e), () => {
|
|
20
|
-
e && t.unobserve(e), t.disconnect();
|
|
21
|
-
};
|
|
22
|
-
}, []), /* @__PURE__ */ p(v, { style: s, className: f, offset: i, ref: r, children: o });
|
|
1
|
+
import { createAllView as i } from "./index79.js";
|
|
2
|
+
const e = i(), s = {
|
|
3
|
+
fixedViews: [e],
|
|
4
|
+
customViews: [],
|
|
5
|
+
viewsMap: /* @__PURE__ */ new Map([[e.id, e]])
|
|
23
6
|
};
|
|
24
7
|
export {
|
|
25
|
-
|
|
8
|
+
s as INITIAL_VIEWS_STATE
|
|
26
9
|
};
|
|
@@ -26,6 +26,7 @@ export declare const custom_views: {
|
|
|
26
26
|
columns: {
|
|
27
27
|
columnIds: string[];
|
|
28
28
|
};
|
|
29
|
+
view_attributes?: undefined;
|
|
29
30
|
} | {
|
|
30
31
|
id: string;
|
|
31
32
|
title: string;
|
|
@@ -53,6 +54,7 @@ export declare const custom_views: {
|
|
|
53
54
|
columns: {
|
|
54
55
|
columnIds: string[];
|
|
55
56
|
};
|
|
57
|
+
view_attributes?: undefined;
|
|
56
58
|
} | {
|
|
57
59
|
id: string;
|
|
58
60
|
title: string;
|
|
@@ -86,6 +88,7 @@ export declare const custom_views: {
|
|
|
86
88
|
columns: {
|
|
87
89
|
columnIds: string[];
|
|
88
90
|
};
|
|
91
|
+
view_attributes?: undefined;
|
|
89
92
|
} | {
|
|
90
93
|
id: string;
|
|
91
94
|
title: string;
|
|
@@ -115,6 +118,9 @@ export declare const custom_views: {
|
|
|
115
118
|
created_at: string;
|
|
116
119
|
updated_at: string;
|
|
117
120
|
editable: boolean;
|
|
121
|
+
view_attributes: {
|
|
122
|
+
type: string;
|
|
123
|
+
};
|
|
118
124
|
company_id: number;
|
|
119
125
|
columns: {
|
|
120
126
|
columnIds?: undefined;
|
|
@@ -152,5 +158,6 @@ export declare const custom_views: {
|
|
|
152
158
|
columns: {
|
|
153
159
|
columnIds?: undefined;
|
|
154
160
|
};
|
|
161
|
+
view_attributes?: undefined;
|
|
155
162
|
})[];
|
|
156
163
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -70,6 +70,9 @@ type ViewFilters = {
|
|
|
70
70
|
filter?: OrderFilter | InventoryFilter;
|
|
71
71
|
sort?: string;
|
|
72
72
|
};
|
|
73
|
+
export declare enum ViewStatusTypes {
|
|
74
|
+
ERROR = "error"
|
|
75
|
+
}
|
|
73
76
|
export type View = {
|
|
74
77
|
id: string;
|
|
75
78
|
type: ViewType;
|
|
@@ -83,6 +86,9 @@ export type View = {
|
|
|
83
86
|
created_at: string;
|
|
84
87
|
updated_at: string;
|
|
85
88
|
editable: boolean;
|
|
89
|
+
view_attributes?: {
|
|
90
|
+
type: ViewStatusTypes;
|
|
91
|
+
};
|
|
86
92
|
};
|
|
87
93
|
export type FilterMaps = {
|
|
88
94
|
filters: Map<string, string>;
|
|
@@ -107,6 +113,14 @@ export type TransformedView = {
|
|
|
107
113
|
isShared: boolean;
|
|
108
114
|
originalView?: TransformedView;
|
|
109
115
|
columns: ViewColumns;
|
|
116
|
+
colourPalette: {
|
|
117
|
+
lightest: string;
|
|
118
|
+
light: string;
|
|
119
|
+
base: string;
|
|
120
|
+
dark: string;
|
|
121
|
+
darkest: string;
|
|
122
|
+
};
|
|
123
|
+
customTextColour?: string;
|
|
110
124
|
};
|
|
111
125
|
export type ViewsState = {
|
|
112
126
|
fixedViews: TransformedView[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ViewStatusTypes } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns a view theme configuration based on the provided view status.
|
|
4
|
+
*
|
|
5
|
+
* @param type - The current view status used to determine which theme
|
|
6
|
+
* colours to apply (for example, an error state).
|
|
7
|
+
* @returns An object describing the theme for the view, including
|
|
8
|
+
* {@code colourPalette}, which provides the base colour palette for
|
|
9
|
+
* the view, and {@code customTextColour}, an optional override for
|
|
10
|
+
* the default text colour.
|
|
11
|
+
*/
|
|
12
|
+
export declare const getViewTheme: (type: ViewStatusTypes) => {
|
|
13
|
+
colourPalette: {
|
|
14
|
+
lightest: string;
|
|
15
|
+
light: string;
|
|
16
|
+
base: string;
|
|
17
|
+
dark: string;
|
|
18
|
+
darkest: string;
|
|
19
|
+
};
|
|
20
|
+
customTextColour: string | undefined;
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getViewTheme } from './getViewTheme';
|