oa-componentbook 1.0.1-stage.45 → 1.0.1-stage.451
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/build/components/oa-component-accordion/Accordion.js +147 -40
- package/build/components/oa-component-accordion/styles.js +2 -2
- package/build/components/oa-component-button/CustomButton.js +24 -19
- package/build/components/oa-component-button/styles.js +1 -1
- package/build/components/oa-component-checkbox/CustomCheckBox.js +20 -17
- package/build/components/oa-component-checkbox/styles.js +1 -1
- package/build/components/oa-component-datepicker/CustomDatePicker.js +37 -26
- package/build/components/oa-component-document-details-panel/DocumentDetailsPanel.js +154 -0
- package/build/components/oa-component-drawer/CustomDrawer.js +2 -0
- package/build/components/oa-component-dropdown/CustomDropdown.js +16 -4
- package/build/components/oa-component-icons/MaterialIcon.js +1 -1
- package/build/components/oa-component-info/CustomInfo.js +9 -4
- package/build/components/oa-component-info/styles.js +3 -3
- package/build/components/oa-component-modal/CustomModal.js +59 -48
- package/build/components/oa-component-modal/styles.js +3 -2
- package/build/components/oa-component-pagination/CustomPagination.js +111 -0
- package/build/components/oa-component-pagination/styles.js +12 -0
- package/build/components/oa-component-progress-bar/CustomProgressBar.js +8 -4
- package/build/components/oa-component-select/CustomSelect.js +130 -56
- package/build/components/oa-component-steps/CustomSteps.js +117 -0
- package/build/components/oa-component-steps/styles.js +12 -0
- package/build/components/oa-component-table/CustomTable.js +28 -5
- package/build/components/oa-component-table/CustomTableV1.js +613 -0
- package/build/components/oa-component-table/styles.js +1 -1
- package/build/components/oa-component-table/stylesV1.js +19 -0
- package/build/components/oa-component-table-with-search-and-filter/TableWithSearchAndFilter.js +469 -0
- package/build/components/oa-component-table-with-search-and-filter/styles.js +23 -0
- package/build/components/oa-component-tabs/CustomTabs.js +1 -1
- package/build/components/oa-component-tag/CustomTag.js +29 -11
- package/build/components/oa-component-tag/styles.js +30 -3
- package/build/components/oa-component-textarea/CustomTextArea.js +161 -0
- package/build/components/oa-component-textarea/constants.js +39 -0
- package/build/components/oa-component-textarea/styles.js +12 -3
- package/build/components/oa-component-tooltip/CustomTooltip.js +8 -4
- package/build/components/oa-component-upload/CustomUpload.js +129 -42
- package/build/components/oa-component-viewer/CustomViewer.js +17 -11
- package/build/dev/oa-component-document-viewer/CustomDocumentViewer.js +367 -0
- package/build/dev/oa-component-document-viewer/styles.js +12 -0
- package/build/dev/oa-component-upload/CustomUpload.js +116 -29
- package/build/dev/oa-component-upload/styles.js +2 -2
- package/build/dev/oa-widget-document-modal/DocumentSideModal.js +166 -0
- package/build/dev/oa-widget-document-modal/styles.js +12 -0
- package/build/dev/oa-widget-document-side-drawer/DocumentSideDrawer.js +200 -0
- package/build/dev/oa-widget-document-side-drawer/styles.js +12 -0
- package/build/dev/oa-widget-document-viewer-with-details/DocumentViewerWithDetails.js +123 -0
- package/build/global-css/GlobalCss.js +2 -1
- package/build/global-css/GridLayout.js +1 -1
- package/build/global-css/commonStyles.js +11 -0
- package/build/images/Car.png +0 -0
- package/build/images/TwoWheeler.png +0 -0
- package/build/images/astronaut_emptystate.png +0 -0
- package/build/images/exportGrp01.png +0 -0
- package/build/images/exportGrp02.png +0 -0
- package/build/images/exportGrp03.png +0 -0
- package/build/images/outOfStock.png +0 -0
- package/build/index.js +131 -5
- package/build/layout/DetailDataLayout/DetailDataLayout.js +20 -0
- package/build/layout/DetailDataLayout/components/Form.js +22 -0
- package/build/layout/DetailDataLayout/components/Header.js +32 -0
- package/build/layout/DetailDataLayout/style.css +9 -0
- package/build/layout/DetailDataLayout/styles.js +12 -0
- package/build/layout/EntityOverviewLayout/EntityOverviewLayout.js +403 -0
- package/build/layout/EntityOverviewLayout/reducer/entityOverviewLayoutReducer.js +85 -0
- package/build/layout/EntityOverviewLayout/styles.js +13 -0
- package/build/layout/GenricLayOut/GenricLayOut.js +2421 -0
- package/build/layout/GenricLayOut/components/AppliedFilters.js +90 -0
- package/build/layout/GenricLayOut/components/CardList.js +34 -0
- package/build/layout/GenricLayOut/components/DropdownSearch.js +48 -0
- package/build/layout/GenricLayOut/components/Header.js +74 -0
- package/build/layout/GenricLayOut/components/Modal.js +96 -0
- package/build/layout/GenricLayOut/components/ProfileSection.js +219 -0
- package/build/layout/GenricLayOut/components/Search.js +51 -0
- package/build/layout/GenricLayOut/components/StaticFilter.css +73 -0
- package/build/layout/GenricLayOut/components/StaticFilter.js +37 -0
- package/build/layout/GenricLayOut/reducer/layoutReducer.js +310 -0
- package/build/layout/GenricLayOut/resolver/staticConfigResolver.js +98 -0
- package/build/layout/GenricLayOut/styles.js +42 -0
- package/build/utils/download-file.js +23 -0
- package/build/widgets/oa-form-widget/FormWidget.js +577 -0
- package/build/widgets/oa-form-widget/FormWidgetStyle.js +18 -0
- package/build/widgets/oa-widget-add-spare-part/AddSparePartCollapseWidget.js +80 -16
- package/build/widgets/oa-widget-add-spare-part/AddSparePartWidget.js +50 -7
- package/build/widgets/oa-widget-address/AddressWidget.js +12 -17
- package/build/widgets/oa-widget-approval/ApprovalWidget.js +19 -11
- package/build/widgets/oa-widget-approval/ApprovalWidgetNew.js +492 -0
- package/build/widgets/oa-widget-approval/styles.js +2 -2
- package/build/widgets/oa-widget-chat/ChatWidget.js +5 -5
- package/build/widgets/oa-widget-close-claim/CloseClaimWidget.js +17 -5
- package/build/widgets/oa-widget-collapsible-key-value/CollapsibleKeyValueWidget.js +396 -0
- package/build/widgets/oa-widget-collapsible-key-value/styles.js +16 -0
- package/build/widgets/oa-widget-content-panel/ContentPanel.js +82 -0
- package/build/widgets/oa-widget-content-panel/styles.js +12 -0
- package/build/widgets/oa-widget-customer-rating-card/CustomerRatingCard.js +5 -5
- package/build/widgets/oa-widget-detailcard/styles.js +1 -1
- package/build/widgets/oa-widget-document-upload/DocUploadWidget.js +6 -9
- package/build/widgets/oa-widget-dropdown-search-input/DropdownSearchInput.js +53 -19
- package/build/widgets/oa-widget-dropdown-search-input/styles.js +1 -1
- package/build/widgets/oa-widget-guide/GuideWidget.js +70 -0
- package/build/widgets/oa-widget-guide/GuideWidgetStyle.js +12 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationDeleteBiker.js +24 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModal.js +34 -0
- package/build/widgets/oa-widget-hub-automation-modal/HubAutomationModalStyle.js +13 -0
- package/build/widgets/oa-widget-image-carousel/ImageCarouselWidget.js +74 -48
- package/build/widgets/oa-widget-image-carousel/styles.js +16 -5
- package/build/widgets/oa-widget-image-gallery/FullscreenViewer.js +169 -0
- package/build/widgets/oa-widget-image-gallery/ImageGallery.js +87 -0
- package/build/widgets/oa-widget-image-gallery/ThumbnailGrid.js +146 -0
- package/build/widgets/oa-widget-image-gallery/imageCache.js +15 -0
- package/build/widgets/oa-widget-image-gallery/imageGalleryStyle.js +16 -0
- package/build/widgets/oa-widget-item-info-card/InfoCardListWidget.js +60 -0
- package/build/widgets/oa-widget-item-info-card/ItemInfoCardWidget.js +83 -0
- package/build/widgets/oa-widget-item-info-card/styles.css +50 -0
- package/build/widgets/oa-widget-item-info-card/styles.js +14 -0
- package/build/widgets/oa-widget-key-value/KeyValueWidget.js +46 -12
- package/build/widgets/oa-widget-key-value/styles.js +1 -1
- package/build/widgets/oa-widget-kpi/KPICardWidget.js +86 -0
- package/build/widgets/oa-widget-kpi/styles.js +12 -0
- package/build/widgets/oa-widget-map-base-location/AddressDetails.js +21 -7
- package/build/widgets/oa-widget-map-base-location/AddressForm.js +32 -5
- package/build/widgets/oa-widget-map-base-location/MapBaseLocation.js +9 -3
- package/build/widgets/oa-widget-map-base-location/MapComponent.js +17 -2
- package/build/widgets/oa-widget-membershipcard/MembershipCard.js +14 -3
- package/build/widgets/oa-widget-membershipcard/styles.js +1 -1
- package/build/widgets/oa-widget-notes/NotesWidget.js +32 -30
- package/build/widgets/oa-widget-notes/styles.js +4 -3
- package/build/widgets/oa-widget-profile-data/ProfileDataWidget.js +165 -0
- package/build/widgets/oa-widget-profile-data/styles.js +13 -0
- package/build/widgets/oa-widget-progressive-steps/ProgressiveStepsWidget.js +362 -0
- package/build/widgets/oa-widget-progressive-steps/styles.js +12 -0
- package/build/widgets/oa-widget-reimbursement-breakup/ReimbursementBreakupWidget.js +18 -9
- package/build/widgets/oa-widget-reimbursement-breakup/styles.js +1 -1
- package/build/widgets/oa-widget-reupload-drawer/ReUploadDrawer.js +164 -0
- package/build/widgets/oa-widget-select-list-item-modal/SelectListItemModal.js +91 -0
- package/build/widgets/oa-widget-sidebar/SidebarWidget.js +175 -0
- package/build/widgets/oa-widget-sidebar/components/Header.js +33 -0
- package/build/widgets/oa-widget-sidebar/styles.js +13 -0
- package/build/widgets/oa-widget-spare-part/SparePartsWidget.js +63 -35
- package/build/widgets/oa-widget-track-shipment/TrackShipmentWidget.js +28 -6
- package/build/widgets/oa-widget-track-shipment-list/TrackShipmentWidgetList.js +103 -0
- package/build/widgets/oa-widget-track-shipment-list/fn.js +81 -0
- package/build/widgets/oa-widget-user-management/UserManagementWidget.js +407 -0
- package/build/widgets/oa-widget-user-management/styles.js +15 -0
- package/package.json +3 -1
- package/build/components/oa-component-textarea/TextArea.js +0 -74
- package/build/dev/oa-widget-track-shipment/TrackShipmentWidget.js +0 -195
- /package/build/{dev/oa-widget-track-shipment → widgets/oa-widget-track-shipment-list}/styles.js +0 -0
|
@@ -13,7 +13,8 @@ var _antd = require("antd");
|
|
|
13
13
|
var _KeyboardArrowDownOutlined = _interopRequireDefault(require("@material-ui/icons/KeyboardArrowDownOutlined"));
|
|
14
14
|
var _styles = require("./styles");
|
|
15
15
|
var _CustomInput = _interopRequireDefault(require("../../components/oa-component-input/CustomInput"));
|
|
16
|
-
const _excluded = ["options", "onOptionChange", "onInputChange", "onPressEnter", "inputValue", "placeholder"];
|
|
16
|
+
const _excluded = ["options", "onOptionChange", "onInputChange", "onPressEnter", "onClear", "inputValue", "placeholder", "allowClear", "selectedOption"];
|
|
17
|
+
/* eslint-disable */
|
|
17
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
19
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
20
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -36,33 +37,49 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
36
37
|
* - It is called with the event as an argument.
|
|
37
38
|
* @param {string} inputValue - The initial value of the search input.
|
|
38
39
|
* @param {string} placeholder - The placeholder text to be displayed in the search input.
|
|
40
|
+
* @param {string} selectedOption - The currently selected option value from parent state.
|
|
39
41
|
* @param {object} props - Additional props to be passed to the underlying `CustomInput` component.
|
|
40
42
|
*
|
|
41
43
|
* @returns {ReactElement} A `DropdownSearchInput` component.
|
|
42
44
|
*/
|
|
43
45
|
function DropdownSearchInput(_ref) {
|
|
46
|
+
var _selectedValue$icon;
|
|
44
47
|
let {
|
|
45
48
|
options,
|
|
46
49
|
onOptionChange,
|
|
47
50
|
onInputChange,
|
|
48
51
|
onPressEnter,
|
|
52
|
+
onClear,
|
|
49
53
|
inputValue,
|
|
50
|
-
placeholder
|
|
54
|
+
placeholder,
|
|
55
|
+
allowClear,
|
|
56
|
+
selectedOption
|
|
51
57
|
} = _ref,
|
|
52
58
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
53
|
-
const [selectedValue, setSelectedValue] = (0, _react.useState)(
|
|
59
|
+
const [selectedValue, setSelectedValue] = (0, _react.useState)(null);
|
|
54
60
|
const [internalInputValue, setInternalInputValue] = (0, _react.useState)(inputValue);
|
|
55
61
|
const [isDropdownOpen, setIsDropdownOpen] = (0, _react.useState)(false);
|
|
62
|
+
const [isInitialized, setIsInitialized] = (0, _react.useState)(false);
|
|
63
|
+
|
|
64
|
+
// Sync selectedValue with parent's selectedOption
|
|
56
65
|
(0, _react.useEffect)(() => {
|
|
57
|
-
if (options.length > 0) {
|
|
66
|
+
if (selectedOption && options.length > 0) {
|
|
67
|
+
const option = options.find(opt => opt && opt.value === selectedOption);
|
|
68
|
+
if (option) {
|
|
69
|
+
setSelectedValue(option);
|
|
70
|
+
setIsInitialized(true);
|
|
71
|
+
}
|
|
72
|
+
} else if (options.length > 0 && !isInitialized) {
|
|
73
|
+
// Only set first option as default if no selectedOption is provided and not initialized yet
|
|
58
74
|
const defaultOption = options[0];
|
|
59
75
|
setSelectedValue(defaultOption);
|
|
60
|
-
|
|
76
|
+
setIsInitialized(true);
|
|
77
|
+
// Call onOptionChange to notify parent about the default selection
|
|
61
78
|
if (onOptionChange) {
|
|
62
79
|
onOptionChange(defaultOption);
|
|
63
80
|
}
|
|
64
81
|
}
|
|
65
|
-
}, [options, onOptionChange]);
|
|
82
|
+
}, [selectedOption, options, isInitialized, onOptionChange]);
|
|
66
83
|
(0, _react.useEffect)(() => {
|
|
67
84
|
setInternalInputValue(inputValue);
|
|
68
85
|
}, [inputValue]);
|
|
@@ -76,10 +93,10 @@ function DropdownSearchInput(_ref) {
|
|
|
76
93
|
*
|
|
77
94
|
* @param {string} value - The selected value.
|
|
78
95
|
*/
|
|
79
|
-
const handleSelectChange =
|
|
80
|
-
const selectedOption = options.find(option => option.value
|
|
96
|
+
const handleSelectChange = val => {
|
|
97
|
+
const selectedOption = options.find(option => option && option.value == val);
|
|
81
98
|
setSelectedValue(selectedOption);
|
|
82
|
-
setInternalInputValue(
|
|
99
|
+
setInternalInputValue("");
|
|
83
100
|
if (onOptionChange) {
|
|
84
101
|
onOptionChange(selectedOption);
|
|
85
102
|
}
|
|
@@ -101,7 +118,7 @@ function DropdownSearchInput(_ref) {
|
|
|
101
118
|
}
|
|
102
119
|
};
|
|
103
120
|
const handleKeyPress = e => {
|
|
104
|
-
if (e.key ===
|
|
121
|
+
if (e.key === "Enter" && onPressEnter) {
|
|
105
122
|
onPressEnter(e);
|
|
106
123
|
}
|
|
107
124
|
};
|
|
@@ -119,30 +136,41 @@ function DropdownSearchInput(_ref) {
|
|
|
119
136
|
let {
|
|
120
137
|
key
|
|
121
138
|
} = _ref2;
|
|
122
|
-
const selectedOption = options.find(option => option.value === key);
|
|
123
|
-
handleSelectChange(selectedOption.value);
|
|
139
|
+
const selectedOption = options.find(option => option && option.value === key);
|
|
140
|
+
handleSelectChange(selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value);
|
|
141
|
+
};
|
|
142
|
+
const handleClearClick = () => {
|
|
143
|
+
setInternalInputValue("");
|
|
144
|
+
onInputChange === null || onInputChange === void 0 || onInputChange({
|
|
145
|
+
target: {
|
|
146
|
+
value: ""
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
onClear === null || onClear === void 0 || onClear();
|
|
124
150
|
};
|
|
125
151
|
const menu = /*#__PURE__*/_react.default.createElement(_antd.Menu, {
|
|
126
152
|
className: "mobilesIcons",
|
|
127
153
|
onClick: handleMenuClick
|
|
128
154
|
}, options.map(option => /*#__PURE__*/_react.default.createElement(_antd.Menu.Item, {
|
|
129
155
|
key: option.value,
|
|
130
|
-
icon: option.icon
|
|
156
|
+
icon: option.icon()
|
|
131
157
|
}, option.label)));
|
|
132
158
|
return /*#__PURE__*/_react.default.createElement(_styles.StylesContainer, null, /*#__PURE__*/_react.default.createElement(_antd.Dropdown, {
|
|
133
159
|
overlay: menu,
|
|
134
|
-
trigger: [
|
|
160
|
+
trigger: ["click"],
|
|
135
161
|
onVisibleChange: setIsDropdownOpen
|
|
136
162
|
}, /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
137
163
|
className: "mobile-input"
|
|
138
164
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
139
165
|
className: "mobileVisible"
|
|
140
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue
|
|
166
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, selectedValue === null || selectedValue === void 0 || (_selectedValue$icon = selectedValue.icon) === null || _selectedValue$icon === void 0 ? void 0 : _selectedValue$icon.call(selectedValue)), " ", /*#__PURE__*/_react.default.createElement("small", null, selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.label)), /*#__PURE__*/_react.default.createElement(_KeyboardArrowDownOutlined.default, null))), /*#__PURE__*/_react.default.createElement(_CustomInput.default, _extends({
|
|
167
|
+
allowClear: allowClear,
|
|
141
168
|
value: internalInputValue,
|
|
142
169
|
onChange: handleInputChange,
|
|
143
170
|
onKeyPress: handleKeyPress,
|
|
171
|
+
onClear: handleClearClick,
|
|
144
172
|
placeholder: placeholder || (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.placeholder),
|
|
145
|
-
className: "
|
|
173
|
+
className: !allowClear && "noClear"
|
|
146
174
|
}, props)));
|
|
147
175
|
}
|
|
148
176
|
DropdownSearchInput.propTypes = {
|
|
@@ -156,11 +184,17 @@ DropdownSearchInput.propTypes = {
|
|
|
156
184
|
onInputChange: _propTypes.default.func.isRequired,
|
|
157
185
|
onPressEnter: _propTypes.default.func,
|
|
158
186
|
inputValue: _propTypes.default.string,
|
|
159
|
-
placeholder: _propTypes.default.string
|
|
187
|
+
placeholder: _propTypes.default.string,
|
|
188
|
+
onClear: _propTypes.default.func,
|
|
189
|
+
allowClear: _propTypes.default.bool,
|
|
190
|
+
selectedOption: _propTypes.default.string
|
|
160
191
|
};
|
|
161
192
|
DropdownSearchInput.defaultProps = {
|
|
162
193
|
onPressEnter: null,
|
|
163
|
-
inputValue:
|
|
164
|
-
placeholder:
|
|
194
|
+
inputValue: "",
|
|
195
|
+
placeholder: "",
|
|
196
|
+
onClear: null,
|
|
197
|
+
allowClear: false,
|
|
198
|
+
selectedOption: null
|
|
165
199
|
};
|
|
166
200
|
var _default = exports.default = DropdownSearchInput;
|
|
@@ -8,5 +8,5 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
var _templateObject;
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
10
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
-
const StylesContainer = exports.StylesContainer = _styledComponents.default.section(_templateObject || (_templateObject = _taggedTemplateLiteral(["\ndisplay: flex;\n.mobile-input{\n min-width: 60px;\n height: 48px;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-color: #959595;\n border-right: none;\n align-items: center;\n justify-content: space-between;\n display: flex;\n gap: 4px;\n}\n.ant-input{\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n boder-left: none;\n}\n.dropdown-container {\n display: flex;\n align-items: center;\n } \n .selected-icon {\n display: none;\n margin-left: 10px;\n font-size: 24px;\n }\n .mobileVisible svg,.mobile-input svg{\n color: var(--color-primary);\n }\n .mobileVisible small{display: none;}\n @media (min-width: 768px) {\n .mobileVisible span {\n display: none;\n }\n .mobile-input{\n min-width:
|
|
11
|
+
const StylesContainer = exports.StylesContainer = _styledComponents.default.section(_templateObject || (_templateObject = _taggedTemplateLiteral(["\ndisplay: flex;\n.mobile-input{\n min-width: 60px;\n height: 48px;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-color: #959595;\n border-right: none;\n align-items: center;\n justify-content: space-between;\n display: flex;\n gap: 4px;\n}\n.ant-input{\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n boder-left: none;\n}\n.dropdown-container {\n display: flex;\n align-items: center;\n } \n .selected-icon {\n display: none;\n margin-left: 10px;\n font-size: 24px;\n }\n .mobileVisible svg,.mobile-input svg{\n color: var(--color-primary);\n }\n .mobileVisible small{display: none;}\n\n\n\n @media (min-width: 768px) {\n .mobileVisible span {\n display: none;\n }\n .mobile-input{\n min-width: 150px;\n align-items: center;\n justify-content: space-between;\n gap: 4\n }\n .mobileVisible small{display: block;font-size: inherit;color: var(--color-primary)}\n \n } \n"])));
|
|
12
12
|
var _default = exports.default = StylesContainer;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.weak-map.js");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _GuideWidgetStyle = require("./GuideWidgetStyle");
|
|
11
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
12
|
+
var _CustomButton = _interopRequireDefault(require("../../components/oa-component-button/CustomButton"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
+
/* eslint-disable */
|
|
17
|
+
|
|
18
|
+
function CustomGuideWidget(_ref) {
|
|
19
|
+
let {
|
|
20
|
+
slides = [],
|
|
21
|
+
onComplete = () => {}
|
|
22
|
+
} = _ref;
|
|
23
|
+
const [currentSlideIndex, setCurrentSlideIndex] = (0, _react.useState)(0);
|
|
24
|
+
const [isVisible, setIsVisible] = (0, _react.useState)(true);
|
|
25
|
+
if (!isVisible) return null;
|
|
26
|
+
const currentSlide = slides[currentSlideIndex];
|
|
27
|
+
const isLastSlide = currentSlideIndex === slides.length - 1;
|
|
28
|
+
const isFirstSlide = currentSlideIndex === 0;
|
|
29
|
+
const handleNext = () => {
|
|
30
|
+
if (isLastSlide) {
|
|
31
|
+
onComplete === null || onComplete === void 0 || onComplete();
|
|
32
|
+
setIsVisible(false);
|
|
33
|
+
} else {
|
|
34
|
+
setCurrentSlideIndex(prev => prev + 1);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const handlePrevious = () => {
|
|
38
|
+
setCurrentSlideIndex(prev => prev - 1);
|
|
39
|
+
};
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement(_GuideWidgetStyle.GuideWidgetStyle, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
41
|
+
className: "oaGuideStep"
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
43
|
+
src: currentSlide.imgSrc,
|
|
44
|
+
alt: "img"
|
|
45
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
46
|
+
className: "margin-top-32"
|
|
47
|
+
}, ' ', /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
48
|
+
color: "secondary-content",
|
|
49
|
+
typography: "type-sl1-700"
|
|
50
|
+
}, currentSlide.subHeading)), /*#__PURE__*/_react.default.createElement("div", {
|
|
51
|
+
className: "margin-top-12 margin-bottom-12"
|
|
52
|
+
}, ' ', /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
53
|
+
color: "primary-content",
|
|
54
|
+
typography: "type-t1-500"
|
|
55
|
+
}, currentSlide.title)), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
56
|
+
color: "secondary-content",
|
|
57
|
+
typography: "type-b1-400"
|
|
58
|
+
}, currentSlide.content), /*#__PURE__*/_react.default.createElement("div", {
|
|
59
|
+
className: "buttonSection"
|
|
60
|
+
}, !isFirstSlide && /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
61
|
+
onClick: handlePrevious,
|
|
62
|
+
type: "secondary",
|
|
63
|
+
label: "Previous Step"
|
|
64
|
+
}), /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
65
|
+
onClick: handleNext,
|
|
66
|
+
type: "primary",
|
|
67
|
+
label: isLastSlide ? "Done" : "Next"
|
|
68
|
+
}))));
|
|
69
|
+
}
|
|
70
|
+
var _default = exports.default = CustomGuideWidget;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.GuideWidgetStyle = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject;
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
+
const GuideWidgetStyle = exports.GuideWidgetStyle = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .oaGuideStep{\n display: flex; margin: 36px 0 0 0 ;\n flex-direction: column; \n\n }\n.oaGuideStep .buttonSection .primary:hover{ background:#014fc5; border: 1px solid #014fc5;}\n.oaGuideStep .buttonSection .secondary:hover{ color:#014fc5; border: 1px solid #014fc5;}\n\n .oaGuideStep img{max-width: 100%;}\n .buttonSection{display:flex; flex-direction: row; justify-content: flex-end; margin: 24px 0 0 0 ; gap:16px;}\n\n\n"])));
|
|
12
|
+
var _default = exports.default = {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
|
|
12
|
+
function HubAutomationDeleteBiker(props) {
|
|
13
|
+
var _props$modalContent, _props$modalContent2, _props$modalContent3, _props$modalContent4;
|
|
14
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
15
|
+
typography: props === null || props === void 0 || (_props$modalContent = props.modalContent) === null || _props$modalContent === void 0 || (_props$modalContent = _props$modalContent.header) === null || _props$modalContent === void 0 ? void 0 : _props$modalContent.type,
|
|
16
|
+
color: "primary-content"
|
|
17
|
+
}, props === null || props === void 0 || (_props$modalContent2 = props.modalContent) === null || _props$modalContent2 === void 0 || (_props$modalContent2 = _props$modalContent2.header) === null || _props$modalContent2 === void 0 ? void 0 : _props$modalContent2.text), /*#__PURE__*/_react.default.createElement("div", {
|
|
18
|
+
className: "margin-top-12"
|
|
19
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
20
|
+
typography: props === null || props === void 0 || (_props$modalContent3 = props.modalContent) === null || _props$modalContent3 === void 0 || (_props$modalContent3 = _props$modalContent3.header) === null || _props$modalContent3 === void 0 || (_props$modalContent3 = _props$modalContent3.subHeading) === null || _props$modalContent3 === void 0 ? void 0 : _props$modalContent3.type,
|
|
21
|
+
color: "secondary-content"
|
|
22
|
+
}, props === null || props === void 0 || (_props$modalContent4 = props.modalContent) === null || _props$modalContent4 === void 0 || (_props$modalContent4 = _props$modalContent4.header) === null || _props$modalContent4 === void 0 || (_props$modalContent4 = _props$modalContent4.subHeading) === null || _props$modalContent4 === void 0 ? void 0 : _props$modalContent4.text)));
|
|
23
|
+
}
|
|
24
|
+
var _default = exports.default = HubAutomationDeleteBiker;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
9
|
+
var _KeyValueWidget = _interopRequireDefault(require("../oa-widget-key-value/KeyValueWidget"));
|
|
10
|
+
var _HubAutomationModalStyle = require("./HubAutomationModalStyle");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
/* eslint-disable */
|
|
13
|
+
|
|
14
|
+
const HubAutomationModal = props => {
|
|
15
|
+
var _props$modalContent, _props$modalContent2, _props$modalContent3;
|
|
16
|
+
const renderMain = data => {
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_KeyValueWidget.default, {
|
|
18
|
+
columnLayout: [3],
|
|
19
|
+
data: data
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_HubAutomationModalStyle.LessMarginHeading, null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
23
|
+
typography: "type-t1-500",
|
|
24
|
+
color: "primary-content"
|
|
25
|
+
}, props === null || props === void 0 || (_props$modalContent = props.modalContent) === null || _props$modalContent === void 0 || (_props$modalContent = _props$modalContent.header) === null || _props$modalContent === void 0 ? void 0 : _props$modalContent.text)), /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
+
className: "margin-top-12"
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
28
|
+
typography: "type-b1-400",
|
|
29
|
+
color: "secondary-content"
|
|
30
|
+
}, props === null || props === void 0 || (_props$modalContent2 = props.modalContent) === null || _props$modalContent2 === void 0 || (_props$modalContent2 = _props$modalContent2.header) === null || _props$modalContent2 === void 0 || (_props$modalContent2 = _props$modalContent2.subHeading) === null || _props$modalContent2 === void 0 ? void 0 : _props$modalContent2.text)), /*#__PURE__*/_react.default.createElement(_HubAutomationModalStyle.KeyValueContainer, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
31
|
+
className: "keyvalueContent"
|
|
32
|
+
}, renderMain(props === null || props === void 0 || (_props$modalContent3 = props.modalContent) === null || _props$modalContent3 === void 0 || (_props$modalContent3 = _props$modalContent3.content) === null || _props$modalContent3 === void 0 || (_props$modalContent3 = _props$modalContent3.data) === null || _props$modalContent3 === void 0 ? void 0 : _props$modalContent3.dataSource))));
|
|
33
|
+
};
|
|
34
|
+
var _default = exports.default = HubAutomationModal;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.LessMarginHeading = exports.KeyValueContainer = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _templateObject, _templateObject2;
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
|
+
const KeyValueContainer = exports.KeyValueContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .keyvalueContent {\n margin: 24px 0 0 0;\n padding: 16px;\n border-radius: 12px;\n background: #f6f6f6;\n }\n"])));
|
|
12
|
+
const LessMarginHeading = exports.LessMarginHeading = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n // margin: -24px 0 0 0;\n"])));
|
|
13
|
+
var _default = exports.default = {};
|
|
@@ -12,13 +12,18 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _antd = require("antd");
|
|
14
14
|
var _icons = require("@ant-design/icons");
|
|
15
|
+
var _TouchAppRounded = _interopRequireDefault(require("@material-ui/icons/TouchAppRounded"));
|
|
15
16
|
var _reactZoomPanPinch = require("react-zoom-pan-pinch");
|
|
16
17
|
var _Fullscreen = _interopRequireDefault(require("@material-ui/icons/Fullscreen"));
|
|
18
|
+
var _ArrowForwardRounded = _interopRequireDefault(require("@material-ui/icons/ArrowForwardRounded"));
|
|
19
|
+
var _ArrowBackRounded = _interopRequireDefault(require("@material-ui/icons/ArrowBackRounded"));
|
|
17
20
|
var _CustomButton = _interopRequireDefault(require("../../components/oa-component-button/CustomButton"));
|
|
18
21
|
var _CustomModal = _interopRequireDefault(require("../../components/oa-component-modal/CustomModal"));
|
|
19
22
|
var _styles = require("./styles");
|
|
20
23
|
var _MaterialIcon = _interopRequireDefault(require("../../components/oa-component-icons/MaterialIcon"));
|
|
21
24
|
var _CustomLoader = _interopRequireDefault(require("../../components/oa-component-loader/CustomLoader"));
|
|
25
|
+
var _CustomDrawer = _interopRequireDefault(require("../../components/oa-component-drawer/CustomDrawer"));
|
|
26
|
+
var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
|
|
22
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
28
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
24
29
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -42,13 +47,15 @@ function ImageCarouselWidget(_ref) {
|
|
|
42
47
|
onClose,
|
|
43
48
|
headingSuffixText,
|
|
44
49
|
typeToNamemapping,
|
|
45
|
-
s3DownloadApiUrl
|
|
50
|
+
s3DownloadApiUrl,
|
|
51
|
+
initialImageType
|
|
46
52
|
} = _ref;
|
|
47
53
|
const [currentIndex, setCurrentIndex] = (0, _react.useState)(0);
|
|
48
|
-
const [showHeatmap, setShowHeatmap] = (0, _react.useState)(
|
|
54
|
+
const [showHeatmap, setShowHeatmap] = (0, _react.useState)(initialImageType === 'heatmap');
|
|
49
55
|
const [fullscreen, setFullscreen] = (0, _react.useState)(false);
|
|
50
56
|
const [imageUrls, setImageUrls] = (0, _react.useState)([]);
|
|
51
57
|
const [loading, setLoading] = (0, _react.useState)(false);
|
|
58
|
+
const carouselRef = _react.default.useRef(null);
|
|
52
59
|
|
|
53
60
|
// Fetch image URL by UUID
|
|
54
61
|
const fetchImageUrl = uuid => fetch("".concat(s3DownloadApiUrl).concat(uuid)).then(response => response.json()).then(data => {
|
|
@@ -65,14 +72,13 @@ function ImageCarouselWidget(_ref) {
|
|
|
65
72
|
const fetchImages = async () => {
|
|
66
73
|
setLoading(true);
|
|
67
74
|
const urls = await Promise.all(images.map(async img => {
|
|
68
|
-
const
|
|
69
|
-
return _objectSpread(_objectSpread({}, img),
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
75
|
+
const imageSrcUrl = await fetchImageUrl(showHeatmap ? img.heatmapDocId : img.originalDocId); // Fetch URL for the image
|
|
76
|
+
return _objectSpread(_objectSpread({}, img), showHeatmap ? {
|
|
77
|
+
heatmapImageUrl: imageSrcUrl
|
|
78
|
+
} : {
|
|
79
|
+
originalImageUrl: imageSrcUrl
|
|
73
80
|
});
|
|
74
81
|
}));
|
|
75
|
-
console.log(urls);
|
|
76
82
|
setImageUrls(urls);
|
|
77
83
|
setLoading(false);
|
|
78
84
|
};
|
|
@@ -151,68 +157,86 @@ function ImageCarouselWidget(_ref) {
|
|
|
151
157
|
setShowHeatmap(currentViewType); // Toggle the view mode
|
|
152
158
|
};
|
|
153
159
|
const currentImage = imageUrls[currentIndex];
|
|
154
|
-
|
|
160
|
+
|
|
161
|
+
// Conditionally hide the buttons when on the first or last image
|
|
162
|
+
const isFirstImage = currentIndex === 0;
|
|
163
|
+
const isLastImage = currentIndex === imageUrls.length - 1;
|
|
164
|
+
return /*#__PURE__*/_react.default.createElement(_styles.ImageCarouselModalStyle, null, /*#__PURE__*/_react.default.createElement(_styles.GlobalStyleForImageCarousel, null), /*#__PURE__*/_react.default.createElement(_CustomModal.default, {
|
|
155
165
|
open: visible,
|
|
156
166
|
onCancel: onClose,
|
|
157
167
|
footer: null,
|
|
158
|
-
className: fullscreen ? '
|
|
168
|
+
className: fullscreen ? 'fullscreenModal imageCarouselModalStyle' : 'imageCarouselModalStyle'
|
|
159
169
|
}, /*#__PURE__*/_react.default.createElement(_CustomLoader.default, {
|
|
160
170
|
spinning: loading
|
|
161
|
-
}, !fullscreen && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
},
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
textAlign: 'center'
|
|
171
|
-
}
|
|
172
|
-
}, currentImage === null || currentImage === void 0 ? void 0 : currentImage.rejectReason), /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
171
|
+
}, !fullscreen && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
172
|
+
className: "type-t2-700",
|
|
173
|
+
color: "primary-content"
|
|
174
|
+
}, typeToNamemapping && typeToNamemapping[currentImage === null || currentImage === void 0 ? void 0 : currentImage.imageType] ? typeToNamemapping[currentImage === null || currentImage === void 0 ? void 0 : currentImage.imageType] : currentImage === null || currentImage === void 0 ? void 0 : currentImage.imageType, ' ', headingSuffixText), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
175
|
+
className: "type-b3-400",
|
|
176
|
+
color: "negative"
|
|
177
|
+
}, currentImage === null || currentImage === void 0 ? void 0 : currentImage.rejectReason)), /*#__PURE__*/_react.default.createElement("div", {
|
|
178
|
+
className: "margin-top-24 margin-bottom-12"
|
|
179
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
173
180
|
onClick: handleShowHeatmap,
|
|
174
181
|
type: "text-only",
|
|
175
182
|
label: showHeatmap ? 'View Original Image' : 'View Heatmap Image'
|
|
176
|
-
}), /*#__PURE__*/_react.default.createElement(_antd.Carousel, {
|
|
183
|
+
})), /*#__PURE__*/_react.default.createElement(_styles.ImageCarouselModalStyle, null, /*#__PURE__*/_react.default.createElement(_antd.Carousel, {
|
|
184
|
+
ref: carouselRef,
|
|
177
185
|
afterChange: handleImageChange,
|
|
178
186
|
dots: true,
|
|
179
187
|
infinite: true
|
|
180
188
|
}, imageUrls.map(img => /*#__PURE__*/_react.default.createElement("div", {
|
|
189
|
+
className: "carouselItem",
|
|
181
190
|
key: img.imageType
|
|
182
|
-
}, /*#__PURE__*/_react.default.createElement("div",
|
|
191
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
192
|
+
className: "imageCarouselIconZoom"
|
|
193
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
183
194
|
icon: _Fullscreen.default,
|
|
184
195
|
onClick: handleFullscreenToggle
|
|
185
|
-
}), /*#__PURE__*/_react.default.createElement("img", {
|
|
196
|
+
})), /*#__PURE__*/_react.default.createElement("img", {
|
|
186
197
|
src: showHeatmap ? img.heatmapImageUrl : img.originalImageUrl,
|
|
187
198
|
alt: img.imageType,
|
|
188
199
|
style: {
|
|
189
200
|
width: '100%',
|
|
190
|
-
maxHeight: '400px',
|
|
191
201
|
objectFit: 'contain'
|
|
192
202
|
}
|
|
193
|
-
}))))
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
},
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
203
|
+
})))), window.innerWidth > 600 && /*#__PURE__*/_react.default.createElement(_styles.CarouselButtons, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
204
|
+
className: "sliderArrowSection"
|
|
205
|
+
}, !isFirstImage && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
206
|
+
color: "primary-content",
|
|
207
|
+
className: "leftArrow",
|
|
208
|
+
size: 24,
|
|
209
|
+
icon: _ArrowBackRounded.default,
|
|
210
|
+
onClick: () => carouselRef.current.prev()
|
|
211
|
+
}), !isLastImage && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
212
|
+
color: "primary-content",
|
|
213
|
+
className: "rightArrow",
|
|
214
|
+
size: 24,
|
|
215
|
+
icon: _ArrowForwardRounded.default,
|
|
216
|
+
onClick: () => carouselRef.current.next()
|
|
217
|
+
}))))), fullscreen && /*#__PURE__*/_react.default.createElement(_styles.FullscreenZoom, null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
218
|
+
className: "type-t2-700",
|
|
219
|
+
color: "primary-background"
|
|
220
|
+
}, typeToNamemapping && typeToNamemapping[currentImage === null || currentImage === void 0 ? void 0 : currentImage.imageType] ? typeToNamemapping[currentImage === null || currentImage === void 0 ? void 0 : currentImage.imageType] : currentImage === null || currentImage === void 0 ? void 0 : currentImage.imageType, ' ', headingSuffixText), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
221
|
+
className: "type-b3-400",
|
|
222
|
+
color: "primary-background"
|
|
223
|
+
}, currentImage === null || currentImage === void 0 ? void 0 : currentImage.rejectReason)), /*#__PURE__*/_react.default.createElement(_styles.CloseButtonStyle, null, /*#__PURE__*/_react.default.createElement(_icons.CloseOutlined, {
|
|
211
224
|
onClick: handleFullscreenToggle
|
|
212
|
-
}), /*#__PURE__*/_react.default.createElement(_reactZoomPanPinch.TransformWrapper, null, /*#__PURE__*/_react.default.createElement(_reactZoomPanPinch.TransformComponent, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
225
|
+
})), /*#__PURE__*/_react.default.createElement(_styles.ZoomImgBox, null, /*#__PURE__*/_react.default.createElement(_reactZoomPanPinch.TransformWrapper, null, /*#__PURE__*/_react.default.createElement(_reactZoomPanPinch.TransformComponent, null, /*#__PURE__*/_react.default.createElement("img", {
|
|
213
226
|
src: showHeatmap ? currentImage === null || currentImage === void 0 ? void 0 : currentImage.heatmapImageUrl : currentImage === null || currentImage === void 0 ? void 0 : currentImage.originalImageUrl,
|
|
214
227
|
alt: currentImage === null || currentImage === void 0 ? void 0 : currentImage.imageType
|
|
215
|
-
}))), /*#__PURE__*/_react.default.createElement("div",
|
|
228
|
+
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
229
|
+
className: "pinchZoom"
|
|
230
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
231
|
+
className: "margin-right-16"
|
|
232
|
+
}, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
|
|
233
|
+
icon: _TouchAppRounded.default,
|
|
234
|
+
size: 20,
|
|
235
|
+
color: "primary-background"
|
|
236
|
+
})), /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
237
|
+
className: "type-b2-400",
|
|
238
|
+
color: "primary-background"
|
|
239
|
+
}, "Pinch in/out to zoom"))))));
|
|
216
240
|
}
|
|
217
241
|
ImageCarouselWidget.propTypes = {
|
|
218
242
|
images: _propTypes.default.array.isRequired,
|
|
@@ -220,11 +244,13 @@ ImageCarouselWidget.propTypes = {
|
|
|
220
244
|
onClose: _propTypes.default.func.isRequired,
|
|
221
245
|
headingSuffixText: _propTypes.default.string,
|
|
222
246
|
typeToNamemapping: _propTypes.default.object,
|
|
223
|
-
s3DownloadApiUrl: _propTypes.default.string
|
|
247
|
+
s3DownloadApiUrl: _propTypes.default.string,
|
|
248
|
+
initialImageType: _propTypes.default.string
|
|
224
249
|
};
|
|
225
250
|
ImageCarouselWidget.defaultProps = {
|
|
226
251
|
headingSuffixText: 'Damage',
|
|
227
252
|
typeToNamemapping: {},
|
|
228
|
-
s3DownloadApiUrl: ''
|
|
253
|
+
s3DownloadApiUrl: '',
|
|
254
|
+
initialImageType: 'heatmap'
|
|
229
255
|
};
|
|
230
256
|
var _default = exports.default = ImageCarouselWidget;
|
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
require("core-js/modules/es.weak-map.js");
|
|
4
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
|
-
exports.default = exports.ImageCarouselWidgetStyle = void 0;
|
|
7
|
-
var _styledComponents =
|
|
8
|
-
var _templateObject;
|
|
9
|
-
function
|
|
8
|
+
exports.default = exports.ZoomImgBox = exports.PinchZoom = exports.ImageCarouselWidgetStyle = exports.ImageCarouselModalStyle = exports.GlobalStyleForImageCarousel = exports.FullscreenZoom = exports.CloseButtonStyle = exports.CarouselStyle = exports.CarouselButtons = void 0;
|
|
9
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
10
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
10
13
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
11
14
|
var _default = exports.default = {};
|
|
12
|
-
const ImageCarouselWidgetStyle = exports.ImageCarouselWidgetStyle = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\n"])));
|
|
15
|
+
const ImageCarouselWidgetStyle = exports.ImageCarouselWidgetStyle = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\n\n\n"])));
|
|
16
|
+
const CarouselStyle = exports.CarouselStyle = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\n"])));
|
|
17
|
+
const ZoomImgBox = exports.ZoomImgBox = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n\nheight: calc(100vh - 150px);\n display: flex;\n align-items: center;\n justify-content: center; margin-bottom: 12px;\n\n"])));
|
|
18
|
+
const PinchZoom = exports.PinchZoom = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n"])));
|
|
19
|
+
const CloseButtonStyle = exports.CloseButtonStyle = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background: #fff;\n border-radius: 50%;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: -12px;\n right: 0;\n cursor: pointer\n"])));
|
|
20
|
+
const FullscreenZoom = exports.FullscreenZoom = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .pinchZoom{ \n display: flex;\n justify-content: center;\n align-items: center;\n\n .closeBtn{background: #fff;\n border-radius: 50%;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: -12px;\n right: 0;\n cursor: pointer;\n}\n}\n"])));
|
|
21
|
+
const ImageCarouselModalStyle = exports.ImageCarouselModalStyle = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n\n.ant-carousel{ background:#F6F6F6; max-width:550px; padding:24px 48px 56px 48px; border-radius:16px;}\n\n\n\n.ant-carousel .slick-dots li {\n width: 10px;\n height: 10px;\n border-radius: 50%;\n margin-inline: 4px;\n padding: 0;\n text-align: center;\n text-indent: -999px;\n vertical-align: top;\n}\n\n.ant-carousel .slick-dots li button {\n width: 10px;\n height: 10px;\n background: #959595;\n border: 0;\n opacity: 1;\n border-radius: 50%;\n}\n\n.ant-carousel .slick-dots li.slick-active button {background: #014FC5 !important;}\n.carouselItem{ display: flex !important;\n align-items: center;\n justify-content: center;}\n\n\n @media only screen and (max-width: 600px) {\n .imageCarouselIconZoom{display:flex !important;}\n .ant-carousel{ background: no-repeat;\n max-width: none;\n padding: 0;\n border-radius: 0;}\n\n}\n\n\n\n.imageCarouselIconZoom{background: #fff; display: none;\n border-radius: 4px;\n width: 24px;\n height: 24px;\n justify-content: center;\n align-items: center; right: 8px;\n position: absolute;\n top: 8px; z-index:9;\n}\n.imageCarouselIconZoom svg{font-size:20px !important; margin-top:3px;}\n.imageCarouselIconZoom button{ height: auto;\n line-height: normal;}\n.carouselItem {position: relative;}\n.carouselItem img{border-radius:8px;}\n\n.ant-carousel .slick-dots-bottom { bottom: -30px;}\n.carouselItem{height:100%};\n.slick-slide > div{height:100%;}\n.fullscreenModal .ant-modal-close{display:none;}\n.closeBtn{background: #fff;\n border-radius: 50%;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n top: -12px;\n right: 0;\n cursor: pointer;}\n\n .zoomImgBox{display:block;}\n\n"])));
|
|
22
|
+
const GlobalStyleForImageCarousel = exports.GlobalStyleForImageCarousel = (0, _styledComponents.createGlobalStyle)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n\n.imageCarouselModalStyle .ant-modal-body{max-height: none; height:100%;}\n.fullscreenModal .ant-modal-content{background:#000;}\n.fullscreenModal .ant-modal-close{display:none;}\n.ant-modal{ width:auto !important;}\n\n\n@media only screen and (max-width: 600px) {\n .imageCarouselModalStyle .ant-modal-content {top: 0; border-radius: 0px;}\n .slick-slide{height:calc(100vh - 210px) !important; background:#000; border-radius:8px;}\n\n}\n"])));
|
|
23
|
+
const CarouselButtons = exports.CarouselButtons = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n\n.sliderArrowSection{position: absolute;\n top: 57%;\n width: 100%;}\n\n .leftArrow {\n position: absolute;\n left: 6px;\n top: 0;\n}\n .rightArrow{position: absolute;\n right: 6px;\n top: 0;}\n\n\n"])));
|