@elementor/editor-components 4.0.0-633 → 4.0.0-635
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.d.mts +1516 -1
- package/dist/index.d.ts +1516 -1
- package/dist/index.js +372 -232
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +280 -210
- package/dist/index.mjs.map +1 -1
- package/package.json +23 -23
- package/src/extended/components/create-component-form/create-component-form.tsx +2 -3
- package/src/extended/init.ts +5 -1
- package/src/extended/store/actions/add-overridable-group.ts +14 -20
- package/src/extended/store/actions/archive-component.ts +2 -3
- package/src/extended/store/actions/create-unpublished-component.ts +9 -12
- package/src/extended/store/actions/delete-overridable-group.ts +7 -13
- package/src/extended/store/actions/delete-overridable-prop.ts +9 -15
- package/src/extended/store/actions/rename-component.ts +2 -3
- package/src/extended/store/actions/rename-overridable-group.ts +7 -13
- package/src/extended/store/actions/reorder-group-props.ts +14 -20
- package/src/extended/store/actions/reorder-overridable-groups.ts +10 -16
- package/src/extended/store/actions/reset-sanitized-components.ts +2 -4
- package/src/extended/store/actions/set-overridable-prop.ts +5 -13
- package/src/extended/store/actions/update-component-sanitized-attribute.ts +3 -4
- package/src/extended/store/actions/update-current-component.ts +5 -14
- package/src/extended/store/actions/update-overridable-prop-params.ts +11 -17
- package/src/extended/sync/cleanup-overridable-props-on-delete.ts +3 -10
- package/src/extended/sync/create-components-before-save.ts +12 -14
- package/src/extended/sync/set-component-overridable-props-settings-before-save.ts +2 -3
- package/src/extended/sync/update-archived-component-before-save.ts +2 -3
- package/src/extended/sync/update-component-title-before-save.ts +4 -5
- package/src/extended/utils/component-name-validation.ts +2 -4
- package/src/extended/utils/is-editing-component.ts +2 -10
- package/src/index.ts +120 -0
- package/src/store/actions/update-overridable-prop.ts +4 -10
- package/src/store/dispatchers.ts +63 -0
- package/src/store/selectors.ts +49 -0
package/dist/index.mjs
CHANGED
|
@@ -901,9 +901,6 @@ function OverridablePropProvider({ children, ...props }) {
|
|
|
901
901
|
var useOverridablePropValue = () => useContext3(OverridablePropContext)?.value;
|
|
902
902
|
var useComponentInstanceElement = () => useContext3(OverridablePropContext)?.componentInstanceElement;
|
|
903
903
|
|
|
904
|
-
// src/store/actions/update-overridable-prop.ts
|
|
905
|
-
import { __dispatch as dispatch, __getState as getState2 } from "@elementor/store";
|
|
906
|
-
|
|
907
904
|
// src/utils/resolve-override-prop-value.ts
|
|
908
905
|
var resolveOverridePropValue = (originalPropValue) => {
|
|
909
906
|
const isOverridable = componentOverridablePropTypeUtil.isValid(originalPropValue);
|
|
@@ -935,9 +932,104 @@ function getOverrideValue(overrideProp) {
|
|
|
935
932
|
return overrideValue.override_value;
|
|
936
933
|
}
|
|
937
934
|
|
|
935
|
+
// src/store/dispatchers.ts
|
|
936
|
+
import { __dispatch as dispatch, __getStore as getStore } from "@elementor/store";
|
|
937
|
+
function safeDispatch() {
|
|
938
|
+
return getStore()?.dispatch;
|
|
939
|
+
}
|
|
940
|
+
var componentsActions = {
|
|
941
|
+
add(components) {
|
|
942
|
+
dispatch(slice.actions.add(components));
|
|
943
|
+
},
|
|
944
|
+
load(components) {
|
|
945
|
+
dispatch(slice.actions.load(components));
|
|
946
|
+
},
|
|
947
|
+
addUnpublished(component) {
|
|
948
|
+
dispatch(slice.actions.addUnpublished(component));
|
|
949
|
+
},
|
|
950
|
+
removeUnpublished(uids) {
|
|
951
|
+
dispatch(slice.actions.removeUnpublished(uids));
|
|
952
|
+
},
|
|
953
|
+
resetUnpublished() {
|
|
954
|
+
dispatch(slice.actions.resetUnpublished());
|
|
955
|
+
},
|
|
956
|
+
removeStyles(id2) {
|
|
957
|
+
dispatch(slice.actions.removeStyles({ id: id2 }));
|
|
958
|
+
},
|
|
959
|
+
addStyles(styles) {
|
|
960
|
+
dispatch(slice.actions.addStyles(styles));
|
|
961
|
+
},
|
|
962
|
+
addCreatedThisSession(uid) {
|
|
963
|
+
dispatch(slice.actions.addCreatedThisSession(uid));
|
|
964
|
+
},
|
|
965
|
+
removeCreatedThisSession(uid) {
|
|
966
|
+
dispatch(slice.actions.removeCreatedThisSession(uid));
|
|
967
|
+
},
|
|
968
|
+
archive(componentId) {
|
|
969
|
+
dispatch(slice.actions.archive(componentId));
|
|
970
|
+
},
|
|
971
|
+
setCurrentComponentId(id2) {
|
|
972
|
+
safeDispatch()?.(slice.actions.setCurrentComponentId(id2));
|
|
973
|
+
},
|
|
974
|
+
setPath(path) {
|
|
975
|
+
safeDispatch()?.(slice.actions.setPath(path));
|
|
976
|
+
},
|
|
977
|
+
setOverridableProps(componentId, overridableProps) {
|
|
978
|
+
dispatch(slice.actions.setOverridableProps({ componentId, overridableProps }));
|
|
979
|
+
},
|
|
980
|
+
rename(componentUid, name) {
|
|
981
|
+
dispatch(slice.actions.rename({ componentUid, name }));
|
|
982
|
+
},
|
|
983
|
+
cleanUpdatedComponentNames() {
|
|
984
|
+
dispatch(slice.actions.cleanUpdatedComponentNames());
|
|
985
|
+
},
|
|
986
|
+
updateComponentSanitizedAttribute(componentId, attribute) {
|
|
987
|
+
dispatch(slice.actions.updateComponentSanitizedAttribute({ componentId, attribute }));
|
|
988
|
+
},
|
|
989
|
+
resetSanitizedComponents() {
|
|
990
|
+
dispatch(slice.actions.resetSanitizedComponents());
|
|
991
|
+
}
|
|
992
|
+
};
|
|
993
|
+
|
|
994
|
+
// src/store/selectors.ts
|
|
995
|
+
import { __getState as getState2, __getStore as getStore2 } from "@elementor/store";
|
|
996
|
+
function safeGetState() {
|
|
997
|
+
return getStore2()?.getState();
|
|
998
|
+
}
|
|
999
|
+
var componentsSelectors = {
|
|
1000
|
+
getOverridableProps(componentId) {
|
|
1001
|
+
return selectOverridableProps(getState2(), componentId);
|
|
1002
|
+
},
|
|
1003
|
+
getCurrentComponent() {
|
|
1004
|
+
return selectCurrentComponent(getState2());
|
|
1005
|
+
},
|
|
1006
|
+
getCurrentComponentId() {
|
|
1007
|
+
const state = safeGetState();
|
|
1008
|
+
if (!state) {
|
|
1009
|
+
return null;
|
|
1010
|
+
}
|
|
1011
|
+
return selectCurrentComponentId(state);
|
|
1012
|
+
},
|
|
1013
|
+
getUnpublishedComponents() {
|
|
1014
|
+
return selectUnpublishedComponents(getState2());
|
|
1015
|
+
},
|
|
1016
|
+
getUpdatedComponentNames() {
|
|
1017
|
+
return selectUpdatedComponentNames(getState2());
|
|
1018
|
+
},
|
|
1019
|
+
getArchivedThisSession() {
|
|
1020
|
+
return selectArchivedThisSession(getState2());
|
|
1021
|
+
},
|
|
1022
|
+
getComponents() {
|
|
1023
|
+
return selectComponents(getState2());
|
|
1024
|
+
},
|
|
1025
|
+
getComponentByUid(componentUid) {
|
|
1026
|
+
return selectComponentByUid(getState2(), componentUid);
|
|
1027
|
+
}
|
|
1028
|
+
};
|
|
1029
|
+
|
|
938
1030
|
// src/store/actions/update-overridable-prop.ts
|
|
939
1031
|
function updateOverridableProp(componentId, propValue, originPropFields) {
|
|
940
|
-
const overridableProps =
|
|
1032
|
+
const overridableProps = componentsSelectors.getOverridableProps(componentId);
|
|
941
1033
|
if (!overridableProps) {
|
|
942
1034
|
return;
|
|
943
1035
|
}
|
|
@@ -962,12 +1054,7 @@ function updateOverridableProp(componentId, propValue, originPropFields) {
|
|
|
962
1054
|
}
|
|
963
1055
|
}
|
|
964
1056
|
};
|
|
965
|
-
|
|
966
|
-
slice.actions.setOverridableProps({
|
|
967
|
-
componentId,
|
|
968
|
-
overridableProps: newOverridableProps
|
|
969
|
-
})
|
|
970
|
-
);
|
|
1057
|
+
componentsActions.setOverridableProps(componentId, newOverridableProps);
|
|
971
1058
|
}
|
|
972
1059
|
|
|
973
1060
|
// src/utils/get-container-by-origin-id.ts
|
|
@@ -2045,7 +2132,7 @@ import { getV1DocumentsManager as getV1DocumentsManager3 } from "@elementor/edit
|
|
|
2045
2132
|
import { PanelHeader as PanelHeader3 } from "@elementor/editor-panels";
|
|
2046
2133
|
import { EllipsisWithTooltip as EllipsisWithTooltip4 } from "@elementor/editor-ui";
|
|
2047
2134
|
import { ArrowLeftIcon, ComponentsFilledIcon } from "@elementor/icons";
|
|
2048
|
-
import { __getState as
|
|
2135
|
+
import { __getState as getState8 } from "@elementor/store";
|
|
2049
2136
|
import { Box as Box15, Divider as Divider4, IconButton as IconButton5, Tooltip as Tooltip5, Typography as Typography11 } from "@elementor/ui";
|
|
2050
2137
|
import { __ as __19 } from "@wordpress/i18n";
|
|
2051
2138
|
|
|
@@ -2141,15 +2228,14 @@ import { generateUniqueId as generateUniqueId2 } from "@elementor/utils";
|
|
|
2141
2228
|
import { __ as __16 } from "@wordpress/i18n";
|
|
2142
2229
|
|
|
2143
2230
|
// src/extended/store/actions/add-overridable-group.ts
|
|
2144
|
-
import { __dispatch as dispatch4, __getState as getState8 } from "@elementor/store";
|
|
2145
2231
|
function addOverridableGroup({
|
|
2146
2232
|
componentId,
|
|
2147
2233
|
groupId,
|
|
2148
2234
|
label,
|
|
2149
2235
|
source
|
|
2150
2236
|
}) {
|
|
2151
|
-
const currentComponent =
|
|
2152
|
-
const overridableProps =
|
|
2237
|
+
const currentComponent = componentsSelectors.getCurrentComponent();
|
|
2238
|
+
const overridableProps = componentsSelectors.getOverridableProps(componentId);
|
|
2153
2239
|
if (!overridableProps) {
|
|
2154
2240
|
return;
|
|
2155
2241
|
}
|
|
@@ -2158,22 +2244,17 @@ function addOverridableGroup({
|
|
|
2158
2244
|
label,
|
|
2159
2245
|
props: []
|
|
2160
2246
|
};
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
overridableProps
|
|
2165
|
-
|
|
2166
|
-
groups
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
order: [groupId, ...overridableProps.groups.order]
|
|
2173
|
-
}
|
|
2174
|
-
}
|
|
2175
|
-
})
|
|
2176
|
-
);
|
|
2247
|
+
componentsActions.setOverridableProps(componentId, {
|
|
2248
|
+
...overridableProps,
|
|
2249
|
+
groups: {
|
|
2250
|
+
...overridableProps.groups,
|
|
2251
|
+
items: {
|
|
2252
|
+
...overridableProps.groups.items,
|
|
2253
|
+
[groupId]: newGroup
|
|
2254
|
+
},
|
|
2255
|
+
order: [groupId, ...overridableProps.groups.order]
|
|
2256
|
+
}
|
|
2257
|
+
});
|
|
2177
2258
|
trackComponentEvent({
|
|
2178
2259
|
action: "propertiesGroupCreated",
|
|
2179
2260
|
source,
|
|
@@ -2183,9 +2264,6 @@ function addOverridableGroup({
|
|
|
2183
2264
|
return newGroup;
|
|
2184
2265
|
}
|
|
2185
2266
|
|
|
2186
|
-
// src/extended/store/actions/delete-overridable-group.ts
|
|
2187
|
-
import { __dispatch as dispatch5, __getState as getState9 } from "@elementor/store";
|
|
2188
|
-
|
|
2189
2267
|
// src/extended/store/utils/groups-transformers.ts
|
|
2190
2268
|
import { generateUniqueId } from "@elementor/utils";
|
|
2191
2269
|
import { __ as __9 } from "@wordpress/i18n";
|
|
@@ -2333,7 +2411,7 @@ function renameGroup(groups, groupId, newLabel) {
|
|
|
2333
2411
|
|
|
2334
2412
|
// src/extended/store/actions/delete-overridable-group.ts
|
|
2335
2413
|
function deleteOverridableGroup({ componentId, groupId }) {
|
|
2336
|
-
const overridableProps =
|
|
2414
|
+
const overridableProps = componentsSelectors.getOverridableProps(componentId);
|
|
2337
2415
|
if (!overridableProps) {
|
|
2338
2416
|
return false;
|
|
2339
2417
|
}
|
|
@@ -2342,21 +2420,13 @@ function deleteOverridableGroup({ componentId, groupId }) {
|
|
|
2342
2420
|
return false;
|
|
2343
2421
|
}
|
|
2344
2422
|
const updatedGroups = deleteGroup(overridableProps.groups, groupId);
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
...overridableProps,
|
|
2350
|
-
groups: updatedGroups
|
|
2351
|
-
}
|
|
2352
|
-
})
|
|
2353
|
-
);
|
|
2423
|
+
componentsActions.setOverridableProps(componentId, {
|
|
2424
|
+
...overridableProps,
|
|
2425
|
+
groups: updatedGroups
|
|
2426
|
+
});
|
|
2354
2427
|
return true;
|
|
2355
2428
|
}
|
|
2356
2429
|
|
|
2357
|
-
// src/extended/store/actions/delete-overridable-prop.ts
|
|
2358
|
-
import { __dispatch as dispatch6, __getState as getState10 } from "@elementor/store";
|
|
2359
|
-
|
|
2360
2430
|
// src/extended/utils/revert-overridable-settings.ts
|
|
2361
2431
|
import {
|
|
2362
2432
|
getAllDescendants,
|
|
@@ -2497,7 +2567,7 @@ function revertElementSettings(element) {
|
|
|
2497
2567
|
|
|
2498
2568
|
// src/extended/store/actions/delete-overridable-prop.ts
|
|
2499
2569
|
function deleteOverridableProp({ componentId, propKey, source }) {
|
|
2500
|
-
const overridableProps =
|
|
2570
|
+
const overridableProps = componentsSelectors.getOverridableProps(componentId);
|
|
2501
2571
|
if (!overridableProps || Object.keys(overridableProps.props).length === 0) {
|
|
2502
2572
|
return;
|
|
2503
2573
|
}
|
|
@@ -2518,17 +2588,12 @@ function deleteOverridableProp({ componentId, propKey, source }) {
|
|
|
2518
2588
|
Object.entries(overridableProps.props).filter(([key]) => !propKeysToDelete.includes(key))
|
|
2519
2589
|
);
|
|
2520
2590
|
const updatedGroups = removePropFromAllGroups(overridableProps.groups, propKey);
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
groups: updatedGroups
|
|
2528
|
-
}
|
|
2529
|
-
})
|
|
2530
|
-
);
|
|
2531
|
-
const currentComponent = selectCurrentComponent(getState10());
|
|
2591
|
+
componentsActions.setOverridableProps(componentId, {
|
|
2592
|
+
...overridableProps,
|
|
2593
|
+
props: remainingProps,
|
|
2594
|
+
groups: updatedGroups
|
|
2595
|
+
});
|
|
2596
|
+
const currentComponent = componentsSelectors.getCurrentComponent();
|
|
2532
2597
|
for (const prop of deletedProps) {
|
|
2533
2598
|
trackComponentEvent({
|
|
2534
2599
|
action: "propertyRemoved",
|
|
@@ -2543,9 +2608,8 @@ function deleteOverridableProp({ componentId, propKey, source }) {
|
|
|
2543
2608
|
}
|
|
2544
2609
|
|
|
2545
2610
|
// src/extended/store/actions/reorder-group-props.ts
|
|
2546
|
-
import { __dispatch as dispatch7, __getState as getState11 } from "@elementor/store";
|
|
2547
2611
|
function reorderGroupProps({ componentId, groupId, newPropsOrder }) {
|
|
2548
|
-
const overridableProps =
|
|
2612
|
+
const overridableProps = componentsSelectors.getOverridableProps(componentId);
|
|
2549
2613
|
if (!overridableProps) {
|
|
2550
2614
|
return;
|
|
2551
2615
|
}
|
|
@@ -2553,56 +2617,44 @@ function reorderGroupProps({ componentId, groupId, newPropsOrder }) {
|
|
|
2553
2617
|
if (!group) {
|
|
2554
2618
|
return;
|
|
2555
2619
|
}
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
overridableProps
|
|
2560
|
-
|
|
2561
|
-
groups
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
[groupId]: {
|
|
2566
|
-
...group,
|
|
2567
|
-
props: newPropsOrder
|
|
2568
|
-
}
|
|
2569
|
-
}
|
|
2620
|
+
componentsActions.setOverridableProps(componentId, {
|
|
2621
|
+
...overridableProps,
|
|
2622
|
+
groups: {
|
|
2623
|
+
...overridableProps.groups,
|
|
2624
|
+
items: {
|
|
2625
|
+
...overridableProps.groups.items,
|
|
2626
|
+
[groupId]: {
|
|
2627
|
+
...group,
|
|
2628
|
+
props: newPropsOrder
|
|
2570
2629
|
}
|
|
2571
2630
|
}
|
|
2572
|
-
}
|
|
2573
|
-
);
|
|
2631
|
+
}
|
|
2632
|
+
});
|
|
2574
2633
|
}
|
|
2575
2634
|
|
|
2576
2635
|
// src/extended/store/actions/reorder-overridable-groups.ts
|
|
2577
|
-
import { __dispatch as dispatch8, __getState as getState12 } from "@elementor/store";
|
|
2578
2636
|
function reorderOverridableGroups({ componentId, newOrder }) {
|
|
2579
|
-
const overridableProps =
|
|
2637
|
+
const overridableProps = componentsSelectors.getOverridableProps(componentId);
|
|
2580
2638
|
if (!overridableProps) {
|
|
2581
2639
|
return;
|
|
2582
2640
|
}
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
overridableProps
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
order: newOrder
|
|
2591
|
-
}
|
|
2592
|
-
}
|
|
2593
|
-
})
|
|
2594
|
-
);
|
|
2641
|
+
componentsActions.setOverridableProps(componentId, {
|
|
2642
|
+
...overridableProps,
|
|
2643
|
+
groups: {
|
|
2644
|
+
...overridableProps.groups,
|
|
2645
|
+
order: newOrder
|
|
2646
|
+
}
|
|
2647
|
+
});
|
|
2595
2648
|
}
|
|
2596
2649
|
|
|
2597
2650
|
// src/extended/store/actions/update-overridable-prop-params.ts
|
|
2598
|
-
import { __dispatch as dispatch9, __getState as getState13 } from "@elementor/store";
|
|
2599
2651
|
function updateOverridablePropParams({
|
|
2600
2652
|
componentId,
|
|
2601
2653
|
overrideKey,
|
|
2602
2654
|
label,
|
|
2603
2655
|
groupId
|
|
2604
2656
|
}) {
|
|
2605
|
-
const overridableProps =
|
|
2657
|
+
const overridableProps = componentsSelectors.getOverridableProps(componentId);
|
|
2606
2658
|
if (!overridableProps) {
|
|
2607
2659
|
return;
|
|
2608
2660
|
}
|
|
@@ -2618,19 +2670,14 @@ function updateOverridablePropParams({
|
|
|
2618
2670
|
groupId: newGroupId
|
|
2619
2671
|
};
|
|
2620
2672
|
const updatedGroups = movePropBetweenGroups(overridableProps.groups, overrideKey, oldGroupId, newGroupId);
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
overridableProps
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
},
|
|
2630
|
-
groups: updatedGroups
|
|
2631
|
-
}
|
|
2632
|
-
})
|
|
2633
|
-
);
|
|
2673
|
+
componentsActions.setOverridableProps(componentId, {
|
|
2674
|
+
...overridableProps,
|
|
2675
|
+
props: {
|
|
2676
|
+
...overridableProps.props,
|
|
2677
|
+
[overrideKey]: updatedProp
|
|
2678
|
+
},
|
|
2679
|
+
groups: updatedGroups
|
|
2680
|
+
});
|
|
2634
2681
|
return updatedProp;
|
|
2635
2682
|
}
|
|
2636
2683
|
|
|
@@ -3133,9 +3180,8 @@ import { useEditable } from "@elementor/editor-ui";
|
|
|
3133
3180
|
import { __ as __15 } from "@wordpress/i18n";
|
|
3134
3181
|
|
|
3135
3182
|
// src/extended/store/actions/rename-overridable-group.ts
|
|
3136
|
-
import { __dispatch as dispatch10, __getState as getState14 } from "@elementor/store";
|
|
3137
3183
|
function renameOverridableGroup({ componentId, groupId, label }) {
|
|
3138
|
-
const overridableProps =
|
|
3184
|
+
const overridableProps = componentsSelectors.getOverridableProps(componentId);
|
|
3139
3185
|
if (!overridableProps) {
|
|
3140
3186
|
return false;
|
|
3141
3187
|
}
|
|
@@ -3144,15 +3190,10 @@ function renameOverridableGroup({ componentId, groupId, label }) {
|
|
|
3144
3190
|
return false;
|
|
3145
3191
|
}
|
|
3146
3192
|
const updatedGroups = renameGroup(overridableProps.groups, groupId, label);
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
...overridableProps,
|
|
3152
|
-
groups: updatedGroups
|
|
3153
|
-
}
|
|
3154
|
-
})
|
|
3155
|
-
);
|
|
3193
|
+
componentsActions.setOverridableProps(componentId, {
|
|
3194
|
+
...overridableProps,
|
|
3195
|
+
groups: updatedGroups
|
|
3196
|
+
});
|
|
3156
3197
|
return true;
|
|
3157
3198
|
}
|
|
3158
3199
|
|
|
@@ -3473,7 +3514,7 @@ var ComponentPanelHeader = () => {
|
|
|
3473
3514
|
));
|
|
3474
3515
|
};
|
|
3475
3516
|
function getComponentName() {
|
|
3476
|
-
const state =
|
|
3517
|
+
const state = getState8();
|
|
3477
3518
|
const path = state[SLICE_NAME].path;
|
|
3478
3519
|
const { instanceTitle } = path.at(-1) ?? {};
|
|
3479
3520
|
if (instanceTitle) {
|
|
@@ -3502,7 +3543,6 @@ import { __ as __23 } from "@wordpress/i18n";
|
|
|
3502
3543
|
// src/extended/store/actions/archive-component.ts
|
|
3503
3544
|
import { setDocumentModifiedStatus as setDocumentModifiedStatus4 } from "@elementor/editor-documents";
|
|
3504
3545
|
import { notify } from "@elementor/editor-notifications";
|
|
3505
|
-
import { __dispatch as dispatch11 } from "@elementor/store";
|
|
3506
3546
|
import { __ as __20 } from "@wordpress/i18n";
|
|
3507
3547
|
var successNotification = (componentId, componentName) => ({
|
|
3508
3548
|
type: "success",
|
|
@@ -3511,7 +3551,7 @@ var successNotification = (componentId, componentName) => ({
|
|
|
3511
3551
|
id: `success-archived-components-notification-${componentId}`
|
|
3512
3552
|
});
|
|
3513
3553
|
var archiveComponent = (componentId, componentName) => {
|
|
3514
|
-
|
|
3554
|
+
componentsActions.archive(componentId);
|
|
3515
3555
|
setDocumentModifiedStatus4(true);
|
|
3516
3556
|
notify(successNotification(componentId, componentName));
|
|
3517
3557
|
};
|
|
@@ -3519,10 +3559,9 @@ var archiveComponent = (componentId, componentName) => {
|
|
|
3519
3559
|
// src/extended/store/actions/rename-component.ts
|
|
3520
3560
|
import { getV1DocumentsManager as getV1DocumentsManager4, setDocumentModifiedStatus as setDocumentModifiedStatus5 } from "@elementor/editor-documents";
|
|
3521
3561
|
import { getAllDescendants as getAllDescendants2 } from "@elementor/editor-elements";
|
|
3522
|
-
import { __dispatch as dispatch12 } from "@elementor/store";
|
|
3523
3562
|
var TITLE_EXTERNAL_CHANGE_COMMAND = "title_external_change";
|
|
3524
3563
|
var renameComponent = (componentUid, newName) => {
|
|
3525
|
-
|
|
3564
|
+
componentsActions.rename(componentUid, newName);
|
|
3526
3565
|
setDocumentModifiedStatus5(true);
|
|
3527
3566
|
refreshComponentInstanceTitles(componentUid);
|
|
3528
3567
|
};
|
|
@@ -3550,9 +3589,6 @@ function findComponentInstancesByUid(documentContainer, componentUid) {
|
|
|
3550
3589
|
});
|
|
3551
3590
|
}
|
|
3552
3591
|
|
|
3553
|
-
// src/extended/utils/component-name-validation.ts
|
|
3554
|
-
import { __getState as getState16 } from "@elementor/store";
|
|
3555
|
-
|
|
3556
3592
|
// src/extended/utils/component-form-schema.ts
|
|
3557
3593
|
import { z as z5 } from "@elementor/schema";
|
|
3558
3594
|
import { __ as __21 } from "@wordpress/i18n";
|
|
@@ -3579,7 +3615,7 @@ var createSubmitComponentSchema = (existingNames) => {
|
|
|
3579
3615
|
|
|
3580
3616
|
// src/extended/utils/component-name-validation.ts
|
|
3581
3617
|
function validateComponentName(label) {
|
|
3582
|
-
const existingComponentTitles =
|
|
3618
|
+
const existingComponentTitles = componentsSelectors.getComponents()?.map(({ name }) => name) ?? [];
|
|
3583
3619
|
const schema = createSubmitComponentSchema(existingComponentTitles);
|
|
3584
3620
|
const result = schema.safeParse({ componentName: label.toLowerCase() });
|
|
3585
3621
|
if (result.success) {
|
|
@@ -3834,14 +3870,12 @@ import { getElementLabel } from "@elementor/editor-elements";
|
|
|
3834
3870
|
import { notify as notify3 } from "@elementor/editor-notifications";
|
|
3835
3871
|
import { Form as FormElement, ThemeProvider as ThemeProvider4, useTextFieldAutoSelect } from "@elementor/editor-ui";
|
|
3836
3872
|
import { ComponentsIcon as ComponentsIcon4 } from "@elementor/icons";
|
|
3837
|
-
import { __getState as getState17 } from "@elementor/store";
|
|
3838
3873
|
import { Button as Button5, FormLabel as FormLabel2, Grid as Grid2, Popover as Popover3, Stack as Stack17, TextField as TextField3, Typography as Typography12 } from "@elementor/ui";
|
|
3839
3874
|
import { __ as __26 } from "@wordpress/i18n";
|
|
3840
3875
|
|
|
3841
3876
|
// src/extended/store/actions/create-unpublished-component.ts
|
|
3842
3877
|
import { createElements, deleteElement, getContainer as getContainer4 } from "@elementor/editor-elements";
|
|
3843
3878
|
import { __privateRunCommand as runCommand2 } from "@elementor/editor-v1-adapters";
|
|
3844
|
-
import { __dispatch as dispatch13 } from "@elementor/store";
|
|
3845
3879
|
import { generateUniqueId as generateUniqueId3 } from "@elementor/utils";
|
|
3846
3880
|
import { __ as __24 } from "@wordpress/i18n";
|
|
3847
3881
|
|
|
@@ -3874,14 +3908,12 @@ async function createUnpublishedComponent({
|
|
|
3874
3908
|
parentId: container?.parent?.id ?? "",
|
|
3875
3909
|
index: container?.view?._index ?? 0
|
|
3876
3910
|
};
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
|
|
3883
|
-
);
|
|
3884
|
-
dispatch13(slice.actions.addCreatedThisSession(generatedUid));
|
|
3911
|
+
componentsActions.addUnpublished({
|
|
3912
|
+
...componentBase,
|
|
3913
|
+
elements: [elementDataWithOverridablesReverted],
|
|
3914
|
+
overridableProps
|
|
3915
|
+
});
|
|
3916
|
+
componentsActions.addCreatedThisSession(generatedUid);
|
|
3885
3917
|
const componentInstance = await replaceElementWithComponent(element, componentBase);
|
|
3886
3918
|
trackComponentEvent({
|
|
3887
3919
|
action: "created",
|
|
@@ -3894,8 +3926,8 @@ async function createUnpublishedComponent({
|
|
|
3894
3926
|
await runCommand2("document/save/auto");
|
|
3895
3927
|
} catch (error) {
|
|
3896
3928
|
restoreOriginalElement(originalElement, componentInstance.id);
|
|
3897
|
-
|
|
3898
|
-
|
|
3929
|
+
componentsActions.removeUnpublished(generatedUid);
|
|
3930
|
+
componentsActions.removeCreatedThisSession(generatedUid);
|
|
3899
3931
|
throw error;
|
|
3900
3932
|
}
|
|
3901
3933
|
return { uid: generatedUid, instanceId: componentInstance.id };
|
|
@@ -3930,13 +3962,8 @@ import { blockCommand } from "@elementor/editor-v1-adapters";
|
|
|
3930
3962
|
import { __ as __25 } from "@wordpress/i18n";
|
|
3931
3963
|
|
|
3932
3964
|
// src/extended/utils/is-editing-component.ts
|
|
3933
|
-
import { __getStore as getStore } from "@elementor/store";
|
|
3934
3965
|
function isEditingComponent() {
|
|
3935
|
-
|
|
3936
|
-
if (!state) {
|
|
3937
|
-
return false;
|
|
3938
|
-
}
|
|
3939
|
-
return selectCurrentComponentId(state) !== null;
|
|
3966
|
+
return componentsSelectors.getCurrentComponentId() !== null;
|
|
3940
3967
|
}
|
|
3941
3968
|
|
|
3942
3969
|
// src/extended/sync/prevent-non-atomic-nesting.ts
|
|
@@ -4158,7 +4185,7 @@ function CreateComponentForm() {
|
|
|
4158
4185
|
eventData: eventData.current,
|
|
4159
4186
|
source: "user"
|
|
4160
4187
|
});
|
|
4161
|
-
const publishedComponentId =
|
|
4188
|
+
const publishedComponentId = componentsSelectors.getComponentByUid(uid)?.id;
|
|
4162
4189
|
if (publishedComponentId) {
|
|
4163
4190
|
switchToComponent(publishedComponentId, instanceId);
|
|
4164
4191
|
} else {
|
|
@@ -4315,23 +4342,14 @@ var OVERRIDABLE_PROP_REPLACEMENT_ID = "overridable-prop";
|
|
|
4315
4342
|
var COMPONENT_DOCUMENT_TYPE = "elementor_component";
|
|
4316
4343
|
|
|
4317
4344
|
// src/extended/store/actions/reset-sanitized-components.ts
|
|
4318
|
-
import { __dispatch as dispatch14 } from "@elementor/store";
|
|
4319
4345
|
function resetSanitizedComponents() {
|
|
4320
|
-
|
|
4346
|
+
componentsActions.resetSanitizedComponents();
|
|
4321
4347
|
}
|
|
4322
4348
|
|
|
4323
4349
|
// src/extended/store/actions/update-current-component.ts
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
currentComponentId
|
|
4328
|
-
}) {
|
|
4329
|
-
const dispatch21 = getStore2()?.dispatch;
|
|
4330
|
-
if (!dispatch21) {
|
|
4331
|
-
return;
|
|
4332
|
-
}
|
|
4333
|
-
dispatch21(slice.actions.setPath(path));
|
|
4334
|
-
dispatch21(slice.actions.setCurrentComponentId(currentComponentId));
|
|
4350
|
+
function updateCurrentComponent(params) {
|
|
4351
|
+
componentsActions.setPath(params.path);
|
|
4352
|
+
componentsActions.setCurrentComponentId(params.currentComponentId);
|
|
4335
4353
|
}
|
|
4336
4354
|
|
|
4337
4355
|
// src/extended/components/edit-component/component-modal.tsx
|
|
@@ -4747,7 +4765,6 @@ import { bindPopover as bindPopover2, bindTrigger as bindTrigger4, Popover as Po
|
|
|
4747
4765
|
import { __ as __30 } from "@wordpress/i18n";
|
|
4748
4766
|
|
|
4749
4767
|
// src/extended/store/actions/set-overridable-prop.ts
|
|
4750
|
-
import { __dispatch as dispatch15, __getState as getState18 } from "@elementor/store";
|
|
4751
4768
|
import { generateUniqueId as generateUniqueId4 } from "@elementor/utils";
|
|
4752
4769
|
function setOverridableProp({
|
|
4753
4770
|
componentId,
|
|
@@ -4762,7 +4779,7 @@ function setOverridableProp({
|
|
|
4762
4779
|
originPropFields,
|
|
4763
4780
|
source
|
|
4764
4781
|
}) {
|
|
4765
|
-
const overridableProps =
|
|
4782
|
+
const overridableProps = componentsSelectors.getOverridableProps(componentId);
|
|
4766
4783
|
if (!overridableProps) {
|
|
4767
4784
|
return;
|
|
4768
4785
|
}
|
|
@@ -4799,18 +4816,10 @@ function setOverridableProp({
|
|
|
4799
4816
|
if (isChangingGroups) {
|
|
4800
4817
|
groups = removePropFromGroup(groups, existingOverridableProp.groupId, overridableProp.overrideKey);
|
|
4801
4818
|
}
|
|
4802
|
-
|
|
4803
|
-
slice.actions.setOverridableProps({
|
|
4804
|
-
componentId,
|
|
4805
|
-
overridableProps: {
|
|
4806
|
-
props,
|
|
4807
|
-
groups
|
|
4808
|
-
}
|
|
4809
|
-
})
|
|
4810
|
-
);
|
|
4819
|
+
componentsActions.setOverridableProps(componentId, { props, groups });
|
|
4811
4820
|
const isNewProperty = !existingOverridableProp;
|
|
4812
4821
|
if (isNewProperty) {
|
|
4813
|
-
const currentComponent =
|
|
4822
|
+
const currentComponent = componentsSelectors.getCurrentComponent();
|
|
4814
4823
|
trackComponentEvent({
|
|
4815
4824
|
action: "propertyExposed",
|
|
4816
4825
|
source,
|
|
@@ -5368,7 +5377,6 @@ async function publishDraftComponentsInPageBeforeSave({ status, elements }) {
|
|
|
5368
5377
|
}
|
|
5369
5378
|
|
|
5370
5379
|
// src/extended/sync/set-component-overridable-props-settings-before-save.ts
|
|
5371
|
-
import { __getState as getState19 } from "@elementor/store";
|
|
5372
5380
|
var setComponentOverridablePropsSettingsBeforeSave = ({
|
|
5373
5381
|
container
|
|
5374
5382
|
}) => {
|
|
@@ -5376,7 +5384,7 @@ var setComponentOverridablePropsSettingsBeforeSave = ({
|
|
|
5376
5384
|
if (!currentDocument || currentDocument.config.type !== COMPONENT_DOCUMENT_TYPE) {
|
|
5377
5385
|
return;
|
|
5378
5386
|
}
|
|
5379
|
-
const overridableProps =
|
|
5387
|
+
const overridableProps = componentsSelectors.getOverridableProps(currentDocument.id);
|
|
5380
5388
|
if (overridableProps) {
|
|
5381
5389
|
container.settings.set("overridable_props", overridableProps);
|
|
5382
5390
|
}
|
|
@@ -5384,7 +5392,6 @@ var setComponentOverridablePropsSettingsBeforeSave = ({
|
|
|
5384
5392
|
|
|
5385
5393
|
// src/extended/sync/update-archived-component-before-save.ts
|
|
5386
5394
|
import { notify as notify4 } from "@elementor/editor-notifications";
|
|
5387
|
-
import { __getState as getState20 } from "@elementor/store";
|
|
5388
5395
|
var failedNotification = (message) => ({
|
|
5389
5396
|
type: "error",
|
|
5390
5397
|
message: `Failed to archive components: ${message}`,
|
|
@@ -5392,7 +5399,7 @@ var failedNotification = (message) => ({
|
|
|
5392
5399
|
});
|
|
5393
5400
|
var updateArchivedComponentBeforeSave = async (status) => {
|
|
5394
5401
|
try {
|
|
5395
|
-
const archivedComponents =
|
|
5402
|
+
const archivedComponents = componentsSelectors.getArchivedThisSession();
|
|
5396
5403
|
if (!archivedComponents.length) {
|
|
5397
5404
|
return;
|
|
5398
5405
|
}
|
|
@@ -5407,46 +5414,42 @@ var updateArchivedComponentBeforeSave = async (status) => {
|
|
|
5407
5414
|
};
|
|
5408
5415
|
|
|
5409
5416
|
// src/extended/sync/update-component-title-before-save.ts
|
|
5410
|
-
import { __dispatch as dispatch16, __getState as getState21 } from "@elementor/store";
|
|
5411
5417
|
var updateComponentTitleBeforeSave = async (status) => {
|
|
5412
|
-
const updatedComponentNames =
|
|
5418
|
+
const updatedComponentNames = componentsSelectors.getUpdatedComponentNames();
|
|
5413
5419
|
if (!updatedComponentNames.length) {
|
|
5414
5420
|
return;
|
|
5415
5421
|
}
|
|
5416
5422
|
const result = await apiClient.updateComponentTitle(updatedComponentNames, status);
|
|
5417
5423
|
if (result.failedIds.length === 0) {
|
|
5418
|
-
|
|
5424
|
+
componentsActions.cleanUpdatedComponentNames();
|
|
5419
5425
|
}
|
|
5420
5426
|
};
|
|
5421
5427
|
|
|
5422
5428
|
// src/extended/sync/create-components-before-save.ts
|
|
5423
5429
|
import { updateElementSettings as updateElementSettings2 } from "@elementor/editor-elements";
|
|
5424
|
-
import { __dispatch as dispatch17, __getState as getState22 } from "@elementor/store";
|
|
5425
5430
|
async function createComponentsBeforeSave({
|
|
5426
5431
|
elements,
|
|
5427
5432
|
status
|
|
5428
5433
|
}) {
|
|
5429
|
-
const unpublishedComponents =
|
|
5434
|
+
const unpublishedComponents = componentsSelectors.getUnpublishedComponents();
|
|
5430
5435
|
if (!unpublishedComponents.length) {
|
|
5431
5436
|
return;
|
|
5432
5437
|
}
|
|
5433
5438
|
try {
|
|
5434
5439
|
const uidToComponentId = await createComponents(unpublishedComponents, status);
|
|
5435
5440
|
updateComponentInstances(elements, uidToComponentId);
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
}))
|
|
5444
|
-
)
|
|
5441
|
+
componentsActions.add(
|
|
5442
|
+
unpublishedComponents.map((component) => ({
|
|
5443
|
+
id: uidToComponentId.get(component.uid),
|
|
5444
|
+
name: component.name,
|
|
5445
|
+
uid: component.uid,
|
|
5446
|
+
overridableProps: component.overridableProps ? component.overridableProps : void 0
|
|
5447
|
+
}))
|
|
5445
5448
|
);
|
|
5446
|
-
|
|
5449
|
+
componentsActions.resetUnpublished();
|
|
5447
5450
|
} catch (error) {
|
|
5448
5451
|
const failedUids = unpublishedComponents.map((component) => component.uid);
|
|
5449
|
-
|
|
5452
|
+
componentsActions.removeUnpublished(failedUids);
|
|
5450
5453
|
throw new Error(`Failed to publish components: ${error}`);
|
|
5451
5454
|
}
|
|
5452
5455
|
}
|
|
@@ -5528,21 +5531,16 @@ var updateExistingComponentsBeforeSave = async ({
|
|
|
5528
5531
|
// src/extended/sync/cleanup-overridable-props-on-delete.ts
|
|
5529
5532
|
import { getAllDescendants as getAllDescendants4 } from "@elementor/editor-elements";
|
|
5530
5533
|
import { registerDataHook } from "@elementor/editor-v1-adapters";
|
|
5531
|
-
import { __getState as getState23 } from "@elementor/store";
|
|
5532
5534
|
function initCleanupOverridablePropsOnDelete() {
|
|
5533
5535
|
registerDataHook("dependency", "document/elements/delete", (args, options) => {
|
|
5534
5536
|
if (isPartOfMoveCommand(options)) {
|
|
5535
5537
|
return true;
|
|
5536
5538
|
}
|
|
5537
|
-
const
|
|
5538
|
-
if (!state) {
|
|
5539
|
-
return true;
|
|
5540
|
-
}
|
|
5541
|
-
const currentComponentId = selectCurrentComponentId(state);
|
|
5539
|
+
const currentComponentId = componentsSelectors.getCurrentComponentId();
|
|
5542
5540
|
if (!currentComponentId) {
|
|
5543
5541
|
return true;
|
|
5544
5542
|
}
|
|
5545
|
-
const overridableProps =
|
|
5543
|
+
const overridableProps = componentsSelectors.getOverridableProps(currentComponentId);
|
|
5546
5544
|
if (!overridableProps || Object.keys(overridableProps.props).length === 0) {
|
|
5547
5545
|
return true;
|
|
5548
5546
|
}
|
|
@@ -5685,9 +5683,8 @@ function revertOverridablesInStorage(storageKey) {
|
|
|
5685
5683
|
import { useEffect as useEffect7 } from "react";
|
|
5686
5684
|
|
|
5687
5685
|
// src/extended/store/actions/update-component-sanitized-attribute.ts
|
|
5688
|
-
import { __dispatch as dispatch18 } from "@elementor/store";
|
|
5689
5686
|
function updateComponentSanitizedAttribute(componentId, attribute) {
|
|
5690
|
-
|
|
5687
|
+
componentsActions.updateComponentSanitizedAttribute(componentId, attribute);
|
|
5691
5688
|
}
|
|
5692
5689
|
|
|
5693
5690
|
// src/extended/sync/sanitize-overridable-props.ts
|
|
@@ -5712,16 +5709,19 @@ function SanitizeOverridableProps() {
|
|
|
5712
5709
|
}
|
|
5713
5710
|
|
|
5714
5711
|
// src/extended/init.ts
|
|
5712
|
+
var PRIORITY = 1;
|
|
5715
5713
|
function initExtended() {
|
|
5716
5714
|
registerEditingPanelReplacement({
|
|
5717
|
-
id: "component-instance-edit-panel",
|
|
5715
|
+
id: "extended-component-instance-edit-panel",
|
|
5716
|
+
priority: PRIORITY,
|
|
5718
5717
|
condition: (_, elementType) => elementType.key === "e-component",
|
|
5719
5718
|
component: ExtendedInstanceEditingPanel
|
|
5720
5719
|
});
|
|
5721
5720
|
registerTab({
|
|
5722
5721
|
id: "components",
|
|
5723
5722
|
label: __31("Components", "elementor"),
|
|
5724
|
-
component: ExtendedComponents
|
|
5723
|
+
component: ExtendedComponents,
|
|
5724
|
+
priority: PRIORITY
|
|
5725
5725
|
});
|
|
5726
5726
|
registerPanel(panel);
|
|
5727
5727
|
registerDataHook4("dependency", "editor/documents/close", (args) => {
|
|
@@ -5769,10 +5769,10 @@ function initExtended() {
|
|
|
5769
5769
|
|
|
5770
5770
|
// src/populate-store.ts
|
|
5771
5771
|
import { useEffect as useEffect8 } from "react";
|
|
5772
|
-
import { __dispatch as
|
|
5772
|
+
import { __dispatch as dispatch4 } from "@elementor/store";
|
|
5773
5773
|
function PopulateStore() {
|
|
5774
5774
|
useEffect8(() => {
|
|
5775
|
-
|
|
5775
|
+
dispatch4(loadComponents());
|
|
5776
5776
|
}, []);
|
|
5777
5777
|
return null;
|
|
5778
5778
|
}
|
|
@@ -5781,7 +5781,7 @@ function PopulateStore() {
|
|
|
5781
5781
|
import { getAllDescendants as getAllDescendants5 } from "@elementor/editor-elements";
|
|
5782
5782
|
import { notify as notify5 } from "@elementor/editor-notifications";
|
|
5783
5783
|
import { blockCommand as blockCommand2 } from "@elementor/editor-v1-adapters";
|
|
5784
|
-
import { __getState as
|
|
5784
|
+
import { __getState as getState9 } from "@elementor/store";
|
|
5785
5785
|
import { __ as __32 } from "@wordpress/i18n";
|
|
5786
5786
|
var COMPONENT_TYPE = "e-component";
|
|
5787
5787
|
var COMPONENT_CIRCULAR_NESTING_ALERT = {
|
|
@@ -5807,7 +5807,7 @@ function wouldCreateCircularNesting(componentIdToAdd) {
|
|
|
5807
5807
|
if (componentIdToAdd === void 0) {
|
|
5808
5808
|
return false;
|
|
5809
5809
|
}
|
|
5810
|
-
const state =
|
|
5810
|
+
const state = getState9();
|
|
5811
5811
|
const currentComponentId = selectCurrentComponentId(state);
|
|
5812
5812
|
const path = selectPath(state);
|
|
5813
5813
|
if (currentComponentId === null) {
|
|
@@ -5905,15 +5905,15 @@ function blockCircularPaste(args) {
|
|
|
5905
5905
|
}
|
|
5906
5906
|
|
|
5907
5907
|
// src/store/actions/remove-component-styles.ts
|
|
5908
|
-
import { __dispatch as
|
|
5908
|
+
import { __dispatch as dispatch5 } from "@elementor/store";
|
|
5909
5909
|
function removeComponentStyles(id2) {
|
|
5910
5910
|
apiClient.invalidateComponentConfigCache(id2);
|
|
5911
|
-
|
|
5911
|
+
dispatch5(slice.actions.removeStyles({ id: id2 }));
|
|
5912
5912
|
}
|
|
5913
5913
|
|
|
5914
5914
|
// src/store/components-styles-provider.ts
|
|
5915
5915
|
import { createStylesProvider } from "@elementor/editor-styles-repository";
|
|
5916
|
-
import { __getState as
|
|
5916
|
+
import { __getState as getState10, __subscribeWithSelector as subscribeWithSelector } from "@elementor/store";
|
|
5917
5917
|
var componentsStylesProvider = createStylesProvider({
|
|
5918
5918
|
key: "components-styles",
|
|
5919
5919
|
priority: 100,
|
|
@@ -5925,10 +5925,10 @@ var componentsStylesProvider = createStylesProvider({
|
|
|
5925
5925
|
),
|
|
5926
5926
|
actions: {
|
|
5927
5927
|
all: () => {
|
|
5928
|
-
return selectFlatStyles(
|
|
5928
|
+
return selectFlatStyles(getState10());
|
|
5929
5929
|
},
|
|
5930
5930
|
get: (id2) => {
|
|
5931
|
-
return selectFlatStyles(
|
|
5931
|
+
return selectFlatStyles(getState10()).find((style) => style.id === id2) ?? null;
|
|
5932
5932
|
}
|
|
5933
5933
|
}
|
|
5934
5934
|
});
|
|
@@ -5997,6 +5997,76 @@ function init() {
|
|
|
5997
5997
|
initExtended();
|
|
5998
5998
|
}
|
|
5999
5999
|
export {
|
|
6000
|
-
|
|
6000
|
+
COMPONENT_WIDGET_TYPE,
|
|
6001
|
+
ComponentInstanceProvider,
|
|
6002
|
+
ComponentItem,
|
|
6003
|
+
ComponentName,
|
|
6004
|
+
ComponentSearch,
|
|
6005
|
+
EmptyState as ComponentsEmptyState,
|
|
6006
|
+
ComponentsList,
|
|
6007
|
+
EditComponentAction,
|
|
6008
|
+
EmptySearchResult,
|
|
6009
|
+
EmptyState2 as InstanceEmptyState,
|
|
6010
|
+
InstancePanelBody,
|
|
6011
|
+
InstancePanelHeader,
|
|
6012
|
+
LoadingComponents,
|
|
6013
|
+
OverridablePropProvider,
|
|
6014
|
+
SLICE_NAME,
|
|
6015
|
+
SearchProvider,
|
|
6016
|
+
apiClient,
|
|
6017
|
+
componentInstanceOverridePropTypeUtil,
|
|
6018
|
+
componentInstanceOverridesPropTypeUtil,
|
|
6019
|
+
componentInstancePropTypeUtil,
|
|
6020
|
+
componentOverridablePropTypeUtil,
|
|
6021
|
+
componentsActions,
|
|
6022
|
+
componentsSelectors,
|
|
6023
|
+
filterValidOverridableProps,
|
|
6024
|
+
getContainerByOriginId,
|
|
6025
|
+
getOverridableProp,
|
|
6026
|
+
getPropTypeForComponentOverride,
|
|
6027
|
+
init,
|
|
6028
|
+
isComponentInstance,
|
|
6029
|
+
isExposedPropValid,
|
|
6030
|
+
loadComponentsAssets,
|
|
6031
|
+
onElementDrop,
|
|
6032
|
+
publishDraftComponentsInPageBeforeSave,
|
|
6033
|
+
resolveOverridePropValue,
|
|
6034
|
+
selectArchivedThisSession,
|
|
6035
|
+
selectComponent,
|
|
6036
|
+
selectComponentByUid,
|
|
6037
|
+
selectComponents,
|
|
6038
|
+
selectCreatedThisSession,
|
|
6039
|
+
selectCurrentComponent,
|
|
6040
|
+
selectCurrentComponentId,
|
|
6041
|
+
selectData,
|
|
6042
|
+
selectFlatStyles,
|
|
6043
|
+
selectIsOverridablePropsLoaded,
|
|
6044
|
+
selectLoadIsError,
|
|
6045
|
+
selectLoadIsPending,
|
|
6046
|
+
selectOverridableProps,
|
|
6047
|
+
selectPath,
|
|
6048
|
+
selectStyles,
|
|
6049
|
+
selectUnpublishedComponents,
|
|
6050
|
+
selectUpdatedComponentNames,
|
|
6051
|
+
slice,
|
|
6052
|
+
switchToComponent,
|
|
6053
|
+
trackComponentEvent,
|
|
6054
|
+
updateOverridableProp,
|
|
6055
|
+
useComponent,
|
|
6056
|
+
useComponentId,
|
|
6057
|
+
useComponentInstanceElement,
|
|
6058
|
+
useComponentInstanceOverrides,
|
|
6059
|
+
useComponentOverridableProps,
|
|
6060
|
+
useComponents,
|
|
6061
|
+
useComponentsPermissions,
|
|
6062
|
+
useCurrentComponent,
|
|
6063
|
+
useCurrentComponentId,
|
|
6064
|
+
useFilteredComponents,
|
|
6065
|
+
useInstancePanelData,
|
|
6066
|
+
useIsSanitizedComponent,
|
|
6067
|
+
useOverridablePropValue,
|
|
6068
|
+
useOverridableProps,
|
|
6069
|
+
useSanitizeOverridableProps,
|
|
6070
|
+
useSearch
|
|
6001
6071
|
};
|
|
6002
6072
|
//# sourceMappingURL=index.mjs.map
|