@sparrowengg/integrations-templates-frontend 5.0.12 → 5.0.14
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/cjs/integration-template/components/dashboard/SingleMappingEventWrapper.js +18 -17
- package/dist/cjs/integration-template/components/dashboard/SingleMappingEventWrapper.js.map +1 -1
- package/dist/cjs/node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/refresh.js +154 -0
- package/dist/cjs/node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/refresh.js.map +1 -0
- package/dist/cjs/triggers/components/filter/render-field-value-popover.js +146 -18
- package/dist/cjs/triggers/components/filter/render-field-value-popover.js.map +1 -1
- package/dist/cjs/triggers/constants/index.js.map +1 -1
- package/dist/es/integration-template/components/dashboard/SingleMappingEventWrapper.js +18 -17
- package/dist/es/integration-template/components/dashboard/SingleMappingEventWrapper.js.map +1 -1
- package/dist/es/node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/refresh.js +152 -0
- package/dist/es/node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/refresh.js.map +1 -0
- package/dist/es/triggers/components/filter/render-field-value-popover.js +147 -19
- package/dist/es/triggers/components/filter/render-field-value-popover.js.map +1 -1
- package/dist/es/triggers/constants/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,61 +11,62 @@ const SingleMappingEventWrapper = ({
|
|
|
11
11
|
field,
|
|
12
12
|
isTrigger
|
|
13
13
|
}) => {
|
|
14
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O;
|
|
14
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R;
|
|
15
|
+
console.log("field", field);
|
|
15
16
|
const hasEventSection = !!((_c = (_b = (_a = field == null ? void 0 : field.configurationFields) == null ? void 0 : _a.account) == null ? void 0 : _b.value) == null ? void 0 : _c.label) || !!field.action || !!field.exisitingSheet || !!(field == null ? void 0 : field.configurationFields) || !!field.object && isTrigger;
|
|
16
17
|
console.log("field", field);
|
|
17
18
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, hasEventSection ? /* @__PURE__ */ React.createElement(flex.Flex, { flexDirection: "column", gap: "$6" }, /* @__PURE__ */ React.createElement(text.Text, { size: "sm", weight: "bold", css: { textTransform: "uppercase" } }, dashboardConstants.DASHBOARD_UI_STRINGS.EVENT), /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center" }, /* @__PURE__ */ React.createElement(flex.Flex, { alignItems: "center", gap: "$20" }, !!(field == null ? void 0 : field.object) ? /* @__PURE__ */ React.createElement(
|
|
18
19
|
EventComponent.EventComponent,
|
|
19
20
|
{
|
|
20
21
|
heading: dashboardConstants.DASHBOARD_UI_STRINGS.OBJECT,
|
|
21
|
-
description: field == null ? void 0 : field.object
|
|
22
|
+
description: (_f = (_e = (_d = field == null ? void 0 : field.configuration) == null ? void 0 : _d.object) == null ? void 0 : _e.label) != null ? _f : field == null ? void 0 : field.object
|
|
22
23
|
}
|
|
23
24
|
) : null, !!(field == null ? void 0 : field.action) ? /* @__PURE__ */ React.createElement(
|
|
24
25
|
EventComponent.EventComponent,
|
|
25
26
|
{
|
|
26
27
|
heading: dashboardConstants.DASHBOARD_UI_STRINGS.ACTION,
|
|
27
|
-
description: Array.isArray(field == null ? void 0 : field.action) ? (
|
|
28
|
+
description: Array.isArray(field == null ? void 0 : field.action) ? (_h = (_g = field.action) == null ? void 0 : _g.map((a) => {
|
|
28
29
|
var _a2;
|
|
29
30
|
return typeof a === "object" && a !== null ? (_a2 = a == null ? void 0 : a.label) != null ? _a2 : "" : a != null ? a : "";
|
|
30
|
-
})) == null ? void 0 :
|
|
31
|
+
})) == null ? void 0 : _h.join(", ") : (_j = (_i = field == null ? void 0 : field.action) == null ? void 0 : _i.toLowerCase()) != null ? _j : ""
|
|
31
32
|
}
|
|
32
|
-
) : null), !!((
|
|
33
|
+
) : null), !!((_m = (_l = (_k = field == null ? void 0 : field.configurationFields) == null ? void 0 : _k.account) == null ? void 0 : _l.value) == null ? void 0 : _m.label) ? /* @__PURE__ */ React.createElement(
|
|
33
34
|
EventComponent.EventComponent,
|
|
34
35
|
{
|
|
35
36
|
heading: dashboardConstants.DASHBOARD_UI_STRINGS.ACCOUNT,
|
|
36
|
-
description: (
|
|
37
|
+
description: (_p = (_o = (_n = field == null ? void 0 : field.configurationFields) == null ? void 0 : _n.account) == null ? void 0 : _o.value) == null ? void 0 : _p.label
|
|
37
38
|
}
|
|
38
|
-
) : null, !!((
|
|
39
|
+
) : null, !!((_s = (_r = (_q = field == null ? void 0 : field.configurationFields) == null ? void 0 : _q.object) == null ? void 0 : _r.value) == null ? void 0 : _s.label) ? /* @__PURE__ */ React.createElement(
|
|
39
40
|
EventComponent.EventComponent,
|
|
40
41
|
{
|
|
41
42
|
heading: dashboardConstants.DASHBOARD_UI_STRINGS.OBJECT,
|
|
42
|
-
description: (
|
|
43
|
+
description: (_w = (_v = (_u = (_t = field == null ? void 0 : field.configurationFields) == null ? void 0 : _t.object) == null ? void 0 : _u.value) == null ? void 0 : _v.label) == null ? void 0 : _w.replace(
|
|
43
44
|
/^./,
|
|
44
45
|
(char) => char == null ? void 0 : char.toUpperCase()
|
|
45
46
|
)
|
|
46
47
|
}
|
|
47
|
-
) : null, !!((
|
|
48
|
+
) : null, !!((_y = (_x = field == null ? void 0 : field.configurationFields) == null ? void 0 : _x.action) == null ? void 0 : _y.hasAction) ? /* @__PURE__ */ React.createElement(
|
|
48
49
|
EventComponent.EventComponent,
|
|
49
50
|
{
|
|
50
51
|
hasBorder: true,
|
|
51
52
|
heading: dashboardConstants.DASHBOARD_UI_STRINGS.ACTION,
|
|
52
|
-
description: (
|
|
53
|
+
description: (_B = (_A = (_z = field == null ? void 0 : field.configurationFields) == null ? void 0 : _z.action) == null ? void 0 : _A.value) == null ? void 0 : _B.label
|
|
53
54
|
}
|
|
54
|
-
) : null, !!((
|
|
55
|
+
) : null, !!((_D = (_C = field == null ? void 0 : field.configurationFields) == null ? void 0 : _C.spreadsheet) == null ? void 0 : _D.value) ? /* @__PURE__ */ React.createElement(
|
|
55
56
|
EventComponent.EventComponent,
|
|
56
57
|
{
|
|
57
|
-
hasLink: (
|
|
58
|
+
hasLink: (_E = field == null ? void 0 : field.configurationFields) == null ? void 0 : _E.sheetURL,
|
|
58
59
|
hasBorder: true,
|
|
59
60
|
heading: dashboardConstants.DASHBOARD_UI_STRINGS.SHEET,
|
|
60
|
-
description: typeof ((
|
|
61
|
+
description: typeof ((_F = field == null ? void 0 : field.configurationFields) == null ? void 0 : _F.spreadsheet) === "object" ? (_I = (_H = (_G = field == null ? void 0 : field.configurationFields) == null ? void 0 : _G.spreadsheet) == null ? void 0 : _H.value) == null ? void 0 : _I.label : (_K = (_J = field == null ? void 0 : field.configurationFields) == null ? void 0 : _J.spreadsheet) == null ? void 0 : _K.value
|
|
61
62
|
}
|
|
62
|
-
) : null, !!((
|
|
63
|
+
) : null, !!((_L = field == null ? void 0 : field.configurationFields) == null ? void 0 : _L.reference) ? /* @__PURE__ */ React.createElement(
|
|
63
64
|
EventComponent.EventComponent,
|
|
64
65
|
{
|
|
65
|
-
hasLink: (
|
|
66
|
+
hasLink: (_N = (_M = field == null ? void 0 : field.configurationFields) == null ? void 0 : _M.reference) == null ? void 0 : _N.referenceURL,
|
|
66
67
|
hasBorder: false,
|
|
67
|
-
heading: (
|
|
68
|
-
description: (
|
|
68
|
+
heading: (_P = (_O = field == null ? void 0 : field.configurationFields) == null ? void 0 : _O.reference) == null ? void 0 : _P.title,
|
|
69
|
+
description: (_R = (_Q = field == null ? void 0 : field.configurationFields) == null ? void 0 : _Q.reference) == null ? void 0 : _R.description
|
|
69
70
|
}
|
|
70
71
|
) : null), /* @__PURE__ */ React.createElement(
|
|
71
72
|
box.Box,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleMappingEventWrapper.js","sources":["../../../../../src/integration-template/components/dashboard/SingleMappingEventWrapper.tsx"],"sourcesContent":["import { Box, Flex, Text } from \"@sparrowengg/twigs-react\";\nimport React from \"react\";\nimport { DashboardField } from \"../../../commons/types/enhanced\";\nimport { DASHBOARD_UI_STRINGS } from \"../dashboard-constants\";\nimport { EventComponent } from \"./EventComponent\";\n\ntype SingleMappingEventWrapperProps = {\n field: DashboardField;\n isTrigger?: boolean;\n};\n\nexport const SingleMappingEventWrapper: React.FC<SingleMappingEventWrapperProps> = ({\n field,\n isTrigger,\n}) => {\n const hasEventSection =\n !!(field as any)?.configurationFields?.account?.value?.label ||\n !!(field as any).action ||\n !!(field as any).exisitingSheet ||\n !!(field as any)?.configurationFields ||\n (!!(field as any).object && isTrigger);\n\n console.log(\"field\", field);\n return (\n <>\n {hasEventSection ? (\n <Flex flexDirection=\"column\" gap=\"$6\">\n <Text size=\"sm\" weight=\"bold\" css={{ textTransform: \"uppercase\" }}>\n {DASHBOARD_UI_STRINGS.EVENT}\n </Text>\n <Flex alignItems=\"center\">\n <Flex alignItems=\"center\" gap=\"$20\">\n {!!(field as any)?.object ? (\n <EventComponent\n heading={DASHBOARD_UI_STRINGS.OBJECT}\n description={(field as any)?.object}\n />\n ) : null}\n {!!(field as any)?.action ? (\n <EventComponent\n heading={DASHBOARD_UI_STRINGS.ACTION}\n description={Array.isArray(field?.action)\n ? field.action?.map((a: any) => typeof a === 'object' && a !== null ? a?.label ?? \"\" : a ?? \"\")?.join(\", \")\n : field?.action?.toLowerCase() ?? \"\"}\n />\n ) : null}\n </Flex>\n {!!(field as any)?.configurationFields?.account?.value?.label ? (\n <EventComponent\n heading={DASHBOARD_UI_STRINGS.ACCOUNT}\n description={(field as any)?.configurationFields?.account?.value?.label}\n />\n ) : null}\n {!!(field as any)?.configurationFields?.object?.value?.label ? (\n <EventComponent\n heading={DASHBOARD_UI_STRINGS.OBJECT}\n description={((field as any)?.configurationFields?.object?.value?.label as string)?.replace(\n /^./,\n (char: string) => char?.toUpperCase()\n )}\n />\n ) : null}\n {!!(field as any)?.configurationFields?.action?.hasAction ? (\n <EventComponent\n hasBorder\n heading={DASHBOARD_UI_STRINGS.ACTION}\n description={(field as any)?.configurationFields?.action?.value?.label}\n />\n ) : null}\n {!!(field as any)?.configurationFields?.spreadsheet?.value ? (\n <EventComponent\n hasLink={(field as any)?.configurationFields?.sheetURL as boolean}\n hasBorder\n heading={DASHBOARD_UI_STRINGS.SHEET}\n description={\n typeof (field as any)?.configurationFields?.spreadsheet === \"object\"\n ? (field as any)?.configurationFields?.spreadsheet?.value?.label\n : (field as any)?.configurationFields?.spreadsheet?.value\n }\n />\n ) : null}\n {!!(field as any)?.configurationFields?.reference ? (\n <EventComponent\n hasLink={(field as any)?.configurationFields?.reference?.referenceURL as boolean}\n hasBorder={false}\n heading={(field as any)?.configurationFields?.reference?.title}\n description={(field as any)?.configurationFields?.reference?.description}\n />\n ) : null}\n </Flex>\n <Box\n css={{\n marginBlock: \"$4\",\n height: \"1px\",\n background: \"$neutral100\",\n }}\n />\n </Flex>\n ) : null}\n </>\n );\n};\n\n"],"names":["Flex","Text","DASHBOARD_UI_STRINGS","EventComponent","_a","Box"],"mappings":";;;;;;;;;AAWO,MAAM,4BAAsE,CAAC;AAAA,EAClF,KAAA;AAAA,EACA;AACF,CAAA,KAAM;AAdN,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAA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IACE,IACN,CAAA;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"SingleMappingEventWrapper.js","sources":["../../../../../src/integration-template/components/dashboard/SingleMappingEventWrapper.tsx"],"sourcesContent":["import { Box, Flex, Text } from \"@sparrowengg/twigs-react\";\nimport React from \"react\";\nimport { DashboardField } from \"../../../commons/types/enhanced\";\nimport { DASHBOARD_UI_STRINGS } from \"../dashboard-constants\";\nimport { EventComponent } from \"./EventComponent\";\n\ntype SingleMappingEventWrapperProps = {\n field: DashboardField;\n isTrigger?: boolean;\n};\n\nexport const SingleMappingEventWrapper: React.FC<SingleMappingEventWrapperProps> = ({\n field,\n isTrigger,\n}) => {\n console.log(\"field\", field);\n const hasEventSection =\n !!(field as any)?.configurationFields?.account?.value?.label ||\n !!(field as any).action ||\n !!(field as any).exisitingSheet ||\n !!(field as any)?.configurationFields ||\n (!!(field as any).object && isTrigger);\n\n console.log(\"field\", field);\n return (\n <>\n {hasEventSection ? (\n <Flex flexDirection=\"column\" gap=\"$6\">\n <Text size=\"sm\" weight=\"bold\" css={{ textTransform: \"uppercase\" }}>\n {DASHBOARD_UI_STRINGS.EVENT}\n </Text>\n <Flex alignItems=\"center\">\n <Flex alignItems=\"center\" gap=\"$20\">\n {!!(field as any)?.object ? (\n <EventComponent\n heading={DASHBOARD_UI_STRINGS.OBJECT}\n description={(field as any)?.configuration?.object?.label ?? field?.object}\n />\n ) : null}\n {!!(field as any)?.action ? (\n <EventComponent\n heading={DASHBOARD_UI_STRINGS.ACTION}\n description={Array.isArray(field?.action)\n ? field.action?.map((a: any) => typeof a === 'object' && a !== null ? a?.label ?? \"\" : a ?? \"\")?.join(\", \")\n : field?.action?.toLowerCase() ?? \"\"}\n />\n ) : null}\n </Flex>\n {!!(field as any)?.configurationFields?.account?.value?.label ? (\n <EventComponent\n heading={DASHBOARD_UI_STRINGS.ACCOUNT}\n description={(field as any)?.configurationFields?.account?.value?.label}\n />\n ) : null}\n {!!(field as any)?.configurationFields?.object?.value?.label ? (\n <EventComponent\n heading={DASHBOARD_UI_STRINGS.OBJECT}\n description={((field as any)?.configurationFields?.object?.value?.label as string)?.replace(\n /^./,\n (char: string) => char?.toUpperCase()\n )}\n />\n ) : null}\n {!!(field as any)?.configurationFields?.action?.hasAction ? (\n <EventComponent\n hasBorder\n heading={DASHBOARD_UI_STRINGS.ACTION}\n description={(field as any)?.configurationFields?.action?.value?.label}\n />\n ) : null}\n {!!(field as any)?.configurationFields?.spreadsheet?.value ? (\n <EventComponent\n hasLink={(field as any)?.configurationFields?.sheetURL as boolean}\n hasBorder\n heading={DASHBOARD_UI_STRINGS.SHEET}\n description={\n typeof (field as any)?.configurationFields?.spreadsheet === \"object\"\n ? (field as any)?.configurationFields?.spreadsheet?.value?.label\n : (field as any)?.configurationFields?.spreadsheet?.value\n }\n />\n ) : null}\n {!!(field as any)?.configurationFields?.reference ? (\n <EventComponent\n hasLink={(field as any)?.configurationFields?.reference?.referenceURL as boolean}\n hasBorder={false}\n heading={(field as any)?.configurationFields?.reference?.title}\n description={(field as any)?.configurationFields?.reference?.description}\n />\n ) : null}\n </Flex>\n <Box\n css={{\n marginBlock: \"$4\",\n height: \"1px\",\n background: \"$neutral100\",\n }}\n />\n </Flex>\n ) : null}\n </>\n );\n};\n\n"],"names":["Flex","Text","DASHBOARD_UI_STRINGS","EventComponent","_a","Box"],"mappings":";;;;;;;;;AAWO,MAAM,4BAAsE,CAAC;AAAA,EAClF,KAAA;AAAA,EACA;AACF,CAAA,KAAM;AAdN,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAAA,EAA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CAAA,kBACA,KAAA,CAAA,aAAA;AAAA,IAACE,OAAA;AAAA,IAAA;AAAA,MACC,GAAA,EAAK;AAAA,QACH,WAAA,EAAa,IAAA;AAAA,QACb,MAAA,EAAQ,KAAA;AAAA,QACR,UAAA,EAAY;AAAA;AACd;AAAA,GAEJ,IACE,IACN,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defProps = Object.defineProperties;
|
|
8
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
9
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
const RefreshIcon = /* #__PURE__ */ React.forwardRef(
|
|
38
|
+
(_a, ref) => {
|
|
39
|
+
var _b = _a, {
|
|
40
|
+
color = "currentColor",
|
|
41
|
+
size = 32,
|
|
42
|
+
strokeWidth = 1.5
|
|
43
|
+
} = _b, rest = __objRest(_b, [
|
|
44
|
+
"color",
|
|
45
|
+
"size",
|
|
46
|
+
"strokeWidth"
|
|
47
|
+
]);
|
|
48
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
49
|
+
"svg",
|
|
50
|
+
__spreadProps(__spreadValues({
|
|
51
|
+
viewBox: "0 0 32 32",
|
|
52
|
+
fill: "none",
|
|
53
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
54
|
+
}, rest), {
|
|
55
|
+
width: size,
|
|
56
|
+
height: size,
|
|
57
|
+
ref,
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
+
"path",
|
|
61
|
+
{
|
|
62
|
+
d: "M16 5.33128C19.9069 5.33096 23.5013 7.46656 25.3693 10.8979",
|
|
63
|
+
stroke: color,
|
|
64
|
+
strokeWidth,
|
|
65
|
+
strokeLinecap: "round",
|
|
66
|
+
strokeLinejoin: "round",
|
|
67
|
+
vectorEffect: "non-scaling-stroke"
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
71
|
+
"path",
|
|
72
|
+
{
|
|
73
|
+
d: "M26.6667 15.9979C26.6667 21.889 21.891 26.6646 16 26.6646",
|
|
74
|
+
stroke: color,
|
|
75
|
+
strokeWidth,
|
|
76
|
+
strokeLinecap: "round",
|
|
77
|
+
strokeLinejoin: "round",
|
|
78
|
+
vectorEffect: "non-scaling-stroke"
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
82
|
+
"path",
|
|
83
|
+
{
|
|
84
|
+
d: "M16 26.6646C12.0931 26.6649 8.49866 24.5293 6.63068 21.0979",
|
|
85
|
+
stroke: color,
|
|
86
|
+
strokeWidth,
|
|
87
|
+
strokeLinecap: "round",
|
|
88
|
+
strokeLinejoin: "round",
|
|
89
|
+
vectorEffect: "non-scaling-stroke"
|
|
90
|
+
}
|
|
91
|
+
),
|
|
92
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
93
|
+
"path",
|
|
94
|
+
{
|
|
95
|
+
d: "M5.33334 15.9979C5.33334 10.1069 10.109 5.33126 16 5.33126",
|
|
96
|
+
stroke: color,
|
|
97
|
+
strokeWidth,
|
|
98
|
+
strokeLinecap: "round",
|
|
99
|
+
strokeLinejoin: "round",
|
|
100
|
+
vectorEffect: "non-scaling-stroke"
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
104
|
+
"path",
|
|
105
|
+
{
|
|
106
|
+
d: "M6.63068 21.098C9.44642 26.2725 15.9238 28.1847 21.0984 25.3689C24.5309 23.5011 26.6673 19.9058 26.6667 15.998",
|
|
107
|
+
stroke: color,
|
|
108
|
+
strokeWidth,
|
|
109
|
+
strokeLinecap: "round",
|
|
110
|
+
strokeLinejoin: "round",
|
|
111
|
+
vectorEffect: "non-scaling-stroke"
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
115
|
+
"path",
|
|
116
|
+
{
|
|
117
|
+
d: "M5.33334 15.9979V15.9963C5.33334 10.1053 10.109 5.32963 16 5.32963C19.9078 5.32963 23.5028 7.46653 25.3701 10.8994",
|
|
118
|
+
stroke: color,
|
|
119
|
+
strokeWidth,
|
|
120
|
+
strokeLinecap: "round",
|
|
121
|
+
strokeLinejoin: "round",
|
|
122
|
+
vectorEffect: "non-scaling-stroke"
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
126
|
+
"path",
|
|
127
|
+
{
|
|
128
|
+
d: "M10.7294 21.098H6.01602V25.8126",
|
|
129
|
+
stroke: color,
|
|
130
|
+
strokeWidth,
|
|
131
|
+
strokeLinecap: "round",
|
|
132
|
+
strokeLinejoin: "round",
|
|
133
|
+
vectorEffect: "non-scaling-stroke"
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
137
|
+
"path",
|
|
138
|
+
{
|
|
139
|
+
d: "M21.2707 10.8979H25.984V6.18328",
|
|
140
|
+
stroke: color,
|
|
141
|
+
strokeWidth,
|
|
142
|
+
strokeLinecap: "round",
|
|
143
|
+
strokeLinejoin: "round",
|
|
144
|
+
vectorEffect: "non-scaling-stroke"
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
]
|
|
148
|
+
})
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
|
|
153
|
+
exports.RefreshIcon = RefreshIcon;
|
|
154
|
+
//# sourceMappingURL=refresh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refresh.js","sources":["../../../../../../../../../../node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/refresh.js"],"sourcesContent":["import { jsxs, jsx } from 'react/jsx-runtime';\nimport React from 'react';\n\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\nconst RefreshIcon = /* #__PURE__ */ React.forwardRef(\n (_a, ref) => {\n var _b = _a, {\n color = \"currentColor\",\n size = 32,\n strokeWidth = 1.5\n } = _b, rest = __objRest(_b, [\n \"color\",\n \"size\",\n \"strokeWidth\"\n ]);\n return /* @__PURE__ */ jsxs(\n \"svg\",\n __spreadProps(__spreadValues({\n viewBox: \"0 0 32 32\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), {\n width: size,\n height: size,\n ref,\n children: [\n /* @__PURE__ */ jsx(\n \"path\",\n {\n d: \"M16 5.33128C19.9069 5.33096 23.5013 7.46656 25.3693 10.8979\",\n stroke: color,\n strokeWidth,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n vectorEffect: \"non-scaling-stroke\"\n }\n ),\n /* @__PURE__ */ jsx(\n \"path\",\n {\n d: \"M26.6667 15.9979C26.6667 21.889 21.891 26.6646 16 26.6646\",\n stroke: color,\n strokeWidth,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n vectorEffect: \"non-scaling-stroke\"\n }\n ),\n /* @__PURE__ */ jsx(\n \"path\",\n {\n d: \"M16 26.6646C12.0931 26.6649 8.49866 24.5293 6.63068 21.0979\",\n stroke: color,\n strokeWidth,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n vectorEffect: \"non-scaling-stroke\"\n }\n ),\n /* @__PURE__ */ jsx(\n \"path\",\n {\n d: \"M5.33334 15.9979C5.33334 10.1069 10.109 5.33126 16 5.33126\",\n stroke: color,\n strokeWidth,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n vectorEffect: \"non-scaling-stroke\"\n }\n ),\n /* @__PURE__ */ jsx(\n \"path\",\n {\n d: \"M6.63068 21.098C9.44642 26.2725 15.9238 28.1847 21.0984 25.3689C24.5309 23.5011 26.6673 19.9058 26.6667 15.998\",\n stroke: color,\n strokeWidth,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n vectorEffect: \"non-scaling-stroke\"\n }\n ),\n /* @__PURE__ */ jsx(\n \"path\",\n {\n d: \"M5.33334 15.9979V15.9963C5.33334 10.1053 10.109 5.32963 16 5.32963C19.9078 5.32963 23.5028 7.46653 25.3701 10.8994\",\n stroke: color,\n strokeWidth,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n vectorEffect: \"non-scaling-stroke\"\n }\n ),\n /* @__PURE__ */ jsx(\n \"path\",\n {\n d: \"M10.7294 21.098H6.01602V25.8126\",\n stroke: color,\n strokeWidth,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n vectorEffect: \"non-scaling-stroke\"\n }\n ),\n /* @__PURE__ */ jsx(\n \"path\",\n {\n d: \"M21.2707 10.8979H25.984V6.18328\",\n stroke: color,\n strokeWidth,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n vectorEffect: \"non-scaling-stroke\"\n }\n )\n ]\n })\n );\n }\n);\n\nexport { RefreshIcon };\n//# sourceMappingURL=refresh.js.map\n"],"names":["jsxs","jsx"],"mappings":";;;;;AAGA,IAAI,SAAS,GAAG,MAAM,CAAC,cAAc;AACrC,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB;AACxC,IAAI,iBAAiB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,CAAC,EAAE,oHAAoH;AACrI,cAAc,MAAM,EAAE,KAAK;AAC3B,cAAc,WAAW;AACzB,cAAc,aAAa,EAAE,OAAO;AACpC,cAAc,cAAc,EAAE,OAAO;AACrC,cAAc,YAAY,EAAE;AAC5B;AACA,WAAW;AACX,0BAA0BA,cAAG;AAC7B,YAAY,MAAM;AAClB,YAAY;AACZ,cAAc,CAAC,EAAE,iCAAiC;AAClD,cAAc,MAAM,EAAE,KAAK;AAC3B,cAAc,WAAW;AACzB,cAAc,aAAa,EAAE,OAAO;AACpC,cAAc,cAAc,EAAE,OAAO;AACrC,cAAc,YAAY,EAAE;AAC5B;AACA,WAAW;AACX,0BAA0BA,cAAG;AAC7B,YAAY,MAAM;AAClB,YAAY;AACZ,cAAc,CAAC,EAAE,iCAAiC;AAClD,cAAc,MAAM,EAAE,KAAK;AAC3B,cAAc,WAAW;AACzB,cAAc,aAAa,EAAE,OAAO;AACpC,cAAc,cAAc,EAAE,OAAO;AACrC,cAAc,YAAY,EAAE;AAC5B;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL,EAAE;AACF;;;;","x_google_ignoreList":[0]}
|
|
@@ -7,11 +7,12 @@ var useFieldValuePopover = require('../../hooks/use-field-value-popover.js');
|
|
|
7
7
|
var box = require('../../../node_modules/@sparrowengg/twigs-react/dist/es/box/box.js');
|
|
8
8
|
var text = require('../../../node_modules/@sparrowengg/twigs-react/dist/es/text/text.js');
|
|
9
9
|
var calendar = require('../../../node_modules/@sparrowengg/twigs-react/dist/es/calendar/calendar.js');
|
|
10
|
+
var flex = require('../../../node_modules/@sparrowengg/twigs-react/dist/es/flex/flex.js');
|
|
10
11
|
var input = require('../../../node_modules/@sparrowengg/twigs-react/dist/es/input/input.js');
|
|
11
12
|
var search = require('../../../node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/search.js');
|
|
12
|
-
var flex = require('../../../node_modules/@sparrowengg/twigs-react/dist/es/flex/flex.js');
|
|
13
|
-
var checkbox = require('../../../node_modules/@sparrowengg/twigs-react/dist/es/checkbox/checkbox.js');
|
|
14
13
|
var button = require('../../../node_modules/@sparrowengg/twigs-react/dist/es/button/button.js');
|
|
14
|
+
var refresh = require('../../../node_modules/@sparrowengg/twigs-react-icons/dist/es/icons/refresh.js');
|
|
15
|
+
var checkbox = require('../../../node_modules/@sparrowengg/twigs-react/dist/es/checkbox/checkbox.js');
|
|
15
16
|
var formInput = require('../../../node_modules/@sparrowengg/twigs-react/dist/es/input/form-input.js');
|
|
16
17
|
var formLabel = require('../../../node_modules/@sparrowengg/twigs-react/dist/es/form-label/form-label.js');
|
|
17
18
|
|
|
@@ -42,6 +43,9 @@ const RenderFieldValuePopover = ({
|
|
|
42
43
|
resetEditing,
|
|
43
44
|
setShowPopover
|
|
44
45
|
}) => {
|
|
46
|
+
var _a;
|
|
47
|
+
console.log("currentFilter", currentFilter);
|
|
48
|
+
console.log("fieldOptions", fieldOptions);
|
|
45
49
|
const {
|
|
46
50
|
date,
|
|
47
51
|
setDate,
|
|
@@ -51,13 +55,31 @@ const RenderFieldValuePopover = ({
|
|
|
51
55
|
handleToggleField,
|
|
52
56
|
handleInputChange
|
|
53
57
|
} = useFieldValuePopover.useFieldValuePopover({ currentFilter });
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
);
|
|
58
|
+
const [asyncOptions, setAsyncOptions] = React.useState([]);
|
|
59
|
+
const [isLoadingAsync, setIsLoadingAsync] = React.useState(false);
|
|
60
|
+
const matchedFieldOption = React.useMemo(() => {
|
|
61
|
+
var _a2;
|
|
62
|
+
const fieldValue = typeof currentFilter.field === "object" ? (_a2 = currentFilter.field) == null ? void 0 : _a2.value : currentFilter.field;
|
|
63
|
+
return fieldOptions.find((option) => option.value === fieldValue);
|
|
64
|
+
}, [fieldOptions, currentFilter.field]);
|
|
65
|
+
React.useEffect(() => {
|
|
66
|
+
if (!(matchedFieldOption == null ? void 0 : matchedFieldOption.isAsync) || !(matchedFieldOption == null ? void 0 : matchedFieldOption.asyncHandler))
|
|
67
|
+
return;
|
|
68
|
+
setIsLoadingAsync(true);
|
|
69
|
+
matchedFieldOption.asyncHandler().then((options) => setAsyncOptions(options)).catch(() => setAsyncOptions([])).finally(() => setIsLoadingAsync(false));
|
|
70
|
+
}, [matchedFieldOption == null ? void 0 : matchedFieldOption.value]);
|
|
71
|
+
const field = React.useMemo(() => {
|
|
72
|
+
var _a2;
|
|
73
|
+
const staticOptions = (matchedFieldOption == null ? void 0 : matchedFieldOption.options) || (typeof (currentFilter == null ? void 0 : currentFilter.field) === "object" ? (_a2 = currentFilter.field) == null ? void 0 : _a2.options : void 0) || [];
|
|
74
|
+
if (matchedFieldOption == null ? void 0 : matchedFieldOption.isAsync) {
|
|
75
|
+
const asyncValues = new Set(asyncOptions.map((o) => o.value));
|
|
76
|
+
const dedupedStatic = staticOptions.filter(
|
|
77
|
+
(o) => !asyncValues.has(o.value)
|
|
78
|
+
);
|
|
79
|
+
return [...dedupedStatic, ...asyncOptions];
|
|
80
|
+
}
|
|
81
|
+
return staticOptions;
|
|
82
|
+
}, [matchedFieldOption, (_a = currentFilter == null ? void 0 : currentFilter.field) == null ? void 0 : _a.options, asyncOptions]);
|
|
61
83
|
const filteredOptions = React.useMemo(
|
|
62
84
|
() => field.filter(
|
|
63
85
|
(option) => option.label.toLowerCase().includes(inputValue.toLowerCase())
|
|
@@ -70,7 +92,13 @@ const RenderFieldValuePopover = ({
|
|
|
70
92
|
setShowPopover(false);
|
|
71
93
|
resetEditing();
|
|
72
94
|
},
|
|
73
|
-
[
|
|
95
|
+
[
|
|
96
|
+
setCurrentField,
|
|
97
|
+
currentFilter == null ? void 0 : currentFilter.id,
|
|
98
|
+
filters == null ? void 0 : filters.id,
|
|
99
|
+
setShowPopover,
|
|
100
|
+
resetEditing
|
|
101
|
+
]
|
|
74
102
|
);
|
|
75
103
|
const handleDateApply = React.useCallback(() => {
|
|
76
104
|
handleApplyValue(dayjs_min.default(date).format("MMM D YYYY . hh:mm A"));
|
|
@@ -124,6 +152,17 @@ const RenderFieldValuePopover = ({
|
|
|
124
152
|
}
|
|
125
153
|
));
|
|
126
154
|
}
|
|
155
|
+
if (isLoadingAsync && (currentFilter.dataType === "SELECT" || currentFilter.dataType === "MULTI_SELECT")) {
|
|
156
|
+
return /* @__PURE__ */ React.createElement(
|
|
157
|
+
flex.Flex,
|
|
158
|
+
{
|
|
159
|
+
alignItems: "center",
|
|
160
|
+
justifyContent: "center",
|
|
161
|
+
css: { padding: "$6", minHeight: 80 }
|
|
162
|
+
},
|
|
163
|
+
/* @__PURE__ */ React.createElement(text.Text, { size: "sm", css: { color: "$neutral800" } }, "Loading options...")
|
|
164
|
+
);
|
|
165
|
+
}
|
|
127
166
|
if (field == null ? void 0 : field.length) {
|
|
128
167
|
if (currentFilter.dataType === "SELECT") {
|
|
129
168
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(box.Box, { css: { padding: "$4" } }, /* @__PURE__ */ React.createElement(
|
|
@@ -141,7 +180,6 @@ const RenderFieldValuePopover = ({
|
|
|
141
180
|
{
|
|
142
181
|
flexDirection: "column",
|
|
143
182
|
css: {
|
|
144
|
-
paddingBottom: "$4",
|
|
145
183
|
maxHeight: 240,
|
|
146
184
|
height: "100%",
|
|
147
185
|
overflow: "auto"
|
|
@@ -173,6 +211,51 @@ const RenderFieldValuePopover = ({
|
|
|
173
211
|
}
|
|
174
212
|
},
|
|
175
213
|
"No options"
|
|
214
|
+
),
|
|
215
|
+
(matchedFieldOption == null ? void 0 : matchedFieldOption.hasLoadMore) && /* @__PURE__ */ React.createElement(
|
|
216
|
+
flex.Flex,
|
|
217
|
+
{
|
|
218
|
+
css: {
|
|
219
|
+
position: "sticky",
|
|
220
|
+
bottom: 0,
|
|
221
|
+
background: "$white900",
|
|
222
|
+
paddingBlock: "$4 !important",
|
|
223
|
+
borderRadius: "0 !important",
|
|
224
|
+
borderBottomLeftRadius: "12px !important",
|
|
225
|
+
borderBottomRightRadius: "12px !important"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
/* @__PURE__ */ React.createElement(
|
|
229
|
+
button.Button,
|
|
230
|
+
{
|
|
231
|
+
leftIcon: /* @__PURE__ */ React.createElement(refresh.RefreshIcon, null),
|
|
232
|
+
onClick: async (e) => {
|
|
233
|
+
var _a2;
|
|
234
|
+
setIsLoadingAsync(true);
|
|
235
|
+
const options = await ((_a2 = matchedFieldOption == null ? void 0 : matchedFieldOption.asyncHandler) == null ? void 0 : _a2.call(
|
|
236
|
+
matchedFieldOption,
|
|
237
|
+
"loadMore"
|
|
238
|
+
));
|
|
239
|
+
setAsyncOptions(options);
|
|
240
|
+
setIsLoadingAsync(false);
|
|
241
|
+
e.stopPropagation();
|
|
242
|
+
e.preventDefault();
|
|
243
|
+
},
|
|
244
|
+
css: {
|
|
245
|
+
borderRadius: "0 !important",
|
|
246
|
+
width: "100%",
|
|
247
|
+
"&:hover": {
|
|
248
|
+
borderBottomLeftRadius: "12px !important",
|
|
249
|
+
borderBottomRightRadius: "12px !important"
|
|
250
|
+
},
|
|
251
|
+
overflow: "hidden"
|
|
252
|
+
},
|
|
253
|
+
size: "lg",
|
|
254
|
+
variant: "ghost",
|
|
255
|
+
color: "secondary"
|
|
256
|
+
},
|
|
257
|
+
"Load More"
|
|
258
|
+
)
|
|
176
259
|
)
|
|
177
260
|
));
|
|
178
261
|
}
|
|
@@ -191,8 +274,8 @@ const RenderFieldValuePopover = ({
|
|
|
191
274
|
{
|
|
192
275
|
flexDirection: "column",
|
|
193
276
|
css: {
|
|
194
|
-
paddingBottom:
|
|
195
|
-
maxHeight:
|
|
277
|
+
// paddingBottom: '$4',
|
|
278
|
+
maxHeight: 280,
|
|
196
279
|
height: "100%",
|
|
197
280
|
overflow: "auto"
|
|
198
281
|
}
|
|
@@ -245,21 +328,66 @@ const RenderFieldValuePopover = ({
|
|
|
245
328
|
field2.label
|
|
246
329
|
)
|
|
247
330
|
))
|
|
248
|
-
)), /* @__PURE__ */ React.createElement(
|
|
331
|
+
)), (matchedFieldOption == null ? void 0 : matchedFieldOption.hasLoadMore) && /* @__PURE__ */ React.createElement(
|
|
249
332
|
flex.Flex,
|
|
250
333
|
{
|
|
251
|
-
justifyContent: "flex-end",
|
|
252
334
|
css: {
|
|
253
335
|
position: "sticky",
|
|
254
|
-
bottom:
|
|
336
|
+
bottom: 29,
|
|
337
|
+
background: "$white900",
|
|
255
338
|
paddingBlock: "$4 !important",
|
|
256
|
-
|
|
339
|
+
borderRadius: "0 !important"
|
|
257
340
|
}
|
|
258
341
|
},
|
|
259
342
|
/* @__PURE__ */ React.createElement(
|
|
260
343
|
button.Button,
|
|
261
344
|
{
|
|
262
|
-
|
|
345
|
+
leftIcon: /* @__PURE__ */ React.createElement(refresh.RefreshIcon, null),
|
|
346
|
+
onClick: async (e) => {
|
|
347
|
+
var _a2;
|
|
348
|
+
setIsLoadingAsync(true);
|
|
349
|
+
const options = await ((_a2 = matchedFieldOption == null ? void 0 : matchedFieldOption.asyncHandler) == null ? void 0 : _a2.call(
|
|
350
|
+
matchedFieldOption,
|
|
351
|
+
"loadMore"
|
|
352
|
+
));
|
|
353
|
+
setAsyncOptions(options);
|
|
354
|
+
setIsLoadingAsync(false);
|
|
355
|
+
e.stopPropagation();
|
|
356
|
+
e.preventDefault();
|
|
357
|
+
},
|
|
358
|
+
css: {
|
|
359
|
+
borderRadius: "0 !important",
|
|
360
|
+
width: "100%",
|
|
361
|
+
overflow: "hidden"
|
|
362
|
+
},
|
|
363
|
+
size: "md",
|
|
364
|
+
variant: "ghost",
|
|
365
|
+
color: "secondary"
|
|
366
|
+
},
|
|
367
|
+
"Load More"
|
|
368
|
+
)
|
|
369
|
+
), /* @__PURE__ */ React.createElement(
|
|
370
|
+
flex.Flex,
|
|
371
|
+
{
|
|
372
|
+
css: {
|
|
373
|
+
position: "sticky",
|
|
374
|
+
bottom: 0,
|
|
375
|
+
background: "$white900",
|
|
376
|
+
borderBottomLeftRadius: "12px !important",
|
|
377
|
+
borderBottomRightRadius: "12px !important"
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
/* @__PURE__ */ React.createElement(
|
|
381
|
+
button.Button,
|
|
382
|
+
{
|
|
383
|
+
css: {
|
|
384
|
+
width: "100%",
|
|
385
|
+
overflow: "hidden",
|
|
386
|
+
borderRadius: "0 !important",
|
|
387
|
+
borderBottomLeftRadius: "12px !important",
|
|
388
|
+
borderBottomRightRadius: "12px !important"
|
|
389
|
+
},
|
|
390
|
+
size: "md",
|
|
263
391
|
variant: "ghost",
|
|
264
392
|
color: "primary",
|
|
265
393
|
onClick: handleApplySelected
|