@bigbinary/neeto-molecules 4.1.17 → 4.1.19
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/Builder.js +1 -1
- package/dist/CalendarView.js +1 -1
- package/dist/{Columns-D51hN86M.js → Columns-6JwGF3TU.js} +2 -2
- package/dist/{Columns-D51hN86M.js.map → Columns-6JwGF3TU.js.map} +1 -1
- package/dist/Columns.js +1 -1
- package/dist/FloatingActionMenu.js +113 -67
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/IpRestriction.js +47 -47
- package/dist/IpRestriction.js.map +1 -1
- package/dist/KeyboardShortcuts.js +1 -1
- package/dist/KeyboardShortcuts.js.map +1 -1
- package/dist/Onboarding.js +1 -236
- package/dist/Onboarding.js.map +1 -1
- package/dist/PhoneNumber.js +4 -4
- package/dist/PhoneNumber.js.map +1 -1
- package/dist/SendToFields.js +1 -1
- package/dist/SessionEnvironment.js +1 -1
- package/dist/Sidebar.js +1 -1
- package/dist/SubHeader.js +1 -1
- package/dist/Taxonomy.js +1 -1
- package/dist/cjs/BrowserSupport.js +14 -14
- package/dist/cjs/BrowserSupport.js.map +1 -1
- package/dist/cjs/Builder.js +8 -8
- package/dist/cjs/Builder.js.map +1 -1
- package/dist/cjs/Engagements.js +3 -3
- package/dist/cjs/Engagements.js.map +1 -1
- package/dist/cjs/FloatingActionMenu.js +115 -69
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/IconPicker.js +3 -3
- package/dist/cjs/IconPicker.js.map +1 -1
- package/dist/cjs/Insights.js +24 -24
- package/dist/cjs/Insights.js.map +1 -1
- package/dist/cjs/IpRestriction.js +52 -52
- package/dist/cjs/IpRestriction.js.map +1 -1
- package/dist/cjs/KeyboardShortcuts.js +8 -8
- package/dist/cjs/KeyboardShortcuts.js.map +1 -1
- package/dist/cjs/MadeWith.js +3 -3
- package/dist/cjs/MadeWith.js.map +1 -1
- package/dist/cjs/NeetoWidget.js +6 -6
- package/dist/cjs/NeetoWidget.js.map +1 -1
- package/dist/cjs/Onboarding.js +1 -236
- package/dist/cjs/Onboarding.js.map +1 -1
- package/dist/cjs/PhoneNumber.js +3 -3
- package/dist/cjs/PhoneNumber.js.map +1 -1
- package/dist/cjs/Schedule.js +6 -6
- package/dist/cjs/Schedule.js.map +1 -1
- package/dist/cjs/SendToFields.js +4 -4
- package/dist/cjs/SendToFields.js.map +1 -1
- package/dist/cjs/SessionEnvironment.js +8 -8
- package/dist/cjs/SessionEnvironment.js.map +1 -1
- package/dist/cjs/Settings.js +6 -6
- package/dist/cjs/Settings.js.map +1 -1
- package/dist/cjs/Sidebar.js +3 -3
- package/dist/cjs/Sidebar.js.map +1 -1
- package/dist/cjs/StatusDropdown.js +7 -7
- package/dist/cjs/StatusDropdown.js.map +1 -1
- package/dist/cjs/{phone-number-CKeWRcTL.js → phone-number-ycxkC0mm.js} +10 -10
- package/dist/cjs/{phone-number-CKeWRcTL.js.map → phone-number-ycxkC0mm.js.map} +1 -1
- package/dist/{phone-number-HpVGHffA.js → phone-number--BBsxLSh.js} +2 -2
- package/dist/{phone-number-HpVGHffA.js.map → phone-number--BBsxLSh.js.map} +1 -1
- package/package.json +3 -3
- package/src/translations/en.json +3 -4
package/dist/Builder.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
2
|
import { memo, createElement, useState, useMemo, useRef, useEffect } from 'react';
|
|
3
3
|
import classnames from 'classnames';
|
|
4
|
-
import { noop,
|
|
4
|
+
import { noop, isPresent, isNotEmpty, findById, hyphenate } from '@bigbinary/neeto-cist';
|
|
5
5
|
import { withT, useBreakpoints } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
6
6
|
import Collapse from '@bigbinary/neeto-icons/Collapse';
|
|
7
7
|
import Button from '@bigbinary/neetoui/Button';
|
package/dist/CalendarView.js
CHANGED
|
@@ -24,7 +24,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
24
24
|
import 'classnames';
|
|
25
25
|
import '@bigbinary/neeto-commons-frontend/react-utils';
|
|
26
26
|
import '@bigbinary/neeto-icons/Column';
|
|
27
|
-
import './Columns-
|
|
27
|
+
import './Columns-6JwGF3TU.js';
|
|
28
28
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
29
29
|
import '@dnd-kit/core';
|
|
30
30
|
import '@dnd-kit/sortable';
|
|
@@ -500,5 +500,5 @@ var Columns = function Columns(_ref) {
|
|
|
500
500
|
};
|
|
501
501
|
Columns.displayName = "Columns";
|
|
502
502
|
|
|
503
|
-
export {
|
|
504
|
-
//# sourceMappingURL=Columns-
|
|
503
|
+
export { COLUMNS_ORDER_STORAGE_KEY as C, HIDDEN_COLUMNS_STORAGE_KEY as H, TABLE_CONFIGURATION_QUERY_KEY as T, Columns as a, useTableConfigurations as u };
|
|
504
|
+
//# sourceMappingURL=Columns-6JwGF3TU.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Columns-D51hN86M.js","sources":["../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../src/components/Columns/Item.jsx","../src/components/Columns/api.js","../src/components/Columns/constants.js","../src/components/Columns/useTableConfigurationsApi.js","../src/components/Columns/useTableConfigurations.js","../src/components/Columns/utils.js","../src/components/Columns/Columns.jsx"],"sourcesContent":["import { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from 'react';\n\nfunction useCombinedRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n return useMemo(() => node => {\n refs.forEach(ref => ref(node));\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n refs);\n}\n\n// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\nconst canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\nfunction isWindow(element) {\n const elementString = Object.prototype.toString.call(element);\n return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]\n elementString === '[object global]';\n}\n\nfunction isNode(node) {\n return 'nodeType' in node;\n}\n\nfunction getWindow(target) {\n var _target$ownerDocument, _target$ownerDocument2;\n\n if (!target) {\n return window;\n }\n\n if (isWindow(target)) {\n return target;\n }\n\n if (!isNode(target)) {\n return window;\n }\n\n return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;\n}\n\nfunction isDocument(node) {\n const {\n Document\n } = getWindow(node);\n return node instanceof Document;\n}\n\nfunction isHTMLElement(node) {\n if (isWindow(node)) {\n return false;\n }\n\n return node instanceof getWindow(node).HTMLElement;\n}\n\nfunction isSVGElement(node) {\n return node instanceof getWindow(node).SVGElement;\n}\n\nfunction getOwnerDocument(target) {\n if (!target) {\n return document;\n }\n\n if (isWindow(target)) {\n return target.document;\n }\n\n if (!isNode(target)) {\n return document;\n }\n\n if (isDocument(target)) {\n return target;\n }\n\n if (isHTMLElement(target) || isSVGElement(target)) {\n return target.ownerDocument;\n }\n\n return document;\n}\n\n/**\r\n * A hook that resolves to useEffect on the server and useLayoutEffect on the client\r\n * @param callback {function} Callback function that is invoked when the dependencies of the hook change\r\n */\n\nconst useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\n\nfunction useEvent(handler) {\n const handlerRef = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n handlerRef.current = handler;\n });\n return useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return handlerRef.current == null ? void 0 : handlerRef.current(...args);\n }, []);\n}\n\nfunction useInterval() {\n const intervalRef = useRef(null);\n const set = useCallback((listener, duration) => {\n intervalRef.current = setInterval(listener, duration);\n }, []);\n const clear = useCallback(() => {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n return [set, clear];\n}\n\nfunction useLatestValue(value, dependencies) {\n if (dependencies === void 0) {\n dependencies = [value];\n }\n\n const valueRef = useRef(value);\n useIsomorphicLayoutEffect(() => {\n if (valueRef.current !== value) {\n valueRef.current = value;\n }\n }, dependencies);\n return valueRef;\n}\n\nfunction useLazyMemo(callback, dependencies) {\n const valueRef = useRef();\n return useMemo(() => {\n const newValue = callback(valueRef.current);\n valueRef.current = newValue;\n return newValue;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [...dependencies]);\n}\n\nfunction useNodeRef(onChange) {\n const onChangeHandler = useEvent(onChange);\n const node = useRef(null);\n const setNodeRef = useCallback(element => {\n if (element !== node.current) {\n onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);\n }\n\n node.current = element;\n }, //eslint-disable-next-line\n []);\n return [node, setNodeRef];\n}\n\nfunction usePrevious(value) {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref.current;\n}\n\nlet ids = {};\nfunction useUniqueId(prefix, value) {\n return useMemo(() => {\n if (value) {\n return value;\n }\n\n const id = ids[prefix] == null ? 0 : ids[prefix] + 1;\n ids[prefix] = id;\n return prefix + \"-\" + id;\n }, [prefix, value]);\n}\n\nfunction createAdjustmentFn(modifier) {\n return function (object) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((accumulator, adjustment) => {\n const entries = Object.entries(adjustment);\n\n for (const [key, valueAdjustment] of entries) {\n const value = accumulator[key];\n\n if (value != null) {\n accumulator[key] = value + modifier * valueAdjustment;\n }\n }\n\n return accumulator;\n }, { ...object\n });\n };\n}\n\nconst add = /*#__PURE__*/createAdjustmentFn(1);\nconst subtract = /*#__PURE__*/createAdjustmentFn(-1);\n\nfunction hasViewportRelativeCoordinates(event) {\n return 'clientX' in event && 'clientY' in event;\n}\n\nfunction isKeyboardEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n KeyboardEvent\n } = getWindow(event.target);\n return KeyboardEvent && event instanceof KeyboardEvent;\n}\n\nfunction isTouchEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n TouchEvent\n } = getWindow(event.target);\n return TouchEvent && event instanceof TouchEvent;\n}\n\n/**\r\n * Returns the normalized x and y coordinates for mouse and touch events.\r\n */\n\nfunction getEventCoordinates(event) {\n if (isTouchEvent(event)) {\n if (event.touches && event.touches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.touches[0];\n return {\n x,\n y\n };\n } else if (event.changedTouches && event.changedTouches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.changedTouches[0];\n return {\n x,\n y\n };\n }\n }\n\n if (hasViewportRelativeCoordinates(event)) {\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n\n return null;\n}\n\nconst CSS = /*#__PURE__*/Object.freeze({\n Translate: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n x,\n y\n } = transform;\n return \"translate3d(\" + (x ? Math.round(x) : 0) + \"px, \" + (y ? Math.round(y) : 0) + \"px, 0)\";\n }\n\n },\n Scale: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n scaleX,\n scaleY\n } = transform;\n return \"scaleX(\" + scaleX + \") scaleY(\" + scaleY + \")\";\n }\n\n },\n Transform: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');\n }\n\n },\n Transition: {\n toString(_ref) {\n let {\n property,\n duration,\n easing\n } = _ref;\n return property + \" \" + duration + \"ms \" + easing;\n }\n\n }\n});\n\nconst SELECTOR = 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]';\nfunction findFirstFocusableNode(element) {\n if (element.matches(SELECTOR)) {\n return element;\n }\n\n return element.querySelector(SELECTOR);\n}\n\nexport { CSS, add, canUseDOM, findFirstFocusableNode, getEventCoordinates, getOwnerDocument, getWindow, hasViewportRelativeCoordinates, isDocument, isHTMLElement, isKeyboardEvent, isNode, isSVGElement, isTouchEvent, isWindow, subtract, useCombinedRefs, useEvent, useInterval, useIsomorphicLayoutEffect, useLatestValue, useLazyMemo, useNodeRef, usePrevious, useUniqueId };\n//# sourceMappingURL=utilities.esm.js.map\n","import { useSortable } from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport classNames from \"classnames\";\nimport { Reorder } from \"neetoicons\";\nimport { Checkbox, Label } from \"neetoui\";\n\nconst Item = ({\n column,\n hiddenColumns,\n checkboxProps,\n onToggle,\n isTableConfigurationFetching,\n}) => {\n const { key, title } = column;\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n isOver,\n over,\n active,\n } = useSortable({ id: key });\n\n const dragStyle = {\n transform: isDragging ? CSS.Transform.toString(transform) : undefined,\n transition,\n opacity: isDragging ? 0.5 : 1,\n };\n\n const isIndicatorVisible = !isDragging && isOver;\n const draggedIndex = active?.data?.current?.sortable?.index;\n const targetIndex = over?.data?.current?.sortable?.index;\n\n return (\n <div>\n <div\n className={classNames({\n \"neeto-ui-bg-gray-200 h-1 w-full\":\n isIndicatorVisible && targetIndex < draggedIndex,\n })}\n />\n <div\n className=\"neeto-molecules-columns__sortable-item\"\n data-testid=\"column-sortable-item\"\n ref={setNodeRef}\n style={dragStyle}\n >\n <Label\n className=\"neeto-ui-flex neeto-ui-w-full hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer neeto-ui-items-center px-4 py-2\"\n htmlFor={key}\n >\n <div\n {...attributes}\n {...listeners}\n className=\"neeto-ui-mr-2 neeto-ui-cursor-grab neeto-ui-flex neeto-ui-items-center\"\n data-testid=\"column-drag-handle\"\n >\n <Reorder className=\"neeto-ui-text-gray-800\" size={18} />\n </div>\n <Checkbox\n checked={!hiddenColumns.includes(key)}\n data-testid=\"neeto-ui-columns-checkbox\"\n disabled={isTableConfigurationFetching}\n id={key}\n label={title}\n name={key}\n onChange={onToggle}\n {...checkboxProps}\n />\n </Label>\n </div>\n <div\n className={classNames({\n \"neeto-ui-bg-gray-200 h-1 w-full\":\n isIndicatorVisible && targetIndex > draggedIndex,\n })}\n />\n </div>\n );\n};\n\nexport default Item;\n","import axios from \"axios\";\n\nconst baseUrl = \"api/v1/table_configurations\";\n\nconst fetch = tableKey => axios.get(`${baseUrl}/${tableKey}`);\n\nconst create = payload => axios.post(baseUrl, { tableConfiguration: payload });\n\nconst update = ({ tableKey, payload }) =>\n axios.patch(`${baseUrl}/${tableKey}`, { tableConfiguration: payload });\n\nconst destroy = tableKey => axios.delete(`${baseUrl}/${tableKey}`);\n\nconst tableConfigurationApi = { fetch, create, update, destroy };\n\nexport default tableConfigurationApi;\n","export const HIDDEN_COLUMNS_STORAGE_KEY = \"neeto-molecules-hidden-columns\";\nexport const COLUMNS_ORDER_STORAGE_KEY = \"neeto-molecules-columns-order\";\nexport const TABLE_CONFIGURATION_QUERY_KEY = \"table-configuration\";\n","import { useQuery } from \"@tanstack/react-query\";\nimport useMutationWithInvalidation from \"neetocommons/react-utils/useMutationWithInvalidation\";\n\nimport tableConfigurationApi from \"./api\";\nimport { TABLE_CONFIGURATION_QUERY_KEY } from \"./constants.js\";\n\nconst useFetchTableConfiguration = ({ tableKey, options = {} }) =>\n useQuery({\n queryKey: [TABLE_CONFIGURATION_QUERY_KEY, tableKey],\n enabled: !!tableKey,\n queryFn: () => tableConfigurationApi.fetch(tableKey),\n ...options,\n });\n\nconst useUpdateTableConfiguration = (tableKey, options = {}) =>\n useMutationWithInvalidation(tableConfigurationApi.update, {\n keysToInvalidate: [[TABLE_CONFIGURATION_QUERY_KEY, tableKey]],\n ...options,\n });\n\nconst useDestroyTableConfiguration = (tableKey, options = {}) =>\n useMutationWithInvalidation(tableConfigurationApi.destroy, {\n keysToInvalidate: [[TABLE_CONFIGURATION_QUERY_KEY, tableKey]],\n ...options,\n });\n\nexport {\n useFetchTableConfiguration,\n useUpdateTableConfiguration,\n useDestroyTableConfiguration,\n};\n","import { useEffect, useMemo, useCallback } from \"react\";\n\nimport { isNotEqualDeep, isNotEmpty, noop } from \"neetocist\";\nimport { isEmpty, pluck, prop } from \"ramda\";\n\nimport {\n useFetchTableConfiguration,\n useUpdateTableConfiguration,\n useDestroyTableConfiguration,\n} from \"./useTableConfigurationsApi.js\";\n\nconst useTableConfigurations = (\n tableKey,\n columnData,\n onMutationSuccess = noop,\n allowConfigurationResetOnUpdate = true,\n defaultHiddenColumns = []\n) => {\n const {\n data: tableConfiguration,\n isLoading,\n isFetching,\n } = useFetchTableConfiguration({ tableKey });\n\n const { mutate: updateConfiguration } = useUpdateTableConfiguration(\n tableKey,\n { onSuccess: onMutationSuccess }\n );\n\n const { mutate: destroyConfiguration } = useDestroyTableConfiguration(\n tableKey,\n { onSuccess: onMutationSuccess }\n );\n\n const processColumnsWithConfiguration = useCallback(\n (originalColumns = [], existingColumnConfiguration = []) => {\n if (isEmpty(existingColumnConfiguration)) {\n return originalColumns;\n }\n\n const originalColumnsByKey = new Map(\n originalColumns?.filter(prop(\"key\")).map(column => [column.key, column])\n );\n\n const configurationByKey = new Map(\n existingColumnConfiguration.map(config => [config.key, config])\n );\n\n const orderedConfiguredColumns = existingColumnConfiguration\n .map(config => originalColumnsByKey.get(config.key))\n .filter(Boolean);\n\n const unconfiguredOriginalColumns = originalColumns.filter(\n column => column.key && !configurationByKey.has(column.key)\n );\n\n return [...orderedConfiguredColumns, ...unconfiguredOriginalColumns];\n },\n []\n );\n\n const hasAdditionalColumns = useMemo(() => {\n if (!tableConfiguration?.columns || !columnData) {\n return false;\n }\n\n const configurationKeys = pluck(\"key\", tableConfiguration.columns).sort();\n const dataKeys = pluck(\"key\", columnData).sort();\n\n return isNotEqualDeep(configurationKeys, dataKeys);\n }, [tableConfiguration, columnData]);\n\n const shouldApplyTableConfiguration = useMemo(\n () =>\n !isLoading &&\n tableConfiguration?.columns &&\n isNotEmpty(tableConfiguration?.columns) &&\n !hasAdditionalColumns,\n [tableConfiguration, isLoading, hasAdditionalColumns]\n );\n\n useEffect(() => {\n if (\n hasAdditionalColumns &&\n tableConfiguration &&\n allowConfigurationResetOnUpdate\n ) {\n destroyConfiguration(tableKey);\n }\n }, [hasAdditionalColumns, tableKey, allowConfigurationResetOnUpdate]);\n\n const allProcessedColumns = useMemo(() => {\n if (\n !isLoading &&\n isNotEmpty(tableConfiguration?.columns) &&\n !hasAdditionalColumns\n ) {\n return processColumnsWithConfiguration(\n columnData,\n tableConfiguration?.columns\n );\n }\n\n return columnData || [];\n }, [\n isLoading,\n tableConfiguration?.columns,\n hasAdditionalColumns,\n columnData,\n processColumnsWithConfiguration,\n ]);\n\n const existingColumnConfiguration = useMemo(() => {\n if (shouldApplyTableConfiguration) {\n return tableConfiguration.columns;\n }\n\n if (!columnData || isEmpty(columnData)) {\n return [];\n }\n\n return columnData.map(column => ({\n key: column.key,\n isShown: !defaultHiddenColumns.includes(column.key),\n }));\n }, [\n shouldApplyTableConfiguration,\n columnData,\n tableConfiguration?.columns,\n defaultHiddenColumns,\n ]);\n\n const customizedColumns = useMemo(() => {\n const visibleColumnsConfig = existingColumnConfiguration.filter(\n prop(\"isShown\")\n );\n const visibleColumnKeys = pluck(\"key\", visibleColumnsConfig);\n\n return allProcessedColumns.filter(column =>\n visibleColumnKeys.includes(column.key)\n );\n }, [allProcessedColumns, existingColumnConfiguration]);\n\n const updateColumns = updatedColumns => {\n updateConfiguration({\n tableKey,\n payload: { table_key: tableKey, columns: updatedColumns },\n });\n };\n\n const hideColumn = columnKey => {\n updateColumns(\n existingColumnConfiguration.map(column =>\n column.key === columnKey ? { ...column, isShown: false } : column\n )\n );\n };\n\n const showColumn = columnKey => {\n updateColumns(\n existingColumnConfiguration.map(column =>\n column.key === columnKey ? { ...column, isShown: true } : column\n )\n );\n };\n\n return {\n customizedColumns, // Only visible columns (for displaying the columns in the table)\n allProcessedColumns, // All columns (for displaying the columns in the Subheader)\n isTableConfigurationLoading: isLoading,\n isTableConfigurationFetching: isFetching,\n existingColumnConfiguration,\n hideColumn,\n showColumn,\n updateColumns,\n destroyConfiguration,\n };\n};\n\nexport default useTableConfigurations;\n","import { existsBy, removeBy } from \"neetocist\";\nimport { filter, includes, toLower, trim } from \"ramda\";\n\nexport const getHidableColumns = columnData =>\n removeBy({ isHidable: false }, columnData);\n\nexport const filterBySearchTerm = (searchTerm, columns) =>\n filter(\n ({ title }) => includes(trim(toLower(searchTerm)), trim(toLower(title))),\n columns\n );\n\nexport const removeDeletedColumns = (hiddenColumns, columnData) =>\n hiddenColumns.filter(hiddenColumn =>\n existsBy({ dataIndex: hiddenColumn }, columnData)\n );\n","import { useState } from \"react\";\n\nimport { DndContext, closestCenter } from \"@dnd-kit/core\";\nimport {\n SortableContext,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport i18next from \"i18next\";\nimport { isNotEmpty, findIndexBy, noop } from \"neetocist\";\nimport { Search } from \"neetoicons\";\nimport { Checkbox, Dropdown, Input, Label, Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { assoc, isEmpty, pluck, includes } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport \"./columns.scss\";\nimport Item from \"./Item\";\nimport useTableConfigurations from \"./useTableConfigurations.js\";\nimport { filterBySearchTerm, getHidableColumns } from \"./utils.js\";\n\nconst Columns = ({\n actionBlock,\n checkboxProps = {},\n columnData = [],\n isSearchable = false,\n tableKey = \"\",\n noColumnMessage = i18next.t(\"neetoMolecules.columns.noColumns\"),\n searchProps = {},\n allowConfigurationResetOnUpdate = true,\n onMutationSuccess = noop,\n defaultHiddenColumns = [],\n ...dropdownProps\n}) => {\n const { Divider, Menu, MenuItem } = Dropdown;\n const [searchTerm, setSearchTerm] = useState(\"\");\n const { t } = useTranslation();\n\n const {\n allProcessedColumns,\n existingColumnConfiguration,\n hideColumn,\n showColumn,\n updateColumns,\n destroyConfiguration,\n isTableConfigurationFetching,\n } = useTableConfigurations(\n tableKey,\n columnData,\n onMutationSuccess,\n allowConfigurationResetOnUpdate,\n defaultHiddenColumns\n );\n\n const hiddenColumns = pluck(\n \"key\",\n existingColumnConfiguration.filter(column => column.isShown === false)\n );\n\n const handleDragEnd = event => {\n const { active, over } = event;\n if (!over || active.id === over.id) return;\n\n const oldIndex = findIndexBy(\n { key: active.id },\n existingColumnConfiguration\n );\n\n const newIndex = findIndexBy({ key: over.id }, existingColumnConfiguration);\n\n if (oldIndex === -1 || newIndex === -1) return;\n\n const newOrder = [...existingColumnConfiguration];\n const [movedItem] = newOrder.splice(oldIndex, 1);\n newOrder.splice(newIndex, 0, movedItem);\n updateColumns(newOrder);\n };\n\n const columns = getHidableColumns(allProcessedColumns);\n const filteredColumns = filterBySearchTerm(searchTerm, columns);\n\n const handleHideAllColumns = () => {\n const columnsToHideKeys = pluck(\"key\", columns);\n\n updateColumns(\n existingColumnConfiguration.map(column =>\n includes(column.key, columnsToHideKeys)\n ? assoc(\"isShown\", false, column)\n : column\n )\n );\n };\n\n const handleChange = ({ target: { name: dataIndex, checked } }) => {\n if (checked) showColumn(dataIndex);\n else hideColumn(dataIndex);\n };\n\n const handleSearch = ({ target: { value } }) => setSearchTerm(value);\n\n return (\n <Dropdown\n appendTo={document.body}\n buttonSize=\"medium\"\n buttonStyle=\"text\"\n closeOnSelect={false}\n position=\"bottom-end\"\n onClose={() => setSearchTerm(\"\")}\n {...dropdownProps}\n >\n <Menu>\n <div\n className=\"neeto-molecules-columns__container\"\n data-testid=\"customize-columns-dropdown-container\"\n >\n {isSearchable && (\n <Input\n className=\"px-4 py-2\"\n data-testid=\"neeto-ui-columns-search\"\n placeholder={t(\"neetoMolecules.columns.search\")}\n prefix={<Search />}\n type=\"search\"\n value={searchTerm}\n onChange={handleSearch}\n {...searchProps}\n />\n )}\n {isEmpty(filteredColumns) && (\n <span className=\"neeto-ui-flex neeto-ui-flex-col neeto-ui-items-center neeto-ui-p-2\">\n {noColumnMessage}\n </span>\n )}\n {isNotEmpty(filteredColumns) && !searchTerm && (\n <DndContext\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n >\n <SortableContext\n items={pluck(\"key\", filteredColumns)}\n strategy={verticalListSortingStrategy}\n >\n {filteredColumns.map(column => (\n <Item\n {...{\n checkboxProps,\n column,\n hiddenColumns,\n isTableConfigurationFetching,\n }}\n key={column.key}\n onToggle={handleChange}\n />\n ))}\n </SortableContext>\n </DndContext>\n )}\n {isNotEmpty(filteredColumns) &&\n searchTerm &&\n filteredColumns.map(({ key, title }) => (\n <MenuItem key={key}>\n <Label\n className=\"neeto-ui-flex neeto-ui-w-full hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer px-4 py-2\"\n htmlFor={key}\n >\n <Checkbox\n checked={!hiddenColumns.includes(key)}\n data-testid=\"neeto-ui-columns-checkbox\"\n id={key}\n label={title}\n name={key}\n onChange={handleChange}\n {...checkboxProps}\n />\n </Label>\n </MenuItem>\n ))}\n <Divider />\n {!!actionBlock && (\n <>\n {actionBlock}\n <Divider />\n </>\n )}\n <div className=\"flex justify-end gap-2 p-1 pr-3\">\n <Button\n data-testid=\"column-visibility-hide-all-button\"\n label={t(\"neetoMolecules.columns.hideAll\")}\n style=\"tertiary\"\n onClick={handleHideAllColumns}\n />\n <Button\n data-testid=\"column-visibility-reset-button\"\n label={t(\"neetoMolecules.columns.reset\")}\n style=\"secondary\"\n onClick={() => destroyConfiguration(tableKey)}\n />\n </div>\n </div>\n </Menu>\n </Dropdown>\n );\n};\n\nColumns.propTypes = {\n /**\n * Controls whether the table configuration should be reset on adding custom fields (optional).\n */\n allowConfigurationResetOnUpdate: PropTypes.bool,\n /**\n * Extra action items that can be added at the end of the dropdown (optional).\n */\n actionBlock: PropTypes.element,\n /**\n * Additional props for the checkboxes in the dropdown (optional).\n */\n checkboxProps: PropTypes.object,\n /**\n * The list of columns from which the dropdown options are built (required).\n */\n columnData: PropTypes.array,\n /**\n * Controls whether the dropdown options should be searchable (optional).\n */\n isSearchable: PropTypes.bool,\n /**\n * The table key used to identify table configuration in the API (required).\n */\n tableKey: PropTypes.string,\n /**\n * The message to be shown when there are no columns to be displayed in the dropdown (optional).\n */\n noColumnMessage: PropTypes.string,\n /**\n * Props to be passed to the search input in the column dropdown. Only works when `isSearchable` is set to `true` (optional).\n */\n searchProps: PropTypes.object,\n /**\n * The function will be called when the mutation is successful (optional).\n */\n onMutationSuccess: PropTypes.func,\n};\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n"],"names":["Item","_ref","_active$data","_over$data","column","hiddenColumns","checkboxProps","onToggle","isTableConfigurationFetching","key","title","_useSortable","useSortable","id","attributes","listeners","setNodeRef","transform","transition","isDragging","isOver","over","active","dragStyle","CSS","Transform","toString","undefined","opacity","isIndicatorVisible","draggedIndex","data","current","sortable","index","targetIndex","_jsxs","children","_jsx","className","classNames","ref","style","Label","htmlFor","_objectSpread","Reorder","size","Checkbox","checked","includes","disabled","label","name","onChange","baseUrl","fetch","tableKey","axios","get","concat","create","payload","post","tableConfiguration","update","patch","destroy","tableConfigurationApi","HIDDEN_COLUMNS_STORAGE_KEY","COLUMNS_ORDER_STORAGE_KEY","TABLE_CONFIGURATION_QUERY_KEY","useFetchTableConfiguration","_ref$options","options","useQuery","queryKey","enabled","queryFn","useUpdateTableConfiguration","arguments","length","useMutationWithInvalidation","keysToInvalidate","useDestroyTableConfiguration","useTableConfigurations","columnData","onMutationSuccess","noop","allowConfigurationResetOnUpdate","defaultHiddenColumns","_useFetchTableConfigu","isLoading","isFetching","_useUpdateTableConfig","onSuccess","updateConfiguration","mutate","_useDestroyTableConfi","destroyConfiguration","processColumnsWithConfiguration","useCallback","originalColumns","existingColumnConfiguration","isEmpty","originalColumnsByKey","Map","filter","prop","map","configurationByKey","config","orderedConfiguredColumns","Boolean","unconfiguredOriginalColumns","has","_toConsumableArray","hasAdditionalColumns","useMemo","columns","configurationKeys","pluck","sort","dataKeys","isNotEqualDeep","shouldApplyTableConfiguration","isNotEmpty","useEffect","allProcessedColumns","isShown","customizedColumns","visibleColumnsConfig","visibleColumnKeys","updateColumns","updatedColumns","table_key","hideColumn","columnKey","showColumn","isTableConfigurationLoading","getHidableColumns","removeBy","isHidable","filterBySearchTerm","searchTerm","trim","toLower","Columns","actionBlock","_ref$checkboxProps","_ref$columnData","_ref$isSearchable","isSearchable","_ref$tableKey","_ref$noColumnMessage","noColumnMessage","i18next","t","_ref$searchProps","searchProps","_ref$allowConfigurati","_ref$onMutationSucces","_ref$defaultHiddenCol","dropdownProps","_objectWithoutProperties","_excluded","Divider","Dropdown","Menu","MenuItem","_useState","useState","_useState2","_slicedToArray","setSearchTerm","_useTranslation","useTranslation","_useTableConfiguratio","handleDragEnd","event","oldIndex","findIndexBy","newIndex","newOrder","_newOrder$splice","splice","_newOrder$splice2","movedItem","filteredColumns","handleHideAllColumns","columnsToHideKeys","assoc","handleChange","_ref2","_ref2$target","target","dataIndex","handleSearch","_ref3","value","appendTo","document","body","buttonSize","buttonStyle","closeOnSelect","position","onClose","Input","placeholder","prefix","Search","type","DndContext","collisionDetection","closestCenter","onDragEnd","SortableContext","items","strategy","verticalListSortingStrategy","_createElement","_ref4","_Fragment","Button","onClick","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8QA,MAAM,GAAG,gBAAgB,MAAM,CAAC,MAAM,CAAC;AACvC,EAAE,SAAS,EAAE;AACb,IAAI,QAAQ,CAAC,SAAS,EAAE;AACxB,MAAM,IAAI,CAAC,SAAS,EAAE;AACtB,QAAQ;AACR,MAAM;;AAEN,MAAM,MAAM;AACZ,QAAQ,CAAC;AACT,QAAQ;AACR,OAAO,GAAG,SAAS;AACnB,MAAM,OAAO,cAAc,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ;AACnG,IAAI;;AAEJ,GAAG;AACH,EAAE,KAAK,EAAE;AACT,IAAI,Q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ZhH,IAAA,CAAA2L,QAAA,EAAA;AAAA1L,UAAAA,QAAA,GACG+G,WAAW,eACZ9G,GAAA,CAACgI,OAAO,IAAE,CAAC;SACX,CACH,eACDlI,IAAA,CAAA,KAAA,EAAA;AAAKG,UAAAA,SAAS,EAAC,iCAAiC;UAAAF,QAAA,EAAA,cAC9CC,GAAA,CAAC0L,MAAM,EAAA;AACL,YAAA,aAAA,EAAY,mCAAmC;AAC/C5K,YAAAA,KAAK,EAAEyG,CAAC,CAAC,gCAAgC,CAAE;AAC3CnH,YAAAA,KAAK,EAAC,UAAU;AAChBuL,YAAAA,OAAO,EAAEpC;AAAqB,WAC/B,CAAC,eACFvJ,GAAA,CAAC0L,MAAM,EAAA;AACL,YAAA,aAAA,EAAY,gCAAgC;AAC5C5K,YAAAA,KAAK,EAAEyG,CAAC,CAAC,8BAA8B,CAAE;AACzCnH,YAAAA,KAAK,EAAC,WAAW;YACjBuL,OAAO,EAAE,SAATA,OAAOA,GAAA;cAAA,OAAQ9H,oBAAoB,CAAC1C,QAAQ,CAAC;AAAA,YAAA;AAAC,WAC/C,CAAC;AAAA,SACC,CAAC;OACH;KACD;AAAC,GAAA,CACC,CAAC;AAEf;AAyCA0F,OAAO,CAAC+E,WAAW,GAAG,SAAS;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"Columns-6JwGF3TU.js","sources":["../node_modules/@dnd-kit/utilities/dist/utilities.esm.js","../src/components/Columns/Item.jsx","../src/components/Columns/api.js","../src/components/Columns/constants.js","../src/components/Columns/useTableConfigurationsApi.js","../src/components/Columns/useTableConfigurations.js","../src/components/Columns/utils.js","../src/components/Columns/Columns.jsx"],"sourcesContent":["import { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from 'react';\n\nfunction useCombinedRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n return useMemo(() => node => {\n refs.forEach(ref => ref(node));\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n refs);\n}\n\n// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js\nconst canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\nfunction isWindow(element) {\n const elementString = Object.prototype.toString.call(element);\n return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]\n elementString === '[object global]';\n}\n\nfunction isNode(node) {\n return 'nodeType' in node;\n}\n\nfunction getWindow(target) {\n var _target$ownerDocument, _target$ownerDocument2;\n\n if (!target) {\n return window;\n }\n\n if (isWindow(target)) {\n return target;\n }\n\n if (!isNode(target)) {\n return window;\n }\n\n return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;\n}\n\nfunction isDocument(node) {\n const {\n Document\n } = getWindow(node);\n return node instanceof Document;\n}\n\nfunction isHTMLElement(node) {\n if (isWindow(node)) {\n return false;\n }\n\n return node instanceof getWindow(node).HTMLElement;\n}\n\nfunction isSVGElement(node) {\n return node instanceof getWindow(node).SVGElement;\n}\n\nfunction getOwnerDocument(target) {\n if (!target) {\n return document;\n }\n\n if (isWindow(target)) {\n return target.document;\n }\n\n if (!isNode(target)) {\n return document;\n }\n\n if (isDocument(target)) {\n return target;\n }\n\n if (isHTMLElement(target) || isSVGElement(target)) {\n return target.ownerDocument;\n }\n\n return document;\n}\n\n/**\r\n * A hook that resolves to useEffect on the server and useLayoutEffect on the client\r\n * @param callback {function} Callback function that is invoked when the dependencies of the hook change\r\n */\n\nconst useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;\n\nfunction useEvent(handler) {\n const handlerRef = useRef(handler);\n useIsomorphicLayoutEffect(() => {\n handlerRef.current = handler;\n });\n return useCallback(function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return handlerRef.current == null ? void 0 : handlerRef.current(...args);\n }, []);\n}\n\nfunction useInterval() {\n const intervalRef = useRef(null);\n const set = useCallback((listener, duration) => {\n intervalRef.current = setInterval(listener, duration);\n }, []);\n const clear = useCallback(() => {\n if (intervalRef.current !== null) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n return [set, clear];\n}\n\nfunction useLatestValue(value, dependencies) {\n if (dependencies === void 0) {\n dependencies = [value];\n }\n\n const valueRef = useRef(value);\n useIsomorphicLayoutEffect(() => {\n if (valueRef.current !== value) {\n valueRef.current = value;\n }\n }, dependencies);\n return valueRef;\n}\n\nfunction useLazyMemo(callback, dependencies) {\n const valueRef = useRef();\n return useMemo(() => {\n const newValue = callback(valueRef.current);\n valueRef.current = newValue;\n return newValue;\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [...dependencies]);\n}\n\nfunction useNodeRef(onChange) {\n const onChangeHandler = useEvent(onChange);\n const node = useRef(null);\n const setNodeRef = useCallback(element => {\n if (element !== node.current) {\n onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);\n }\n\n node.current = element;\n }, //eslint-disable-next-line\n []);\n return [node, setNodeRef];\n}\n\nfunction usePrevious(value) {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n }, [value]);\n return ref.current;\n}\n\nlet ids = {};\nfunction useUniqueId(prefix, value) {\n return useMemo(() => {\n if (value) {\n return value;\n }\n\n const id = ids[prefix] == null ? 0 : ids[prefix] + 1;\n ids[prefix] = id;\n return prefix + \"-\" + id;\n }, [prefix, value]);\n}\n\nfunction createAdjustmentFn(modifier) {\n return function (object) {\n for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n adjustments[_key - 1] = arguments[_key];\n }\n\n return adjustments.reduce((accumulator, adjustment) => {\n const entries = Object.entries(adjustment);\n\n for (const [key, valueAdjustment] of entries) {\n const value = accumulator[key];\n\n if (value != null) {\n accumulator[key] = value + modifier * valueAdjustment;\n }\n }\n\n return accumulator;\n }, { ...object\n });\n };\n}\n\nconst add = /*#__PURE__*/createAdjustmentFn(1);\nconst subtract = /*#__PURE__*/createAdjustmentFn(-1);\n\nfunction hasViewportRelativeCoordinates(event) {\n return 'clientX' in event && 'clientY' in event;\n}\n\nfunction isKeyboardEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n KeyboardEvent\n } = getWindow(event.target);\n return KeyboardEvent && event instanceof KeyboardEvent;\n}\n\nfunction isTouchEvent(event) {\n if (!event) {\n return false;\n }\n\n const {\n TouchEvent\n } = getWindow(event.target);\n return TouchEvent && event instanceof TouchEvent;\n}\n\n/**\r\n * Returns the normalized x and y coordinates for mouse and touch events.\r\n */\n\nfunction getEventCoordinates(event) {\n if (isTouchEvent(event)) {\n if (event.touches && event.touches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.touches[0];\n return {\n x,\n y\n };\n } else if (event.changedTouches && event.changedTouches.length) {\n const {\n clientX: x,\n clientY: y\n } = event.changedTouches[0];\n return {\n x,\n y\n };\n }\n }\n\n if (hasViewportRelativeCoordinates(event)) {\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n\n return null;\n}\n\nconst CSS = /*#__PURE__*/Object.freeze({\n Translate: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n x,\n y\n } = transform;\n return \"translate3d(\" + (x ? Math.round(x) : 0) + \"px, \" + (y ? Math.round(y) : 0) + \"px, 0)\";\n }\n\n },\n Scale: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n const {\n scaleX,\n scaleY\n } = transform;\n return \"scaleX(\" + scaleX + \") scaleY(\" + scaleY + \")\";\n }\n\n },\n Transform: {\n toString(transform) {\n if (!transform) {\n return;\n }\n\n return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');\n }\n\n },\n Transition: {\n toString(_ref) {\n let {\n property,\n duration,\n easing\n } = _ref;\n return property + \" \" + duration + \"ms \" + easing;\n }\n\n }\n});\n\nconst SELECTOR = 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]';\nfunction findFirstFocusableNode(element) {\n if (element.matches(SELECTOR)) {\n return element;\n }\n\n return element.querySelector(SELECTOR);\n}\n\nexport { CSS, add, canUseDOM, findFirstFocusableNode, getEventCoordinates, getOwnerDocument, getWindow, hasViewportRelativeCoordinates, isDocument, isHTMLElement, isKeyboardEvent, isNode, isSVGElement, isTouchEvent, isWindow, subtract, useCombinedRefs, useEvent, useInterval, useIsomorphicLayoutEffect, useLatestValue, useLazyMemo, useNodeRef, usePrevious, useUniqueId };\n//# sourceMappingURL=utilities.esm.js.map\n","import { useSortable } from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport classNames from \"classnames\";\nimport { Reorder } from \"neetoicons\";\nimport { Checkbox, Label } from \"neetoui\";\n\nconst Item = ({\n column,\n hiddenColumns,\n checkboxProps,\n onToggle,\n isTableConfigurationFetching,\n}) => {\n const { key, title } = column;\n const {\n attributes,\n listeners,\n setNodeRef,\n transform,\n transition,\n isDragging,\n isOver,\n over,\n active,\n } = useSortable({ id: key });\n\n const dragStyle = {\n transform: isDragging ? CSS.Transform.toString(transform) : undefined,\n transition,\n opacity: isDragging ? 0.5 : 1,\n };\n\n const isIndicatorVisible = !isDragging && isOver;\n const draggedIndex = active?.data?.current?.sortable?.index;\n const targetIndex = over?.data?.current?.sortable?.index;\n\n return (\n <div>\n <div\n className={classNames({\n \"neeto-ui-bg-gray-200 h-1 w-full\":\n isIndicatorVisible && targetIndex < draggedIndex,\n })}\n />\n <div\n className=\"neeto-molecules-columns__sortable-item\"\n data-testid=\"column-sortable-item\"\n ref={setNodeRef}\n style={dragStyle}\n >\n <Label\n className=\"neeto-ui-flex neeto-ui-w-full hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer neeto-ui-items-center px-4 py-2\"\n htmlFor={key}\n >\n <div\n {...attributes}\n {...listeners}\n className=\"neeto-ui-mr-2 neeto-ui-cursor-grab neeto-ui-flex neeto-ui-items-center\"\n data-testid=\"column-drag-handle\"\n >\n <Reorder className=\"neeto-ui-text-gray-800\" size={18} />\n </div>\n <Checkbox\n checked={!hiddenColumns.includes(key)}\n data-testid=\"neeto-ui-columns-checkbox\"\n disabled={isTableConfigurationFetching}\n id={key}\n label={title}\n name={key}\n onChange={onToggle}\n {...checkboxProps}\n />\n </Label>\n </div>\n <div\n className={classNames({\n \"neeto-ui-bg-gray-200 h-1 w-full\":\n isIndicatorVisible && targetIndex > draggedIndex,\n })}\n />\n </div>\n );\n};\n\nexport default Item;\n","import axios from \"axios\";\n\nconst baseUrl = \"api/v1/table_configurations\";\n\nconst fetch = tableKey => axios.get(`${baseUrl}/${tableKey}`);\n\nconst create = payload => axios.post(baseUrl, { tableConfiguration: payload });\n\nconst update = ({ tableKey, payload }) =>\n axios.patch(`${baseUrl}/${tableKey}`, { tableConfiguration: payload });\n\nconst destroy = tableKey => axios.delete(`${baseUrl}/${tableKey}`);\n\nconst tableConfigurationApi = { fetch, create, update, destroy };\n\nexport default tableConfigurationApi;\n","export const HIDDEN_COLUMNS_STORAGE_KEY = \"neeto-molecules-hidden-columns\";\nexport const COLUMNS_ORDER_STORAGE_KEY = \"neeto-molecules-columns-order\";\nexport const TABLE_CONFIGURATION_QUERY_KEY = \"table-configuration\";\n","import { useQuery } from \"@tanstack/react-query\";\nimport useMutationWithInvalidation from \"neetocommons/react-utils/useMutationWithInvalidation\";\n\nimport tableConfigurationApi from \"./api\";\nimport { TABLE_CONFIGURATION_QUERY_KEY } from \"./constants.js\";\n\nconst useFetchTableConfiguration = ({ tableKey, options = {} }) =>\n useQuery({\n queryKey: [TABLE_CONFIGURATION_QUERY_KEY, tableKey],\n enabled: !!tableKey,\n queryFn: () => tableConfigurationApi.fetch(tableKey),\n ...options,\n });\n\nconst useUpdateTableConfiguration = (tableKey, options = {}) =>\n useMutationWithInvalidation(tableConfigurationApi.update, {\n keysToInvalidate: [[TABLE_CONFIGURATION_QUERY_KEY, tableKey]],\n ...options,\n });\n\nconst useDestroyTableConfiguration = (tableKey, options = {}) =>\n useMutationWithInvalidation(tableConfigurationApi.destroy, {\n keysToInvalidate: [[TABLE_CONFIGURATION_QUERY_KEY, tableKey]],\n ...options,\n });\n\nexport {\n useFetchTableConfiguration,\n useUpdateTableConfiguration,\n useDestroyTableConfiguration,\n};\n","import { useEffect, useMemo, useCallback } from \"react\";\n\nimport { isNotEqualDeep, isNotEmpty, noop } from \"neetocist\";\nimport { isEmpty, pluck, prop } from \"ramda\";\n\nimport {\n useFetchTableConfiguration,\n useUpdateTableConfiguration,\n useDestroyTableConfiguration,\n} from \"./useTableConfigurationsApi.js\";\n\nconst useTableConfigurations = (\n tableKey,\n columnData,\n onMutationSuccess = noop,\n allowConfigurationResetOnUpdate = true,\n defaultHiddenColumns = []\n) => {\n const {\n data: tableConfiguration,\n isLoading,\n isFetching,\n } = useFetchTableConfiguration({ tableKey });\n\n const { mutate: updateConfiguration } = useUpdateTableConfiguration(\n tableKey,\n { onSuccess: onMutationSuccess }\n );\n\n const { mutate: destroyConfiguration } = useDestroyTableConfiguration(\n tableKey,\n { onSuccess: onMutationSuccess }\n );\n\n const processColumnsWithConfiguration = useCallback(\n (originalColumns = [], existingColumnConfiguration = []) => {\n if (isEmpty(existingColumnConfiguration)) {\n return originalColumns;\n }\n\n const originalColumnsByKey = new Map(\n originalColumns?.filter(prop(\"key\")).map(column => [column.key, column])\n );\n\n const configurationByKey = new Map(\n existingColumnConfiguration.map(config => [config.key, config])\n );\n\n const orderedConfiguredColumns = existingColumnConfiguration\n .map(config => originalColumnsByKey.get(config.key))\n .filter(Boolean);\n\n const unconfiguredOriginalColumns = originalColumns.filter(\n column => column.key && !configurationByKey.has(column.key)\n );\n\n return [...orderedConfiguredColumns, ...unconfiguredOriginalColumns];\n },\n []\n );\n\n const hasAdditionalColumns = useMemo(() => {\n if (!tableConfiguration?.columns || !columnData) {\n return false;\n }\n\n const configurationKeys = pluck(\"key\", tableConfiguration.columns).sort();\n const dataKeys = pluck(\"key\", columnData).sort();\n\n return isNotEqualDeep(configurationKeys, dataKeys);\n }, [tableConfiguration, columnData]);\n\n const shouldApplyTableConfiguration = useMemo(\n () =>\n !isLoading &&\n tableConfiguration?.columns &&\n isNotEmpty(tableConfiguration?.columns) &&\n !hasAdditionalColumns,\n [tableConfiguration, isLoading, hasAdditionalColumns]\n );\n\n useEffect(() => {\n if (\n hasAdditionalColumns &&\n tableConfiguration &&\n allowConfigurationResetOnUpdate\n ) {\n destroyConfiguration(tableKey);\n }\n }, [hasAdditionalColumns, tableKey, allowConfigurationResetOnUpdate]);\n\n const allProcessedColumns = useMemo(() => {\n if (\n !isLoading &&\n isNotEmpty(tableConfiguration?.columns) &&\n !hasAdditionalColumns\n ) {\n return processColumnsWithConfiguration(\n columnData,\n tableConfiguration?.columns\n );\n }\n\n return columnData || [];\n }, [\n isLoading,\n tableConfiguration?.columns,\n hasAdditionalColumns,\n columnData,\n processColumnsWithConfiguration,\n ]);\n\n const existingColumnConfiguration = useMemo(() => {\n if (shouldApplyTableConfiguration) {\n return tableConfiguration.columns;\n }\n\n if (!columnData || isEmpty(columnData)) {\n return [];\n }\n\n return columnData.map(column => ({\n key: column.key,\n isShown: !defaultHiddenColumns.includes(column.key),\n }));\n }, [\n shouldApplyTableConfiguration,\n columnData,\n tableConfiguration?.columns,\n defaultHiddenColumns,\n ]);\n\n const customizedColumns = useMemo(() => {\n const visibleColumnsConfig = existingColumnConfiguration.filter(\n prop(\"isShown\")\n );\n const visibleColumnKeys = pluck(\"key\", visibleColumnsConfig);\n\n return allProcessedColumns.filter(column =>\n visibleColumnKeys.includes(column.key)\n );\n }, [allProcessedColumns, existingColumnConfiguration]);\n\n const updateColumns = updatedColumns => {\n updateConfiguration({\n tableKey,\n payload: { table_key: tableKey, columns: updatedColumns },\n });\n };\n\n const hideColumn = columnKey => {\n updateColumns(\n existingColumnConfiguration.map(column =>\n column.key === columnKey ? { ...column, isShown: false } : column\n )\n );\n };\n\n const showColumn = columnKey => {\n updateColumns(\n existingColumnConfiguration.map(column =>\n column.key === columnKey ? { ...column, isShown: true } : column\n )\n );\n };\n\n return {\n customizedColumns, // Only visible columns (for displaying the columns in the table)\n allProcessedColumns, // All columns (for displaying the columns in the Subheader)\n isTableConfigurationLoading: isLoading,\n isTableConfigurationFetching: isFetching,\n existingColumnConfiguration,\n hideColumn,\n showColumn,\n updateColumns,\n destroyConfiguration,\n };\n};\n\nexport default useTableConfigurations;\n","import { existsBy, removeBy } from \"neetocist\";\nimport { filter, includes, toLower, trim } from \"ramda\";\n\nexport const getHidableColumns = columnData =>\n removeBy({ isHidable: false }, columnData);\n\nexport const filterBySearchTerm = (searchTerm, columns) =>\n filter(\n ({ title }) => includes(trim(toLower(searchTerm)), trim(toLower(title))),\n columns\n );\n\nexport const removeDeletedColumns = (hiddenColumns, columnData) =>\n hiddenColumns.filter(hiddenColumn =>\n existsBy({ dataIndex: hiddenColumn }, columnData)\n );\n","import { useState } from \"react\";\n\nimport { DndContext, closestCenter } from \"@dnd-kit/core\";\nimport {\n SortableContext,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport i18next from \"i18next\";\nimport { isNotEmpty, findIndexBy, noop } from \"neetocist\";\nimport { Search } from \"neetoicons\";\nimport { Checkbox, Dropdown, Input, Label, Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { assoc, isEmpty, pluck, includes } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport \"./columns.scss\";\nimport Item from \"./Item\";\nimport useTableConfigurations from \"./useTableConfigurations.js\";\nimport { filterBySearchTerm, getHidableColumns } from \"./utils.js\";\n\nconst Columns = ({\n actionBlock,\n checkboxProps = {},\n columnData = [],\n isSearchable = false,\n tableKey = \"\",\n noColumnMessage = i18next.t(\"neetoMolecules.columns.noColumns\"),\n searchProps = {},\n allowConfigurationResetOnUpdate = true,\n onMutationSuccess = noop,\n defaultHiddenColumns = [],\n ...dropdownProps\n}) => {\n const { Divider, Menu, MenuItem } = Dropdown;\n const [searchTerm, setSearchTerm] = useState(\"\");\n const { t } = useTranslation();\n\n const {\n allProcessedColumns,\n existingColumnConfiguration,\n hideColumn,\n showColumn,\n updateColumns,\n destroyConfiguration,\n isTableConfigurationFetching,\n } = useTableConfigurations(\n tableKey,\n columnData,\n onMutationSuccess,\n allowConfigurationResetOnUpdate,\n defaultHiddenColumns\n );\n\n const hiddenColumns = pluck(\n \"key\",\n existingColumnConfiguration.filter(column => column.isShown === false)\n );\n\n const handleDragEnd = event => {\n const { active, over } = event;\n if (!over || active.id === over.id) return;\n\n const oldIndex = findIndexBy(\n { key: active.id },\n existingColumnConfiguration\n );\n\n const newIndex = findIndexBy({ key: over.id }, existingColumnConfiguration);\n\n if (oldIndex === -1 || newIndex === -1) return;\n\n const newOrder = [...existingColumnConfiguration];\n const [movedItem] = newOrder.splice(oldIndex, 1);\n newOrder.splice(newIndex, 0, movedItem);\n updateColumns(newOrder);\n };\n\n const columns = getHidableColumns(allProcessedColumns);\n const filteredColumns = filterBySearchTerm(searchTerm, columns);\n\n const handleHideAllColumns = () => {\n const columnsToHideKeys = pluck(\"key\", columns);\n\n updateColumns(\n existingColumnConfiguration.map(column =>\n includes(column.key, columnsToHideKeys)\n ? assoc(\"isShown\", false, column)\n : column\n )\n );\n };\n\n const handleChange = ({ target: { name: dataIndex, checked } }) => {\n if (checked) showColumn(dataIndex);\n else hideColumn(dataIndex);\n };\n\n const handleSearch = ({ target: { value } }) => setSearchTerm(value);\n\n return (\n <Dropdown\n appendTo={document.body}\n buttonSize=\"medium\"\n buttonStyle=\"text\"\n closeOnSelect={false}\n position=\"bottom-end\"\n onClose={() => setSearchTerm(\"\")}\n {...dropdownProps}\n >\n <Menu>\n <div\n className=\"neeto-molecules-columns__container\"\n data-testid=\"customize-columns-dropdown-container\"\n >\n {isSearchable && (\n <Input\n className=\"px-4 py-2\"\n data-testid=\"neeto-ui-columns-search\"\n placeholder={t(\"neetoMolecules.columns.search\")}\n prefix={<Search />}\n type=\"search\"\n value={searchTerm}\n onChange={handleSearch}\n {...searchProps}\n />\n )}\n {isEmpty(filteredColumns) && (\n <span className=\"neeto-ui-flex neeto-ui-flex-col neeto-ui-items-center neeto-ui-p-2\">\n {noColumnMessage}\n </span>\n )}\n {isNotEmpty(filteredColumns) && !searchTerm && (\n <DndContext\n collisionDetection={closestCenter}\n onDragEnd={handleDragEnd}\n >\n <SortableContext\n items={pluck(\"key\", filteredColumns)}\n strategy={verticalListSortingStrategy}\n >\n {filteredColumns.map(column => (\n <Item\n {...{\n checkboxProps,\n column,\n hiddenColumns,\n isTableConfigurationFetching,\n }}\n key={column.key}\n onToggle={handleChange}\n />\n ))}\n </SortableContext>\n </DndContext>\n )}\n {isNotEmpty(filteredColumns) &&\n searchTerm &&\n filteredColumns.map(({ key, title }) => (\n <MenuItem key={key}>\n <Label\n className=\"neeto-ui-flex neeto-ui-w-full hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer px-4 py-2\"\n htmlFor={key}\n >\n <Checkbox\n checked={!hiddenColumns.includes(key)}\n data-testid=\"neeto-ui-columns-checkbox\"\n id={key}\n label={title}\n name={key}\n onChange={handleChange}\n {...checkboxProps}\n />\n </Label>\n </MenuItem>\n ))}\n <Divider />\n {!!actionBlock && (\n <>\n {actionBlock}\n <Divider />\n </>\n )}\n <div className=\"flex justify-end gap-2 p-1 pr-3\">\n <Button\n data-testid=\"column-visibility-hide-all-button\"\n label={t(\"neetoMolecules.columns.hideAll\")}\n style=\"tertiary\"\n onClick={handleHideAllColumns}\n />\n <Button\n data-testid=\"column-visibility-reset-button\"\n label={t(\"neetoMolecules.columns.reset\")}\n style=\"secondary\"\n onClick={() => destroyConfiguration(tableKey)}\n />\n </div>\n </div>\n </Menu>\n </Dropdown>\n );\n};\n\nColumns.propTypes = {\n /**\n * Controls whether the table configuration should be reset on adding custom fields (optional).\n */\n allowConfigurationResetOnUpdate: PropTypes.bool,\n /**\n * Extra action items that can be added at the end of the dropdown (optional).\n */\n actionBlock: PropTypes.element,\n /**\n * Additional props for the checkboxes in the dropdown (optional).\n */\n checkboxProps: PropTypes.object,\n /**\n * The list of columns from which the dropdown options are built (required).\n */\n columnData: PropTypes.array,\n /**\n * Controls whether the dropdown options should be searchable (optional).\n */\n isSearchable: PropTypes.bool,\n /**\n * The table key used to identify table configuration in the API (required).\n */\n tableKey: PropTypes.string,\n /**\n * The message to be shown when there are no columns to be displayed in the dropdown (optional).\n */\n noColumnMessage: PropTypes.string,\n /**\n * Props to be passed to the search input in the column dropdown. Only works when `isSearchable` is set to `true` (optional).\n */\n searchProps: PropTypes.object,\n /**\n * The function will be called when the mutation is successful (optional).\n */\n onMutationSuccess: PropTypes.func,\n};\n\nColumns.displayName = \"Columns\";\nexport default Columns;\n"],"names":["Item","_ref","_active$data","_over$data","column","hiddenColumns","checkboxProps","onToggle","isTableConfigurationFetching","key","title","_useSortable","useSortable","id","attributes","listeners","setNodeRef","transform","transition","isDragging","isOver","over","active","dragStyle","CSS","Transform","toString","undefined","opacity","isIndicatorVisible","draggedIndex","data","current","sortable","index","targetIndex","_jsxs","children","_jsx","className","classNames","ref","style","Label","htmlFor","_objectSpread","Reorder","size","Checkbox","checked","includes","disabled","label","name","onChange","baseUrl","fetch","tableKey","axios","get","concat","create","payload","post","tableConfiguration","update","patch","destroy","tableConfigurationApi","HIDDEN_COLUMNS_STORAGE_KEY","COLUMNS_ORDER_STORAGE_KEY","TABLE_CONFIGURATION_QUERY_KEY","useFetchTableConfiguration","_ref$options","options","useQuery","queryKey","enabled","queryFn","useUpdateTableConfiguration","arguments","length","useMutationWithInvalidation","keysToInvalidate","useDestroyTableConfiguration","useTableConfigurations","columnData","onMutationSuccess","noop","allowConfigurationResetOnUpdate","defaultHiddenColumns","_useFetchTableConfigu","isLoading","isFetching","_useUpdateTableConfig","onSuccess","updateConfiguration","mutate","_useDestroyTableConfi","destroyConfiguration","processColumnsWithConfiguration","useCallback","originalColumns","existingColumnConfiguration","isEmpty","originalColumnsByKey","Map","filter","prop","map","configurationByKey","config","orderedConfiguredColumns","Boolean","unconfiguredOriginalColumns","has","_toConsumableArray","hasAdditionalColumns","useMemo","columns","configurationKeys","pluck","sort","dataKeys","isNotEqualDeep","shouldApplyTableConfiguration","isNotEmpty","useEffect","allProcessedColumns","isShown","customizedColumns","visibleColumnsConfig","visibleColumnKeys","updateColumns","updatedColumns","table_key","hideColumn","columnKey","showColumn","isTableConfigurationLoading","getHidableColumns","removeBy","isHidable","filterBySearchTerm","searchTerm","trim","toLower","Columns","actionBlock","_ref$checkboxProps","_ref$columnData","_ref$isSearchable","isSearchable","_ref$tableKey","_ref$noColumnMessage","noColumnMessage","i18next","t","_ref$searchProps","searchProps","_ref$allowConfigurati","_ref$onMutationSucces","_ref$defaultHiddenCol","dropdownProps","_objectWithoutProperties","_excluded","Divider","Dropdown","Menu","MenuItem","_useState","useState","_useState2","_slicedToArray","setSearchTerm","_useTranslation","useTranslation","_useTableConfiguratio","handleDragEnd","event","oldIndex","findIndexBy","newIndex","newOrder","_newOrder$splice","splice","_newOrder$splice2","movedItem","filteredColumns","handleHideAllColumns","columnsToHideKeys","assoc","handleChange","_ref2","_ref2$target","target","dataIndex","handleSearch","_ref3","value","appendTo","document","body","buttonSize","buttonStyle","closeOnSelect","position","onClose","Input","placeholder","prefix","Search","type","DndContext","collisionDetection","closestCenter","onDragEnd","SortableContext","items","strategy","verticalListSortingStrategy","_createElement","_ref4","_Fragment","Button","onClick","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8QA,MAAM,GAAG,gBAAgB,MAAM,CAAC,MAAM,CAAC;AACvC,EAAE,SAAS,EAAE;AACb,IAAI,QAAQ,CAAC,SAAS,EAAE;AACxB,MAAM,IAAI,CAAC,SAAS,EAAE;AACtB,QAAQ;AACR,MAAM;;AAEN,MAAM,MAAM;AACZ,QAAQ,CAAC;AACT,QAAQ;AACR,OAAO,GAAG,SAAS;AACnB,MAAM,OAAO,cAAc,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CA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C,gBAAAA,QAAQ,EAAE0I;AAAa,eAAA,EACnB1L,aAAa,CAClB;aACI;AAAC,WAAA,EAdKG,GAeL,CAAC;AAAA,QAAA,CACZ,CAAC,eACJ6B,GAAA,CAACgI,OAAO,EAAA,EAAE,CAAC,EACV,CAAC,CAAClB,WAAW,iBACZhH,IAAA,CAAA2L,QAAA,EAAA;AAAA1L,UAAAA,QAAA,GACG+G,WAAW,eACZ9G,GAAA,CAACgI,OAAO,IAAE,CAAC;SACX,CACH,eACDlI,IAAA,CAAA,KAAA,EAAA;AAAKG,UAAAA,SAAS,EAAC,iCAAiC;UAAAF,QAAA,EAAA,cAC9CC,GAAA,CAAC0L,MAAM,EAAA;AACL,YAAA,aAAA,EAAY,mCAAmC;AAC/C5K,YAAAA,KAAK,EAAEyG,CAAC,CAAC,gCAAgC,CAAE;AAC3CnH,YAAAA,KAAK,EAAC,UAAU;AAChBuL,YAAAA,OAAO,EAAEpC;AAAqB,WAC/B,CAAC,eACFvJ,GAAA,CAAC0L,MAAM,EAAA;AACL,YAAA,aAAA,EAAY,gCAAgC;AAC5C5K,YAAAA,KAAK,EAAEyG,CAAC,CAAC,8BAA8B,CAAE;AACzCnH,YAAAA,KAAK,EAAC,WAAW;YACjBuL,OAAO,EAAE,SAATA,OAAOA,GAAA;cAAA,OAAQ9H,oBAAoB,CAAC1C,QAAQ,CAAC;AAAA,YAAA;AAAC,WAC/C,CAAC;AAAA,SACC,CAAC;OACH;KACD;AAAC,GAAA,CACC,CAAC;AAEf;AAyCA0F,OAAO,CAAC+E,WAAW,GAAG,SAAS;;;;","x_google_ignoreList":[0]}
|
package/dist/Columns.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { C as COLUMNS_ORDER_STORAGE_KEY, H as HIDDEN_COLUMNS_STORAGE_KEY, T as TABLE_CONFIGURATION_QUERY_KEY, a as default, u as useTableConfigurations } from './Columns-6JwGF3TU.js';
|
|
2
2
|
import '@babel/runtime/helpers/defineProperty';
|
|
3
3
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
4
4
|
import '@babel/runtime/helpers/slicedToArray';
|
|
@@ -26,13 +26,16 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
|
26
26
|
import { useQuery } from '@tanstack/react-query';
|
|
27
27
|
import axios from 'axios';
|
|
28
28
|
import Crown from '@bigbinary/neeto-icons/Crown';
|
|
29
|
-
import { t } from 'i18next';
|
|
30
|
-
import Book from '@bigbinary/neeto-icons/Book';
|
|
31
29
|
import useBreakpoints from '@bigbinary/neeto-commons-frontend/react-utils/useBreakpoints';
|
|
32
|
-
import
|
|
33
|
-
import
|
|
30
|
+
import Book from '@bigbinary/neeto-icons/Book';
|
|
31
|
+
import ChatQuestions from '@bigbinary/neeto-icons/ChatQuestions';
|
|
32
|
+
import Community from '@bigbinary/neeto-icons/Community';
|
|
33
|
+
import Status from '@bigbinary/neeto-icons/Status';
|
|
34
34
|
import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
35
35
|
import Right from '@bigbinary/neeto-icons/Right';
|
|
36
|
+
import { t } from 'i18next';
|
|
37
|
+
import CheckCircle from '@bigbinary/neeto-icons/CheckCircle';
|
|
38
|
+
import Tag from '@bigbinary/neetoui/Tag';
|
|
36
39
|
import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
|
|
37
40
|
import useLocalStorage from '@bigbinary/neeto-commons-frontend/react-utils/useLocalStorage';
|
|
38
41
|
import Moon from '@bigbinary/neeto-icons/Moon';
|
|
@@ -64,21 +67,21 @@ var SPECIAL_APP_NAMES = {
|
|
|
64
67
|
var css$1 = ".neeto-molecules-product-switcher__wrapper{align-items:flex-start;background-color:rgb(var(--neeto-ui-white));display:flex;flex-direction:column;justify-content:flex-start;max-width:100%;overflow-y:auto;padding:24px;position:relative;transition:all .3s;width:100%}@media (prefers-reduced-motion:reduce){.neeto-molecules-product-switcher__wrapper{transition:none}}@media screen and (max-width:768px){.neeto-molecules-product-switcher__wrapper{padding:16px}}.neeto-molecules-product-switcher__grid{grid-gap:12px;display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(288px,1fr))}@media only screen and (max-width:992px){.neeto-molecules-product-switcher__grid{grid-template-columns:repeat(auto-fill,minmax(248px,1fr))}}@media only screen and (max-width:640px){.neeto-molecules-product-switcher__grid{grid-template-columns:repeat(auto-fill,minmax(100%,1fr))}}.neeto-molecules-product-switcher__header{align-items:center;display:flex;gap:32px;justify-content:space-between;margin-bottom:32px;position:relative;width:100%}@media only screen and (max-width:768px){.neeto-molecules-product-switcher__header{align-items:flex-start;flex-direction:column;gap:24px}}@media only screen and (max-width:640px){.neeto-molecules-product-switcher__header h1{font-size:24px}}@media only screen and (max-width:768px){.neeto-molecules-product-switcher_modal-container .neeto-molecules-product-switcher__header-mobile{align-items:flex-start;margin-bottom:24px}}.neeto-molecules-product-switcher_modal-container .neeto-molecules-product-switcher__wrapper{padding:0}.neeto-molecules-product-switcher__close-btn{inset-inline-end:12px;position:absolute;top:12px}.neeto-molecules-product-switcher__search-wrapper{flex-grow:1}@media only screen and (min-width:992px){.neeto-molecules-product-switcher__search-wrapper{flex-grow:0;width:296px}}.neeto-molecules-product-switcher__body{display:flex;flex-direction:column;font-size:var(--neeto-ui-text-sm);gap:12px;margin-bottom:24px;width:100%}.neeto-molecules-product-switcher-link{background-color:rgb(var(--neeto-ui-white));border-color:rgb(var(--neeto-ui-gray-200));border-radius:var(--neeto-ui-rounded-lg);border-style:solid;border-width:1px;cursor:pointer;display:flex;flex-direction:column;gap:16px;max-width:100%;padding:10px 8px;text-decoration:none;transition:all .3s ease-in-out;width:100%}@media (prefers-reduced-motion:reduce){.neeto-molecules-product-switcher-link{transition:none}}.neeto-molecules-product-switcher-link:focus,.neeto-molecules-product-switcher-link:focus-visible{outline:none}.neeto-molecules-product-switcher-link:focus-visible{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-product-switcher-link:not(.neeto-molecules-product-switcher-link--active):hover{border-color:rgb(var(--neeto-ui-primary-500))}.neeto-molecules-product-switcher-link--active{background-color:rgb(var(--neeto-ui-primary-50));border-color:rgb(var(--neeto-ui-primary-500))}.neeto-molecules-product-switcher-link--highlighted{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-molecules-product-switcher-link__icon-holder{flex-grow:1;flex-shrink:0}.neeto-molecules-product-switcher-link__icon-holder svg{height:36px;width:auto}.neeto-molecules-product-switcher-link__icon-holder .neeto-molecules-product-switcher-link__icon-default{height:24px}.neeto-molecules-product-switcher-link__content{flex-shrink:0}.neeto-molecules-product-switcher-link__content span{display:block}.neeto-molecules-product-switcher_modal{z-index:100000}.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper--fullscreen{display:flex;flex-direction:column;height:100dvh!important;width:100vw!important}.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper--fullscreen .neeto-ui-modal__header{flex-shrink:0}.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper--fullscreen .neeto-ui-modal__body{--neeto-ui-modal-body-padding-top:24px;flex-grow:1;min-height:0;overflow-y:auto}.neeto-ui-theme--dark .neeto-molecules-product-switcher__wrapper [data-dark-mode-color=true]{fill:rgb(var(--neeto-ui-black))}.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal{--neeto-molecules-product-switcher-modal-padding-y:24px;align-items:flex-start;padding-bottom:var(--neeto-molecules-product-switcher-modal-padding-y);padding-top:var(--neeto-molecules-product-switcher-modal-padding-y)}@media only screen and (min-width:1024px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal{--neeto-molecules-product-switcher-modal-padding-y:40px}}@media only screen and (min-width:1536px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal{--neeto-molecules-product-switcher-modal-padding-y:80px}}.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large{--neeto-ui-modal-body-padding-top:24px;--neeto-ui-modal-body-padding-bottom:24px;--neeto-ui-modal-close-btn-top:12px;--neeto-ui-modal-close-btn-right:12px;--neeto-ui-modal-body-padding-x:0;--neeto-ui-text-h1:24px}.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher-link__icon-holder svg{height:32px}@media only screen and (min-width:1024px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large{--neeto-ui-modal-wrapper-width:960px}}@media only screen and (min-width:1280px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large{--neeto-ui-modal-wrapper-width:1024px}}@media only screen and (min-width:1536px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large{--neeto-ui-modal-wrapper-width:1280px}.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher-link__icon-holder svg{height:36px}}.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher__header{background-color:rgb(var(--neeto-ui-white));margin-bottom:32px;padding-inline-end:56px;padding-inline-start:24px}@media only screen and (max-width:768px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher__header{gap:16px;margin-bottom:16px}}.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher__body{height:calc(100dvh - var(--neeto-molecules-product-switcher-modal-padding-y)*2 - 124px);margin-bottom:0;overflow-y:auto;padding-inline-end:24px;padding-inline-start:24px}@media only screen and (max-width:768px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher__body{height:calc(90dvh - var(--neeto-molecules-product-switcher-modal-padding-y)*2 - 124px)}}.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-ui-modal__close{z-index:2}@media only screen and (min-width:1280px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher__search-wrapper{width:420px}}@media only screen and (min-width:1536px){.neeto-ui-modal__backdrop.neeto-molecules-product-switcher_modal .neeto-ui-modal__wrapper.neeto-ui-modal__wrapper--large .neeto-molecules-product-switcher__search-wrapper{width:500px}}";
|
|
65
68
|
n(css$1,{});
|
|
66
69
|
|
|
67
|
-
var _excluded$
|
|
68
|
-
function ownKeys$
|
|
69
|
-
function _objectSpread$
|
|
70
|
+
var _excluded$3 = ["name", "description", "url", "isHighlighted"];
|
|
71
|
+
function ownKeys$7(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; }
|
|
72
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
70
73
|
var ProductLink = function ProductLink(_ref) {
|
|
71
74
|
var name = _ref.name,
|
|
72
75
|
description = _ref.description,
|
|
73
76
|
url = _ref.url,
|
|
74
77
|
_ref$isHighlighted = _ref.isHighlighted,
|
|
75
78
|
isHighlighted = _ref$isHighlighted === void 0 ? false : _ref$isHighlighted,
|
|
76
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
79
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
77
80
|
var normalizedName = (name || "").toLowerCase();
|
|
78
81
|
var specialCase = SPECIAL_APP_NAMES[normalizedName];
|
|
79
82
|
var appName = "Neeto".concat(name.charAt(0)).concat(name.slice(1).toLowerCase());
|
|
80
83
|
var AppIcon = specialCase ? AppIcons["Neeto".concat(specialCase)] : AppIcons[appName];
|
|
81
|
-
return /*#__PURE__*/jsxs("a", _objectSpread$
|
|
84
|
+
return /*#__PURE__*/jsxs("a", _objectSpread$7(_objectSpread$7({
|
|
82
85
|
"data-testid": "".concat(normalizedName, "-app-link"),
|
|
83
86
|
href: url,
|
|
84
87
|
rel: "noreferrer",
|
|
@@ -107,8 +110,8 @@ var ProductLink = function ProductLink(_ref) {
|
|
|
107
110
|
};
|
|
108
111
|
var ProductLink$1 = /*#__PURE__*/memo(ProductLink);
|
|
109
112
|
|
|
110
|
-
function ownKeys$
|
|
111
|
-
function _objectSpread$
|
|
113
|
+
function ownKeys$6(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; }
|
|
114
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
112
115
|
var Content = function Content(_ref) {
|
|
113
116
|
var highlightedIndex = _ref.highlightedIndex,
|
|
114
117
|
filteredApps = _ref.filteredApps,
|
|
@@ -124,7 +127,7 @@ var Content = function Content(_ref) {
|
|
|
124
127
|
return (filteredApps === null || filteredApps === void 0 ? void 0 : filteredApps.length) > 0 ? /*#__PURE__*/jsx("div", {
|
|
125
128
|
className: "neeto-molecules-product-switcher__grid",
|
|
126
129
|
children: filteredApps.map(function (app, index) {
|
|
127
|
-
return /*#__PURE__*/jsx(ProductLink$1, _objectSpread$
|
|
130
|
+
return /*#__PURE__*/jsx(ProductLink$1, _objectSpread$6(_objectSpread$6({}, app), {}, {
|
|
128
131
|
"data-highlighted-index": index,
|
|
129
132
|
isHighlighted: index === highlightedIndex
|
|
130
133
|
}), app.name);
|
|
@@ -144,10 +147,10 @@ var neetoAppsApi = {
|
|
|
144
147
|
fetch: fetch$1
|
|
145
148
|
};
|
|
146
149
|
|
|
147
|
-
function ownKeys$
|
|
148
|
-
function _objectSpread$
|
|
150
|
+
function ownKeys$5(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; }
|
|
151
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
149
152
|
var useFetchNeetoApps = function useFetchNeetoApps(options) {
|
|
150
|
-
return useQuery(_objectSpread$
|
|
153
|
+
return useQuery(_objectSpread$5({
|
|
151
154
|
queryKey: [QUERY_KEYS$1.NEETO_APPS_LIST],
|
|
152
155
|
queryFn: neetoAppsApi.fetch
|
|
153
156
|
}, options));
|
|
@@ -242,7 +245,7 @@ var useProductSwitcherNavigation = function useProductSwitcherNavigation() {
|
|
|
242
245
|
};
|
|
243
246
|
};
|
|
244
247
|
|
|
245
|
-
var Menu$
|
|
248
|
+
var Menu$4 = function Menu(_ref) {
|
|
246
249
|
var _ref$isMobile = _ref.isMobile,
|
|
247
250
|
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile,
|
|
248
251
|
initialFocusRef = _ref.initialFocusRef;
|
|
@@ -326,7 +329,7 @@ var Modal = function Modal(_ref) {
|
|
|
326
329
|
children: /*#__PURE__*/jsx("div", {
|
|
327
330
|
className: "neeto-molecules-product-switcher_modal-container",
|
|
328
331
|
"data-testid": "product-switcher-modal",
|
|
329
|
-
children: /*#__PURE__*/jsx(Menu$
|
|
332
|
+
children: /*#__PURE__*/jsx(Menu$4, {
|
|
330
333
|
initialFocusRef: initialFocusRef
|
|
331
334
|
})
|
|
332
335
|
})
|
|
@@ -334,6 +337,94 @@ var Modal = function Modal(_ref) {
|
|
|
334
337
|
});
|
|
335
338
|
};
|
|
336
339
|
|
|
340
|
+
var _excluded$2 = ["t", "tReady"];
|
|
341
|
+
function ownKeys$4(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; }
|
|
342
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
343
|
+
var MenuItem$7 = Dropdown$1.MenuItem;
|
|
344
|
+
var MenuButton$3 = withT(function (_ref) {
|
|
345
|
+
var t = _ref.t;
|
|
346
|
+
_ref.tReady;
|
|
347
|
+
var otherProps = _objectWithoutProperties(_ref, _excluded$2);
|
|
348
|
+
return /*#__PURE__*/jsx(MenuItem$7.Button, _objectSpread$4(_objectSpread$4({
|
|
349
|
+
className: "neeto-molecules-menu-sublist__item-btn",
|
|
350
|
+
"data-testid": "help-menu-button",
|
|
351
|
+
prefix: /*#__PURE__*/jsx(Help, {
|
|
352
|
+
size: 18
|
|
353
|
+
}),
|
|
354
|
+
style: "text",
|
|
355
|
+
suffix: /*#__PURE__*/jsx(Right, {
|
|
356
|
+
className: "rtl:scale-x-[-1]",
|
|
357
|
+
size: 18
|
|
358
|
+
})
|
|
359
|
+
}, otherProps), {}, {
|
|
360
|
+
children: t("neetoMolecules.sidebar.help")
|
|
361
|
+
}));
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
var Menu$3 = Dropdown$1.Menu,
|
|
365
|
+
MenuItem$6 = Dropdown$1.MenuItem;
|
|
366
|
+
var HelpMenu = function HelpMenu() {
|
|
367
|
+
var _useTranslation = useTranslation(),
|
|
368
|
+
t = _useTranslation.t;
|
|
369
|
+
var _useBreakpoints = useBreakpoints(),
|
|
370
|
+
isSize = _useBreakpoints.isSize;
|
|
371
|
+
var isMobile = isSize("mobile");
|
|
372
|
+
return /*#__PURE__*/jsx(Dropdown$1, {
|
|
373
|
+
closeOnSelect: false,
|
|
374
|
+
customTarget: /*#__PURE__*/jsx(MenuButton$3, {}),
|
|
375
|
+
interactiveDebounce: 30,
|
|
376
|
+
offset: [0, 5],
|
|
377
|
+
position: isMobile ? "bottom" : "right",
|
|
378
|
+
trigger: "all",
|
|
379
|
+
zIndex: 99999,
|
|
380
|
+
children: /*#__PURE__*/jsxs(Menu$3, {
|
|
381
|
+
children: [/*#__PURE__*/jsx(MenuItem$6.Button, {
|
|
382
|
+
className: "neeto-molecules-menu-sublist__item-btn",
|
|
383
|
+
"data-testid": "help-link-help-articles-button",
|
|
384
|
+
href: "https://help.".concat(toLower(globalProps.appName), ".com/"),
|
|
385
|
+
prefix: /*#__PURE__*/jsx(Book, {
|
|
386
|
+
size: 18
|
|
387
|
+
}),
|
|
388
|
+
rel: "noreferrer",
|
|
389
|
+
target: "_blank",
|
|
390
|
+
children: t("neetoMolecules.sidebar.helpLinks.helpArticles")
|
|
391
|
+
}), /*#__PURE__*/jsx(MenuItem$6.Button, {
|
|
392
|
+
className: "neeto-molecules-menu-sublist__item-btn",
|
|
393
|
+
"data-testid": "help-link-live-chat-button",
|
|
394
|
+
prefix: /*#__PURE__*/jsx(ChatQuestions, {
|
|
395
|
+
size: 18
|
|
396
|
+
}),
|
|
397
|
+
onClick: function onClick() {
|
|
398
|
+
var _window$NeetoChat, _window$NeetoChat2;
|
|
399
|
+
(_window$NeetoChat = window.NeetoChat) === null || _window$NeetoChat === void 0 || (_window$NeetoChat = _window$NeetoChat.contextualHelp) === null || _window$NeetoChat === void 0 || _window$NeetoChat.maximizeWidget();
|
|
400
|
+
(_window$NeetoChat2 = window.NeetoChat) === null || _window$NeetoChat2 === void 0 || (_window$NeetoChat2 = _window$NeetoChat2.contextualHelp) === null || _window$NeetoChat2 === void 0 || _window$NeetoChat2.openWidget();
|
|
401
|
+
},
|
|
402
|
+
children: t("neetoMolecules.sidebar.helpLinks.liveChat")
|
|
403
|
+
}), /*#__PURE__*/jsx(MenuItem$6.Button, {
|
|
404
|
+
className: "neeto-molecules-menu-sublist__item-btn",
|
|
405
|
+
"data-testid": "help-link-community-button",
|
|
406
|
+
href: "https://www.launchpass.com/neetohq",
|
|
407
|
+
prefix: /*#__PURE__*/jsx(Community, {
|
|
408
|
+
size: 18
|
|
409
|
+
}),
|
|
410
|
+
rel: "noreferrer",
|
|
411
|
+
target: "_blank",
|
|
412
|
+
children: t("neetoMolecules.sidebar.helpLinks.askTheCommunity")
|
|
413
|
+
}), /*#__PURE__*/jsx(MenuItem$6.Button, {
|
|
414
|
+
className: "neeto-molecules-menu-sublist__item-btn",
|
|
415
|
+
"data-testid": "help-link-status-button",
|
|
416
|
+
href: "https://neetostatus.com/",
|
|
417
|
+
prefix: /*#__PURE__*/jsx(Status, {
|
|
418
|
+
size: 18
|
|
419
|
+
}),
|
|
420
|
+
rel: "noreferrer",
|
|
421
|
+
target: "_blank",
|
|
422
|
+
children: t("neetoMolecules.sidebar.helpLinks.systemStatus")
|
|
423
|
+
})]
|
|
424
|
+
})
|
|
425
|
+
});
|
|
426
|
+
};
|
|
427
|
+
|
|
337
428
|
var shouldShowWhatsNew = function shouldShowWhatsNew() {
|
|
338
429
|
var _window$globalProps;
|
|
339
430
|
var currentUserEmail = (_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 || (_window$globalProps = _window$globalProps.user) === null || _window$globalProps === void 0 ? void 0 : _window$globalProps.email;
|
|
@@ -341,25 +432,6 @@ var shouldShowWhatsNew = function shouldShowWhatsNew() {
|
|
|
341
432
|
};
|
|
342
433
|
var MY_ORGANIZATION_URL = "/auth/organization/edit";
|
|
343
434
|
var ENGAGE_WIDGET_TRIGGER_ID = "neetoengage-trigger";
|
|
344
|
-
var DEFAULT_HELP_LINK_PROPS = {
|
|
345
|
-
helpCenterProps: {
|
|
346
|
-
label: t("neetoMolecules.sidebar.helpLinks.helpCenter"),
|
|
347
|
-
icon: Book,
|
|
348
|
-
"data-testid": "help-link-help-center-button",
|
|
349
|
-
href: "https://help.".concat(toLower(globalProps.appName), ".com/"),
|
|
350
|
-
target: "_blank"
|
|
351
|
-
},
|
|
352
|
-
liveChatProps: {
|
|
353
|
-
label: t("neetoMolecules.sidebar.helpLinks.liveChat"),
|
|
354
|
-
icon: Help,
|
|
355
|
-
"data-testid": "help-link-live-chat-button",
|
|
356
|
-
onClick: function onClick() {
|
|
357
|
-
var _window$NeetoChat, _window$NeetoChat2;
|
|
358
|
-
(_window$NeetoChat = window.NeetoChat) === null || _window$NeetoChat === void 0 || (_window$NeetoChat = _window$NeetoChat.contextualHelp) === null || _window$NeetoChat === void 0 || _window$NeetoChat.maximizeWidget();
|
|
359
|
-
(_window$NeetoChat2 = window.NeetoChat) === null || _window$NeetoChat2 === void 0 || (_window$NeetoChat2 = _window$NeetoChat2.contextualHelp) === null || _window$NeetoChat2 === void 0 || _window$NeetoChat2.openWidget();
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
435
|
var DEFAULT_MENU_LINK_PROPS = {
|
|
364
436
|
engageProps: {
|
|
365
437
|
id: ENGAGE_WIDGET_TRIGGER_ID,
|
|
@@ -370,22 +442,6 @@ var DEFAULT_MENU_LINK_PROPS = {
|
|
|
370
442
|
keyboardShortcutProps: {
|
|
371
443
|
label: t("neetoMolecules.sidebar.helpLinks.keyboardShortcuts"),
|
|
372
444
|
"data-testid": "help-link-keyboard-shortcut-button"
|
|
373
|
-
},
|
|
374
|
-
statusProps: {
|
|
375
|
-
label: t("neetoMolecules.sidebar.helpLinks.productStatus", {
|
|
376
|
-
app: globalProps.appName
|
|
377
|
-
}),
|
|
378
|
-
"data-testid": "help-link-status-button",
|
|
379
|
-
href: "https://neetostatus.com/",
|
|
380
|
-
target: "_blank"
|
|
381
|
-
},
|
|
382
|
-
communityProps: {
|
|
383
|
-
label: t("neetoMolecules.sidebar.helpLinks.community", {
|
|
384
|
-
app: globalProps.appName
|
|
385
|
-
}),
|
|
386
|
-
"data-testid": "help-link-community-button",
|
|
387
|
-
href: "https://www.launchpass.com/neetohq",
|
|
388
|
-
target: "_blank"
|
|
389
445
|
}
|
|
390
446
|
};
|
|
391
447
|
var NON_BUTTON_PROPS = ["isVisible"];
|
|
@@ -568,7 +624,7 @@ var Dropdown = function Dropdown() {
|
|
|
568
624
|
},
|
|
569
625
|
children: /*#__PURE__*/jsx(Menu$1, {
|
|
570
626
|
children: /*#__PURE__*/jsx(MenuItem$3, {
|
|
571
|
-
children: /*#__PURE__*/jsx(Menu$
|
|
627
|
+
children: /*#__PURE__*/jsx(Menu$4, {})
|
|
572
628
|
})
|
|
573
629
|
})
|
|
574
630
|
});
|
|
@@ -820,7 +876,6 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
820
876
|
var _globalProps$user, _globalProps$user2, _globalProps$user3, _globalProps$user4;
|
|
821
877
|
var profileInfo = _ref.profileInfo,
|
|
822
878
|
showProductSwitcher = _ref.showProductSwitcher,
|
|
823
|
-
helpLinks = _ref.helpLinks,
|
|
824
879
|
defaultLinks = _ref.defaultLinks,
|
|
825
880
|
topLinks = _ref.topLinks,
|
|
826
881
|
bottomLinks = _ref.bottomLinks,
|
|
@@ -873,9 +928,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
873
928
|
}]
|
|
874
929
|
}), showProductSwitcher && /*#__PURE__*/jsx(ProductSwitcher, {
|
|
875
930
|
toggleModal: toggleModal
|
|
876
|
-
}), /*#__PURE__*/jsx(
|
|
877
|
-
links: helpLinks
|
|
878
|
-
}), /*#__PURE__*/jsx(Divider, {})]
|
|
931
|
+
}), /*#__PURE__*/jsx(HelpMenu, {}), /*#__PURE__*/jsx(Divider, {})]
|
|
879
932
|
}), isAuthenticated && /*#__PURE__*/jsx(MenuItem.Button, {
|
|
880
933
|
className: "neeto-molecules-profile-popup",
|
|
881
934
|
"data-testid": "my-profile-button",
|
|
@@ -920,7 +973,7 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
920
973
|
var _KeyboardShortcuts$us = KeyboardShortcuts.usePaneState(),
|
|
921
974
|
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
922
975
|
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
923
|
-
useHotkeys(["ctrl+
|
|
976
|
+
useHotkeys(["ctrl+u", "command+u"], function () {
|
|
924
977
|
return setIsModalOpen(not);
|
|
925
978
|
}, {
|
|
926
979
|
mode: "global"
|
|
@@ -939,12 +992,6 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
939
992
|
window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
|
|
940
993
|
}, []);
|
|
941
994
|
var newBottomLinks = [].concat(_toConsumableArray(getDefaultBottomLinks(profileInfo.isAuthenticated, isConsumer)), _toConsumableArray(bottomLinks));
|
|
942
|
-
var helpLinks = Object.keys(DEFAULT_HELP_LINK_PROPS).map(function (key) {
|
|
943
|
-
return _objectSpread$1({}, DEFAULT_HELP_LINK_PROPS[key]);
|
|
944
|
-
}).filter(function (_ref2) {
|
|
945
|
-
var hide = _ref2.hide;
|
|
946
|
-
return !hide;
|
|
947
|
-
});
|
|
948
995
|
var defaultLinks = Object.keys(DEFAULT_MENU_LINK_PROPS).filter(function (key) {
|
|
949
996
|
var _DEFAULT_MENU_LINK_PR, _DEFAULT_MENU_LINK_PR2, _DEFAULT_MENU_LINK_PR3;
|
|
950
997
|
return (_DEFAULT_MENU_LINK_PR = (_DEFAULT_MENU_LINK_PR2 = (_DEFAULT_MENU_LINK_PR3 = DEFAULT_MENU_LINK_PROPS[key]).isVisible) === null || _DEFAULT_MENU_LINK_PR2 === void 0 ? void 0 : _DEFAULT_MENU_LINK_PR2.call(_DEFAULT_MENU_LINK_PR3)) !== null && _DEFAULT_MENU_LINK_PR !== void 0 ? _DEFAULT_MENU_LINK_PR : true;
|
|
@@ -958,8 +1005,8 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
958
1005
|
}), key === "engageProps" && changesCount && {
|
|
959
1006
|
changesCount: changesCount
|
|
960
1007
|
});
|
|
961
|
-
}).filter(function (
|
|
962
|
-
var hide =
|
|
1008
|
+
}).filter(function (_ref2) {
|
|
1009
|
+
var hide = _ref2.hide;
|
|
963
1010
|
return !hide;
|
|
964
1011
|
});
|
|
965
1012
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
@@ -1008,7 +1055,6 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
1008
1055
|
children: /*#__PURE__*/jsx(ProfileMenu, {
|
|
1009
1056
|
customContent: customContent,
|
|
1010
1057
|
defaultLinks: defaultLinks,
|
|
1011
|
-
helpLinks: helpLinks,
|
|
1012
1058
|
isConsumer: isConsumer,
|
|
1013
1059
|
isOrganizationSwitcherEnabled: isOrganizationSwitcherEnabled,
|
|
1014
1060
|
isThemeSwitcherEnabled: isThemeSwitcherEnabled,
|