@layers-app/shared 0.2.6 → 0.2.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/AppContainer/components/AppSidebarButton.d.ts +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppSidebarButton.js +4 -4
- package/dist/components/AppContainer/components/AppsSidebar/AppsSection.js +22 -22
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.d.ts.map +1 -1
- package/dist/components/AppContainer/components/AppsSidebar/TopSection.js +25 -25
- package/dist/components/AppContainer/components/AppsSidebar/UserSection.js +41 -41
- package/dist/components/AppContainer/components/menus/HelpMenu/HelpMenu.js +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainer.js +40 -37
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts.map +1 -1
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.js +3 -2
- package/dist/components/AppContainer/types.d.ts +1 -0
- package/dist/components/AppContainer/types.d.ts.map +1 -1
- package/dist/components/FormViewer/components/OneSlideLayput.js +39 -37
- package/dist/components/FormViewer/hooks/useCreateFormContext.d.ts.map +1 -1
- package/dist/components/FormViewer/hooks/useCreateFormContext.js +10 -10
- package/dist/components/FormViewer/store/formStoreApi.js +13 -13
- package/dist/components/ImageCropper/ImageCropper.d.ts.map +1 -1
- package/dist/components/ImageCropper/ImageCropper.js +185 -183
- package/dist/components/LanguagePicker/LanguagePicker.d.ts.map +1 -1
- package/dist/components/LanguagePicker/LanguagePicker.js +41 -32
- package/dist/components/LanguagePicker/LanguagePicker.module.css.js +6 -4
- package/dist/components/NavMenu/components/NavMenuItem.d.ts.map +1 -1
- package/dist/components/NavMenu/components/NavMenuItem.js +53 -50
- package/dist/components/NavMenu/types.d.ts +1 -0
- package/dist/components/NavMenu/types.d.ts.map +1 -1
- package/dist/components/SocialLinkRow/index.d.ts.map +1 -1
- package/dist/components/SocialLinkRow/index.js +80 -58
- package/dist/components/TimezonePicker/index.d.ts.map +1 -1
- package/dist/components/TimezonePicker/index.js +42 -41
- package/dist/components/UserAvatar/index.d.ts.map +1 -1
- package/dist/components/UserAvatar/index.js +11 -10
- package/dist/components/WorkspaceMenu/WorkspaceItem.js +1 -1
- package/dist/helpers/showFeatureFeedback.d.ts +16 -0
- package/dist/helpers/showFeatureFeedback.d.ts.map +1 -0
- package/dist/helpers/showFeatureFeedback.js +109 -0
- package/dist/helpers/showFeatureFeedback.module.css.js +9 -0
- package/dist/helpers/showNotifications.d.ts.map +1 -1
- package/dist/helpers/showNotifications.js +81 -113
- package/dist/helpers/showNotifications.module.css.js +10 -10
- package/dist/hooks/useFeatureFeedback.d.ts +23 -0
- package/dist/hooks/useFeatureFeedback.d.ts.map +1 -0
- package/dist/hooks/useFeatureFeedback.js +48 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +322 -310
- package/dist/lib/layersVisitData.d.ts +13 -0
- package/dist/lib/layersVisitData.d.ts.map +1 -0
- package/dist/lib/layersVisitData.js +37 -0
- package/package.json +1 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsx as e, jsxs as s, Fragment as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { Stack as
|
|
5
|
-
import { AnimatePresence as
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { memo as h } from "react";
|
|
3
|
+
import { createPortal as u } from "react-dom";
|
|
4
|
+
import { Stack as b, Flex as y } from "@mantine/core";
|
|
5
|
+
import { AnimatePresence as v, motion as k } from "framer-motion";
|
|
6
6
|
import { Copyright as S } from "../../Copyright/index.js";
|
|
7
7
|
import { animations as w } from "../helpers/slides.js";
|
|
8
|
-
import { useFormViewerStore as
|
|
9
|
-
import { startStepReselect as
|
|
10
|
-
import { Navigation as
|
|
11
|
-
import { getImageFilter as
|
|
8
|
+
import { useFormViewerStore as d } from "../store/formStore.js";
|
|
9
|
+
import { startStepReselect as x, themeReselect as F } from "../store/selectors.js";
|
|
10
|
+
import { Navigation as $ } from "./Navigation/Navigation.js";
|
|
11
|
+
import { getImageFilter as R, Step as j } from "./Step.js";
|
|
12
12
|
import { ProgressLine as A } from "./fields/ProgressLine.js";
|
|
13
13
|
import g from "../FormViewer.module.css.js";
|
|
14
14
|
import { useSteps as C } from "../hooks/useCreateFormContext.js";
|
|
15
|
-
import { useFormMobile as
|
|
15
|
+
import { useFormMobile as M } from "../hooks/useFormMobile.js";
|
|
16
16
|
import { useActiveStep as N } from "../hooks/useActiveStep.js";
|
|
17
|
-
const
|
|
17
|
+
const U = ({
|
|
18
18
|
NoStepSlot: m,
|
|
19
19
|
copyright: l
|
|
20
20
|
}) => {
|
|
21
|
-
const { useStore: a } =
|
|
22
|
-
return a(
|
|
23
|
-
|
|
21
|
+
const { useStore: a } = d();
|
|
22
|
+
return a(x) ? /* @__PURE__ */ e(P, { copyright: l }) : /* @__PURE__ */ e(
|
|
23
|
+
b,
|
|
24
24
|
{
|
|
25
25
|
align: "center",
|
|
26
26
|
justify: "center",
|
|
@@ -31,11 +31,11 @@ const T = ({
|
|
|
31
31
|
children: /* @__PURE__ */ e(m, {})
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
|
-
}, P =
|
|
35
|
-
const { anim: l } = C(), { ref: a } =
|
|
36
|
-
return /* @__PURE__ */ s(
|
|
37
|
-
|
|
38
|
-
/* @__PURE__ */ s(
|
|
34
|
+
}, P = h(({ copyright: m }) => {
|
|
35
|
+
const { anim: l } = C(), { ref: a, isMobile: o } = M(), { useStore: c } = d(), r = c((n) => n.config.settings), f = c((n) => n.editing), t = c(F), i = N();
|
|
36
|
+
return /* @__PURE__ */ s(p, { children: [
|
|
37
|
+
u(
|
|
38
|
+
/* @__PURE__ */ s(p, { children: [
|
|
39
39
|
/* @__PURE__ */ e(
|
|
40
40
|
"link",
|
|
41
41
|
{
|
|
@@ -70,7 +70,7 @@ const T = ({
|
|
|
70
70
|
"--bg-fit": t.background?.fit || "cover",
|
|
71
71
|
"--bg-image": t.background?.image ? `url(${t.background.image})` : "none",
|
|
72
72
|
"--bg-color": t.background?.color || "none",
|
|
73
|
-
"--bg-image-filter":
|
|
73
|
+
"--bg-image-filter": R({
|
|
74
74
|
brightness: t.background?.brightness || 100,
|
|
75
75
|
blur: t.background?.blur,
|
|
76
76
|
layout: "background"
|
|
@@ -78,7 +78,7 @@ const T = ({
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
),
|
|
81
|
-
/* @__PURE__ */ e(
|
|
81
|
+
/* @__PURE__ */ e(v, { mode: "wait", children: i && /* @__PURE__ */ e(
|
|
82
82
|
k.div,
|
|
83
83
|
{
|
|
84
84
|
style: {
|
|
@@ -91,43 +91,45 @@ const T = ({
|
|
|
91
91
|
transition: {
|
|
92
92
|
duration: 0.25
|
|
93
93
|
},
|
|
94
|
-
...w[
|
|
94
|
+
...w[r.slideAnimation][l],
|
|
95
95
|
animate: { opacity: 1, y: 0, x: 0 },
|
|
96
96
|
children: /* @__PURE__ */ e(
|
|
97
|
-
|
|
97
|
+
j,
|
|
98
98
|
{
|
|
99
|
-
step:
|
|
100
|
-
theme:
|
|
99
|
+
step: i,
|
|
100
|
+
theme: i.theme
|
|
101
101
|
},
|
|
102
|
-
|
|
102
|
+
i.id
|
|
103
103
|
)
|
|
104
104
|
},
|
|
105
|
-
|
|
105
|
+
i.id
|
|
106
106
|
) })
|
|
107
107
|
] }),
|
|
108
108
|
/* @__PURE__ */ s(
|
|
109
|
-
|
|
109
|
+
y,
|
|
110
110
|
{
|
|
111
|
-
pos: "absolute",
|
|
112
|
-
bottom: 24,
|
|
113
|
-
right: 24,
|
|
114
|
-
|
|
111
|
+
pos: o ? "relative" : "absolute",
|
|
112
|
+
bottom: o ? void 0 : 24,
|
|
113
|
+
right: o ? void 0 : 24,
|
|
114
|
+
justify: o ? "flex-end" : void 0,
|
|
115
|
+
p: o ? "8px 12px" : void 0,
|
|
116
|
+
onClick: f ? (n) => n.preventDefault() : void 0,
|
|
115
117
|
children: [
|
|
116
|
-
|
|
118
|
+
r.copyright && /* @__PURE__ */ e(
|
|
117
119
|
S,
|
|
118
120
|
{
|
|
119
121
|
size: "sm",
|
|
120
|
-
color:
|
|
122
|
+
color: i?.theme?.primaryColor,
|
|
121
123
|
title: m
|
|
122
124
|
}
|
|
123
125
|
),
|
|
124
|
-
|
|
126
|
+
r.navArrows && r.layout === "slides" && /* @__PURE__ */ e($, {})
|
|
125
127
|
]
|
|
126
128
|
}
|
|
127
129
|
),
|
|
128
|
-
|
|
130
|
+
r.progressBar && /* @__PURE__ */ e(A, {})
|
|
129
131
|
] });
|
|
130
132
|
});
|
|
131
133
|
export {
|
|
132
|
-
|
|
134
|
+
U as OneSlideLayout
|
|
133
135
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateFormContext.d.ts","sourceRoot":"","sources":["../../../../src/components/FormViewer/hooks/useCreateFormContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,iBAAiB,EAAW,MAAM,eAAe,CAAC;AAO3D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,KAAK,YAAY,GAAG;IAClB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,iBAAiB,CAAC,eAAe,CAAC,CAAC;IACzC,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACrE,CAAC;AAEF,eAAO,MAAM,Y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MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;CACpD,CAAC;AA2GF,kEAAkE;AAClE,eAAO,MAAM,mBAAmB,GAAI,wBAGjC,iBAAiB,CAAC,yBAAyB,CAAC,4CAK9C,CAAC"}
|
|
@@ -34,26 +34,26 @@ const d = h(
|
|
|
34
34
|
}) => {
|
|
35
35
|
const { useStore: a, api: i } = A(), { currentSteps: l } = a(T), n = j(), [f, p] = b("next"), { getValidation: x } = y(), r = E({
|
|
36
36
|
initialValues: l?.reduce(
|
|
37
|
-
(
|
|
38
|
-
|
|
39
|
-
}),
|
|
37
|
+
(o, e) => (e.controls?.forEach((t) => {
|
|
38
|
+
o[t.id] = w[t.controlType];
|
|
39
|
+
}), o),
|
|
40
40
|
{
|
|
41
41
|
submissionId: crypto.randomUUID()
|
|
42
42
|
}
|
|
43
43
|
),
|
|
44
|
-
validate: l?.reduce((
|
|
44
|
+
validate: l?.reduce((o, e) => (e.controls?.forEach((t) => o[t.id] = x(t)), o), {}),
|
|
45
45
|
onValuesChange: u
|
|
46
46
|
}), c = m(() => {
|
|
47
47
|
if (!n || (n.controls || []).map((t) => r.validateField(t.id)).some((t) => t.hasError)) return;
|
|
48
|
-
const
|
|
49
|
-
p("next"), setTimeout(() => {
|
|
50
|
-
i.setActiveStepId(
|
|
51
|
-
}, 0),
|
|
48
|
+
const e = g(n, l, r);
|
|
49
|
+
p("next"), e && setTimeout(() => {
|
|
50
|
+
i.setActiveStepId(e.id);
|
|
51
|
+
}, 0), e?.isEnd && (s?.(r.getValues()), new F().addConfetti());
|
|
52
52
|
}, [n, i, l, r, s]), S = m(() => {
|
|
53
53
|
p("prev"), setTimeout(() => i.backActiveStep(), 0);
|
|
54
54
|
}, [i]), v = m(
|
|
55
|
-
(
|
|
56
|
-
r.setFieldValue(
|
|
55
|
+
(o, e) => {
|
|
56
|
+
r.setFieldValue(o, e), n?.autoSubmit && c();
|
|
57
57
|
},
|
|
58
58
|
[n?.autoSubmit, r, c]
|
|
59
59
|
);
|
|
@@ -6,11 +6,11 @@ const O = (e) => {
|
|
|
6
6
|
...t,
|
|
7
7
|
...n
|
|
8
8
|
}));
|
|
9
|
-
},
|
|
10
|
-
e.getState().onConfigChange?.(
|
|
9
|
+
}, l = () => e.getState().config, s = () => {
|
|
10
|
+
e.getState().onConfigChange?.(l());
|
|
11
11
|
}, u = (n) => {
|
|
12
12
|
e.setState({ layout: n });
|
|
13
|
-
},
|
|
13
|
+
}, m = (n) => {
|
|
14
14
|
e.setState((t) => ({
|
|
15
15
|
...t,
|
|
16
16
|
config: {
|
|
@@ -122,7 +122,7 @@ const O = (e) => {
|
|
|
122
122
|
steps: o
|
|
123
123
|
}
|
|
124
124
|
};
|
|
125
|
-
}),
|
|
125
|
+
}), S(n.id), s();
|
|
126
126
|
}, A = (n) => {
|
|
127
127
|
e.setState((i) => ({
|
|
128
128
|
...i,
|
|
@@ -130,7 +130,7 @@ const O = (e) => {
|
|
|
130
130
|
...i.config,
|
|
131
131
|
steps: i.config.steps.filter((o) => o.id !== n) || []
|
|
132
132
|
}
|
|
133
|
-
})), E(e.getState()) === n &&
|
|
133
|
+
})), E(e.getState()) === n && h(), s();
|
|
134
134
|
}, F = (n, t) => {
|
|
135
135
|
n === "list" ? e.setState((i) => ({
|
|
136
136
|
...i,
|
|
@@ -291,7 +291,7 @@ const O = (e) => {
|
|
|
291
291
|
...o,
|
|
292
292
|
initialConfigSnapshot: n
|
|
293
293
|
})), t || s();
|
|
294
|
-
},
|
|
294
|
+
}, S = (n) => {
|
|
295
295
|
e.setState((t) => {
|
|
296
296
|
const i = [
|
|
297
297
|
...t.activeStep.history.slice(0, t.activeStep.current + 1),
|
|
@@ -324,10 +324,10 @@ const O = (e) => {
|
|
|
324
324
|
)
|
|
325
325
|
}
|
|
326
326
|
}));
|
|
327
|
-
},
|
|
327
|
+
}, h = () => {
|
|
328
328
|
e.setState({
|
|
329
329
|
activeStep: {
|
|
330
|
-
history: [],
|
|
330
|
+
history: [null],
|
|
331
331
|
current: 0
|
|
332
332
|
}
|
|
333
333
|
});
|
|
@@ -343,7 +343,7 @@ const O = (e) => {
|
|
|
343
343
|
})), s();
|
|
344
344
|
},
|
|
345
345
|
setLayout: u,
|
|
346
|
-
patchSettingsData:
|
|
346
|
+
patchSettingsData: m,
|
|
347
347
|
patchThemeData: C,
|
|
348
348
|
patchContainerTheme: y,
|
|
349
349
|
patchTitleProperties: b,
|
|
@@ -363,19 +363,19 @@ const O = (e) => {
|
|
|
363
363
|
removeCondition: V,
|
|
364
364
|
setIsMobile: _,
|
|
365
365
|
setConfig: $,
|
|
366
|
-
setActiveStepId:
|
|
366
|
+
setActiveStepId: S,
|
|
367
367
|
setFormLayout: (n) => {
|
|
368
|
-
|
|
368
|
+
m({ layout: n }), s();
|
|
369
369
|
},
|
|
370
370
|
scrollToControl: (n) => {
|
|
371
371
|
const t = document.querySelector(`[data-control-id='${n}']`);
|
|
372
372
|
t && t.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
373
373
|
},
|
|
374
|
-
getConfig:
|
|
374
|
+
getConfig: l,
|
|
375
375
|
setProps: r,
|
|
376
376
|
forwardActiveStep: z,
|
|
377
377
|
backActiveStep: j,
|
|
378
|
-
resetActiveStep:
|
|
378
|
+
resetActiveStep: h
|
|
379
379
|
};
|
|
380
380
|
};
|
|
381
381
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageCropper.d.ts","sourceRoot":"","sources":["../../../src/components/ImageCropper/ImageCropper.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,CAAC,YAAY,EAAE,IAAI,KAAK,IAAI,CAAC;IAC9C,gBAA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