@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.
Files changed (119) hide show
  1. package/dist/{index.cjs.js → index.js} +3803 -3504
  2. package/dist/index.js.map +1 -0
  3. package/package.json +20 -27
  4. package/.babelrc +0 -4
  5. package/rollup.config.js +0 -69
  6. package/src/actions/featureBuilderStringsActions.js +0 -88
  7. package/src/actions/featureDefinitionsIndex.js +0 -258
  8. package/src/actions/formActions.js +0 -301
  9. package/src/actions/index.js +0 -12
  10. package/src/actions/listingActions.js +0 -352
  11. package/src/actions/wizardActions.js +0 -228
  12. package/src/components/ActivityCardExample.jsx +0 -86
  13. package/src/components/ActivityCardExample.module.css +0 -130
  14. package/src/components/BackgroundLoader.jsx +0 -33
  15. package/src/components/BackgroundLoader.module.css +0 -46
  16. package/src/components/BaseFieldConfig.jsx +0 -305
  17. package/src/components/BaseFieldConfig.module.css +0 -42
  18. package/src/components/CenteredContainer.jsx +0 -29
  19. package/src/components/CenteredContainer.module.css +0 -171
  20. package/src/components/DeleteConfirmationPopup.jsx +0 -95
  21. package/src/components/DeleteConfirmationPopup.module.css +0 -12
  22. package/src/components/ErrorBoundary.jsx +0 -134
  23. package/src/components/ErrorBoundary.module.css +0 -77
  24. package/src/components/ErrorMessage.jsx +0 -85
  25. package/src/components/ErrorMessage.module.css +0 -116
  26. package/src/components/ExampleDisplay.jsx +0 -26
  27. package/src/components/ExampleDisplay.module.css +0 -3
  28. package/src/components/FeatureBuilderSidebar.jsx +0 -84
  29. package/src/components/FeatureBuilderSuccessPopup.jsx +0 -49
  30. package/src/components/FeatureBuilderSuccessPopup.module.css +0 -41
  31. package/src/components/FeatureBuilderWelcomePopup.jsx +0 -51
  32. package/src/components/FeatureBuilderWelcomePopup.module.css +0 -21
  33. package/src/components/FeatureListingCard.jsx +0 -104
  34. package/src/components/FeatureListingCard.module.css +0 -62
  35. package/src/components/Fields.jsx +0 -423
  36. package/src/components/Fields.module.css +0 -159
  37. package/src/components/IconLoader.jsx +0 -153
  38. package/src/components/IconLoader.module.css +0 -92
  39. package/src/components/IconSelector.jsx +0 -111
  40. package/src/components/IconSelector.module.css +0 -197
  41. package/src/components/ListingEditor.jsx +0 -405
  42. package/src/components/ListingEditor.module.css +0 -14
  43. package/src/components/ListingSuccessPopup.jsx +0 -52
  44. package/src/components/LoadingScreen.jsx +0 -54
  45. package/src/components/LoadingScreen.module.css +0 -103
  46. package/src/components/LoadingState.jsx +0 -40
  47. package/src/components/LoadingState.module.css +0 -18
  48. package/src/components/PreviewFull.js +0 -24
  49. package/src/components/PreviewFull.module.css +0 -11
  50. package/src/components/PreviewGrid.js +0 -14
  51. package/src/components/PreviewWidget.js +0 -27
  52. package/src/components/PreviewWidget.module.css +0 -15
  53. package/src/components/SidebarLayout.jsx +0 -252
  54. package/src/components/SidebarLayout.module.css +0 -71
  55. package/src/components/SkeletonLoader.jsx +0 -128
  56. package/src/components/SkeletonLoader.module.css +0 -295
  57. package/src/components/SortButtonGroup.jsx +0 -34
  58. package/src/components/SortButtonGroup.module.css +0 -51
  59. package/src/components/ToastContainer.jsx +0 -98
  60. package/src/components/ToastContainer.module.css +0 -156
  61. package/src/components/ToggleSwitch.js +0 -40
  62. package/src/components/ToggleSwitch.module.css +0 -48
  63. package/src/components/TwoColumnInput.jsx +0 -29
  64. package/src/components/TwoColumnInput.module.css +0 -32
  65. package/src/components/ViewFull.js +0 -139
  66. package/src/components/ViewFull.module.css +0 -71
  67. package/src/components/ViewWidget.js +0 -62
  68. package/src/components/ViewWidget.module.css +0 -28
  69. package/src/components/iconCategories.js +0 -135
  70. package/src/components/iconImports.js +0 -409
  71. package/src/components/index.js +0 -59
  72. package/src/components/listing/FileListItem.jsx +0 -86
  73. package/src/components/listing/GalleryDisplay.jsx +0 -330
  74. package/src/components/listing/GalleryDisplay.module.css +0 -309
  75. package/src/components/listing/ListingCTAInput.jsx +0 -82
  76. package/src/components/listing/ListingDescriptionInput.jsx +0 -73
  77. package/src/components/listing/ListingField.jsx +0 -101
  78. package/src/components/listing/ListingField.module.css +0 -106
  79. package/src/components/listing/ListingFileInput.jsx +0 -273
  80. package/src/components/listing/ListingFileInput.module.css +0 -189
  81. package/src/components/listing/ListingForm.jsx +0 -90
  82. package/src/components/listing/ListingForm.module.css +0 -38
  83. package/src/components/listing/ListingGalleryInput.jsx +0 -239
  84. package/src/components/listing/ListingGalleryInput.module.css +0 -132
  85. package/src/components/listing/ListingImageInput.jsx +0 -153
  86. package/src/components/listing/ListingTextInput.jsx +0 -72
  87. package/src/feature.config.js +0 -130
  88. package/src/helper/index.js +0 -135
  89. package/src/hooks/useFeatureDefinitionLoader.js +0 -66
  90. package/src/images/full.png +0 -0
  91. package/src/images/fullNoTitle.png +0 -0
  92. package/src/images/previewWidget.png +0 -0
  93. package/src/images/widget.png +0 -0
  94. package/src/index.js +0 -38
  95. package/src/pages/CreateListingPage.jsx +0 -49
  96. package/src/pages/EditListingPage.jsx +0 -58
  97. package/src/reducers/featureBuilderReducer.js +0 -739
  98. package/src/screens/CreateListing.module.css +0 -45
  99. package/src/screens/Form.module.css +0 -744
  100. package/src/screens/FormFieldsStep.jsx +0 -626
  101. package/src/screens/FormLayoutStep.jsx +0 -405
  102. package/src/screens/FormOverviewStep.jsx +0 -389
  103. package/src/screens/ListingScreen.jsx +0 -477
  104. package/src/screens/ListingScreen.module.css +0 -333
  105. package/src/selectors/featureBuilderSelectors.js +0 -533
  106. package/src/types/index.js +0 -91
  107. package/src/utils/textUtils.js +0 -89
  108. package/src/validators/galleryValidators.js +0 -345
  109. package/src/values.config.a.js +0 -49
  110. package/src/values.config.b.js +0 -49
  111. package/src/values.config.c.js +0 -49
  112. package/src/values.config.d.js +0 -49
  113. package/src/values.config.default.js +0 -49
  114. package/src/values.config.js +0 -49
  115. package/src/webapi/featureDefinitionActions.js +0 -0
  116. package/src/webapi/featuresActions.js +0 -90
  117. package/src/webapi/helper.js +0 -4
  118. package/src/webapi/index.js +0 -12
  119. package/src/webapi/listingActions.js +0 -176
