@plusscommunities/pluss-feature-builder-app-d 1.0.1-beta.3 → 1.0.1-beta.5

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 (55) hide show
  1. package/dist/module/actions/featureBuilderActions.js +6 -4
  2. package/dist/module/actions/featureBuilderActions.js.map +1 -1
  3. package/dist/module/actions/featureBuilderStringsActions.js +19 -34
  4. package/dist/module/actions/featureBuilderStringsActions.js.map +1 -1
  5. package/dist/module/components/FeatureDetailScreen.js +1 -1
  6. package/dist/module/components/FeatureDetailScreen.js.map +1 -1
  7. package/dist/module/components/WidgetGrid.js +5 -2
  8. package/dist/module/components/WidgetGrid.js.map +1 -1
  9. package/dist/module/components/WidgetLarge.js +1 -1
  10. package/dist/module/components/WidgetLarge.js.map +1 -1
  11. package/dist/module/components/WidgetSmall.js +1 -1
  12. package/dist/module/components/WidgetSmall.js.map +1 -1
  13. package/dist/module/components/common/index.js +1 -1
  14. package/dist/module/components/common/index.js.map +1 -1
  15. package/dist/module/feature.config.js +33 -24
  16. package/dist/module/feature.config.js.map +1 -1
  17. package/dist/module/index.js +11 -17
  18. package/dist/module/index.js.map +1 -1
  19. package/dist/module/reducers/featureBuilderReducer.js +0 -37
  20. package/dist/module/reducers/featureBuilderReducer.js.map +1 -1
  21. package/dist/module/utils/featureSelectors.js +1 -1
  22. package/dist/module/utils/featureSelectors.js.map +1 -1
  23. package/dist/module/utils/selectors.js +38 -0
  24. package/dist/module/utils/selectors.js.map +1 -0
  25. package/dist/module/values.config.a.js +2 -24
  26. package/dist/module/values.config.a.js.map +1 -1
  27. package/dist/module/values.config.b.js +2 -24
  28. package/dist/module/values.config.b.js.map +1 -1
  29. package/dist/module/values.config.c.js +2 -24
  30. package/dist/module/values.config.c.js.map +1 -1
  31. package/dist/module/values.config.d.js +2 -24
  32. package/dist/module/values.config.d.js.map +1 -1
  33. package/dist/module/values.config.js +16 -38
  34. package/dist/module/values.config.js.map +1 -1
  35. package/dist/module/webapi/featureBuilderAPI.js +3 -11
  36. package/dist/module/webapi/featureBuilderAPI.js.map +1 -1
  37. package/package.json +2 -2
  38. package/src/actions/featureBuilderActions.js +7 -4
  39. package/src/actions/featureBuilderStringsActions.js +13 -35
  40. package/src/components/FeatureDetailScreen.js +1 -1
  41. package/src/components/WidgetGrid.js +6 -2
  42. package/src/components/WidgetLarge.js +6 -8
  43. package/src/components/WidgetSmall.js +7 -11
  44. package/src/components/common/index.js +1 -1
  45. package/src/feature.config.js +35 -29
  46. package/src/index.js +11 -17
  47. package/src/reducers/featureBuilderReducer.js +0 -32
  48. package/src/utils/featureSelectors.js +1 -1
  49. package/src/utils/selectors.js +34 -0
  50. package/src/values.config.a.js +4 -35
  51. package/src/values.config.b.js +4 -35
  52. package/src/values.config.c.js +4 -35
  53. package/src/values.config.d.js +4 -35
  54. package/src/values.config.js +4 -35
  55. package/src/webapi/featureBuilderAPI.js +3 -11
