@plusscommunities/pluss-feature-builder-web-a 1.0.2-beta.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/.babelrc +4 -0
- package/dist/index.cjs.js +7792 -0
- package/package.json +54 -0
- package/rollup.config.js +68 -0
- package/src/actions/featureBuilderStringsActions.js +88 -0
- package/src/actions/featureDefinitionsIndex.js +258 -0
- package/src/actions/formActions.js +311 -0
- package/src/actions/index.js +12 -0
- package/src/actions/listingActions.js +350 -0
- package/src/actions/wizardActions.js +240 -0
- package/src/components/ActivityCardExample.jsx +86 -0
- package/src/components/ActivityCardExample.module.css +130 -0
- package/src/components/BackgroundLoader.jsx +33 -0
- package/src/components/BackgroundLoader.module.css +46 -0
- package/src/components/BaseFieldConfig.jsx +305 -0
- package/src/components/BaseFieldConfig.module.css +42 -0
- package/src/components/CenteredContainer.jsx +29 -0
- package/src/components/CenteredContainer.module.css +171 -0
- package/src/components/DeleteConfirmationPopup.jsx +95 -0
- package/src/components/DeleteConfirmationPopup.module.css +12 -0
- package/src/components/ErrorBoundary.jsx +134 -0
- package/src/components/ErrorBoundary.module.css +77 -0
- package/src/components/ErrorMessage.jsx +85 -0
- package/src/components/ErrorMessage.module.css +116 -0
- package/src/components/ExampleDisplay.jsx +26 -0
- package/src/components/ExampleDisplay.module.css +3 -0
- package/src/components/FeatureBuilderSidebar.jsx +84 -0
- package/src/components/FeatureBuilderSuccessPopup.jsx +55 -0
- package/src/components/FeatureBuilderSuccessPopup.module.css +43 -0
- package/src/components/FeatureBuilderWelcomePopup.jsx +51 -0
- package/src/components/FeatureBuilderWelcomePopup.module.css +21 -0
- package/src/components/FeatureListingCard.jsx +104 -0
- package/src/components/FeatureListingCard.module.css +62 -0
- package/src/components/Fields.jsx +460 -0
- package/src/components/Fields.module.css +159 -0
- package/src/components/IconLoader.jsx +153 -0
- package/src/components/IconLoader.module.css +92 -0
- package/src/components/IconSelector.jsx +112 -0
- package/src/components/IconSelector.module.css +197 -0
- package/src/components/ListingEditor.jsx +406 -0
- package/src/components/ListingEditor.module.css +14 -0
- package/src/components/ListingSuccessPopup.jsx +52 -0
- package/src/components/LoadingScreen.jsx +54 -0
- package/src/components/LoadingScreen.module.css +103 -0
- package/src/components/LoadingState.jsx +40 -0
- package/src/components/LoadingState.module.css +18 -0
- package/src/components/PreviewFull.js +24 -0
- package/src/components/PreviewFull.module.css +11 -0
- package/src/components/PreviewGrid.js +14 -0
- package/src/components/PreviewWidget.js +27 -0
- package/src/components/PreviewWidget.module.css +15 -0
- package/src/components/SidebarLayout.jsx +292 -0
- package/src/components/SidebarLayout.module.css +145 -0
- package/src/components/SkeletonLoader.jsx +128 -0
- package/src/components/SkeletonLoader.module.css +295 -0
- package/src/components/SortButtonGroup.jsx +34 -0
- package/src/components/SortButtonGroup.module.css +51 -0
- package/src/components/ToastContainer.jsx +98 -0
- package/src/components/ToastContainer.module.css +156 -0
- package/src/components/ToggleSwitch.js +40 -0
- package/src/components/ToggleSwitch.module.css +48 -0
- package/src/components/TwoColumnInput.jsx +29 -0
- package/src/components/TwoColumnInput.module.css +32 -0
- package/src/components/ViewFull.js +139 -0
- package/src/components/ViewFull.module.css +71 -0
- package/src/components/ViewWidget.js +62 -0
- package/src/components/ViewWidget.module.css +28 -0
- package/src/components/iconCategories.js +135 -0
- package/src/components/iconImports.js +409 -0
- package/src/components/index.js +61 -0
- package/src/components/listing/FileListItem.jsx +86 -0
- package/src/components/listing/GalleryDisplay.jsx +331 -0
- package/src/components/listing/GalleryDisplay.module.css +309 -0
- package/src/components/listing/ListingCTAInput.jsx +82 -0
- package/src/components/listing/ListingDescriptionInput.jsx +73 -0
- package/src/components/listing/ListingField.jsx +101 -0
- package/src/components/listing/ListingField.module.css +106 -0
- package/src/components/listing/ListingFileInput.jsx +255 -0
- package/src/components/listing/ListingFileInput.module.css +192 -0
- package/src/components/listing/ListingForm.jsx +90 -0
- package/src/components/listing/ListingForm.module.css +38 -0
- package/src/components/listing/ListingGalleryInput.jsx +236 -0
- package/src/components/listing/ListingGalleryInput.module.css +131 -0
- package/src/components/listing/ListingImageInput.jsx +153 -0
- package/src/components/listing/ListingTextInput.jsx +72 -0
- package/src/feature.config.js +130 -0
- package/src/helper/index.js +135 -0
- package/src/hooks/useFeatureDefinitionLoader.js +62 -0
- package/src/images/full.png +0 -0
- package/src/images/fullNoTitle.png +0 -0
- package/src/images/previewWidget.png +0 -0
- package/src/images/widget.png +0 -0
- package/src/index.js +38 -0
- package/src/pages/CreateListingPage.jsx +49 -0
- package/src/pages/EditListingPage.jsx +58 -0
- package/src/reducers/featureBuilderReducer.js +744 -0
- package/src/screens/CreateListing.module.css +45 -0
- package/src/screens/Form.module.css +734 -0
- package/src/screens/FormFieldsStep.jsx +689 -0
- package/src/screens/FormLayoutStep.jsx +445 -0
- package/src/screens/FormOverviewStep.jsx +396 -0
- package/src/screens/ListingScreen.jsx +478 -0
- package/src/screens/ListingScreen.module.css +333 -0
- package/src/selectors/featureBuilderSelectors.js +529 -0
- package/src/types/index.js +91 -0
- package/src/utils/textUtils.js +89 -0
- package/src/validators/galleryValidators.js +345 -0
- package/src/values.config.a.js +49 -0
- package/src/values.config.b.js +49 -0
- package/src/values.config.c.js +49 -0
- package/src/values.config.d.js +49 -0
- package/src/values.config.js +49 -0
- package/src/webapi/featureDefinitionActions.js +0 -0
- package/src/webapi/featuresActions.js +90 -0
- package/src/webapi/helper.js +4 -0
- package/src/webapi/index.js +12 -0
- package/src/webapi/listingActions.js +176 -0
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Shared icon imports module to eliminate duplication across components
|
|
3
|
+
* Consolidates all FontAwesome icon imports used in the feature builder
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// Static icon imports for retirement village community management
|
|
7
|
+
import {
|
|
8
|
+
// Community & Living
|
|
9
|
+
faHome,
|
|
10
|
+
faUsers,
|
|
11
|
+
faUser,
|
|
12
|
+
faHeart,
|
|
13
|
+
faStar,
|
|
14
|
+
faFlag,
|
|
15
|
+
faHandsHelping,
|
|
16
|
+
faHandshake,
|
|
17
|
+
faPeopleCarry,
|
|
18
|
+
faChild,
|
|
19
|
+
// Household & Comfort
|
|
20
|
+
faCouch,
|
|
21
|
+
faBed,
|
|
22
|
+
faTv,
|
|
23
|
+
faBath,
|
|
24
|
+
faShower,
|
|
25
|
+
faToilet,
|
|
26
|
+
faSink,
|
|
27
|
+
faChair,
|
|
28
|
+
faTable,
|
|
29
|
+
faFire,
|
|
30
|
+
faFan,
|
|
31
|
+
faTemperatureHigh,
|
|
32
|
+
// Health & Wellness
|
|
33
|
+
faShield,
|
|
34
|
+
faUserNurse,
|
|
35
|
+
faStethoscope,
|
|
36
|
+
faHeartPulse,
|
|
37
|
+
faWheelchair,
|
|
38
|
+
faCrutch,
|
|
39
|
+
faPrescriptionBottle,
|
|
40
|
+
faPills,
|
|
41
|
+
faSyringe,
|
|
42
|
+
faThermometer,
|
|
43
|
+
// Activities & Events
|
|
44
|
+
faCalendar,
|
|
45
|
+
faClock,
|
|
46
|
+
faBell,
|
|
47
|
+
faMusic,
|
|
48
|
+
faBook,
|
|
49
|
+
faImage,
|
|
50
|
+
faCamera,
|
|
51
|
+
faChess,
|
|
52
|
+
faDice,
|
|
53
|
+
faTheaterMasks,
|
|
54
|
+
faPalette,
|
|
55
|
+
faGraduationCap,
|
|
56
|
+
faTrophy,
|
|
57
|
+
// Sports & Recreation
|
|
58
|
+
faBasketballBall,
|
|
59
|
+
faFootballBall,
|
|
60
|
+
faVolleyballBall,
|
|
61
|
+
faTableTennis,
|
|
62
|
+
faBowlingBall,
|
|
63
|
+
faSwimmingPool,
|
|
64
|
+
faWalking,
|
|
65
|
+
faHiking,
|
|
66
|
+
faUmbrellaBeach,
|
|
67
|
+
// Dining & Food
|
|
68
|
+
faUtensils,
|
|
69
|
+
faCoffee,
|
|
70
|
+
faWineGlass,
|
|
71
|
+
faGlassWater,
|
|
72
|
+
faPizzaSlice,
|
|
73
|
+
faAppleAlt,
|
|
74
|
+
faCarrot,
|
|
75
|
+
faBreadSlice,
|
|
76
|
+
faIceCream,
|
|
77
|
+
faCocktail,
|
|
78
|
+
// Transportation
|
|
79
|
+
faCar,
|
|
80
|
+
faBus,
|
|
81
|
+
faTrain,
|
|
82
|
+
faBicycle,
|
|
83
|
+
faTruck,
|
|
84
|
+
// Files & Information
|
|
85
|
+
faFile,
|
|
86
|
+
faFileLines,
|
|
87
|
+
faFolder,
|
|
88
|
+
faBookOpen,
|
|
89
|
+
faClipboard,
|
|
90
|
+
faPaperclip,
|
|
91
|
+
// Communication
|
|
92
|
+
faPhone,
|
|
93
|
+
faEnvelope,
|
|
94
|
+
faMapMarkerAlt,
|
|
95
|
+
faLocationDot,
|
|
96
|
+
// Garden & Outdoor
|
|
97
|
+
faTree,
|
|
98
|
+
faLeaf,
|
|
99
|
+
faSeedling,
|
|
100
|
+
faSun,
|
|
101
|
+
faCloudSun,
|
|
102
|
+
faBug,
|
|
103
|
+
// Maintenance & Safety
|
|
104
|
+
faWrench,
|
|
105
|
+
faHammer,
|
|
106
|
+
faScrewdriverWrench,
|
|
107
|
+
faTools,
|
|
108
|
+
faPaintBrush,
|
|
109
|
+
faScissors,
|
|
110
|
+
faLock,
|
|
111
|
+
faUnlock,
|
|
112
|
+
faKey,
|
|
113
|
+
faEye,
|
|
114
|
+
faEyeSlash,
|
|
115
|
+
// Shopping & Commerce
|
|
116
|
+
faShoppingCart,
|
|
117
|
+
faShoppingBag,
|
|
118
|
+
faCreditCard,
|
|
119
|
+
faMoneyBill,
|
|
120
|
+
faDollarSign,
|
|
121
|
+
faPiggyBank,
|
|
122
|
+
faReceipt,
|
|
123
|
+
faBarcode,
|
|
124
|
+
faBox,
|
|
125
|
+
// Additional icons from IconLoader
|
|
126
|
+
faSearch,
|
|
127
|
+
faCog,
|
|
128
|
+
faGear,
|
|
129
|
+
faAnchor,
|
|
130
|
+
faFolderOpen,
|
|
131
|
+
faCheck,
|
|
132
|
+
faCheckCircle,
|
|
133
|
+
faTimes,
|
|
134
|
+
faXmark,
|
|
135
|
+
faPlus,
|
|
136
|
+
faMinus,
|
|
137
|
+
faEdit,
|
|
138
|
+
faPen,
|
|
139
|
+
faTrash,
|
|
140
|
+
faArrowUp,
|
|
141
|
+
faArrowDown,
|
|
142
|
+
faArrowLeft,
|
|
143
|
+
faArrowRight,
|
|
144
|
+
faChevronRight,
|
|
145
|
+
faRotateRight,
|
|
146
|
+
faRotate,
|
|
147
|
+
faSync,
|
|
148
|
+
faRepeat,
|
|
149
|
+
// Grid layout icons
|
|
150
|
+
faTh,
|
|
151
|
+
faList,
|
|
152
|
+
faSquare,
|
|
153
|
+
faGripVertical,
|
|
154
|
+
faGripLines,
|
|
155
|
+
faBorderAll,
|
|
156
|
+
faTableCells,
|
|
157
|
+
// Media & Entertainment
|
|
158
|
+
faPlay,
|
|
159
|
+
faPause,
|
|
160
|
+
faStop,
|
|
161
|
+
faVideo,
|
|
162
|
+
faMicrophone,
|
|
163
|
+
faVolumeUp,
|
|
164
|
+
faVolumeDown,
|
|
165
|
+
faHeadphones,
|
|
166
|
+
// Data & Analytics
|
|
167
|
+
faChartBar,
|
|
168
|
+
faChartLine,
|
|
169
|
+
faChartPie,
|
|
170
|
+
faDesktop,
|
|
171
|
+
faLaptop,
|
|
172
|
+
faMobile,
|
|
173
|
+
// Cloud & Network
|
|
174
|
+
faCloud,
|
|
175
|
+
faServer,
|
|
176
|
+
faUpload,
|
|
177
|
+
faDownload,
|
|
178
|
+
faShare,
|
|
179
|
+
faCompass,
|
|
180
|
+
faMap,
|
|
181
|
+
// Additional icons for field types
|
|
182
|
+
faParagraph,
|
|
183
|
+
faArrowCircleRight,
|
|
184
|
+
faHeading,
|
|
185
|
+
faAlignLeft,
|
|
186
|
+
faLink,
|
|
187
|
+
faMinusCircle,
|
|
188
|
+
} from "@fortawesome/free-solid-svg-icons";
|
|
189
|
+
|
|
190
|
+
export const iconImports = {
|
|
191
|
+
// Community & Living
|
|
192
|
+
home: faHome,
|
|
193
|
+
users: faUsers,
|
|
194
|
+
user: faUser,
|
|
195
|
+
heart: faHeart,
|
|
196
|
+
star: faStar,
|
|
197
|
+
flag: faFlag,
|
|
198
|
+
"hands-helping": faHandsHelping,
|
|
199
|
+
handshake: faHandshake,
|
|
200
|
+
"people-carry": faPeopleCarry,
|
|
201
|
+
child: faChild,
|
|
202
|
+
|
|
203
|
+
// Household & Comfort
|
|
204
|
+
couch: faCouch,
|
|
205
|
+
bed: faBed,
|
|
206
|
+
tv: faTv,
|
|
207
|
+
bath: faBath,
|
|
208
|
+
shower: faShower,
|
|
209
|
+
toilet: faToilet,
|
|
210
|
+
sink: faSink,
|
|
211
|
+
chair: faChair,
|
|
212
|
+
table: faTable,
|
|
213
|
+
fire: faFire,
|
|
214
|
+
fan: faFan,
|
|
215
|
+
"temperature-high": faTemperatureHigh,
|
|
216
|
+
|
|
217
|
+
// Health & Wellness
|
|
218
|
+
shield: faShield,
|
|
219
|
+
"user-nurse": faUserNurse,
|
|
220
|
+
stethoscope: faStethoscope,
|
|
221
|
+
"heart-pulse": faHeartPulse,
|
|
222
|
+
wheelchair: faWheelchair,
|
|
223
|
+
crutch: faCrutch,
|
|
224
|
+
"prescription-bottle": faPrescriptionBottle,
|
|
225
|
+
pills: faPills,
|
|
226
|
+
syringe: faSyringe,
|
|
227
|
+
thermometer: faThermometer,
|
|
228
|
+
|
|
229
|
+
// Activities & Events
|
|
230
|
+
calendar: faCalendar,
|
|
231
|
+
clock: faClock,
|
|
232
|
+
bell: faBell,
|
|
233
|
+
music: faMusic,
|
|
234
|
+
book: faBook,
|
|
235
|
+
image: faImage,
|
|
236
|
+
camera: faCamera,
|
|
237
|
+
chess: faChess,
|
|
238
|
+
dice: faDice,
|
|
239
|
+
"theater-masks": faTheaterMasks,
|
|
240
|
+
palette: faPalette,
|
|
241
|
+
"graduation-cap": faGraduationCap,
|
|
242
|
+
trophy: faTrophy,
|
|
243
|
+
|
|
244
|
+
// Sports & Recreation
|
|
245
|
+
"basketball-ball": faBasketballBall,
|
|
246
|
+
"football-ball": faFootballBall,
|
|
247
|
+
"volleyball-ball": faVolleyballBall,
|
|
248
|
+
"table-tennis": faTableTennis,
|
|
249
|
+
"bowling-ball": faBowlingBall,
|
|
250
|
+
"swimming-pool": faSwimmingPool,
|
|
251
|
+
walking: faWalking,
|
|
252
|
+
hiking: faHiking,
|
|
253
|
+
"umbrella-beach": faUmbrellaBeach,
|
|
254
|
+
|
|
255
|
+
// Dining & Food
|
|
256
|
+
utensils: faUtensils,
|
|
257
|
+
coffee: faCoffee,
|
|
258
|
+
"wine-glass": faWineGlass,
|
|
259
|
+
"glass-water": faGlassWater,
|
|
260
|
+
"pizza-slice": faPizzaSlice,
|
|
261
|
+
"apple-alt": faAppleAlt,
|
|
262
|
+
carrot: faCarrot,
|
|
263
|
+
"bread-slice": faBreadSlice,
|
|
264
|
+
"ice-cream": faIceCream,
|
|
265
|
+
cocktail: faCocktail,
|
|
266
|
+
|
|
267
|
+
// Transportation
|
|
268
|
+
car: faCar,
|
|
269
|
+
bus: faBus,
|
|
270
|
+
train: faTrain,
|
|
271
|
+
bicycle: faBicycle,
|
|
272
|
+
truck: faTruck,
|
|
273
|
+
|
|
274
|
+
// Files & Information
|
|
275
|
+
file: faFile,
|
|
276
|
+
"file-lines": faFileLines,
|
|
277
|
+
folder: faFolder,
|
|
278
|
+
"book-open": faBookOpen,
|
|
279
|
+
clipboard: faClipboard,
|
|
280
|
+
paperclip: faPaperclip,
|
|
281
|
+
|
|
282
|
+
// Communication
|
|
283
|
+
phone: faPhone,
|
|
284
|
+
envelope: faEnvelope,
|
|
285
|
+
"map-marker": faMapMarkerAlt,
|
|
286
|
+
"location-dot": faLocationDot,
|
|
287
|
+
|
|
288
|
+
// Garden & Outdoor
|
|
289
|
+
tree: faTree,
|
|
290
|
+
leaf: faLeaf,
|
|
291
|
+
seedling: faSeedling,
|
|
292
|
+
sun: faSun,
|
|
293
|
+
"cloud-sun": faCloudSun,
|
|
294
|
+
bug: faBug,
|
|
295
|
+
|
|
296
|
+
// Maintenance & Safety
|
|
297
|
+
wrench: faWrench,
|
|
298
|
+
hammer: faHammer,
|
|
299
|
+
screwdriver: faScrewdriverWrench,
|
|
300
|
+
drill: faScrewdriverWrench,
|
|
301
|
+
saw: faTools,
|
|
302
|
+
"paint-brush": faPaintBrush,
|
|
303
|
+
scissors: faScissors,
|
|
304
|
+
tools: faTools,
|
|
305
|
+
lock: faLock,
|
|
306
|
+
unlock: faUnlock,
|
|
307
|
+
key: faKey,
|
|
308
|
+
eye: faEye,
|
|
309
|
+
"eye-slash": faEyeSlash,
|
|
310
|
+
|
|
311
|
+
// Shopping & Commerce
|
|
312
|
+
"shopping-cart": faShoppingCart,
|
|
313
|
+
"shopping-bag": faShoppingBag,
|
|
314
|
+
"credit-card": faCreditCard,
|
|
315
|
+
"money-bill": faMoneyBill,
|
|
316
|
+
"dollar-sign": faDollarSign,
|
|
317
|
+
"piggy-bank": faPiggyBank,
|
|
318
|
+
receipt: faReceipt,
|
|
319
|
+
barcode: faBarcode,
|
|
320
|
+
box: faBox,
|
|
321
|
+
package: faBox,
|
|
322
|
+
|
|
323
|
+
// Additional icons from IconLoader
|
|
324
|
+
search: faSearch,
|
|
325
|
+
cog: faCog,
|
|
326
|
+
gear: faGear,
|
|
327
|
+
settings: faGear,
|
|
328
|
+
"map-marker": faMapMarkerAlt,
|
|
329
|
+
"location-dot": faLocationDot,
|
|
330
|
+
phone: faPhone,
|
|
331
|
+
anchor: faAnchor,
|
|
332
|
+
paperclip: faPaperclip,
|
|
333
|
+
"folder-open": faFolderOpen,
|
|
334
|
+
check: faCheck,
|
|
335
|
+
"check-circle": faCheckCircle,
|
|
336
|
+
times: faTimes,
|
|
337
|
+
xmark: faXmark,
|
|
338
|
+
plus: faPlus,
|
|
339
|
+
minus: faMinus,
|
|
340
|
+
minusCircle: faMinusCircle,
|
|
341
|
+
edit: faEdit,
|
|
342
|
+
pen: faPen,
|
|
343
|
+
trash: faTrash,
|
|
344
|
+
"arrow-up": faArrowUp,
|
|
345
|
+
"arrow-down": faArrowDown,
|
|
346
|
+
"arrow-left": faArrowLeft,
|
|
347
|
+
"arrow-right": faArrowRight,
|
|
348
|
+
"chevron-right": faChevronRight,
|
|
349
|
+
rotate: faRotateRight,
|
|
350
|
+
refresh: faRotate,
|
|
351
|
+
sync: faSync,
|
|
352
|
+
repeat: faRepeat,
|
|
353
|
+
|
|
354
|
+
// Grid layout icons
|
|
355
|
+
th: faTh,
|
|
356
|
+
"th-list": faList,
|
|
357
|
+
square: faSquare,
|
|
358
|
+
"grip-vertical": faGripVertical,
|
|
359
|
+
"grip-horizontal": faGripLines,
|
|
360
|
+
"grid-3x3": faBorderAll,
|
|
361
|
+
"grid-2x2": faTableCells,
|
|
362
|
+
"border-all": faBorderAll,
|
|
363
|
+
"table-cells": faBorderAll,
|
|
364
|
+
"table-list": faTable,
|
|
365
|
+
|
|
366
|
+
// Media & Entertainment
|
|
367
|
+
play: faPlay,
|
|
368
|
+
pause: faPause,
|
|
369
|
+
stop: faStop,
|
|
370
|
+
video: faVideo,
|
|
371
|
+
camera: faCamera,
|
|
372
|
+
image: faImage,
|
|
373
|
+
picture: faImage,
|
|
374
|
+
microphone: faMicrophone,
|
|
375
|
+
"volume-up": faVolumeUp,
|
|
376
|
+
"volume-down": faVolumeDown,
|
|
377
|
+
headphones: faHeadphones,
|
|
378
|
+
speaker: faVolumeUp,
|
|
379
|
+
|
|
380
|
+
// Data & Analytics
|
|
381
|
+
"chart-bar": faChartBar,
|
|
382
|
+
"chart-line": faChartLine,
|
|
383
|
+
"chart-pie": faChartPie,
|
|
384
|
+
desktop: faDesktop,
|
|
385
|
+
computer: faDesktop,
|
|
386
|
+
laptop: faLaptop,
|
|
387
|
+
mobile: faMobile,
|
|
388
|
+
|
|
389
|
+
// Cloud & Network
|
|
390
|
+
cloud: faCloud,
|
|
391
|
+
server: faServer,
|
|
392
|
+
upload: faUpload,
|
|
393
|
+
download: faDownload,
|
|
394
|
+
share: faShare,
|
|
395
|
+
compass: faCompass,
|
|
396
|
+
map: faMap,
|
|
397
|
+
|
|
398
|
+
// Aliases for consistency
|
|
399
|
+
picture: faImage,
|
|
400
|
+
computer: faDesktop,
|
|
401
|
+
speaker: faVolumeUp,
|
|
402
|
+
|
|
403
|
+
// Additional icons for field types
|
|
404
|
+
paragraph: faParagraph,
|
|
405
|
+
"arrow-circle-right": faArrowCircleRight,
|
|
406
|
+
heading: faHeading,
|
|
407
|
+
"align-left": faAlignLeft,
|
|
408
|
+
link: faLink,
|
|
409
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { PlussCore } from "../feature.config";
|
|
2
|
+
|
|
3
|
+
const { Components } = PlussCore;
|
|
4
|
+
export const Header = Components.Header;
|
|
5
|
+
export const AddButton = Components.AddButton;
|
|
6
|
+
export const Button = Components.Button;
|
|
7
|
+
export const GenericInput = Components.GenericInput;
|
|
8
|
+
export const AnalyticsFilter = Components.AnalyticsFilter;
|
|
9
|
+
export const ImageInput = Components.ImageInput;
|
|
10
|
+
|
|
11
|
+
export const RadioButton = Components.RadioButton;
|
|
12
|
+
export const DropdownInput = Components.DropdownInput;
|
|
13
|
+
export const OverlayPage = Components.OverlayPage;
|
|
14
|
+
export const OverlayPageContents = Components.OverlayPageContents;
|
|
15
|
+
export const OverlayPageSection = Components.OverlayPageSection;
|
|
16
|
+
export const OverlayPageBottomButtons = Components.OverlayPageBottomButtons;
|
|
17
|
+
export const UserListing = Components.UserListing;
|
|
18
|
+
export const P60Icon = Components.P60Icon;
|
|
19
|
+
export const DatePicker = Components.DatePicker;
|
|
20
|
+
export const TimePicker = Components.TimePicker;
|
|
21
|
+
export const SuccessPopup = Components.SuccessPopup;
|
|
22
|
+
export const AudienceSelector = Components.AudienceSelector;
|
|
23
|
+
export const CheckBox = Components.CheckBox;
|
|
24
|
+
export const TextFormatPopup = Components.TextFormatPopup;
|
|
25
|
+
export const OptionsSection = Components.OptionsSection;
|
|
26
|
+
export const FileInput = Components.FileInput;
|
|
27
|
+
export const Popup = Components.Popup;
|
|
28
|
+
export const HubSidebar = Components.HubSidebar;
|
|
29
|
+
export { DeleteConfirmationPopup } from "./DeleteConfirmationPopup.jsx";
|
|
30
|
+
export { FeatureBuilderSuccessPopup } from "./FeatureBuilderSuccessPopup.jsx";
|
|
31
|
+
export { FeatureBuilderWelcomePopup } from "./FeatureBuilderWelcomePopup.jsx";
|
|
32
|
+
|
|
33
|
+
export { default as SortButtonGroup } from "./SortButtonGroup.jsx";
|
|
34
|
+
export { ToggleSwitch } from "./ToggleSwitch.js";
|
|
35
|
+
export { default as LoadingState } from "./LoadingState.jsx";
|
|
36
|
+
export { default as LoadingScreen } from "./LoadingScreen.jsx";
|
|
37
|
+
export { default as SkeletonLoader } from "./SkeletonLoader.jsx";
|
|
38
|
+
export { default as BackgroundLoader } from "./BackgroundLoader.jsx";
|
|
39
|
+
export { default as IconLoader } from "./IconLoader.jsx";
|
|
40
|
+
export { default as FeatureBuilderSidebar } from "./FeatureBuilderSidebar.jsx";
|
|
41
|
+
export { default as CenteredContainer } from "./CenteredContainer.jsx";
|
|
42
|
+
|
|
43
|
+
export { ErrorMessage } from "./ErrorMessage.jsx";
|
|
44
|
+
export { ErrorBoundary } from "./ErrorBoundary.jsx";
|
|
45
|
+
|
|
46
|
+
// Core component exports
|
|
47
|
+
export const Tag = Components.Tag;
|
|
48
|
+
export const Text = Components.Text;
|
|
49
|
+
|
|
50
|
+
// New component exports
|
|
51
|
+
export { TwoColumnInput } from "./TwoColumnInput.jsx";
|
|
52
|
+
export { BaseFieldConfig } from "./BaseFieldConfig.jsx";
|
|
53
|
+
|
|
54
|
+
// Toast system exports
|
|
55
|
+
export { default as ToastContainer } from "./ToastContainer.jsx";
|
|
56
|
+
|
|
57
|
+
// Gallery components
|
|
58
|
+
export { default as ListingGalleryInput } from "./listing/ListingGalleryInput.jsx";
|
|
59
|
+
export { default as GalleryDisplay } from "./listing/GalleryDisplay.jsx";
|
|
60
|
+
|
|
61
|
+
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
3
|
+
import { GenericInput } from "../../components";
|
|
4
|
+
import { iconImports } from "../../components/iconImports.js";
|
|
5
|
+
import styles from "./ListingFileInput.module.css";
|
|
6
|
+
|
|
7
|
+
const FileListItem = ({ file, onNameChange, onRemove, disabled = false }) => {
|
|
8
|
+
// Get file icon based on file extension
|
|
9
|
+
const getFileIcon = (filename) => {
|
|
10
|
+
if (!filename) return iconImports.file;
|
|
11
|
+
|
|
12
|
+
const extension = filename.split(".").pop().toLowerCase();
|
|
13
|
+
switch (extension) {
|
|
14
|
+
case "pdf":
|
|
15
|
+
return iconImports.file; // Use generic file icon for now
|
|
16
|
+
case "doc":
|
|
17
|
+
case "docx":
|
|
18
|
+
return iconImports.file; // Use generic file icon for now
|
|
19
|
+
case "xls":
|
|
20
|
+
case "xlsx":
|
|
21
|
+
return iconImports.file; // Use generic file icon for now
|
|
22
|
+
case "jpg":
|
|
23
|
+
case "jpeg":
|
|
24
|
+
case "png":
|
|
25
|
+
case "gif":
|
|
26
|
+
return iconImports.image; // Use image icon for image files
|
|
27
|
+
case "txt":
|
|
28
|
+
return iconImports.fileAlt; // Use alternative file icon for text
|
|
29
|
+
default:
|
|
30
|
+
return iconImports.file;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const handleNameChange = (event) => {
|
|
35
|
+
const newName = event.target.value;
|
|
36
|
+
if (onNameChange) {
|
|
37
|
+
onNameChange(file.url, newName);
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const handleRemove = () => {
|
|
42
|
+
if (onRemove) {
|
|
43
|
+
onRemove(file.url);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
return (
|
|
48
|
+
<div className={styles.fileListItem}>
|
|
49
|
+
{/* File icon */}
|
|
50
|
+
<div className={styles.fileListItem__icon}>
|
|
51
|
+
<FontAwesomeIcon icon={getFileIcon(file.originalName)} />
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
{/* Original filename */}
|
|
55
|
+
<div className={styles.fileListItem__originalName}>
|
|
56
|
+
<span>{file.originalName}</span>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
{/* Name input field */}
|
|
60
|
+
<div className={styles.fileListItem__input}>
|
|
61
|
+
<GenericInput
|
|
62
|
+
value={file.name || ""}
|
|
63
|
+
onChange={handleNameChange}
|
|
64
|
+
placeholder="Enter display name (optional)"
|
|
65
|
+
label="name"
|
|
66
|
+
disabled={disabled}
|
|
67
|
+
className={styles.fileListItem__nameInput}
|
|
68
|
+
alwaysShowLabel
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
{/* Remove button */}
|
|
73
|
+
<div className={styles.fileListItem__actions}>
|
|
74
|
+
<button
|
|
75
|
+
onClick={handleRemove}
|
|
76
|
+
disabled={disabled}
|
|
77
|
+
className={styles.fileListItem__removeButton}
|
|
78
|
+
>
|
|
79
|
+
<FontAwesomeIcon icon={iconImports.minusCircle} />
|
|
80
|
+
</button>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export default FileListItem;
|