@plusscommunities/pluss-feature-builder-web-a 1.0.2-beta.6 → 1.0.2-beta.7
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
CHANGED
|
@@ -337,16 +337,14 @@ const selectIsStepAccessible = step => state => {
|
|
|
337
337
|
|
|
338
338
|
// Get current sort method
|
|
339
339
|
const selectSortBy = state => {
|
|
340
|
-
var _listingsState$sortBy;
|
|
341
340
|
const listingsState = selectListingsState(state);
|
|
342
|
-
return (
|
|
341
|
+
return (listingsState === null || listingsState === void 0 ? void 0 : listingsState.sortBy) || "newest";
|
|
343
342
|
};
|
|
344
343
|
|
|
345
344
|
// Get show deleted toggle state
|
|
346
345
|
const selectShowDeleted = state => {
|
|
347
|
-
var _listingsState$showDe;
|
|
348
346
|
const listingsState = selectListingsState(state);
|
|
349
|
-
return (
|
|
347
|
+
return (listingsState === null || listingsState === void 0 ? void 0 : listingsState.showDeleted) || false;
|
|
350
348
|
};
|
|
351
349
|
|
|
352
350
|
// Get sorted and filtered listings
|
|
@@ -5565,10 +5563,9 @@ const formReducer = function () {
|
|
|
5565
5563
|
switch (type) {
|
|
5566
5564
|
case actionsTypes.SET_INITIAL_VALUES:
|
|
5567
5565
|
{
|
|
5568
|
-
var _payload$featureDefin, _definitionWrapper$de;
|
|
5569
5566
|
// The actual definition data is in payload.featureDefinition.definition
|
|
5570
|
-
const definitionWrapper =
|
|
5571
|
-
const definition =
|
|
5567
|
+
const definitionWrapper = payload && payload.featureDefinition || payload;
|
|
5568
|
+
const definition = definitionWrapper && definitionWrapper.definition || definitionWrapper;
|
|
5572
5569
|
|
|
5573
5570
|
// Validate and map definition data to form state structure
|
|
5574
5571
|
const mappedValues = {
|
|
@@ -5784,12 +5781,12 @@ const definitionReducer = function () {
|
|
|
5784
5781
|
let definitionId = values.featureId; // Always use hardcoded ID
|
|
5785
5782
|
|
|
5786
5783
|
if (mode === "edit" && data) {
|
|
5787
|
-
var
|
|
5784
|
+
var _definition;
|
|
5788
5785
|
// Extract from API response for edit mode
|
|
5789
5786
|
// Handle nested structure: data.featureDefinition.definition
|
|
5790
|
-
const featureDefinitionWrapper =
|
|
5791
|
-
definition =
|
|
5792
|
-
definitionId =
|
|
5787
|
+
const featureDefinitionWrapper = data && data.featureDefinition || data;
|
|
5788
|
+
definition = featureDefinitionWrapper && featureDefinitionWrapper.definition || featureDefinitionWrapper;
|
|
5789
|
+
definitionId = featureDefinitionWrapper && featureDefinitionWrapper.id || values.featureId;
|
|
5793
5790
|
|
|
5794
5791
|
// Ensure fields array exists and preserves order property
|
|
5795
5792
|
if ((_definition = definition) !== null && _definition !== void 0 && _definition.fields) {
|
|
@@ -7762,12 +7759,12 @@ const Reducers = (() => {
|
|
|
7762
7759
|
})();
|
|
7763
7760
|
const Screens = (() => {
|
|
7764
7761
|
const screens = {};
|
|
7765
|
-
screens[
|
|
7766
|
-
screens[
|
|
7767
|
-
screens[
|
|
7768
|
-
screens[
|
|
7769
|
-
screens[
|
|
7770
|
-
screens[
|
|
7762
|
+
screens[values.screenFormOverviewStep] = FormOverviewStep;
|
|
7763
|
+
screens[values.screenFormFieldsStep] = FormFieldsStep;
|
|
7764
|
+
screens[values.screenFormLayoutStep] = FormLayoutStep;
|
|
7765
|
+
screens[values.screenListingScreen] = ListingScreen$1;
|
|
7766
|
+
screens[values.pageCreateListing] = CreateListingPage;
|
|
7767
|
+
screens[values.pageEditListing] = EditListingPage;
|
|
7771
7768
|
return screens;
|
|
7772
7769
|
})();
|
|
7773
7770
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -18,12 +18,12 @@ export const Reducers = (() => {
|
|
|
18
18
|
export const Screens = (() => {
|
|
19
19
|
const screens = {};
|
|
20
20
|
|
|
21
|
-
screens[
|
|
22
|
-
screens[
|
|
23
|
-
screens[
|
|
24
|
-
screens[
|
|
25
|
-
screens[
|
|
26
|
-
screens[
|
|
21
|
+
screens[values.screenFormOverviewStep] = FormOverviewStep;
|
|
22
|
+
screens[values.screenFormFieldsStep] = FormFieldsStep;
|
|
23
|
+
screens[values.screenFormLayoutStep] = FormLayoutStep;
|
|
24
|
+
screens[values.screenListingScreen] = ListingScreen;
|
|
25
|
+
screens[values.pageCreateListing] = CreateListingPage;
|
|
26
|
+
screens[values.pageEditListing] = EditListingPage;
|
|
27
27
|
return screens;
|
|
28
28
|
})();
|
|
29
29
|
|
|
@@ -277,8 +277,8 @@ const formReducer = (state = INITIAL_FORM_STATE, action) => {
|
|
|
277
277
|
switch (type) {
|
|
278
278
|
case formActionTypes.SET_INITIAL_VALUES: {
|
|
279
279
|
// The actual definition data is in payload.featureDefinition.definition
|
|
280
|
-
const definitionWrapper = payload
|
|
281
|
-
const definition = definitionWrapper
|
|
280
|
+
const definitionWrapper = (payload && payload.featureDefinition) || payload;
|
|
281
|
+
const definition = (definitionWrapper && definitionWrapper.definition) || definitionWrapper;
|
|
282
282
|
|
|
283
283
|
// Validate and map definition data to form state structure
|
|
284
284
|
const mappedValues = {
|
|
@@ -511,10 +511,10 @@ const definitionReducer = (state = INITIAL_STATE.definition, action) => {
|
|
|
511
511
|
// Extract from API response for edit mode
|
|
512
512
|
// Handle nested structure: data.featureDefinition.definition
|
|
513
513
|
const featureDefinitionWrapper =
|
|
514
|
-
data
|
|
514
|
+
(data && data.featureDefinition) || data;
|
|
515
515
|
definition =
|
|
516
|
-
featureDefinitionWrapper
|
|
517
|
-
definitionId = featureDefinitionWrapper
|
|
516
|
+
(featureDefinitionWrapper && featureDefinitionWrapper.definition) || featureDefinitionWrapper;
|
|
517
|
+
definitionId = (featureDefinitionWrapper && featureDefinitionWrapper.id) || values.featureId;
|
|
518
518
|
|
|
519
519
|
// Ensure fields array exists and preserves order property
|
|
520
520
|
if (definition?.fields) {
|
|
@@ -431,13 +431,13 @@ export const selectIsStepAccessible = (step) => (state) => {
|
|
|
431
431
|
// Get current sort method
|
|
432
432
|
export const selectSortBy = (state) => {
|
|
433
433
|
const listingsState = selectListingsState(state);
|
|
434
|
-
return listingsState?.sortBy
|
|
434
|
+
return listingsState?.sortBy || "newest";
|
|
435
435
|
};
|
|
436
436
|
|
|
437
437
|
// Get show deleted toggle state
|
|
438
438
|
export const selectShowDeleted = (state) => {
|
|
439
439
|
const listingsState = selectListingsState(state);
|
|
440
|
-
return listingsState?.showDeleted
|
|
440
|
+
return listingsState?.showDeleted || false;
|
|
441
441
|
};
|
|
442
442
|
|
|
443
443
|
// Get sorted and filtered listings
|