@factorialco/f0-react 1.305.0 → 1.306.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.
- package/dist/experimental.d.ts +40 -17
- package/dist/experimental.js +6185 -6154
- package/dist/f0.d.ts +38 -25
- package/dist/f0.js +1797 -1753
- package/dist/i18n-provider-defaults.d.ts +17 -17
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/f0.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ import { NumberCellValue as NumberCellValue_2 } from './types/number';
|
|
|
62
62
|
import { NumberFilterOptions } from './NumberFilter/NumberFilter';
|
|
63
63
|
import { Observable } from 'zen-observable-ts';
|
|
64
64
|
import { PageLayoutBlockComponent as PageLayoutBlockComponent_2 } from './types';
|
|
65
|
+
import { PageLayoutGroupComponent as PageLayoutGroupComponent_2 } from '../Layout';
|
|
65
66
|
import { PageProps } from './pages/Page';
|
|
66
67
|
import { PercentageCellValue } from './types/percentage';
|
|
67
68
|
import { PersonCellValue } from '../../value-display/types/person';
|
|
@@ -1123,6 +1124,10 @@ export declare function createAtlaskitDriver(instanceId: symbol): DndDriver;
|
|
|
1123
1124
|
*/
|
|
1124
1125
|
export declare const createDataSourceDefinition: <R extends RecordType = RecordType, FiltersSchema extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>>(definition: DataSourceDefinition<R, FiltersSchema, Sortings, Grouping>) => DataSourceDefinition<R, FiltersSchema, Sortings, Grouping>;
|
|
1125
1126
|
|
|
1127
|
+
export declare const createPageLayoutBlock: <Props = unknown>(displayName: string, Component: React.ComponentType<Props>) => React.ComponentType<Props> & PageLayoutBlockComponent;
|
|
1128
|
+
|
|
1129
|
+
export declare const createPageLayoutBlockGroup: <Props = unknown>(displayName: string, Component: React.ComponentType<Props>) => React.ComponentType<Props> & PageLayoutGroupComponent;
|
|
1130
|
+
|
|
1126
1131
|
/**
|
|
1127
1132
|
* Extracts the current filters type from filter options.
|
|
1128
1133
|
* Creates a type mapping filter keys to their respective value types.
|
|
@@ -1135,10 +1140,7 @@ export declare type CurrentFilters<F extends FilterOptions<string>> = F extends
|
|
|
1135
1140
|
[Key in K]?: FilterValue<F["fields"][Key]>;
|
|
1136
1141
|
} : Record<string, never>;
|
|
1137
1142
|
|
|
1138
|
-
export declare const Dashboard:
|
|
1139
|
-
({ widgets, editMode, onChange, }: DashboardProps_2): JSX_2.Element;
|
|
1140
|
-
displayName: string;
|
|
1141
|
-
};
|
|
1143
|
+
export declare const Dashboard: ComponentType<DashboardProps_2> & PageLayoutGroupComponent_2;
|
|
1142
1144
|
|
|
1143
1145
|
export declare type DashboardProps = GroupGridProps<DashboardWidget>;
|
|
1144
1146
|
|
|
@@ -2748,7 +2750,7 @@ export declare interface GridStackReactWidget extends Omit<GridStackWidget, "con
|
|
|
2748
2750
|
*/
|
|
2749
2751
|
export declare const GROUP_ID_SYMBOL: unique symbol;
|
|
2750
2752
|
|
|
2751
|
-
declare interface GroupGridProps<Widget extends GroupGridWidget> {
|
|
2753
|
+
declare interface GroupGridProps<Widget extends GroupGridWidget, Deps extends Record<string, unknown> = Record<string, unknown>> {
|
|
2752
2754
|
widgets: Optional<Widget, "x" | "y">[];
|
|
2753
2755
|
editMode?: boolean;
|
|
2754
2756
|
/**
|
|
@@ -2762,16 +2764,27 @@ declare interface GroupGridProps<Widget extends GroupGridWidget> {
|
|
|
2762
2764
|
* If the group is the main content of the page, it will try to take the full height of the page
|
|
2763
2765
|
*/
|
|
2764
2766
|
main?: boolean;
|
|
2767
|
+
/**
|
|
2768
|
+
* Current values for dependencies. When this changes, widgets with `deps` arrays
|
|
2769
|
+
* will have their content updated automatically. Widgets reference dependencies
|
|
2770
|
+
* by key names (e.g., `deps: ['globalCounter']` maps to `deps: { globalCounter: 0 }`).
|
|
2771
|
+
*/
|
|
2772
|
+
deps?: Deps;
|
|
2765
2773
|
}
|
|
2766
2774
|
|
|
2767
|
-
declare type GroupGridWidget<Meta extends Record<string, unknown> = Record<string, unknown
|
|
2775
|
+
declare type GroupGridWidget<Meta extends Record<string, unknown> = Record<string, unknown>, DepsKeys extends string[] = string[]> = {
|
|
2768
2776
|
id: string;
|
|
2769
2777
|
availableSizes?: GroupGridWidgetSize[];
|
|
2770
|
-
content: React.ReactNode;
|
|
2778
|
+
content: React.ReactNode | ((deps: Partial<Record<DepsKeys[number], unknown>>) => React.ReactNode);
|
|
2771
2779
|
x: number;
|
|
2772
2780
|
y: number;
|
|
2773
2781
|
locked?: boolean;
|
|
2774
2782
|
meta?: Meta;
|
|
2783
|
+
/**
|
|
2784
|
+
* Dependencies array that, when changed, will trigger a content update.
|
|
2785
|
+
* Each value in the array is compared using strict equality (`===`).
|
|
2786
|
+
*/
|
|
2787
|
+
deps?: DepsKeys;
|
|
2775
2788
|
} & GroupGridWidgetSize;
|
|
2776
2789
|
|
|
2777
2790
|
declare type GroupGridWidgetSize = {
|
|
@@ -3106,7 +3119,7 @@ export declare const Layout: {
|
|
|
3106
3119
|
BlockContent: ComponentType<BlockProps & BlockContentExtraProps> & PageLayoutBlockComponent_2;
|
|
3107
3120
|
Group: ForwardRefExoticComponent<GroupLinearProps & RefAttributes<HTMLDivElement>>;
|
|
3108
3121
|
GroupGrid: {
|
|
3109
|
-
<Widget extends GroupGridWidget_2>({ widgets, editMode, onChange, WidgetWrapper, main, }: GroupGridProps_2<Widget>): JSX_2.Element;
|
|
3122
|
+
<Widget extends GroupGridWidget_2, Deps extends Record<string, unknown> = Record<string, unknown>>({ widgets, editMode, onChange, WidgetWrapper, main, deps: dependencyValues, }: GroupGridProps_2<Widget, Deps>): JSX_2.Element;
|
|
3110
3123
|
displayName: string;
|
|
3111
3124
|
};
|
|
3112
3125
|
GroupMasonry: {
|
|
@@ -4683,23 +4696,6 @@ declare global {
|
|
|
4683
4696
|
}
|
|
4684
4697
|
}
|
|
4685
4698
|
|
|
4686
|
-
declare module "gridstack" {
|
|
4687
|
-
interface GridStackWidget {
|
|
4688
|
-
id?: string;
|
|
4689
|
-
allowedSizes?: Array<{
|
|
4690
|
-
w: number;
|
|
4691
|
-
h: number;
|
|
4692
|
-
}>;
|
|
4693
|
-
meta?: Record<string, unknown>;
|
|
4694
|
-
}
|
|
4695
|
-
interface GridStackNode {
|
|
4696
|
-
allowedSizes?: Array<{
|
|
4697
|
-
w: number;
|
|
4698
|
-
h: number;
|
|
4699
|
-
}>;
|
|
4700
|
-
}
|
|
4701
|
-
}
|
|
4702
|
-
|
|
4703
4699
|
|
|
4704
4700
|
declare module "@tiptap/core" {
|
|
4705
4701
|
interface Commands<ReturnType> {
|
|
@@ -4727,6 +4723,23 @@ declare module "@tiptap/core" {
|
|
|
4727
4723
|
}
|
|
4728
4724
|
}
|
|
4729
4725
|
|
|
4726
|
+
declare module "gridstack" {
|
|
4727
|
+
interface GridStackWidget {
|
|
4728
|
+
id?: string;
|
|
4729
|
+
allowedSizes?: Array<{
|
|
4730
|
+
w: number;
|
|
4731
|
+
h: number;
|
|
4732
|
+
}>;
|
|
4733
|
+
meta?: Record<string, unknown>;
|
|
4734
|
+
}
|
|
4735
|
+
interface GridStackNode {
|
|
4736
|
+
allowedSizes?: Array<{
|
|
4737
|
+
w: number;
|
|
4738
|
+
h: number;
|
|
4739
|
+
}>;
|
|
4740
|
+
}
|
|
4741
|
+
}
|
|
4742
|
+
|
|
4730
4743
|
|
|
4731
4744
|
declare namespace Calendar {
|
|
4732
4745
|
var displayName: string;
|