@plusscommunities/pluss-feature-builder-web-d 1.0.7 → 1.0.9-beta.3
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.js → index.js} +3803 -3504
- package/dist/index.js.map +1 -0
- package/package.json +20 -27
- package/.babelrc +0 -4
- package/rollup.config.js +0 -69
- package/src/actions/featureBuilderStringsActions.js +0 -88
- package/src/actions/featureDefinitionsIndex.js +0 -258
- package/src/actions/formActions.js +0 -301
- package/src/actions/index.js +0 -12
- package/src/actions/listingActions.js +0 -352
- package/src/actions/wizardActions.js +0 -228
- package/src/components/ActivityCardExample.jsx +0 -86
- package/src/components/ActivityCardExample.module.css +0 -130
- package/src/components/BackgroundLoader.jsx +0 -33
- package/src/components/BackgroundLoader.module.css +0 -46
- package/src/components/BaseFieldConfig.jsx +0 -305
- package/src/components/BaseFieldConfig.module.css +0 -42
- package/src/components/CenteredContainer.jsx +0 -29
- package/src/components/CenteredContainer.module.css +0 -171
- package/src/components/DeleteConfirmationPopup.jsx +0 -95
- package/src/components/DeleteConfirmationPopup.module.css +0 -12
- package/src/components/ErrorBoundary.jsx +0 -134
- package/src/components/ErrorBoundary.module.css +0 -77
- package/src/components/ErrorMessage.jsx +0 -85
- package/src/components/ErrorMessage.module.css +0 -116
- package/src/components/ExampleDisplay.jsx +0 -26
- package/src/components/ExampleDisplay.module.css +0 -3
- package/src/components/FeatureBuilderSidebar.jsx +0 -84
- package/src/components/FeatureBuilderSuccessPopup.jsx +0 -49
- package/src/components/FeatureBuilderSuccessPopup.module.css +0 -41
- package/src/components/FeatureBuilderWelcomePopup.jsx +0 -51
- package/src/components/FeatureBuilderWelcomePopup.module.css +0 -21
- package/src/components/FeatureListingCard.jsx +0 -104
- package/src/components/FeatureListingCard.module.css +0 -62
- package/src/components/Fields.jsx +0 -423
- package/src/components/Fields.module.css +0 -159
- package/src/components/IconLoader.jsx +0 -153
- package/src/components/IconLoader.module.css +0 -92
- package/src/components/IconSelector.jsx +0 -111
- package/src/components/IconSelector.module.css +0 -197
- package/src/components/ListingEditor.jsx +0 -405
- package/src/components/ListingEditor.module.css +0 -14
- package/src/components/ListingSuccessPopup.jsx +0 -52
- package/src/components/LoadingScreen.jsx +0 -54
- package/src/components/LoadingScreen.module.css +0 -103
- package/src/components/LoadingState.jsx +0 -40
- package/src/components/LoadingState.module.css +0 -18
- package/src/components/PreviewFull.js +0 -24
- package/src/components/PreviewFull.module.css +0 -11
- package/src/components/PreviewGrid.js +0 -14
- package/src/components/PreviewWidget.js +0 -27
- package/src/components/PreviewWidget.module.css +0 -15
- package/src/components/SidebarLayout.jsx +0 -252
- package/src/components/SidebarLayout.module.css +0 -71
- package/src/components/SkeletonLoader.jsx +0 -128
- package/src/components/SkeletonLoader.module.css +0 -295
- package/src/components/SortButtonGroup.jsx +0 -34
- package/src/components/SortButtonGroup.module.css +0 -51
- package/src/components/ToastContainer.jsx +0 -98
- package/src/components/ToastContainer.module.css +0 -156
- package/src/components/ToggleSwitch.js +0 -40
- package/src/components/ToggleSwitch.module.css +0 -48
- package/src/components/TwoColumnInput.jsx +0 -29
- package/src/components/TwoColumnInput.module.css +0 -32
- package/src/components/ViewFull.js +0 -139
- package/src/components/ViewFull.module.css +0 -71
- package/src/components/ViewWidget.js +0 -62
- package/src/components/ViewWidget.module.css +0 -28
- package/src/components/iconCategories.js +0 -135
- package/src/components/iconImports.js +0 -409
- package/src/components/index.js +0 -59
- package/src/components/listing/FileListItem.jsx +0 -86
- package/src/components/listing/GalleryDisplay.jsx +0 -330
- package/src/components/listing/GalleryDisplay.module.css +0 -309
- package/src/components/listing/ListingCTAInput.jsx +0 -82
- package/src/components/listing/ListingDescriptionInput.jsx +0 -73
- package/src/components/listing/ListingField.jsx +0 -101
- package/src/components/listing/ListingField.module.css +0 -106
- package/src/components/listing/ListingFileInput.jsx +0 -273
- package/src/components/listing/ListingFileInput.module.css +0 -189
- package/src/components/listing/ListingForm.jsx +0 -90
- package/src/components/listing/ListingForm.module.css +0 -38
- package/src/components/listing/ListingGalleryInput.jsx +0 -239
- package/src/components/listing/ListingGalleryInput.module.css +0 -132
- package/src/components/listing/ListingImageInput.jsx +0 -153
- package/src/components/listing/ListingTextInput.jsx +0 -72
- package/src/feature.config.js +0 -130
- package/src/helper/index.js +0 -135
- package/src/hooks/useFeatureDefinitionLoader.js +0 -66
- 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 +0 -38
- package/src/pages/CreateListingPage.jsx +0 -49
- package/src/pages/EditListingPage.jsx +0 -58
- package/src/reducers/featureBuilderReducer.js +0 -739
- package/src/screens/CreateListing.module.css +0 -45
- package/src/screens/Form.module.css +0 -744
- package/src/screens/FormFieldsStep.jsx +0 -626
- package/src/screens/FormLayoutStep.jsx +0 -405
- package/src/screens/FormOverviewStep.jsx +0 -389
- package/src/screens/ListingScreen.jsx +0 -477
- package/src/screens/ListingScreen.module.css +0 -333
- package/src/selectors/featureBuilderSelectors.js +0 -533
- package/src/types/index.js +0 -91
- package/src/utils/textUtils.js +0 -89
- package/src/validators/galleryValidators.js +0 -345
- package/src/values.config.a.js +0 -49
- package/src/values.config.b.js +0 -49
- package/src/values.config.c.js +0 -49
- package/src/values.config.d.js +0 -49
- package/src/values.config.default.js +0 -49
- package/src/values.config.js +0 -49
- package/src/webapi/featureDefinitionActions.js +0 -0
- package/src/webapi/featuresActions.js +0 -90
- package/src/webapi/helper.js +0 -4
- package/src/webapi/index.js +0 -12
- package/src/webapi/listingActions.js +0 -176
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { useDispatch, useSelector } from "react-redux";
|
|
3
|
-
import ListingEditor from "../components/ListingEditor.jsx";
|
|
4
|
-
import { ListingSuccessPopup } from "../components/ListingSuccessPopup.jsx";
|
|
5
|
-
import { fetchFeatureDefinitions } from "../actions/featureDefinitionsIndex.js";
|
|
6
|
-
import { fetchSingleListing } from "../actions/listingActions";
|
|
7
|
-
import { selectListingById } from "../selectors/featureBuilderSelectors";
|
|
8
|
-
import { values } from "../values.config.js";
|
|
9
|
-
|
|
10
|
-
const EditListingPage = ({ match, history }) => {
|
|
11
|
-
const listingId = match.params.id;
|
|
12
|
-
const dispatch = useDispatch();
|
|
13
|
-
const [showSuccessPopup, setShowSuccessPopup] = React.useState(false);
|
|
14
|
-
|
|
15
|
-
// Fetch feature definitions
|
|
16
|
-
React.useEffect(() => {
|
|
17
|
-
dispatch(fetchFeatureDefinitions());
|
|
18
|
-
}, [dispatch]);
|
|
19
|
-
|
|
20
|
-
// Fetch specific listing for edit mode only if not already in store
|
|
21
|
-
const listing = useSelector((state) => selectListingById(state, listingId));
|
|
22
|
-
React.useEffect(() => {
|
|
23
|
-
if (listingId && !listing) {
|
|
24
|
-
dispatch(fetchSingleListing(listingId));
|
|
25
|
-
}
|
|
26
|
-
}, [dispatch, listingId, listing]);
|
|
27
|
-
|
|
28
|
-
const handleSuccess = () => {
|
|
29
|
-
setShowSuccessPopup(true);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
const handleSuccessPopupClose = () => {
|
|
33
|
-
setShowSuccessPopup(false);
|
|
34
|
-
history.push(values.routeListingScreen);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const handleCancel = () => {
|
|
38
|
-
history.push(values.routeListingScreen);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<>
|
|
43
|
-
<ListingEditor
|
|
44
|
-
mode="edit"
|
|
45
|
-
listingId={listingId}
|
|
46
|
-
onSuccess={handleSuccess}
|
|
47
|
-
onCancel={handleCancel}
|
|
48
|
-
/>
|
|
49
|
-
<ListingSuccessPopup
|
|
50
|
-
isOpen={showSuccessPopup}
|
|
51
|
-
onClose={handleSuccessPopupClose}
|
|
52
|
-
mode="edit"
|
|
53
|
-
/>
|
|
54
|
-
</>
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export default EditListingPage;
|