@fluid-app/portal-widgets 0.1.17

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.
Files changed (145) hide show
  1. package/dist/AlertWidget-AS_8Jjbd.cjs +39 -0
  2. package/dist/AlertWidget-AS_8Jjbd.cjs.map +1 -0
  3. package/dist/AlertWidget-Dy6pBmXm.mjs +22 -0
  4. package/dist/AlertWidget-Dy6pBmXm.mjs.map +1 -0
  5. package/dist/CalendarWidget-DAHnT9Wn.mjs +424 -0
  6. package/dist/CalendarWidget-DAHnT9Wn.mjs.map +1 -0
  7. package/dist/CalendarWidget-DW7q6Q7_.cjs +441 -0
  8. package/dist/CalendarWidget-DW7q6Q7_.cjs.map +1 -0
  9. package/dist/CarouselWidget-BJvLjY7H.mjs +436 -0
  10. package/dist/CarouselWidget-BJvLjY7H.mjs.map +1 -0
  11. package/dist/CarouselWidget-Bdn0LVXT.cjs +453 -0
  12. package/dist/CarouselWidget-Bdn0LVXT.cjs.map +1 -0
  13. package/dist/CatchUpWidget-CZMptzf8.cjs +264 -0
  14. package/dist/CatchUpWidget-CZMptzf8.cjs.map +1 -0
  15. package/dist/CatchUpWidget-vEP5scfy.mjs +247 -0
  16. package/dist/CatchUpWidget-vEP5scfy.mjs.map +1 -0
  17. package/dist/ChartWidget-B3GcdLqH.mjs +415 -0
  18. package/dist/ChartWidget-B3GcdLqH.mjs.map +1 -0
  19. package/dist/ChartWidget-DQB7K6S0.cjs +432 -0
  20. package/dist/ChartWidget-DQB7K6S0.cjs.map +1 -0
  21. package/dist/ContainerWidget-B-4hcPKJ.mjs +44 -0
  22. package/dist/ContainerWidget-B-4hcPKJ.mjs.map +1 -0
  23. package/dist/ContainerWidget-CHa4gVvV.cjs +2 -0
  24. package/dist/ContainerWidget-rGsakG66.cjs +51 -0
  25. package/dist/ContainerWidget-rGsakG66.cjs.map +1 -0
  26. package/dist/EmbedWidget-ChLVA_9a.mjs +156 -0
  27. package/dist/EmbedWidget-ChLVA_9a.mjs.map +1 -0
  28. package/dist/EmbedWidget-mv5ce32s.cjs +173 -0
  29. package/dist/EmbedWidget-mv5ce32s.cjs.map +1 -0
  30. package/dist/ImageWidget-DFt4mJJx.cjs +167 -0
  31. package/dist/ImageWidget-DFt4mJJx.cjs.map +1 -0
  32. package/dist/ImageWidget-DMubcgat.mjs +150 -0
  33. package/dist/ImageWidget-DMubcgat.mjs.map +1 -0
  34. package/dist/LayoutWidget-BEi0yFpz.mjs +107 -0
  35. package/dist/LayoutWidget-BEi0yFpz.mjs.map +1 -0
  36. package/dist/LayoutWidget-C4-ka0Ge.cjs +114 -0
  37. package/dist/LayoutWidget-C4-ka0Ge.cjs.map +1 -0
  38. package/dist/LayoutWidget-D4haEqTQ.cjs +2 -0
  39. package/dist/ListWidget-C-jcsCb4.mjs +901 -0
  40. package/dist/ListWidget-C-jcsCb4.mjs.map +1 -0
  41. package/dist/ListWidget-RHQ2fQXa.cjs +919 -0
  42. package/dist/ListWidget-RHQ2fQXa.cjs.map +1 -0
  43. package/dist/MediaRenderer-CcJvyOJ1.cjs +181 -0
  44. package/dist/MediaRenderer-CcJvyOJ1.cjs.map +1 -0
  45. package/dist/MediaRenderer-Uq90PZcY.mjs +163 -0
  46. package/dist/MediaRenderer-Uq90PZcY.mjs.map +1 -0
  47. package/dist/MySiteWidget-A_cYFgxJ.cjs +279 -0
  48. package/dist/MySiteWidget-A_cYFgxJ.cjs.map +1 -0
  49. package/dist/MySiteWidget-DariqlfU.mjs +262 -0
  50. package/dist/MySiteWidget-DariqlfU.mjs.map +1 -0
  51. package/dist/NestedWidget-CNkwGwhM.mjs +330 -0
  52. package/dist/NestedWidget-CNkwGwhM.mjs.map +1 -0
  53. package/dist/NestedWidget-ofk9O-t1.cjs +346 -0
  54. package/dist/NestedWidget-ofk9O-t1.cjs.map +1 -0
  55. package/dist/QuickShareWidget-DWvgEy74.cjs +262 -0
  56. package/dist/QuickShareWidget-DWvgEy74.cjs.map +1 -0
  57. package/dist/QuickShareWidget-DXq5lcDn.mjs +245 -0
  58. package/dist/QuickShareWidget-DXq5lcDn.mjs.map +1 -0
  59. package/dist/RecentActivityWidget-BvncOdax.mjs +391 -0
  60. package/dist/RecentActivityWidget-BvncOdax.mjs.map +1 -0
  61. package/dist/RecentActivityWidget-wODng8dt.cjs +408 -0
  62. package/dist/RecentActivityWidget-wODng8dt.cjs.map +1 -0
  63. package/dist/RegistryContext-CscXrsRa.mjs +36 -0
  64. package/dist/RegistryContext-CscXrsRa.mjs.map +1 -0
  65. package/dist/RegistryContext-xjea4xVV.cjs +55 -0
  66. package/dist/RegistryContext-xjea4xVV.cjs.map +1 -0
  67. package/dist/ScreenRenderer-D52h5VQr.mjs +76 -0
  68. package/dist/ScreenRenderer-D52h5VQr.mjs.map +1 -0
  69. package/dist/ScreenRenderer-DZAxcg7x.cjs +82 -0
  70. package/dist/ScreenRenderer-DZAxcg7x.cjs.map +1 -0
  71. package/dist/ScreenRendererContext-CK1IsFTn.cjs +36 -0
  72. package/dist/ScreenRendererContext-CK1IsFTn.cjs.map +1 -0
  73. package/dist/ScreenRendererContext-DKcdcmiT.mjs +23 -0
  74. package/dist/ScreenRendererContext-DKcdcmiT.mjs.map +1 -0
  75. package/dist/SpacerWidget-Bgz6701y.cjs +60 -0
  76. package/dist/SpacerWidget-Bgz6701y.cjs.map +1 -0
  77. package/dist/SpacerWidget-DHGoW6eu.mjs +43 -0
  78. package/dist/SpacerWidget-DHGoW6eu.mjs.map +1 -0
  79. package/dist/TableWidget--yLJTqoW.mjs +438 -0
  80. package/dist/TableWidget--yLJTqoW.mjs.map +1 -0
  81. package/dist/TableWidget-TfQfFHft.cjs +455 -0
  82. package/dist/TableWidget-TfQfFHft.cjs.map +1 -0
  83. package/dist/TextWidget-CL2H3vei.mjs +129 -0
  84. package/dist/TextWidget-CL2H3vei.mjs.map +1 -0
  85. package/dist/TextWidget-D6Ug_2Z1.cjs +146 -0
  86. package/dist/TextWidget-D6Ug_2Z1.cjs.map +1 -0
  87. package/dist/ToDoWidget-D8YIsl7y.mjs +274 -0
  88. package/dist/ToDoWidget-D8YIsl7y.mjs.map +1 -0
  89. package/dist/ToDoWidget-Dvs0GDkx.cjs +291 -0
  90. package/dist/ToDoWidget-Dvs0GDkx.cjs.map +1 -0
  91. package/dist/VideoWidget-D6C_jHOF.mjs +192 -0
  92. package/dist/VideoWidget-D6C_jHOF.mjs.map +1 -0
  93. package/dist/VideoWidget-SODAPZO4.cjs +209 -0
  94. package/dist/VideoWidget-SODAPZO4.cjs.map +1 -0
  95. package/dist/chunk-CZWwpsFl.cjs +43 -0
  96. package/dist/components/index.cjs +14 -0
  97. package/dist/components/index.cjs.map +1 -0
  98. package/dist/components/index.d.cts +11 -0
  99. package/dist/components/index.d.cts.map +1 -0
  100. package/dist/components/index.d.mts +11 -0
  101. package/dist/components/index.d.mts.map +1 -0
  102. package/dist/components/index.mjs +11 -0
  103. package/dist/components/index.mjs.map +1 -0
  104. package/dist/contexts/index.cjs +8 -0
  105. package/dist/contexts/index.d.cts +77 -0
  106. package/dist/contexts/index.d.cts.map +1 -0
  107. package/dist/contexts/index.d.mts +77 -0
  108. package/dist/contexts/index.d.mts.map +1 -0
  109. package/dist/contexts/index.mjs +3 -0
  110. package/dist/core/index.cjs +51 -0
  111. package/dist/core/index.d.cts +77 -0
  112. package/dist/core/index.d.cts.map +1 -0
  113. package/dist/core/index.d.mts +77 -0
  114. package/dist/core/index.d.mts.map +1 -0
  115. package/dist/core/index.mjs +4 -0
  116. package/dist/error-state-DErSxZwH.mjs +18 -0
  117. package/dist/error-state-DErSxZwH.mjs.map +1 -0
  118. package/dist/error-state-DSzVUtEl.cjs +24 -0
  119. package/dist/error-state-DSzVUtEl.cjs.map +1 -0
  120. package/dist/fields-4FC6JUNH.d.mts +2 -0
  121. package/dist/fields-DjLFJmz6.d.cts +2 -0
  122. package/dist/fields-wPOk-SmZ.mjs +2 -0
  123. package/dist/rolldown-runtime-wcPFST8Q.mjs +13 -0
  124. package/dist/scroll-arrows-BZIlsE_x.cjs +35 -0
  125. package/dist/scroll-arrows-BZIlsE_x.cjs.map +1 -0
  126. package/dist/scroll-arrows-BevCYRNT.mjs +29 -0
  127. package/dist/scroll-arrows-BevCYRNT.mjs.map +1 -0
  128. package/dist/ui/index.cjs +101 -0
  129. package/dist/ui/index.d.cts +15 -0
  130. package/dist/ui/index.d.cts.map +1 -0
  131. package/dist/ui/index.d.mts +15 -0
  132. package/dist/ui/index.d.mts.map +1 -0
  133. package/dist/ui/index.mjs +3 -0
  134. package/dist/widgets/index.cjs +92 -0
  135. package/dist/widgets/index.cjs.map +1 -0
  136. package/dist/widgets/index.d.cts +689 -0
  137. package/dist/widgets/index.d.cts.map +1 -0
  138. package/dist/widgets/index.d.mts +689 -0
  139. package/dist/widgets/index.d.mts.map +1 -0
  140. package/dist/widgets/index.mjs +46 -0
  141. package/dist/widgets/index.mjs.map +1 -0
  142. package/package.json +104 -0
  143. package/src/styles/globals.css +23 -0
  144. package/src/styles/index.ts +1 -0
  145. package/tailwind.config.ts +61 -0
