@bigbinary/neeto-molecules 4.0.100 → 4.0.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/ShareViaLink.js
CHANGED
|
@@ -206,6 +206,7 @@ var truncatePrefix = function truncatePrefix(inputElement, prefixText) {
|
|
|
206
206
|
var maxPrefixChars = Math.max(Math.floor(prefixWidth / averageCharWidth), 5);
|
|
207
207
|
prefixElement.textContent = maxPrefixChars < prefixText.length ? "...".concat(prefixText.slice(-maxPrefixChars)) : prefixText;
|
|
208
208
|
};
|
|
209
|
+
var normalizeEditablePath = ramda.replace(/[^a-z0-9&?=._-]/gi, "");
|
|
209
210
|
|
|
210
211
|
var SOCIAL_MEDIA_OPTIONS = {
|
|
211
212
|
FACEBOOK: {
|
|
@@ -288,7 +289,8 @@ var EditURL = function EditURL(_ref) {
|
|
|
288
289
|
},
|
|
289
290
|
children: function children(_ref5) {
|
|
290
291
|
var isSubmitting = _ref5.isSubmitting,
|
|
291
|
-
dirty = _ref5.dirty
|
|
292
|
+
dirty = _ref5.dirty,
|
|
293
|
+
setFieldValue = _ref5.setFieldValue;
|
|
292
294
|
return /*#__PURE__*/jsxRuntime.jsxs(formik.Form, {
|
|
293
295
|
children: [/*#__PURE__*/jsxRuntime.jsxs(Body, {
|
|
294
296
|
className: "flex flex-col gap-y-6",
|
|
@@ -299,7 +301,10 @@ var EditURL = function EditURL(_ref) {
|
|
|
299
301
|
maxLength: editUrlProps === null || editUrlProps === void 0 ? void 0 : editUrlProps.maxLength,
|
|
300
302
|
name: "path",
|
|
301
303
|
prefix: prefixText,
|
|
302
|
-
ref: inputRef
|
|
304
|
+
ref: inputRef,
|
|
305
|
+
onChange: function onChange(event) {
|
|
306
|
+
return setFieldValue("path", normalizeEditablePath(event.target.value));
|
|
307
|
+
}
|
|
303
308
|
}), /*#__PURE__*/jsxRuntime.jsx(Typography, {
|
|
304
309
|
className: "neeto-ui-text-gray-700",
|
|
305
310
|
lineHeight: "normal",
|