@sincpro/web-ui 2.0.0 → 2.2.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/README.md +45 -0
- package/dist/components/activity/Activity.d.ts +13 -14
- package/dist/components/activity/Activity.js +1 -1
- package/dist/components/activity/Messages.d.ts +5 -5
- package/dist/components/activity/Messages.js +8 -8
- package/dist/components/attachments/Attachments.d.ts +7 -1
- package/dist/components/attachments/Attachments.js +8 -2
- package/dist/components/board/Board.d.ts +32 -2
- package/dist/components/board/Board.js +27 -4
- package/dist/components/board/index.d.ts +1 -1
- package/dist/components/board/index.js +2 -1
- package/dist/components/form/Form.js +6 -6
- package/dist/components/form/index.js +2 -2
- package/dist/components/frame/FrameView.d.ts +5 -5
- package/dist/components/frame/FrameView.js +4 -4
- package/dist/components/listing/GroupingLevels.d.ts +22 -22
- package/dist/components/listing/GroupingLevels.js +9 -9
- package/dist/components/listing/Listing.d.ts +11 -11
- package/dist/components/listing/Listing.js +11 -11
- package/dist/components/listing/ListingBar.js +11 -11
- package/dist/components/listing/Row.d.ts +19 -19
- package/dist/components/listing/Row.js +27 -27
- package/dist/components/listing/SortMenu.d.ts +36 -36
- package/dist/components/listing/SortMenu.js +6 -6
- package/dist/components/listing/grouping.d.ts +16 -16
- package/dist/components/listing/grouping.js +6 -6
- package/dist/components/listing/index.js +1 -1
- package/dist/components/listing/modelColumns.d.ts +25 -25
- package/dist/components/listing/modelColumns.js +24 -24
- package/dist/components/listing/pages.js +4 -4
- package/dist/components/listing/set.d.ts +18 -18
- package/dist/components/navigation/NavigationTree.js +2 -2
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/record/RecordSkeleton.js +7 -7
- package/dist/components/search/CriteriaBuilder.d.ts +22 -22
- package/dist/components/search/CriteriaBuilder.js +31 -31
- package/dist/components/search/CriteriaChips.d.ts +9 -9
- package/dist/components/search/CriteriaChips.js +12 -12
- package/dist/components/search/FilterBuilder.d.ts +67 -67
- package/dist/components/search/FilterBuilder.js +104 -104
- package/dist/components/search/JoinWord.d.ts +1 -1
- package/dist/components/search/JoinWord.js +14 -14
- package/dist/components/search/JsonEditor.d.ts +8 -8
- package/dist/components/search/JsonEditor.js +16 -16
- package/dist/components/search/SearchBar.d.ts +34 -34
- package/dist/components/search/SearchBar.js +140 -117
- package/dist/components/search/criteria.d.ts +61 -61
- package/dist/components/search/criteria.js +39 -39
- package/dist/components/search/datePeriods.d.ts +47 -48
- package/dist/components/search/datePeriods.js +29 -29
- package/dist/components/search/dateRanges.d.ts +27 -27
- package/dist/components/search/dateRanges.js +16 -16
- package/dist/components/search/index.js +13 -13
- package/dist/components/search/model.d.ts +28 -28
- package/dist/components/search/model.js +21 -21
- package/dist/components/search/query.d.ts +71 -71
- package/dist/components/search/query.js +119 -119
- package/dist/components/shell/AppFrame.d.ts +9 -2
- package/dist/components/shell/AppFrame.js +102 -14
- package/dist/components/shell/Sidebar.d.ts +34 -0
- package/dist/components/shell/Sidebar.js +32 -0
- package/dist/components/shell/TopBar.d.ts +2 -0
- package/dist/components/shell/TopBar.js +13 -9
- package/dist/components/shell/index.d.ts +2 -0
- package/dist/components/shell/index.js +5 -1
- package/dist/components/shell/sidebarDrawer.d.ts +26 -0
- package/dist/components/shell/sidebarDrawer.js +22 -0
- package/dist/foundations/calendar.d.ts +27 -27
- package/dist/foundations/calendar.js +72 -72
- package/dist/foundations/chart.d.ts +57 -57
- package/dist/foundations/chart.js +27 -27
- package/dist/foundations/copy.d.ts +109 -94
- package/dist/foundations/copy.es.js +10 -2
- package/dist/foundations/copy.js +10 -2
- package/dist/foundations/grouping.d.ts +175 -175
- package/dist/foundations/grouping.js +0 -0
- package/dist/foundations/index.d.ts +1 -1
- package/dist/foundations/index.js +21 -21
- package/dist/foundations/pivot.d.ts +133 -131
- package/dist/foundations/pivot.js +54 -54
- package/dist/foundations/pivotSheet.d.ts +36 -36
- package/dist/foundations/pivotSheet.js +0 -0
- package/dist/foundations/slots.d.ts +38 -38
- package/dist/foundations/slots.js +18 -18
- package/dist/foundations/sticky.d.ts +28 -28
- package/dist/foundations/sticky.js +59 -59
- package/dist/foundations/xlsx.d.ts +47 -47
- package/dist/foundations/xlsx.js +0 -0
- package/dist/primitives/block/Line.d.ts +4 -4
- package/dist/primitives/block/Line.js +28 -28
- package/dist/primitives/block/index.js +2 -2
- package/dist/primitives/cell/index.js +2 -2
- package/dist/primitives/choice/index.js +3 -3
- package/dist/primitives/date/Calendar.d.ts +7 -1
- package/dist/primitives/date/Calendar.js +13 -3
- package/dist/primitives/date/DatePicker.d.ts +4 -1
- package/dist/primitives/date/DatePicker.js +2 -2
- package/dist/primitives/date/index.js +3 -3
- package/dist/primitives/disclosure/index.js +1 -1
- package/dist/primitives/field/DropZone.d.ts +22 -3
- package/dist/primitives/field/DropZone.js +33 -12
- package/dist/primitives/menu/Menu.d.ts +10 -6
- package/dist/primitives/menu/Menu.js +4 -3
- package/dist/primitives/notice/Callout.d.ts +30 -30
- package/dist/primitives/notice/Callout.js +6 -6
- package/dist/primitives/overlay/index.js +3 -3
- package/dist/primitives/picker/Picker.d.ts +6 -0
- package/dist/primitives/picker/Picker.js +27 -4
- package/dist/primitives/picker/index.js +2 -2
- package/dist/primitives/table/DataTable.d.ts +32 -32
- package/dist/primitives/table/DataTable.js +24 -24
- package/dist/primitives/table/EditableTable.d.ts +10 -10
- package/dist/primitives/table/EditableTable.js +9 -9
- package/dist/primitives/table/ReportTable.js +7 -7
- package/dist/primitives/table/SheetTable.d.ts +13 -13
- package/dist/primitives/table/SheetTable.js +14 -14
- package/dist/primitives/table/Table.js +8 -8
- package/dist/primitives/tabs/Tabs.d.ts +46 -46
- package/dist/primitives/tabs/Tabs.js +4 -30
- package/dist/primitives/tag/Count.d.ts +23 -0
- package/dist/primitives/tag/Count.js +59 -0
- package/dist/primitives/tag/index.d.ts +1 -0
- package/dist/primitives/tag/index.js +5 -2
- package/dist/primitives/toolbar/index.js +1 -1
- package/dist/primitives/value/Copyable.d.ts +22 -22
- package/dist/primitives/value/Copyable.js +9 -9
- package/dist/primitives/value/Metric.d.ts +7 -2
- package/dist/primitives/value/Metric.js +12 -4
- package/dist/tokens.css +164 -57
- package/dist/views/list/List.d.ts +36 -36
- package/dist/views/list/List.js +19 -19
- package/dist/views/list/ListView.js +74 -74
- package/dist/views/list/columns.d.ts +10 -10
- package/dist/views/list/columns.js +10 -10
- package/dist/views/list/derive.d.ts +30 -30
- package/dist/views/list/derive.js +49 -49
- package/dist/views/list/index.js +2 -2
- package/dist/views/list/presentations.js +3 -3
- package/dist/views/list/types.d.ts +109 -109
- package/dist/views/record/Record.d.ts +14 -14
- package/dist/views/record/Record.js +24 -24
- package/dist/views/record/index.js +1 -1
- package/package.json +1 -1
|
@@ -3,71 +3,71 @@ import type { ModelDefinition } from "./model.js";
|
|
|
3
3
|
import type { Surface } from "../../foundations/types.js";
|
|
4
4
|
import type { MenuGroup } from "../../primitives/menu/Menu.js";
|
|
5
5
|
import { type ReactNode } from "react";
|
|
6
|
-
/**
|
|
6
|
+
/** Where you can search. The domain declares it, not this piece. */
|
|
7
7
|
export interface SearchFacet {
|
|
8
8
|
id: string;
|
|
9
|
-
/**
|
|
9
|
+
/** How it reads in the suggestion and on the chip: «nombre», «columnas». */
|
|
10
10
|
label: string;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* The CONJUNCTION between two cuts: «y» or «o».
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
* mes»
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
15
|
+
* With `onToggle` it can be touched, and that is no ornament: «vencidas Y de este
|
|
16
|
+
* mes» and «vencidas O de este mes» are two completely different lists, and
|
|
17
|
+
* until now which of the two it was was decided inside and could not be changed
|
|
18
|
+
* without opening the builder. Without `onToggle` it is a word and nothing more — which is
|
|
19
|
+
* right between two axes, where AND is not an option.
|
|
20
20
|
*/
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
22
|
+
* What the bar needs. It is apart from the function because it is the contract: what
|
|
23
|
+
* a list has to give it for the bar to ask, and nothing more.
|
|
24
24
|
*/
|
|
25
25
|
export type SearchBarProps = {
|
|
26
26
|
facets: readonly SearchFacet[];
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* The model, when the list has it.
|
|
29
29
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
30
|
+
* It is what turns the bar from «search a text in a field» into «ask a
|
|
31
|
+
* question»: from here come each field's type —and with it what can be
|
|
32
|
+
* written to it—, the operators it accepts, its possible values if it is an enum, and
|
|
33
|
+
* by which column a relational is searched. Without this, `facets` keeps working
|
|
34
|
+
* as always: each facet is a text field.
|
|
35
35
|
*/
|
|
36
36
|
model?: ModelDefinition;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
38
|
+
* EVERYTHING the bar has set: the grouping levels and the filters, in
|
|
39
|
+
* a single list of instances.
|
|
40
40
|
*
|
|
41
|
-
*
|
|
42
|
-
* `criteria.ts`—:
|
|
43
|
-
*
|
|
44
|
-
*
|
|
41
|
+
* A single one and not three because they are the same with different kinds —see
|
|
42
|
+
* `criteria.ts`—: what enters through the hash sign, what is written by hand, what
|
|
43
|
+
* a declared filter brings with a name and what comes out of the builder are
|
|
44
|
+
* all instances, and that is why they are all read, touched and removed the same.
|
|
45
45
|
*/
|
|
46
46
|
criteria: readonly SearchCriteria[];
|
|
47
47
|
onCriteriaChange: (next: SearchCriteria[]) => void;
|
|
48
48
|
placeholder?: string;
|
|
49
|
-
/**
|
|
49
|
+
/** What the panel OFFERS. What is set does not come from here: it comes from `criteria`. */
|
|
50
50
|
filters?: readonly MenuGroup[];
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* The grouping levels editor: `<GroupingLevels …/>`.
|
|
53
53
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
54
|
+
* It goes in the SAME panel column where the filters are, because it is the same
|
|
55
|
+
* question —«which part of this am I looking at»— and separating them forces opening two
|
|
56
|
+
* things to build a cut without being able to see both states at once.
|
|
57
57
|
*/
|
|
58
58
|
grouping?: ReactNode;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
60
|
+
* Somebody wrote `#and`, `#or` or `#not` and the bar opened a node: this says
|
|
61
|
+
* which, in case whoever composes wants to do something more with it.
|
|
62
62
|
*/
|
|
63
63
|
onOpenGroup?: (join: CriteriaJoin) => void;
|
|
64
64
|
favorites?: readonly MenuGroup[];
|
|
65
65
|
onFilterSelect?: (id: string) => void;
|
|
66
66
|
onFavoriteSelect?: (id: string) => void;
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
68
|
+
* Opens the builder. It receives the PATH of the instance that was touched, when one
|
|
69
|
+
* was touched: the builder opens there, instead of opening on the first rule and
|
|
70
|
+
* forcing you to search for the one you were looking at among twelve.
|
|
71
71
|
*/
|
|
72
72
|
onOpenBuilder?: (path?: CriteriaPath) => void;
|
|
73
73
|
/**
|
|
@@ -80,12 +80,12 @@ export type SearchBarProps = {
|
|
|
80
80
|
* enum's value, a number a numeric field answers): then that goes first and this after it.
|
|
81
81
|
*/
|
|
82
82
|
literal?: (text: string) => BuiltCondition | BuiltFilter | null;
|
|
83
|
-
/**
|
|
83
|
+
/** What goes stuck to the field, on its right. */
|
|
84
84
|
trailing?: ReactNode;
|
|
85
85
|
/** How many facets the bar shows before folding the rest into «+N»; the grouping chain
|
|
86
86
|
* counts as one. On a narrow bar only the first shows. `Infinity` never folds. */
|
|
87
87
|
collapseAfter?: number;
|
|
88
|
-
/**
|
|
88
|
+
/** By default it inherits it from the surface that wraps it. */
|
|
89
89
|
surface?: Surface;
|
|
90
90
|
};
|
|
91
91
|
export declare function SearchBar({ facets, model, criteria, onCriteriaChange, placeholder, filters, grouping, onOpenGroup, favorites, onFilterSelect, onFavoriteSelect, onOpenBuilder, literal, trailing, collapseAfter, surface, }: SearchBarProps): import("react").JSX.Element;
|