@@ -0,0 +1,146 @@
1
+ const require_chunk = require("./chunk-CZWwpsFl.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ let _fluid_app_portal_core_registries = require("@fluid-app/portal-core/registries");
4
+ //#region src/widgets/TextWidget.tsx
5
+ var TextWidget_exports = /* @__PURE__ */ require_chunk.__exportAll({
6
+ TextWidget: () => TextWidget,
7
+ textWidgetPropertySchema: () => textWidgetPropertySchema
8
+ });
9
+ function TextWidget({ titleEnabled = true, title = "Text Widget", titleFontSize = "xl", titleColor = "foreground", description = "This is a text widget", descriptionFontSize = "md", descriptionColor = "foreground", background = {
10
+ type: "solid",
11
+ color: "background"
12
+ }, padding = 4, borderRadius = "md", className, ...props }) {
13
+ const backgroundColor = background.color || "background";
14
+ const backgroundImage = (background.resource?.image_url || background.resource?.imageUrl) && background.type === "image" ? `url(${background.resource.image_url || background.resource.imageUrl})` : "none";
15
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
16
+ className: `bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${className ?? ""}`,
17
+ style: { backgroundImage },
18
+ ...props,
19
+ children: [titleEnabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
20
+ className: `text-${titleFontSize} text-${titleColor} font-bold`,
21
+ children: title
22
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
23
+ className: `text-${descriptionFontSize} text-${descriptionColor}`,
24
+ children: description
25
+ })]
26
+ });
27
+ }
28
+ const textWidgetPropertySchema = {
29
+ widgetType: "TextWidget",
30
+ displayName: "Text Widget",
31
+ tabsConfig: [{
32
+ id: "content",
33
+ label: "Content"
34
+ }],
35
+ dataSourceTargetProps: ["title", "description"],
36
+ fields: [
37
+ {
38
+ key: "titleEnabled",
39
+ label: "Widget Title",
40
+ type: "boolean",
41
+ description: "Enable the title displayed above the text",
42
+ defaultValue: true,
43
+ tab: "content",
44
+ group: "Title"
45
+ },
46
+ {
47
+ key: "title",
48
+ label: "Title",
49
+ type: "text",
50
+ description: "The title",
51
+ defaultValue: "Heads up!",
52
+ tab: "content",
53
+ group: "Title",
54
+ requiresKeyToBeTrue: "titleEnabled"
55
+ },
56
+ (0, _fluid_app_portal_core_registries.getFontSizeField)({
57
+ key: "titleFontSize",
58
+ label: "Title Font Size",
59
+ description: "Font size for the title",
60
+ defaultValue: "xl",
61
+ tab: "content",
62
+ group: "Title",
63
+ requiresKeyToBeTrue: "titleEnabled"
64
+ }),
65
+ (0, _fluid_app_portal_core_registries.getColorField)({
66
+ key: "titleColor",
67
+ label: "Title Color",
68
+ description: "The color of the title",
69
+ defaultValue: "foreground",
70
+ tab: "content",
71
+ group: "Title",
72
+ requiresKeyToBeTrue: "titleEnabled"
73
+ }),
74
+ {
75
+ key: "description",
76
+ label: "Description",
77
+ type: "textarea",
78
+ description: "The text message",
79
+ rows: 3,
80
+ defaultValue: "You can add components and dependencies to your app using the cli.",
81
+ tab: "content",
82
+ group: "Description"
83
+ },
84
+ (0, _fluid_app_portal_core_registries.getFontSizeField)({
85
+ key: "descriptionFontSize",
86
+ label: "Description Font Size",
87
+ description: "Font size for the text",
88
+ defaultValue: "md",
89
+ tab: "content",
90
+ group: "Description"
91
+ }),
92
+ (0, _fluid_app_portal_core_registries.getColorField)({
93
+ key: "descriptionColor",
94
+ label: "Description Color",
95
+ description: "The color of the text",
96
+ defaultValue: "foreground",
97
+ tab: "content",
98
+ group: "Description"
99
+ }),
100
+ {
101
+ type: "background",
102
+ key: "background",
103
+ label: "Background",
104
+ description: "Background for the text container",
105
+ defaultValue: "background",
106
+ tab: "content",
107
+ group: "Style"
108
+ },
109
+ (0, _fluid_app_portal_core_registries.getPaddingField)({
110
+ key: "padding",
111
+ label: "Padding",
112
+ description: "The padding of the text container",
113
+ defaultValue: 4,
114
+ tab: "content",
115
+ group: "Style"
116
+ }),
117
+ (0, _fluid_app_portal_core_registries.getBorderRadiusField)({
118
+ key: "borderRadius",
119
+ description: "The border radius of the text container",
120
+ label: "Border Radius",
121
+ tab: "content",
122
+ group: "Style"
123
+ })
124
+ ]
125
+ };
126
+ //#endregion
127
+ Object.defineProperty(exports, "TextWidget", {
128
+ enumerable: true,
129
+ get: function() {
130
+ return TextWidget;
131
+ }
132
+ });
133
+ Object.defineProperty(exports, "TextWidget_exports", {
134
+ enumerable: true,
135
+ get: function() {
136
+ return TextWidget_exports;
137
+ }
138
+ });
139
+ Object.defineProperty(exports, "textWidgetPropertySchema", {
140
+ enumerable: true,
141
+ get: function() {
142
+ return textWidgetPropertySchema;
143
+ }
144
+ });
145
+
146
+ //# sourceMappingURL=TextWidget-D6Ug_2Z1.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextWidget-D6Ug_2Z1.cjs","names":[],"sources":["../src/widgets/TextWidget.tsx"],"sourcesContent":["import type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport {\n getBorderRadiusField,\n getColorField,\n getFontSizeField,\n getPaddingField,\n} from \"../core/fields\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n FontSizeOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\n\ntype TextWidgetProps = ComponentProps<\"div\"> & {\n // Title\n titleEnabled?: boolean;\n title?: string;\n titleFontSize?: FontSizeOptions;\n titleColor?: ColorOptions;\n\n // Description\n description?: string;\n descriptionFontSize?: FontSizeOptions;\n descriptionColor?: ColorOptions;\n\n // Styling\n background?: BackgroundValue;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n};\n\nexport function TextWidget({\n titleEnabled = true,\n title = \"Text Widget\",\n titleFontSize = \"xl\",\n titleColor = \"foreground\",\n description = \"This is a text widget\",\n descriptionFontSize = \"md\",\n descriptionColor = \"foreground\",\n background = {\n type: \"solid\",\n color: \"background\",\n },\n padding = 4,\n borderRadius = \"md\",\n className,\n ...props\n}: TextWidgetProps): React.JSX.Element {\n const backgroundColor = background.color || \"background\";\n const backgroundImage =\n (background.resource?.image_url || background.resource?.imageUrl) &&\n background.type === \"image\"\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n return (\n <div\n className={`bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${className ?? \"\"}`}\n style={{ backgroundImage }}\n {...props}\n >\n {titleEnabled && (\n <h2 className={`text-${titleFontSize} text-${titleColor} font-bold`}>\n {title}\n </h2>\n )}\n <p className={`text-${descriptionFontSize} text-${descriptionColor}`}>\n {description}\n </p>\n </div>\n );\n}\n\nexport const textWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"TextWidget\",\n displayName: \"Text Widget\",\n tabsConfig: [{ id: \"content\", label: \"Content\" }],\n dataSourceTargetProps: [\"title\", \"description\"],\n fields: [\n // Content Tab - Title Group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the title displayed above the text\",\n defaultValue: true,\n tab: \"content\",\n group: \"Title\",\n },\n {\n key: \"title\",\n label: \"Title\",\n type: \"text\",\n description: \"The title\",\n defaultValue: \"Heads up!\",\n tab: \"content\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleFontSize\",\n label: \"Title Font Size\",\n description: \"Font size for the title\",\n defaultValue: \"xl\",\n tab: \"content\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"The color of the title\",\n defaultValue: \"foreground\",\n tab: \"content\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n // Content Tab - Description Group\n {\n key: \"description\",\n label: \"Description\",\n type: \"textarea\",\n description: \"The text message\",\n rows: 3,\n defaultValue:\n \"You can add components and dependencies to your app using the cli.\",\n tab: \"content\",\n group: \"Description\",\n },\n getFontSizeField({\n key: \"descriptionFontSize\",\n label: \"Description Font Size\",\n description: \"Font size for the text\",\n defaultValue: \"md\",\n tab: \"content\",\n group: \"Description\",\n }),\n getColorField({\n key: \"descriptionColor\",\n label: \"Description Color\",\n description: \"The color of the text\",\n defaultValue: \"foreground\",\n tab: \"content\",\n group: \"Description\",\n }),\n // Content Tab - Style Group\n {\n type: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background for the text container\",\n defaultValue: \"background\",\n tab: \"content\",\n group: \"Style\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"The padding of the text container\",\n defaultValue: 4,\n tab: \"content\",\n group: \"Style\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n description: \"The border radius of the text container\",\n label: \"Border Radius\",\n tab: \"content\",\n group: \"Style\",\n }),\n ],\n};\n"],"mappings":";;;;;;;;AAmCA,SAAgB,WAAW,EACzB,eAAe,MACf,QAAQ,eACR,gBAAgB,MAChB,aAAa,cACb,cAAc,yBACd,sBAAsB,MACtB,mBAAmB,cACnB,aAAa;CACX,MAAM;CAC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;GACd,KAAK;GACL,OAAO;GACR,CAAC;uDACY;GACZ,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;EAEF;GACE,MAAM;GACN,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR;yDACe;GACd,KAAK;GACL,OAAO;GACP,aAAa;GACb,cAAc;GACd,KAAK;GACL,OAAO;GACR,CAAC;8DACmB;GACnB,KAAK;GACL,aAAa;GACb,OAAO;GACP,KAAK;GACL,OAAO;GACR,CAAC;EACH;CACF"}
@@ -0,0 +1,274 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-wcPFST8Q.mjs";
2
+ import { a as getFontSizeField, c as getPaddingField, i as getColorField, n as getBorderRadiusField } from "./fields-wPOk-SmZ.mjs";
3
+ import { t as ErrorState } from "./error-state-DErSxZwH.mjs";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ import { useQuery } from "@tanstack/react-query";
6
+ import { useDataSourceConfig } from "@fluid-app/portal-core/data-sources/context";
7
+ import { useWidgetPreviewContext } from "@fluid-app/portal-core/data-sources/preview-context";
8
+ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
9
+ import { faListCheck, faPlus } from "@fortawesome/pro-regular-svg-icons";
10
+ //#region src/hooks/use-todos.preview.ts
11
+ const now = /* @__PURE__ */ new Date();
12
+ function daysFromNow(days) {
13
+ const d = new Date(now);
14
+ d.setDate(d.getDate() + days);
15
+ return d.toISOString();
16
+ }
17
+ const PREVIEW_DATA = [
18
+ {
19
+ id: 1,
20
+ body: "Send follow-up email to new leads",
21
+ dueAt: daysFromNow(1),
22
+ completedAt: null,
23
+ createdAt: daysFromNow(-2),
24
+ contactName: "Sarah Johnson"
25
+ },
26
+ {
27
+ id: 2,
28
+ body: "Prepare slides for team training",
29
+ dueAt: daysFromNow(3),
30
+ completedAt: null,
31
+ createdAt: daysFromNow(-1),
32
+ contactName: null
33
+ },
34
+ {
35
+ id: 3,
36
+ body: "Review monthly sales report",
37
+ dueAt: daysFromNow(-1),
38
+ completedAt: null,
39
+ createdAt: daysFromNow(-5),
40
+ contactName: "Mike Chen"
41
+ }
42
+ ];
43
+ //#endregion
44
+ //#region src/hooks/use-todos.ts
45
+ function useTodos() {
46
+ const { baseUrl, getApiHeaders } = useDataSourceConfig();
47
+ const { isPreview } = useWidgetPreviewContext();
48
+ return useQuery({
49
+ queryKey: [
50
+ "portal-widget-use",
51
+ "todos",
52
+ isPreview ? "preview" : baseUrl
53
+ ],
54
+ queryFn: async ({ signal }) => {
55
+ const url = baseUrl ? `${baseUrl}/tasks` : "/tasks";
56
+ const response = await fetch(url, {
57
+ headers: {
58
+ "content-type": "application/json",
59
+ ...getApiHeaders?.()
60
+ },
61
+ signal
62
+ });
63
+ if (!response.ok) throw new Error(`Failed to fetch todos: ${response.status}`);
64
+ return transformTodos(await response.json());
65
+ },
66
+ enabled: !isPreview,
67
+ ...isPreview && { placeholderData: PREVIEW_DATA }
68
+ });
69
+ }
70
+ function transformTodos(rawData) {
71
+ return rawData.map((todo) => ({
72
+ id: todo.id,
73
+ body: todo.body,
74
+ dueAt: todo.due_at,
75
+ completedAt: todo.completed_at,
76
+ createdAt: todo.created_at,
77
+ contactName: todo.contact ? `${todo.contact.first_name} ${todo.contact.last_name}` : null
78
+ }));
79
+ }
80
+ //#endregion
81
+ //#region src/widgets/ToDoWidget.tsx
82
+ var ToDoWidget_exports = /* @__PURE__ */ __exportAll({
83
+ ToDoWidget: () => ToDoWidget,
84
+ toDoWidgetPropertySchema: () => toDoWidgetPropertySchema
85
+ });
86
+ function ToDoWidget({ titleEnabled = true, titleText = "To-Do", titleFontSize = "lg", titleColor = "foreground", background = {
87
+ type: "solid",
88
+ color: "background"
89
+ }, textColor = "foreground", accentColor = "primary", padding = 4, borderRadius = "md", maxItems = 5, className, ...props }) {
90
+ const backgroundColor = background.color || "background";
91
+ const backgroundImage = (background.resource?.image_url || background.resource?.imageUrl) && background.type === "image" ? `url(${background.resource.image_url || background.resource.imageUrl})` : "none";
92
+ const { data: todos = [], isLoading, isError } = useTodos();
93
+ const activeTodos = (todos.length > 0 ? todos : []).filter((todo) => !todo.completedAt);
94
+ const todosToShow = activeTodos.slice(0, maxItems);
95
+ const remainingCount = activeTodos.length - todosToShow.length;
96
+ const isEmpty = activeTodos.length === 0;
97
+ return /* @__PURE__ */ jsxs("div", {
98
+ className: `overflow-hidden rounded-${borderRadius} bg-${backgroundColor} text-${textColor} p-${padding} ${className ?? ""}`,
99
+ style: { backgroundImage },
100
+ ...props,
101
+ children: [/* @__PURE__ */ jsxs("div", {
102
+ className: "mb-3 flex items-center justify-between",
103
+ children: [/* @__PURE__ */ jsx("div", {
104
+ className: "flex items-center gap-3",
105
+ children: titleEnabled && titleText && /* @__PURE__ */ jsx("h2", {
106
+ className: `text-${titleFontSize} font-bold text-${titleColor}`,
107
+ children: titleText
108
+ })
109
+ }), /* @__PURE__ */ jsxs("div", {
110
+ className: "flex items-center gap-2",
111
+ children: [!isEmpty && !isLoading && /* @__PURE__ */ jsx("span", {
112
+ className: `text-2xl font-bold text-${accentColor}`,
113
+ children: activeTodos.length
114
+ }), /* @__PURE__ */ jsx("div", {
115
+ className: `flex h-10 w-10 shrink-0 items-center justify-center`,
116
+ children: /* @__PURE__ */ jsx(FontAwesomeIcon, {
117
+ icon: faListCheck,
118
+ className: `h-5 w-5 text-${accentColor}-foreground`
119
+ })
120
+ })]
121
+ })]
122
+ }), isLoading ? /* @__PURE__ */ jsx("div", {
123
+ className: "flex min-h-[120px] items-center justify-center",
124
+ children: /* @__PURE__ */ jsx("div", { className: "h-6 w-6 animate-spin rounded-full border-2 border-current border-t-transparent" })
125
+ }) : isError ? /* @__PURE__ */ jsx(ErrorState, {}) : isEmpty ? /* @__PURE__ */ jsx("div", {
126
+ className: "flex flex-col items-center justify-center py-8",
127
+ children: /* @__PURE__ */ jsx("p", {
128
+ className: `text-center text-${textColor}/60`,
129
+ children: "You've got nothing else To-Do!"
130
+ })
131
+ }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
132
+ className: "flex flex-col",
133
+ children: todosToShow.map((todo, index) => /* @__PURE__ */ jsxs("div", {
134
+ className: `flex items-center gap-3 py-2.5 ${index !== todosToShow.length - 1 ? `border-b border-${textColor}/10` : ""}`,
135
+ children: [/* @__PURE__ */ jsx("input", {
136
+ type: "checkbox",
137
+ className: `h-5 w-5 rounded-full border-2 border-${textColor}/30 bg-transparent`,
138
+ checked: !!todo.completedAt,
139
+ readOnly: true
140
+ }), /* @__PURE__ */ jsx("span", {
141
+ className: "line-clamp-1 flex-1 text-sm",
142
+ children: todo.body
143
+ })]
144
+ }, todo.id))
145
+ }), /* @__PURE__ */ jsxs("div", {
146
+ className: "mt-2 flex items-center justify-between",
147
+ children: [remainingCount > 0 && /* @__PURE__ */ jsxs("span", {
148
+ className: `text-sm text-${textColor}/50 underline`,
149
+ children: [
150
+ remainingCount,
151
+ " more task",
152
+ remainingCount > 1 ? "s" : ""
153
+ ]
154
+ }), /* @__PURE__ */ jsx("div", {
155
+ className: "ml-auto",
156
+ children: /* @__PURE__ */ jsx(FontAwesomeIcon, {
157
+ icon: faPlus,
158
+ className: `h-5 w-5 text-${textColor}/50`
159
+ })
160
+ })]
161
+ })] })]
162
+ });
163
+ }
164
+ const toDoWidgetPropertySchema = {
165
+ widgetType: "ToDoWidget",
166
+ displayName: "To-Do Widget",
167
+ tabsConfig: [{
168
+ id: "styling",
169
+ label: "Styling"
170
+ }],
171
+ fields: [
172
+ {
173
+ key: "titleEnabled",
174
+ label: "Widget Title",
175
+ type: "boolean",
176
+ description: "Enable the title displayed above the todo list",
177
+ defaultValue: true,
178
+ tab: "styling",
179
+ group: "Title"
180
+ },
181
+ {
182
+ key: "titleText",
183
+ label: "Title",
184
+ type: "text",
185
+ description: "Title text displayed above the todo list",
186
+ defaultValue: "To-Do",
187
+ tab: "styling",
188
+ group: "Title",
189
+ requiresKeyToBeTrue: "titleEnabled"
190
+ },
191
+ getFontSizeField({
192
+ key: "titleFontSize",
193
+ label: "Title Font Size",
194
+ description: "Font size for the widget title",
195
+ defaultValue: "xl",
196
+ tab: "styling",
197
+ group: "Title",
198
+ requiresKeyToBeTrue: "titleEnabled"
199
+ }),
200
+ getColorField({
201
+ key: "titleColor",
202
+ label: "Title Color",
203
+ description: "Color for the widget title",
204
+ defaultValue: "foreground",
205
+ tab: "styling",
206
+ group: "Title",
207
+ requiresKeyToBeTrue: "titleEnabled"
208
+ }),
209
+ {
210
+ type: "background",
211
+ key: "background",
212
+ label: "Background",
213
+ description: "Background for the widget container",
214
+ defaultValue: "background",
215
+ tab: "styling",
216
+ group: "Design"
217
+ },
218
+ getColorField({
219
+ key: "textColor",
220
+ label: "Text Color",
221
+ description: "Default text color for todo items",
222
+ defaultValue: "foreground",
223
+ tab: "styling",
224
+ group: "Design"
225
+ }),
226
+ getColorField({
227
+ key: "accentColor",
228
+ label: "Accent Color",
229
+ description: "Color used for count badge and icon",
230
+ defaultValue: "primary",
231
+ tab: "styling",
232
+ group: "Design"
233
+ }),
234
+ {
235
+ key: "separator",
236
+ type: "separator",
237
+ label: "Separator",
238
+ tab: "styling",
239
+ group: "Design"
240
+ },
241
+ {
242
+ key: "maxItems",
243
+ label: "Max Items",
244
+ type: "number",
245
+ description: "Maximum number of todo items to display",
246
+ min: 1,
247
+ max: 20,
248
+ step: 1,
249
+ defaultValue: 5,
250
+ tab: "styling",
251
+ group: "Design"
252
+ },
253
+ getPaddingField({
254
+ key: "padding",
255
+ label: "Padding",
256
+ description: "Padding around the widget container",
257
+ defaultValue: 4,
258
+ tab: "styling",
259
+ group: "Design"
260
+ }),
261
+ getBorderRadiusField({
262
+ key: "borderRadius",
263
+ label: "Border Radius",
264
+ description: "Border radius for the widget container",
265
+ defaultValue: "md",
266
+ tab: "styling",
267
+ group: "Design"
268
+ })
269
+ ]
270
+ };
271
+ //#endregion
272
+ export { ToDoWidget_exports as n, toDoWidgetPropertySchema as r, ToDoWidget as t };
273
+
274
+ //# sourceMappingURL=ToDoWidget-D8YIsl7y.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToDoWidget-D8YIsl7y.mjs","names":[],"sources":["../src/hooks/use-todos.preview.ts","../src/hooks/use-todos.ts","../src/widgets/ToDoWidget.tsx"],"sourcesContent":["import type { Todo } from \"./use-todos.types\";\n\nconst now = new Date();\n\nfunction daysFromNow(days: number): string {\n const d = new Date(now);\n d.setDate(d.getDate() + days);\n return d.toISOString();\n}\n\nexport const PREVIEW_DATA: Todo[] = [\n {\n id: 1,\n body: \"Send follow-up email to new leads\",\n dueAt: daysFromNow(1),\n completedAt: null,\n createdAt: daysFromNow(-2),\n contactName: \"Sarah Johnson\",\n },\n {\n id: 2,\n body: \"Prepare slides for team training\",\n dueAt: daysFromNow(3),\n completedAt: null,\n createdAt: daysFromNow(-1),\n contactName: null,\n },\n {\n id: 3,\n body: \"Review monthly sales report\",\n dueAt: daysFromNow(-1),\n completedAt: null,\n createdAt: daysFromNow(-5),\n contactName: \"Mike Chen\",\n },\n];\n","import { useQuery, type UseQueryResult } from \"@tanstack/react-query\";\nimport { useDataSourceConfig } from \"@fluid-app/portal-core/data-sources/context\";\nimport { useWidgetPreviewContext } from \"@fluid-app/portal-core/data-sources/preview-context\";\nimport { PREVIEW_DATA } from \"./use-todos.preview\";\nimport type { ApiTodo, Todo } from \"./use-todos.types\";\n\nexport type { TodoContact, ApiTodo, Todo } from \"./use-todos.types\";\n\nexport function useTodos(): UseQueryResult<Todo[], Error> {\n const { baseUrl, getApiHeaders } = useDataSourceConfig();\n const { isPreview } = useWidgetPreviewContext();\n\n return useQuery({\n queryKey: [\n \"portal-widget-use\",\n \"todos\",\n isPreview ? \"preview\" : baseUrl,\n ] as const,\n queryFn: async ({ signal }): Promise<Todo[]> => {\n const url = baseUrl ? `${baseUrl}/tasks` : \"/tasks\";\n const response = await fetch(url, {\n headers: {\n \"content-type\": \"application/json\",\n ...getApiHeaders?.(),\n },\n signal,\n });\n\n if (!response.ok) {\n throw new Error(`Failed to fetch todos: ${response.status}`);\n }\n\n const data: ApiTodo[] = await response.json();\n return transformTodos(data);\n },\n enabled: !isPreview,\n ...(isPreview && { placeholderData: PREVIEW_DATA }),\n });\n}\n\nfunction transformTodos(rawData: ApiTodo[]): Todo[] {\n return rawData.map((todo) => ({\n id: todo.id,\n body: todo.body,\n dueAt: todo.due_at,\n completedAt: todo.completed_at,\n createdAt: todo.created_at,\n contactName: todo.contact\n ? `${todo.contact.first_name} ${todo.contact.last_name}`\n : null,\n }));\n}\n","import type { ComponentProps } from \"react\";\nimport type React from \"react\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n FontSizeOptions,\n PaddingOptions,\n} from \"@fluid-app/portal-core/types\";\nimport type { WidgetPropertySchema } from \"@fluid-app/portal-core/registries\";\nimport {\n getBorderRadiusField,\n getColorField,\n getFontSizeField,\n getPaddingField,\n} from \"../core/fields\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport { faListCheck, faPlus } from \"@fortawesome/pro-regular-svg-icons\";\nimport { useTodos } from \"../hooks/use-todos\";\nimport { ErrorState } from \"../components/error-state\";\n\ntype ToDoWidgetProps = ComponentProps<\"div\"> & {\n // Title\n titleEnabled?: boolean;\n titleText?: string;\n titleFontSize?: FontSizeOptions;\n titleColor?: ColorOptions;\n\n // Styling\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n\n // Content\n maxItems?: number;\n};\n\nexport function ToDoWidget({\n // Title defaults\n titleEnabled = true,\n titleText = \"To-Do\",\n titleFontSize = \"lg\",\n titleColor = \"foreground\",\n\n // Styling defaults\n background = {\n type: \"solid\",\n color: \"background\",\n },\n textColor = \"foreground\",\n accentColor = \"primary\",\n padding = 4,\n borderRadius = \"md\",\n\n // Content defaults\n maxItems = 5,\n\n className,\n ...props\n}: ToDoWidgetProps): React.JSX.Element {\n const backgroundColor = background.color || \"background\";\n const backgroundImage =\n (background.resource?.image_url || background.resource?.imageUrl) &&\n background.type === \"image\"\n ? `url(${background.resource.image_url || background.resource.imageUrl})`\n : \"none\";\n const { data: todos = [], isLoading, isError } = useTodos();\n\n // Use API data if available, otherwise fall back to demo data\n const displayTodos = todos.length > 0 ? todos : [];\n\n // Filter out completed tasks\n const activeTodos = displayTodos.filter((todo) => !todo.completedAt);\n const todosToShow = activeTodos.slice(0, maxItems);\n const remainingCount = activeTodos.length - todosToShow.length;\n const isEmpty = activeTodos.length === 0;\n\n return (\n <div\n className={`overflow-hidden rounded-${borderRadius} bg-${backgroundColor} text-${textColor} p-${padding} ${className ?? \"\"}`}\n style={{ backgroundImage }}\n {...props}\n >\n {/* Header */}\n <div className=\"mb-3 flex items-center justify-between\">\n <div className=\"flex items-center gap-3\">\n {titleEnabled && titleText && (\n <h2\n className={`text-${titleFontSize} font-bold text-${titleColor}`}\n >\n {titleText}\n </h2>\n )}\n </div>\n <div className=\"flex items-center gap-2\">\n {!isEmpty && !isLoading && (\n <span className={`text-2xl font-bold text-${accentColor}`}>\n {activeTodos.length}\n </span>\n )}\n <div\n className={`flex h-10 w-10 shrink-0 items-center justify-center`}\n >\n <FontAwesomeIcon\n icon={faListCheck}\n className={`h-5 w-5 text-${accentColor}-foreground`}\n />\n </div>\n </div>\n </div>\n\n {/* Loading state */}\n {isLoading ? (\n <div className=\"flex min-h-[120px] items-center justify-center\">\n <div className=\"h-6 w-6 animate-spin rounded-full border-2 border-current border-t-transparent\" />\n </div>\n ) : isError ? (\n /* Error state */\n <ErrorState />\n ) : isEmpty ? (\n /* Empty state */\n <div className=\"flex flex-col items-center justify-center py-8\">\n <p className={`text-center text-${textColor}/60`}>\n You&apos;ve got nothing else To-Do!\n </p>\n </div>\n ) : (\n /* Todo List */\n <>\n <div className=\"flex flex-col\">\n {todosToShow.map((todo, index) => (\n <div\n key={todo.id}\n className={`flex items-center gap-3 py-2.5 ${\n index !== todosToShow.length - 1\n ? `border-b border-${textColor}/10`\n : \"\"\n }`}\n >\n <input\n type=\"checkbox\"\n className={`h-5 w-5 rounded-full border-2 border-${textColor}/30 bg-transparent`}\n checked={!!todo.completedAt}\n readOnly\n />\n <span className=\"line-clamp-1 flex-1 text-sm\">{todo.body}</span>\n </div>\n ))}\n </div>\n\n {/* Footer */}\n <div className=\"mt-2 flex items-center justify-between\">\n {remainingCount > 0 && (\n <span className={`text-sm text-${textColor}/50 underline`}>\n {remainingCount} more task{remainingCount > 1 ? \"s\" : \"\"}\n </span>\n )}\n <div className=\"ml-auto\">\n <FontAwesomeIcon\n icon={faPlus}\n className={`h-5 w-5 text-${textColor}/50`}\n />\n </div>\n </div>\n </>\n )}\n </div>\n );\n}\n\nexport const toDoWidgetPropertySchema: WidgetPropertySchema = {\n widgetType: \"ToDoWidget\",\n displayName: \"To-Do Widget\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [\n // Styling Tab - Title Group\n {\n key: \"titleEnabled\",\n label: \"Widget Title\",\n type: \"boolean\",\n description: \"Enable the title displayed above the todo list\",\n defaultValue: true,\n tab: \"styling\",\n group: \"Title\",\n },\n {\n key: \"titleText\",\n label: \"Title\",\n type: \"text\",\n description: \"Title text displayed above the todo list\",\n defaultValue: \"To-Do\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n },\n getFontSizeField({\n key: \"titleFontSize\",\n label: \"Title Font Size\",\n description: \"Font size for the widget title\",\n defaultValue: \"xl\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n getColorField({\n key: \"titleColor\",\n label: \"Title Color\",\n description: \"Color for the widget title\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Title\",\n requiresKeyToBeTrue: \"titleEnabled\",\n }),\n\n // Styling Tab - Design Group\n {\n type: \"background\",\n key: \"background\",\n label: \"Background\",\n description: \"Background for the widget container\",\n defaultValue: \"background\",\n tab: \"styling\",\n group: \"Design\",\n },\n getColorField({\n key: \"textColor\",\n label: \"Text Color\",\n description: \"Default text color for todo items\",\n defaultValue: \"foreground\",\n tab: \"styling\",\n group: \"Design\",\n }),\n getColorField({\n key: \"accentColor\",\n label: \"Accent Color\",\n description: \"Color used for count badge and icon\",\n defaultValue: \"primary\",\n tab: \"styling\",\n group: \"Design\",\n }),\n {\n key: \"separator\",\n type: \"separator\",\n label: \"Separator\",\n tab: \"styling\",\n group: \"Design\",\n },\n {\n key: \"maxItems\",\n label: \"Max Items\",\n type: \"number\",\n description: \"Maximum number of todo items to display\",\n min: 1,\n max: 20,\n step: 1,\n defaultValue: 5,\n tab: \"styling\",\n group: \"Design\",\n },\n getPaddingField({\n key: \"padding\",\n label: \"Padding\",\n description: \"Padding around the widget container\",\n defaultValue: 4,\n tab: \"styling\",\n group: \"Design\",\n }),\n getBorderRadiusField({\n key: \"borderRadius\",\n label: \"Border Radius\",\n description: \"Border radius for the widget container\",\n defaultValue: \"md\",\n tab: \"styling\",\n group: \"Design\",\n }),\n ],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;;AAEA,MAAM,sBAAM,IAAI,MAAM;AAEtB,SAAS,YAAY,MAAsB;CACzC,MAAM,IAAI,IAAI,KAAK,IAAI;AACvB,GAAE,QAAQ,EAAE,SAAS,GAAG,KAAK;AAC7B,QAAO,EAAE,aAAa;;AAGxB,MAAa,eAAuB;CAClC;EACE,IAAI;EACJ,MAAM;EACN,OAAO,YAAY,EAAE;EACrB,aAAa;EACb,WAAW,YAAY,GAAG;EAC1B,aAAa;EACd;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO,YAAY,EAAE;EACrB,aAAa;EACb,WAAW,YAAY,GAAG;EAC1B,aAAa;EACd;CACD;EACE,IAAI;EACJ,MAAM;EACN,OAAO,YAAY,GAAG;EACtB,aAAa;EACb,WAAW,YAAY,GAAG;EAC1B,aAAa;EACd;CACF;;;AC3BD,SAAgB,WA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