@@ -1,90 +0,0 @@
1
- import { PlussCore } from "../feature.config";
2
- const { Helper, Session } = PlussCore;
3
-
4
- const { getUrl } = Helper;
5
- const { authedFunction } = Session;
6
-
7
- export const featureDefinitionActions = {
8
- /**
9
- * Get the single feature definition by ID
10
- * Path: {id}
11
- */
12
- getSingle: async (id, site) => {
13
- const query = { id, site };
14
- return authedFunction({
15
- method: "GET",
16
- url: getUrl("feature-builder", "definition/get/single", query),
17
- });
18
- },
19
-
20
- /**
21
- * Creates a new feature definition with the provided configuration
22
- *
23
- * @param {string} id - The unique identifier for the new feature definition
24
- * @param {string} site - The site ID where the feature definition will be created
25
- * @param {FeatureDefinition} featureDefinition - The feature definition data to create
26
- * @returns {Promise<ApiResponse>} Promise resolving to API response with created feature definition
27
- * @throws {Error} When creation fails due to validation or API errors
28
- *
29
- */
30
- create: async (id, site, featureDefinition) => {
31
- return authedFunction({
32
- method: "POST",
33
- url: getUrl("feature-builder", "definition/update/create"),
34
- data: { id, site, featureDefinition },
35
- });
36
- },
37
-
38
- /**
39
- * Updates an existing feature definition with new configuration
40
- *
41
- * @param {FeatureDefinition} featureDefinitionData - The updated feature definition data
42
- * @param {string} featureDefinitionData.id - The unique identifier of the feature definition to update
43
- * @param {string} [featureDefinitionData.displayName] - Updated display name
44
- * @param {Field[]} [featureDefinitionData.fields] - Updated field definitions
45
- * @param {Object} [featureDefinitionData.layout] - Updated layout configuration
46
- * @param {string} site - The site ID where the feature definition exists
47
- * @returns {Promise<ApiResponse>} Promise resolving to API response with updated feature definition
48
- * @throws {Error} When update fails due to validation or API errors
49
- *
50
- * @example
51
- * try {
52
- * const response = await featureDefinitionActions.edit(
53
- * {
54
- * id: 'feature-123',
55
- * displayName: 'Updated Form',
56
- * fields: [...]
57
- * },
58
- * 'site-123'
59
- * );
60
- */
61
- edit: async (featureDefinitionData, site) => {
62
- // Ensure site is included in the request body
63
- const dataWithSite = {
64
- site: site,
65
- ...featureDefinitionData,
66
- };
67
- return authedFunction({
68
- method: "POST",
69
- url: getUrl("feature-builder", "definition/update/edit"),
70
- data: dataWithSite,
71
- });
72
- },
73
-
74
- /**
75
- * Soft deletes a feature definition (marks as deleted but doesn't permanently remove)
76
- *
77
- * @param {string} id - The unique identifier of the feature definition to delete
78
- * @param {string} site - The site ID where the feature definition exists
79
- * @returns {Promise<ApiResponse>} Promise resolving to API response confirming deletion
80
- * @throws {Error} When deletion fails or feature definition is not found
81
- *
82
- */
83
- delete: async (id, site) => {
84
- return authedFunction({
85
- method: "POST",
86
- url: getUrl("feature-builder", "definition/update/delete"),
87
- data: { id, site },
88
- });
89
- },
90
- };
@@ -1,4 +0,0 @@
1
- import { PlussCore } from "../feature.config";
2
-
3
- const { Helper } = PlussCore;
4
- export const getUrl = Helper.getUrl;
@@ -1,12 +0,0 @@
1
- import { PlussCore } from "../feature.config";
2
-
3
- const { Apis } = PlussCore;
4
- export const stringActions = Apis.stringActions;
5
- export const analyticsActions = Apis.analyticsActions;
6
- export const fileActions = Apis.fileActions;
7
- export const userActions = Apis.userActions;
8
- export const typeActions = Apis.typeActions;
9
-
10
- // Feature Builder specific API actions
11
- export { featureDefinitionActions } from "./featuresActions";
12
- export { listingActions } from "./listingActions";
@@ -1,176 +0,0 @@
1
- import { PlussCore } from "../feature.config";
2
- import { values } from "../values.config";
3
- const { Helper, Session } = PlussCore;
4
-
5
- const { getUrl } = Helper;
6
- const { authedFunction } = Session;
7
-
8
- export const listingActions = {
9
- /**
10
- * Retrieves all listings for the current feature (excluding deleted listings)
11
- *
12
- * @param {string} site - The site ID to fetch listings for
13
- * @returns {Promise<ApiResponse>} Promise resolving to API response with listings array
14
- * @throws {Error} When API call fails
15
- */
16
- getAll: async (site) => {
17
- const query = {
18
- featureDefinitionId: values.featureId,
19
- site: site,
20
- };
21
- const url = getUrl("feature-builder", "listing/get/all", query);
22
-
23
- return authedFunction({
24
- method: "GET",
25
- url,
26
- });
27
- },
28
-
29
- /**
30
- * Retrieves a single listing by its unique ID
31
- *
32
- * @param {string} id - The unique identifier of the listing to retrieve
33
- * @param {string} site - The site ID where the listing belongs
34
- * @returns {Promise<ApiResponse>} Promise resolving to API response with listing data
35
- * @throws {Error} When listing is not found or API call fails
36
- *
37
- */
38
- getSingle: async (id, site) => {
39
- const query = {
40
- id: id,
41
- site: site,
42
- };
43
- const url = getUrl("feature-builder", "listing/get/single", query);
44
- return authedFunction({
45
- method: "GET",
46
- url: url,
47
- });
48
- },
49
-
50
- /**
51
- * Creates a new listing instance with the provided data
52
- *
53
- * @param {Object} listingData - The listing data to create
54
- * @param {Object} listingData.fields - Field values for the listing
55
- * @param {string} [listingData.title] - Optional title for the listing
56
- * @param {string} [listingData.description] - Optional description for the listing
57
- * @param {string} site - The site ID where the listing will be created
58
- * @returns {Promise<ApiResponse>} Promise resolving to API response with created listing data
59
- * @throws {Error} When creation fails due to validation or API errors
60
- *
61
- * @example
62
- * try {
63
- * const response = await listingActions.create({
64
- * title: 'New Listing',
65
- * fields: { name: 'John Doe', email: 'john@example.com' }
66
- */
67
- create: async (listingData, site) => {
68
- // Add site as query parameter (required by API)
69
- const query = {
70
- site: site,
71
- };
72
- const url = getUrl("feature-builder", "listing/update/create", query);
73
-
74
- const dataWithFeatureId = {
75
- site: site,
76
- featureDefinitionId: values.featureId,
77
- ...listingData,
78
- };
79
-
80
- try {
81
- const response = await authedFunction({
82
- method: "POST",
83
- url: url,
84
- data: dataWithFeatureId,
85
- });
86
- return response;
87
- } catch (error) {
88
- throw error;
89
- }
90
- },
91
-
92
- /**
93
- * Updates an existing listing with new data
94
- *
95
- * @param {Object} listingData - The updated listing data
96
- * @param {string} listingData.id - The unique identifier of the listing to update
97
- * @param {Object} listingData.fields - Updated field values
98
- * @param {string} [listingData.title] - Updated title
99
- * @param {string} [listingData.description] - Updated description
100
- * @param {string} site - The site ID where the listing exists
101
- * @returns {Promise<ApiResponse>} Promise resolving to API response with updated listing data
102
- * @throws {Error} When update fails due to validation or API errors
103
- *
104
- * @example
105
- * try {
106
- */
107
- edit: async (listingData, site) => {
108
- // Add site as query parameter (required by API)
109
- const query = {
110
- site: site,
111
- };
112
- const url = getUrl("feature-builder", "listing/update/edit", query);
113
-
114
- // Add site to the request body as well
115
- const dataWithSite = {
116
- site: site,
117
- ...listingData,
118
- };
119
-
120
- try {
121
- const response = await authedFunction({
122
- method: "POST",
123
- url: url,
124
- data: dataWithSite,
125
- });
126
- return response;
127
- } catch (error) {
128
- throw error;
129
- }
130
- },
131
-
132
- /**
133
- * Soft deletes a listing (marks as deleted but doesn't permanently remove)
134
- *
135
- * @param {string} id - The unique identifier of the listing to delete
136
- * @param {string} site - The site ID where the listing exists
137
- * @returns {Promise<ApiResponse>} Promise resolving to API response confirming deletion
138
- * @throws {Error} When deletion fails or listing is not found
139
- *
140
- */
141
- delete: async (id, site) => {
142
- const query = {
143
- site: site,
144
- id: id,
145
- };
146
- return authedFunction({
147
- method: "POST",
148
- url: getUrl("feature-builder", "listing/update/delete", query),
149
- data: { id },
150
- });
151
- },
152
-
153
- /**
154
- * Restores a previously soft-deleted listing
155
- *
156
- * @param {string} id - The unique identifier of the listing to restore
157
- * @param {string} site - The site ID where the listing exists
158
- * @returns {Promise<ApiResponse>} Promise resolving to API response confirming restoration
159
- * @throws {Error} When restoration fails or listing is not found
160
- *
161
- */
162
- undelete: async (id, site) => {
163
- const query = {
164
- site: site,
165
- id: id,
166
- };
167
- return authedFunction({
168
- method: "POST",
169
- url: getUrl("feature-builder", "listing/update/undelete", query),
170
- data: { id },
171
- });
172
- },
173
- };
174
-
175
- // Note: This file has been updated to use the new API endpoint patterns
176
- // Legacy exports have been removed as Redux actions now use the new listingActions object