@bigbinary/neeto-molecules 5.12.2 → 5.12.4
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/utils--UetkMZG.js +108 -0
- package/dist/cjs/utils--UetkMZG.js.map +1 -0
- package/dist/cjs/v2/AuditLogs.js +3 -0
- package/dist/cjs/v2/AuditLogs.js.map +1 -1
- package/dist/cjs/v2/EmailForm.js +3 -0
- package/dist/cjs/v2/EmailForm.js.map +1 -1
- package/dist/cjs/v2/FloatingActionMenu.js +1 -0
- package/dist/cjs/v2/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/v2/Header.js +4 -1
- package/dist/cjs/v2/Header.js.map +1 -1
- package/dist/cjs/v2/KeyboardShortcuts.js +9 -98
- package/dist/cjs/v2/KeyboardShortcuts.js.map +1 -1
- package/dist/cjs/v2/ProductEmbed.js +2 -0
- package/dist/cjs/v2/ProductEmbed.js.map +1 -1
- package/dist/cjs/v2/Search.js +65 -5
- package/dist/cjs/v2/Search.js.map +1 -1
- package/dist/cjs/v2/Settings.js +4 -0
- package/dist/cjs/v2/Settings.js.map +1 -1
- package/dist/cjs/v2/ShareViaLink.js +3 -1
- package/dist/cjs/v2/ShareViaLink.js.map +1 -1
- package/dist/cjs/v2/Taxonomy.js +3 -0
- package/dist/cjs/v2/Taxonomy.js.map +1 -1
- package/dist/utils-DKya4HZS.js +102 -0
- package/dist/utils-DKya4HZS.js.map +1 -0
- package/dist/v2/AuditLogs.js +3 -0
- package/dist/v2/AuditLogs.js.map +1 -1
- package/dist/v2/EmailForm.js +3 -0
- package/dist/v2/EmailForm.js.map +1 -1
- package/dist/v2/FloatingActionMenu.js +1 -0
- package/dist/v2/FloatingActionMenu.js.map +1 -1
- package/dist/v2/Header.js +4 -1
- package/dist/v2/Header.js.map +1 -1
- package/dist/v2/KeyboardShortcuts.js +4 -93
- package/dist/v2/KeyboardShortcuts.js.map +1 -1
- package/dist/v2/ProductEmbed.js +2 -0
- package/dist/v2/ProductEmbed.js.map +1 -1
- package/dist/v2/Search.js +67 -7
- package/dist/v2/Search.js.map +1 -1
- package/dist/v2/Settings.js +4 -0
- package/dist/v2/Settings.js.map +1 -1
- package/dist/v2/ShareViaLink.js +3 -1
- package/dist/v2/ShareViaLink.js.map +1 -1
- package/dist/v2/Taxonomy.js +3 -0
- package/dist/v2/Taxonomy.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/ar.json +2 -1
- package/src/translations/bg.json +2 -1
- package/src/translations/ca.json +2 -1
- package/src/translations/cs.json +2 -1
- package/src/translations/da.json +2 -1
- package/src/translations/de.json +2 -1
- package/src/translations/en.json +2 -1
- package/src/translations/es-MX.json +2 -1
- package/src/translations/es.json +2 -1
- package/src/translations/et.json +2 -1
- package/src/translations/fi.json +2 -1
- package/src/translations/fil.json +2 -1
- package/src/translations/fr.json +2 -1
- package/src/translations/he.json +2 -1
- package/src/translations/hi.json +2 -1
- package/src/translations/hr.json +2 -1
- package/src/translations/hu.json +2 -1
- package/src/translations/id.json +2 -1
- package/src/translations/it.json +2 -1
- package/src/translations/ja.json +2 -1
- package/src/translations/ko.json +2 -1
- package/src/translations/lv.json +2 -1
- package/src/translations/nl.json +2 -1
- package/src/translations/pl.json +2 -1
- package/src/translations/pt-BR.json +2 -1
- package/src/translations/pt.json +2 -1
- package/src/translations/ro.json +2 -1
- package/src/translations/ru.json +2 -1
- package/src/translations/sk.json +2 -1
- package/src/translations/sl.json +2 -1
- package/src/translations/sv.json +2 -1
- package/src/translations/th.json +2 -1
- package/src/translations/tr.json +2 -1
- package/src/translations/uk.json +2 -1
- package/src/translations/vi.json +2 -1
- package/src/translations/zh-CN.json +2 -1
- package/src/translations/zh-TW.json +2 -1
package/dist/v2/Search.js
CHANGED
|
@@ -1,26 +1,55 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
|
+
import { useShallow } from 'zustand/shallow';
|
|
4
5
|
import { useId, useRef, useState, useEffect } from 'react';
|
|
5
|
-
import { Input } from '@bigbinary/neeto-atoms';
|
|
6
|
+
import { Input, Kbd } from '@bigbinary/neeto-atoms';
|
|
6
7
|
import useFuncDebounce from '@bigbinary/neeto-commons-frontend/v2/react-utils/useFuncDebounce';
|
|
7
8
|
import useQueryParams from '@bigbinary/neeto-commons-frontend/v2/react-utils/useQueryParams';
|
|
8
9
|
import useUpdateEffect from '@bigbinary/neeto-commons-frontend/v2/react-utils/useUpdateEffect';
|
|
9
10
|
import { buildUrl } from '@bigbinary/neeto-commons-frontend/v2/utils/general';
|
|
10
11
|
import useHotkeys from '@bigbinary/neeto-hotkeys';
|
|
11
|
-
import { mergeLeft, omit } from 'ramda';
|
|
12
|
+
import { without, last, mergeLeft, omit } from 'ramda';
|
|
12
13
|
import { useTranslation } from 'react-i18next';
|
|
13
14
|
import { useHistory } from 'react-router-dom';
|
|
14
15
|
import { u as useGlobalSearchStore, D as DEFAULT_HOTKEY } from '../useGlobalSearchStore-DpUrTg7O.js';
|
|
16
|
+
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
17
|
+
import withImmutableActions from '@bigbinary/neeto-commons-frontend/v2/react-utils/withImmutableActions';
|
|
18
|
+
import { create } from 'zustand';
|
|
15
19
|
import { getQueryParams } from '@bigbinary/neeto-commons-frontend/v2/utils';
|
|
20
|
+
import { s as shortenHotKey, c as convertHotkeyToUsersPlatform } from '../utils-DKya4HZS.js';
|
|
16
21
|
import { jsx } from 'react/jsx-runtime';
|
|
17
22
|
import { S as Search$1 } from '../search-H0uYy0W-.js';
|
|
18
|
-
import '@babel/runtime/helpers/toConsumableArray';
|
|
19
23
|
import '@bigbinary/neeto-cist';
|
|
20
|
-
import '
|
|
21
|
-
import '
|
|
24
|
+
import 'i18next';
|
|
25
|
+
import 'ua-parser-js';
|
|
22
26
|
import '../createLucideIcon--oLqczpc.js';
|
|
23
27
|
|
|
28
|
+
/** @type {import("neetocommons/react-utils").ZustandStoreHook} */
|
|
29
|
+
var useFocusHotkeyStore = create(withImmutableActions(function (set) {
|
|
30
|
+
return {
|
|
31
|
+
// Search inputs that want mod+k, in mount order. Mousetrap keeps one handler
|
|
32
|
+
// per key and unbinding removes it for everyone, so only the last one binds.
|
|
33
|
+
inputIds: [],
|
|
34
|
+
register: function register(id) {
|
|
35
|
+
return set(function (_ref) {
|
|
36
|
+
var inputIds = _ref.inputIds;
|
|
37
|
+
return {
|
|
38
|
+
inputIds: [].concat(_toConsumableArray(inputIds), [id])
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
unregister: function unregister(id) {
|
|
43
|
+
return set(function (_ref2) {
|
|
44
|
+
var inputIds = _ref2.inputIds;
|
|
45
|
+
return {
|
|
46
|
+
inputIds: without([id], inputIds)
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}));
|
|
52
|
+
|
|
24
53
|
var getInitialSearchValue = function getInitialSearchValue(_ref) {
|
|
25
54
|
var _ref$initialValue = _ref.initialValue,
|
|
26
55
|
initialValue = _ref$initialValue === void 0 ? "" : _ref$initialValue,
|
|
@@ -35,6 +64,9 @@ var getInitialSearchValue = function getInitialSearchValue(_ref) {
|
|
|
35
64
|
}
|
|
36
65
|
return initialValue;
|
|
37
66
|
};
|
|
67
|
+
var getFocusHotkeyLabel = function getFocusHotkeyLabel() {
|
|
68
|
+
return shortenHotKey(convertHotkeyToUsersPlatform("command+k")).replace("\u2318+", "\u2318").replace("+", " ").toUpperCase();
|
|
69
|
+
};
|
|
38
70
|
|
|
39
71
|
var _excluded = ["value", "debounceTime", "onSearch", "onChange", "enableUrlSync", "searchParamName", "className", "label", "enableFocusHotkey"];
|
|
40
72
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -52,7 +84,7 @@ var Search = function Search(_ref) {
|
|
|
52
84
|
className = _ref.className,
|
|
53
85
|
label = _ref.label,
|
|
54
86
|
_ref$enableFocusHotke = _ref.enableFocusHotkey,
|
|
55
|
-
enableFocusHotkey = _ref$enableFocusHotke === void 0 ?
|
|
87
|
+
enableFocusHotkey = _ref$enableFocusHotke === void 0 ? true : _ref$enableFocusHotke,
|
|
56
88
|
inputProps = _objectWithoutProperties(_ref, _excluded);
|
|
57
89
|
var _useTranslation = useTranslation(),
|
|
58
90
|
t = _useTranslation.t;
|
|
@@ -65,6 +97,17 @@ var Search = function Search(_ref) {
|
|
|
65
97
|
var isGlobalSearchActive = useGlobalSearchStore(function (store) {
|
|
66
98
|
return store.isActive;
|
|
67
99
|
});
|
|
100
|
+
var _useFocusHotkeyStore = useFocusHotkeyStore(useShallow(function (store) {
|
|
101
|
+
return {
|
|
102
|
+
register: store["register"],
|
|
103
|
+
unregister: store["unregister"]
|
|
104
|
+
};
|
|
105
|
+
})),
|
|
106
|
+
register = _useFocusHotkeyStore.register,
|
|
107
|
+
unregister = _useFocusHotkeyStore.unregister;
|
|
108
|
+
var isLastFocusHotkeyInput = useFocusHotkeyStore(function (store) {
|
|
109
|
+
return last(store.inputIds) === inputId;
|
|
110
|
+
});
|
|
68
111
|
var _useState = useState(getInitialSearchValue({
|
|
69
112
|
initialValue: value,
|
|
70
113
|
enableUrlSync: enableUrlSync,
|
|
@@ -115,6 +158,17 @@ var Search = function Search(_ref) {
|
|
|
115
158
|
}, []);
|
|
116
159
|
|
|
117
160
|
// Apps with global search keep mod+k for the search modal.
|
|
161
|
+
var wantsFocusHotkey = enableFocusHotkey && !isGlobalSearchActive && !inputProps.disabled;
|
|
162
|
+
var isFocusHotkeyEnabled = wantsFocusHotkey && isLastFocusHotkeyInput;
|
|
163
|
+
// mod+k still works while global search is active: it opens the search modal.
|
|
164
|
+
var isFocusHotkeyHintVisible = (isFocusHotkeyEnabled || enableFocusHotkey && isGlobalSearchActive) && !inputProps.disabled && !internalValue;
|
|
165
|
+
useEffect(function () {
|
|
166
|
+
if (!wantsFocusHotkey) return undefined;
|
|
167
|
+
register(inputId);
|
|
168
|
+
return function () {
|
|
169
|
+
return unregister(inputId);
|
|
170
|
+
};
|
|
171
|
+
}, [wantsFocusHotkey]);
|
|
118
172
|
useHotkeys(DEFAULT_HOTKEY, function (event) {
|
|
119
173
|
var _inputRef$current, _inputRef$current2;
|
|
120
174
|
event.preventDefault();
|
|
@@ -122,8 +176,10 @@ var Search = function Search(_ref) {
|
|
|
122
176
|
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.select();
|
|
123
177
|
}, {
|
|
124
178
|
mode: "global",
|
|
125
|
-
enabled:
|
|
179
|
+
enabled: isFocusHotkeyEnabled
|
|
126
180
|
});
|
|
181
|
+
|
|
182
|
+
// Input sizes its suffix like an icon (size-4), so restore the Kbd size.
|
|
127
183
|
return /*#__PURE__*/jsx(Input, _objectSpread({
|
|
128
184
|
className: className,
|
|
129
185
|
label: label,
|
|
@@ -134,6 +190,10 @@ var Search = function Search(_ref) {
|
|
|
134
190
|
ref: inputRef,
|
|
135
191
|
type: "search",
|
|
136
192
|
value: internalValue,
|
|
193
|
+
suffix: isFocusHotkeyHintVisible ? /*#__PURE__*/jsx(Kbd, {
|
|
194
|
+
className: "bg-foreground/10 text-muted-foreground/70 h-5 w-fit shrink-0 whitespace-nowrap",
|
|
195
|
+
children: getFocusHotkeyLabel()
|
|
196
|
+
}) : null,
|
|
137
197
|
onChange: handleOnChange
|
|
138
198
|
}, inputProps));
|
|
139
199
|
};
|
package/dist/v2/Search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Search.js","sources":["../../src/v2/components/Search/utils.js","../../src/v2/components/Search/index.jsx"],"sourcesContent":["import { getQueryParams } from \"neetocommons/v2/utils\";\n\nexport const getInitialSearchValue = ({\n initialValue = \"\",\n enableUrlSync,\n searchParamName,\n}) => {\n if (enableUrlSync) {\n const queryParams = getQueryParams({ toCamelCase: false });\n\n return queryParams[searchParamName] ?? \"\";\n }\n\n return initialValue;\n};\n","import { useEffect, useId, useRef, useState } from \"react\";\n\nimport { Search as SearchIcon } from \"lucide-react\";\nimport { Input } from \"neetoatoms\";\nimport useFuncDebounce from \"neetocommons/v2/react-utils/useFuncDebounce\";\nimport useQueryParams from \"neetocommons/v2/react-utils/useQueryParams\";\nimport useUpdateEffect from \"neetocommons/v2/react-utils/useUpdateEffect\";\nimport { buildUrl } from \"neetocommons/v2/utils/general\";\nimport useHotkeys from \"neetohotkeys\";\nimport PropTypes from \"prop-types\";\nimport { mergeLeft, omit } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\nimport { DEFAULT_HOTKEY } from \"v2/components/GlobalSearch/constants\";\nimport useGlobalSearchStore from \"v2/components/GlobalSearch/useGlobalSearchStore\";\n\nimport { getInitialSearchValue } from \"./utils\";\n\nconst Search = ({\n value,\n debounceTime = 300,\n onSearch,\n onChange,\n enableUrlSync = false,\n searchParamName = \"search_term\",\n className,\n label,\n enableFocusHotkey = false,\n ...inputProps\n}) => {\n const { t } = useTranslation();\n const queryParams = useQueryParams({ toCamelCase: false });\n const history = useHistory();\n const inputId = useId();\n const inputRef = useRef(null);\n const isGlobalSearchActive = useGlobalSearchStore(store => store.isActive);\n\n const [internalValue, setInternalValue] = useState(\n getInitialSearchValue({\n initialValue: value,\n enableUrlSync,\n searchParamName,\n })\n );\n const trimmedValue = value?.trim();\n\n useUpdateEffect(() => {\n if (!enableUrlSync) return;\n\n const searchParamValue = queryParams?.[searchParamName] ?? \"\";\n setInternalValue(searchParamValue);\n }, [queryParams?.[searchParamName]]);\n\n const handleSearchQueryParams = trimmedValue => {\n if (!trimmedValue && !queryParams?.[searchParamName]) return;\n\n if (trimmedValue === queryParams?.[searchParamName]) return;\n\n const pathname = history.location.pathname;\n\n if (trimmedValue) {\n history.push(\n buildUrl(\n pathname,\n mergeLeft({ [searchParamName]: trimmedValue }, queryParams)\n )\n );\n } else {\n history.push(buildUrl(pathname, omit([searchParamName], queryParams)));\n }\n };\n\n const handleDebouncedSearchTermChange = useFuncDebounce(trimmedValue => {\n if (onSearch) onSearch(trimmedValue);\n else if (enableUrlSync) handleSearchQueryParams(trimmedValue);\n }, debounceTime);\n\n useUpdateEffect(() => {\n handleDebouncedSearchTermChange(trimmedValue);\n }, [trimmedValue]);\n\n const prevValueRef = useRef(value);\n if (value !== undefined && value !== prevValueRef.current) {\n setInternalValue(value);\n prevValueRef.current = value;\n }\n\n const handleOnChange = e => {\n const trimmedValue = e.target.value?.trim();\n onChange?.(e);\n setInternalValue(e.target.value);\n\n if (internalValue?.trim() !== trimmedValue) {\n handleDebouncedSearchTermChange(trimmedValue);\n }\n };\n\n useEffect(() => handleDebouncedSearchTermChange.cancel, []);\n\n // Apps with global search keep mod+k for the search modal.\n useHotkeys(\n DEFAULT_HOTKEY,\n event => {\n event.preventDefault();\n inputRef.current?.focus();\n inputRef.current?.select();\n },\n {\n mode: \"global\",\n enabled:\n enableFocusHotkey && !isGlobalSearchActive && !inputProps.disabled,\n }\n );\n\n return (\n <Input\n {...{ className, label }}\n data-testid=\"nui-input-field\"\n id={inputId}\n placeholder={t(\"neetoMolecules.common.actions.search\")}\n prefix={<SearchIcon />}\n ref={inputRef}\n type=\"search\"\n value={internalValue}\n onChange={handleOnChange}\n {...inputProps}\n />\n );\n};\n\nSearch.propTypes = {\n value: PropTypes.string,\n debounceTime: PropTypes.number,\n onChange: PropTypes.func,\n onSearch: PropTypes.func,\n enableUrlSync: PropTypes.bool,\n searchParamName: PropTypes.string,\n /**\n * Focuses the input on mod+k, unless global search is enabled on the page.\n */\n enableFocusHotkey: PropTypes.bool,\n inputProps: PropTypes.object,\n};\n\nexport default Search;\n"],"names":["getInitialSearchValue","_ref","_ref$initialValue","initialValue","enableUrlSync","searchParamName","_queryParams$searchPa","queryParams","getQueryParams","toCamelCase","Search","value","_ref$debounceTime","debounceTime","onSearch","onChange","_ref$enableUrlSync","_ref$searchParamName","className","label","_ref$enableFocusHotke","enableFocusHotkey","inputProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","useQueryParams","history","useHistory","inputId","useId","inputRef","useRef","isGlobalSearchActive","useGlobalSearchStore","store","isActive","_useState","useState","_useState2","_slicedToArray","internalValue","setInternalValue","trimmedValue","trim","useUpdateEffect","searchParamValue","handleSearchQueryParams","pathname","location","push","buildUrl","mergeLeft","_defineProperty","omit","handleDebouncedSearchTermChange","useFuncDebounce","prevValueRef","undefined","current","handleOnChange","e","_e$target$value","target","useEffect","cancel","useHotkeys","DEFAULT_HOTKEY","event","_inputRef$current","_inputRef$current2","preventDefault","focus","select","mode","enabled","disabled","_jsx","Input","_objectSpread","id","placeholder","prefix","SearchIcon","ref","type"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAAC,IAAA,EAI5B;AAAA,EAAA,IAAAC,iBAAA,GAAAD,IAAA,CAHJE,YAAY;AAAZA,IAAAA,YAAY,GAAAD,iBAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,iBAAA;IACjBE,aAAa,GAAAH,IAAA,CAAbG,aAAa;IACbC,eAAe,GAAAJ,IAAA,CAAfI,eAAe;AAEf,EAAA,IAAID,aAAa,EAAE;AAAA,IAAA,IAAAE,qBAAA;IACjB,IAAMC,WAAW,GAAGC,cAAc,CAAC;AAAEC,MAAAA,WAAW,EAAE;AAAM,KAAC,CAAC;IAE1D,OAAA,CAAAH,qBAAA,GAAOC,WAAW,CAACF,eAAe,CAAC,MAAA,IAAA,IAAAC,qBAAA,KAAA,MAAA,GAAAA,qBAAA,GAAI,EAAE;AAC3C,EAAA;AAEA,EAAA,OAAOH,YAAY;AACrB,CAAC;;;;;ACID,IAAMO,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C,sCAAsC,CAAE;AACvDyD,IAAAA,MAAM,eAAEL,GAAA,CAACM,QAAU,IAAE,CAAE;AACvBC,IAAAA,GAAG,EAAErD,QAAS;AACdsD,IAAAA,IAAI,EAAC,QAAQ;AACb5E,IAAAA,KAAK,EAAEgC,aAAc;AACrB5B,IAAAA,QAAQ,EAAE+C;GAAe,EACrBxC,UAAU,CACf,CAAC;AAEN;;;;"}
|
|
1
|
+
{"version":3,"file":"Search.js","sources":["../../src/v2/components/Search/useFocusHotkeyStore.js","../../src/v2/components/Search/utils.js","../../src/v2/components/Search/index.jsx"],"sourcesContent":["import withImmutableActions from \"neetocommons/v2/react-utils/withImmutableActions\";\nimport { without } from \"ramda\";\nimport { create } from \"zustand\";\n\n/** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\nconst useFocusHotkeyStore = create(\n withImmutableActions(set => ({\n // Search inputs that want mod+k, in mount order. Mousetrap keeps one handler\n // per key and unbinding removes it for everyone, so only the last one binds.\n inputIds: [],\n\n register: id => set(({ inputIds }) => ({ inputIds: [...inputIds, id] })),\n unregister: id =>\n set(({ inputIds }) => ({ inputIds: without([id], inputIds) })),\n }))\n);\n\nexport default useFocusHotkeyStore;\n","import { getQueryParams } from \"neetocommons/v2/utils\";\nimport {\n convertHotkeyToUsersPlatform,\n shortenHotKey,\n} from \"v2/components/KeyboardShortcuts/Pane/utils\";\n\nexport const getInitialSearchValue = ({\n initialValue = \"\",\n enableUrlSync,\n searchParamName,\n}) => {\n if (enableUrlSync) {\n const queryParams = getQueryParams({ toCamelCase: false });\n\n return queryParams[searchParamName] ?? \"\";\n }\n\n return initialValue;\n};\n\nexport const getFocusHotkeyLabel = () =>\n shortenHotKey(convertHotkeyToUsersPlatform(\"command+k\"))\n .replace(\"\\u2318+\", \"\\u2318\")\n .replace(\"+\", \" \")\n .toUpperCase();\n","import { useEffect, useId, useRef, useState } from \"react\";\n\nimport { Search as SearchIcon } from \"lucide-react\";\nimport { Input, Kbd } from \"neetoatoms\";\nimport useFuncDebounce from \"neetocommons/v2/react-utils/useFuncDebounce\";\nimport useQueryParams from \"neetocommons/v2/react-utils/useQueryParams\";\nimport useUpdateEffect from \"neetocommons/v2/react-utils/useUpdateEffect\";\nimport { buildUrl } from \"neetocommons/v2/utils/general\";\nimport useHotkeys from \"neetohotkeys\";\nimport PropTypes from \"prop-types\";\nimport { last, mergeLeft, omit } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { useHistory } from \"react-router-dom\";\nimport { DEFAULT_HOTKEY } from \"v2/components/GlobalSearch/constants\";\nimport useGlobalSearchStore from \"v2/components/GlobalSearch/useGlobalSearchStore\";\n\nimport useFocusHotkeyStore from \"./useFocusHotkeyStore\";\nimport { getFocusHotkeyLabel, getInitialSearchValue } from \"./utils\";\n\nconst Search = ({\n value,\n debounceTime = 300,\n onSearch,\n onChange,\n enableUrlSync = false,\n searchParamName = \"search_term\",\n className,\n label,\n enableFocusHotkey = true,\n ...inputProps\n}) => {\n const { t } = useTranslation();\n const queryParams = useQueryParams({ toCamelCase: false });\n const history = useHistory();\n const inputId = useId();\n const inputRef = useRef(null);\n const isGlobalSearchActive = useGlobalSearchStore(store => store.isActive);\n const { register, unregister } = useFocusHotkeyStore.pick();\n const isLastFocusHotkeyInput = useFocusHotkeyStore(\n store => last(store.inputIds) === inputId\n );\n\n const [internalValue, setInternalValue] = useState(\n getInitialSearchValue({\n initialValue: value,\n enableUrlSync,\n searchParamName,\n })\n );\n const trimmedValue = value?.trim();\n\n useUpdateEffect(() => {\n if (!enableUrlSync) return;\n\n const searchParamValue = queryParams?.[searchParamName] ?? \"\";\n setInternalValue(searchParamValue);\n }, [queryParams?.[searchParamName]]);\n\n const handleSearchQueryParams = trimmedValue => {\n if (!trimmedValue && !queryParams?.[searchParamName]) return;\n\n if (trimmedValue === queryParams?.[searchParamName]) return;\n\n const pathname = history.location.pathname;\n\n if (trimmedValue) {\n history.push(\n buildUrl(\n pathname,\n mergeLeft({ [searchParamName]: trimmedValue }, queryParams)\n )\n );\n } else {\n history.push(buildUrl(pathname, omit([searchParamName], queryParams)));\n }\n };\n\n const handleDebouncedSearchTermChange = useFuncDebounce(trimmedValue => {\n if (onSearch) onSearch(trimmedValue);\n else if (enableUrlSync) handleSearchQueryParams(trimmedValue);\n }, debounceTime);\n\n useUpdateEffect(() => {\n handleDebouncedSearchTermChange(trimmedValue);\n }, [trimmedValue]);\n\n const prevValueRef = useRef(value);\n if (value !== undefined && value !== prevValueRef.current) {\n setInternalValue(value);\n prevValueRef.current = value;\n }\n\n const handleOnChange = e => {\n const trimmedValue = e.target.value?.trim();\n onChange?.(e);\n setInternalValue(e.target.value);\n\n if (internalValue?.trim() !== trimmedValue) {\n handleDebouncedSearchTermChange(trimmedValue);\n }\n };\n\n useEffect(() => handleDebouncedSearchTermChange.cancel, []);\n\n // Apps with global search keep mod+k for the search modal.\n const wantsFocusHotkey =\n enableFocusHotkey && !isGlobalSearchActive && !inputProps.disabled;\n const isFocusHotkeyEnabled = wantsFocusHotkey && isLastFocusHotkeyInput;\n // mod+k still works while global search is active: it opens the search modal.\n const isFocusHotkeyHintVisible =\n (isFocusHotkeyEnabled || (enableFocusHotkey && isGlobalSearchActive)) &&\n !inputProps.disabled &&\n !internalValue;\n\n useEffect(() => {\n if (!wantsFocusHotkey) return undefined;\n\n register(inputId);\n\n return () => unregister(inputId);\n }, [wantsFocusHotkey]);\n\n useHotkeys(\n DEFAULT_HOTKEY,\n event => {\n event.preventDefault();\n inputRef.current?.focus();\n inputRef.current?.select();\n },\n { mode: \"global\", enabled: isFocusHotkeyEnabled }\n );\n\n // Input sizes its suffix like an icon (size-4), so restore the Kbd size.\n return (\n <Input\n {...{ className, label }}\n data-testid=\"nui-input-field\"\n id={inputId}\n placeholder={t(\"neetoMolecules.common.actions.search\")}\n prefix={<SearchIcon />}\n ref={inputRef}\n type=\"search\"\n value={internalValue}\n suffix={\n isFocusHotkeyHintVisible ? (\n <Kbd className=\"bg-foreground/10 text-muted-foreground/70 h-5 w-fit shrink-0 whitespace-nowrap\">\n {getFocusHotkeyLabel()}\n </Kbd>\n ) : null\n }\n onChange={handleOnChange}\n {...inputProps}\n />\n );\n};\n\nSearch.propTypes = {\n value: PropTypes.string,\n debounceTime: PropTypes.number,\n onChange: PropTypes.func,\n onSearch: PropTypes.func,\n enableUrlSync: PropTypes.bool,\n searchParamName: PropTypes.string,\n /**\n * Focuses the input on mod+k and shows the shortcut inside the input. Defaults\n * to true. While global search is enabled on the page, mod+k opens the search\n * modal instead and the shortcut is still shown. With several search inputs on\n * a page, the most recently mounted one takes the shortcut.\n */\n enableFocusHotkey: PropTypes.bool,\n inputProps: PropTypes.object,\n};\n\nexport default Search;\n"],"names":["useFocusHotkeyStore","create","withImmutableActions","set","inputIds","register","id","_ref","concat","_toConsumableArray","unregister","_ref2","without","getInitialSearchValue","_ref$initialValue","initialValue","enableUrlSync","searchParamName","_queryParams$searchPa","queryParams","getQueryParams","toCamelCase","getFocusHotkeyLabel","shortenHotKey","convertHotkeyToUsersPlatform","replace","toUpperCase","Search","value","_ref$debounceTime","debounceTime","onSearch","onChange","_ref$enableUrlSync","_ref$searchParamName","className","label","_ref$enableFocusHotke","enableFocusHotkey","inputProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","useQueryParams","history","useHistory","inputId","useId","inputRef","useRef","isGlobalSearchActive","useGlobalSearchStore","store","isActive","_useFocusHotkeyStore","useShallow","isLastFocusHotkeyInput","last","_useState","useState","_useState2","_slicedToArray","internalValue","setInternalValue","trimmedValue","trim","useUpdateEffect","searchParamValue","handleSearchQueryParams","pathname","location","push","buildUrl","mergeLeft","_defineProperty","omit","handleDebouncedSearchTermChange","useFuncDebounce","prevValueRef","undefined","current","handleOnChange","e","_e$target$value","target","useEffect","cancel","wantsFocusHotkey","disabled","isFocusHotkeyEnabled","isFocusHotkeyHintVisible","useHotkeys","DEFAULT_HOTKEY","event","_inputRef$current","_inputRef$current2","preventDefault","focus","select","mode","enabled","_jsx","Input","_objectSpread","placeholder","pr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ACA,EAAA,oBACEY,GAAA,CAACC,KAAK,EAAAC,aAAA,CAAA;AACEtE,IAAAA,SAAS,EAATA,SAAS;AAAEC,IAAAA,KAAK,EAALA,KAAK;AACtB,IAAA,aAAA,EAAY,iBAAiB;AAC7B9B,IAAAA,EAAE,EAAE0C,OAAQ;AACZ0D,IAAAA,WAAW,EAAE9D,CAAC,CAAC,sCAAsC,CAAE;AACvD+D,IAAAA,MAAM,eAAEJ,GAAA,CAACK,QAAU,IAAE,CAAE;AACvBC,IAAAA,GAAG,EAAE3D,QAAS;AACd4D,IAAAA,IAAI,EAAC,QAAQ;AACblF,IAAAA,KAAK,EAAEoC,aAAc;AACrB+C,IAAAA,MAAM,EACJnB,wBAAwB,gBACtBW,GAAA,CAACS,GAAG,EAAA;AAAC7E,MAAAA,SAAS,EAAC,gFAAgF;MAAA8E,QAAA,EAC5F3F,mBAAmB;KACjB,CAAC,GACJ,IACL;AACDU,IAAAA,QAAQ,EAAEmD;GAAe,EACrB5C,UAAU,CACf,CAAC;AAEN;;;;"}
|
package/dist/v2/Settings.js
CHANGED
|
@@ -21,6 +21,7 @@ import './MoreDropdown.js';
|
|
|
21
21
|
import '../ellipsis-BSu1ZIFZ.js';
|
|
22
22
|
import './Search.js';
|
|
23
23
|
import '@babel/runtime/helpers/slicedToArray';
|
|
24
|
+
import 'zustand/shallow';
|
|
24
25
|
import '@bigbinary/neeto-commons-frontend/v2/react-utils/useFuncDebounce';
|
|
25
26
|
import '@bigbinary/neeto-commons-frontend/v2/react-utils/useUpdateEffect';
|
|
26
27
|
import '@bigbinary/neeto-hotkeys';
|
|
@@ -29,6 +30,9 @@ import '@babel/runtime/helpers/toConsumableArray';
|
|
|
29
30
|
import '@bigbinary/neeto-commons-frontend/v2/react-utils/withImmutableActions';
|
|
30
31
|
import 'zustand';
|
|
31
32
|
import '@bigbinary/neeto-commons-frontend/v2/utils';
|
|
33
|
+
import '../utils-DKya4HZS.js';
|
|
34
|
+
import 'i18next';
|
|
35
|
+
import 'ua-parser-js';
|
|
32
36
|
import '../search-H0uYy0W-.js';
|
|
33
37
|
|
|
34
38
|
var UNSUPPORTED_LINK_PROPS = ["staticContext", "tReady"];
|
package/dist/v2/Settings.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settings.js","sources":["../../src/v2/components/Settings/constants.js","../../src/v2/components/Settings/IntegrationItem.jsx","../../src/v2/components/Settings/Item.jsx","../../src/v2/components/Settings/Category.jsx","../../src/v2/components/Settings/utils.js","../../src/v2/components/Settings/index.jsx"],"sourcesContent":["export const UNSUPPORTED_LINK_PROPS = [\"staticContext\", \"tReady\"];\n","import { memo } from \"react\";\n\nimport { Badge, Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { hyphenate } from \"neetocist\";\nimport { joinHyphenCase } from \"neetocommons/v2/utils/general\";\nimport PropTypes from \"prop-types\";\nimport { omit } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\n\nimport { UNSUPPORTED_LINK_PROPS } from \"./constants\";\n\nconst IntegrationItem = ({\n icon: Icon = null,\n description,\n label,\n path,\n href,\n isConnected,\n isMobileOrTablet = false,\n className = \"\",\n ...otherProps\n}) => {\n const { t } = useTranslation();\n\n const commonProps = {\n \"data-testid\": `${hyphenate(label).replace(/\\./g, \"-\")}-integration-card`,\n className: classnames(\n \"relative flex cursor-pointer flex-col items-start gap-3 rounded-lg border border-border px-6 py-6 no-underline outline-none transition-shadow duration-300 ease-in-out md:py-8 lg:flex-row xl:gap-4\",\n \"hover:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] hover:[&_[data-settings-heading]]:text-primary\",\n \"active:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] active:[&_[data-settings-heading]]:text-primary\",\n \"focus:border-primary focus:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus:[&_[data-settings-heading]]:text-primary\",\n \"focus-visible:border-primary focus-visible:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus-visible:[&_[data-settings-heading]]:text-primary\",\n className\n ),\n ...omit(UNSUPPORTED_LINK_PROPS, otherProps),\n };\n\n const LinkElement = href ? \"a\" : Link;\n const linkProps = href\n ? { href, ...commonProps }\n : { to: path, ...commonProps };\n\n return (\n <LinkElement {...linkProps}>\n {Icon && (\n <div className=\"border-border mt-0.5 flex shrink-0 items-center justify-center rounded-lg border p-1.5 shadow-sm xl:p-2.5\">\n <Icon\n data-testid={`${joinHyphenCase(label)}-integration-icon`}\n size={isMobileOrTablet ? 26 : 32}\n />\n </div>\n )}\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <Typography\n className=\"flex flex-wrap items-center gap-2\"\n data-settings-heading=\"\"\n data-testid=\"settings-item-heading\"\n variant=\"h5\"\n weight=\"semibold\"\n >\n {label}\n {isConnected && (\n <Badge data-testid=\"integration-status-tag\" variant=\"green\">\n {t(\"neetoMolecules.integrationCard.connected\")}\n </Badge>\n )}\n </Typography>\n <Typography\n className=\"text-muted-foreground\"\n data-testid=\"settings-item-description\"\n variant=\"body2\"\n >\n {description}\n </Typography>\n </div>\n </LinkElement>\n );\n};\n\nIntegrationItem.propTypes = {\n /**\n * The icon component to display. Accepts lucide-react icons or brand logos.\n */\n icon: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.func,\n PropTypes.object,\n ]),\n /**\n * A description of the integration.\n */\n description: PropTypes.string,\n /**\n * The label text for the integration item.\n */\n label: PropTypes.string.isRequired,\n /**\n * The internal route path for the integration item link.\n */\n path: PropTypes.string,\n /**\n * The external URL for the integration item link.\n */\n href: PropTypes.string,\n /**\n * Whether the integration is currently connected.\n */\n isConnected: PropTypes.bool,\n /**\n * Whether the current viewport is mobile or tablet size.\n */\n isMobileOrTablet: PropTypes.bool,\n /**\n * Additional CSS classes for the link element.\n */\n className: PropTypes.string,\n};\n\nexport default memo(IntegrationItem);\n","import { memo } from \"react\";\n\nimport { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { joinHyphenCase } from \"neetocommons/v2/utils/general\";\nimport PropTypes from \"prop-types\";\nimport { omit } from \"ramda\";\nimport { Link } from \"react-router-dom\";\n\nimport { UNSUPPORTED_LINK_PROPS } from \"./constants\";\n\nconst Item = ({\n label,\n description,\n icon: Icon = null,\n path,\n href,\n dataTestid,\n className = \"\",\n children,\n ...otherProps\n}) => {\n const commonProps = {\n \"data-testid\": dataTestid,\n className: classnames(\n \"group flex cursor-pointer flex-col gap-y-4 rounded-lg border border-border p-6 no-underline outline-none transition-shadow duration-300 ease-in-out\",\n \"hover:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] hover:[&_[data-settings-heading]]:text-primary\",\n \"active:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] active:[&_[data-settings-heading]]:text-primary\",\n \"focus:border-primary focus:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus:[&_[data-settings-heading]]:text-primary\",\n \"focus-visible:border-primary focus-visible:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus-visible:[&_[data-settings-heading]]:text-primary\",\n className\n ),\n ...omit(UNSUPPORTED_LINK_PROPS, otherProps),\n };\n\n const LinkElement = href ? \"a\" : Link;\n const linkProps = href\n ? { href, ...commonProps }\n : { to: path, ...commonProps };\n\n return (\n <LinkElement {...linkProps}>\n <div data-testid={`settings-item-${joinHyphenCase(label)}`}>\n <div className=\"mb-2.5 flex items-center gap-3\">\n {Icon && (\n <Icon className=\"text-muted-foreground shrink-0\" size={24} />\n )}\n <Typography asChild variant=\"h5\" weight=\"semibold\">\n <span data-settings-heading=\"\" data-testid=\"settings-item-heading\">\n {label}\n </span>\n </Typography>\n </div>\n <Typography\n className=\"text-muted-foreground\"\n data-testid=\"settings-item-description\"\n variant=\"body2\"\n >\n {description}\n </Typography>\n </div>\n {children && (\n <div className=\"border-border border-t pt-3\">{children}</div>\n )}\n </LinkElement>\n );\n};\n\nItem.propTypes = {\n /**\n * The label text for the settings item.\n */\n label: PropTypes.string.isRequired,\n /**\n * A description of the settings item.\n */\n description: PropTypes.string,\n /**\n * The icon component to display. Accepts lucide-react icons.\n */\n icon: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.func,\n PropTypes.object,\n ]),\n /**\n * The internal route path for the settings item link.\n */\n path: PropTypes.string,\n /**\n * The external URL for the settings item link.\n */\n href: PropTypes.string,\n /**\n * A custom data-testid attribute for the link element.\n */\n dataTestid: PropTypes.string,\n /**\n * Additional CSS classes for the link element.\n */\n className: PropTypes.string,\n /**\n * Optional children rendered below the description, separated by a border.\n */\n children: PropTypes.node,\n};\n\nexport default memo(Item);\n","import { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { isPresent } from \"neetocist\";\nimport { useBreakpoints } from \"neetocommons/v2/react-utils\";\n\nimport IntegrationItem from \"./IntegrationItem\";\nimport Item from \"./Item\";\n\nconst Category = ({ items, label, id, isIntegration }) => {\n const { isSize } = useBreakpoints();\n const SettingsCard = isIntegration ? IntegrationItem : Item;\n const isMobileOrTablet = isSize(\"mobile\") || isSize(\"tablet\");\n\n const isLabelPresent = isPresent(label);\n\n return (\n <div\n {...{ id }}\n className={classnames(\"flex flex-col\", { \"mb-7\": isLabelPresent })}\n >\n {isLabelPresent && (\n <Typography asChild variant=\"h4\" weight=\"semibold\">\n <h2 className=\"mt-2 mb-4\" data-testid=\"settings-category-heading\">\n {label}\n </h2>\n </Typography>\n )}\n <div\n className={classnames(\n \"grid grid-cols-1 gap-3 py-1 md:grid-cols-2 lg:grid-cols-2 lg:gap-4\",\n {\n \"xl:grid-cols-2 2xl:grid-cols-3\": isIntegration,\n \"xl:grid-cols-3 2xl:grid-cols-4\": !isIntegration,\n }\n )}\n >\n {items.map(item => (\n <SettingsCard\n key={item.label}\n {...item}\n {...(isIntegration && { isMobileOrTablet })}\n />\n ))}\n </div>\n </div>\n );\n};\n\nexport default Category;\n","import { filterBy, isNotEmpty } from \"neetocist\";\n\nconst isTextMatching = (label, searchTerm) =>\n label.toLowerCase().includes(searchTerm.trim().toLowerCase());\n\nexport const scrollIntoSettingCategory = activeCategory => {\n document.getElementById(activeCategory)?.scrollIntoView({\n behavior: \"smooth\",\n });\n};\n\nexport const filterCategories = ({ categories = [], searchTerm = \"\" }) => {\n const isSearchTermBlank = !searchTerm.trim();\n\n const filteredCategories = isSearchTermBlank\n ? categories\n : categories.map(category => ({\n ...category,\n items: filterBy(\n ({ label, description }) =>\n isTextMatching(label, searchTerm) ||\n isTextMatching(description, searchTerm),\n category.items\n ),\n }));\n\n return filterBy({ items: isNotEmpty }, filteredCategories);\n};\n","import { useEffect } from \"react\";\n\nimport classnames from \"classnames\";\nimport useQueryParams from \"neetocommons/v2/react-utils/useQueryParams\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport Category from \"./Category\";\nimport { filterCategories, scrollIntoSettingCategory } from \"./utils\";\n\nimport Header from \"../Header\";\n\nconst Settings = ({\n isTitleHidden = false,\n isSearchHidden = false,\n title,\n headerProps = {},\n categories = [],\n className = \"\",\n}) => {\n const { t } = useTranslation();\n\n const { category: categoryParam, searchTerm = \"\" } = useQueryParams();\n\n const filteredCategories = filterCategories({ categories, searchTerm });\n\n const isHeaderVisible = !isSearchHidden || !isTitleHidden;\n\n const headerTitle = title ?? t(\"neetoMolecules.settingsPage.title\");\n\n useEffect(() => {\n scrollIntoSettingCategory(categoryParam);\n }, [categoryParam]);\n\n return (\n <div\n className={classnames(\n \"flex h-dvh grow flex-col items-start justify-start overflow-y-auto px-5 md:px-10\",\n { \"h-auto overflow-y-auto\": isTitleHidden },\n className\n )}\n >\n {isHeaderVisible && (\n <Header\n className={classnames({ \"min-h-0 pt-8 pb-4\": isTitleHidden })}\n title={!isTitleHidden && headerTitle}\n searchProps={\n isSearchHidden\n ? null\n : {\n className: \"w-72\",\n placeholder: t(\n \"neetoMolecules.settingsPage.placeholder.search\"\n ),\n }\n }\n {...headerProps}\n />\n )}\n {isEmpty(filteredCategories) ? (\n <div\n className=\"flex h-full w-full flex-grow items-center justify-center\"\n data-testid=\"settings-no-data\"\n >\n <div className=\"text-muted-foreground flex flex-col items-center gap-2\">\n <p className=\"text-lg font-medium\">\n {t(\"neetoMolecules.settingsPage.noData\")}\n </p>\n </div>\n </div>\n ) : (\n <div className=\"w-full\">\n {filteredCategories.map(({ id, label, items, isIntegration }) => (\n <Category {...{ id, isIntegration, items, label }} key={id} />\n ))}\n </div>\n )}\n </div>\n );\n};\n\nSettings.propTypes = {\n /**\n * Whether to hide the title or not.\n */\n isTitleHidden: PropTypes.bool,\n /**\n * This can be used to customize the title.\n */\n title: PropTypes.string,\n /**\n * Whether to hide the search bar or not.\n */\n isSearchHidden: PropTypes.bool,\n /**\n * An array of setting categories to be displayed.\n */\n categories: PropTypes.array,\n /**\n * Additional classes to be added to the container.\n */\n className: PropTypes.string,\n /**\n * Props to be passed to the header component.\n */\n headerProps: PropTypes.object,\n};\n\nexport default Settings;\n"],"names":["UNSUPPORTED_LINK_PROPS","IntegrationItem","_ref","_ref$icon","icon","Icon","description","label","path","href","isConnected","_ref$isMobileOrTablet","isMobileOrTablet","_ref$className","className","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","commonProps","_objectSpread","concat","hyphenate","replace","classnames","omit","LinkElement","Link","linkProps","to","_jsxs","children","_jsx","joinHyphenCase","size","Typography","variant","weight","Badge","memo","Item","dataTestid","asChild","Category","items","id","isIntegration","_useBreakpoints","useBreakpoints","isSize","SettingsCard","isLabelPresent","isPresent","map","item","isTextMatching","searchTerm","toLowerCase","includes","trim","scrollIntoSettingCategory","activeCategory","_document$getElementB","document","getElementById","scrollIntoView","behavior","filterCategories","_ref$categories","categories","_ref$searchTerm","isSearchTermBlank","filteredCategories","category","filterBy","_ref2","isNotEmpty","Settings","_ref$isTitleHidden","isTitleHidden","_ref$isSearchHidden","isSearchHidden","title","_ref$headerProps","headerProps","_useQueryParams","useQueryParams","categoryParam","_useQueryParams$searc","isHeaderVisible","headerTitle","useEffect","Header","searchProps","placeholder","isEmpty","_createElement","key"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,sBAAsB,GAAG,CAAC,eAAe,EAAE,QAAQ,CAAC;;;;;ACajE,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAUf;AAAA,EAAA,IAAAC,SAAA,GAAAD,IAAA,CATJE,IAAI;AAAEC,IAAAA,IAAI,GAAAF,SAAA,KAAA,MAAA,GAAG,IAAI,GAAAA,SAAA;IACjBG,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,KAAK,GAAAL,IAAA,CAALK,KAAK;IACLC,IAAI,GAAAN,IAAA,CAAJM,IAAI;IACJC,IAAI,GAAAP,IAAA,CAAJO,IAAI;IACJC,WAAW,GAAAR,IAAA,CAAXQ,WAAW;IAAAC,qBAAA,GAAAT,IAAA,CACXU,gBAAgB;AAAhBA,IAAAA,gBAAgB,GAAAD,qBAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,qBAAA;IAAAE,cAAA,GAAAX,IAAA,CACxBY,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAA,MAAA,GAAG,EAAE,GAAAA,cAAA;AACXE,IAAAA,UAAU,GAAAC,wBAAA,CAAAd,IAAA,EAAAe,WAAA,CAAA;AAEb,EAAA,IAAAC,eAAA,GAAcC,cAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC;EAET,IAAMC,WAAW,GAAAC,eAAA,CAAA;AACf,IAAA,aAAa,EAAA,EAAA,CAAAC,MAAA,CAAKC,SAAS,CAACjB,KAAK,CAAC,CAACkB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,EAAA,mBAAA,CAAmB;AACzEX,IAAAA,SAAS,EAAEY,UAAU,CACnB,qMAAqM,EACrM,qGAAqG,EACrG,uGAAuG,EACvG,0HAA0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
1
|
+
{"version":3,"file":"Settings.js","sources":["../../src/v2/components/Settings/constants.js","../../src/v2/components/Settings/IntegrationItem.jsx","../../src/v2/components/Settings/Item.jsx","../../src/v2/components/Settings/Category.jsx","../../src/v2/components/Settings/utils.js","../../src/v2/components/Settings/index.jsx"],"sourcesContent":["export const UNSUPPORTED_LINK_PROPS = [\"staticContext\", \"tReady\"];\n","import { memo } from \"react\";\n\nimport { Badge, Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { hyphenate } from \"neetocist\";\nimport { joinHyphenCase } from \"neetocommons/v2/utils/general\";\nimport PropTypes from \"prop-types\";\nimport { omit } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\n\nimport { UNSUPPORTED_LINK_PROPS } from \"./constants\";\n\nconst IntegrationItem = ({\n icon: Icon = null,\n description,\n label,\n path,\n href,\n isConnected,\n isMobileOrTablet = false,\n className = \"\",\n ...otherProps\n}) => {\n const { t } = useTranslation();\n\n const commonProps = {\n \"data-testid\": `${hyphenate(label).replace(/\\./g, \"-\")}-integration-card`,\n className: classnames(\n \"relative flex cursor-pointer flex-col items-start gap-3 rounded-lg border border-border px-6 py-6 no-underline outline-none transition-shadow duration-300 ease-in-out md:py-8 lg:flex-row xl:gap-4\",\n \"hover:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] hover:[&_[data-settings-heading]]:text-primary\",\n \"active:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] active:[&_[data-settings-heading]]:text-primary\",\n \"focus:border-primary focus:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus:[&_[data-settings-heading]]:text-primary\",\n \"focus-visible:border-primary focus-visible:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus-visible:[&_[data-settings-heading]]:text-primary\",\n className\n ),\n ...omit(UNSUPPORTED_LINK_PROPS, otherProps),\n };\n\n const LinkElement = href ? \"a\" : Link;\n const linkProps = href\n ? { href, ...commonProps }\n : { to: path, ...commonProps };\n\n return (\n <LinkElement {...linkProps}>\n {Icon && (\n <div className=\"border-border mt-0.5 flex shrink-0 items-center justify-center rounded-lg border p-1.5 shadow-sm xl:p-2.5\">\n <Icon\n data-testid={`${joinHyphenCase(label)}-integration-icon`}\n size={isMobileOrTablet ? 26 : 32}\n />\n </div>\n )}\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <Typography\n className=\"flex flex-wrap items-center gap-2\"\n data-settings-heading=\"\"\n data-testid=\"settings-item-heading\"\n variant=\"h5\"\n weight=\"semibold\"\n >\n {label}\n {isConnected && (\n <Badge data-testid=\"integration-status-tag\" variant=\"green\">\n {t(\"neetoMolecules.integrationCard.connected\")}\n </Badge>\n )}\n </Typography>\n <Typography\n className=\"text-muted-foreground\"\n data-testid=\"settings-item-description\"\n variant=\"body2\"\n >\n {description}\n </Typography>\n </div>\n </LinkElement>\n );\n};\n\nIntegrationItem.propTypes = {\n /**\n * The icon component to display. Accepts lucide-react icons or brand logos.\n */\n icon: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.func,\n PropTypes.object,\n ]),\n /**\n * A description of the integration.\n */\n description: PropTypes.string,\n /**\n * The label text for the integration item.\n */\n label: PropTypes.string.isRequired,\n /**\n * The internal route path for the integration item link.\n */\n path: PropTypes.string,\n /**\n * The external URL for the integration item link.\n */\n href: PropTypes.string,\n /**\n * Whether the integration is currently connected.\n */\n isConnected: PropTypes.bool,\n /**\n * Whether the current viewport is mobile or tablet size.\n */\n isMobileOrTablet: PropTypes.bool,\n /**\n * Additional CSS classes for the link element.\n */\n className: PropTypes.string,\n};\n\nexport default memo(IntegrationItem);\n","import { memo } from \"react\";\n\nimport { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { joinHyphenCase } from \"neetocommons/v2/utils/general\";\nimport PropTypes from \"prop-types\";\nimport { omit } from \"ramda\";\nimport { Link } from \"react-router-dom\";\n\nimport { UNSUPPORTED_LINK_PROPS } from \"./constants\";\n\nconst Item = ({\n label,\n description,\n icon: Icon = null,\n path,\n href,\n dataTestid,\n className = \"\",\n children,\n ...otherProps\n}) => {\n const commonProps = {\n \"data-testid\": dataTestid,\n className: classnames(\n \"group flex cursor-pointer flex-col gap-y-4 rounded-lg border border-border p-6 no-underline outline-none transition-shadow duration-300 ease-in-out\",\n \"hover:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] hover:[&_[data-settings-heading]]:text-primary\",\n \"active:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] active:[&_[data-settings-heading]]:text-primary\",\n \"focus:border-primary focus:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus:[&_[data-settings-heading]]:text-primary\",\n \"focus-visible:border-primary focus-visible:shadow-[0px_0px_9.2px_0px_rgba(29,33,59,0.12)] focus-visible:[&_[data-settings-heading]]:text-primary\",\n className\n ),\n ...omit(UNSUPPORTED_LINK_PROPS, otherProps),\n };\n\n const LinkElement = href ? \"a\" : Link;\n const linkProps = href\n ? { href, ...commonProps }\n : { to: path, ...commonProps };\n\n return (\n <LinkElement {...linkProps}>\n <div data-testid={`settings-item-${joinHyphenCase(label)}`}>\n <div className=\"mb-2.5 flex items-center gap-3\">\n {Icon && (\n <Icon className=\"text-muted-foreground shrink-0\" size={24} />\n )}\n <Typography asChild variant=\"h5\" weight=\"semibold\">\n <span data-settings-heading=\"\" data-testid=\"settings-item-heading\">\n {label}\n </span>\n </Typography>\n </div>\n <Typography\n className=\"text-muted-foreground\"\n data-testid=\"settings-item-description\"\n variant=\"body2\"\n >\n {description}\n </Typography>\n </div>\n {children && (\n <div className=\"border-border border-t pt-3\">{children}</div>\n )}\n </LinkElement>\n );\n};\n\nItem.propTypes = {\n /**\n * The label text for the settings item.\n */\n label: PropTypes.string.isRequired,\n /**\n * A description of the settings item.\n */\n description: PropTypes.string,\n /**\n * The icon component to display. Accepts lucide-react icons.\n */\n icon: PropTypes.oneOfType([\n PropTypes.element,\n PropTypes.func,\n PropTypes.object,\n ]),\n /**\n * The internal route path for the settings item link.\n */\n path: PropTypes.string,\n /**\n * The external URL for the settings item link.\n */\n href: PropTypes.string,\n /**\n * A custom data-testid attribute for the link element.\n */\n dataTestid: PropTypes.string,\n /**\n * Additional CSS classes for the link element.\n */\n className: PropTypes.string,\n /**\n * Optional children rendered below the description, separated by a border.\n */\n children: PropTypes.node,\n};\n\nexport default memo(Item);\n","import { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { isPresent } from \"neetocist\";\nimport { useBreakpoints } from \"neetocommons/v2/react-utils\";\n\nimport IntegrationItem from \"./IntegrationItem\";\nimport Item from \"./Item\";\n\nconst Category = ({ items, label, id, isIntegration }) => {\n const { isSize } = useBreakpoints();\n const SettingsCard = isIntegration ? IntegrationItem : Item;\n const isMobileOrTablet = isSize(\"mobile\") || isSize(\"tablet\");\n\n const isLabelPresent = isPresent(label);\n\n return (\n <div\n {...{ id }}\n className={classnames(\"flex flex-col\", { \"mb-7\": isLabelPresent })}\n >\n {isLabelPresent && (\n <Typography asChild variant=\"h4\" weight=\"semibold\">\n <h2 className=\"mt-2 mb-4\" data-testid=\"settings-category-heading\">\n {label}\n </h2>\n </Typography>\n )}\n <div\n className={classnames(\n \"grid grid-cols-1 gap-3 py-1 md:grid-cols-2 lg:grid-cols-2 lg:gap-4\",\n {\n \"xl:grid-cols-2 2xl:grid-cols-3\": isIntegration,\n \"xl:grid-cols-3 2xl:grid-cols-4\": !isIntegration,\n }\n )}\n >\n {items.map(item => (\n <SettingsCard\n key={item.label}\n {...item}\n {...(isIntegration && { isMobileOrTablet })}\n />\n ))}\n </div>\n </div>\n );\n};\n\nexport default Category;\n","import { filterBy, isNotEmpty } from \"neetocist\";\n\nconst isTextMatching = (label, searchTerm) =>\n label.toLowerCase().includes(searchTerm.trim().toLowerCase());\n\nexport const scrollIntoSettingCategory = activeCategory => {\n document.getElementById(activeCategory)?.scrollIntoView({\n behavior: \"smooth\",\n });\n};\n\nexport const filterCategories = ({ categories = [], searchTerm = \"\" }) => {\n const isSearchTermBlank = !searchTerm.trim();\n\n const filteredCategories = isSearchTermBlank\n ? categories\n : categories.map(category => ({\n ...category,\n items: filterBy(\n ({ label, description }) =>\n isTextMatching(label, searchTerm) ||\n isTextMatching(description, searchTerm),\n category.items\n ),\n }));\n\n return filterBy({ items: isNotEmpty }, filteredCategories);\n};\n","import { useEffect } from \"react\";\n\nimport classnames from \"classnames\";\nimport useQueryParams from \"neetocommons/v2/react-utils/useQueryParams\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport Category from \"./Category\";\nimport { filterCategories, scrollIntoSettingCategory } from \"./utils\";\n\nimport Header from \"../Header\";\n\nconst Settings = ({\n isTitleHidden = false,\n isSearchHidden = false,\n title,\n headerProps = {},\n categories = [],\n className = \"\",\n}) => {\n const { t } = useTranslation();\n\n const { category: categoryParam, searchTerm = \"\" } = useQueryParams();\n\n const filteredCategories = filterCategories({ categories, searchTerm });\n\n const isHeaderVisible = !isSearchHidden || !isTitleHidden;\n\n const headerTitle = title ?? t(\"neetoMolecules.settingsPage.title\");\n\n useEffect(() => {\n scrollIntoSettingCategory(categoryParam);\n }, [categoryParam]);\n\n return (\n <div\n className={classnames(\n \"flex h-dvh grow flex-col items-start justify-start overflow-y-auto px-5 md:px-10\",\n { \"h-auto overflow-y-auto\": isTitleHidden },\n className\n )}\n >\n {isHeaderVisible && (\n <Header\n className={classnames({ \"min-h-0 pt-8 pb-4\": isTitleHidden })}\n title={!isTitleHidden && headerTitle}\n searchProps={\n isSearchHidden\n ? null\n : {\n className: \"w-72\",\n placeholder: t(\n \"neetoMolecules.settingsPage.placeholder.search\"\n ),\n }\n }\n {...headerProps}\n />\n )}\n {isEmpty(filteredCategories) ? (\n <div\n className=\"flex h-full w-full flex-grow items-center justify-center\"\n data-testid=\"settings-no-data\"\n >\n <div className=\"text-muted-foreground flex flex-col items-center gap-2\">\n <p className=\"text-lg font-medium\">\n {t(\"neetoMolecules.settingsPage.noData\")}\n </p>\n </div>\n </div>\n ) : (\n <div className=\"w-full\">\n {filteredCategories.map(({ id, label, items, isIntegration }) => (\n <Category {...{ id, isIntegration, items, label }} key={id} />\n ))}\n </div>\n )}\n </div>\n );\n};\n\nSettings.propTypes = {\n /**\n * Whether to hide the title or not.\n */\n isTitleHidden: PropTypes.bool,\n /**\n * This can be used to customize the title.\n */\n title: PropTypes.string,\n /**\n * Whether to hide the search bar or not.\n */\n isSearchHidden: PropTypes.bool,\n /**\n * An array of setting categories to be displayed.\n */\n categories: PropTypes.array,\n /**\n * Additional classes to be added to the container.\n */\n className: PropTypes.string,\n /**\n * Props to be passed to the header component.\n */\n headerProps: PropTypes.object,\n};\n\nexport default Settings;\n"],"names":["UNSUPPORTED_LINK_PROPS","IntegrationItem","_ref","_ref$icon","icon","Icon","description","label","path","href","isConnected","_ref$isMobileOrTablet","isMobileOrTablet","_ref$className","className","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","commonProps","_objectSpread","concat","hyphenate","replace","classnames","omit","LinkElement","Link","linkProps","to","_jsxs","children","_jsx","joinHyphenCase","size","Typography","variant","weight","Badge","memo","Item","dataTestid","asChild","Category","items","id","isIntegration","_useBreakpoints","useBreakpoints","isSize","SettingsCard","isLabelPresent","isPresent","map","item","isTextMatching","searchTerm","toLowerCase","includes","trim","scrollIntoSettingCategory","activeCategory","_document$getElementB","document","getElementById","scrollIntoView","behavior","filterCategories","_ref$categories","categories","_ref$searchTerm","isSearchTermBlank","filteredCategories","category","filterBy","_ref2","isNotEmpty","Settings","_ref$isTitleHidden","isTitleHidden","_ref$isSearchHidden","isSearchHidden","title","_ref$headerProps","headerProps","_useQueryParams","useQueryParams","categoryParam","_useQueryParams$searc","isHeaderVisible","headerTitle","useEffect","Header","searchProps","placeholder","isEmpty","_createElement","key"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAA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
|
import './Search.js';
|
|
48
|
+
import 'zustand/shallow';
|
|
48
49
|
import '@bigbinary/neeto-commons-frontend/v2/react-utils/useFuncDebounce';
|
|
49
50
|
import '@bigbinary/neeto-commons-frontend/v2/react-utils/useQueryParams';
|
|
50
51
|
import '@bigbinary/neeto-commons-frontend/v2/react-utils/useUpdateEffect';
|
|
@@ -53,8 +54,9 @@ import '../useGlobalSearchStore-DpUrTg7O.js';
|
|
|
53
54
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
54
55
|
import '@bigbinary/neeto-commons-frontend/v2/react-utils/withImmutableActions';
|
|
55
56
|
import 'zustand';
|
|
57
|
+
import '../utils-DKya4HZS.js';
|
|
58
|
+
import 'ua-parser-js';
|
|
56
59
|
import '../search-H0uYy0W-.js';
|
|
57
|
-
import 'zustand/shallow';
|
|
58
60
|
import '../purify.es-_duHfPgC.js';
|
|
59
61
|
import '@bigbinary/neeto-commons-frontend/v2/react-utils/useDisplayErrorPage';
|
|
60
62
|
import 'react-helmet';
|