@pipe0/react 1.0.39 → 1.0.40
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/CHANGELOG.md +10 -0
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/index.d.mts +6 -2
- package/dist/index.mjs +6 -2
- package/dist/records/index.d.mts +3 -0
- package/dist/records/record-value.d.mts +42 -0
- package/dist/records/record-value.d.mts.map +1 -0
- package/dist/records/record-value.mjs +229 -0
- package/dist/records/record-value.mjs.map +1 -0
- package/dist/records/record-widgets.d.mts +69 -0
- package/dist/records/record-widgets.d.mts.map +1 -0
- package/dist/records/record-widgets.mjs +273 -0
- package/dist/records/record-widgets.mjs.map +1 -0
- package/dist/records/records-table.d.mts +51 -0
- package/dist/records/records-table.d.mts.map +1 -0
- package/dist/records/records-table.mjs +168 -0
- package/dist/records/records-table.mjs.map +1 -0
- package/dist/styles/pipe0-form.css +1 -1
- package/dist/utils/catalog-helpers.d.mts +2 -11
- package/dist/utils/catalog-helpers.d.mts.map +1 -1
- package/dist/utils/catalog-helpers.mjs +2 -53
- package/dist/utils/catalog-helpers.mjs.map +1 -1
- package/dist/utils/field-icons.d.mts +15 -0
- package/dist/utils/field-icons.d.mts.map +1 -0
- package/dist/utils/field-icons.mjs +58 -0
- package/dist/utils/field-icons.mjs.map +1 -0
- package/dist/widgets/avatar-group.d.mts +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-icons.d.mts","names":[],"sources":["../../src/utils/field-icons.tsx"],"mappings":";;;;;iBAiDgB,gBAAA,CAAiB,SAAA,EAAW,eAAA,GAAe,IAAA;;;AAA3D;;iBA+BgB,kBAAA,CAAmB,MAAA,EAAQ,iBAAA,EAAmB,SAAA,EAAW,eAAA,GAAe,aAAA,GAAA,IAAA;AAAA,iBAIxE,kBAAA,CAAmB,WAAA,EAAa,iBAAA,GAAiB,IAAA"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { AtSign, BookDashed, Bookmark, Braces, Calendar, CalendarClock, CheckCheck, Coins, Contact, Hash, HelpCircle, Internet, Loader, MapPin, Pause, Percent, Phone, TextAlignStart, ToggleRight, TriangleDashed, Type, X } from "../components/internal/icons.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/field-icons.tsx
|
|
4
|
+
const fieldStatusIconMap = {
|
|
5
|
+
completed: CheckCheck,
|
|
6
|
+
failed: X,
|
|
7
|
+
no_result: BookDashed,
|
|
8
|
+
pending: Bookmark,
|
|
9
|
+
processing: Loader,
|
|
10
|
+
queued: Pause,
|
|
11
|
+
skipped: TriangleDashed
|
|
12
|
+
};
|
|
13
|
+
const FieldTypeIconMap = {
|
|
14
|
+
boolean: ToggleRight,
|
|
15
|
+
json: Braces,
|
|
16
|
+
number: Hash,
|
|
17
|
+
string: Type,
|
|
18
|
+
unknown: HelpCircle
|
|
19
|
+
};
|
|
20
|
+
function getFieldTypeIcon(fieldType) {
|
|
21
|
+
return FieldTypeIconMap[fieldType];
|
|
22
|
+
}
|
|
23
|
+
const FieldFormatIconMap = {
|
|
24
|
+
email: AtSign,
|
|
25
|
+
url: Internet,
|
|
26
|
+
website_url: Internet,
|
|
27
|
+
domain: Internet,
|
|
28
|
+
profile_url: Contact,
|
|
29
|
+
phone: Phone,
|
|
30
|
+
date: Calendar,
|
|
31
|
+
datetime: CalendarClock,
|
|
32
|
+
address_line_1: MapPin,
|
|
33
|
+
zip_code: Hash,
|
|
34
|
+
currency: Coins,
|
|
35
|
+
percent: Percent,
|
|
36
|
+
markdown: TextAlignStart,
|
|
37
|
+
long_text: TextAlignStart,
|
|
38
|
+
text: Type,
|
|
39
|
+
int: Hash,
|
|
40
|
+
decimal: Hash,
|
|
41
|
+
json_object: Braces,
|
|
42
|
+
json_list: Braces,
|
|
43
|
+
json_list_string: Braces
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Column icon: the format is the expressive signal (an email column looks
|
|
47
|
+
* different from a date column), the type is the fallback for untyped fields.
|
|
48
|
+
*/
|
|
49
|
+
function getFieldFormatIcon(format, fieldType) {
|
|
50
|
+
return (format ? FieldFormatIconMap[format] : void 0) ?? getFieldTypeIcon(fieldType);
|
|
51
|
+
}
|
|
52
|
+
function getFieldStatusIcon(fieldStatus) {
|
|
53
|
+
return fieldStatusIconMap[fieldStatus];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
//#endregion
|
|
57
|
+
export { getFieldFormatIcon, getFieldStatusIcon, getFieldTypeIcon };
|
|
58
|
+
//# sourceMappingURL=field-icons.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-icons.mjs","names":[],"sources":["../../src/utils/field-icons.tsx"],"sourcesContent":["import type { RecordFieldFormat, RecordFieldStatus, RecordFieldType } from \"@pipe0/base\";\nimport type { ComponentType } from \"react\";\nimport {\n AtSign,\n BookDashed,\n Bookmark,\n Braces,\n Calendar,\n CalendarClock,\n CheckCheck,\n Coins,\n Contact,\n Hash,\n HelpCircle,\n Internet,\n Loader,\n MapPin,\n Pause,\n Percent,\n Phone,\n TextAlignStart,\n ToggleRight,\n TriangleDashed,\n Type,\n X,\n} from \"../components/internal/icons.js\";\n\n// Type-only imports from @pipe0/base on purpose: the read-only record views\n// (RecordsTable) use these icons, and a value import would pull the whole\n// catalog into bundles that tree-shake @pipe0/react (the MCP Apps view).\n\nconst fieldStatusIconMap = {\n completed: CheckCheck,\n failed: X,\n no_result: BookDashed,\n pending: Bookmark,\n processing: Loader,\n queued: Pause,\n skipped: TriangleDashed,\n} satisfies Record<RecordFieldStatus, ComponentType>;\n\nconst FieldTypeIconMap = {\n boolean: ToggleRight,\n json: Braces,\n number: Hash,\n string: Type,\n unknown: HelpCircle,\n} satisfies Record<RecordFieldType, ComponentType>;\n\nexport function getFieldTypeIcon(fieldType: RecordFieldType) {\n return FieldTypeIconMap[fieldType];\n}\n\nconst FieldFormatIconMap: Partial<Record<NonNullable<RecordFieldFormat>, ComponentType>> = {\n email: AtSign,\n url: Internet,\n website_url: Internet,\n domain: Internet,\n profile_url: Contact,\n phone: Phone,\n date: Calendar,\n datetime: CalendarClock,\n address_line_1: MapPin,\n zip_code: Hash,\n currency: Coins,\n percent: Percent,\n markdown: TextAlignStart,\n long_text: TextAlignStart,\n text: Type,\n int: Hash,\n decimal: Hash,\n json_object: Braces,\n json_list: Braces,\n json_list_string: Braces,\n};\n\n/**\n * Column icon: the format is the expressive signal (an email column looks\n * different from a date column), the type is the fallback for untyped fields.\n */\nexport function getFieldFormatIcon(format: RecordFieldFormat, fieldType: RecordFieldType) {\n return (format ? FieldFormatIconMap[format] : undefined) ?? getFieldTypeIcon(fieldType);\n}\n\nexport function getFieldStatusIcon(fieldStatus: RecordFieldStatus) {\n return fieldStatusIconMap[fieldStatus];\n}\n"],"mappings":";;;AA+BA,MAAM,qBAAqB;CACzB,WAAW;CACX,QAAQ;CACR,WAAW;CACX,SAAS;CACT,YAAY;CACZ,QAAQ;CACR,SAAS;CACV;AAED,MAAM,mBAAmB;CACvB,SAAS;CACT,MAAM;CACN,QAAQ;CACR,QAAQ;CACR,SAAS;CACV;AAED,SAAgB,iBAAiB,WAA4B;AAC3D,QAAO,iBAAiB;;AAG1B,MAAM,qBAAqF;CACzF,OAAO;CACP,KAAK;CACL,aAAa;CACb,QAAQ;CACR,aAAa;CACb,OAAO;CACP,MAAM;CACN,UAAU;CACV,gBAAgB;CAChB,UAAU;CACV,UAAU;CACV,SAAS;CACT,UAAU;CACV,WAAW;CACX,MAAM;CACN,KAAK;CACL,SAAS;CACT,aAAa;CACb,WAAW;CACX,kBAAkB;CACnB;;;;;AAMD,SAAgB,mBAAmB,QAA2B,WAA4B;AACxF,SAAQ,SAAS,mBAAmB,UAAU,WAAc,iBAAiB,UAAU;;AAGzF,SAAgB,mBAAmB,aAAgC;AACjE,QAAO,mBAAmB"}
|
|
@@ -6,7 +6,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
6
6
|
|
|
7
7
|
//#region src/widgets/avatar-group.d.ts
|
|
8
8
|
declare const avatarGroupVariants: (props?: ({
|
|
9
|
-
size?: "base" | "sm" | "
|
|
9
|
+
size?: "base" | "sm" | "md" | "lg" | null | undefined;
|
|
10
10
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
11
11
|
interface AvatarGroupState {
|
|
12
12
|
overflows: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipe0/react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"description": "React component library for building forms and catalogs powered by pipe0 pipes and searches.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "pipe0",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"react-hook-form": "^7.62.0",
|
|
87
87
|
"swr": "^2.4.1",
|
|
88
88
|
"tailwind-merge": "^3.3.1",
|
|
89
|
-
"@pipe0/base": "1.0.
|
|
89
|
+
"@pipe0/base": "1.0.40"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
92
|
"@base-ui/react": "^1.6.0",
|