@@ -1,47 +1,30 @@
1
1
  export const values = {
2
- // Feature identification
3
2
  featureKey: "feature-builder-b",
4
3
  featureName: "Feature B",
5
4
  targetFeatureDefinitionId: "feature-builder-b-default",
6
-
7
- // Redux state management
8
- reducerKey: "featureBuilderB", // Redux state slice name (must be unique per instance)
9
-
10
- // API routing
11
- apiNamespace: "feature-builder-b", // API endpoint prefix for multi-instance routing
12
-
13
- // Notifications
14
- notificationKey: "feature-builder-b", // Key for notifications.dataUpdated[...]
15
-
16
- // Default brand colors (single source of truth)
5
+ reducerKey: "featureBuilderB",
6
+ serviceKey: "feature-builder",
7
+ notificationKey: "feature-builder-b",
17
8
  colors: {
18
9
  defaultBrandMain: "#4A90E2",
19
10
  defaultBrandDark: "#2C5F8E",
20
11
  defaultBrandLight: "#D6E8F9",
21
12
  },
22
-
23
- // Screen names
24
13
  screens: {
25
14
  featureList: "FeatureBuilderListB",
26
15
  featureDetail: "FeatureBuilderDetailB",
27
16
  },
28
-
29
- // API endpoints
30
17
  api: {
31
18
  getDefinitions: "definition/get/all",
32
19
  getListings: "listing/get/all",
33
20
  getSingleListing: "listing/get/single",
34
21
  },
35
-
36
- // Layout types
37
22
  layoutTypes: {
38
23
  round: "round",
39
24
  square: "square",
40
25
  condensed: "condensed",
41
26
  feature: "feature",
42
27
  },
43
-
44
- // Field types
45
28
  fieldTypes: {
46
29
  string: "string",
47
30
  number: "number",
@@ -50,21 +33,15 @@ export const values = {
50
33
  pdf: "pdf",
51
34
  link: "link",
52
35
  },
53
-
54
- // Mandatory field IDs
55
36
  mandatoryFields: {
56
37
  title: "mandatory-title",
57
38
  featureImage: "mandatory-feature-image",
58
39
  },
59
-
60
- // Action types (with suffix to prevent collisions between instances)
61
40
  actions: {
62
41
  LOADING: "FB_LOADING_B",
63
42
  LOAD_SUCCESS: "FB_LOAD_SUCCESS_B",
64
43
  FAILURE: "FB_FAILURE_B",
65
44
  },
66
-
67
- // Navigation
68
45
  navigation: {
69
46
  gridMenu: {
70
47
  icon: "settings",
@@ -72,28 +49,20 @@ export const values = {
72
49
  navigate: "FeatureBuilderListB",
73
50
  },
74
51
  },
75
-
76
- // Default values
77
52
  defaults: {
78
53
  itemsPerWidget: 2,
79
- loadingTimeout: 30000, // 30 seconds
54
+ loadingTimeout: 30000,
80
55
  },
81
-
82
- // Widget configuration
83
56
  widget: {
84
57
  maxItems: 2,
85
58
  itemMinWidth: 120,
86
59
  itemMaxWidth: 150,
87
60
  },
88
-
89
- // UI dimensions
90
61
  dimensions: {
91
62
  cardHeight: 125,
92
63
  imageSize: 95,
93
64
  imageBorderRadius: 47.5,
94
65
  },
95
-
96
- // Common text labels
97
66
  labels: {
98
67
  emptyState: "No custom features available",
99
68
  defaultTitle: "Untitled",
@@ -1,47 +1,30 @@
1
1
  export const values = {
2
- // Feature identification
3
2
  featureKey: "feature-builder-c",
4
3
  featureName: "Feature C",
5
4
  targetFeatureDefinitionId: "feature-builder-c-default",
6
-
7
- // Redux state management
8
- reducerKey: "featureBuilderC", // Redux state slice name (must be unique per instance)
9
-
10
- // API routing
11
- apiNamespace: "feature-builder-c", // API endpoint prefix for multi-instance routing
12
-
13
- // Notifications
14
- notificationKey: "feature-builder-c", // Key for notifications.dataUpdated[...]
15
-
16
- // Default brand colors (single source of truth)
5
+ reducerKey: "featureBuilderC",
6
+ serviceKey: "feature-builder",
7
+ notificationKey: "feature-builder-c",
17
8
  colors: {
18
9
  defaultBrandMain: "#50C878",
19
10
  defaultBrandDark: "#3A9B5C",
20
11
  defaultBrandLight: "#D6F5E0",
21
12
  },
22
-
23
- // Screen names
24
13
  screens: {
25
14
  featureList: "FeatureBuilderListC",
26
15
  featureDetail: "FeatureBuilderDetailC",
27
16
  },
28
-
29
- // API endpoints
30
17
  api: {
31
18
  getDefinitions: "definition/get/all",
32
19
  getListings: "listing/get/all",
33
20
  getSingleListing: "listing/get/single",
34
21
  },
35
-
36
- // Layout types
37
22
  layoutTypes: {
38
23
  round: "round",
39
24
  square: "square",
40
25
  condensed: "condensed",
41
26
  feature: "feature",
42
27
  },
43
-
44
- // Field types
45
28
  fieldTypes: {
46
29
  string: "string",
47
30
  number: "number",
@@ -50,21 +33,15 @@ export const values = {
50
33
  pdf: "pdf",
51
34
  link: "link",
52
35
  },
53
-
54
- // Mandatory field IDs
55
36
  mandatoryFields: {
56
37
  title: "mandatory-title",
57
38
  featureImage: "mandatory-feature-image",
58
39
  },
59
-
60
- // Action types (with suffix to prevent collisions between instances)
61
40
  actions: {
62
41
  LOADING: "FB_LOADING_C",
63
42
  LOAD_SUCCESS: "FB_LOAD_SUCCESS_C",
64
43
  FAILURE: "FB_FAILURE_C",
65
44
  },
66
-
67
- // Navigation
68
45
  navigation: {
69
46
  gridMenu: {
70
47
  icon: "settings",
@@ -72,28 +49,20 @@ export const values = {
72
49
  navigate: "FeatureBuilderListC",
73
50
  },
74
51
  },
75
-
76
- // Default values
77
52
  defaults: {
78
53
  itemsPerWidget: 2,
79
- loadingTimeout: 30000, // 30 seconds
54
+ loadingTimeout: 30000,
80
55
  },
81
-
82
- // Widget configuration
83
56
  widget: {
84
57
  maxItems: 2,
85
58
  itemMinWidth: 120,
86
59
  itemMaxWidth: 150,
87
60
  },
88
-
89
- // UI dimensions
90
61
  dimensions: {
91
62
  cardHeight: 125,
92
63
  imageSize: 95,
93
64
  imageBorderRadius: 47.5,
94
65
  },
95
-
96
- // Common text labels
97
66
  labels: {
98
67
  emptyState: "No custom features available",
99
68
  defaultTitle: "Untitled",
@@ -1,47 +1,30 @@
1
1
  export const values = {
2
- // Feature identification
3
2
  featureKey: "feature-builder-d",
4
3
  featureName: "Feature D",
5
4
  targetFeatureDefinitionId: "feature-builder-d-default",
6
-
7
- // Redux state management
8
- reducerKey: "featureBuilderD", // Redux state slice name (must be unique per instance)
9
-
10
- // API routing
11
- apiNamespace: "feature-builder-d", // API endpoint prefix for multi-instance routing
12
-
13
- // Notifications
14
- notificationKey: "feature-builder-d", // Key for notifications.dataUpdated[...]
15
-
16
- // Default brand colors (single source of truth)
5
+ reducerKey: "featureBuilderD",
6
+ serviceKey: "feature-builder",
7
+ notificationKey: "feature-builder-d",
17
8
  colors: {
18
9
  defaultBrandMain: "#FFA500",
19
10
  defaultBrandDark: "#CC8400",
20
11
  defaultBrandLight: "#FFE8CC",
21
12
  },
22
-
23
- // Screen names
24
13
  screens: {
25
14
  featureList: "FeatureBuilderListD",
26
15
  featureDetail: "FeatureBuilderDetailD",
27
16
  },
28
-
29
- // API endpoints
30
17
  api: {
31
18
  getDefinitions: "definition/get/all",
32
19
  getListings: "listing/get/all",
33
20
  getSingleListing: "listing/get/single",
34
21
  },
35
-
36
- // Layout types
37
22
  layoutTypes: {
38
23
  round: "round",
39
24
  square: "square",
40
25
  condensed: "condensed",
41
26
  feature: "feature",
42
27
  },
43
-
44
- // Field types
45
28
  fieldTypes: {
46
29
  string: "string",
47
30
  number: "number",
@@ -50,21 +33,15 @@ export const values = {
50
33
  pdf: "pdf",
51
34
  link: "link",
52
35
  },
53
-
54
- // Mandatory field IDs
55
36
  mandatoryFields: {
56
37
  title: "mandatory-title",
57
38
  featureImage: "mandatory-feature-image",
58
39
  },
59
-
60
- // Action types (with suffix to prevent collisions between instances)
61
40
  actions: {
62
41
  LOADING: "FB_LOADING_D",
63
42
  LOAD_SUCCESS: "FB_LOAD_SUCCESS_D",
64
43
  FAILURE: "FB_FAILURE_D",
65
44
  },
66
-
67
- // Navigation
68
45
  navigation: {
69
46
  gridMenu: {
70
47
  icon: "settings",
@@ -72,28 +49,20 @@ export const values = {
72
49
  navigate: "FeatureBuilderListD",
73
50
  },
74
51
  },
75
-
76
- // Default values
77
52
  defaults: {
78
53
  itemsPerWidget: 2,
79
- loadingTimeout: 30000, // 30 seconds
54
+ loadingTimeout: 30000,
80
55
  },
81
-
82
- // Widget configuration
83
56
  widget: {
84
57
  maxItems: 2,
85
58
  itemMinWidth: 120,
86
59
  itemMaxWidth: 150,
87
60
  },
88
-
89
- // UI dimensions
90
61
  dimensions: {
91
62
  cardHeight: 125,
92
63
  imageSize: 95,
93
64
  imageBorderRadius: 47.5,
94
65
  },
95
-
96
- // Common text labels
97
66
  labels: {
98
67
  emptyState: "No custom features available",
99
68
  defaultTitle: "Untitled",
@@ -1,47 +1,30 @@
1
1
  export const values = {
2
- // Feature identification
3
2
  featureKey: "feature-builder-d",
4
3
  featureName: "Feature D",
5
4
  targetFeatureDefinitionId: "feature-builder-d-default",
6
-
7
- // Redux state management
8
- reducerKey: "featureBuilderD", // Redux state slice name (must be unique per instance)
9
-
10
- // API routing
11
- apiNamespace: "feature-builder-d", // API endpoint prefix for multi-instance routing
12
-
13
- // Notifications
14
- notificationKey: "feature-builder-d", // Key for notifications.dataUpdated[...]
15
-
16
- // Default brand colors (single source of truth)
5
+ reducerKey: "featureBuilderD",
6
+ serviceKey: "feature-builder",
7
+ notificationKey: "feature-builder-d",
17
8
  colors: {
18
9
  defaultBrandMain: "#FFA500",
19
10
  defaultBrandDark: "#CC8400",
20
11
  defaultBrandLight: "#FFE8CC",
21
12
  },
22
-
23
- // Screen names
24
13
  screens: {
25
14
  featureList: "FeatureBuilderListD",
26
15
  featureDetail: "FeatureBuilderDetailD",
27
16
  },
28
-
29
- // API endpoints
30
17
  api: {
31
18
  getDefinitions: "definition/get/all",
32
19
  getListings: "listing/get/all",
33
20
  getSingleListing: "listing/get/single",
34
21
  },
35
-
36
- // Layout types
37
22
  layoutTypes: {
38
23
  round: "round",
39
24
  square: "square",
40
25
  condensed: "condensed",
41
26
  feature: "feature",
42
27
  },
43
-
44
- // Field types
45
28
  fieldTypes: {
46
29
  string: "string",
47
30
  number: "number",
@@ -50,21 +33,15 @@ export const values = {
50
33
  pdf: "pdf",
51
34
  link: "link",
52
35
  },
53
-
54
- // Mandatory field IDs
55
36
  mandatoryFields: {
56
37
  title: "mandatory-title",
57
38
  featureImage: "mandatory-feature-image",
58
39
  },
59
-
60
- // Action types (with suffix to prevent collisions between instances)
61
40
  actions: {
62
41
  LOADING: "FB_LOADING_D",
63
42
  LOAD_SUCCESS: "FB_LOAD_SUCCESS_D",
64
43
  FAILURE: "FB_FAILURE_D",
65
44
  },
66
-
67
- // Navigation
68
45
  navigation: {
69
46
  gridMenu: {
70
47
  icon: "settings",
@@ -72,28 +49,20 @@ export const values = {
72
49
  navigate: "FeatureBuilderListD",
73
50
  },
74
51
  },
75
-
76
- // Default values
77
52
  defaults: {
78
53
  itemsPerWidget: 2,
79
- loadingTimeout: 30000, // 30 seconds
54
+ loadingTimeout: 30000,
80
55
  },
81
-
82
- // Widget configuration
83
56
  widget: {
84
57
  maxItems: 2,
85
58
  itemMinWidth: 120,
86
59
  itemMaxWidth: 150,
87
60
  },
88
-
89
- // UI dimensions
90
61
  dimensions: {
91
62
  cardHeight: 125,
92
63
  imageSize: 95,
93
64
  imageBorderRadius: 47.5,
94
65
  },
95
-
96
- // Common text labels
97
66
  labels: {
98
67
  emptyState: "No custom features available",
99
68
  defaultTitle: "Untitled",
@@ -2,15 +2,9 @@ import { getUrl } from "./helper";
2
2
  import { authedFunction } from "../js";
3
3
  import { values } from "../values.config";
4
4
 
5
- // Helper function for constructing URLs
6
- const getFeatureBuilderUrl = (action, query = null) => {
7
- return getUrl(values.apiNamespace, action, query);
8
- };
9
-
10
5
  export const featureBuilderAPI = {
11
- // Fetch all feature definitions
12
6
  getFeatureDefinitions: (site) => {
13
- const url = getFeatureBuilderUrl(values.api.getDefinitions, { site });
7
+ const url = getUrl(values.serviceKey, values.api.getDefinitions, { site });
14
8
 
15
9
  const request = {
16
10
  method: "GET",
@@ -26,13 +20,12 @@ export const featureBuilderAPI = {
26
20
  });
27
21
  },
28
22
 
29
- // Fetch listings for all features or specific feature
30
23
  getFeatureListings: (site, featureDefinitionId = null) => {
31
24
  const queryParams = { site };
32
25
  if (featureDefinitionId) {
33
26
  queryParams.featureDefinitionId = featureDefinitionId;
34
27
  }
35
- const url = getFeatureBuilderUrl(values.api.getListings, queryParams);
28
+ const url = getUrl(values.serviceKey, values.api.getListings, queryParams);
36
29
 
37
30
  const request = {
38
31
  method: "GET",
@@ -48,12 +41,11 @@ export const featureBuilderAPI = {
48
41
  });
49
42
  },
50
43
 
51
- // Fetch a single listing by ID
52
44
  getSingleListing: (site, listingId) => {
53
45
  if (!listingId) {
54
46
  return Promise.reject(new Error("Listing ID is required"));
55
47
  }
56
- const url = getFeatureBuilderUrl(values.api.getSingleListing, {
48
+ const url = getUrl(values.serviceKey, values.api.getSingleListing, {
57
49
  site,
58
50
  id: listingId,
59
51
  });