@capillarytech/creatives-library 7.17.126-alpha.0 → 7.17.127
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/package.json
CHANGED
|
@@ -56,6 +56,7 @@ import { GET_TRANSLATION_MAPPED } from '../../containers/TagList/constants';
|
|
|
56
56
|
import moment from 'moment';
|
|
57
57
|
import { CUSTOMER_BARCODE_TAG , COPY_OF} from '../../containers/App/constants';
|
|
58
58
|
import { isEmailUnsubscribeTagMandatory } from '../../utils/common';
|
|
59
|
+
import { isUrl } from '../../v2Containers/Line/Container/Wrapper/utils';
|
|
59
60
|
const TabPane = Tabs.TabPane;
|
|
60
61
|
const {Column} = Table;
|
|
61
62
|
const {TextArea} = CapInput;
|
|
@@ -73,11 +74,6 @@ const errorMessageForTags = {
|
|
|
73
74
|
TAG_BRACKET_COUNT_MISMATCH_ERROR: 'tagBracketCountMismatchError'
|
|
74
75
|
};
|
|
75
76
|
|
|
76
|
-
const isUrl = (str) => {
|
|
77
|
-
// eslint-disable-next-line no-useless-escape
|
|
78
|
-
const res = str.match(/(http(s)?:\/\/.)(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g);
|
|
79
|
-
return res;
|
|
80
|
-
};
|
|
81
77
|
class FormBuilder extends React.Component { // eslint-disable-line react/prefer-stateless-function
|
|
82
78
|
constructor(props) {
|
|
83
79
|
super(props);
|
|
@@ -193,6 +193,8 @@ export function* getSupportVideosConfig({ callback }) {
|
|
|
193
193
|
|
|
194
194
|
function* watchFetchSchemaForEntity() {
|
|
195
195
|
const watcher = yield takeLatest(types.GET_SCHEMA_FOR_ENTITY_REQUEST, fetchSchemaForEntity);
|
|
196
|
+
yield take(LOCATION_CHANGE);
|
|
197
|
+
yield cancel(watcher);
|
|
196
198
|
}
|
|
197
199
|
|
|
198
200
|
|
|
@@ -68,7 +68,7 @@ export const getTabPanes = (props) => {
|
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
export const isUrl = (url) => {
|
|
71
|
-
const res = url.match(/(http(s)
|
|
71
|
+
const res = url.match(/(http(s)?:\/\/)(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g);
|
|
72
72
|
return res;
|
|
73
73
|
};
|
|
74
74
|
|