@overmap-ai/core 1.0.48-menu-improvements.0 → 1.0.48-menu-improvements.1
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.
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import { FieldTypeIdentifier } from "../typings";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: "string" | "number" | "boolean" | "select" | "text" | "date" | "multi-string" | "multi-select" | "upload";
|
|
5
|
-
onSelect: () => void;
|
|
6
|
-
}[][];
|
|
2
|
+
import { MenuItemProps } from "@overmap-ai/blocks";
|
|
3
|
+
export declare const useFieldTypeItems: (onSelect?: (type: Exclude<FieldTypeIdentifier, "section">) => void) => MenuItemProps[][];
|
package/dist/overmap-core.js
CHANGED
|
@@ -8,7 +8,7 @@ var _a;
|
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
import React__default, { useState, useEffect, useRef, memo, useMemo, useCallback, createContext, createElement, useContext, forwardRef, Children, isValidElement, cloneElement, Fragment as Fragment$1, useLayoutEffect, useReducer, lazy, Suspense } from "react";
|
|
10
10
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
11
|
-
import { unsafeShowToast, AlertDialogProvider, ToastProvider, DefaultTheme, Flex as Flex$1, IconButton, RiIcon, Text as Text$1, useSeverityColor, Checkbox, TextArea, Select, useToast, Badge, MultiSelect, useViewportSize, Overlay, ButtonGroup, Spinner, IconColorUtility, Tooltip, Popover, useSize, ToggleButton, Separator, OvermapItem, Button, ButtonList, divButtonProps,
|
|
11
|
+
import { unsafeShowToast, AlertDialogProvider, ToastProvider, DefaultTheme, Flex as Flex$1, IconButton, RiIcon, Text as Text$1, useSeverityColor, Checkbox, TextArea, Select, useToast, Badge, MultiSelect, useViewportSize, Overlay, ButtonGroup, Spinner, IconColorUtility, Tooltip, Popover, useSize, ToggleButton, Separator, OvermapItem, Button, ButtonList, divButtonProps, OvermapDropdownMenu, Input, useAlertDialog } from "@overmap-ai/blocks";
|
|
12
12
|
import { DepGraph } from "dependency-graph";
|
|
13
13
|
import { offline as offline$1 } from "@redux-offline/redux-offline";
|
|
14
14
|
import offlineConfig from "@redux-offline/redux-offline/lib/defaults";
|
|
@@ -14206,17 +14206,15 @@ const FieldActions = memo((props) => {
|
|
|
14206
14206
|
Action.key
|
|
14207
14207
|
)) }),
|
|
14208
14208
|
/* @__PURE__ */ jsx(Box, { display: forMobile(true, "block"), children: /* @__PURE__ */ jsx(
|
|
14209
|
-
|
|
14209
|
+
OvermapDropdownMenu,
|
|
14210
14210
|
{
|
|
14211
14211
|
trigger: /* @__PURE__ */ jsx(IconButton, { variant: "ghost", "aria-label": "Actions menu", children: /* @__PURE__ */ jsx(RiIcon, { icon: "RiMore2Line" }) }),
|
|
14212
14212
|
items: actions.map((Action) => {
|
|
14213
14213
|
var _a2;
|
|
14214
14214
|
return {
|
|
14215
|
-
|
|
14216
|
-
|
|
14217
|
-
|
|
14218
|
-
] }, Action.key),
|
|
14219
|
-
onSelect: (_a2 = Action.buttonProps) == null ? void 0 : _a2.onClick
|
|
14215
|
+
leftSlot: /* @__PURE__ */ jsx(Action.Icon, {}),
|
|
14216
|
+
children: Action.text,
|
|
14217
|
+
onClick: (_a2 = Action.buttonProps) == null ? void 0 : _a2.onClick
|
|
14220
14218
|
};
|
|
14221
14219
|
})
|
|
14222
14220
|
}
|
|
@@ -14274,10 +14272,8 @@ const useFieldTypeItems = (onSelect = () => null) => {
|
|
|
14274
14272
|
const field = FieldTypeToClsMapping[identifier];
|
|
14275
14273
|
const Icon = field.Icon;
|
|
14276
14274
|
return {
|
|
14277
|
-
|
|
14278
|
-
|
|
14279
|
-
/* @__PURE__ */ jsx(Text$1, { children: field.fieldTypeName })
|
|
14280
|
-
] }, identifier),
|
|
14275
|
+
children: field.fieldTypeName,
|
|
14276
|
+
leftSlot: /* @__PURE__ */ jsx(Icon, {}),
|
|
14281
14277
|
value: identifier,
|
|
14282
14278
|
onSelect: () => {
|
|
14283
14279
|
onSelect(identifier);
|
|
@@ -14842,7 +14838,7 @@ const FieldSectionWithActions = memo((props) => {
|
|
|
14842
14838
|
)),
|
|
14843
14839
|
droppableProvided.placeholder,
|
|
14844
14840
|
/* @__PURE__ */ jsx(
|
|
14845
|
-
|
|
14841
|
+
OvermapDropdownMenu,
|
|
14846
14842
|
{
|
|
14847
14843
|
trigger: /* @__PURE__ */ jsxs(Button, { type: "button", variant: "soft", children: [
|
|
14848
14844
|
/* @__PURE__ */ jsx(RiIcon, { icon: "RiAddLine" }),
|