@bigbinary/neeto-molecules 4.0.56 → 4.0.58
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/AuditLogs.js +3 -3
- package/dist/AuditLogs.js.map +1 -1
- package/dist/CalendarView.js +1 -1
- package/dist/{Columns-nz-M_1bb.js → Columns-DOnfhbIw.js} +48 -28
- package/dist/Columns-DOnfhbIw.js.map +1 -0
- package/dist/Columns.js +2 -1
- package/dist/Columns.js.map +1 -1
- package/dist/Engagements.js +7 -7
- package/dist/Engagements.js.map +1 -1
- package/dist/FloatingActionMenu.js +1 -1
- package/dist/NeetoWidget.js +20 -13
- package/dist/NeetoWidget.js.map +1 -1
- package/dist/PageLoader.js +2 -2
- package/dist/PageLoader.js.map +1 -1
- package/dist/ShareRecordingPane.js +7 -4
- package/dist/ShareRecordingPane.js.map +1 -1
- package/dist/SubHeader.js +1 -1
- package/dist/Taxonomy.js +1 -1
- package/dist/cjs/AuditLogs.js +3 -3
- package/dist/cjs/AuditLogs.js.map +1 -1
- package/dist/cjs/CalendarView.js +1 -1
- package/dist/cjs/{Columns-B5HcheVn.js → Columns-0RbMPRF0.js} +45 -25
- package/dist/cjs/Columns-0RbMPRF0.js.map +1 -0
- package/dist/cjs/Columns.js +2 -1
- package/dist/cjs/Columns.js.map +1 -1
- package/dist/cjs/Engagements.js +7 -7
- package/dist/cjs/Engagements.js.map +1 -1
- package/dist/cjs/FloatingActionMenu.js +1 -1
- package/dist/cjs/NeetoWidget.js +20 -13
- package/dist/cjs/NeetoWidget.js.map +1 -1
- package/dist/cjs/PageLoader.js +2 -2
- package/dist/cjs/PageLoader.js.map +1 -1
- package/dist/cjs/ShareRecordingPane.js +7 -4
- package/dist/cjs/ShareRecordingPane.js.map +1 -1
- package/dist/cjs/SubHeader.js +1 -1
- package/dist/cjs/Taxonomy.js +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +1 -1
- package/types/ShareRecordingPane.d.ts +1 -0
- package/dist/Columns-nz-M_1bb.js.map +0 -1
- package/dist/cjs/Columns-B5HcheVn.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Columns-0RbMPRF0.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 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 >\n <Reorder className=\"neeto-ui-text-gray-800\" size={18} />\n </div>\n <Checkbox\n checked={!hiddenColumns.includes(key)}\n data-cy=\"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)\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-cy=\"customize-columns-dropdown-container\"\n >\n {isSearchable && (\n <Input\n className=\"px-4 py-2\"\n data-cy=\"neeto-ui-columns-search\"\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-cy=\"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-cy=\"column-visibility-hide-all-button\"\n label={t(\"neetoMolecules.columns.hideAll\")}\n style=\"tertiary\"\n onClick={handleHideAllColumns}\n />\n <Button\n data-cy=\"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,QAAQ,CAAC,SAAS,EAAE;AACxB,MAAM,IAAI,CAAC,SAAS,EAAE;AACtB,QAAQ;AACR,MAAM;;AAEN,MAAM,MAAM;AACZ,QAAQ,MAAM;AACd,QAAQ;AACR,OAAO,GAAG,SAAS;AACnB,MAAM,OAAO,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,GAAG;AAC5D,IAAI;;AAEJ,GAAG;AACH,EAAE,SAAS,EAAE;AACb,IAAI,QAAQ,CAAC,SAAS,EAAE;AACxB,MAAM,IAAI,CAAC,SAAS,EAAE;AACtB,QAAQ;AACR,MAAM;;AAEN,MAAM,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CA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AA,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/cjs/Columns.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Columns = require('./Columns-
|
|
5
|
+
var Columns = require('./Columns-0RbMPRF0.js');
|
|
6
6
|
require('@babel/runtime/helpers/defineProperty');
|
|
7
7
|
require('@babel/runtime/helpers/toConsumableArray');
|
|
8
8
|
require('@babel/runtime/helpers/slicedToArray');
|
|
@@ -21,6 +21,7 @@ require('@bigbinary/neetoui/Button');
|
|
|
21
21
|
require('ramda');
|
|
22
22
|
require('react-i18next');
|
|
23
23
|
require('./inject-css-B6qYtOJe.js');
|
|
24
|
+
require('classnames');
|
|
24
25
|
require('@bigbinary/neeto-icons/Reorder');
|
|
25
26
|
require('react/jsx-runtime');
|
|
26
27
|
require('@tanstack/react-query');
|
package/dist/cjs/Columns.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Columns.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Columns.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/cjs/Engagements.js
CHANGED
|
@@ -53,19 +53,19 @@ var Activity = function Activity(_ref) {
|
|
|
53
53
|
_ref$unread = _ref.unread,
|
|
54
54
|
unread = _ref$unread === void 0 ? false : _ref$unread,
|
|
55
55
|
className = _ref.className,
|
|
56
|
-
children = _ref.children
|
|
57
|
-
|
|
58
|
-
name: user.name,
|
|
59
|
-
imageUrl: user.profileImageUrl
|
|
60
|
-
};
|
|
56
|
+
children = _ref.children,
|
|
57
|
+
userIcon = _ref.userIcon;
|
|
61
58
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
62
59
|
className: classnames("neeto-molecules-engagements-node relative -mt-4 flex items-center gap-2 px-4 py-4", className),
|
|
63
60
|
children: [/*#__PURE__*/jsxRuntime.jsx(ActivityIcon, {
|
|
64
61
|
icon: icon,
|
|
65
62
|
unread: unread
|
|
66
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Avatar, {
|
|
63
|
+
}), userIcon || /*#__PURE__*/jsxRuntime.jsx(Avatar, {
|
|
67
64
|
size: "small",
|
|
68
|
-
user:
|
|
65
|
+
user: {
|
|
66
|
+
name: user.name,
|
|
67
|
+
imageUrl: user.profileImageUrl
|
|
68
|
+
}
|
|
69
69
|
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
70
70
|
className: "neeto-molecules-engagements-node__children",
|
|
71
71
|
children: children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Engagements.js","sources":["../../src/components/Engagements/Activity/Icon.jsx","../../src/components/Engagements/Activity/index.jsx","../../src/components/Engagements/Comment/Header.jsx","../../src/components/Engagements/Comment/Reactions.jsx","../../src/components/Engagements/constants.js","../../src/components/Engagements/utils.js","../../src/components/Engagements/Comment/index.jsx","../../src/components/Engagements/index.jsx"],"sourcesContent":["import classNames from \"classnames\";\n\nconst ActivityIcon = ({ icon, unread }) => (\n <div className=\"mx-0.5 flex-shrink-0\">\n <span\n className={classNames(\n \"neeto-ui-bg-gray-200 neeto-ui-text-gray-600 neeto-ui-rounded-full neeto-molecules-activity-node-icon relative z-10 flex h-7 w-7 items-center justify-center p-1\",\n {\n \"neeto-ui-text-primary-600 neeto-ui-bg-primary-100\": unread,\n }\n )}\n >\n {icon}\n {unread && (\n <span className=\"neeto-ui-rounded-full neeto-ui-bg-primary-800 absolute -right-0.5 -top-0.5 h-2 w-2\" />\n )}\n </span>\n </div>\n);\n\nexport default ActivityIcon;\n","import classNames from \"classnames\";\nimport { Avatar } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport ActivityIcon from \"./Icon\";\n\nconst Activity = ({ user, icon, unread = false, className, children }) => {\n const avatar = { name: user.name, imageUrl: user.profileImageUrl };\n\n return (\n <div\n className={classNames(\n \"neeto-molecules-engagements-node relative -mt-4 flex items-center gap-2 px-4 py-4\",\n className\n )}\n >\n <ActivityIcon {...{ icon, unread }} />\n <Avatar size=\"small\" user={avatar} />\n <div className=\"neeto-molecules-engagements-node__children\">\n {children}\n </div>\n </div>\n );\n};\n\nActivity.propTypes = {\n /** Object representing the user information */\n user: PropTypes.shape({ name: PropTypes.string.isRequired }).isRequired,\n\n /** Element to render as the icon */\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n\n /** Boolean indicating if the activity is unread to show unread badge */\n unread: PropTypes.bool,\n\n /** Additional classes passed on to the board view. */\n className: PropTypes.string,\n};\n\nexport default Activity;\n","import { isPresent } from \"neetocist\";\nimport { Avatar, Typography } from \"neetoui\";\n\nimport DateFormat from \"components/DateFormat\";\nimport MoreDropdown from \"components/MoreDropdown\";\n\nconst CommentHeader = ({ user, comment, info, actions }) => {\n const avatar = { name: user.name, imageUrl: user.profileImageUrl };\n\n return (\n <div className=\"neeto-ui-bg-gray-100 neeto-ui-border-gray-300 flex items-center justify-between rounded-t-md border-b py-1 pl-4 pr-1\">\n <div className=\"flex min-w-0 flex-grow flex-wrap items-center gap-2\">\n <Avatar size=\"medium\" user={avatar} />\n <Typography\n className=\"neeto-ui-text-gray-700\"\n style=\"body2\"\n weight=\"semibold\"\n >\n {user.name}\n </Typography>\n <Typography className=\"neeto-ui-text-gray-700\" style=\"body2\">\n •\n </Typography>\n {info && (\n <>\n <Typography\n className=\"neeto-ui-text-gray-500 lowercase\"\n style=\"body2\"\n >\n {info}\n </Typography>\n <Typography className=\"neeto-ui-text-gray-700\" style=\"body2\">\n •\n </Typography>\n </>\n )}\n {comment.createdAt && (\n <DateFormat.FromNow\n date={comment.createdAt}\n typographyProps={{\n style: \"body2\",\n className: \"neeto-ui-text-gray-500\",\n }}\n />\n )}\n </div>\n {isPresent(actions) && (\n <MoreDropdown\n dropdownButtonProps={{ className: \"self-start fles-shrink-0\" }}\n dropdownProps={{ position: \"bottom-start\" }}\n menuItems={actions}\n />\n )}\n </div>\n );\n};\n\nexport default CommentHeader;\n","import { memo } from \"react\";\n\nimport classNames from \"classnames\";\nimport { findIndexBy } from \"neetocist\";\nimport { globalProps } from \"neetocommons/initializers\";\nimport { Tooltip, Typography } from \"neetoui\";\nimport { collectBy, eqProps, pathEq, pluck, prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport EmojiPicker from \"components/EmojiPicker\";\n\nconst findOwnIndex = findIndexBy({ userId: globalProps.user.id });\nconst groupReactions = collectBy(prop(\"unified\"));\n\nconst Reactions = ({ reactions, onAdd, onRemove }) => {\n const { t } = useTranslation();\n const groups = groupReactions(reactions);\n\n const onSelect = emoji => {\n // Try to find group to which emoji belongs in existing reactions.\n const group = groups.find(pathEq(emoji.unified, [0, \"unified\"]));\n if (group && findOwnIndex(group) >= 0) return; // User already reacted with same emoji.\n onAdd({ ...emoji, emoji: emoji.native });\n };\n\n return (\n <div className=\"mt-2 flex flex-wrap gap-0.5\">\n <div className=\"neeto-ui-rounded-full neeto-ui-bg-gray-200 mr-2\">\n <EmojiPicker {...{ onSelect }} />\n </div>\n {groups.map(reactions => {\n const ownIndex = findOwnIndex(reactions);\n const selected = ownIndex >= 0;\n const reaction = selected ? reactions[ownIndex] : reactions[0];\n const names = pluck(\"reactor\", reactions).join(\", \");\n\n return (\n <Tooltip\n key={reaction.unified}\n position=\"top\"\n content={\n <p className=\"text-center text-xs\">\n {t(\"neetoMolecules.engagements.namesReacted\", { names })}\n </p>\n }\n >\n <div\n className={classNames(\n \"neeto-ui-rounded-full mx-1 flex cursor-pointer items-center justify-center px-2 py-1\",\n {\n \"neeto-ui-bg-accent-100\": selected,\n \"neeto-ui-bg-gray-100\": !selected,\n }\n )}\n onClick={() => (selected ? onRemove : onAdd)(reaction)}\n >\n <Typography\n className=\"flex items-center gap-x-1 text-sm\"\n style=\"body2\"\n >\n <span className=\"text-sm\">{reaction.emoji}</span>\n <span className=\"text-sm\">{reactions.length}</span>\n </Typography>\n </div>\n </Tooltip>\n );\n })}\n </div>\n );\n};\n\nexport default memo(Reactions, eqProps(\"reactions\"));\n","export const ACTIVITY_TYPES = {\n TIMELINE: \"Timeline\",\n FIELD_VALUE: \"FieldValue\",\n TASK: \"Task\",\n ASSIGNEE: \"Assignee\",\n CHECKLIST: \"Checklist\",\n FIELD: \"Field\",\n PROJECT: \"Project\",\n COMMENT: \"Comment\",\n DOCUMENT: \"Document\",\n CHAT_MESSAGE: \"ChatMessage\",\n MESSAGE: \"Message\",\n SECTION: \"Section\",\n PROJECT_MEMBER: \"ProjectMember\",\n PULL_REQUEST: \"NeetoGithubEngine::PullRequest\",\n};\n\nexport const ENGAGEMENT_TYPES = {\n COMMENT: \"comment\",\n ACTIVITY: \"activity\",\n};\n","import { ENGAGEMENT_TYPES } from \"./constants\";\n\nexport const createCommentElementId = comment =>\n `neeto-molecules-engagement-comment--${comment.id}`;\n\nexport const defaultMatchType = engagement => {\n if (engagement.commenter) return ENGAGEMENT_TYPES.COMMENT;\n else if (engagement.creator) return ENGAGEMENT_TYPES.ACTIVITY;\n\n return null;\n};\n","import { forwardRef } from \"react\";\n\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport CommentHeader from \"./Header\";\nimport Reactions from \"./Reactions\";\n\nimport { createCommentElementId } from \"../utils\";\n\nconst Comment = forwardRef(\n (\n {\n user,\n comment,\n reactions,\n info,\n actions,\n className,\n children,\n onAddReaction,\n onRemoveReaction,\n },\n ref\n ) => (\n <div\n {...{ ref }}\n id={createCommentElementId(comment)}\n className={classNames(\n \"neeto-ui-bg-white neeto-ui-rounded-md neeto-ui-border-gray-300 neeto-molecules-comments-node mb-4 w-full border\",\n className\n )}\n >\n <CommentHeader {...{ actions, comment, info, user }} />\n <div className=\"neeto-molecules-comments-node__inner p-4\">\n {children}\n {reactions !== false && (\n <Reactions\n {...{ reactions }}\n onAdd={onAddReaction}\n onRemove={onRemoveReaction}\n />\n )}\n </div>\n </div>\n )\n);\n\nComment.displayName = \"Comment\";\nComment.propTypes = {\n /** Object representing the user information */\n user: PropTypes.shape({ name: PropTypes.string.isRequired }).isRequired,\n\n /** Object representing the comment item. */\n comment: PropTypes.shape({\n id: PropTypes.string.isRequired,\n createdAt: PropTypes.string.isRequired,\n }).isRequired,\n\n /** Array of reactions. Settings this to `false` will disable reactions for the item */\n reactions: PropTypes.oneOfType([PropTypes.array, PropTypes.bool]),\n\n /** Optional text label to be displayed in the header. */\n info: PropTypes.string,\n\n /** Optional action items to be passed to the menuItems prop of the actions dropdown */\n actions: PropTypes.arrayOf(\n PropTypes.shape({\n isVisible: PropTypes.bool,\n key: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n })\n ),\n\n /** Additional classes passed on to the board view. */\n className: PropTypes.string,\n\n /** Callback function triggered when a reaction (emoji) is added */\n onAddReaction: PropTypes.func,\n\n /** Callback function triggered when a reaction (emoji) is removed*/\n onRemoveReaction: PropTypes.func,\n};\n\nexport default Comment;\n","import React from \"react\";\n\nimport { noop } from \"neetocist\";\nimport PropTypes from \"prop-types\";\n\nimport Activity from \"./Activity\";\nimport Comment from \"./Comment\";\nimport { ENGAGEMENT_TYPES } from \"./constants\";\nimport \"./engagements.scss\";\nimport { defaultMatchType } from \"./utils\";\n\nconst Engagements = ({\n data,\n isActivitiesEnabled = false,\n matchType = defaultMatchType,\n renderComment,\n renderActivity,\n}) => {\n const rendererHashmap = {\n [ENGAGEMENT_TYPES.COMMENT]: renderComment,\n [ENGAGEMENT_TYPES.ACTIVITY]: isActivitiesEnabled ? renderActivity : noop,\n };\n\n return (\n <>\n {data.map((engagement, index) => {\n const type = matchType(engagement);\n const renderer = rendererHashmap[type];\n if (!renderer) return null;\n\n return (\n <React.Fragment key={engagement.id}>\n {renderer(engagement, index)}\n </React.Fragment>\n );\n })}\n </>\n );\n};\n\nEngagements.displayName = \"Engagements\";\nEngagements.Comment = Comment;\nEngagements.Activity = Activity;\nEngagements.TYPES = ENGAGEMENT_TYPES;\n\nEngagements.propTypes = {\n /** An array of engagement items */\n data: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string.isRequired }))\n .isRequired,\n\n /** Boolean, determines whether activities are rendered. Defaults to false */\n isActivitiesEnabled: PropTypes.bool,\n\n /** Optional function to match the item type. Receives item as argument and should return one of Engagements.TYPES.*/\n matchType: PropTypes.func,\n\n /** A function to render individual comment item. Receives comment and index as arguments */\n renderComment: PropTypes.func.isRequired,\n\n /** A function to render individual activity item. Receives comment and index as arguments */\n renderActivity: PropTypes.func.isRequired,\n};\n\nexport default Engagements;\n"],"names":["ActivityIcon","_ref","icon","unread","_jsx","className","children","_jsxs","classNames","Activity","user","_ref$unread","avatar","name","imageUrl","profileImageUrl","Avatar","size","CommentHeader","comment","info","actions","Typography","style","weight","_Fragment","createdAt","DateFormat","FromNow","date","typographyProps","isPresent","MoreDropdown","dropdownButtonProps","dropdownProps","position","menuItems","findOwnIndex","findIndexBy","userId","globalProps","id","groupReactions","collectBy","prop","Reactions","reactions","onAdd","onRemove","_useTranslation","useTranslation","t","groups","onSelect","emoji","group","find","pathEq","unified","_objectSpread","EmojiPicker","map","ownIndex","selected","reaction","names","pluck","join","Tooltip","content","onClick","length","memo","eqProps","ENGAGEMENT_TYPES","COMMENT","ACTIVITY","createCommentElementId","concat","defaultMatchType","engagement","commenter","creator","Comment","forwardRef","ref","onAddReaction","onRemoveReaction","displayName","propTypes","PropTypes","shape","string","isRequired","oneOfType","array","bool","arrayOf","isVisible","key","label","func","Engagements","data","_ref$isActivitiesEnab","isActivitiesEnabled","_ref$matchType","matchType","renderComment","renderActivity","rendererHashmap","_defineProperty","noop","index","type","renderer","React","Fragment","TYPES"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;AAAA,EAAA,oBAClCC,cAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,sBAAsB;AAAAC,IAAAA,QAAA,eACnCC,eAAA,CAAA,MAAA,EAAA;AACEF,MAAAA,SAAS,EAAEG,UAAU,CACnB,iKAAiK,EACjK;AACE,QAAA,mDAAmD,EAAEL;AACvD,OACF,CAAE;AAAAG,MAAAA,QAAA,EAAA,CAEDJ,IAAI,EACJC,MAAM,iBACLC,cAAA,CAAA,MAAA,EAAA;AAAMC,QAAAA,SAAS,EAAC;AAAoF,OAAE,CACvG;KACG;AAAC,GACJ,CAAC;AAAA,CACP;;ACZD,IAAMI,QAAQ,GAAG,SAAXA,QAAQA,CAAAR,IAAA,EAA4D;AAAA,EAAA,IAAtDS,IAAI,GAAAT,IAAA,CAAJS,IAAI;IAAER,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAAS,WAAA,GAAAV,IAAA,CAAEE,MAAM;AAANA,IAAAA,MAAM,GAAAQ,WAAA,KAAA,MAAA,GAAG,KAAK,GAAAA,WAAA;IAAEN,SAAS,GAAAJ,IAAA,CAATI,SAAS;IAAEC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;AACjE,EAAA,IAAMM,MAAM,GAAG;IAAEC,IAAI,EAAEH,IAAI,CAACG,IAAI;IAAEC,QAAQ,EAAEJ,IAAI,CAACK;GAAiB;AAElE,EAAA,oBACER,eAAA,CAAA,KAAA,EAAA;AACEF,IAAAA,SAAS,EAAEG,UAAU,CACnB,mFAAmF,EACnFH,SACF,CAAE;IAAAC,QAAA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A,CAACgH,KAAK,CAACC,QAAQ,EAAA;AAAA/G,QAAAA,QAAA,EACZ6G,QAAQ,CAACnC,UAAU,EAAEiC,KAAK;OAAC,EADTjC,UAAU,CAACvC,EAEhB,CAAC;IAErB,CAAC;AAAC,GACF,CAAC;AAEP;AAEA6D,WAAW,CAACd,WAAW,GAAG,aAAa;AACvCc,WAAW,CAACnB,OAAO,GAAGA,OAAO;AAC7BmB,WAAW,CAAC7F,QAAQ,GAAGA,QAAQ;AAC/B6F,WAAW,CAACgB,KAAK,GAAG5C,gBAAgB;;;;"}
|
|
1
|
+
{"version":3,"file":"Engagements.js","sources":["../../src/components/Engagements/Activity/Icon.jsx","../../src/components/Engagements/Activity/index.jsx","../../src/components/Engagements/Comment/Header.jsx","../../src/components/Engagements/Comment/Reactions.jsx","../../src/components/Engagements/constants.js","../../src/components/Engagements/utils.js","../../src/components/Engagements/Comment/index.jsx","../../src/components/Engagements/index.jsx"],"sourcesContent":["import classNames from \"classnames\";\n\nconst ActivityIcon = ({ icon, unread }) => (\n <div className=\"mx-0.5 flex-shrink-0\">\n <span\n className={classNames(\n \"neeto-ui-bg-gray-200 neeto-ui-text-gray-600 neeto-ui-rounded-full neeto-molecules-activity-node-icon relative z-10 flex h-7 w-7 items-center justify-center p-1\",\n {\n \"neeto-ui-text-primary-600 neeto-ui-bg-primary-100\": unread,\n }\n )}\n >\n {icon}\n {unread && (\n <span className=\"neeto-ui-rounded-full neeto-ui-bg-primary-800 absolute -right-0.5 -top-0.5 h-2 w-2\" />\n )}\n </span>\n </div>\n);\n\nexport default ActivityIcon;\n","import classNames from \"classnames\";\nimport { Avatar } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport ActivityIcon from \"./Icon\";\n\nconst Activity = ({\n user,\n icon,\n unread = false,\n className,\n children,\n userIcon,\n}) => (\n <div\n className={classNames(\n \"neeto-molecules-engagements-node relative -mt-4 flex items-center gap-2 px-4 py-4\",\n className\n )}\n >\n <ActivityIcon {...{ icon, unread }} />\n {userIcon || (\n <Avatar\n size=\"small\"\n user={{ name: user.name, imageUrl: user.profileImageUrl }}\n />\n )}\n <div className=\"neeto-molecules-engagements-node__children\">{children}</div>\n </div>\n);\n\nActivity.propTypes = {\n /** Object representing the user information */\n user: PropTypes.shape({ name: PropTypes.string.isRequired }).isRequired,\n\n /** Element to render as the icon */\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n\n /** Boolean indicating if the activity is unread to show unread badge */\n unread: PropTypes.bool,\n\n /** Additional classes passed on to the board view. */\n className: PropTypes.string,\n};\n\nexport default Activity;\n","import { isPresent } from \"neetocist\";\nimport { Avatar, Typography } from \"neetoui\";\n\nimport DateFormat from \"components/DateFormat\";\nimport MoreDropdown from \"components/MoreDropdown\";\n\nconst CommentHeader = ({ user, comment, info, actions }) => {\n const avatar = { name: user.name, imageUrl: user.profileImageUrl };\n\n return (\n <div className=\"neeto-ui-bg-gray-100 neeto-ui-border-gray-300 flex items-center justify-between rounded-t-md border-b py-1 pl-4 pr-1\">\n <div className=\"flex min-w-0 flex-grow flex-wrap items-center gap-2\">\n <Avatar size=\"medium\" user={avatar} />\n <Typography\n className=\"neeto-ui-text-gray-700\"\n style=\"body2\"\n weight=\"semibold\"\n >\n {user.name}\n </Typography>\n <Typography className=\"neeto-ui-text-gray-700\" style=\"body2\">\n •\n </Typography>\n {info && (\n <>\n <Typography\n className=\"neeto-ui-text-gray-500 lowercase\"\n style=\"body2\"\n >\n {info}\n </Typography>\n <Typography className=\"neeto-ui-text-gray-700\" style=\"body2\">\n •\n </Typography>\n </>\n )}\n {comment.createdAt && (\n <DateFormat.FromNow\n date={comment.createdAt}\n typographyProps={{\n style: \"body2\",\n className: \"neeto-ui-text-gray-500\",\n }}\n />\n )}\n </div>\n {isPresent(actions) && (\n <MoreDropdown\n dropdownButtonProps={{ className: \"self-start fles-shrink-0\" }}\n dropdownProps={{ position: \"bottom-start\" }}\n menuItems={actions}\n />\n )}\n </div>\n );\n};\n\nexport default CommentHeader;\n","import { memo } from \"react\";\n\nimport classNames from \"classnames\";\nimport { findIndexBy } from \"neetocist\";\nimport { globalProps } from \"neetocommons/initializers\";\nimport { Tooltip, Typography } from \"neetoui\";\nimport { collectBy, eqProps, pathEq, pluck, prop } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport EmojiPicker from \"components/EmojiPicker\";\n\nconst findOwnIndex = findIndexBy({ userId: globalProps.user.id });\nconst groupReactions = collectBy(prop(\"unified\"));\n\nconst Reactions = ({ reactions, onAdd, onRemove }) => {\n const { t } = useTranslation();\n const groups = groupReactions(reactions);\n\n const onSelect = emoji => {\n // Try to find group to which emoji belongs in existing reactions.\n const group = groups.find(pathEq(emoji.unified, [0, \"unified\"]));\n if (group && findOwnIndex(group) >= 0) return; // User already reacted with same emoji.\n onAdd({ ...emoji, emoji: emoji.native });\n };\n\n return (\n <div className=\"mt-2 flex flex-wrap gap-0.5\">\n <div className=\"neeto-ui-rounded-full neeto-ui-bg-gray-200 mr-2\">\n <EmojiPicker {...{ onSelect }} />\n </div>\n {groups.map(reactions => {\n const ownIndex = findOwnIndex(reactions);\n const selected = ownIndex >= 0;\n const reaction = selected ? reactions[ownIndex] : reactions[0];\n const names = pluck(\"reactor\", reactions).join(\", \");\n\n return (\n <Tooltip\n key={reaction.unified}\n position=\"top\"\n content={\n <p className=\"text-center text-xs\">\n {t(\"neetoMolecules.engagements.namesReacted\", { names })}\n </p>\n }\n >\n <div\n className={classNames(\n \"neeto-ui-rounded-full mx-1 flex cursor-pointer items-center justify-center px-2 py-1\",\n {\n \"neeto-ui-bg-accent-100\": selected,\n \"neeto-ui-bg-gray-100\": !selected,\n }\n )}\n onClick={() => (selected ? onRemove : onAdd)(reaction)}\n >\n <Typography\n className=\"flex items-center gap-x-1 text-sm\"\n style=\"body2\"\n >\n <span className=\"text-sm\">{reaction.emoji}</span>\n <span className=\"text-sm\">{reactions.length}</span>\n </Typography>\n </div>\n </Tooltip>\n );\n })}\n </div>\n );\n};\n\nexport default memo(Reactions, eqProps(\"reactions\"));\n","export const ACTIVITY_TYPES = {\n TIMELINE: \"Timeline\",\n FIELD_VALUE: \"FieldValue\",\n TASK: \"Task\",\n ASSIGNEE: \"Assignee\",\n CHECKLIST: \"Checklist\",\n FIELD: \"Field\",\n PROJECT: \"Project\",\n COMMENT: \"Comment\",\n DOCUMENT: \"Document\",\n CHAT_MESSAGE: \"ChatMessage\",\n MESSAGE: \"Message\",\n SECTION: \"Section\",\n PROJECT_MEMBER: \"ProjectMember\",\n PULL_REQUEST: \"NeetoGithubEngine::PullRequest\",\n};\n\nexport const ENGAGEMENT_TYPES = {\n COMMENT: \"comment\",\n ACTIVITY: \"activity\",\n};\n","import { ENGAGEMENT_TYPES } from \"./constants\";\n\nexport const createCommentElementId = comment =>\n `neeto-molecules-engagement-comment--${comment.id}`;\n\nexport const defaultMatchType = engagement => {\n if (engagement.commenter) return ENGAGEMENT_TYPES.COMMENT;\n else if (engagement.creator) return ENGAGEMENT_TYPES.ACTIVITY;\n\n return null;\n};\n","import { forwardRef } from \"react\";\n\nimport classNames from \"classnames\";\nimport PropTypes from \"prop-types\";\n\nimport CommentHeader from \"./Header\";\nimport Reactions from \"./Reactions\";\n\nimport { createCommentElementId } from \"../utils\";\n\nconst Comment = forwardRef(\n (\n {\n user,\n comment,\n reactions,\n info,\n actions,\n className,\n children,\n onAddReaction,\n onRemoveReaction,\n },\n ref\n ) => (\n <div\n {...{ ref }}\n id={createCommentElementId(comment)}\n className={classNames(\n \"neeto-ui-bg-white neeto-ui-rounded-md neeto-ui-border-gray-300 neeto-molecules-comments-node mb-4 w-full border\",\n className\n )}\n >\n <CommentHeader {...{ actions, comment, info, user }} />\n <div className=\"neeto-molecules-comments-node__inner p-4\">\n {children}\n {reactions !== false && (\n <Reactions\n {...{ reactions }}\n onAdd={onAddReaction}\n onRemove={onRemoveReaction}\n />\n )}\n </div>\n </div>\n )\n);\n\nComment.displayName = \"Comment\";\nComment.propTypes = {\n /** Object representing the user information */\n user: PropTypes.shape({ name: PropTypes.string.isRequired }).isRequired,\n\n /** Object representing the comment item. */\n comment: PropTypes.shape({\n id: PropTypes.string.isRequired,\n createdAt: PropTypes.string.isRequired,\n }).isRequired,\n\n /** Array of reactions. Settings this to `false` will disable reactions for the item */\n reactions: PropTypes.oneOfType([PropTypes.array, PropTypes.bool]),\n\n /** Optional text label to be displayed in the header. */\n info: PropTypes.string,\n\n /** Optional action items to be passed to the menuItems prop of the actions dropdown */\n actions: PropTypes.arrayOf(\n PropTypes.shape({\n isVisible: PropTypes.bool,\n key: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func.isRequired,\n })\n ),\n\n /** Additional classes passed on to the board view. */\n className: PropTypes.string,\n\n /** Callback function triggered when a reaction (emoji) is added */\n onAddReaction: PropTypes.func,\n\n /** Callback function triggered when a reaction (emoji) is removed*/\n onRemoveReaction: PropTypes.func,\n};\n\nexport default Comment;\n","import React from \"react\";\n\nimport { noop } from \"neetocist\";\nimport PropTypes from \"prop-types\";\n\nimport Activity from \"./Activity\";\nimport Comment from \"./Comment\";\nimport { ENGAGEMENT_TYPES } from \"./constants\";\nimport \"./engagements.scss\";\nimport { defaultMatchType } from \"./utils\";\n\nconst Engagements = ({\n data,\n isActivitiesEnabled = false,\n matchType = defaultMatchType,\n renderComment,\n renderActivity,\n}) => {\n const rendererHashmap = {\n [ENGAGEMENT_TYPES.COMMENT]: renderComment,\n [ENGAGEMENT_TYPES.ACTIVITY]: isActivitiesEnabled ? renderActivity : noop,\n };\n\n return (\n <>\n {data.map((engagement, index) => {\n const type = matchType(engagement);\n const renderer = rendererHashmap[type];\n if (!renderer) return null;\n\n return (\n <React.Fragment key={engagement.id}>\n {renderer(engagement, index)}\n </React.Fragment>\n );\n })}\n </>\n );\n};\n\nEngagements.displayName = \"Engagements\";\nEngagements.Comment = Comment;\nEngagements.Activity = Activity;\nEngagements.TYPES = ENGAGEMENT_TYPES;\n\nEngagements.propTypes = {\n /** An array of engagement items */\n data: PropTypes.arrayOf(PropTypes.shape({ id: PropTypes.string.isRequired }))\n .isRequired,\n\n /** Boolean, determines whether activities are rendered. Defaults to false */\n isActivitiesEnabled: PropTypes.bool,\n\n /** Optional function to match the item type. Receives item as argument and should return one of Engagements.TYPES.*/\n matchType: PropTypes.func,\n\n /** A function to render individual comment item. Receives comment and index as arguments */\n renderComment: PropTypes.func.isRequired,\n\n /** A function to render individual activity item. Receives comment and index as arguments */\n renderActivity: PropTypes.func.isRequired,\n};\n\nexport default Engagements;\n"],"names":["ActivityIcon","_ref","icon","unread","_jsx","className","children","_jsxs","classNames","Activity","user","_ref$unread","userIcon","Avatar","size","name","imageUrl","profileImageUrl","CommentHeader","comment","info","actions","avatar","Typography","style","weight","_Fragment","createdAt","DateFormat","FromNow","date","typographyProps","isPresent","MoreDropdown","dropdownButtonProps","dropdownProps","position","menuItems","findOwnIndex","findIndexBy","userId","globalProps","id","groupReactions","collectBy","prop","Reactions","reactions","onAdd","onRemove","_useTranslation","useTranslation","t","groups","onSelect","emoji","group","find","pathEq","unified","_objectSpread","EmojiPicker","map","ownIndex","selected","reaction","names","pluck","join","Tooltip","content","onClick","length","memo","eqProps","ENGAGEMENT_TYPES","COMMENT","ACTIVITY","createCommentElementId","concat","defaultMatchType","engagement","commenter","creator","Comment","forwardRef","ref","onAddReaction","onRemoveReaction","displayName","propTypes","PropTypes","shape","string","isRequired","oneOfType","array","bool","arrayOf","isVisible","key","label","func","Engagements","data","_ref$isActivitiesEnab","isActivitiesEnabled","_ref$matchType","matchType","renderComment","renderActivity","rendererHashmap","_defineProperty","noop","index","type","renderer","React","Fragment","TYPES"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAEC,MAAM,GAAAF,IAAA,CAANE,MAAM;AAAA,EAAA,oBAClCC,cAAA,C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F,QAAQ,GAAGA,QAAQ;AAC/B8F,WAAW,CAACgB,KAAK,GAAG5C,gBAAgB;;;;"}
|
|
@@ -90,7 +90,7 @@ var useFetchNeetoApps = function useFetchNeetoApps(options) {
|
|
|
90
90
|
}, options));
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
-
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 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{position:absolute;right:12px;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%}.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__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{align-items:flex-start;padding-top:
|
|
93
|
+
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 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{position:absolute;right:12px;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%}.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__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-left:24px;padding-right:56px}@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(100vh - var(--neeto-molecules-product-switcher-modal-padding-y) - 164px);margin-bottom:0;overflow-y:auto;padding-left:24px;padding-right: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(90vh - var(--neeto-molecules-product-switcher-modal-padding-y) - 164px)}}.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}";
|
|
94
94
|
injectCss.n(css$1,{});
|
|
95
95
|
|
|
96
96
|
var ProductLink = function ProductLink(_ref) {
|
package/dist/cjs/NeetoWidget.js
CHANGED
|
@@ -2189,27 +2189,34 @@ var CodeBlock = function CodeBlock(_ref) {
|
|
|
2189
2189
|
style: "h4",
|
|
2190
2190
|
children: title
|
|
2191
2191
|
}), selectedFramework && /*#__PURE__*/jsxRuntime.jsx(Select, {
|
|
2192
|
-
className: "w-40",
|
|
2192
|
+
className: "max-w-40",
|
|
2193
2193
|
"data-testid": "framework-select",
|
|
2194
2194
|
options: FRAMEWORK_SELECT_OPTIONS,
|
|
2195
2195
|
value: selectedFramework,
|
|
2196
2196
|
onChange: setSelectedFramework
|
|
2197
|
-
}), /*#__PURE__*/jsxRuntime.
|
|
2197
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2198
2198
|
className: "ml-auto flex flex-shrink-0 items-center justify-end gap-2",
|
|
2199
|
-
children:
|
|
2200
|
-
style: "
|
|
2199
|
+
children: sendViaEmail ? /*#__PURE__*/jsxRuntime.jsx(Button, {
|
|
2200
|
+
style: "tertiary",
|
|
2201
2201
|
label: t("neetoMolecules.widget.installation.snippet.sendViaEmail"),
|
|
2202
2202
|
onClick: sendViaEmail
|
|
2203
|
-
}) : null
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2203
|
+
}) : null
|
|
2204
|
+
})]
|
|
2205
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2206
|
+
className: "relative",
|
|
2207
|
+
children: [showCopyButton && /*#__PURE__*/jsxRuntime.jsx(CopyToClipboardButton, {
|
|
2208
|
+
className: "absolute right-3 top-3",
|
|
2209
|
+
size: "small",
|
|
2210
|
+
style: "secondary",
|
|
2211
|
+
value: codeString,
|
|
2212
|
+
tooltipProps: {
|
|
2213
|
+
content: t("neetoMolecules.widget.installation.snippet.copy")
|
|
2214
|
+
}
|
|
2215
|
+
}), /*#__PURE__*/jsxRuntime.jsx(SyntaxHighlighter$1, {
|
|
2216
|
+
className: "neeto-ui-bg-gray-800 neeto-ui-rounded-lg m-0 rounded-t-none pt-4",
|
|
2217
|
+
code: codeString,
|
|
2218
|
+
language: "javascript"
|
|
2208
2219
|
})]
|
|
2209
|
-
}), /*#__PURE__*/jsxRuntime.jsx(SyntaxHighlighter$1, {
|
|
2210
|
-
className: "neeto-ui-bg-gray-800 neeto-ui-rounded-lg m-0 rounded-t-none",
|
|
2211
|
-
code: codeString,
|
|
2212
|
-
language: "javascript"
|
|
2213
2220
|
})]
|
|
2214
2221
|
});
|
|
2215
2222
|
};
|