fluentui-extended 2026.8.60 → 2026.8.71
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 +32 -32
- package/dist/index.d.ts +32 -32
- package/dist/index.js +47 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +48 -28
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { ReactNode
|
|
2
|
+
import React__default, { ReactNode } from 'react';
|
|
3
3
|
import { InputProps, PresenceBadgeStatus } from '@fluentui/react-components';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -39,46 +39,32 @@ declare const toTextareaAppearance: (appearance?: FieldAppearance) => TextareaAp
|
|
|
39
39
|
declare const toListboxAppearance: (appearance?: FieldAppearance) => ListboxAppearance;
|
|
40
40
|
|
|
41
41
|
interface ParentPortalProps {
|
|
42
|
-
/** Content to render in the parent document. */
|
|
43
42
|
children: ReactNode;
|
|
44
|
-
/**
|
|
45
|
-
* ID for the container element created in the parent document.
|
|
46
|
-
* Defaults to 'fluentui-extended-parent-portal-root'.
|
|
47
|
-
*/
|
|
48
43
|
containerId?: string;
|
|
49
|
-
/**
|
|
50
|
-
* When true, syncs Griffel stylesheets from the iframe to the parent
|
|
51
|
-
* document so Fluent components render with full styling.
|
|
52
|
-
* Defaults to true.
|
|
53
|
-
*/
|
|
54
44
|
syncStyles?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* When true, copies Fluent CSS custom properties (theme tokens) from the
|
|
57
|
-
* iframe's FluentProvider to the parent container.
|
|
58
|
-
* Defaults to true.
|
|
59
|
-
*/
|
|
60
45
|
syncTokens?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Interval (ms) for re-syncing CSSOM rules that Griffel inserts via
|
|
63
|
-
* insertRule(). Set to 0 to disable periodic sync (only MutationObserver).
|
|
64
|
-
* Defaults to 300.
|
|
65
|
-
*/
|
|
66
46
|
syncInterval?: number;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
47
|
+
containerStyles?: string;
|
|
48
|
+
}
|
|
49
|
+
interface UseParentPortalMountOptions {
|
|
50
|
+
containerId?: string;
|
|
51
|
+
syncStyles?: boolean;
|
|
52
|
+
syncTokens?: boolean;
|
|
53
|
+
syncInterval?: number;
|
|
71
54
|
containerStyles?: string;
|
|
72
55
|
}
|
|
73
56
|
|
|
74
57
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* Griffel styles are available in the parent DOM.
|
|
78
|
-
*
|
|
79
|
-
* Falls back to rendering children in-place if not inside an iframe.
|
|
58
|
+
* Hook that returns the parent-document mount node for use with Fluent's
|
|
59
|
+
* `mountNode` prop (e.g. on DialogSurface). Also handles style sync.
|
|
80
60
|
*/
|
|
81
|
-
declare function
|
|
61
|
+
declare function useParentPortalMount(options?: UseParentPortalMountOptions): HTMLElement | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Renders children into the parent document via createPortal.
|
|
64
|
+
* Use for non-portal Fluent components. For DialogSurface, use
|
|
65
|
+
* useParentPortalMount() with the mountNode prop instead.
|
|
66
|
+
*/
|
|
67
|
+
declare function ParentPortal({ children, containerId, syncStyles, syncTokens, syncInterval, containerStyles, }: ParentPortalProps): React__default.JSX.Element;
|
|
82
68
|
|
|
83
69
|
/** Size variants matching FluentUI Input component */
|
|
84
70
|
type LookupSize = 'small' | 'medium';
|
|
@@ -250,6 +236,12 @@ interface LookupProps extends Omit<InputProps, 'onChange' | 'value'> {
|
|
|
250
236
|
hoverCardDelayMs?: number;
|
|
251
237
|
/** Content rendered at the bottom of the card, e.g. an "Open record" link */
|
|
252
238
|
hoverCardActions?: React.ReactNode;
|
|
239
|
+
/**
|
|
240
|
+
* Mount node for the dropdown Portal. Use when the Lookup is inside a
|
|
241
|
+
* dialog rendered in a parent document (via mountNode) so the listbox
|
|
242
|
+
* appears in the same document as the dialog.
|
|
243
|
+
*/
|
|
244
|
+
mountNode?: HTMLElement;
|
|
253
245
|
}
|
|
254
246
|
|
|
255
247
|
declare const Lookup: React.FC<LookupProps>;
|
|
@@ -295,6 +287,12 @@ interface CommandBarItem {
|
|
|
295
287
|
checked?: boolean;
|
|
296
288
|
/** Nested commands - rendered as a menu button, and as a submenu when overflowed */
|
|
297
289
|
subItems?: CommandBarItem[];
|
|
290
|
+
/**
|
|
291
|
+
* Custom menu content rendered inside the MenuPopover. Use for complex menus
|
|
292
|
+
* that need MenuItemRadio, MenuItemCheckbox, MenuGroupHeader, etc.
|
|
293
|
+
* Takes precedence over subItems when both are provided.
|
|
294
|
+
*/
|
|
295
|
+
menuContent?: React.ReactNode;
|
|
298
296
|
/**
|
|
299
297
|
* Keep this command out of the overflow menu. Use sparingly: a pinned command
|
|
300
298
|
* that does not fit will be clipped rather than moved.
|
|
@@ -559,6 +557,8 @@ interface DateTimeFieldProps {
|
|
|
559
557
|
* Dynamics default for new DateTime attributes.
|
|
560
558
|
*/
|
|
561
559
|
behavior?: DateTimeBehavior;
|
|
560
|
+
/** Show the behavior hint text below the field. Defaults to false. */
|
|
561
|
+
showHint?: boolean;
|
|
562
562
|
/**
|
|
563
563
|
* Show a time picker alongside the date. Ignored when `behavior` is 'DateOnly',
|
|
564
564
|
* which has no time component by definition.
|
|
@@ -1511,4 +1511,4 @@ declare const validateQueryBuilderState: (state: QueryBuilderState, fields: Quer
|
|
|
1511
1511
|
|
|
1512
1512
|
declare const QueryBuilder: React.FC<QueryBuilderProps>;
|
|
1513
1513
|
|
|
1514
|
-
export { type AttributeMetadata, CommandBar, type CommandBarItem, type CommandBarItemAppearance, type CommandBarProps, DEFAULT_FIELD_APPEARANCE, type DateTimeBehavior, DateTimeField, type DateTimeFieldProps, DateTimeRangeField, type DateTimeRangeFieldChange, type DateTimeRangeFieldProps, type DateTimeRangeValue, type EntityDefinition, EntityGrid, type EntityGridColumn, type EntityGridProps, type EntityGridSort, type EntityGridSortDirection, type FieldAppearance, type ListboxAppearance, Lookup, type LookupOption, type LookupOptionDetail, type LookupProps, OptionSetField, type OptionSetFieldProps, type OptionSetOption, type OptionSetValue, OwnerLookup, type OwnerLookupProps, type OwnerRecord, type OwnerType, ParentPortal, type ParentPortalProps, QueryBuilder, type QueryBuilderApplyResult, type QueryBuilderCondition, type QueryBuilderDataType, type QueryBuilderField, type QueryBuilderGroup, type QueryBuilderOperator, type QueryBuilderOption, type QueryBuilderProps, type QueryBuilderQueryOptions, type QueryBuilderRelatedEntity, type QueryBuilderState, RecordHoverCard, type RecordHoverCardDetail, type RecordHoverCardProps, type RecordHoverCardRecord, type SearchOwnersOptions, type SearchSystemUsersOptions, SystemUserCard, type SystemUserCardProps, type SystemUserContactItem, SystemUserPersona, type SystemUserPersonaProps, type SystemUserPersonaSize, type SystemUserRecord, type TextareaAppearance, type WebApiCollection, WebApiError, clearMetadataCache, formatMultiSelectValue, formatStoredValue, getAttributeOptions, getEntityAttributes, getEntityDefinition, getEntityOptionSets, getOwner, getSystemUser, getWebApiBaseUrl, initialsOf, ownerFromUser, parseFetchXmlToState, parseSelectedValues, parseStoredValue, searchOwners, searchSystemUsers, searchTeams, serializeQueryBuilderState, setWebApiBaseUrl, setWebApiFetch, systemUserImageUrl, toListboxAppearance, toTextareaAppearance, validateFetchXmlSyntax, validateQueryBuilderState, webApiGet };
|
|
1514
|
+
export { type AttributeMetadata, CommandBar, type CommandBarItem, type CommandBarItemAppearance, type CommandBarProps, DEFAULT_FIELD_APPEARANCE, type DateTimeBehavior, DateTimeField, type DateTimeFieldProps, DateTimeRangeField, type DateTimeRangeFieldChange, type DateTimeRangeFieldProps, type DateTimeRangeValue, type EntityDefinition, EntityGrid, type EntityGridColumn, type EntityGridProps, type EntityGridSort, type EntityGridSortDirection, type FieldAppearance, type ListboxAppearance, Lookup, type LookupOption, type LookupOptionDetail, type LookupProps, OptionSetField, type OptionSetFieldProps, type OptionSetOption, type OptionSetValue, OwnerLookup, type OwnerLookupProps, type OwnerRecord, type OwnerType, ParentPortal, type ParentPortalProps, QueryBuilder, type QueryBuilderApplyResult, type QueryBuilderCondition, type QueryBuilderDataType, type QueryBuilderField, type QueryBuilderGroup, type QueryBuilderOperator, type QueryBuilderOption, type QueryBuilderProps, type QueryBuilderQueryOptions, type QueryBuilderRelatedEntity, type QueryBuilderState, RecordHoverCard, type RecordHoverCardDetail, type RecordHoverCardProps, type RecordHoverCardRecord, type SearchOwnersOptions, type SearchSystemUsersOptions, SystemUserCard, type SystemUserCardProps, type SystemUserContactItem, SystemUserPersona, type SystemUserPersonaProps, type SystemUserPersonaSize, type SystemUserRecord, type TextareaAppearance, type UseParentPortalMountOptions, type WebApiCollection, WebApiError, clearMetadataCache, formatMultiSelectValue, formatStoredValue, getAttributeOptions, getEntityAttributes, getEntityDefinition, getEntityOptionSets, getOwner, getSystemUser, getWebApiBaseUrl, initialsOf, ownerFromUser, parseFetchXmlToState, parseSelectedValues, parseStoredValue, searchOwners, searchSystemUsers, searchTeams, serializeQueryBuilderState, setWebApiBaseUrl, setWebApiFetch, systemUserImageUrl, toListboxAppearance, toTextareaAppearance, useParentPortalMount, validateFetchXmlSyntax, validateQueryBuilderState, webApiGet };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { ReactNode
|
|
2
|
+
import React__default, { ReactNode } from 'react';
|
|
3
3
|
import { InputProps, PresenceBadgeStatus } from '@fluentui/react-components';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -39,46 +39,32 @@ declare const toTextareaAppearance: (appearance?: FieldAppearance) => TextareaAp
|
|
|
39
39
|
declare const toListboxAppearance: (appearance?: FieldAppearance) => ListboxAppearance;
|
|
40
40
|
|
|
41
41
|
interface ParentPortalProps {
|
|
42
|
-
/** Content to render in the parent document. */
|
|
43
42
|
children: ReactNode;
|
|
44
|
-
/**
|
|
45
|
-
* ID for the container element created in the parent document.
|
|
46
|
-
* Defaults to 'fluentui-extended-parent-portal-root'.
|
|
47
|
-
*/
|
|
48
43
|
containerId?: string;
|
|
49
|
-
/**
|
|
50
|
-
* When true, syncs Griffel stylesheets from the iframe to the parent
|
|
51
|
-
* document so Fluent components render with full styling.
|
|
52
|
-
* Defaults to true.
|
|
53
|
-
*/
|
|
54
44
|
syncStyles?: boolean;
|
|
55
|
-
/**
|
|
56
|
-
* When true, copies Fluent CSS custom properties (theme tokens) from the
|
|
57
|
-
* iframe's FluentProvider to the parent container.
|
|
58
|
-
* Defaults to true.
|
|
59
|
-
*/
|
|
60
45
|
syncTokens?: boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Interval (ms) for re-syncing CSSOM rules that Griffel inserts via
|
|
63
|
-
* insertRule(). Set to 0 to disable periodic sync (only MutationObserver).
|
|
64
|
-
* Defaults to 300.
|
|
65
|
-
*/
|
|
66
46
|
syncInterval?: number;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
47
|
+
containerStyles?: string;
|
|
48
|
+
}
|
|
49
|
+
interface UseParentPortalMountOptions {
|
|
50
|
+
containerId?: string;
|
|
51
|
+
syncStyles?: boolean;
|
|
52
|
+
syncTokens?: boolean;
|
|
53
|
+
syncInterval?: number;
|
|
71
54
|
containerStyles?: string;
|
|
72
55
|
}
|
|
73
56
|
|
|
74
57
|
/**
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
* Griffel styles are available in the parent DOM.
|
|
78
|
-
*
|
|
79
|
-
* Falls back to rendering children in-place if not inside an iframe.
|
|
58
|
+
* Hook that returns the parent-document mount node for use with Fluent's
|
|
59
|
+
* `mountNode` prop (e.g. on DialogSurface). Also handles style sync.
|
|
80
60
|
*/
|
|
81
|
-
declare function
|
|
61
|
+
declare function useParentPortalMount(options?: UseParentPortalMountOptions): HTMLElement | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Renders children into the parent document via createPortal.
|
|
64
|
+
* Use for non-portal Fluent components. For DialogSurface, use
|
|
65
|
+
* useParentPortalMount() with the mountNode prop instead.
|
|
66
|
+
*/
|
|
67
|
+
declare function ParentPortal({ children, containerId, syncStyles, syncTokens, syncInterval, containerStyles, }: ParentPortalProps): React__default.JSX.Element;
|
|
82
68
|
|
|
83
69
|
/** Size variants matching FluentUI Input component */
|
|
84
70
|
type LookupSize = 'small' | 'medium';
|
|
@@ -250,6 +236,12 @@ interface LookupProps extends Omit<InputProps, 'onChange' | 'value'> {
|
|
|
250
236
|
hoverCardDelayMs?: number;
|
|
251
237
|
/** Content rendered at the bottom of the card, e.g. an "Open record" link */
|
|
252
238
|
hoverCardActions?: React.ReactNode;
|
|
239
|
+
/**
|
|
240
|
+
* Mount node for the dropdown Portal. Use when the Lookup is inside a
|
|
241
|
+
* dialog rendered in a parent document (via mountNode) so the listbox
|
|
242
|
+
* appears in the same document as the dialog.
|
|
243
|
+
*/
|
|
244
|
+
mountNode?: HTMLElement;
|
|
253
245
|
}
|
|
254
246
|
|
|
255
247
|
declare const Lookup: React.FC<LookupProps>;
|
|
@@ -295,6 +287,12 @@ interface CommandBarItem {
|
|
|
295
287
|
checked?: boolean;
|
|
296
288
|
/** Nested commands - rendered as a menu button, and as a submenu when overflowed */
|
|
297
289
|
subItems?: CommandBarItem[];
|
|
290
|
+
/**
|
|
291
|
+
* Custom menu content rendered inside the MenuPopover. Use for complex menus
|
|
292
|
+
* that need MenuItemRadio, MenuItemCheckbox, MenuGroupHeader, etc.
|
|
293
|
+
* Takes precedence over subItems when both are provided.
|
|
294
|
+
*/
|
|
295
|
+
menuContent?: React.ReactNode;
|
|
298
296
|
/**
|
|
299
297
|
* Keep this command out of the overflow menu. Use sparingly: a pinned command
|
|
300
298
|
* that does not fit will be clipped rather than moved.
|
|
@@ -559,6 +557,8 @@ interface DateTimeFieldProps {
|
|
|
559
557
|
* Dynamics default for new DateTime attributes.
|
|
560
558
|
*/
|
|
561
559
|
behavior?: DateTimeBehavior;
|
|
560
|
+
/** Show the behavior hint text below the field. Defaults to false. */
|
|
561
|
+
showHint?: boolean;
|
|
562
562
|
/**
|
|
563
563
|
* Show a time picker alongside the date. Ignored when `behavior` is 'DateOnly',
|
|
564
564
|
* which has no time component by definition.
|
|
@@ -1511,4 +1511,4 @@ declare const validateQueryBuilderState: (state: QueryBuilderState, fields: Quer
|
|
|
1511
1511
|
|
|
1512
1512
|
declare const QueryBuilder: React.FC<QueryBuilderProps>;
|
|
1513
1513
|
|
|
1514
|
-
export { type AttributeMetadata, CommandBar, type CommandBarItem, type CommandBarItemAppearance, type CommandBarProps, DEFAULT_FIELD_APPEARANCE, type DateTimeBehavior, DateTimeField, type DateTimeFieldProps, DateTimeRangeField, type DateTimeRangeFieldChange, type DateTimeRangeFieldProps, type DateTimeRangeValue, type EntityDefinition, EntityGrid, type EntityGridColumn, type EntityGridProps, type EntityGridSort, type EntityGridSortDirection, type FieldAppearance, type ListboxAppearance, Lookup, type LookupOption, type LookupOptionDetail, type LookupProps, OptionSetField, type OptionSetFieldProps, type OptionSetOption, type OptionSetValue, OwnerLookup, type OwnerLookupProps, type OwnerRecord, type OwnerType, ParentPortal, type ParentPortalProps, QueryBuilder, type QueryBuilderApplyResult, type QueryBuilderCondition, type QueryBuilderDataType, type QueryBuilderField, type QueryBuilderGroup, type QueryBuilderOperator, type QueryBuilderOption, type QueryBuilderProps, type QueryBuilderQueryOptions, type QueryBuilderRelatedEntity, type QueryBuilderState, RecordHoverCard, type RecordHoverCardDetail, type RecordHoverCardProps, type RecordHoverCardRecord, type SearchOwnersOptions, type SearchSystemUsersOptions, SystemUserCard, type SystemUserCardProps, type SystemUserContactItem, SystemUserPersona, type SystemUserPersonaProps, type SystemUserPersonaSize, type SystemUserRecord, type TextareaAppearance, type WebApiCollection, WebApiError, clearMetadataCache, formatMultiSelectValue, formatStoredValue, getAttributeOptions, getEntityAttributes, getEntityDefinition, getEntityOptionSets, getOwner, getSystemUser, getWebApiBaseUrl, initialsOf, ownerFromUser, parseFetchXmlToState, parseSelectedValues, parseStoredValue, searchOwners, searchSystemUsers, searchTeams, serializeQueryBuilderState, setWebApiBaseUrl, setWebApiFetch, systemUserImageUrl, toListboxAppearance, toTextareaAppearance, validateFetchXmlSyntax, validateQueryBuilderState, webApiGet };
|
|
1514
|
+
export { type AttributeMetadata, CommandBar, type CommandBarItem, type CommandBarItemAppearance, type CommandBarProps, DEFAULT_FIELD_APPEARANCE, type DateTimeBehavior, DateTimeField, type DateTimeFieldProps, DateTimeRangeField, type DateTimeRangeFieldChange, type DateTimeRangeFieldProps, type DateTimeRangeValue, type EntityDefinition, EntityGrid, type EntityGridColumn, type EntityGridProps, type EntityGridSort, type EntityGridSortDirection, type FieldAppearance, type ListboxAppearance, Lookup, type LookupOption, type LookupOptionDetail, type LookupProps, OptionSetField, type OptionSetFieldProps, type OptionSetOption, type OptionSetValue, OwnerLookup, type OwnerLookupProps, type OwnerRecord, type OwnerType, ParentPortal, type ParentPortalProps, QueryBuilder, type QueryBuilderApplyResult, type QueryBuilderCondition, type QueryBuilderDataType, type QueryBuilderField, type QueryBuilderGroup, type QueryBuilderOperator, type QueryBuilderOption, type QueryBuilderProps, type QueryBuilderQueryOptions, type QueryBuilderRelatedEntity, type QueryBuilderState, RecordHoverCard, type RecordHoverCardDetail, type RecordHoverCardProps, type RecordHoverCardRecord, type SearchOwnersOptions, type SearchSystemUsersOptions, SystemUserCard, type SystemUserCardProps, type SystemUserContactItem, SystemUserPersona, type SystemUserPersonaProps, type SystemUserPersonaSize, type SystemUserRecord, type TextareaAppearance, type UseParentPortalMountOptions, type WebApiCollection, WebApiError, clearMetadataCache, formatMultiSelectValue, formatStoredValue, getAttributeOptions, getEntityAttributes, getEntityDefinition, getEntityOptionSets, getOwner, getSystemUser, getWebApiBaseUrl, initialsOf, ownerFromUser, parseFetchXmlToState, parseSelectedValues, parseStoredValue, searchOwners, searchSystemUsers, searchTeams, serializeQueryBuilderState, setWebApiBaseUrl, setWebApiFetch, systemUserImageUrl, toListboxAppearance, toTextareaAppearance, useParentPortalMount, validateFetchXmlSyntax, validateQueryBuilderState, webApiGet };
|
package/dist/index.js
CHANGED
|
@@ -109,29 +109,12 @@ function serializeSheet(sheet) {
|
|
|
109
109
|
return "";
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
children,
|
|
114
|
-
containerId = DEFAULT_CONTAINER_ID,
|
|
115
|
-
syncStyles = true,
|
|
116
|
-
syncTokens = true,
|
|
117
|
-
syncInterval = 300,
|
|
118
|
-
containerStyles
|
|
119
|
-
}) {
|
|
120
|
-
const [container, setContainer] = React15.useState(null);
|
|
112
|
+
function useSyncStyles(active, containerId, syncInterval) {
|
|
121
113
|
const intervalRef = React15.useRef(null);
|
|
122
114
|
const observerRef = React15.useRef(null);
|
|
123
115
|
const mirrorMapRef = React15.useRef(/* @__PURE__ */ new Map());
|
|
124
116
|
React15.useEffect(() => {
|
|
125
|
-
|
|
126
|
-
if (!parentDoc) return;
|
|
127
|
-
const el = getOrCreateContainer(parentDoc, containerId, containerStyles);
|
|
128
|
-
if (syncTokens) copyFluentTokens(el);
|
|
129
|
-
setContainer(el);
|
|
130
|
-
return () => {
|
|
131
|
-
};
|
|
132
|
-
}, [containerId, containerStyles, syncTokens]);
|
|
133
|
-
React15.useEffect(() => {
|
|
134
|
-
if (!syncStyles || !container) return;
|
|
117
|
+
if (!active) return;
|
|
135
118
|
const parentDoc = getParentDocument();
|
|
136
119
|
if (!parentDoc) return;
|
|
137
120
|
const mirrorMap = mirrorMapRef.current;
|
|
@@ -170,7 +153,42 @@ function ParentPortal({
|
|
|
170
153
|
for (const mirror of mirrorMap.values()) mirror.remove();
|
|
171
154
|
mirrorMap.clear();
|
|
172
155
|
};
|
|
173
|
-
}, [
|
|
156
|
+
}, [active, syncInterval, containerId]);
|
|
157
|
+
}
|
|
158
|
+
function useParentPortalMount(options) {
|
|
159
|
+
const {
|
|
160
|
+
containerId = DEFAULT_CONTAINER_ID,
|
|
161
|
+
syncStyles = true,
|
|
162
|
+
syncTokens = true,
|
|
163
|
+
syncInterval = 300,
|
|
164
|
+
containerStyles
|
|
165
|
+
} = options ?? {};
|
|
166
|
+
const [container, setContainer] = React15.useState(null);
|
|
167
|
+
React15.useEffect(() => {
|
|
168
|
+
const parentDoc = getParentDocument();
|
|
169
|
+
if (!parentDoc) return;
|
|
170
|
+
const el = getOrCreateContainer(parentDoc, containerId, containerStyles);
|
|
171
|
+
if (syncTokens) copyFluentTokens(el);
|
|
172
|
+
setContainer(el);
|
|
173
|
+
}, [containerId, containerStyles, syncTokens]);
|
|
174
|
+
useSyncStyles(syncStyles && container !== null, containerId, syncInterval);
|
|
175
|
+
return container ?? void 0;
|
|
176
|
+
}
|
|
177
|
+
function ParentPortal({
|
|
178
|
+
children,
|
|
179
|
+
containerId = DEFAULT_CONTAINER_ID,
|
|
180
|
+
syncStyles = true,
|
|
181
|
+
syncTokens = true,
|
|
182
|
+
syncInterval = 300,
|
|
183
|
+
containerStyles
|
|
184
|
+
}) {
|
|
185
|
+
const container = useParentPortalMount({
|
|
186
|
+
containerId,
|
|
187
|
+
syncStyles,
|
|
188
|
+
syncTokens,
|
|
189
|
+
syncInterval,
|
|
190
|
+
containerStyles
|
|
191
|
+
});
|
|
174
192
|
if (!container) {
|
|
175
193
|
return /* @__PURE__ */ React15__namespace.default.createElement(React15__namespace.default.Fragment, null, children);
|
|
176
194
|
}
|
|
@@ -1121,6 +1139,7 @@ var Lookup = ({
|
|
|
1121
1139
|
hoverCardTarget = "both",
|
|
1122
1140
|
hoverCardDelayMs = 400,
|
|
1123
1141
|
hoverCardActions,
|
|
1142
|
+
mountNode,
|
|
1124
1143
|
multiSelect = false,
|
|
1125
1144
|
maxSelection,
|
|
1126
1145
|
selectedKeys: selectedKeysProp,
|
|
@@ -1576,7 +1595,7 @@ var Lookup = ({
|
|
|
1576
1595
|
}
|
|
1577
1596
|
)),
|
|
1578
1597
|
/* @__PURE__ */ React15__namespace.createElement("span", { className: styles.tagInputIcons }, loading ? /* @__PURE__ */ React15__namespace.createElement(reactComponents.Spinner, { size: "tiny" }) : /* @__PURE__ */ React15__namespace.createElement("span", { className: styles.chevronIcon }, /* @__PURE__ */ React15__namespace.createElement(reactIcons.SearchRegular, null)))
|
|
1579
|
-
), showDropdown && /* @__PURE__ */ React15__namespace.createElement(reactComponents.Portal,
|
|
1598
|
+
), showDropdown && /* @__PURE__ */ React15__namespace.createElement(reactComponents.Portal, { mountNode }, /* @__PURE__ */ React15__namespace.createElement(
|
|
1580
1599
|
"div",
|
|
1581
1600
|
{
|
|
1582
1601
|
className: styles.dropdownPortal,
|
|
@@ -1815,7 +1834,7 @@ var CommandButton = ({ item, size, className }) => {
|
|
|
1815
1834
|
const styles = useCommandBarStyles();
|
|
1816
1835
|
const appearance = item.appearance ?? "subtle";
|
|
1817
1836
|
const withTooltip = useTooltipWrapper(item, styles);
|
|
1818
|
-
if (item.subItems?.length) {
|
|
1837
|
+
if (item.menuContent || item.subItems?.length) {
|
|
1819
1838
|
return /* @__PURE__ */ React15__namespace.createElement(reactComponents.Menu, null, /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuTrigger, { disableButtonEnhancement: true }, withTooltip(
|
|
1820
1839
|
/* @__PURE__ */ React15__namespace.createElement(
|
|
1821
1840
|
reactComponents.MenuButton,
|
|
@@ -1828,7 +1847,7 @@ var CommandButton = ({ item, size, className }) => {
|
|
|
1828
1847
|
},
|
|
1829
1848
|
item.text
|
|
1830
1849
|
)
|
|
1831
|
-
)), /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuPopover, null, /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuList, null, item.subItems.map((subItem) => /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuItem, { key: subItem.key, icon: subItem.icon, disabled: subItem.disabled, onClick: subItem.onClick }, subItem.text)))));
|
|
1850
|
+
)), /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuPopover, null, item.menuContent ?? /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuList, null, item.subItems.map((subItem) => /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuItem, { key: subItem.key, icon: subItem.icon, disabled: subItem.disabled, onClick: subItem.onClick }, subItem.text)))));
|
|
1832
1851
|
}
|
|
1833
1852
|
if (item.checked !== void 0) {
|
|
1834
1853
|
return withTooltip(
|
|
@@ -1865,8 +1884,8 @@ var CommandButton = ({ item, size, className }) => {
|
|
|
1865
1884
|
var OverflowMenuItem = ({ item }) => {
|
|
1866
1885
|
const styles = useCommandBarStyles();
|
|
1867
1886
|
const withTooltip = useTooltipWrapper(item, styles);
|
|
1868
|
-
if (item.subItems?.length) {
|
|
1869
|
-
return /* @__PURE__ */ React15__namespace.createElement(reactComponents.Menu, null, /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuTrigger, { disableButtonEnhancement: true }, /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuItem, { icon: item.icon, disabled: item.disabled }, item.text || item.title)), /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuPopover, null, /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuList, null, item.subItems.map((subItem) => /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuItem, { key: subItem.key, icon: subItem.icon, disabled: subItem.disabled, onClick: subItem.onClick }, subItem.text)))));
|
|
1887
|
+
if (item.menuContent || item.subItems?.length) {
|
|
1888
|
+
return /* @__PURE__ */ React15__namespace.createElement(reactComponents.Menu, null, /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuTrigger, { disableButtonEnhancement: true }, /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuItem, { icon: item.icon, disabled: item.disabled }, item.text || item.title)), /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuPopover, null, item.menuContent ?? /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuList, null, item.subItems.map((subItem) => /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuItem, { key: subItem.key, icon: subItem.icon, disabled: subItem.disabled, onClick: subItem.onClick }, subItem.text)))));
|
|
1870
1889
|
}
|
|
1871
1890
|
const row = /* @__PURE__ */ React15__namespace.createElement(reactComponents.MenuItem, { icon: item.icon, disabled: item.disabled, onClick: item.onClick }, item.text || item.title);
|
|
1872
1891
|
return shouldTooltipInOverflow(item) ? withTooltip(row) : row;
|
|
@@ -4628,6 +4647,7 @@ var DateTimeField = ({
|
|
|
4628
4647
|
value,
|
|
4629
4648
|
onChange,
|
|
4630
4649
|
behavior: behaviorProp = "UserLocal",
|
|
4650
|
+
showHint = false,
|
|
4631
4651
|
showTime = false,
|
|
4632
4652
|
timeOnly = false,
|
|
4633
4653
|
timeIntervalMinutes = 30,
|
|
@@ -4971,7 +4991,7 @@ var DateTimeField = ({
|
|
|
4971
4991
|
timeFormat === "12h" ? formatTime12h(time) : time
|
|
4972
4992
|
))))),
|
|
4973
4993
|
/* @__PURE__ */ React15__namespace.createElement("div", { className: styles.popupFooter }, /* @__PURE__ */ React15__namespace.createElement("div", { className: styles.footerLeft }, !timeOnly && /* @__PURE__ */ React15__namespace.createElement(reactComponents.Button, { appearance: "subtle", size: "small", onClick: handleToday }, "Today"), timeEnabled && /* @__PURE__ */ React15__namespace.createElement(reactComponents.Button, { appearance: "subtle", size: "small", onClick: handleTimeNow }, timeOnly ? "Now" : "Time Now")), /* @__PURE__ */ React15__namespace.createElement("div", { className: styles.footerRight }, /* @__PURE__ */ React15__namespace.createElement(reactComponents.Button, { appearance: "primary", size: "small", onClick: handleDone }, "Done")))
|
|
4974
|
-
)), behavior !== "UserLocal" && /* @__PURE__ */ React15__namespace.createElement(reactComponents.Text, { className: styles.behaviorHint }, behavior === "DateOnly" ? "Date only - stored without a time or timezone" : "Timezone independent - stored exactly as entered"), loadError && /* @__PURE__ */ React15__namespace.createElement(reactComponents.Text, { className: styles.errorText }, loadError));
|
|
4994
|
+
)), showHint && behavior !== "UserLocal" && /* @__PURE__ */ React15__namespace.createElement(reactComponents.Text, { className: styles.behaviorHint }, behavior === "DateOnly" ? "Date only - stored without a time or timezone" : "Timezone independent - stored exactly as entered"), loadError && /* @__PURE__ */ React15__namespace.createElement(reactComponents.Text, { className: styles.errorText }, loadError));
|
|
4975
4995
|
if (!label && !validationMessage) {
|
|
4976
4996
|
return /* @__PURE__ */ React15__namespace.createElement("div", { className: reactComponents.mergeClasses(styles.root, className) }, control);
|
|
4977
4997
|
}
|
|
@@ -9924,6 +9944,7 @@ exports.setWebApiFetch = setWebApiFetch;
|
|
|
9924
9944
|
exports.systemUserImageUrl = systemUserImageUrl;
|
|
9925
9945
|
exports.toListboxAppearance = toListboxAppearance;
|
|
9926
9946
|
exports.toTextareaAppearance = toTextareaAppearance;
|
|
9947
|
+
exports.useParentPortalMount = useParentPortalMount;
|
|
9927
9948
|
exports.validateFetchXmlSyntax = validateFetchXmlSyntax;
|
|
9928
9949
|
exports.validateQueryBuilderState = validateQueryBuilderState;
|
|
9929
9950
|
exports.webApiGet = webApiGet;
|