@adiba-banking-cloud/backoffice 0.2.4 → 0.2.5
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/build/index.cjs.js/{heatmap-BqY-ayOh.js → heatmap-Bha3If2E.js} +1 -1
- package/build/index.cjs.js/{index-Clg3JrJr.js → index-BiOmZHuM.js} +20 -19
- package/build/index.cjs.js/index.js +1 -1
- package/build/index.esm.js/{heatmap-D3ePhBTg.js → heatmap-Dva-F8qJ.js} +1 -1
- package/build/index.esm.js/{index-rnjdI3M1.js → index-BmuCIg-s.js} +20 -19
- package/build/index.esm.js/index.js +1 -1
- package/build/typings/components/panels/simple/Simple.types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -12172,7 +12172,7 @@ const initChart$1 = props => {
|
|
|
12172
12172
|
}
|
|
12173
12173
|
|
|
12174
12174
|
// Fallback: use dynamic import (async, but will work in Vite/Storybook)
|
|
12175
|
-
Promise.resolve().then(function () { return require('./heatmap-
|
|
12175
|
+
Promise.resolve().then(function () { return require('./heatmap-Bha3If2E.js'); }).then(function (n) { return n.heatmap; }).then(heatmapModule => {
|
|
12176
12176
|
const moduleFn = typeof heatmapModule === "function" ? heatmapModule : heatmapModule?.default || heatmapModule;
|
|
12177
12177
|
if (typeof moduleFn === "function") {
|
|
12178
12178
|
moduleFn(Highcharts);
|
|
@@ -12971,49 +12971,50 @@ const SearchPanel = _ref3 => {
|
|
|
12971
12971
|
},
|
|
12972
12972
|
searchText = "Search",
|
|
12973
12973
|
searchState,
|
|
12974
|
+
searchInputValue,
|
|
12974
12975
|
filterFn,
|
|
12975
12976
|
searchFn,
|
|
12976
12977
|
onPillRemove,
|
|
12977
12978
|
children,
|
|
12978
12979
|
...rest
|
|
12979
12980
|
} = _ref3;
|
|
12980
|
-
const [searchPills
|
|
12981
|
-
const [inputValue, setInputValue] = React.useState("");
|
|
12981
|
+
const [searchPills] = searchState || React.useState([]);
|
|
12982
|
+
const [inputValue, setInputValue] = React.useState(searchInputValue || "");
|
|
12982
12983
|
const form$1 = form.useForm({
|
|
12983
12984
|
initialValues: {
|
|
12984
|
-
search: ""
|
|
12985
|
+
search: searchInputValue || ""
|
|
12985
12986
|
}
|
|
12986
12987
|
});
|
|
12987
|
-
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
12991
|
-
|
|
12992
|
-
|
|
12993
|
-
form$1.setFieldValue("search", "");
|
|
12988
|
+
|
|
12989
|
+
// Sync input value with searchInputValue prop
|
|
12990
|
+
React.useEffect(() => {
|
|
12991
|
+
if (searchInputValue !== undefined) {
|
|
12992
|
+
setInputValue(searchInputValue);
|
|
12993
|
+
form$1.setFieldValue("search", searchInputValue);
|
|
12994
12994
|
}
|
|
12995
|
-
};
|
|
12995
|
+
}, [searchInputValue]);
|
|
12996
12996
|
const handleRemovePill = value => {
|
|
12997
|
-
const newPills = searchPills.filter(pill => pill !== value);
|
|
12998
|
-
setSearchPills(newPills);
|
|
12999
12997
|
if (onPillRemove) {
|
|
13000
12998
|
onPillRemove(value);
|
|
13001
12999
|
}
|
|
13002
13000
|
};
|
|
13003
13001
|
const handleSubmit = values => {
|
|
13004
|
-
|
|
13005
|
-
|
|
13006
|
-
|
|
13002
|
+
// On submit, call searchFn with the input value (search term)
|
|
13003
|
+
// Don't add it as a pill - pills are for filters only
|
|
13004
|
+
const searchValue = inputValue.trim();
|
|
13007
13005
|
if (searchFn) {
|
|
13008
13006
|
searchFn({
|
|
13009
|
-
search:
|
|
13007
|
+
search: searchValue ? [searchValue] : []
|
|
13010
13008
|
});
|
|
13011
13009
|
}
|
|
13010
|
+
setInputValue("");
|
|
13011
|
+
form$1.setFieldValue("search", "");
|
|
13012
13012
|
};
|
|
13013
13013
|
const handleKeyDown = event => {
|
|
13014
13014
|
if (event.key === "Enter" && inputValue.trim()) {
|
|
13015
13015
|
event.preventDefault();
|
|
13016
|
-
|
|
13016
|
+
// Trigger form submit which calls searchFn
|
|
13017
|
+
handleSubmit();
|
|
13017
13018
|
} else if (event.key === "Backspace" && inputValue.length === 0 && searchPills.length > 0) {
|
|
13018
13019
|
event.preventDefault();
|
|
13019
13020
|
handleRemovePill(searchPills[searchPills.length - 1]);
|
|
@@ -12151,7 +12151,7 @@ const initChart$1 = props => {
|
|
|
12151
12151
|
}
|
|
12152
12152
|
|
|
12153
12153
|
// Fallback: use dynamic import (async, but will work in Vite/Storybook)
|
|
12154
|
-
import('./heatmap-
|
|
12154
|
+
import('./heatmap-Dva-F8qJ.js').then(function (n) { return n.h; }).then(heatmapModule => {
|
|
12155
12155
|
const moduleFn = typeof heatmapModule === "function" ? heatmapModule : heatmapModule?.default || heatmapModule;
|
|
12156
12156
|
if (typeof moduleFn === "function") {
|
|
12157
12157
|
moduleFn(Highcharts);
|
|
@@ -12950,49 +12950,50 @@ const SearchPanel = _ref3 => {
|
|
|
12950
12950
|
},
|
|
12951
12951
|
searchText = "Search",
|
|
12952
12952
|
searchState,
|
|
12953
|
+
searchInputValue,
|
|
12953
12954
|
filterFn,
|
|
12954
12955
|
searchFn,
|
|
12955
12956
|
onPillRemove,
|
|
12956
12957
|
children,
|
|
12957
12958
|
...rest
|
|
12958
12959
|
} = _ref3;
|
|
12959
|
-
const [searchPills
|
|
12960
|
-
const [inputValue, setInputValue] = useState("");
|
|
12960
|
+
const [searchPills] = searchState || useState([]);
|
|
12961
|
+
const [inputValue, setInputValue] = useState(searchInputValue || "");
|
|
12961
12962
|
const form = useForm({
|
|
12962
12963
|
initialValues: {
|
|
12963
|
-
search: ""
|
|
12964
|
+
search: searchInputValue || ""
|
|
12964
12965
|
}
|
|
12965
12966
|
});
|
|
12966
|
-
|
|
12967
|
-
|
|
12968
|
-
|
|
12969
|
-
|
|
12970
|
-
|
|
12971
|
-
|
|
12972
|
-
form.setFieldValue("search", "");
|
|
12967
|
+
|
|
12968
|
+
// Sync input value with searchInputValue prop
|
|
12969
|
+
React__default.useEffect(() => {
|
|
12970
|
+
if (searchInputValue !== undefined) {
|
|
12971
|
+
setInputValue(searchInputValue);
|
|
12972
|
+
form.setFieldValue("search", searchInputValue);
|
|
12973
12973
|
}
|
|
12974
|
-
};
|
|
12974
|
+
}, [searchInputValue]);
|
|
12975
12975
|
const handleRemovePill = value => {
|
|
12976
|
-
const newPills = searchPills.filter(pill => pill !== value);
|
|
12977
|
-
setSearchPills(newPills);
|
|
12978
12976
|
if (onPillRemove) {
|
|
12979
12977
|
onPillRemove(value);
|
|
12980
12978
|
}
|
|
12981
12979
|
};
|
|
12982
12980
|
const handleSubmit = values => {
|
|
12983
|
-
|
|
12984
|
-
|
|
12985
|
-
|
|
12981
|
+
// On submit, call searchFn with the input value (search term)
|
|
12982
|
+
// Don't add it as a pill - pills are for filters only
|
|
12983
|
+
const searchValue = inputValue.trim();
|
|
12986
12984
|
if (searchFn) {
|
|
12987
12985
|
searchFn({
|
|
12988
|
-
search:
|
|
12986
|
+
search: searchValue ? [searchValue] : []
|
|
12989
12987
|
});
|
|
12990
12988
|
}
|
|
12989
|
+
setInputValue("");
|
|
12990
|
+
form.setFieldValue("search", "");
|
|
12991
12991
|
};
|
|
12992
12992
|
const handleKeyDown = event => {
|
|
12993
12993
|
if (event.key === "Enter" && inputValue.trim()) {
|
|
12994
12994
|
event.preventDefault();
|
|
12995
|
-
|
|
12995
|
+
// Trigger form submit which calls searchFn
|
|
12996
|
+
handleSubmit();
|
|
12996
12997
|
} else if (event.key === "Backspace" && inputValue.length === 0 && searchPills.length > 0) {
|
|
12997
12998
|
event.preventDefault();
|
|
12998
12999
|
handleRemovePill(searchPills[searchPills.length - 1]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ApplicationMenu, o as ApplicationPanel, k as AvatarLabelPanel, B as BasicHeatmap, C as CalendarHeatmap, n as ConnectionPanel, V as DEFAULT_API_TIMEOUT, Q as DEFAULT_PAGE_SIZE, D as DonutChart, z as Drawer, e as DynamicLogo, f as DynamicShigaLogo, E as EqualizerColumn, u as ErrorModal, F as File, d as Icons, v as InfoModal, I as InterpolatedHeatmap, L as LabelPanel, R as MAX_PAGE_SIZE, H as MaskedTilePanel, Y as ModalContentWrapper, M as MultiAxisArea, P as PageTitle, q as PaymentMethod, r as PaymentMethodAdd, j as SearchPanel, h as SideMenu, b as SimpleArea, S as SimpleColumn, G as SimpleForm, w as SimpleModal, i as SimplePanel, s as SimpleTable, l as SimpleText, c as StackedArea, a as StackedColumn, p as SubscriptionPlans, x as SuccessModal, J as TilePanel, m as TitleWithIndex, T as TitledPanel, y as TwoFactorModal, U as UserMenu, X as apiClient, W as createApiClient, _ as extractBetweenBraces, $ as extractOutsideBraces, t as theme, N as useManagedModals, K as useModal, O as useUrlFilters, Z as withProviders } from './index-
|
|
1
|
+
export { A as ApplicationMenu, o as ApplicationPanel, k as AvatarLabelPanel, B as BasicHeatmap, C as CalendarHeatmap, n as ConnectionPanel, V as DEFAULT_API_TIMEOUT, Q as DEFAULT_PAGE_SIZE, D as DonutChart, z as Drawer, e as DynamicLogo, f as DynamicShigaLogo, E as EqualizerColumn, u as ErrorModal, F as File, d as Icons, v as InfoModal, I as InterpolatedHeatmap, L as LabelPanel, R as MAX_PAGE_SIZE, H as MaskedTilePanel, Y as ModalContentWrapper, M as MultiAxisArea, P as PageTitle, q as PaymentMethod, r as PaymentMethodAdd, j as SearchPanel, h as SideMenu, b as SimpleArea, S as SimpleColumn, G as SimpleForm, w as SimpleModal, i as SimplePanel, s as SimpleTable, l as SimpleText, c as StackedArea, a as StackedColumn, p as SubscriptionPlans, x as SuccessModal, J as TilePanel, m as TitleWithIndex, T as TitledPanel, y as TwoFactorModal, U as UserMenu, X as apiClient, W as createApiClient, _ as extractBetweenBraces, $ as extractOutsideBraces, t as theme, N as useManagedModals, K as useModal, O as useUrlFilters, Z as withProviders } from './index-BmuCIg-s.js';
|
|
2
2
|
import '@mantine/modals';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '@mantine/core';
|
|
@@ -21,6 +21,7 @@ export interface SearchPanelProps extends PanelProps {
|
|
|
21
21
|
filterIcon?: IconsProps;
|
|
22
22
|
searchText?: string;
|
|
23
23
|
searchState?: [string[], (value: string[]) => void];
|
|
24
|
+
searchInputValue?: string;
|
|
24
25
|
searchFn?: (value: Record<string, any>) => void;
|
|
25
26
|
filterFn?: () => void;
|
|
26
27
|
onPillRemove?: (value: string) => void;
|
package/package.json
CHANGED