@cakemail-org/ui-components-v2 2.1.80 → 2.2.0
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/components/index.d.ts +0 -1
- package/dist/cjs/index.js +28 -18
- package/dist/cjs/utils/data.d.ts +1 -0
- package/dist/esm/components/index.d.ts +0 -1
- package/dist/esm/index.js +28 -18
- package/dist/esm/utils/data.d.ts +1 -0
- package/package.json +2 -2
- package/dist/cjs/components/copyToClipboard/index.d.ts +0 -5
- package/dist/cjs/components/copyToClipboard/types.d.ts +0 -4
- package/dist/esm/components/copyToClipboard/index.d.ts +0 -5
- package/dist/esm/components/copyToClipboard/types.d.ts +0 -4
|
@@ -9,7 +9,6 @@ export * from "./chip";
|
|
|
9
9
|
export * from './circularProgress';
|
|
10
10
|
export * from "./codeInput";
|
|
11
11
|
export * from "./contentSectionContainer";
|
|
12
|
-
export * from "./copyToClipboard";
|
|
13
12
|
export * from "./dataTable";
|
|
14
13
|
export * from "./datePicker";
|
|
15
14
|
export * from "./dialog";
|
package/dist/cjs/index.js
CHANGED
|
@@ -2703,6 +2703,33 @@ function deepMergeObject(source, target) {
|
|
|
2703
2703
|
}
|
|
2704
2704
|
return target;
|
|
2705
2705
|
}
|
|
2706
|
+
function copyToClipboard(text) {
|
|
2707
|
+
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
2708
|
+
navigator.clipboard.writeText(text).catch(function (err) {
|
|
2709
|
+
fallbackCopyToClipboard(text);
|
|
2710
|
+
});
|
|
2711
|
+
}
|
|
2712
|
+
else {
|
|
2713
|
+
fallbackCopyToClipboard(text);
|
|
2714
|
+
}
|
|
2715
|
+
}
|
|
2716
|
+
function fallbackCopyToClipboard(text) {
|
|
2717
|
+
var textarea = document.createElement('textarea');
|
|
2718
|
+
textarea.value = text;
|
|
2719
|
+
textarea.style.position = 'fixed';
|
|
2720
|
+
textarea.style.top = '-1000px';
|
|
2721
|
+
textarea.style.left = '-1000px';
|
|
2722
|
+
textarea.style.opacity = '0';
|
|
2723
|
+
document.body.appendChild(textarea);
|
|
2724
|
+
textarea.select();
|
|
2725
|
+
try {
|
|
2726
|
+
document.execCommand('copy');
|
|
2727
|
+
}
|
|
2728
|
+
catch (err) {
|
|
2729
|
+
console.error('Failed to copy text');
|
|
2730
|
+
}
|
|
2731
|
+
document.body.removeChild(textarea);
|
|
2732
|
+
}
|
|
2706
2733
|
|
|
2707
2734
|
function setBrandHeadElements(brand, locale) {
|
|
2708
2735
|
var link = document.getElementById("favicon");
|
|
@@ -8474,23 +8501,6 @@ function CodeInput(_a) {
|
|
|
8474
8501
|
React.createElement(OTPInput, { value: cValue, onChange: handleOnChange, onPaste: handleOnPaste, renderInput: function (props) { return React.createElement("input", __assign({}, props)); }, inputType: inputType, numInputs: numInputs, skipDefaultStyles: true, shouldAutoFocus: shouldAutoFocus, placeholder: placeholder, renderSeparator: renderSeparator }));
|
|
8475
8502
|
}
|
|
8476
8503
|
|
|
8477
|
-
var CopyToClipboard = React.forwardRef(function (props, ref) {
|
|
8478
|
-
var textareaRef = React.useRef(null);
|
|
8479
|
-
React.useImperativeHandle(ref, function () { return ({
|
|
8480
|
-
// Expose the 'copy' function through the ref
|
|
8481
|
-
copy: function (text) {
|
|
8482
|
-
setTimeout(function () {
|
|
8483
|
-
if (textareaRef.current) {
|
|
8484
|
-
textareaRef.current.value = text;
|
|
8485
|
-
textareaRef.current.select();
|
|
8486
|
-
document.execCommand('copy');
|
|
8487
|
-
}
|
|
8488
|
-
}, 0);
|
|
8489
|
-
},
|
|
8490
|
-
}); });
|
|
8491
|
-
return (React.createElement("textarea", { ref: textareaRef, style: { position: "fixed", top: "-1000px" } }));
|
|
8492
|
-
});
|
|
8493
|
-
|
|
8494
8504
|
function CustomPaginationActions(_a) {
|
|
8495
8505
|
var count = _a.count, page = _a.page, rowsPerPage = _a.rowsPerPage, onPageChange = _a.onPageChange, showFirstButton = _a.showFirstButton, showLastButton = _a.showLastButton;
|
|
8496
8506
|
var handleFirstPageButtonClick = function (event) {
|
|
@@ -18868,7 +18878,6 @@ exports.CommonFormModel = CommonFormModel;
|
|
|
18868
18878
|
exports.ContactModel = ContactModel;
|
|
18869
18879
|
exports.ContactsFactory = ContactsFactory;
|
|
18870
18880
|
exports.ContentSectionContainer = ContentSectionContainer;
|
|
18871
|
-
exports.CopyToClipboard = CopyToClipboard;
|
|
18872
18881
|
exports.CountryDropdown = CountryDropdown;
|
|
18873
18882
|
exports.CustomerModel = CustomerModel;
|
|
18874
18883
|
exports.DataTable = DataTable;
|
|
@@ -18968,6 +18977,7 @@ exports.cleanPostHogId = cleanPostHogId;
|
|
|
18968
18977
|
exports.clearImpersonificationTree = clearImpersonificationTree;
|
|
18969
18978
|
exports.clearStorage = clearStorage;
|
|
18970
18979
|
exports.connectToZendeskSupportService = connectToZendeskSupportService;
|
|
18980
|
+
exports.copyToClipboard = copyToClipboard;
|
|
18971
18981
|
exports.createAccount = createAccount;
|
|
18972
18982
|
exports.createBrand = createBrand;
|
|
18973
18983
|
exports.createCampaign = createCampaign;
|
package/dist/cjs/utils/data.d.ts
CHANGED
|
@@ -24,4 +24,5 @@ export declare function removeEmptyProperties(obj: any, treatStringHasEmtpy?: bo
|
|
|
24
24
|
export declare function getNestedProperty(obj: any, path: string): any;
|
|
25
25
|
export declare function findNestedProperty(obj: any, key: string): any | undefined;
|
|
26
26
|
export declare function deepMergeObject(source: any, target: any): any;
|
|
27
|
+
export declare function copyToClipboard(text: string): void;
|
|
27
28
|
export {};
|
|
@@ -9,7 +9,6 @@ export * from "./chip";
|
|
|
9
9
|
export * from './circularProgress';
|
|
10
10
|
export * from "./codeInput";
|
|
11
11
|
export * from "./contentSectionContainer";
|
|
12
|
-
export * from "./copyToClipboard";
|
|
13
12
|
export * from "./dataTable";
|
|
14
13
|
export * from "./datePicker";
|
|
15
14
|
export * from "./dialog";
|
package/dist/esm/index.js
CHANGED
|
@@ -2683,6 +2683,33 @@ function deepMergeObject(source, target) {
|
|
|
2683
2683
|
}
|
|
2684
2684
|
return target;
|
|
2685
2685
|
}
|
|
2686
|
+
function copyToClipboard(text) {
|
|
2687
|
+
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
2688
|
+
navigator.clipboard.writeText(text).catch(function (err) {
|
|
2689
|
+
fallbackCopyToClipboard(text);
|
|
2690
|
+
});
|
|
2691
|
+
}
|
|
2692
|
+
else {
|
|
2693
|
+
fallbackCopyToClipboard(text);
|
|
2694
|
+
}
|
|
2695
|
+
}
|
|
2696
|
+
function fallbackCopyToClipboard(text) {
|
|
2697
|
+
var textarea = document.createElement('textarea');
|
|
2698
|
+
textarea.value = text;
|
|
2699
|
+
textarea.style.position = 'fixed';
|
|
2700
|
+
textarea.style.top = '-1000px';
|
|
2701
|
+
textarea.style.left = '-1000px';
|
|
2702
|
+
textarea.style.opacity = '0';
|
|
2703
|
+
document.body.appendChild(textarea);
|
|
2704
|
+
textarea.select();
|
|
2705
|
+
try {
|
|
2706
|
+
document.execCommand('copy');
|
|
2707
|
+
}
|
|
2708
|
+
catch (err) {
|
|
2709
|
+
console.error('Failed to copy text');
|
|
2710
|
+
}
|
|
2711
|
+
document.body.removeChild(textarea);
|
|
2712
|
+
}
|
|
2686
2713
|
|
|
2687
2714
|
function setBrandHeadElements(brand, locale) {
|
|
2688
2715
|
var link = document.getElementById("favicon");
|
|
@@ -8454,23 +8481,6 @@ function CodeInput(_a) {
|
|
|
8454
8481
|
React__default.createElement(OTPInput, { value: cValue, onChange: handleOnChange, onPaste: handleOnPaste, renderInput: function (props) { return React__default.createElement("input", __assign({}, props)); }, inputType: inputType, numInputs: numInputs, skipDefaultStyles: true, shouldAutoFocus: shouldAutoFocus, placeholder: placeholder, renderSeparator: renderSeparator }));
|
|
8455
8482
|
}
|
|
8456
8483
|
|
|
8457
|
-
var CopyToClipboard = forwardRef(function (props, ref) {
|
|
8458
|
-
var textareaRef = useRef(null);
|
|
8459
|
-
useImperativeHandle(ref, function () { return ({
|
|
8460
|
-
// Expose the 'copy' function through the ref
|
|
8461
|
-
copy: function (text) {
|
|
8462
|
-
setTimeout(function () {
|
|
8463
|
-
if (textareaRef.current) {
|
|
8464
|
-
textareaRef.current.value = text;
|
|
8465
|
-
textareaRef.current.select();
|
|
8466
|
-
document.execCommand('copy');
|
|
8467
|
-
}
|
|
8468
|
-
}, 0);
|
|
8469
|
-
},
|
|
8470
|
-
}); });
|
|
8471
|
-
return (React__default.createElement("textarea", { ref: textareaRef, style: { position: "fixed", top: "-1000px" } }));
|
|
8472
|
-
});
|
|
8473
|
-
|
|
8474
8484
|
function CustomPaginationActions(_a) {
|
|
8475
8485
|
var count = _a.count, page = _a.page, rowsPerPage = _a.rowsPerPage, onPageChange = _a.onPageChange, showFirstButton = _a.showFirstButton, showLastButton = _a.showLastButton;
|
|
8476
8486
|
var handleFirstPageButtonClick = function (event) {
|
|
@@ -18823,4 +18833,4 @@ var UsersFactory = /** @class */ (function () {
|
|
|
18823
18833
|
return UsersFactory;
|
|
18824
18834
|
}());
|
|
18825
18835
|
|
|
18826
|
-
export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationModel, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer,
|
|
18836
|
+
export { AccountModel, AccountsFactory, ActionBarContainer, ActionBarContainerHandler, AssetManager, AutomationModel, AutomationsFactory, Avatar, BillingFactory, BrandWrapper, BrandsFactory, Button, ButtonMenu, CampaignModel, CampaignsFactory, Checkbox, Chip, CircularProgress, CodeInput, ColManager, ColorTextField, CommonFormModel, ContactModel, ContactsFactory, ContentSectionContainer, CountryDropdown, CustomerModel, DataTable, DataTableHead, DataTableRow, DateCalendar, DatePicker, DateTimeCalendar, DateTimePicker, Dialog, DialogActions, DialogHandler, DialogTitle, Divider, Drawer, DrawerHandler, DropMenu, Dropdown, EApiLanguages, EAssetManagerMatchType, ECampaignStatuses, EEMailSummaryStatuses, EEditorType, EEmailAttachementTypes, EEmailLogType, EEmailLogTypeParam, EEmailProviders, EEmailSummaryEngagement, EEvents, EListAttributeType, EMethods, EOperatorTypes, EPartialInfoPool, EPopupBranding, EPopupBrowserType, EPopupCloseButtonPosition, EPopupDeviceType, EPopupDisplayFrequency, EPopupPosition, EPopupTriggerType, EStorageType, ETaskType, ElementContains, Email, EmailAPIFactory, EmptyContent, EnhancedFormModel, FileUpload, FilterBar, FormModel, FormsFactory, FullBar, GenericWrapper, GenericWrapperContext, GroupedActions, Header, Icon, IconPill, InformationGroup, InlineTextEdit, LinearProgress, Link, ListCampaignModel, ListModel, ListPopupModel, ListTemplateModel, ListsFactory, LoadingContainer, LocationTextField, Logo, MD5, MetricCard, Modal, ModalHandler, ModalHeading, OverlayHandler, PhoneTextField, PopupModel, PopupsFactory, Radio, ResourceEdit, Search, SenderModel, SendersFactory, SideMenu, SideMenuContainer, SideMenuItem, SubNav, SummaryEnhancedFormModel, SupportFactory, SuppressedEmailsFactory, SystemEmailsFactory, SystemEmailsModel, TagsFactory, TasksFactory, TemplateModel, TemplatesFactory, TextField, TimePicker, TimeSelector, Toggle, TopMenu, Typography, UserModel, UsersFactory, acceptListPolicy, addPartialInformation, addSuppressedEmail, addToImpersonificationTree, amIImpersonating, amILoggedInService, archiveCampaign, areAllPropertiesEmpty, buildMUITheme, callApi, camelCase, camelToSnakeCase, cancelCampaign, capitalizeFirstLetter, cleanPostHogId, clearImpersonificationTree, clearStorage, connectToZendeskSupportService, copyToClipboard, createAccount, createBrand, createCampaign, createCampaignLogsExports, createCampaignsReportsExport, createForm, createPopup, createSuppressedEmailExport, createTemplate, deepMergeObject, deleteAnyAutomation, deleteAutomation, deleteCampaign, deleteCampaignsReportsExport, deleteForm, deleteList, deletePartialInformation, deletePopup, deleteStorageItem, deleteSuppressedEmail, deleteTaskService, deleteTemplate, deleteUser, deleteWorkflow, descendingComparator, disableForm, disablePopup, downloadCampaignLogExport, downloadCampaignsReportsExport, downloadContactsExport, downloadListLogExport, downloadSuppressedEmailExport, emptyAccountAddress, emptyAccountLimits, enableForm, enablePopup, enrichBrand, enrichOrganization, enrichProfile, eventCondition, eventIdentify, eventLogout, fetchRetry, fetchRoute, findNestedProperty, formatNumber, getAccount, getAccountReport, getAdjustedBillingCycle, getAutomationExecutionsCount, getAutomationStats, getBeeTokenService, getBestLocalMatch, getBrand, getBrandService, getBrandUrl, getCalendarFormat, getCampaign, getCampaignLinks, getCampaignLinksReport, getCampaignLogs, getCampaignLogsExports, getCampaignReport, getCampaignRevisions, getCampaignsReportsExport, getComparator, getCustomerProfile, getDate, getDomainFromEmail, getDomainsFromEmails, getDomainsService, getEmail, getEmailActivitySummary, getEmailReport, getEndOfDate, getForm, getHashQueryWithoutHistory, getIconSize, getList, getListLogs, getListReport, getNestedProperty, getPopup, getPropertyValue, getSender, getStartOfDate, getStorage, getSuppressedEmailExport, getTColor, getTaskService, getTemplate, getUnixTime, getUrlQueryParam, getUser, getUtmCookies, googlePlacesMapper, hasDecimal, impersonateService, initFieldValidation, initPostHog, isColorLight, isDomainValidService, isSimpleType, isValidEmail, isValidString, isValidUrl, lisTEmailTags, listAccounts, listAutomations, listCampaigns, listCampaignsReportsExports, listContacts, listEmailLogs, listForms, listList, listListAttributes, listListInterests, listPopups, listSenders, listSuppressedEmails, listSystemEmails, listTasksService, listTemplates, listUsers, listWorkflows, logOutService, loginService, miliToSecond, modelSet, modelToJson, originalBrand, patchForm, popImpersonificationTree, postMessage, publishForm, publishPopup, reScheduleCampaign, removeEmptyProperties, removeQueryParams, removeTrailingChar, renderCampaign, renderForm, renderPopup, renderPublicHtmlForm, renderTemplate, requestSupportService, resendVerificationEmail, resumeCampaign, saveList, scheduleCampaign, searchCustomerProfiles, sendCampaignTest, setBrandHeadElements, setStorage, shareTemplate, splitArray, splitObject, stableSort, startPromisePool, suspendCampaign, trackEvent, truncateEmail, truncateText, uiKitConfig, unArchiveCampaign, unScheduleCampaign, unshareTemplate, updateAccount, updateAndClearUrlParams, updateAnyAutomation, updateAutomation, updateCampaign, updatePopup, updateSystemEmails, updateTemplate, updateUser, updateWorkflow, validateColor, validateEmail, validateGenericInput, validateUrl, wait, whiteLabelBrand, whoAmi };
|
package/dist/esm/utils/data.d.ts
CHANGED
|
@@ -24,4 +24,5 @@ export declare function removeEmptyProperties(obj: any, treatStringHasEmtpy?: bo
|
|
|
24
24
|
export declare function getNestedProperty(obj: any, path: string): any;
|
|
25
25
|
export declare function findNestedProperty(obj: any, key: string): any | undefined;
|
|
26
26
|
export declare function deepMergeObject(source: any, target: any): any;
|
|
27
|
+
export declare function copyToClipboard(text: string): void;
|
|
27
28
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cakemail-org/ui-components-v2",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "ui library kit made with material UI",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dev": "rollup -c --bundleConfigAsCjs --watch",
|
|
15
15
|
"test": "jest",
|
|
16
16
|
"storybook": "storybook dev -p 6006",
|
|
17
|
-
"build-storybook": "storybook
|
|
17
|
+
"build-storybook": "storybook buloadingild"
|
|
18
18
|
},
|
|
19
19
|
"author": "",
|
|
20
20
|
"license": "ISC",
|