@bigbinary/neeto-molecules 1.0.82 → 1.0.83
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/README.md +1 -0
- package/dist/EmailForm.cjs.js +119 -56
- package/dist/EmailForm.cjs.js.map +1 -1
- package/dist/EmailForm.js +119 -56
- package/dist/EmailForm.js.map +1 -1
- package/dist/EmailPreview.cjs.js +107 -3
- package/dist/EmailPreview.cjs.js.map +1 -1
- package/dist/EmailPreview.js +107 -3
- package/dist/EmailPreview.js.map +1 -1
- package/dist/ShareViaEmail.cjs.js +113 -111
- package/dist/ShareViaEmail.cjs.js.map +1 -1
- package/dist/ShareViaEmail.js +113 -111
- package/dist/ShareViaEmail.js.map +1 -1
- package/package.json +1 -1
- package/types/EmailForm.d.ts +1 -0
- package/types/EmailPreview.d.ts +1 -0
package/README.md
CHANGED
|
@@ -19,6 +19,7 @@ https://neeto-molecules.neeto.com/
|
|
|
19
19
|
- [DateFormat/TimeFormat](./docs/components.md#dateformattimeformat)
|
|
20
20
|
- [DateRangeFilter](./docs/components.md#daterangefilter)
|
|
21
21
|
- [DynamicVariables](./docs/components.md#dynamicvariables)
|
|
22
|
+
- [EmailForm](./docs/components.md#emailform)
|
|
22
23
|
- [EmailPreview](./docs/components.md#emailpreview)
|
|
23
24
|
- [ErrorPage](./docs/components.md#errorpage)
|
|
24
25
|
- [IconPicker](./docs/components.md#iconpicker)
|
package/dist/EmailForm.cjs.js
CHANGED
|
@@ -42,6 +42,110 @@ var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
|
42
42
|
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
|
|
43
43
|
var DynamicVariables__default = /*#__PURE__*/_interopDefaultLegacy(DynamicVariables);
|
|
44
44
|
|
|
45
|
+
function _typeof$1(obj) {
|
|
46
|
+
"@babel/helpers - typeof";
|
|
47
|
+
|
|
48
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
49
|
+
return typeof obj;
|
|
50
|
+
} : function (obj) {
|
|
51
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
52
|
+
}, _typeof$1(obj);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function _toPrimitive(input, hint) {
|
|
56
|
+
if (_typeof$1(input) !== "object" || input === null) return input;
|
|
57
|
+
var prim = input[Symbol.toPrimitive];
|
|
58
|
+
if (prim !== undefined) {
|
|
59
|
+
var res = prim.call(input, hint || "default");
|
|
60
|
+
if (_typeof$1(res) !== "object") return res;
|
|
61
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
62
|
+
}
|
|
63
|
+
return (hint === "string" ? String : Number)(input);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function _toPropertyKey(arg) {
|
|
67
|
+
var key = _toPrimitive(arg, "string");
|
|
68
|
+
return _typeof$1(key) === "symbol" ? key : String(key);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function _defineProperty(obj, key, value) {
|
|
72
|
+
key = _toPropertyKey(key);
|
|
73
|
+
if (key in obj) {
|
|
74
|
+
Object.defineProperty(obj, key, {
|
|
75
|
+
value: value,
|
|
76
|
+
enumerable: true,
|
|
77
|
+
configurable: true,
|
|
78
|
+
writable: true
|
|
79
|
+
});
|
|
80
|
+
} else {
|
|
81
|
+
obj[key] = value;
|
|
82
|
+
}
|
|
83
|
+
return obj;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
87
|
+
|
|
88
|
+
var classnames$1 = {exports: {}};
|
|
89
|
+
|
|
90
|
+
/*!
|
|
91
|
+
Copyright (c) 2018 Jed Watson.
|
|
92
|
+
Licensed under the MIT License (MIT), see
|
|
93
|
+
http://jedwatson.github.io/classnames
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
(function (module) {
|
|
97
|
+
/* global define */
|
|
98
|
+
|
|
99
|
+
(function () {
|
|
100
|
+
|
|
101
|
+
var hasOwn = {}.hasOwnProperty;
|
|
102
|
+
|
|
103
|
+
function classNames() {
|
|
104
|
+
var classes = [];
|
|
105
|
+
|
|
106
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
107
|
+
var arg = arguments[i];
|
|
108
|
+
if (!arg) continue;
|
|
109
|
+
|
|
110
|
+
var argType = typeof arg;
|
|
111
|
+
|
|
112
|
+
if (argType === 'string' || argType === 'number') {
|
|
113
|
+
classes.push(arg);
|
|
114
|
+
} else if (Array.isArray(arg)) {
|
|
115
|
+
if (arg.length) {
|
|
116
|
+
var inner = classNames.apply(null, arg);
|
|
117
|
+
if (inner) {
|
|
118
|
+
classes.push(inner);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
} else if (argType === 'object') {
|
|
122
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
123
|
+
classes.push(arg.toString());
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
for (var key in arg) {
|
|
128
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
129
|
+
classes.push(key);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return classes.join(' ');
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (module.exports) {
|
|
139
|
+
classNames.default = classNames;
|
|
140
|
+
module.exports = classNames;
|
|
141
|
+
} else {
|
|
142
|
+
window.classNames = classNames;
|
|
143
|
+
}
|
|
144
|
+
}());
|
|
145
|
+
} (classnames$1));
|
|
146
|
+
|
|
147
|
+
var classnames = classnames$1.exports;
|
|
148
|
+
|
|
45
149
|
var INITIAL_FORM_VALUES = {
|
|
46
150
|
sendTo: [],
|
|
47
151
|
sendToCc: [],
|
|
@@ -172,11 +276,9 @@ function _asyncToGenerator(fn) {
|
|
|
172
276
|
};
|
|
173
277
|
}
|
|
174
278
|
|
|
175
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
176
|
-
|
|
177
279
|
var regeneratorRuntime$1 = {exports: {}};
|
|
178
280
|
|
|
179
|
-
var _typeof
|
|
281
|
+
var _typeof = {exports: {}};
|
|
180
282
|
|
|
181
283
|
(function (module) {
|
|
182
284
|
function _typeof(obj) {
|
|
@@ -189,10 +291,10 @@ var _typeof$1 = {exports: {}};
|
|
|
189
291
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
|
|
190
292
|
}
|
|
191
293
|
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
192
|
-
} (_typeof
|
|
294
|
+
} (_typeof));
|
|
193
295
|
|
|
194
296
|
(function (module) {
|
|
195
|
-
var _typeof = _typeof
|
|
297
|
+
var _typeof$1 = _typeof.exports["default"];
|
|
196
298
|
function _regeneratorRuntime() {
|
|
197
299
|
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
198
300
|
return exports;
|
|
@@ -269,7 +371,7 @@ var _typeof$1 = {exports: {}};
|
|
|
269
371
|
if ("throw" !== record.type) {
|
|
270
372
|
var result = record.arg,
|
|
271
373
|
value = result.value;
|
|
272
|
-
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
374
|
+
return value && "object" == _typeof$1(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
273
375
|
invoke("next", value, resolve, reject);
|
|
274
376
|
}, function (err) {
|
|
275
377
|
invoke("throw", err, resolve, reject);
|
|
@@ -2701,7 +2803,9 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
2701
2803
|
_ref$isUpdating = _ref.isUpdating,
|
|
2702
2804
|
isUpdating = _ref$isUpdating === void 0 ? false : _ref$isUpdating,
|
|
2703
2805
|
_ref$showFields = _ref.showFields,
|
|
2704
|
-
showFields = _ref$showFields === void 0 ? true : _ref$showFields
|
|
2806
|
+
showFields = _ref$showFields === void 0 ? true : _ref$showFields,
|
|
2807
|
+
_ref$className = _ref.className,
|
|
2808
|
+
className = _ref$className === void 0 ? "" : _ref$className;
|
|
2705
2809
|
var _useTranslation = reactI18next.useTranslation(),
|
|
2706
2810
|
t = _useTranslation.t;
|
|
2707
2811
|
var _useContext = React.useContext(EmailFormContext),
|
|
@@ -2711,11 +2815,9 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
2711
2815
|
setFieldValue = _useFormikContext.setFieldValue,
|
|
2712
2816
|
dirty = _useFormikContext.dirty;
|
|
2713
2817
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2714
|
-
|
|
2715
|
-
|
|
2818
|
+
"data-testid": "email-form",
|
|
2819
|
+
className: classnames("flex flex-1 flex-col items-start gap-2", _defineProperty({}, className, className))
|
|
2716
2820
|
}, showFields && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2717
|
-
className: "flex items-stretch gap-8"
|
|
2718
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2719
2821
|
className: "flex flex-col items-start justify-start gap-6"
|
|
2720
2822
|
}, /*#__PURE__*/React__default["default"].createElement(formik.Field, {
|
|
2721
2823
|
name: "subject"
|
|
@@ -2759,7 +2861,7 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
2759
2861
|
className: "font-semibold"
|
|
2760
2862
|
})
|
|
2761
2863
|
}
|
|
2762
|
-
}))))
|
|
2864
|
+
})))), /*#__PURE__*/React__default["default"].createElement(formik$1.ActionBlock, {
|
|
2763
2865
|
className: "mt-6 w-full justify-start",
|
|
2764
2866
|
cancelButtonProps: {
|
|
2765
2867
|
disabled: false,
|
|
@@ -2773,47 +2875,6 @@ var EmailForm = function EmailForm(_ref) {
|
|
|
2773
2875
|
}));
|
|
2774
2876
|
};
|
|
2775
2877
|
|
|
2776
|
-
function _typeof(obj) {
|
|
2777
|
-
"@babel/helpers - typeof";
|
|
2778
|
-
|
|
2779
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
2780
|
-
return typeof obj;
|
|
2781
|
-
} : function (obj) {
|
|
2782
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
2783
|
-
}, _typeof(obj);
|
|
2784
|
-
}
|
|
2785
|
-
|
|
2786
|
-
function _toPrimitive(input, hint) {
|
|
2787
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
2788
|
-
var prim = input[Symbol.toPrimitive];
|
|
2789
|
-
if (prim !== undefined) {
|
|
2790
|
-
var res = prim.call(input, hint || "default");
|
|
2791
|
-
if (_typeof(res) !== "object") return res;
|
|
2792
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2793
|
-
}
|
|
2794
|
-
return (hint === "string" ? String : Number)(input);
|
|
2795
|
-
}
|
|
2796
|
-
|
|
2797
|
-
function _toPropertyKey(arg) {
|
|
2798
|
-
var key = _toPrimitive(arg, "string");
|
|
2799
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
2800
|
-
}
|
|
2801
|
-
|
|
2802
|
-
function _defineProperty(obj, key, value) {
|
|
2803
|
-
key = _toPropertyKey(key);
|
|
2804
|
-
if (key in obj) {
|
|
2805
|
-
Object.defineProperty(obj, key, {
|
|
2806
|
-
value: value,
|
|
2807
|
-
enumerable: true,
|
|
2808
|
-
configurable: true,
|
|
2809
|
-
writable: true
|
|
2810
|
-
});
|
|
2811
|
-
} else {
|
|
2812
|
-
obj[key] = value;
|
|
2813
|
-
}
|
|
2814
|
-
return obj;
|
|
2815
|
-
}
|
|
2816
|
-
|
|
2817
2878
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
2818
2879
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2819
2880
|
var EmailFormProvider = function EmailFormProvider(_ref) {
|
|
@@ -2859,13 +2920,15 @@ var EmailPreview = function EmailPreview(_ref) {
|
|
|
2859
2920
|
body = _ref.body,
|
|
2860
2921
|
productName = _ref.productName,
|
|
2861
2922
|
actionButtonText = _ref.actionButtonText,
|
|
2862
|
-
logo = _ref.logo
|
|
2923
|
+
logo = _ref.logo,
|
|
2924
|
+
_ref$className = _ref.className,
|
|
2925
|
+
className = _ref$className === void 0 ? "" : _ref$className;
|
|
2863
2926
|
var _useTranslation = reactI18next.useTranslation(),
|
|
2864
2927
|
t = _useTranslation.t;
|
|
2865
2928
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2866
|
-
className: "neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white flex flex-1 flex-col border",
|
|
2867
2929
|
"data-cy": "email-preview-card",
|
|
2868
|
-
"data-testid": "email-preview"
|
|
2930
|
+
"data-testid": "email-preview",
|
|
2931
|
+
className: classnames("neeto-ui-border-gray-300 neeto-ui-shadow-m neeto-ui-bg-white flex flex-1 flex-col border", _defineProperty({}, className, className))
|
|
2869
2932
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2870
2933
|
className: "neeto-ui-border-gray-300 space-y-3 divide-y divide-gray-200 border-b p-6"
|
|
2871
2934
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|