@factorialco/f0-react 1.274.0 → 1.276.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/experimental.d.ts +39 -6
- package/dist/experimental.js +967 -948
- package/dist/f0.css +1 -0
- package/dist/f0.d.ts +117 -6
- package/dist/f0.js +4689 -1040
- package/dist/{hooks-d0sWj0ci.js → hooks-DHOMsL_I.js} +14 -14
- package/package.json +2 -1
package/dist/f0.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.grid-stack{position:relative}.grid-stack-rtl{direction:ltr}.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;margin:0;position:absolute;width:auto;z-index:0!important}.grid-stack>.grid-stack-item{position:absolute;padding:0;top:0;left:0;width:var(--gs-column-width);height:var(--gs-cell-height)}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack>.grid-stack-item>.grid-stack-item-content,.grid-stack>.grid-stack-placeholder>.placeholder-content{top:var(--gs-item-margin-top);right:var(--gs-item-margin-right);bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;touch-action:none}.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle,.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23666" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20"><path d="m10 3 2 2H8l2-2v14l-2-2h4l-2 2"/></svg>');background-repeat:no-repeat;background-position:center}.grid-stack-item>.ui-resizable-ne{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:var(--gs-item-margin-top);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:var(--gs-item-margin-top);left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:var(--gs-item-margin-top);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px;right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:var(--gs-item-margin-bottom);right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px;left:var(--gs-item-margin-left)}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,top}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px #0003;opacity:.8}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing,.grid-stack-animate .grid-stack-item.grid-stack-placeholder{transition:left 0s,top 0s,height 0s,width 0s}.grid-stack>.grid-stack-item[gs-y="0"]{top:0}.grid-stack>.grid-stack-item[gs-x="0"]{left:0%}
|
package/dist/f0.d.ts
CHANGED
|
@@ -24,6 +24,8 @@ import { DateFilterOptions } from './DateFilter/DateFilter';
|
|
|
24
24
|
import { default as default_2 } from 'react';
|
|
25
25
|
import { DotTagCellValue } from '../../value-display/types/dotTag';
|
|
26
26
|
import { DotTagCellValue as DotTagCellValue_2 } from './types/dotTag.tsx';
|
|
27
|
+
import { F0GridStackProps as F0GridStackProps_2 } from './F0GridStack';
|
|
28
|
+
import { F0GridStackRef as F0GridStackRef_2 } from './F0GridStack';
|
|
27
29
|
import { F0IconProps as F0IconProps_2 } from './F0Icon';
|
|
28
30
|
import { f1Colors } from '@factorialco/f0-core';
|
|
29
31
|
import { FileCellValue } from '../../value-display/types/file';
|
|
@@ -32,6 +34,8 @@ import { FolderCellValue } from '../../value-display/types/folder';
|
|
|
32
34
|
import { FolderCellValue as FolderCellValue_2 } from './types/folder.tsx';
|
|
33
35
|
import { ForwardedRef } from 'react';
|
|
34
36
|
import { ForwardRefExoticComponent } from 'react';
|
|
37
|
+
import { GridStackOptions } from 'gridstack';
|
|
38
|
+
import { GridStackWidget } from 'gridstack';
|
|
35
39
|
import { HTMLAttributeAnchorTarget } from 'react';
|
|
36
40
|
import { HTMLAttributes } from 'react';
|
|
37
41
|
import { IconCellValue } from './types/icon.tsx';
|
|
@@ -1447,6 +1451,8 @@ export declare const defaultTranslations: {
|
|
|
1447
1451
|
readonly rangeTitle: "Use range";
|
|
1448
1452
|
readonly range: "Between {{min}} and {{max}}";
|
|
1449
1453
|
};
|
|
1454
|
+
readonly selectAll: "Select all";
|
|
1455
|
+
readonly clear: "Clear";
|
|
1450
1456
|
};
|
|
1451
1457
|
readonly toc: {
|
|
1452
1458
|
readonly search: "Search...";
|
|
@@ -1476,6 +1482,12 @@ export declare const defaultTranslations: {
|
|
|
1476
1482
|
readonly settings: "{{visualizationName}} settings";
|
|
1477
1483
|
readonly reset: "Reset to default";
|
|
1478
1484
|
};
|
|
1485
|
+
readonly table: {
|
|
1486
|
+
readonly settings: {
|
|
1487
|
+
readonly showAllColumns: "Show all";
|
|
1488
|
+
readonly hideAllColumns: "Hide all";
|
|
1489
|
+
};
|
|
1490
|
+
};
|
|
1479
1491
|
readonly itemsCount: "items";
|
|
1480
1492
|
readonly emptyStates: {
|
|
1481
1493
|
readonly noData: {
|
|
@@ -2047,6 +2059,55 @@ export declare type F0DropdownButtonProps<T = string> = {
|
|
|
2047
2059
|
|
|
2048
2060
|
export declare function F0EventCatcherProvider({ children, onEvent, enabled, catchEvents, }: EventCatcherProviderProps): JSX.Element;
|
|
2049
2061
|
|
|
2062
|
+
export declare const F0GridStack: ForwardRefExoticComponent<F0GridStackProps_2 & RefAttributes<F0GridStackRef_2>>;
|
|
2063
|
+
|
|
2064
|
+
export declare interface F0GridStackProps {
|
|
2065
|
+
options: GridStackReactOptions;
|
|
2066
|
+
widgets: GridStackReactWidget[];
|
|
2067
|
+
onChange?: (layout: GridStackWidgetPosition[]) => void;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
/**
|
|
2071
|
+
* Methods exposed via ref to control the grid programmatically.
|
|
2072
|
+
* @example
|
|
2073
|
+
* ```tsx
|
|
2074
|
+
* const gridRef = useRef<F0GridStackRef>(null)
|
|
2075
|
+
*
|
|
2076
|
+
* // Add a widget
|
|
2077
|
+
* gridRef.current?.addWidget({
|
|
2078
|
+
* id: 'new-widget',
|
|
2079
|
+
* w: 2,
|
|
2080
|
+
* h: 2,
|
|
2081
|
+
* renderFn: () => <div>Content</div>
|
|
2082
|
+
* meta: {
|
|
2083
|
+
* // Your metadata associated with the widget
|
|
2084
|
+
* }
|
|
2085
|
+
* })
|
|
2086
|
+
*
|
|
2087
|
+
* // Remove a widget
|
|
2088
|
+
* gridRef.current?.removeWidget('widget-id')
|
|
2089
|
+
*
|
|
2090
|
+
* // Remove all widgets
|
|
2091
|
+
* gridRef.current?.removeAll()
|
|
2092
|
+
*
|
|
2093
|
+
* // Save current layout
|
|
2094
|
+
* const layout = gridRef.current?.saveOptions()
|
|
2095
|
+
* ```
|
|
2096
|
+
*/
|
|
2097
|
+
export declare interface F0GridStackRef {
|
|
2098
|
+
addWidget: (widget: GridStackReactWidget) => void;
|
|
2099
|
+
removeWidget: (id: string) => void;
|
|
2100
|
+
addSubGrid: (subGrid: GridStackReactWidget & {
|
|
2101
|
+
id: Required<GridStackWidget>["id"];
|
|
2102
|
+
subGridOpts: Required<GridStackWidget>["subGridOpts"] & {
|
|
2103
|
+
children: Array<GridStackWidget & {
|
|
2104
|
+
id: Required<GridStackWidget>["id"];
|
|
2105
|
+
}>;
|
|
2106
|
+
};
|
|
2107
|
+
}) => void;
|
|
2108
|
+
removeAll: () => void;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2050
2111
|
export declare const F0Icon: ForwardRefExoticComponent<Omit<Omit<F0IconProps_2, "ref"> & RefAttributes<SVGSVGElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>;
|
|
2051
2112
|
|
|
2052
2113
|
export declare interface F0IconProps extends SVGProps<SVGSVGElement>, VariantProps<typeof iconVariants> {
|
|
@@ -2276,6 +2337,31 @@ declare type GranularityDefinitionKey = keyof typeof granularityDefinitions;
|
|
|
2276
2337
|
|
|
2277
2338
|
declare const granularityDefinitions: Record<string, GranularityDefinition>;
|
|
2278
2339
|
|
|
2340
|
+
export declare type GridStackReactOptions = Omit<GridStackOptions, "children">;
|
|
2341
|
+
|
|
2342
|
+
export declare type GridStackReactSize = {
|
|
2343
|
+
w: number;
|
|
2344
|
+
h: number;
|
|
2345
|
+
};
|
|
2346
|
+
|
|
2347
|
+
export declare interface GridStackReactWidget extends GridStackWidget {
|
|
2348
|
+
id: Required<GridStackWidget>["id"];
|
|
2349
|
+
allowedSizes?: GridStackReactSize[];
|
|
2350
|
+
renderFn?: () => React.ReactElement;
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
/**
|
|
2354
|
+
* Represents a node in the grid layout.
|
|
2355
|
+
*/
|
|
2356
|
+
export declare interface GridStackWidgetPosition {
|
|
2357
|
+
id: string;
|
|
2358
|
+
w: number;
|
|
2359
|
+
h: number;
|
|
2360
|
+
x: number;
|
|
2361
|
+
y: number;
|
|
2362
|
+
meta?: Record<string, unknown>;
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2279
2365
|
/**
|
|
2280
2366
|
* Symbol used to identify the groupId in the data
|
|
2281
2367
|
*/
|
|
@@ -3977,8 +4063,8 @@ declare module "@tiptap/core" {
|
|
|
3977
4063
|
|
|
3978
4064
|
declare module "@tiptap/core" {
|
|
3979
4065
|
interface Commands<ReturnType> {
|
|
3980
|
-
|
|
3981
|
-
|
|
4066
|
+
transcript: {
|
|
4067
|
+
insertTranscript: (data: TranscriptData, config?: TranscriptConfig) => ReturnType;
|
|
3982
4068
|
};
|
|
3983
4069
|
}
|
|
3984
4070
|
}
|
|
@@ -3986,15 +4072,35 @@ declare module "@tiptap/core" {
|
|
|
3986
4072
|
|
|
3987
4073
|
declare module "@tiptap/core" {
|
|
3988
4074
|
interface Commands<ReturnType> {
|
|
3989
|
-
|
|
3990
|
-
|
|
4075
|
+
liveCompanion: {
|
|
4076
|
+
insertLiveCompanion: (data: LiveCompanionData, config?: LiveCompanionConfig) => ReturnType;
|
|
3991
4077
|
};
|
|
3992
4078
|
}
|
|
3993
4079
|
}
|
|
3994
4080
|
|
|
3995
4081
|
|
|
3996
|
-
declare
|
|
3997
|
-
|
|
4082
|
+
declare module "gridstack" {
|
|
4083
|
+
interface GridStackWidget {
|
|
4084
|
+
id?: string;
|
|
4085
|
+
allowedSizes?: Array<{
|
|
4086
|
+
w: number;
|
|
4087
|
+
h: number;
|
|
4088
|
+
}>;
|
|
4089
|
+
renderFn?: () => React.ReactElement | null;
|
|
4090
|
+
meta?: Record<string, unknown>;
|
|
4091
|
+
}
|
|
4092
|
+
interface GridStackNode {
|
|
4093
|
+
id?: string;
|
|
4094
|
+
w?: number;
|
|
4095
|
+
h?: number;
|
|
4096
|
+
x?: number;
|
|
4097
|
+
y?: number;
|
|
4098
|
+
allowedSizes?: Array<{
|
|
4099
|
+
w: number;
|
|
4100
|
+
h: number;
|
|
4101
|
+
}>;
|
|
4102
|
+
renderFn?: () => React.ReactElement | null;
|
|
4103
|
+
}
|
|
3998
4104
|
}
|
|
3999
4105
|
|
|
4000
4106
|
|
|
@@ -4005,3 +4111,8 @@ declare module "@tiptap/core" {
|
|
|
4005
4111
|
};
|
|
4006
4112
|
}
|
|
4007
4113
|
}
|
|
4114
|
+
|
|
4115
|
+
|
|
4116
|
+
declare namespace Calendar {
|
|
4117
|
+
var displayName: string;
|
|
4118
|
+
}
|