@proteos/ui 0.52.0 → 0.53.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/index.cjs +97 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +98 -14
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/components/attribute-type-icon/attribute-type-icon.test.tsx +12 -0
- package/src/components/attribute-type-icon/attribute-type-icon.tsx +6 -0
- package/src/components/record-filter/operators.test.ts +20 -2
- package/src/components/record-filter/operators.ts +93 -11
package/dist/index.d.cts
CHANGED
|
@@ -87,6 +87,7 @@ declare const AttributeType: {
|
|
|
87
87
|
readonly Currency: "currency";
|
|
88
88
|
readonly KnowledgeText: "knowledge-text";
|
|
89
89
|
readonly File: "file";
|
|
90
|
+
readonly ContactAddress: "contact-address";
|
|
90
91
|
};
|
|
91
92
|
type AttributeType = (typeof AttributeType)[keyof typeof AttributeType];
|
|
92
93
|
/** Iteration order for type pickers, dropdowns, etc. */
|
package/dist/index.d.ts
CHANGED
|
@@ -87,6 +87,7 @@ declare const AttributeType: {
|
|
|
87
87
|
readonly Currency: "currency";
|
|
88
88
|
readonly KnowledgeText: "knowledge-text";
|
|
89
89
|
readonly File: "file";
|
|
90
|
+
readonly ContactAddress: "contact-address";
|
|
90
91
|
};
|
|
91
92
|
type AttributeType = (typeof AttributeType)[keyof typeof AttributeType];
|
|
92
93
|
/** Iteration order for type pickers, dropdowns, etc. */
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn, Button, Skeleton } from './chunk-IKAX76MB.js';
|
|
2
2
|
export { Button, Skeleton, buttonStyles, cn, skeletonStyles } from './chunk-IKAX76MB.js';
|
|
3
|
-
import { icons, Paperclip, BookText, Banknote, UsersRound, User, Link2, Braces, Brackets, ToggleLeft, CircleDot, Calendar, Hash, Type, File, FileImage, FileText, FileSpreadsheet, FileArchive, Loader2, X, Shapes, Search, Phone, AudioLines, Video, Mic, AtSign, MessagesSquare, Camera, Send, Linkedin, MessageCircle, Mail, Pipette, Pencil, ChevronDown, GripVertical, SendHorizontal, CircleX, Download, ChevronRight as ChevronRight$1, CircleCheck, CircleAlert, Info } from 'lucide-react';
|
|
3
|
+
import { icons, Contact, Paperclip, BookText, Banknote, UsersRound, User, Link2, Braces, Brackets, ToggleLeft, CircleDot, Calendar, Hash, Type, File, FileImage, FileText, FileSpreadsheet, FileArchive, Loader2, X, Shapes, Search, Phone, AudioLines, Video, Mic, AtSign, MessagesSquare, Camera, Send, Linkedin, MessageCircle, Mail, Pipette, Pencil, ChevronDown, GripVertical, SendHorizontal, CircleX, Download, ChevronRight as ChevronRight$1, CircleCheck, CircleAlert, Info } from 'lucide-react';
|
|
4
4
|
import { tv } from 'tailwind-variants';
|
|
5
5
|
import { Tabs as Tabs$1, TabPanel, Tab, TabList, MenuTrigger as MenuTrigger$1, SubmenuTrigger as SubmenuTrigger$1, DialogTrigger, Popover as Popover$1, Dialog, DropZone, Text, FileTrigger, Heading, Label, Input as Input$1, ListBox, ListBoxItem, Breadcrumbs as Breadcrumbs$1, Breadcrumb, Link, Button as Button$1, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, FieldError, TextField, ComboBox, ComboBoxStateContext, Select as Select$1, SelectValue, ModalOverlay, Modal as Modal$1, DatePicker as DatePicker$1, Group, DateInput, DateSegment, Menu as Menu$1, MenuItem as MenuItem$1, Disclosure, DisclosurePanel, ProgressBar as ProgressBar$1, RadioGroup as RadioGroup$1, Radio as Radio$1, Separator as Separator$1, Switch as Switch$1, TextArea, TimeField as TimeField$1, UNSTABLE_ToastQueue, UNSTABLE_ToastRegion, UNSTABLE_Toast, UNSTABLE_ToastContent, TooltipTrigger as TooltipTrigger$1, Tooltip as Tooltip$1, Calendar as Calendar$1, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell, DatePickerStateContext } from 'react-aria-components';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -359,7 +359,8 @@ var AttributeType = {
|
|
|
359
359
|
Principal: "principal",
|
|
360
360
|
Currency: "currency",
|
|
361
361
|
KnowledgeText: "knowledge-text",
|
|
362
|
-
File: "file"
|
|
362
|
+
File: "file",
|
|
363
|
+
ContactAddress: "contact-address"
|
|
363
364
|
};
|
|
364
365
|
var ATTRIBUTE_TYPES = Object.values(AttributeType);
|
|
365
366
|
var ATTRIBUTE_TYPE_ICONS = {
|
|
@@ -376,7 +377,8 @@ var ATTRIBUTE_TYPE_ICONS = {
|
|
|
376
377
|
[AttributeType.Principal]: UsersRound,
|
|
377
378
|
[AttributeType.Currency]: Banknote,
|
|
378
379
|
[AttributeType.KnowledgeText]: BookText,
|
|
379
|
-
[AttributeType.File]: Paperclip
|
|
380
|
+
[AttributeType.File]: Paperclip,
|
|
381
|
+
[AttributeType.ContactAddress]: Contact
|
|
380
382
|
};
|
|
381
383
|
function useAttributeTypeIcon(type) {
|
|
382
384
|
return ATTRIBUTE_TYPE_ICONS[type];
|
|
@@ -5823,44 +5825,126 @@ var OPERATORS = [
|
|
|
5823
5825
|
id: "eq",
|
|
5824
5826
|
label: "is",
|
|
5825
5827
|
arity: 1,
|
|
5826
|
-
types: [
|
|
5828
|
+
types: [
|
|
5829
|
+
"string",
|
|
5830
|
+
"number",
|
|
5831
|
+
"integer",
|
|
5832
|
+
"currency",
|
|
5833
|
+
"datetime",
|
|
5834
|
+
"enum",
|
|
5835
|
+
"boolean",
|
|
5836
|
+
"relation",
|
|
5837
|
+
"user",
|
|
5838
|
+
"principal",
|
|
5839
|
+
"contact-address"
|
|
5840
|
+
]
|
|
5827
5841
|
},
|
|
5828
5842
|
{
|
|
5829
5843
|
id: "ne",
|
|
5830
5844
|
label: "is not",
|
|
5831
5845
|
arity: 1,
|
|
5832
|
-
types: [
|
|
5846
|
+
types: [
|
|
5847
|
+
"string",
|
|
5848
|
+
"number",
|
|
5849
|
+
"integer",
|
|
5850
|
+
"currency",
|
|
5851
|
+
"datetime",
|
|
5852
|
+
"enum",
|
|
5853
|
+
"boolean",
|
|
5854
|
+
"relation",
|
|
5855
|
+
"user",
|
|
5856
|
+
"principal",
|
|
5857
|
+
"contact-address"
|
|
5858
|
+
]
|
|
5833
5859
|
},
|
|
5834
5860
|
{
|
|
5835
5861
|
id: "in",
|
|
5836
5862
|
label: "is any of",
|
|
5837
5863
|
arity: "n",
|
|
5838
|
-
types: [
|
|
5864
|
+
types: [
|
|
5865
|
+
"string",
|
|
5866
|
+
"number",
|
|
5867
|
+
"integer",
|
|
5868
|
+
"currency",
|
|
5869
|
+
"enum",
|
|
5870
|
+
"relation",
|
|
5871
|
+
"user",
|
|
5872
|
+
"principal",
|
|
5873
|
+
"contact-address"
|
|
5874
|
+
]
|
|
5839
5875
|
},
|
|
5840
5876
|
{
|
|
5841
5877
|
id: "not_in",
|
|
5842
5878
|
label: "is none of",
|
|
5843
5879
|
arity: "n",
|
|
5844
|
-
types: [
|
|
5880
|
+
types: [
|
|
5881
|
+
"string",
|
|
5882
|
+
"number",
|
|
5883
|
+
"integer",
|
|
5884
|
+
"currency",
|
|
5885
|
+
"enum",
|
|
5886
|
+
"relation",
|
|
5887
|
+
"user",
|
|
5888
|
+
"principal",
|
|
5889
|
+
"contact-address"
|
|
5890
|
+
]
|
|
5891
|
+
},
|
|
5892
|
+
{ id: "contains", label: "contains", arity: 1, types: ["string", "array", "contact-address"] },
|
|
5893
|
+
{ id: "starts_with", label: "starts with", arity: 1, types: ["string", "contact-address"] },
|
|
5894
|
+
{ id: "ends_with", label: "ends with", arity: 1, types: ["string", "contact-address"] },
|
|
5895
|
+
{
|
|
5896
|
+
id: "gt",
|
|
5897
|
+
label: "is greater than",
|
|
5898
|
+
arity: 1,
|
|
5899
|
+
types: ["number", "integer", "currency", "datetime"]
|
|
5845
5900
|
},
|
|
5846
|
-
{ id: "contains", label: "contains", arity: 1, types: ["string", "array"] },
|
|
5847
|
-
{ id: "starts_with", label: "starts with", arity: 1, types: ["string"] },
|
|
5848
|
-
{ id: "ends_with", label: "ends with", arity: 1, types: ["string"] },
|
|
5849
|
-
{ id: "gt", label: "is greater than", arity: 1, types: ["number", "integer", "currency", "datetime"] },
|
|
5850
5901
|
{ id: "gte", label: "is on or after", arity: 1, types: ["datetime"] },
|
|
5851
|
-
{
|
|
5902
|
+
{
|
|
5903
|
+
id: "lt",
|
|
5904
|
+
label: "is less than",
|
|
5905
|
+
arity: 1,
|
|
5906
|
+
types: ["number", "integer", "currency", "datetime"]
|
|
5907
|
+
},
|
|
5852
5908
|
{ id: "lte", label: "is on or before", arity: 1, types: ["datetime"] },
|
|
5853
5909
|
{
|
|
5854
5910
|
id: "empty",
|
|
5855
5911
|
label: "is empty",
|
|
5856
5912
|
arity: 0,
|
|
5857
|
-
types: [
|
|
5913
|
+
types: [
|
|
5914
|
+
"string",
|
|
5915
|
+
"number",
|
|
5916
|
+
"integer",
|
|
5917
|
+
"currency",
|
|
5918
|
+
"datetime",
|
|
5919
|
+
"enum",
|
|
5920
|
+
"boolean",
|
|
5921
|
+
"array",
|
|
5922
|
+
"relation",
|
|
5923
|
+
"user",
|
|
5924
|
+
"principal",
|
|
5925
|
+
"file",
|
|
5926
|
+
"contact-address"
|
|
5927
|
+
]
|
|
5858
5928
|
},
|
|
5859
5929
|
{
|
|
5860
5930
|
id: "not_empty",
|
|
5861
5931
|
label: "is not empty",
|
|
5862
5932
|
arity: 0,
|
|
5863
|
-
types: [
|
|
5933
|
+
types: [
|
|
5934
|
+
"string",
|
|
5935
|
+
"number",
|
|
5936
|
+
"integer",
|
|
5937
|
+
"currency",
|
|
5938
|
+
"datetime",
|
|
5939
|
+
"enum",
|
|
5940
|
+
"boolean",
|
|
5941
|
+
"array",
|
|
5942
|
+
"relation",
|
|
5943
|
+
"user",
|
|
5944
|
+
"principal",
|
|
5945
|
+
"file",
|
|
5946
|
+
"contact-address"
|
|
5947
|
+
]
|
|
5864
5948
|
}
|
|
5865
5949
|
];
|
|
5866
5950
|
var OP_LABEL_OVERRIDES = {
|