@wix/editor-react-components 1.2808.0 → 1.2810.0
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/site/components/Menu/manifest.js +26 -13
- package/dist/site/components/Menu/manifestConfigs/animatedIconConfig.d.ts +3 -1
- package/dist/site/components/Menu/manifestConfigs/overrides/verticalNavbarConfig.d.ts +2 -2
- package/dist/site/components/chunks/constants27.js +7 -3
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as ELEMENTS, C as CSS_PROPERTIES, b as DISPLAY_GROUPS, N as NativeStateType, a as ACTIONS, D as DATA, L as LAYOUT, I as INTERACTIONS, A as Archetype } from "../chunks/chunk-LDITHLYN.js";
|
|
2
2
|
import { g as getTranslationResources } from "../chunks/translationResources.js";
|
|
3
|
-
import { c as DesignStates, f as DisplayNames, s as selectors, g as DropdownAnchorPositions, h as DropdownAppliedStyleProperties, i as elementKeys, j as
|
|
3
|
+
import { c as DesignStates, f as DisplayNames, s as selectors, g as DropdownAnchorPositions, h as DropdownAppliedStyleProperties, i as elementKeys, j as customActionKeys, k as MENU_ANIMATED_ICON_SPEC, m as states, p as presets, n as menuBuiltInActions, C as COMPONENT_TYPE } from "../chunks/constants27.js";
|
|
4
4
|
import { w as withSpec } from "../chunks/manifest.js";
|
|
5
5
|
import { I as IS_SUPPORT_DESIGN_STATE_SPEC } from "../chunks/specs.js";
|
|
6
6
|
import { b as manifestMouseHover } from "../chunks/manifestSdkMixins.js";
|
|
@@ -528,6 +528,17 @@ const scrollButtonConfig = {
|
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
530
|
};
|
|
531
|
+
const getAnimatedIconCustomAction = (animatedIconPath) => ({
|
|
532
|
+
displayName: DisplayNames.root.customActions.animatedIcon.displayName,
|
|
533
|
+
execution: {
|
|
534
|
+
actionType: ACTIONS.ACTION_TYPE.forward,
|
|
535
|
+
forward: {
|
|
536
|
+
elementPath: animatedIconPath,
|
|
537
|
+
actionName: ACTIONS.ACTION_NAME.custom,
|
|
538
|
+
custom: customActionKeys.animatedIcon
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
});
|
|
531
542
|
const animatedIconConfig = {
|
|
532
543
|
spec: MENU_ANIMATED_ICON_SPEC,
|
|
533
544
|
elementType: ELEMENTS.ELEMENT_TYPE.refElement,
|
|
@@ -580,9 +591,14 @@ const itemConfig = {
|
|
|
580
591
|
selector: `.${selectors.item}`,
|
|
581
592
|
displayName: DisplayNames.item.elementDisplayName,
|
|
582
593
|
behaviors: {
|
|
583
|
-
selectable:
|
|
594
|
+
selectable: true,
|
|
584
595
|
removable: false
|
|
585
596
|
},
|
|
597
|
+
customActions: {
|
|
598
|
+
[customActionKeys.animatedIcon]: getAnimatedIconCustomAction(
|
|
599
|
+
`.self.${elementKeys.animatedIcon}`
|
|
600
|
+
)
|
|
601
|
+
},
|
|
586
602
|
states: {
|
|
587
603
|
// Not native: the item must stay hovered while the pointer is over its
|
|
588
604
|
// mega menu dropdown, which isn't a DOM descendant of the item, so real
|
|
@@ -834,6 +850,11 @@ const navbarConfig = {
|
|
|
834
850
|
},
|
|
835
851
|
design: {}
|
|
836
852
|
},
|
|
853
|
+
customActions: {
|
|
854
|
+
[customActionKeys.animatedIcon]: getAnimatedIconCustomAction(
|
|
855
|
+
`.self.${elementKeys.item}.${elementKeys.animatedIcon}`
|
|
856
|
+
)
|
|
857
|
+
},
|
|
837
858
|
elements: {
|
|
838
859
|
[elementKeys.item]: itemConfig,
|
|
839
860
|
[elementKeys.scrollButton]: scrollButtonConfig,
|
|
@@ -1335,17 +1356,9 @@ const manifest = {
|
|
|
1335
1356
|
}
|
|
1336
1357
|
}
|
|
1337
1358
|
},
|
|
1338
|
-
animatedIcon:
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
actionType: ACTIONS.ACTION_TYPE.forward,
|
|
1342
|
-
forward: {
|
|
1343
|
-
elementPath: `.self.${elementKeys.navbar}.${elementKeys.item}.${elementKeys.animatedIcon}`,
|
|
1344
|
-
actionName: ACTIONS.ACTION_NAME.custom,
|
|
1345
|
-
custom: "animatedIcon"
|
|
1346
|
-
}
|
|
1347
|
-
}
|
|
1348
|
-
},
|
|
1359
|
+
animatedIcon: getAnimatedIconCustomAction(
|
|
1360
|
+
`.self.${elementKeys.navbar}.${elementKeys.item}.${elementKeys.animatedIcon}`
|
|
1361
|
+
),
|
|
1349
1362
|
hamburgerAnimatedIcon: {
|
|
1350
1363
|
displayName: DisplayNames.root.customActions.hamburgerAnimatedIcon.displayName,
|
|
1351
1364
|
execution: {
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
import { ElementItem } from '@wix/component-protocol/schema';
|
|
1
|
+
import { CustomActions, DisplayFilters, ElementItem } from '@wix/component-protocol/schema';
|
|
2
|
+
export declare const getAnimatedIconCustomAction: (animatedIconPath: string) => CustomActions[string];
|
|
3
|
+
export declare const getAnimatedIconCustomActionsDisplayFilter: (isIconHidden: boolean) => DisplayFilters["customActions"];
|
|
2
4
|
export declare const animatedIconConfig: ElementItem;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EditorElement, ElementItem } from '@wix/component-protocol/schema';
|
|
1
|
+
import { DisplayFilters, EditorElement, ElementItem } from '@wix/component-protocol/schema';
|
|
2
2
|
export type VerticalNavbarProps = {
|
|
3
3
|
hasDropdownItems: boolean;
|
|
4
4
|
hasDropdownContent: boolean;
|
|
@@ -10,5 +10,5 @@ export type VerticalNavbarProps = {
|
|
|
10
10
|
hideItemIconGap: boolean;
|
|
11
11
|
isIconHidden: boolean;
|
|
12
12
|
};
|
|
13
|
-
export declare const getVerticalNavbarElementManifestOverrides: ({ hasDropdownItems, hasDropdownContent, hasDropdownSubItems, isItemFitToText, isDropdownItemFitToText, dropdownColumnsNumber, hideItemIconGap, }: VerticalNavbarProps) => ElementItem;
|
|
13
|
+
export declare const getVerticalNavbarElementManifestOverrides: ({ hasDropdownItems, hasDropdownContent, hasDropdownSubItems, isItemFitToText, isDropdownItemFitToText, dropdownColumnsNumber, hideItemIconGap, isIconHidden, }: VerticalNavbarProps, navbarCustomActionsDisplayFilter: DisplayFilters["customActions"]) => ElementItem;
|
|
14
14
|
export declare const getVerticalNavbarManifestOverrides: (props: VerticalNavbarProps) => Partial<EditorElement>;
|
|
@@ -314,6 +314,9 @@ const menuBuiltInActions = {
|
|
|
314
314
|
elements: "elements"
|
|
315
315
|
};
|
|
316
316
|
const MENU_ANIMATED_ICON_SPEC = "sp.erc.menuAnimatedIcon";
|
|
317
|
+
const customActionKeys = {
|
|
318
|
+
animatedIcon: "animatedIcon"
|
|
319
|
+
};
|
|
317
320
|
const selectors = {
|
|
318
321
|
menu: "menu",
|
|
319
322
|
navbar: "navbar",
|
|
@@ -451,10 +454,11 @@ export {
|
|
|
451
454
|
DropdownAnchorPositions as g,
|
|
452
455
|
DropdownAppliedStyleProperties as h,
|
|
453
456
|
elementKeys as i,
|
|
454
|
-
|
|
455
|
-
|
|
457
|
+
customActionKeys as j,
|
|
458
|
+
MENU_ANIMATED_ICON_SPEC as k,
|
|
456
459
|
legacyTranslationsKeys as l,
|
|
457
|
-
|
|
460
|
+
states as m,
|
|
461
|
+
menuBuiltInActions as n,
|
|
458
462
|
presets as p,
|
|
459
463
|
selectors as s,
|
|
460
464
|
translationsKeys as t,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2810.0",
|
|
4
4
|
"description": "React components for the Wix Editor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -224,5 +224,5 @@
|
|
|
224
224
|
"registry": "https://registry.npmjs.org/",
|
|
225
225
|
"access": "public"
|
|
226
226
|
},
|
|
227
|
-
"falconPackageHash": "
|
|
227
|
+
"falconPackageHash": "94fef56746e0501edab5639a63a467e87bb9e7f1f9e5cdf69dad4a9f"
|
|
228
228
|
}
|