@fluxo-dev/shell 0.0.44 → 0.0.46

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/package.json CHANGED
@@ -1,22 +1,23 @@
1
1
  {
2
2
  "name": "@fluxo-dev/shell",
3
- "version": "0.0.44",
3
+ "version": "0.0.46",
4
4
  "peerDependencies": {
5
5
  "react": "^18.3.1",
6
6
  "@mantine/core": "^7.12.2",
7
7
  "react-router-dom": "^6.11.2",
8
8
  "react-redux": "^8.0.5",
9
9
  "@reduxjs/toolkit": "^1.9.1",
10
- "@fluxo-dev/api-client-base": "^0.0.44",
11
- "@fluxo-dev/shell-bi": "^0.0.44",
12
- "@fluxo-dev/shell-hub": "^0.0.44",
13
- "@fluxo-dev/shell-korebi": "^0.0.44",
14
- "@fluxo-dev/shell-mfe": "^0.0.44",
15
- "@fluxo-dev/shell-printing": "^0.0.44",
16
- "@fluxo-dev/shell-reporting": "^0.0.44",
17
- "@fluxo-dev/shell-workflow": "^0.0.44",
18
- "@fluxo-dev/state": "^0.0.44",
19
- "@fluxo-dev/ui-components": "^0.0.44"
10
+ "@fluxo-dev/api-client-base": "^0.0.46",
11
+ "@fluxo-dev/shell-bi": "^0.0.46",
12
+ "@fluxo-dev/shell-hub": "^0.0.46",
13
+ "@fluxo-dev/shell-korebi": "^0.0.46",
14
+ "@fluxo-dev/shell-mfe": "^0.0.46",
15
+ "@fluxo-dev/shell-printing": "^0.0.46",
16
+ "@fluxo-dev/shell-reporting": "^0.0.46",
17
+ "@fluxo-dev/shell-workflow": "^0.0.46",
18
+ "@fluxo-dev/state": "^0.0.46",
19
+ "@fluxo-dev/ui-components": "^0.0.46",
20
+ "@scalar/api-reference-react": "^0.3.142"
20
21
  },
21
22
  "module": "./index.esm.js",
22
23
  "type": "module",
@@ -1,5 +1,5 @@
1
- import { ShellFrontend } from "@fluxo-dev/shell";
2
1
  import '@scalar/api-reference-react/style.css';
2
+ import { ShellFrontend } from "../../app";
3
3
  export interface SettingsProps {
4
4
  pluginEndpoint: string;
5
5
  frontends: ShellFrontend[];
@@ -1,222 +0,0 @@
1
- import { d as defineComponent, ap as w, aq as Te, c as computed, U as openBlock, $ as createBlock, ac as withCtx, Z as createBaseVNode, G as unref, a2 as createCommentVNode, ar as useRouter, aX as useRoute, k as onMounted, ak as onBeforeUnmount, W as createVNode, V as createElementBlock, F as Fragment, aa as renderList, a1 as c, a3 as normalizeClass, ad as createTextVNode, ab as toDisplayString, a6 as withDirectives, a9 as vShow, bC as cookieSchema } from './index.esm2.js';
2
- import { _ as _$1, p, e as m, g } from './SidebarButton.vue.esm.js';
3
- import { a, b as a$1 } from './SidebarListElement.vue.esm.js';
4
- import { x, a as a$2 } from './ViewLayoutContent.vue.esm.js';
5
- import { E } from './Form.vue.esm.js';
6
- import { a as a$3 } from './useSidebar.esm.js';
7
- import 'react/jsx-runtime';
8
- import 'react';
9
- import 'react-redux';
10
- import 'react-router-dom';
11
- import '@fluxo-dev/ui-components';
12
- import '@fluxo-dev/shell-mfe';
13
- import '@mantine/core';
14
- import '@fluxo-dev/shell-ravify';
15
- import '@fluxo-dev/state';
16
- import '@mantine/hooks';
17
- import '@mantine/spotlight';
18
- import '@fluxo-dev/api-client-base';
19
- import '@mantine/notifications';
20
- import 'react-dom';
21
- import '@mantine/form';
22
- import '@mantine/dates';
23
- import '@mantine/dropzone';
24
- import '@fluxo-dev/shell-reporting';
25
- import '@fluxo-dev/shell-workflow';
26
- import '@fluxo-dev/shell-bi';
27
- import '@fluxo-dev/shell-hub';
28
- import '@fluxo-dev/shell-printing';
29
- import 'node:crypto';
30
- import 'util';
31
- import './DataTableInput.vue.esm.js';
32
-
33
- const y$1 = { class: "flex items-center pointer-events-none" }, _ = ["value"], F = /* @__PURE__ */ defineComponent({
34
- __name: "CookieForm",
35
- setup(b) {
36
- const { activeCookieId: o } = w(), { cookies: n, cookieMutators: i } = Te(), s = [
37
- { label: "Key", key: "key", placeholder: "Username" },
38
- { label: "Value", key: "value", placeholder: "123" },
39
- { label: "Domain", key: "domain", placeholder: "scalar.com" },
40
- { label: "Path", key: "path", placeholder: "/" },
41
- { label: "Expires", key: "expires", placeholder: "Tomorrow" },
42
- { label: "Secure", key: "secure", placeholder: "True/False" },
43
- { label: "HttpOnly", key: "httpOnly", placeholder: "True/False" }
44
- ], l = computed(
45
- () => n[o.value] || {}
46
- ), a = (r, e) => {
47
- o.value && i.edit(o.value, r, e);
48
- };
49
- return (r, e) => (openBlock(), createBlock(E, {
50
- data: l.value,
51
- onUpdate: a,
52
- options: s
53
- }, {
54
- title: withCtx(() => [
55
- createBaseVNode("div", y$1, [
56
- e[1] || (e[1] = createBaseVNode("label", {
57
- class: "absolute w-full h-full top-0 left-0 pointer-events-auto opacity-0 cursor-text",
58
- for: "cookiename"
59
- }, null, -1)),
60
- createBaseVNode("input", {
61
- id: "cookiename",
62
- class: "md:pl-1 outline-none border-0 text-c-2 rounded pointer-events-auto relative w-full",
63
- placeholder: "Cookie Name",
64
- value: l.value.name,
65
- onInput: e[0] || (e[0] = (c) => a("name", c.target.value))
66
- }, null, 40, _)
67
- ])
68
- ]),
69
- _: 1
70
- }, 8, ["data"]));
71
- }
72
- });
73
-
74
- const y = /* @__PURE__ */ defineComponent({
75
- __name: "CookieRaw",
76
- setup(d) {
77
- const { activeCookieId: o } = w(), { cookies: m } = Te();
78
- return (k, t) => (openBlock(), createBlock(p, null, {
79
- title: withCtx(() => t[0] || (t[0] = [
80
- createBaseVNode("span", null, "Raw Cookie String", -1)
81
- ])),
82
- default: withCtx(() => [
83
- unref(o) && unref(m)[unref(o)] ? (openBlock(), createBlock(_$1, {
84
- key: 0,
85
- class: "pl-px pr-2 md:px-2 py-2.5",
86
- lineNumbers: "",
87
- modelValue: ""
88
- })) : createCommentVNode("", !0)
89
- ]),
90
- _: 1
91
- }));
92
- }
93
- });
94
-
95
- const X = { class: "flex-1" }, Y = ["onClick"], Z = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, ee = ["onClick"], te = { class: "before:bg-border before:pointer-events-none before:z-1 before:absolute before:left-[calc(1.75rem_-_1.5px)] before:top-0 before:h-[calc(100%_+_.5px)] last:before:h-full before:w-[.5px] mb-[.5px] last:mb-0 relative" }, xe = /* @__PURE__ */ defineComponent({
96
- __name: "Cookies",
97
- setup(oe) {
98
- const { cookies: p, cookieMutators: v, events: g$1 } = Te(), { collapsedSidebarFolders: i, toggleSidebarFolder: y$1 } = a$3(), b = useRouter(), L = useRoute(), C = () => {
99
- const t = Object.keys(p).length, e = cookieSchema.parse({
100
- name: `Cookie ${t}`,
101
- value: "",
102
- domain: "example.com",
103
- path: "/",
104
- secure: !1,
105
- httpOnly: !1,
106
- sameSite: "None"
107
- });
108
- v.add(e), b.push(e.uid);
109
- }, V = (t) => {
110
- v.delete(t);
111
- const e = Object.values(p).filter(
112
- (o) => o.uid !== t
113
- );
114
- if (e.length > 1) {
115
- const o = e[e.length - 1];
116
- b.push(o.uid);
117
- } else e.length === 1 && e[0].uid === "default" && b.push("default");
118
- }, h = computed(() => {
119
- const t = {};
120
- return Object.values(p).forEach((e) => {
121
- e.domain && e.path && (t[e.domain] || (t[e.domain] = {}), t[e.domain][e.path] || (t[e.domain][e.path] = []), t[e.domain][e.path].push(e));
122
- }), t;
123
- }), w = (t) => i[t], S = (t) => {
124
- t != null && t.createNew && L.name === "cookies" && C();
125
- };
126
- return onMounted(() => {
127
- const t = Object.keys(h.value), e = Object.entries(h.value).flatMap(
128
- ([o, r]) => Object.keys(r).map((d) => o + d)
129
- );
130
- t.forEach((o) => {
131
- i[o] = !0;
132
- }), e.forEach((o) => {
133
- i[o] = !0;
134
- }), g$1.hotKeys.on(S);
135
- }), onBeforeUnmount(() => g$1.hotKeys.off(S)), (t, e) => (openBlock(), createBlock(a$2, null, {
136
- default: withCtx(() => [
137
- createVNode(unref(m), { title: "Cookies" }, {
138
- content: withCtx(() => [
139
- createBaseVNode("div", X, [
140
- createVNode(a, null, {
141
- default: withCtx(() => [
142
- (openBlock(!0), createElementBlock(Fragment, null, renderList(h.value, (o, r) => (openBlock(), createElementBlock("div", { key: r }, [
143
- createBaseVNode("button", {
144
- class: "flex font-medium gap-1.5 items-center px-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
145
- type: "button",
146
- onClick: (d) => unref(y$1)(r)
147
- }, [
148
- createVNode(unref(c), {
149
- class: normalizeClass(["text-c-3", {
150
- "rotate-90": unref(i)[r]
151
- }]),
152
- icon: "ChevronRight",
153
- size: "sm",
154
- thickness: "2.5"
155
- }, null, 8, ["class"]),
156
- createTextVNode(" " + toDisplayString(r), 1)
157
- ], 8, Y),
158
- withDirectives(createBaseVNode("div", Z, [
159
- (openBlock(!0), createElementBlock(Fragment, null, renderList(o, (d, c$1) => (openBlock(), createElementBlock("div", { key: c$1 }, [
160
- createBaseVNode("button", {
161
- class: "flex font-medium gap-1.5 items-center pl-5 pr-2 py-1.5 text-left text-sm w-full break-words rounded hover:bg-b-2",
162
- type: "button",
163
- onClick: (u) => unref(y$1)(r + c$1)
164
- }, [
165
- createVNode(unref(c), {
166
- class: normalizeClass(["text-c-3", {
167
- "rotate-90": unref(i)[r + c$1]
168
- }]),
169
- icon: "ChevronRight",
170
- size: "sm",
171
- thickness: "2.5"
172
- }, null, 8, ["class"]),
173
- createTextVNode(" " + toDisplayString(c$1), 1)
174
- ], 8, ee),
175
- withDirectives(createBaseVNode("div", te, [
176
- (openBlock(!0), createElementBlock(Fragment, null, renderList(d, (u) => (openBlock(), createBlock(a$1, {
177
- key: u.uid,
178
- class: "cookie text-xs",
179
- variable: { name: u.name, uid: u.uid },
180
- warningMessage: "Are you sure you want to delete this cookie?",
181
- onDelete: (re) => V(u.uid)
182
- }, null, 8, ["variable", "onDelete"]))), 128))
183
- ], 512), [
184
- [vShow, w(r + c$1)]
185
- ])
186
- ]))), 128))
187
- ], 512), [
188
- [vShow, w(r)]
189
- ])
190
- ]))), 128))
191
- ]),
192
- _: 1
193
- })
194
- ])
195
- ]),
196
- button: withCtx(() => [
197
- createVNode(g, {
198
- click: C,
199
- hotkey: "N"
200
- }, {
201
- title: withCtx(() => e[0] || (e[0] = [
202
- createTextVNode("Add Cookie")
203
- ])),
204
- _: 1
205
- })
206
- ]),
207
- _: 1
208
- }),
209
- createVNode(x, { class: "flex-1" }, {
210
- default: withCtx(() => [
211
- createVNode(F),
212
- createVNode(y)
213
- ]),
214
- _: 1
215
- })
216
- ]),
217
- _: 1
218
- }));
219
- }
220
- });
221
-
222
- export { xe as default };
@@ -1,157 +0,0 @@
1
- import { d as defineComponent, U as openBlock, V as createElementBlock, Z as createBaseVNode, _ as renderSlot, a2 as createCommentVNode, a3 as normalizeClass, X as normalizeStyle, $ as createBlock, ac as withCtx, bf as resolveDynamicComponent, ao as s$1, r as ref, c as computed, F as Fragment, aj as mergeProps, G as unref, aQ as w } from './index.esm2.js';
2
- import { O, _ } from './SidebarButton.vue.esm.js';
3
-
4
- const i$1 = {
5
- key: 0,
6
- class: "sr-only"
7
- }, f = /* @__PURE__ */ defineComponent({
8
- __name: "DataTable",
9
- props: {
10
- columns: {},
11
- scroll: { type: Boolean }
12
- },
13
- setup(p) {
14
- return (o, u) => (openBlock(), createElementBlock("div", {
15
- class: normalizeClass(["border-1/2 rounded bg-b-1", o.scroll ? "overflow-x-auto custom-scroll" : "overflow-visible"])
16
- }, [
17
- createBaseVNode("table", {
18
- class: normalizeClass(["grid auto-rows-auto min-h-8 mb-0", { "min-w-full w-max": o.scroll }]),
19
- style: normalizeStyle({
20
- gridTemplateColumns: o.columns.map((t) => t || "1fr").join(" ")
21
- })
22
- }, [
23
- o.$slots.caption ? (openBlock(), createElementBlock("caption", i$1, [
24
- renderSlot(o.$slots, "caption")
25
- ])) : createCommentVNode("", !0),
26
- renderSlot(o.$slots, "default")
27
- ], 6)
28
- ], 2));
29
- }
30
- });
31
-
32
- const m$1 = /* @__PURE__ */ defineComponent({
33
- __name: "DataTableCell",
34
- props: {
35
- is: { default: "td" }
36
- },
37
- setup(s) {
38
- return (e, d) => (openBlock(), createBlock(resolveDynamicComponent(e.is), {
39
- class: "min-h-8 min-w-8 border-l-0 border-t-0 border-b-1/2 border-r-1/2 flex text-sm last:border-r-0 group-last:border-b-transparent p-0 m-0 relative",
40
- role: "cell"
41
- }, {
42
- default: withCtx(() => [
43
- renderSlot(e.$slots, "default")
44
- ]),
45
- _: 3
46
- }));
47
- }
48
- });
49
-
50
- const c = {}, s = { class: "group contents w-fit min-w-full" };
51
- function l(t, a) {
52
- return openBlock(), createElementBlock("tr", s, [
53
- renderSlot(t.$slots, "default")
54
- ]);
55
- }
56
- const i = /* @__PURE__ */ s$1(c, [["render", l]]);
57
-
58
- const A = {
59
- key: 0,
60
- class: "text-c-1 flex min-w-[94px] items-center pl-2 pr-0"
61
- }, I = { class: "row-1 overflow-x-auto" }, E = ["id", "readOnly", "type", "value"], F = {
62
- key: 2,
63
- class: "absolute centered-y right-2 pt-px text-xxs text-c-3 bg-b-1 shadow-[-8px_0_4px_var(--scalar-background-1)] opacity-100 duration-150 transition-opacity peer-has-[:focus-visible]:opacity-0"
64
- }, S = {
65
- key: 1,
66
- class: "absolute centered-y right-7 text-orange text-xs"
67
- }, U = /* @__PURE__ */ defineComponent({
68
- inheritAttrs: !1,
69
- __name: "DataTableInput",
70
- props: {
71
- id: {},
72
- type: {},
73
- containerClass: {},
74
- required: { type: Boolean, default: !1 },
75
- modelValue: {},
76
- canAddCustomEnumValue: { type: Boolean, default: !0 },
77
- readOnly: { type: Boolean, default: !1 },
78
- enum: {},
79
- min: {},
80
- max: {}
81
- },
82
- emits: ["update:modelValue", "inputFocus", "inputBlur", "selectVariable"],
83
- setup(y, { emit: c }) {
84
- const o = y, s = c, n = ref(!0);
85
- ref("");
86
- const v = ref(!1), w$1 = () => {
87
- v.value || s("inputBlur");
88
- }, m = computed(
89
- () => o.type === "password" ? n.value ? "password" : "text" : o.type ?? "text"
90
- );
91
- return (e, t) => (openBlock(), createBlock(m$1, {
92
- class: normalizeClass(["relative row", e.containerClass])
93
- }, {
94
- default: withCtx(() => [
95
- e.$slots.default ? (openBlock(), createElementBlock("div", A, [
96
- renderSlot(e.$slots, "default", {}, void 0, !0)
97
- ])) : createCommentVNode("", !0),
98
- createBaseVNode("div", I, [
99
- o.enum && o.enum.length ? (openBlock(), createBlock(O, {
100
- key: 0,
101
- canAddCustomValue: e.canAddCustomEnumValue,
102
- modelValue: o.modelValue,
103
- value: o.enum,
104
- "onUpdate:modelValue": t[0] || (t[0] = (a) => s("update:modelValue", a))
105
- }, null, 8, ["canAddCustomValue", "modelValue", "value"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
106
- n.value && e.type === "password" ? (openBlock(), createElementBlock("input", mergeProps({ key: 0 }, e.$attrs, {
107
- id: e.id,
108
- autocomplete: "off",
109
- class: "border-none text-c-1 disabled:text-c-2 min-w-0 w-full peer px-2 py-1.25 -outline-offset-2",
110
- "data-1p-ignore": "",
111
- readOnly: e.readOnly,
112
- spellcheck: "false",
113
- type: m.value,
114
- value: e.modelValue,
115
- onInput: t[1] || (t[1] = (a) => s(
116
- "update:modelValue",
117
- a.target.value ?? ""
118
- ))
119
- }), null, 16, E)) : (openBlock(), createBlock(_, mergeProps({ key: 1 }, e.$attrs, {
120
- id: e.id,
121
- class: "border-none text-c-1 disabled:text-c-2 min-w-0 w-full peer",
122
- disableCloseBrackets: "",
123
- disableTabIndent: "",
124
- max: e.max,
125
- min: e.min,
126
- modelValue: e.modelValue ?? "",
127
- readOnly: e.readOnly,
128
- required: e.required,
129
- spellcheck: "false",
130
- type: m.value,
131
- onBlur: w$1,
132
- onFocus: t[2] || (t[2] = (a) => s("inputFocus")),
133
- "onUpdate:modelValue": t[3] || (t[3] = (a) => s("update:modelValue", a))
134
- }), null, 16, ["id", "max", "min", "modelValue", "readOnly", "required", "type"])),
135
- e.required ? (openBlock(), createElementBlock("div", F, " Required ")) : createCommentVNode("", !0)
136
- ], 64))
137
- ]),
138
- e.$slots.warning ? (openBlock(), createElementBlock("div", S, [
139
- renderSlot(e.$slots, "warning", {}, void 0, !0)
140
- ])) : createCommentVNode("", !0),
141
- renderSlot(e.$slots, "icon", {}, void 0, !0),
142
- e.type === "password" ? (openBlock(), createBlock(unref(w), {
143
- key: 2,
144
- class: "-ml-.5 mr-1 h-6 w-6 self-center p-1.5",
145
- icon: n.value ? "Show" : "Hide",
146
- label: n.value ? "Show Password" : "Hide Password",
147
- onClick: t[4] || (t[4] = (a) => n.value = !n.value)
148
- }, null, 8, ["icon", "label"])) : createCommentVNode("", !0)
149
- ]),
150
- _: 3
151
- }, 8, ["class"]));
152
- }
153
- });
154
-
155
- const m = /* @__PURE__ */ s$1(U, [["__scopeId", "data-v-8574d822"]]);
156
-
157
- export { m as a, f, i, m$1 as m };