@elementor/editor-global-classes 4.1.0-734 → 4.1.0-736
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/index.js +38 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -20
- package/src/components/class-manager/global-classes-list.tsx +2 -2
- package/src/components/search-and-filter/components/filter/css-class-filter.tsx +2 -1
- package/src/components/search-and-filter/context.tsx +2 -2
package/dist/index.mjs
CHANGED
|
@@ -653,7 +653,7 @@ import { useMemo as useMemo2 } from "react";
|
|
|
653
653
|
|
|
654
654
|
// src/components/search-and-filter/context.tsx
|
|
655
655
|
import * as React from "react";
|
|
656
|
-
import { createContext, useContext } from "react";
|
|
656
|
+
import { createContext, useContext, useState } from "react";
|
|
657
657
|
import { useDebounceState } from "@elementor/utils";
|
|
658
658
|
var SearchAndFilterContext = createContext(void 0);
|
|
659
659
|
var INIT_CHECKED_FILTERS = {
|
|
@@ -662,7 +662,7 @@ var INIT_CHECKED_FILTERS = {
|
|
|
662
662
|
unused: false
|
|
663
663
|
};
|
|
664
664
|
var SearchAndFilterProvider = ({ children }) => {
|
|
665
|
-
const [filters, setFilters] =
|
|
665
|
+
const [filters, setFilters] = useState(INIT_CHECKED_FILTERS);
|
|
666
666
|
const getInitialSearchValue = () => {
|
|
667
667
|
const storedValue = localStorage.getItem("elementor-global-classes-search");
|
|
668
668
|
if (storedValue) {
|
|
@@ -1100,6 +1100,7 @@ var chipSx = {
|
|
|
1100
1100
|
|
|
1101
1101
|
// src/components/search-and-filter/components/filter/css-class-filter.tsx
|
|
1102
1102
|
import * as React7 from "react";
|
|
1103
|
+
import { useEffect } from "react";
|
|
1103
1104
|
import { PopoverBody, PopoverHeader } from "@elementor/editor-ui";
|
|
1104
1105
|
import { FilterIcon } from "@elementor/icons";
|
|
1105
1106
|
import { bindPopover, bindToggle, Divider as Divider2, Popover, ToggleButton, Tooltip as Tooltip2, usePopupState } from "@elementor/ui";
|
|
@@ -1112,7 +1113,7 @@ var CssClassFilter = () => {
|
|
|
1112
1113
|
variant: "popover",
|
|
1113
1114
|
disableAutoFocus: true
|
|
1114
1115
|
});
|
|
1115
|
-
|
|
1116
|
+
useEffect(() => {
|
|
1116
1117
|
if (popupState.isOpen) {
|
|
1117
1118
|
trackGlobalClasses({
|
|
1118
1119
|
event: "classManagerFiltersOpened"
|
|
@@ -1274,7 +1275,7 @@ var FlippedColorSwatchIcon = ({ sx, ...props }) => /* @__PURE__ */ React10.creat
|
|
|
1274
1275
|
|
|
1275
1276
|
// src/components/class-manager/global-classes-list.tsx
|
|
1276
1277
|
import * as React17 from "react";
|
|
1277
|
-
import { useEffect as useEffect2, useMemo as useMemo3 } from "react";
|
|
1278
|
+
import { useEffect as useEffect2, useMemo as useMemo3, useState as useState5 } from "react";
|
|
1278
1279
|
import { __useDispatch as useDispatch } from "@elementor/store";
|
|
1279
1280
|
import { List, Stack as Stack8, styled as styled6, Typography as Typography8 } from "@elementor/ui";
|
|
1280
1281
|
import { __ as __13 } from "@wordpress/i18n";
|
|
@@ -1982,7 +1983,7 @@ var GlobalClassesList = ({ disabled, onStopSyncRequest, onStartSyncRequest }) =>
|
|
|
1982
1983
|
const cssClasses = useOrderedClasses();
|
|
1983
1984
|
const dispatch5 = useDispatch();
|
|
1984
1985
|
const filters = useFilters();
|
|
1985
|
-
const [draggedItemId, setDraggedItemId] =
|
|
1986
|
+
const [draggedItemId, setDraggedItemId] = useState5(null);
|
|
1986
1987
|
const draggedItemLabel = cssClasses.find((cssClass) => cssClass.id === draggedItemId)?.label ?? "";
|
|
1987
1988
|
const [classesOrder, reorderClasses] = useReorder(draggedItemId, setDraggedItemId, draggedItemLabel ?? "");
|
|
1988
1989
|
const filteredCssClasses = useFilteredCssClasses();
|