@corpsmap/corpsmap 3.1.6 → 3.1.8
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/lib/dev.js +551 -43
- package/lib/prod.js +551 -43
- package/package.json +1 -1
- package/src/config/default-config.js +3 -3
- package/src/core-plugins/contact-form/bundle.js +243 -0
- package/src/core-plugins/contact-form/index.js +17 -0
- package/src/core-plugins/contact-form/question-button.js +36 -0
- package/src/core-plugins/contact-form/question-modal.js +191 -0
- package/src/core-plugins/geocoder/bundle.js +1 -1
- package/src/index.js +2 -0
package/lib/dev.js
CHANGED
|
@@ -106159,7 +106159,7 @@ var config = {
|
|
|
106159
106159
|
id: "MapBoxStreets",
|
|
106160
106160
|
name: "MapBox Streets",
|
|
106161
106161
|
oldUrl: "https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",
|
|
106162
|
-
url: "https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.
|
|
106162
|
+
url: "https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA",
|
|
106163
106163
|
attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> — Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
|
106164
106164
|
subdomains: "abcd",
|
|
106165
106165
|
accessToken: "<your accessToken>",
|
|
@@ -106168,7 +106168,7 @@ var config = {
|
|
|
106168
106168
|
id: "MapBoxAerial",
|
|
106169
106169
|
name: "MapBox Aerial",
|
|
106170
106170
|
oldUrl: "https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",
|
|
106171
|
-
url: "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.
|
|
106171
|
+
url: "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA",
|
|
106172
106172
|
attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> — Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
|
106173
106173
|
subdomains: "abcd",
|
|
106174
106174
|
accessToken: "<your accessToken>",
|
|
@@ -106177,7 +106177,7 @@ var config = {
|
|
|
106177
106177
|
id: "MapBoxOutdoor",
|
|
106178
106178
|
name: "MapBox Outdoor",
|
|
106179
106179
|
oldUrl: "https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",
|
|
106180
|
-
url: "https://api.mapbox.com/styles/v1/mapbox/outdoors-v10/tiles/256/{z}/{x}/{y}?access_token=pk.
|
|
106180
|
+
url: "https://api.mapbox.com/styles/v1/mapbox/outdoors-v10/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA",
|
|
106181
106181
|
attributions: 'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> — Map data © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
|
106182
106182
|
subdomains: "abcd",
|
|
106183
106183
|
accessToken: "<your accessToken>",
|
|
@@ -106507,7 +106507,7 @@ var config = {
|
|
|
106507
106507
|
};
|
|
106508
106508
|
|
|
106509
106509
|
var name = "@corpsmap/corpsmap";
|
|
106510
|
-
var version$1 = "3.1.
|
|
106510
|
+
var version$1 = "3.1.8";
|
|
106511
106511
|
var description = "CorpsMap as React Components";
|
|
106512
106512
|
var main = "index.js";
|
|
106513
106513
|
var scripts = {
|
|
@@ -135698,7 +135698,7 @@ var bundle$4 = {
|
|
|
135698
135698
|
var c = transform(store.selectViewCenter(), mapProjection, geoProjection);
|
|
135699
135699
|
if (q.length < 2) return;
|
|
135700
135700
|
q = encodeURIComponent(q);
|
|
135701
|
-
apiGet("https://api.mapbox.com/geocoding/v5/mapbox.places/".concat(q, ".json?proximity=").concat(c.toString()).concat(countries && countries.length ? "&country=".concat(countries.join(",")) : "", "&access_token=pk.
|
|
135701
|
+
apiGet("https://api.mapbox.com/geocoding/v5/mapbox.places/".concat(q, ".json?proximity=").concat(c.toString()).concat(countries && countries.length ? "&country=".concat(countries.join(",")) : "", "&access_token=pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA"), function (err, response, body) {
|
|
135702
135702
|
if (err) return callback(err);
|
|
135703
135703
|
var results = JSON.parse(body);
|
|
135704
135704
|
return callback(null, results.features.map(function (r) {
|
|
@@ -160663,7 +160663,514 @@ var plugin$c = {
|
|
|
160663
160663
|
}]
|
|
160664
160664
|
};
|
|
160665
160665
|
|
|
160666
|
-
var
|
|
160666
|
+
var QuestionsModal = /*#__PURE__*/function (_React$Component) {
|
|
160667
|
+
_inherits(QuestionsModal, _React$Component);
|
|
160668
|
+
|
|
160669
|
+
var _super = _createSuper(QuestionsModal);
|
|
160670
|
+
|
|
160671
|
+
function QuestionsModal(props) {
|
|
160672
|
+
var _this;
|
|
160673
|
+
|
|
160674
|
+
_classCallCheck(this, QuestionsModal);
|
|
160675
|
+
|
|
160676
|
+
_this = _super.call(this, props);
|
|
160677
|
+
_this.state = {
|
|
160678
|
+
firstName: " ",
|
|
160679
|
+
lastName: " ",
|
|
160680
|
+
Email: " ",
|
|
160681
|
+
selIssue: " ",
|
|
160682
|
+
addComments: " ",
|
|
160683
|
+
errors: {}
|
|
160684
|
+
};
|
|
160685
|
+
_this.close = _this.close.bind(_assertThisInitialized(_this));
|
|
160686
|
+
_this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));
|
|
160687
|
+
_this.handleSubmit = _this.handleSubmit.bind(_assertThisInitialized(_this));
|
|
160688
|
+
return _this;
|
|
160689
|
+
}
|
|
160690
|
+
|
|
160691
|
+
_createClass(QuestionsModal, [{
|
|
160692
|
+
key: "close",
|
|
160693
|
+
value: function close() {
|
|
160694
|
+
var doModalClose = this.props.doModalClose;
|
|
160695
|
+
doModalClose();
|
|
160696
|
+
}
|
|
160697
|
+
}, {
|
|
160698
|
+
key: "handleChange",
|
|
160699
|
+
value: function handleChange(event) {
|
|
160700
|
+
switch (event.target.name) {
|
|
160701
|
+
case "FN":
|
|
160702
|
+
this.setState({
|
|
160703
|
+
firstName: event.target.value
|
|
160704
|
+
});
|
|
160705
|
+
break;
|
|
160706
|
+
|
|
160707
|
+
case "LN":
|
|
160708
|
+
this.setState({
|
|
160709
|
+
lastName: event.target.value
|
|
160710
|
+
});
|
|
160711
|
+
break;
|
|
160712
|
+
|
|
160713
|
+
case "EM":
|
|
160714
|
+
this.setState({
|
|
160715
|
+
Email: event.target.value
|
|
160716
|
+
});
|
|
160717
|
+
break;
|
|
160718
|
+
|
|
160719
|
+
case "SI":
|
|
160720
|
+
this.setState({
|
|
160721
|
+
selIssue: event.target.value
|
|
160722
|
+
});
|
|
160723
|
+
break;
|
|
160724
|
+
|
|
160725
|
+
case "AC":
|
|
160726
|
+
this.setState({
|
|
160727
|
+
addComments: event.target.value
|
|
160728
|
+
});
|
|
160729
|
+
break;
|
|
160730
|
+
}
|
|
160731
|
+
}
|
|
160732
|
+
}, {
|
|
160733
|
+
key: "handleSubmit",
|
|
160734
|
+
value: function handleSubmit(event) {
|
|
160735
|
+
event.preventDefault();
|
|
160736
|
+
var _this$props = this.props,
|
|
160737
|
+
doSetContactFormIssues = _this$props.doSetContactFormIssues,
|
|
160738
|
+
doHandleFormErrors = _this$props.doHandleFormErrors,
|
|
160739
|
+
doSubmitNotification = _this$props.doSubmitNotification,
|
|
160740
|
+
errorList = _this$props.errorList;
|
|
160741
|
+
var formOutputs = {
|
|
160742
|
+
first_Name: this.state.firstName,
|
|
160743
|
+
last_Name: this.state.lastName,
|
|
160744
|
+
e_mail: this.state.Email,
|
|
160745
|
+
sel_issue: this.state.selIssue,
|
|
160746
|
+
add_comments: this.state.addComments
|
|
160747
|
+
};
|
|
160748
|
+
var formIsValid = doHandleFormErrors(formOutputs);
|
|
160749
|
+
this.setState({
|
|
160750
|
+
errors: errorList
|
|
160751
|
+
});
|
|
160752
|
+
|
|
160753
|
+
if (formIsValid) {
|
|
160754
|
+
doSetContactFormIssues(formOutputs);
|
|
160755
|
+
doSubmitNotification(formIsValid);
|
|
160756
|
+
this.close();
|
|
160757
|
+
} else {
|
|
160758
|
+
doSubmitNotification(formIsValid);
|
|
160759
|
+
}
|
|
160760
|
+
}
|
|
160761
|
+
}, {
|
|
160762
|
+
key: "render",
|
|
160763
|
+
value: function render() {
|
|
160764
|
+
var theme = this.props.theme;
|
|
160765
|
+
return /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("div", {
|
|
160766
|
+
className: "cm-modal-header " + theme
|
|
160767
|
+
}, "Questions"), /*#__PURE__*/React$1__default.createElement("div", {
|
|
160768
|
+
className: "cm-modal-body",
|
|
160769
|
+
style: {
|
|
160770
|
+
height: 290,
|
|
160771
|
+
top: 0,
|
|
160772
|
+
bottom: 0,
|
|
160773
|
+
left: 0,
|
|
160774
|
+
right: 0
|
|
160775
|
+
}
|
|
160776
|
+
}, /*#__PURE__*/React$1__default.createElement("div", {
|
|
160777
|
+
className: "cm-form-group"
|
|
160778
|
+
}, /*#__PURE__*/React$1__default.createElement("form", {
|
|
160779
|
+
onSubmit: this.handleSubmit
|
|
160780
|
+
}, /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("label", null, "First Name:", " ", /*#__PURE__*/React$1__default.createElement("input", {
|
|
160781
|
+
name: "FN",
|
|
160782
|
+
type: "text",
|
|
160783
|
+
value: this.state.firstName,
|
|
160784
|
+
onChange: this.handleChange
|
|
160785
|
+
}), /*#__PURE__*/React$1__default.createElement("label", {
|
|
160786
|
+
style: {
|
|
160787
|
+
color: "red",
|
|
160788
|
+
position: "relative",
|
|
160789
|
+
left: 10
|
|
160790
|
+
}
|
|
160791
|
+
}, this.state.formIsValid ? null : this.state.errors["First_Name"])), /*#__PURE__*/React$1__default.createElement("label", {
|
|
160792
|
+
style: {
|
|
160793
|
+
position: "relative",
|
|
160794
|
+
left: 20
|
|
160795
|
+
}
|
|
160796
|
+
}, "Last Name:", " ", /*#__PURE__*/React$1__default.createElement("input", {
|
|
160797
|
+
name: "LN",
|
|
160798
|
+
type: "text",
|
|
160799
|
+
value: this.state.LastName,
|
|
160800
|
+
onChange: this.handleChange
|
|
160801
|
+
}), /*#__PURE__*/React$1__default.createElement("label", {
|
|
160802
|
+
style: {
|
|
160803
|
+
color: "red",
|
|
160804
|
+
position: "relative",
|
|
160805
|
+
left: 10
|
|
160806
|
+
}
|
|
160807
|
+
}, this.state.formIsValid ? null : this.state.errors["Last_Name"]))), /*#__PURE__*/React$1__default.createElement("br", null), /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("label", null, "Email", " ", /*#__PURE__*/React$1__default.createElement("input", {
|
|
160808
|
+
name: "EM",
|
|
160809
|
+
style: {
|
|
160810
|
+
width: 250
|
|
160811
|
+
},
|
|
160812
|
+
type: "text",
|
|
160813
|
+
value: this.state.Email,
|
|
160814
|
+
onChange: this.handleChange
|
|
160815
|
+
}), /*#__PURE__*/React$1__default.createElement("label", {
|
|
160816
|
+
style: {
|
|
160817
|
+
color: "red",
|
|
160818
|
+
position: "relative",
|
|
160819
|
+
left: 10
|
|
160820
|
+
}
|
|
160821
|
+
}, this.state.formIsValid ? null : this.state.errors["email"]))), /*#__PURE__*/React$1__default.createElement("br", null), /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("label", null, "Select your Current Issue:", /*#__PURE__*/React$1__default.createElement("select", {
|
|
160822
|
+
name: "SI",
|
|
160823
|
+
style: {
|
|
160824
|
+
width: 150,
|
|
160825
|
+
textAlign: "center"
|
|
160826
|
+
},
|
|
160827
|
+
value: this.state.selIssue,
|
|
160828
|
+
onChange: this.handleChange
|
|
160829
|
+
}, /*#__PURE__*/React$1__default.createElement("option", {
|
|
160830
|
+
value: " "
|
|
160831
|
+
}, " "), /*#__PURE__*/React$1__default.createElement("option", {
|
|
160832
|
+
value: " Map Issue "
|
|
160833
|
+
}, " Map Issue "), /*#__PURE__*/React$1__default.createElement("option", {
|
|
160834
|
+
value: " Errors "
|
|
160835
|
+
}, " Errors"), /*#__PURE__*/React$1__default.createElement("option", {
|
|
160836
|
+
value: " Bugs "
|
|
160837
|
+
}, " Bugs "), /*#__PURE__*/React$1__default.createElement("option", {
|
|
160838
|
+
value: " Requests "
|
|
160839
|
+
}, " Requests "), /*#__PURE__*/React$1__default.createElement("option", {
|
|
160840
|
+
value: " Other"
|
|
160841
|
+
}, " Other ")), /*#__PURE__*/React$1__default.createElement("label", {
|
|
160842
|
+
style: {
|
|
160843
|
+
color: "red",
|
|
160844
|
+
position: "relative",
|
|
160845
|
+
left: 10
|
|
160846
|
+
}
|
|
160847
|
+
}, this.state.formIsValid ? null : this.state.errors["issue"]))), /*#__PURE__*/React$1__default.createElement("br", null), /*#__PURE__*/React$1__default.createElement("div", null, /*#__PURE__*/React$1__default.createElement("p", null, "Brief Description"), /*#__PURE__*/React$1__default.createElement("textarea", {
|
|
160848
|
+
name: "AC",
|
|
160849
|
+
style: {
|
|
160850
|
+
height: 120,
|
|
160851
|
+
width: 300
|
|
160852
|
+
},
|
|
160853
|
+
value: this.state.addComments,
|
|
160854
|
+
onChange: this.handleChange
|
|
160855
|
+
}), /*#__PURE__*/React$1__default.createElement("label", {
|
|
160856
|
+
style: {
|
|
160857
|
+
color: "red",
|
|
160858
|
+
position: "relative",
|
|
160859
|
+
left: 10
|
|
160860
|
+
}
|
|
160861
|
+
}, this.state.formIsValid ? null : this.state.errors["add_comments"]))))), /*#__PURE__*/React$1__default.createElement("div", {
|
|
160862
|
+
className: "cm-modal-footer"
|
|
160863
|
+
}, /*#__PURE__*/React$1__default.createElement("br", null), /*#__PURE__*/React$1__default.createElement("br", null), /*#__PURE__*/React$1__default.createElement("br", null), /*#__PURE__*/React$1__default.createElement("button", {
|
|
160864
|
+
type: "submit",
|
|
160865
|
+
className: "cm-btn cm-btn-theme " + theme,
|
|
160866
|
+
onClick: this.handleSubmit
|
|
160867
|
+
}, "Submit"), /*#__PURE__*/React$1__default.createElement("button", {
|
|
160868
|
+
style: {
|
|
160869
|
+
textAlign: "left"
|
|
160870
|
+
},
|
|
160871
|
+
type: "Close",
|
|
160872
|
+
className: "cm-btn cm-btn-theme " + theme,
|
|
160873
|
+
onClick: this.close
|
|
160874
|
+
}, "Close")));
|
|
160875
|
+
}
|
|
160876
|
+
}]);
|
|
160877
|
+
|
|
160878
|
+
return QuestionsModal;
|
|
160879
|
+
}(React$1__default.Component);
|
|
160880
|
+
|
|
160881
|
+
var QuestionModal = connect("selectTheme", "doModalClose", "doSubmitNotification", "doSetContactFormIssues", "doHandleFormErrors", "selectErrorList", QuestionsModal);
|
|
160882
|
+
|
|
160883
|
+
var questionsTab = /*#__PURE__*/function (_React$Component) {
|
|
160884
|
+
_inherits(questionsTab, _React$Component);
|
|
160885
|
+
|
|
160886
|
+
var _super = _createSuper(questionsTab);
|
|
160887
|
+
|
|
160888
|
+
function questionsTab(props) {
|
|
160889
|
+
var _this;
|
|
160890
|
+
|
|
160891
|
+
_classCallCheck(this, questionsTab);
|
|
160892
|
+
|
|
160893
|
+
_this = _super.call(this, props);
|
|
160894
|
+
_this.handleClick = _this.handleClick.bind(_assertThisInitialized(_this));
|
|
160895
|
+
return _this;
|
|
160896
|
+
}
|
|
160897
|
+
|
|
160898
|
+
_createClass(questionsTab, [{
|
|
160899
|
+
key: "handleClick",
|
|
160900
|
+
value: function handleClick() {
|
|
160901
|
+
var doModalOpen = this.props.doModalOpen;
|
|
160902
|
+
doModalOpen({
|
|
160903
|
+
children: [QuestionModal],
|
|
160904
|
+
options: {},
|
|
160905
|
+
openedBy: "questionsTab"
|
|
160906
|
+
});
|
|
160907
|
+
}
|
|
160908
|
+
}, {
|
|
160909
|
+
key: "render",
|
|
160910
|
+
value: function render() {
|
|
160911
|
+
return /*#__PURE__*/React$1__default.createElement(SidebarButton$1, {
|
|
160912
|
+
iconClass: "mdi mdi-help-circle",
|
|
160913
|
+
label: "Contact Us",
|
|
160914
|
+
title: "Contact Us",
|
|
160915
|
+
onClick: this.handleClick
|
|
160916
|
+
});
|
|
160917
|
+
}
|
|
160918
|
+
}]);
|
|
160919
|
+
|
|
160920
|
+
return questionsTab;
|
|
160921
|
+
}(React$1__default.Component);
|
|
160922
|
+
|
|
160923
|
+
var questionsTab$1 = connect("doModalOpen", "doQuestionBarActivate", "selectQuestionsTabStatus", questionsTab);
|
|
160924
|
+
|
|
160925
|
+
var _name$getReducer$doHa;
|
|
160926
|
+
|
|
160927
|
+
var bundle$b = (_name$getReducer$doHa = {
|
|
160928
|
+
name: "questionsTab",
|
|
160929
|
+
getReducer: function getReducer() {
|
|
160930
|
+
var initialData = {
|
|
160931
|
+
questionsTabStatus: false,
|
|
160932
|
+
errorList: {},
|
|
160933
|
+
applicationName: "",
|
|
160934
|
+
emailPath: ""
|
|
160935
|
+
};
|
|
160936
|
+
return function () {
|
|
160937
|
+
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialData;
|
|
160938
|
+
|
|
160939
|
+
var _ref = arguments.length > 1 ? arguments[1] : undefined,
|
|
160940
|
+
type = _ref.type,
|
|
160941
|
+
payload = _ref.payload;
|
|
160942
|
+
|
|
160943
|
+
switch (type) {
|
|
160944
|
+
case "PARAMETERS_SET":
|
|
160945
|
+
case "FORM_SUBMITTED":
|
|
160946
|
+
case "FORM_ERROR":
|
|
160947
|
+
case "API_POST_SUCCESS":
|
|
160948
|
+
case "API_POST_ERROR":
|
|
160949
|
+
case "ACTIVATE_QUESTIONS_TAB":
|
|
160950
|
+
case "DEACTIVATE_QUESTIONS_TAB":
|
|
160951
|
+
case "VALIDATION_COMPLETE":
|
|
160952
|
+
return Object.assign({}, state, payload);
|
|
160953
|
+
|
|
160954
|
+
default:
|
|
160955
|
+
return state;
|
|
160956
|
+
}
|
|
160957
|
+
};
|
|
160958
|
+
},
|
|
160959
|
+
doHandleFormErrors: function doHandleFormErrors(outputs) {
|
|
160960
|
+
return function (_ref2) {
|
|
160961
|
+
var dispatch = _ref2.dispatch,
|
|
160962
|
+
store = _ref2.store;
|
|
160963
|
+
var formErrors = store.selectErrorList();
|
|
160964
|
+
var formValidation = true;
|
|
160965
|
+
var regex = /[a-zA-Z]/g; //First Name
|
|
160966
|
+
|
|
160967
|
+
if (outputs.first_Name == " ") {
|
|
160968
|
+
formValidation = false;
|
|
160969
|
+
formErrors["First_Name"] = " *Field Cannot be empty ";
|
|
160970
|
+
}
|
|
160971
|
+
|
|
160972
|
+
if (typeof outputs.first_Name !== "undefined") {
|
|
160973
|
+
if (!outputs.first_Name.match(regex)) {
|
|
160974
|
+
formValidation = false;
|
|
160975
|
+
formErrors["First_Name"] = " *Only letters ";
|
|
160976
|
+
}
|
|
160977
|
+
} //Last Name
|
|
160978
|
+
|
|
160979
|
+
|
|
160980
|
+
if (outputs.last_Name == " ") {
|
|
160981
|
+
formValidation = false;
|
|
160982
|
+
formErrors["Last_Name"] = " *Field Cannot be empty ";
|
|
160983
|
+
}
|
|
160984
|
+
|
|
160985
|
+
if (typeof outputs.last_Name !== "undefined") {
|
|
160986
|
+
if (!outputs.last_Name.match(regex)) {
|
|
160987
|
+
formValidation = false;
|
|
160988
|
+
formErrors["Last_Name"] = " *Only letters ";
|
|
160989
|
+
}
|
|
160990
|
+
} //Email
|
|
160991
|
+
|
|
160992
|
+
|
|
160993
|
+
if (outputs.e_mail == " ") {
|
|
160994
|
+
formValidation = false;
|
|
160995
|
+
formErrors["email"] = " *Field Cannot be empty ";
|
|
160996
|
+
}
|
|
160997
|
+
|
|
160998
|
+
if (typeof outputs.e_mail !== "undefined") {
|
|
160999
|
+
var lastAtPos = outputs.e_mail.lastIndexOf("@");
|
|
161000
|
+
var lastDotPos = outputs.e_mail.lastIndexOf(".");
|
|
161001
|
+
|
|
161002
|
+
if (!(lastAtPos < lastDotPos && lastAtPos > 0 && outputs.e_mail.indexOf("@@") == -1 && lastDotPos > 2 && outputs.e_mail.length - lastDotPos > 2)) {
|
|
161003
|
+
formValidation = false;
|
|
161004
|
+
formErrors["email"] = " *Email is not valid ";
|
|
161005
|
+
}
|
|
161006
|
+
} // Select issue
|
|
161007
|
+
|
|
161008
|
+
|
|
161009
|
+
if (outputs.sel_issue == " ") {
|
|
161010
|
+
formValidation = false;
|
|
161011
|
+
formErrors["issue"] = " *Please select an issue ";
|
|
161012
|
+
} // Breif Description
|
|
161013
|
+
|
|
161014
|
+
|
|
161015
|
+
if (outputs.add_comments == " ") {
|
|
161016
|
+
formValidation = false;
|
|
161017
|
+
formErrors["add_comments"] = " *Please provide a breif description of issue ";
|
|
161018
|
+
}
|
|
161019
|
+
|
|
161020
|
+
dispatch({
|
|
161021
|
+
type: "VALIDATION_COMPLETE",
|
|
161022
|
+
payload: {
|
|
161023
|
+
errorList: formErrors
|
|
161024
|
+
}
|
|
161025
|
+
});
|
|
161026
|
+
return formValidation;
|
|
161027
|
+
};
|
|
161028
|
+
},
|
|
161029
|
+
doSetContactFormConfiguration: function doSetContactFormConfiguration(fudsFormParams) {
|
|
161030
|
+
return function (_ref3) {
|
|
161031
|
+
var dispatch = _ref3.dispatch,
|
|
161032
|
+
store = _ref3.store;
|
|
161033
|
+
var app_name = fudsFormParams.application_name;
|
|
161034
|
+
var app_path = fudsFormParams.email_url;
|
|
161035
|
+
dispatch({
|
|
161036
|
+
type: "PARAMETERS_SET",
|
|
161037
|
+
payload: {
|
|
161038
|
+
applicationName: app_name,
|
|
161039
|
+
emailPath: app_path
|
|
161040
|
+
}
|
|
161041
|
+
});
|
|
161042
|
+
};
|
|
161043
|
+
},
|
|
161044
|
+
doSetContactFormIssues: function doSetContactFormIssues(issues) {
|
|
161045
|
+
return function (_ref4) {
|
|
161046
|
+
var dispatch = _ref4.dispatch,
|
|
161047
|
+
apiPost = _ref4.apiPost;
|
|
161048
|
+
console.log(issues); // Here we want to POST the contents of the Form
|
|
161049
|
+
// (path, payload, callback)
|
|
161050
|
+
|
|
161051
|
+
var path = store.selectEmailPath();
|
|
161052
|
+
var params = {
|
|
161053
|
+
application_name: store.selectApplicationName(),
|
|
161054
|
+
first_name: issues.first_Name,
|
|
161055
|
+
last_name: issues.last_Name,
|
|
161056
|
+
email_address: issues.e_mail,
|
|
161057
|
+
category: issues.sel_issue,
|
|
161058
|
+
comments: issues.add_comments
|
|
161059
|
+
};
|
|
161060
|
+
apiPost(path, params, function (err, response, body) {
|
|
161061
|
+
if (err || response.statusCode !== 200) {
|
|
161062
|
+
console.log(err, response);
|
|
161063
|
+
dispatch({
|
|
161064
|
+
type: "API_POST_ERROR",
|
|
161065
|
+
payload: {
|
|
161066
|
+
notification: {
|
|
161067
|
+
message: "api-error",
|
|
161068
|
+
level: "danger"
|
|
161069
|
+
}
|
|
161070
|
+
}
|
|
161071
|
+
});
|
|
161072
|
+
} else {
|
|
161073
|
+
dispatch({
|
|
161074
|
+
type: "API_POST_SUCCESS",
|
|
161075
|
+
payload: {
|
|
161076
|
+
notification: {
|
|
161077
|
+
message: "api-success",
|
|
161078
|
+
level: "success"
|
|
161079
|
+
}
|
|
161080
|
+
}
|
|
161081
|
+
});
|
|
161082
|
+
console.log(response);
|
|
161083
|
+
}
|
|
161084
|
+
});
|
|
161085
|
+
};
|
|
161086
|
+
},
|
|
161087
|
+
doSubmitNotification: function doSubmitNotification(bool) {
|
|
161088
|
+
return function (_ref5) {
|
|
161089
|
+
var dispatch = _ref5.dispatch,
|
|
161090
|
+
store = _ref5.store;
|
|
161091
|
+
|
|
161092
|
+
if (bool) {
|
|
161093
|
+
store.doNotificationsFire({
|
|
161094
|
+
title: "Form Submitted",
|
|
161095
|
+
message: "Form Submitted",
|
|
161096
|
+
level: "success"
|
|
161097
|
+
});
|
|
161098
|
+
dispatch({
|
|
161099
|
+
type: "FORM_SUBMITTED",
|
|
161100
|
+
payload: {}
|
|
161101
|
+
});
|
|
161102
|
+
} else {
|
|
161103
|
+
store.doNotificationsFire({
|
|
161104
|
+
title: "Form Error",
|
|
161105
|
+
message: "Form Has Errors",
|
|
161106
|
+
level: "danger"
|
|
161107
|
+
});
|
|
161108
|
+
dispatch({
|
|
161109
|
+
type: "FORM_ERROR",
|
|
161110
|
+
payload: {}
|
|
161111
|
+
});
|
|
161112
|
+
}
|
|
161113
|
+
};
|
|
161114
|
+
}
|
|
161115
|
+
}, _defineProperty(_name$getReducer$doHa, "doSubmitNotification", function doSubmitNotification(bool) {
|
|
161116
|
+
return function (_ref6) {
|
|
161117
|
+
var dispatch = _ref6.dispatch,
|
|
161118
|
+
store = _ref6.store;
|
|
161119
|
+
|
|
161120
|
+
if (bool) {
|
|
161121
|
+
store.doNotificationsFire({
|
|
161122
|
+
title: "Form Submitted",
|
|
161123
|
+
message: "Form Submitted",
|
|
161124
|
+
level: "success"
|
|
161125
|
+
});
|
|
161126
|
+
dispatch({
|
|
161127
|
+
type: "FORM_SUBMITTED",
|
|
161128
|
+
payload: {}
|
|
161129
|
+
});
|
|
161130
|
+
} else {
|
|
161131
|
+
store.doNotificationsFire({
|
|
161132
|
+
title: "Form Error",
|
|
161133
|
+
message: "Form Has Errors",
|
|
161134
|
+
level: "danger"
|
|
161135
|
+
});
|
|
161136
|
+
dispatch({
|
|
161137
|
+
type: "FORM_ERROR",
|
|
161138
|
+
payload: {}
|
|
161139
|
+
});
|
|
161140
|
+
}
|
|
161141
|
+
};
|
|
161142
|
+
}), _defineProperty(_name$getReducer$doHa, "doQuestionBarActivate", function doQuestionBarActivate() {
|
|
161143
|
+
return function (_ref7) {
|
|
161144
|
+
var dispatch = _ref7.dispatch;
|
|
161145
|
+
dispatch({
|
|
161146
|
+
type: "ACTIVATE_QUESTIONS_TAB",
|
|
161147
|
+
payload: {
|
|
161148
|
+
questionsTabStatus: true
|
|
161149
|
+
}
|
|
161150
|
+
});
|
|
161151
|
+
};
|
|
161152
|
+
}), _defineProperty(_name$getReducer$doHa, "selectApplicationName", function selectApplicationName(state) {
|
|
161153
|
+
return state.questionsTab.applicationName;
|
|
161154
|
+
}), _defineProperty(_name$getReducer$doHa, "selectEmailPath", function selectEmailPath(state) {
|
|
161155
|
+
return state.questionsTab.emailPath;
|
|
161156
|
+
}), _defineProperty(_name$getReducer$doHa, "selectQuestionsTabStatus", function selectQuestionsTabStatus(state) {
|
|
161157
|
+
return state.questionsTab.questionsTabStatus;
|
|
161158
|
+
}), _defineProperty(_name$getReducer$doHa, "selectErrorList", function selectErrorList(state) {
|
|
161159
|
+
return state.questionsTab.errorList;
|
|
161160
|
+
}), _name$getReducer$doHa);
|
|
161161
|
+
|
|
161162
|
+
var plugin$d = {
|
|
161163
|
+
pluginName: "questionsTab",
|
|
161164
|
+
enabled: true,
|
|
161165
|
+
bundle: bundle$b,
|
|
161166
|
+
components: [{
|
|
161167
|
+
component: questionsTab$1,
|
|
161168
|
+
region: "right-sidebar-top",
|
|
161169
|
+
sortOrder: 100
|
|
161170
|
+
}]
|
|
161171
|
+
};
|
|
161172
|
+
|
|
161173
|
+
var bundle$c = {
|
|
160667
161174
|
name: "rasterIdent",
|
|
160668
161175
|
getReducer: function getReducer() {
|
|
160669
161176
|
var initialData = {
|
|
@@ -160754,10 +161261,10 @@ var bundle$b = {
|
|
|
160754
161261
|
}
|
|
160755
161262
|
};
|
|
160756
161263
|
|
|
160757
|
-
var plugin$
|
|
161264
|
+
var plugin$e = {
|
|
160758
161265
|
pluginName: 'Identify Raster',
|
|
160759
161266
|
enabled: true,
|
|
160760
|
-
bundle: bundle$
|
|
161267
|
+
bundle: bundle$c,
|
|
160761
161268
|
components: []
|
|
160762
161269
|
};
|
|
160763
161270
|
|
|
@@ -160805,7 +161312,7 @@ var RotateNorthButton = /*#__PURE__*/function (_React$Component) {
|
|
|
160805
161312
|
|
|
160806
161313
|
var RotateNorthButton$1 = connect("doSetRotationNorth", "selectMapRotation", RotateNorthButton);
|
|
160807
161314
|
|
|
160808
|
-
var plugin$
|
|
161315
|
+
var plugin$f = {
|
|
160809
161316
|
pluginName: 'NorthButton',
|
|
160810
161317
|
enabled: true,
|
|
160811
161318
|
components: [{
|
|
@@ -160815,7 +161322,7 @@ var plugin$e = {
|
|
|
160815
161322
|
}]
|
|
160816
161323
|
};
|
|
160817
161324
|
|
|
160818
|
-
var bundle$
|
|
161325
|
+
var bundle$d = {
|
|
160819
161326
|
name: 'themeSwitcher',
|
|
160820
161327
|
getReducer: function getReducer() {
|
|
160821
161328
|
var initialData = {
|
|
@@ -160949,7 +161456,7 @@ var ThemeSwitcherButton = /*#__PURE__*/function (_React$Component) {
|
|
|
160949
161456
|
return ThemeSwitcherButton;
|
|
160950
161457
|
}(React$1__default.Component);
|
|
160951
161458
|
|
|
160952
|
-
var plugin$
|
|
161459
|
+
var plugin$g = {
|
|
160953
161460
|
pluginName: 'Theme Switcher',
|
|
160954
161461
|
enabled: true,
|
|
160955
161462
|
components: [{
|
|
@@ -160957,7 +161464,7 @@ var plugin$f = {
|
|
|
160957
161464
|
region: 'left-sidebar-bottom',
|
|
160958
161465
|
sortOrder: 30
|
|
160959
161466
|
}],
|
|
160960
|
-
bundle: bundle$
|
|
161467
|
+
bundle: bundle$d
|
|
160961
161468
|
};
|
|
160962
161469
|
|
|
160963
161470
|
var TreeviewButton = /*#__PURE__*/function (_React$Component) {
|
|
@@ -161976,7 +162483,7 @@ var treeViewDownload = {
|
|
|
161976
162483
|
}
|
|
161977
162484
|
};
|
|
161978
162485
|
|
|
161979
|
-
var plugin$
|
|
162486
|
+
var plugin$h = function plugin(controls) {
|
|
161980
162487
|
return {
|
|
161981
162488
|
pluginName: "LayerTree",
|
|
161982
162489
|
enabled: true,
|
|
@@ -161990,7 +162497,7 @@ var plugin$g = function plugin(controls) {
|
|
|
161990
162497
|
};
|
|
161991
162498
|
|
|
161992
162499
|
var geoJSON$3 = new GeoJSON();
|
|
161993
|
-
var bundle$
|
|
162500
|
+
var bundle$e = {
|
|
161994
162501
|
name: "vectorIdent",
|
|
161995
162502
|
getReducer: function getReducer() {
|
|
161996
162503
|
var initialData = {
|
|
@@ -162081,10 +162588,10 @@ var bundle$d = {
|
|
|
162081
162588
|
}
|
|
162082
162589
|
};
|
|
162083
162590
|
|
|
162084
|
-
var plugin$
|
|
162591
|
+
var plugin$i = {
|
|
162085
162592
|
pluginName: 'Identify Vector',
|
|
162086
162593
|
enabled: true,
|
|
162087
|
-
bundle: bundle$
|
|
162594
|
+
bundle: bundle$e,
|
|
162088
162595
|
components: []
|
|
162089
162596
|
};
|
|
162090
162597
|
|
|
@@ -162138,7 +162645,7 @@ function values$1(object) {
|
|
|
162138
162645
|
|
|
162139
162646
|
var values_1 = values$1;
|
|
162140
162647
|
|
|
162141
|
-
var bundle$
|
|
162648
|
+
var bundle$f = {
|
|
162142
162649
|
name: 'vectorSearch',
|
|
162143
162650
|
getReducer: function getReducer() {
|
|
162144
162651
|
var initialData = {
|
|
@@ -162258,10 +162765,10 @@ var bundle$e = {
|
|
|
162258
162765
|
}
|
|
162259
162766
|
};
|
|
162260
162767
|
|
|
162261
|
-
var plugin$
|
|
162768
|
+
var plugin$j = {
|
|
162262
162769
|
pluginName: 'Vector Search',
|
|
162263
162770
|
enabled: true,
|
|
162264
|
-
bundle: bundle$
|
|
162771
|
+
bundle: bundle$f,
|
|
162265
162772
|
components: []
|
|
162266
162773
|
};
|
|
162267
162774
|
|
|
@@ -162341,7 +162848,7 @@ var ZoomOutButton = /*#__PURE__*/function (_React$Component) {
|
|
|
162341
162848
|
|
|
162342
162849
|
var ZoomOutButton$1 = connect('doZoomOut', ZoomOutButton);
|
|
162343
162850
|
|
|
162344
|
-
var plugin$
|
|
162851
|
+
var plugin$k = {
|
|
162345
162852
|
pluginName: 'ZoomButtons',
|
|
162346
162853
|
enabled: true,
|
|
162347
162854
|
components: [{
|
|
@@ -162398,7 +162905,7 @@ var zoomIndicator = /*#__PURE__*/function (_React$Component) {
|
|
|
162398
162905
|
|
|
162399
162906
|
var zoomIndicator$1 = connect('doZoomIndicatorActivate', 'selectMapZoom', 'selectZoomLevelIndicator', zoomIndicator);
|
|
162400
162907
|
|
|
162401
|
-
var bundle$
|
|
162908
|
+
var bundle$g = {
|
|
162402
162909
|
name: "zoomLevel",
|
|
162403
162910
|
getReducer: function getReducer() {
|
|
162404
162911
|
var initialData = {
|
|
@@ -162438,10 +162945,10 @@ var bundle$f = {
|
|
|
162438
162945
|
}
|
|
162439
162946
|
};
|
|
162440
162947
|
|
|
162441
|
-
var plugin$
|
|
162948
|
+
var plugin$l = {
|
|
162442
162949
|
pluginName: 'zoomIndicator',
|
|
162443
162950
|
enabled: true,
|
|
162444
|
-
bundle: bundle$
|
|
162951
|
+
bundle: bundle$g,
|
|
162445
162952
|
components: [{
|
|
162446
162953
|
component: zoomIndicator$1,
|
|
162447
162954
|
region: 'right-sidebar-top',
|
|
@@ -162516,7 +163023,7 @@ var ZoomHomeButton = /*#__PURE__*/function (_React$Component) {
|
|
|
162516
163023
|
|
|
162517
163024
|
var ZoomHomeButton$1 = connect("doZoomHome", "doZoomHomeResetLoc", "doNotificationsFire", ZoomHomeButton);
|
|
162518
163025
|
|
|
162519
|
-
var bundle$
|
|
163026
|
+
var bundle$h = {
|
|
162520
163027
|
name: "zoomHome",
|
|
162521
163028
|
getReducer: function getReducer() {
|
|
162522
163029
|
var initialData = {
|
|
@@ -162587,10 +163094,10 @@ var bundle$g = {
|
|
|
162587
163094
|
}
|
|
162588
163095
|
};
|
|
162589
163096
|
|
|
162590
|
-
var plugin$
|
|
163097
|
+
var plugin$m = {
|
|
162591
163098
|
pluginName: "ZoomToInitial",
|
|
162592
163099
|
enabled: true,
|
|
162593
|
-
bundle: bundle$
|
|
163100
|
+
bundle: bundle$h,
|
|
162594
163101
|
components: [{
|
|
162595
163102
|
component: ZoomHomeButton$1,
|
|
162596
163103
|
region: "left-sidebar-top",
|
|
@@ -162662,7 +163169,7 @@ var ZoomToBoxButton$1 = connect('doStartZoomBox', 'doStopZoomBox', ZoomToBoxButt
|
|
|
162662
163169
|
var zoombox = createInteraction({
|
|
162663
163170
|
interaction: 'dragbox'
|
|
162664
163171
|
});
|
|
162665
|
-
var bundle$
|
|
163172
|
+
var bundle$i = {
|
|
162666
163173
|
name: 'zoombox',
|
|
162667
163174
|
getReducer: function getReducer() {
|
|
162668
163175
|
var initialData = {
|
|
@@ -162760,10 +163267,10 @@ var bundle$h = {
|
|
|
162760
163267
|
}
|
|
162761
163268
|
};
|
|
162762
163269
|
|
|
162763
|
-
var plugin$
|
|
163270
|
+
var plugin$n = {
|
|
162764
163271
|
pluginName: 'ZoomtoExtent',
|
|
162765
163272
|
enabled: true,
|
|
162766
|
-
bundle: bundle$
|
|
163273
|
+
bundle: bundle$i,
|
|
162767
163274
|
components: [{
|
|
162768
163275
|
component: ZoomToBoxButton$1,
|
|
162769
163276
|
region: 'basic-toolbar',
|
|
@@ -162815,7 +163322,7 @@ var MapLoadingIndicator = /*#__PURE__*/function (_React$Component) {
|
|
|
162815
163322
|
|
|
162816
163323
|
var MapLoadingIndicator$1 = connect("selectMapLoading", MapLoadingIndicator);
|
|
162817
163324
|
|
|
162818
|
-
var bundle$
|
|
163325
|
+
var bundle$j = {
|
|
162819
163326
|
name: "mapLoading",
|
|
162820
163327
|
getReducer: function getReducer() {
|
|
162821
163328
|
var initialData = {
|
|
@@ -162852,10 +163359,10 @@ var bundle$i = {
|
|
|
162852
163359
|
}
|
|
162853
163360
|
};
|
|
162854
163361
|
|
|
162855
|
-
var plugin$
|
|
163362
|
+
var plugin$o = {
|
|
162856
163363
|
pluginName: "MapLoadingIndicator",
|
|
162857
163364
|
enabled: true,
|
|
162858
|
-
bundle: bundle$
|
|
163365
|
+
bundle: bundle$j,
|
|
162859
163366
|
components: [{
|
|
162860
163367
|
component: MapLoadingIndicator$1,
|
|
162861
163368
|
region: "lower-right-toolbar",
|
|
@@ -162891,18 +163398,19 @@ exports.geocoder = plugin$6;
|
|
|
162891
163398
|
exports.geojsonIdent = plugin$7;
|
|
162892
163399
|
exports.identify = plugin$8;
|
|
162893
163400
|
exports.legend = plugin$9;
|
|
162894
|
-
exports.mapLoadingIndicator = plugin$
|
|
163401
|
+
exports.mapLoadingIndicator = plugin$o;
|
|
162895
163402
|
exports.measureTools = plugin$a;
|
|
162896
163403
|
exports.permalink = plugin$b;
|
|
162897
163404
|
exports.printMap = plugin$c;
|
|
162898
|
-
exports.
|
|
162899
|
-
exports.
|
|
162900
|
-
exports.
|
|
162901
|
-
exports.
|
|
163405
|
+
exports.questionsTab = plugin$d;
|
|
163406
|
+
exports.rasterIdent = plugin$e;
|
|
163407
|
+
exports.rotateNorth = plugin$f;
|
|
163408
|
+
exports.themeSwitcher = plugin$g;
|
|
163409
|
+
exports.treeView = plugin$h;
|
|
162902
163410
|
exports.treeViewPanel = TreeviewPanel$1;
|
|
162903
|
-
exports.vectorIdent = plugin$
|
|
162904
|
-
exports.vectorSearch = plugin$
|
|
162905
|
-
exports.zoomHome = plugin$
|
|
162906
|
-
exports.zoomInOut = plugin$
|
|
162907
|
-
exports.zoomLevel = plugin$
|
|
162908
|
-
exports.zoomToBox = plugin$
|
|
163411
|
+
exports.vectorIdent = plugin$i;
|
|
163412
|
+
exports.vectorSearch = plugin$j;
|
|
163413
|
+
exports.zoomHome = plugin$m;
|
|
163414
|
+
exports.zoomInOut = plugin$k;
|
|
163415
|
+
exports.zoomLevel = plugin$l;
|
|
163416
|
+
exports.zoomToBox = plugin$n;
|