qaema-ui 0.0.13 → 0.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/components/FilterActiveBar.d.ts.map +1 -1
- package/dist/components/FilterActiveBar.js +30 -23
- package/dist/components/PhoneInputField.js +143 -145
- package/dist/components/Sidemenu.d.ts.map +1 -1
- package/dist/components/Sidemenu.js +61 -54
- package/dist/components/Table/Table.styles.d.ts.map +1 -1
- package/dist/components/Table/Table.styles.js +17 -18
- package/dist/components/Table/components/TableHead.js +13 -13
- package/dist/i18n/locales/ar.json.d.ts +2 -1
- package/dist/i18n/locales/ar.json.js +25 -23
- package/dist/i18n/locales/en.json.d.ts +2 -1
- package/dist/i18n/locales/en.json.js +27 -25
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterActiveBar.d.ts","sourceRoot":"","sources":["../../src/lib/components/FilterActiveBar.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAiBxD,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,aAAa,EAAE,UAAU,EAAE,CAAC;IAC5B,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,CAAC;AAIF,QAAA,MAAM,eAAe,GAAI,qCAAqC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"FilterActiveBar.d.ts","sourceRoot":"","sources":["../../src/lib/components/FilterActiveBar.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAiBxD,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,aAAa,EAAE,UAAU,EAAE,CAAC;IAC5B,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,CAAC;AAIF,QAAA,MAAM,eAAe,GAAI,qCAAqC,oBAAoB,4CA2DjF,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,41 +1,48 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
8
|
-
margin-bottom: ${({ theme:
|
|
9
|
-
`,
|
|
1
|
+
import { j as o } from "../_virtual/jsx-runtime.js";
|
|
2
|
+
import { useTranslation as g } from "react-i18next";
|
|
3
|
+
import u from "styled-components";
|
|
4
|
+
import y from "../hooks/useBadgeVariant.js";
|
|
5
|
+
import N from "./Badge.js";
|
|
6
|
+
import j from "./Typography.js";
|
|
7
|
+
const B = u.div`
|
|
8
|
+
margin-bottom: ${({ theme: s }) => s.spacing.l};
|
|
9
|
+
`, b = u.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-wrap: wrap;
|
|
12
12
|
gap: 8px;
|
|
13
|
-
`,
|
|
14
|
-
const { t:
|
|
15
|
-
|
|
16
|
-
},
|
|
17
|
-
|
|
13
|
+
`, F = ({ fields: s, activeFilters: d, onRemove: p }) => {
|
|
14
|
+
const { t: m } = g(), f = y("default"), h = (e) => {
|
|
15
|
+
p(e);
|
|
16
|
+
}, v = (e) => {
|
|
17
|
+
var i, c;
|
|
18
|
+
const r = s.find((t) => t.accessor === e.fieldName);
|
|
18
19
|
if (!r) return e.value;
|
|
19
|
-
|
|
20
|
+
let a = e.value;
|
|
21
|
+
if (r.type === "select") {
|
|
22
|
+
const t = (c = (i = r == null ? void 0 : r.options) == null ? void 0 : i.filter((n) => typeof n.value == "number" ? n.value === Number(a) : n.value === a)) == null ? void 0 : c[0];
|
|
23
|
+
if (!t) return e.value;
|
|
24
|
+
a = t == null ? void 0 : t.label;
|
|
25
|
+
}
|
|
26
|
+
const l = (t, n, x) => /* @__PURE__ */ o.jsxs(j, { variant: "span", color: f.color, children: [
|
|
20
27
|
t,
|
|
21
28
|
" ",
|
|
22
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ o.jsx("strong", { children: m(x) }),
|
|
23
30
|
" ",
|
|
24
|
-
|
|
31
|
+
n
|
|
25
32
|
] });
|
|
26
33
|
switch (e.operator) {
|
|
27
34
|
case "=":
|
|
28
|
-
return
|
|
35
|
+
return l(r.header, a, "LBL_IS");
|
|
29
36
|
case "like":
|
|
30
|
-
return
|
|
37
|
+
return l(r.header, a, "CONTAINS");
|
|
31
38
|
case "between":
|
|
32
|
-
return
|
|
39
|
+
return l(r.header, a, "BETWEEN");
|
|
33
40
|
default:
|
|
34
|
-
return
|
|
41
|
+
return l(r.header, a, "LBL_IS");
|
|
35
42
|
}
|
|
36
43
|
};
|
|
37
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ o.jsx(B, { children: /* @__PURE__ */ o.jsx(b, { children: d.map((e) => s.find((a) => a.accessor === e.fieldName) ? /* @__PURE__ */ o.jsx(N, { onClose: () => h(e.fieldName), children: v(e) }, e.fieldName) : null) }) });
|
|
38
45
|
};
|
|
39
46
|
export {
|
|
40
|
-
|
|
47
|
+
F as default
|
|
41
48
|
};
|