@configura/web-ui 2.1.0-alpha.1 → 2.1.0-alpha.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/.eslintrc.json +5 -5
- package/.postcssrc.json +8 -8
- package/LICENSE +201 -201
- package/README.md +1 -1
- package/dist/components/CanvasWrapper.d.ts +9 -9
- package/dist/components/CanvasWrapper.js +8 -8
- package/dist/components/CfgPriceView.d.ts +6 -6
- package/dist/components/CfgPriceView.js +13 -13
- package/dist/components/ConfigurationActionsButtonRow.d.ts +14 -14
- package/dist/components/ConfigurationActionsButtonRow.js +16 -16
- package/dist/components/Configurator.d.ts +12 -12
- package/dist/components/Configurator.js +15 -15
- package/dist/components/ConfiguratorWrapper.d.ts +8 -8
- package/dist/components/ConfiguratorWrapper.js +5 -5
- package/dist/components/CurrencyPrice.d.ts +9 -9
- package/dist/components/CurrencyPrice.js +7 -7
- package/dist/components/ErrorContext.d.ts +2 -2
- package/dist/components/ErrorContext.js +2 -2
- package/dist/components/ExpandableHeadingRow.d.ts +15 -15
- package/dist/components/ExpandableHeadingRow.js +23 -23
- package/dist/components/Loading.d.ts +13 -13
- package/dist/components/Loading.js +20 -20
- package/dist/components/ProductInformation.d.ts +13 -13
- package/dist/components/ProductInformation.js +14 -14
- package/dist/components/ResetButton.d.ts +8 -8
- package/dist/components/ResetButton.js +7 -7
- package/dist/components/ShareView.d.ts +3 -3
- package/dist/components/ShareView.js +21 -21
- package/dist/components/TaskListView.d.ts +8 -8
- package/dist/components/TaskListView.js +69 -69
- package/dist/components/TaskStartView.d.ts +12 -12
- package/dist/components/TaskStartView.js +29 -29
- package/dist/components/icons/Checkmark.d.ts +6 -6
- package/dist/components/icons/Checkmark.js +12 -12
- package/dist/components/icons/Chevron.d.ts +7 -7
- package/dist/components/icons/Chevron.js +18 -18
- package/dist/components/icons/CircleXmarkIcon.d.ts +3 -3
- package/dist/components/icons/CircleXmarkIcon.js +8 -8
- package/dist/components/icons/DownloadIcon.d.ts +3 -3
- package/dist/components/icons/DownloadIcon.js +8 -8
- package/dist/components/icons/ErrorIcon.d.ts +3 -3
- package/dist/components/icons/ErrorIcon.js +8 -8
- package/dist/components/productConfiguration/CfgAdditionalProductView.d.ts +3 -3
- package/dist/components/productConfiguration/CfgAdditionalProductView.js +46 -46
- package/dist/components/productConfiguration/CfgCheckboxView.d.ts +4 -4
- package/dist/components/productConfiguration/CfgCheckboxView.js +7 -7
- package/dist/components/productConfiguration/CfgCheckboxesView.d.ts +4 -4
- package/dist/components/productConfiguration/CfgCheckboxesView.js +20 -20
- package/dist/components/productConfiguration/CfgConfigurationCommonView.d.ts +7 -7
- package/dist/components/productConfiguration/CfgConfigurationCommonView.js +8 -8
- package/dist/components/productConfiguration/CfgDropdownOptionView.d.ts +4 -4
- package/dist/components/productConfiguration/CfgDropdownOptionView.js +23 -23
- package/dist/components/productConfiguration/CfgDropdownView.d.ts +4 -4
- package/dist/components/productConfiguration/CfgDropdownView.js +23 -23
- package/dist/components/productConfiguration/CfgFeatureView.d.ts +72 -72
- package/dist/components/productConfiguration/CfgFeatureView.js +77 -76
- package/dist/components/productConfiguration/CfgGroupView.d.ts +4 -4
- package/dist/components/productConfiguration/CfgGroupView.js +7 -7
- package/dist/components/productConfiguration/CfgMiscFile.d.ts +4 -4
- package/dist/components/productConfiguration/CfgMiscFile.js +9 -9
- package/dist/components/productConfiguration/CfgMiscFiles.d.ts +4 -4
- package/dist/components/productConfiguration/CfgMiscFiles.js +5 -5
- package/dist/components/productConfiguration/CfgNote.d.ts +4 -4
- package/dist/components/productConfiguration/CfgNote.js +15 -15
- package/dist/components/productConfiguration/CfgNotes.d.ts +4 -4
- package/dist/components/productConfiguration/CfgNotes.js +5 -5
- package/dist/components/productConfiguration/CfgOptionCommonView.d.ts +6 -6
- package/dist/components/productConfiguration/CfgOptionCommonView.js +53 -50
- package/dist/components/productConfiguration/CfgOptionNumericView.d.ts +29 -29
- package/dist/components/productConfiguration/CfgOptionNumericView.js +132 -132
- package/dist/components/productConfiguration/CfgOptionPriceView.d.ts +9 -9
- package/dist/components/productConfiguration/CfgOptionPriceView.js +31 -31
- package/dist/components/productConfiguration/CfgProductConfigurationView.d.ts +24 -22
- package/dist/components/productConfiguration/CfgProductConfigurationView.js +50 -50
- package/dist/css/web-ui.css.map +1 -1
- package/dist/index.d.ts +29 -29
- package/dist/index.js +29 -29
- package/dist/scss/_button.scss +52 -52
- package/dist/scss/_configurator.scss +132 -132
- package/dist/scss/_expandable.scss +38 -38
- package/dist/scss/_feature-item.scss +146 -146
- package/dist/scss/_forms.scss +44 -44
- package/dist/scss/_hr.scss +16 -16
- package/dist/scss/_loading.scss +98 -98
- package/dist/scss/_misc-file-and-note.scss +44 -44
- package/dist/scss/_mixins.scss +56 -56
- package/dist/scss/_option-tree.scss +29 -29
- package/dist/scss/_product-information.scss +53 -53
- package/dist/scss/_range-view.scss +39 -39
- package/dist/scss/_slider.scss +70 -70
- package/dist/scss/_tasks.scss +72 -72
- package/dist/scss/_themed.scss +156 -156
- package/dist/scss/_utilities.scss +21 -21
- package/dist/scss/_variables.scss +6 -6
- package/dist/scss/icons/_checkmark.scss +46 -46
- package/dist/scss/icons/_chevron.scss +62 -62
- package/dist/scss/icons/_circle-xmark-icon.scss +24 -24
- package/dist/scss/icons/_download-icon.scss +24 -24
- package/dist/scss/icons/_error-icon.scss +24 -24
- package/dist/scss/web-ui.scss +11 -11
- package/dist/useCatParams.d.ts +17 -17
- package/dist/useCatParams.js +29 -29
- package/dist/useObservable.d.ts +4 -4
- package/dist/useObservable.js +18 -18
- package/dist/useRerender.d.ts +1 -1
- package/dist/useRerender.js +5 -5
- package/dist/useResize.d.ts +6 -6
- package/dist/useResize.js +47 -47
- package/dist/useSelected.d.ts +2 -2
- package/dist/useSelected.js +13 -13
- package/dist/useUniqueId.d.ts +1 -1
- package/dist/useUniqueId.js +3 -3
- package/dist/utilities.d.ts +5 -5
- package/dist/utilities.js +1 -1
- package/package.json +3 -3
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import { CfgFeature, CfgOption, CfgProduct, DtoMiscFile, DtoNote } from "@configura/web-api";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { CssProps } from "../../utilities.js";
|
|
4
|
-
import { PassthroughProps } from "./CfgProductConfigurationView.js";
|
|
5
|
-
export declare type CfgFeatureViewProps = CfgProductConfigurationComponentAndPassthroughProps & {
|
|
6
|
-
feature: CfgFeature;
|
|
7
|
-
};
|
|
8
|
-
export declare type CfgOptionViewProps = CfgProductConfigurationComponentAndPassthroughProps & {
|
|
9
|
-
option: CfgOption;
|
|
10
|
-
};
|
|
11
|
-
export declare type CfgAdditionalProductViewProps = CfgProductConfigurationComponentAndPassthroughProps & {
|
|
12
|
-
product: CfgProduct;
|
|
13
|
-
permanentlyExpandedLevels: number;
|
|
14
|
-
};
|
|
15
|
-
export declare type CfgNoteViewProps = CssProps & {
|
|
16
|
-
note: DtoNote;
|
|
17
|
-
};
|
|
18
|
-
declare type CfgNoteComponent = {
|
|
19
|
-
noteComponent: React.ComponentType<CfgNoteViewProps>;
|
|
20
|
-
};
|
|
21
|
-
export declare type CfgNotesViewProps = CssProps & CfgNoteComponent & {
|
|
22
|
-
notes: DtoNote[];
|
|
23
|
-
};
|
|
24
|
-
export declare type CfgMiscFileViewProps = CssProps & {
|
|
25
|
-
miscFile: DtoMiscFile;
|
|
26
|
-
};
|
|
27
|
-
declare type CfgMiscFileComponent = {
|
|
28
|
-
miscFileComponent: React.ComponentType<CfgMiscFileViewProps>;
|
|
29
|
-
};
|
|
30
|
-
export declare type CfgMiscFilesViewProps = CssProps & CfgMiscFileComponent & {
|
|
31
|
-
miscFiles: DtoMiscFile[];
|
|
32
|
-
};
|
|
33
|
-
export declare type CfgProductConfigurationComponent = {
|
|
34
|
-
additionalProductComponent: React.ComponentType<CfgAdditionalProductViewProps>;
|
|
35
|
-
featureFlattenComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
36
|
-
featureGroupComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
37
|
-
featureSelectManyComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
38
|
-
optionSelectManyComponent: React.ComponentType<CfgOptionViewProps>;
|
|
39
|
-
featureSelectOneComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
40
|
-
optionSelectOneComponent: React.ComponentType<CfgOptionViewProps>;
|
|
41
|
-
notesComponent: React.ComponentType<CfgNotesViewProps>;
|
|
42
|
-
miscFilesComponent: React.ComponentType<CfgMiscFilesViewProps>;
|
|
43
|
-
} & CfgMiscFileComponent & CfgNoteComponent;
|
|
44
|
-
export declare const completeWithDefaultProductConfigurationComponents: <T>(incomplete: T & Partial<CfgProductConfigurationComponent>) => T & {
|
|
45
|
-
additionalProductComponent: React.ComponentType<CfgAdditionalProductViewProps>;
|
|
46
|
-
featureFlattenComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
47
|
-
featureGroupComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
48
|
-
featureSelectManyComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
49
|
-
optionSelectManyComponent: React.ComponentType<CfgOptionViewProps>;
|
|
50
|
-
featureSelectOneComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
51
|
-
optionSelectOneComponent: React.ComponentType<CfgOptionViewProps>;
|
|
52
|
-
notesComponent: React.ComponentType<CfgNotesViewProps>;
|
|
53
|
-
miscFilesComponent: React.ComponentType<CfgMiscFilesViewProps>;
|
|
54
|
-
} & CfgMiscFileComponent & CfgNoteComponent;
|
|
55
|
-
export declare const useCompleteWithDefaultProductConfigurationComponents: (incomplete: Partial<CfgProductConfigurationComponent>) => CfgProductConfigurationComponent;
|
|
56
|
-
export declare type CfgProductConfigurationComponentAndPassthroughProps = PassthroughProps & CssProps & CfgProductConfigurationComponent;
|
|
57
|
-
export declare const forwardProps: (props: CfgProductConfigurationComponentAndPassthroughProps) => CfgProductConfigurationComponentAndPassthroughProps;
|
|
58
|
-
export declare const CfgFeatureView: React.FC<CfgFeatureViewProps & CssProps>;
|
|
59
|
-
export declare const CfgFeatureViewMemo: React.NamedExoticComponent<PassthroughProps & CssProps & {
|
|
60
|
-
additionalProductComponent: React.ComponentType<CfgAdditionalProductViewProps>;
|
|
61
|
-
featureFlattenComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
62
|
-
featureGroupComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
63
|
-
featureSelectManyComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
64
|
-
optionSelectManyComponent: React.ComponentType<CfgOptionViewProps>;
|
|
65
|
-
featureSelectOneComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
66
|
-
optionSelectOneComponent: React.ComponentType<CfgOptionViewProps>;
|
|
67
|
-
notesComponent: React.ComponentType<CfgNotesViewProps>;
|
|
68
|
-
miscFilesComponent: React.ComponentType<CfgMiscFilesViewProps>;
|
|
69
|
-
} & CfgMiscFileComponent & CfgNoteComponent & {
|
|
70
|
-
feature: CfgFeature;
|
|
71
|
-
}>;
|
|
72
|
-
export {};
|
|
1
|
+
import { CfgFeature, CfgOption, CfgProduct, DtoMiscFile, DtoNote } from "@configura/web-api";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { CssProps } from "../../utilities.js";
|
|
4
|
+
import { PassthroughProps } from "./CfgProductConfigurationView.js";
|
|
5
|
+
export declare type CfgFeatureViewProps = CfgProductConfigurationComponentAndPassthroughProps & {
|
|
6
|
+
feature: CfgFeature;
|
|
7
|
+
};
|
|
8
|
+
export declare type CfgOptionViewProps = CfgProductConfigurationComponentAndPassthroughProps & {
|
|
9
|
+
option: CfgOption;
|
|
10
|
+
};
|
|
11
|
+
export declare type CfgAdditionalProductViewProps = CfgProductConfigurationComponentAndPassthroughProps & {
|
|
12
|
+
product: CfgProduct;
|
|
13
|
+
permanentlyExpandedLevels: number;
|
|
14
|
+
};
|
|
15
|
+
export declare type CfgNoteViewProps = CssProps & {
|
|
16
|
+
note: DtoNote;
|
|
17
|
+
};
|
|
18
|
+
declare type CfgNoteComponent = {
|
|
19
|
+
noteComponent: React.ComponentType<CfgNoteViewProps>;
|
|
20
|
+
};
|
|
21
|
+
export declare type CfgNotesViewProps = CssProps & CfgNoteComponent & {
|
|
22
|
+
notes: DtoNote[];
|
|
23
|
+
};
|
|
24
|
+
export declare type CfgMiscFileViewProps = CssProps & {
|
|
25
|
+
miscFile: DtoMiscFile;
|
|
26
|
+
};
|
|
27
|
+
declare type CfgMiscFileComponent = {
|
|
28
|
+
miscFileComponent: React.ComponentType<CfgMiscFileViewProps>;
|
|
29
|
+
};
|
|
30
|
+
export declare type CfgMiscFilesViewProps = CssProps & CfgMiscFileComponent & {
|
|
31
|
+
miscFiles: DtoMiscFile[];
|
|
32
|
+
};
|
|
33
|
+
export declare type CfgProductConfigurationComponent = {
|
|
34
|
+
additionalProductComponent: React.ComponentType<CfgAdditionalProductViewProps>;
|
|
35
|
+
featureFlattenComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
36
|
+
featureGroupComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
37
|
+
featureSelectManyComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
38
|
+
optionSelectManyComponent: React.ComponentType<CfgOptionViewProps>;
|
|
39
|
+
featureSelectOneComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
40
|
+
optionSelectOneComponent: React.ComponentType<CfgOptionViewProps>;
|
|
41
|
+
notesComponent: React.ComponentType<CfgNotesViewProps>;
|
|
42
|
+
miscFilesComponent: React.ComponentType<CfgMiscFilesViewProps>;
|
|
43
|
+
} & CfgMiscFileComponent & CfgNoteComponent;
|
|
44
|
+
export declare const completeWithDefaultProductConfigurationComponents: <T>(incomplete: T & Partial<CfgProductConfigurationComponent>) => T & {
|
|
45
|
+
additionalProductComponent: React.ComponentType<CfgAdditionalProductViewProps>;
|
|
46
|
+
featureFlattenComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
47
|
+
featureGroupComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
48
|
+
featureSelectManyComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
49
|
+
optionSelectManyComponent: React.ComponentType<CfgOptionViewProps>;
|
|
50
|
+
featureSelectOneComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
51
|
+
optionSelectOneComponent: React.ComponentType<CfgOptionViewProps>;
|
|
52
|
+
notesComponent: React.ComponentType<CfgNotesViewProps>;
|
|
53
|
+
miscFilesComponent: React.ComponentType<CfgMiscFilesViewProps>;
|
|
54
|
+
} & CfgMiscFileComponent & CfgNoteComponent;
|
|
55
|
+
export declare const useCompleteWithDefaultProductConfigurationComponents: (incomplete: Partial<CfgProductConfigurationComponent>) => CfgProductConfigurationComponent;
|
|
56
|
+
export declare type CfgProductConfigurationComponentAndPassthroughProps = PassthroughProps & CssProps & CfgProductConfigurationComponent;
|
|
57
|
+
export declare const forwardProps: (props: CfgProductConfigurationComponentAndPassthroughProps) => CfgProductConfigurationComponentAndPassthroughProps;
|
|
58
|
+
export declare const CfgFeatureView: React.FC<CfgFeatureViewProps & CssProps>;
|
|
59
|
+
export declare const CfgFeatureViewMemo: React.NamedExoticComponent<PassthroughProps & CssProps & {
|
|
60
|
+
additionalProductComponent: React.ComponentType<CfgAdditionalProductViewProps>;
|
|
61
|
+
featureFlattenComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
62
|
+
featureGroupComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
63
|
+
featureSelectManyComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
64
|
+
optionSelectManyComponent: React.ComponentType<CfgOptionViewProps>;
|
|
65
|
+
featureSelectOneComponent: React.ComponentType<CfgFeatureViewProps>;
|
|
66
|
+
optionSelectOneComponent: React.ComponentType<CfgOptionViewProps>;
|
|
67
|
+
notesComponent: React.ComponentType<CfgNotesViewProps>;
|
|
68
|
+
miscFilesComponent: React.ComponentType<CfgMiscFilesViewProps>;
|
|
69
|
+
} & CfgMiscFileComponent & CfgNoteComponent & {
|
|
70
|
+
feature: CfgFeature;
|
|
71
|
+
}>;
|
|
72
|
+
export {};
|
|
73
73
|
//# sourceMappingURL=CfgFeatureView.d.ts.map
|
|
@@ -1,76 +1,77 @@
|
|
|
1
|
-
import { SelectionType, } from "@configura/web-api";
|
|
2
|
-
import React, { useMemo } from "react";
|
|
3
|
-
import { CfgAdditionalProductView } from "./CfgAdditionalProductView.js";
|
|
4
|
-
import { CfgCheckboxesViewMemo } from "./CfgCheckboxesView.js";
|
|
5
|
-
import { CfgCheckboxViewMemo } from "./CfgCheckboxView.js";
|
|
6
|
-
import { CfgDropdownOptionViewMemo } from "./CfgDropdownOptionView.js";
|
|
7
|
-
import { CfgDropdownViewMemo } from "./CfgDropdownView.js";
|
|
8
|
-
import { CfgGroupViewMemo } from "./CfgGroupView.js";
|
|
9
|
-
import { CfgMiscFile } from "./CfgMiscFile.js";
|
|
10
|
-
import { CfgMiscFiles } from "./CfgMiscFiles.js";
|
|
11
|
-
import { CfgNote } from "./CfgNote.js";
|
|
12
|
-
import { CfgNotes } from "./CfgNotes.js";
|
|
13
|
-
export const completeWithDefaultProductConfigurationComponents = (incomplete) => {
|
|
14
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
15
|
-
return (Object.assign(Object.assign({}, incomplete), { additionalProductComponent: (_a = incomplete.additionalProductComponent) !== null && _a !== void 0 ? _a : CfgAdditionalProductView, featureFlattenComponent: (_b = incomplete.featureFlattenComponent) !== null && _b !== void 0 ? _b : CfgGroupViewMemo, featureGroupComponent: (_c = incomplete.featureGroupComponent) !== null && _c !== void 0 ? _c : CfgGroupViewMemo, featureSelectManyComponent: (_d = incomplete.featureSelectManyComponent) !== null && _d !== void 0 ? _d : CfgCheckboxesViewMemo, optionSelectManyComponent: (_e = incomplete.optionSelectManyComponent) !== null && _e !== void 0 ? _e : CfgCheckboxViewMemo, featureSelectOneComponent: (_f = incomplete.featureSelectOneComponent) !== null && _f !== void 0 ? _f : CfgDropdownViewMemo, optionSelectOneComponent: (_g = incomplete.optionSelectOneComponent) !== null && _g !== void 0 ? _g : CfgDropdownOptionViewMemo, noteComponent: (_h = incomplete.noteComponent) !== null && _h !== void 0 ? _h : CfgNote, notesComponent: (_j = incomplete.notesComponent) !== null && _j !== void 0 ? _j : CfgNotes, miscFileComponent: (_k = incomplete.miscFileComponent) !== null && _k !== void 0 ? _k : CfgMiscFile, miscFilesComponent: (_l = incomplete.miscFilesComponent) !== null && _l !== void 0 ? _l : CfgMiscFiles }));
|
|
16
|
-
};
|
|
17
|
-
export const useCompleteWithDefaultProductConfigurationComponents = (incomplete) => {
|
|
18
|
-
const { additionalProductComponent, featureFlattenComponent, featureGroupComponent, featureSelectManyComponent, featureSelectOneComponent, optionSelectManyComponent, optionSelectOneComponent, noteComponent, notesComponent, miscFileComponent, miscFilesComponent, } = incomplete;
|
|
19
|
-
return useMemo(() => completeWithDefaultProductConfigurationComponents({
|
|
20
|
-
additionalProductComponent,
|
|
21
|
-
featureFlattenComponent,
|
|
22
|
-
featureGroupComponent,
|
|
23
|
-
featureSelectManyComponent,
|
|
24
|
-
featureSelectOneComponent,
|
|
25
|
-
optionSelectManyComponent,
|
|
26
|
-
optionSelectOneComponent,
|
|
27
|
-
noteComponent,
|
|
28
|
-
notesComponent,
|
|
29
|
-
miscFileComponent,
|
|
30
|
-
miscFilesComponent,
|
|
31
|
-
}), [
|
|
32
|
-
additionalProductComponent,
|
|
33
|
-
featureFlattenComponent,
|
|
34
|
-
featureGroupComponent,
|
|
35
|
-
featureSelectManyComponent,
|
|
36
|
-
featureSelectOneComponent,
|
|
37
|
-
optionSelectManyComponent,
|
|
38
|
-
optionSelectOneComponent,
|
|
39
|
-
noteComponent,
|
|
40
|
-
notesComponent,
|
|
41
|
-
miscFileComponent,
|
|
42
|
-
miscFilesComponent,
|
|
43
|
-
]);
|
|
44
|
-
};
|
|
45
|
-
export const forwardProps = (props) => ({
|
|
46
|
-
upchargeDisplayMode: props.upchargeDisplayMode,
|
|
47
|
-
startOpen: props.startOpen,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
1
|
+
import { SelectionType, } from "@configura/web-api";
|
|
2
|
+
import React, { useMemo } from "react";
|
|
3
|
+
import { CfgAdditionalProductView } from "./CfgAdditionalProductView.js";
|
|
4
|
+
import { CfgCheckboxesViewMemo } from "./CfgCheckboxesView.js";
|
|
5
|
+
import { CfgCheckboxViewMemo } from "./CfgCheckboxView.js";
|
|
6
|
+
import { CfgDropdownOptionViewMemo } from "./CfgDropdownOptionView.js";
|
|
7
|
+
import { CfgDropdownViewMemo } from "./CfgDropdownView.js";
|
|
8
|
+
import { CfgGroupViewMemo } from "./CfgGroupView.js";
|
|
9
|
+
import { CfgMiscFile } from "./CfgMiscFile.js";
|
|
10
|
+
import { CfgMiscFiles } from "./CfgMiscFiles.js";
|
|
11
|
+
import { CfgNote } from "./CfgNote.js";
|
|
12
|
+
import { CfgNotes } from "./CfgNotes.js";
|
|
13
|
+
export const completeWithDefaultProductConfigurationComponents = (incomplete) => {
|
|
14
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
15
|
+
return (Object.assign(Object.assign({}, incomplete), { additionalProductComponent: (_a = incomplete.additionalProductComponent) !== null && _a !== void 0 ? _a : CfgAdditionalProductView, featureFlattenComponent: (_b = incomplete.featureFlattenComponent) !== null && _b !== void 0 ? _b : CfgGroupViewMemo, featureGroupComponent: (_c = incomplete.featureGroupComponent) !== null && _c !== void 0 ? _c : CfgGroupViewMemo, featureSelectManyComponent: (_d = incomplete.featureSelectManyComponent) !== null && _d !== void 0 ? _d : CfgCheckboxesViewMemo, optionSelectManyComponent: (_e = incomplete.optionSelectManyComponent) !== null && _e !== void 0 ? _e : CfgCheckboxViewMemo, featureSelectOneComponent: (_f = incomplete.featureSelectOneComponent) !== null && _f !== void 0 ? _f : CfgDropdownViewMemo, optionSelectOneComponent: (_g = incomplete.optionSelectOneComponent) !== null && _g !== void 0 ? _g : CfgDropdownOptionViewMemo, noteComponent: (_h = incomplete.noteComponent) !== null && _h !== void 0 ? _h : CfgNote, notesComponent: (_j = incomplete.notesComponent) !== null && _j !== void 0 ? _j : CfgNotes, miscFileComponent: (_k = incomplete.miscFileComponent) !== null && _k !== void 0 ? _k : CfgMiscFile, miscFilesComponent: (_l = incomplete.miscFilesComponent) !== null && _l !== void 0 ? _l : CfgMiscFiles }));
|
|
16
|
+
};
|
|
17
|
+
export const useCompleteWithDefaultProductConfigurationComponents = (incomplete) => {
|
|
18
|
+
const { additionalProductComponent, featureFlattenComponent, featureGroupComponent, featureSelectManyComponent, featureSelectOneComponent, optionSelectManyComponent, optionSelectOneComponent, noteComponent, notesComponent, miscFileComponent, miscFilesComponent, } = incomplete;
|
|
19
|
+
return useMemo(() => completeWithDefaultProductConfigurationComponents({
|
|
20
|
+
additionalProductComponent,
|
|
21
|
+
featureFlattenComponent,
|
|
22
|
+
featureGroupComponent,
|
|
23
|
+
featureSelectManyComponent,
|
|
24
|
+
featureSelectOneComponent,
|
|
25
|
+
optionSelectManyComponent,
|
|
26
|
+
optionSelectOneComponent,
|
|
27
|
+
noteComponent,
|
|
28
|
+
notesComponent,
|
|
29
|
+
miscFileComponent,
|
|
30
|
+
miscFilesComponent,
|
|
31
|
+
}), [
|
|
32
|
+
additionalProductComponent,
|
|
33
|
+
featureFlattenComponent,
|
|
34
|
+
featureGroupComponent,
|
|
35
|
+
featureSelectManyComponent,
|
|
36
|
+
featureSelectOneComponent,
|
|
37
|
+
optionSelectManyComponent,
|
|
38
|
+
optionSelectOneComponent,
|
|
39
|
+
noteComponent,
|
|
40
|
+
notesComponent,
|
|
41
|
+
miscFileComponent,
|
|
42
|
+
miscFilesComponent,
|
|
43
|
+
]);
|
|
44
|
+
};
|
|
45
|
+
export const forwardProps = (props) => ({
|
|
46
|
+
upchargeDisplayMode: props.upchargeDisplayMode,
|
|
47
|
+
startOpen: props.startOpen,
|
|
48
|
+
hideDisabledOptions: props.hideDisabledOptions,
|
|
49
|
+
additionalProductComponent: props.additionalProductComponent,
|
|
50
|
+
featureFlattenComponent: props.featureFlattenComponent,
|
|
51
|
+
featureGroupComponent: props.featureGroupComponent,
|
|
52
|
+
featureSelectManyComponent: props.featureSelectManyComponent,
|
|
53
|
+
optionSelectManyComponent: props.optionSelectManyComponent,
|
|
54
|
+
featureSelectOneComponent: props.featureSelectOneComponent,
|
|
55
|
+
optionSelectOneComponent: props.optionSelectOneComponent,
|
|
56
|
+
noteComponent: props.noteComponent,
|
|
57
|
+
notesComponent: props.notesComponent,
|
|
58
|
+
miscFileComponent: props.miscFileComponent,
|
|
59
|
+
miscFilesComponent: props.miscFilesComponent,
|
|
60
|
+
});
|
|
61
|
+
export const CfgFeatureView = (props) => {
|
|
62
|
+
const { feature, featureFlattenComponent: FlattenComponent, featureGroupComponent: GroupComponent, featureSelectManyComponent: SelectManyComponent, featureSelectOneComponent: SelectOneComponent, } = props;
|
|
63
|
+
if (!feature.visible) {
|
|
64
|
+
return React.createElement(FlattenComponent, Object.assign({}, props));
|
|
65
|
+
}
|
|
66
|
+
switch (feature.selectionType) {
|
|
67
|
+
case SelectionType.Group:
|
|
68
|
+
return React.createElement(GroupComponent, Object.assign({}, props));
|
|
69
|
+
case SelectionType.SelectMany:
|
|
70
|
+
return React.createElement(SelectManyComponent, Object.assign({}, props));
|
|
71
|
+
case SelectionType.SelectOne:
|
|
72
|
+
return React.createElement(SelectOneComponent, Object.assign({}, props));
|
|
73
|
+
default:
|
|
74
|
+
throw Error("Unsupported viewType");
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
export const CfgFeatureViewMemo = React.memo(CfgFeatureView);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CfgFeatureViewProps } from "./CfgFeatureView.js";
|
|
3
|
-
export declare const CfgGroupView: React.FC<CfgFeatureViewProps>;
|
|
4
|
-
export declare const CfgGroupViewMemo: React.NamedExoticComponent<CfgFeatureViewProps>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CfgFeatureViewProps } from "./CfgFeatureView.js";
|
|
3
|
+
export declare const CfgGroupView: React.FC<CfgFeatureViewProps>;
|
|
4
|
+
export declare const CfgGroupViewMemo: React.NamedExoticComponent<CfgFeatureViewProps>;
|
|
5
5
|
//# sourceMappingURL=CfgGroupView.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CfgFeatureViewMemo, forwardProps } from "./CfgFeatureView.js";
|
|
3
|
-
export const CfgGroupView = (props) => {
|
|
4
|
-
const { feature } = props;
|
|
5
|
-
return (React.createElement(React.Fragment, null, feature.selectedOptions.map((o) => o.features.map((f) => (React.createElement(CfgFeatureViewMemo, Object.assign({ key: f.key, feature: f }, forwardProps(props))))))));
|
|
6
|
-
};
|
|
7
|
-
export const CfgGroupViewMemo = React.memo(CfgGroupView);
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CfgFeatureViewMemo, forwardProps } from "./CfgFeatureView.js";
|
|
3
|
+
export const CfgGroupView = (props) => {
|
|
4
|
+
const { feature } = props;
|
|
5
|
+
return (React.createElement(React.Fragment, null, feature.selectedOptions.map((o) => o.features.map((f) => (React.createElement(CfgFeatureViewMemo, Object.assign({ key: f.key, feature: f }, forwardProps(props))))))));
|
|
6
|
+
};
|
|
7
|
+
export const CfgGroupViewMemo = React.memo(CfgGroupView);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CssProps } from "../../utilities";
|
|
3
|
-
import { CfgMiscFileViewProps } from "./CfgFeatureView.js";
|
|
4
|
-
export declare const CfgMiscFile: React.FC<CfgMiscFileViewProps & CssProps>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CssProps } from "../../utilities";
|
|
3
|
+
import { CfgMiscFileViewProps } from "./CfgFeatureView.js";
|
|
4
|
+
export declare const CfgMiscFile: React.FC<CfgMiscFileViewProps & CssProps>;
|
|
5
5
|
//# sourceMappingURL=CfgMiscFile.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export const CfgMiscFile = (props) => {
|
|
3
|
-
const { url, preview } = props.miscFile;
|
|
4
|
-
const split = url.lastIndexOf("/");
|
|
5
|
-
const name = split ? decodeURI(url.substring(split + 1)) : url;
|
|
6
|
-
return (React.createElement("li", { className: `cfgMiscFiles__item ${props.className || ""}`, style: props.style },
|
|
7
|
-
preview !== undefined && (React.createElement("img", { className: "cfgMiscFiles__thumbnail cfgThumbnailImage", src: preview, alt: "Preview for file URL." })),
|
|
8
|
-
React.createElement("a", { href: url, className: "cfgMiscFiles__link cfgTextOverflow", target: "_blank", rel: "noopener noreferrer" }, name)));
|
|
9
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
export const CfgMiscFile = (props) => {
|
|
3
|
+
const { url, preview } = props.miscFile;
|
|
4
|
+
const split = url.lastIndexOf("/");
|
|
5
|
+
const name = split ? decodeURI(url.substring(split + 1)) : url;
|
|
6
|
+
return (React.createElement("li", { className: `cfgMiscFiles__item ${props.className || ""}`, style: props.style },
|
|
7
|
+
preview !== undefined && (React.createElement("img", { className: "cfgMiscFiles__thumbnail cfgThumbnailImage", src: preview, alt: "Preview for file URL." })),
|
|
8
|
+
React.createElement("a", { href: url, className: "cfgMiscFiles__link cfgTextOverflow", target: "_blank", rel: "noopener noreferrer" }, name)));
|
|
9
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CssProps } from "../../utilities";
|
|
3
|
-
import { CfgMiscFilesViewProps } from "./CfgFeatureView.js";
|
|
4
|
-
export declare const CfgMiscFiles: React.FC<CfgMiscFilesViewProps & CssProps>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CssProps } from "../../utilities";
|
|
3
|
+
import { CfgMiscFilesViewProps } from "./CfgFeatureView.js";
|
|
4
|
+
export declare const CfgMiscFiles: React.FC<CfgMiscFilesViewProps & CssProps>;
|
|
5
5
|
//# sourceMappingURL=CfgMiscFiles.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export const CfgMiscFiles = (props) => {
|
|
3
|
-
const { miscFileComponent: MiscFileComponent } = props;
|
|
4
|
-
return (React.createElement("ul", { className: `cfgMiscFiles ${props.className || ""}`, style: props.style }, props.miscFiles.map((f) => (React.createElement(MiscFileComponent, { key: f.key + f.url + f.preview, miscFile: f })))));
|
|
5
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
export const CfgMiscFiles = (props) => {
|
|
3
|
+
const { miscFileComponent: MiscFileComponent } = props;
|
|
4
|
+
return (React.createElement("ul", { className: `cfgMiscFiles ${props.className || ""}`, style: props.style }, props.miscFiles.map((f) => (React.createElement(MiscFileComponent, { key: f.key + f.url + f.preview, miscFile: f })))));
|
|
5
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CssProps } from "../../utilities";
|
|
3
|
-
import { CfgNoteViewProps } from "./CfgFeatureView.js";
|
|
4
|
-
export declare const CfgNote: React.FC<CfgNoteViewProps & CssProps>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CssProps } from "../../utilities";
|
|
3
|
+
import { CfgNoteViewProps } from "./CfgFeatureView.js";
|
|
4
|
+
export declare const CfgNote: React.FC<CfgNoteViewProps & CssProps>;
|
|
5
5
|
//# sourceMappingURL=CfgNote.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import { ExpandableHeadingRow } from "../ExpandableHeadingRow.js";
|
|
3
|
-
export const CfgNote = (props) => {
|
|
4
|
-
const { code, body, key, title } = props.note;
|
|
5
|
-
const [open, setOpen] = useState(false);
|
|
6
|
-
const hasNoTitle = !title;
|
|
7
|
-
const hasNoBody = !body;
|
|
8
|
-
if (hasNoBody && hasNoTitle) {
|
|
9
|
-
console.info(`Note has neither title nor body and will not be visible. (${code})`);
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
return (React.createElement("li", { className: "cfgNotes__item" },
|
|
13
|
-
React.createElement(ExpandableHeadingRow, { heading: title || key || code, open: open, onClick: () => setOpen((prev) => !prev), expandable: !hasNoBody, className: "cfgNotes__title" }),
|
|
14
|
-
open && React.createElement("div", { className: "cfgNotes__body" }, body)));
|
|
15
|
-
};
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { ExpandableHeadingRow } from "../ExpandableHeadingRow.js";
|
|
3
|
+
export const CfgNote = (props) => {
|
|
4
|
+
const { code, body, key, title } = props.note;
|
|
5
|
+
const [open, setOpen] = useState(false);
|
|
6
|
+
const hasNoTitle = !title;
|
|
7
|
+
const hasNoBody = !body;
|
|
8
|
+
if (hasNoBody && hasNoTitle) {
|
|
9
|
+
console.info(`Note has neither title nor body and will not be visible. (${code})`);
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
return (React.createElement("li", { className: "cfgNotes__item" },
|
|
13
|
+
React.createElement(ExpandableHeadingRow, { heading: title || key || code, open: open, onClick: () => setOpen((prev) => !prev), expandable: !hasNoBody, className: "cfgNotes__title" }),
|
|
14
|
+
open && React.createElement("div", { className: "cfgNotes__body" }, body)));
|
|
15
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CssProps } from "../../utilities.js";
|
|
3
|
-
import { CfgNotesViewProps } from "./CfgFeatureView.js";
|
|
4
|
-
export declare const CfgNotes: React.FC<CfgNotesViewProps & CssProps>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CssProps } from "../../utilities.js";
|
|
3
|
+
import { CfgNotesViewProps } from "./CfgFeatureView.js";
|
|
4
|
+
export declare const CfgNotes: React.FC<CfgNotesViewProps & CssProps>;
|
|
5
5
|
//# sourceMappingURL=CfgNotes.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export const CfgNotes = (props) => {
|
|
3
|
-
const { noteComponent: NoteComponent } = props;
|
|
4
|
-
return (React.createElement("ul", { className: "cfgNotes", style: props.style }, props.notes.map((n) => (React.createElement(NoteComponent, { note: n, key: n.code })))));
|
|
5
|
-
};
|
|
1
|
+
import React from "react";
|
|
2
|
+
export const CfgNotes = (props) => {
|
|
3
|
+
const { noteComponent: NoteComponent } = props;
|
|
4
|
+
return (React.createElement("ul", { className: "cfgNotes", style: props.style }, props.notes.map((n) => (React.createElement(NoteComponent, { note: n, key: n.code })))));
|
|
5
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CfgOptionViewProps } from "./CfgFeatureView.js";
|
|
3
|
-
export declare const CfgOptionCommonView: React.FC<CfgOptionViewProps & {
|
|
4
|
-
labelClassName?: string;
|
|
5
|
-
onClick?: () => void;
|
|
6
|
-
}>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CfgOptionViewProps } from "./CfgFeatureView.js";
|
|
3
|
+
export declare const CfgOptionCommonView: React.FC<CfgOptionViewProps & {
|
|
4
|
+
labelClassName?: string;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
}>;
|
|
7
7
|
//# sourceMappingURL=CfgOptionCommonView.d.ts.map
|
|
@@ -1,50 +1,53 @@
|
|
|
1
|
-
import { SelectionType } from "@configura/web-api";
|
|
2
|
-
import React, { useContext } from "react";
|
|
3
|
-
import { useUuid } from "../../useUniqueId.js";
|
|
4
|
-
import { ErrorContext } from "../ErrorContext.js";
|
|
5
|
-
import { Checkmark } from "../icons/Checkmark.js";
|
|
6
|
-
import { CfgConfigurationCommonView } from "./CfgConfigurationCommonView.js";
|
|
7
|
-
import { CfgFeatureView, forwardProps } from "./CfgFeatureView.js";
|
|
8
|
-
import { CfgOptionNumericView } from "./CfgOptionNumericView.js";
|
|
9
|
-
import { CfgOptionPriceView } from "./CfgOptionPriceView.js";
|
|
10
|
-
export const CfgOptionCommonView = (props) => {
|
|
11
|
-
var _a;
|
|
12
|
-
const { option, upchargeDisplayMode, onClick, labelClassName } = props;
|
|
13
|
-
const { features, thumbnail, description, selected, code, selectedChangeInProgress, miscFiles, notes, disabled, } = option;
|
|
14
|
-
const setError = useContext(ErrorContext);
|
|
15
|
-
const uniqueId = useUuid();
|
|
16
|
-
const selectionType = option.parent.selectionType;
|
|
17
|
-
let inputType;
|
|
18
|
-
let typeClassNameFragment;
|
|
19
|
-
switch (selectionType) {
|
|
20
|
-
case SelectionType.SelectMany:
|
|
21
|
-
inputType = "checkbox";
|
|
22
|
-
typeClassNameFragment = "Optional";
|
|
23
|
-
break;
|
|
24
|
-
case SelectionType.SelectOne:
|
|
25
|
-
inputType = "radio";
|
|
26
|
-
typeClassNameFragment = "Option";
|
|
27
|
-
break;
|
|
28
|
-
default:
|
|
29
|
-
throw new Error(`Unsupported selectionType ${selectionType}`);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
1
|
+
import { SelectionType } from "@configura/web-api";
|
|
2
|
+
import React, { useContext } from "react";
|
|
3
|
+
import { useUuid } from "../../useUniqueId.js";
|
|
4
|
+
import { ErrorContext } from "../ErrorContext.js";
|
|
5
|
+
import { Checkmark } from "../icons/Checkmark.js";
|
|
6
|
+
import { CfgConfigurationCommonView } from "./CfgConfigurationCommonView.js";
|
|
7
|
+
import { CfgFeatureView, forwardProps } from "./CfgFeatureView.js";
|
|
8
|
+
import { CfgOptionNumericView } from "./CfgOptionNumericView.js";
|
|
9
|
+
import { CfgOptionPriceView } from "./CfgOptionPriceView.js";
|
|
10
|
+
export const CfgOptionCommonView = (props) => {
|
|
11
|
+
var _a;
|
|
12
|
+
const { option, upchargeDisplayMode, onClick, labelClassName, hideDisabledOptions } = props;
|
|
13
|
+
const { features, thumbnail, description, selected, code, selectedChangeInProgress, miscFiles, notes, disabled, } = option;
|
|
14
|
+
const setError = useContext(ErrorContext);
|
|
15
|
+
const uniqueId = useUuid();
|
|
16
|
+
const selectionType = option.parent.selectionType;
|
|
17
|
+
let inputType;
|
|
18
|
+
let typeClassNameFragment;
|
|
19
|
+
switch (selectionType) {
|
|
20
|
+
case SelectionType.SelectMany:
|
|
21
|
+
inputType = "checkbox";
|
|
22
|
+
typeClassNameFragment = "Optional";
|
|
23
|
+
break;
|
|
24
|
+
case SelectionType.SelectOne:
|
|
25
|
+
inputType = "radio";
|
|
26
|
+
typeClassNameFragment = "Option";
|
|
27
|
+
break;
|
|
28
|
+
default:
|
|
29
|
+
throw new Error(`Unsupported selectionType ${selectionType}`);
|
|
30
|
+
}
|
|
31
|
+
if (hideDisabledOptions && disabled) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const itemClasses = `${(_a = props.className) !== null && _a !== void 0 ? _a : ""}${disabled ? " disabled" : ""}`;
|
|
35
|
+
return (React.createElement("li", { className: itemClasses, style: props.style },
|
|
36
|
+
React.createElement("label", { className: `cfgFeatureItem${typeClassNameFragment} ${labelClassName !== null && labelClassName !== void 0 ? labelClassName : ""}`, htmlFor: uniqueId },
|
|
37
|
+
React.createElement("input", { checked: selected, className: "cfgFeatureItem__hiddenInput", id: uniqueId, name: uniqueId, onChange: () => {
|
|
38
|
+
option.setSelected(!selected).catch((e) => {
|
|
39
|
+
setError(e);
|
|
40
|
+
throw e;
|
|
41
|
+
});
|
|
42
|
+
}, disabled: disabled, onClick: onClick, type: inputType }),
|
|
43
|
+
React.createElement("div", { className: `cfgFeatureItem__${inputType}` }, selected === !selectedChangeInProgress && React.createElement(Checkmark, null)),
|
|
44
|
+
thumbnail && (React.createElement("img", { alt: `Thumbnail for ${description}`, className: "cfgThumbnailImage cfgMl1", src: thumbnail })),
|
|
45
|
+
React.createElement("div", { className: `cfgFeatureItem${typeClassNameFragment}__titleWrapper` },
|
|
46
|
+
React.createElement("div", { className: `cfgFeatureItem${typeClassNameFragment}__title` },
|
|
47
|
+
description || code,
|
|
48
|
+
React.createElement(CfgOptionPriceView, { option: option, upchargeDisplayMode: upchargeDisplayMode })))),
|
|
49
|
+
selected && (React.createElement(React.Fragment, null,
|
|
50
|
+
React.createElement(CfgOptionNumericView, { option: option }),
|
|
51
|
+
React.createElement(CfgConfigurationCommonView, Object.assign({}, forwardProps(props), { notes: notes, miscFiles: miscFiles })),
|
|
52
|
+
features.length !== 0 && (React.createElement("ul", { className: "cfgOptionTree cfgOptionTree--subLevel cfgOptionTree--indent" }, features.map((f) => (React.createElement(CfgFeatureView, Object.assign({}, forwardProps(props), { feature: f, key: f.key }))))))))));
|
|
53
|
+
};
|