@selfcommunity/react-ui 0.1.4 → 0.1.5-alpha.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/lib/cjs/components/AccountSignIn/AccountSignIn.js +3 -1
- package/lib/cjs/components/BroadcastMessages/BroadcastMessages.js +3 -1
- package/lib/cjs/components/BroadcastMessages/Message.js +3 -1
- package/lib/cjs/components/CategoriesFollowed/CategoriesFollowed.js +3 -1
- package/lib/cjs/components/CategoriesPopular/CategoriesPopular.js +2 -2
- package/lib/cjs/components/ChangeCover/ChangeCover.js +2 -2
- package/lib/cjs/components/CommentObject/CommentObject.js +5 -3
- package/lib/cjs/components/CommentObject/Votes/VotesDialog/VotesDialog.js +3 -1
- package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.js +3 -1
- package/lib/cjs/components/CommentsObject/CommentsObject.js +3 -3
- package/lib/cjs/components/Composer/Composer.js +4 -4
- package/lib/cjs/components/Feed/Feed.js +4 -4
- package/lib/cjs/components/FeedObject/Actions/Follow/Follow.js +3 -1
- package/lib/cjs/components/FeedObject/Actions/Share/Share.js +3 -1
- package/lib/cjs/components/FeedObject/Actions/Share/SharesDialog/SharesDialog.js +3 -1
- package/lib/cjs/components/FeedObject/Actions/Vote/Vote.js +4 -2
- package/lib/cjs/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +3 -1
- package/lib/cjs/components/FeedObject/Contributors/Contributors.js +3 -1
- package/lib/cjs/components/FeedObject/FeedObject.js +3 -1
- package/lib/cjs/components/FeedObject/Poll/Poll.js +2 -2
- package/lib/cjs/components/FollowCategoryButton/FollowCategoryButton.js +3 -1
- package/lib/cjs/components/FollowUserButton/FollowUserButton.js +3 -1
- package/lib/cjs/components/Footer/Footer.js +4 -2
- package/lib/cjs/components/Incubator/SubscribeButton/SubscribeButton.js +3 -1
- package/lib/cjs/components/IncubatorDetail/IncubatorDetail.js +3 -1
- package/lib/cjs/components/IncubatorSuggestion/IncubatorSuggestion.js +3 -1
- package/lib/cjs/components/IncubatorsList/CreateIncubatorDialog/CreateIncubatorDialog.js +3 -1
- package/lib/cjs/components/IncubatorsList/IncubatorsList.js +2 -2
- package/lib/cjs/components/Notification/CollapsedFor/CollapsedFor.js +5 -3
- package/lib/cjs/components/Notification/DeletedFor/DeletedFor.js +5 -3
- package/lib/cjs/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
- package/lib/cjs/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
- package/lib/cjs/components/Notification/Notification.js +4 -2
- package/lib/cjs/components/PollSuggestion/PollSuggestion.js +3 -1
- package/lib/cjs/components/RelatedFeedObjects/RelatedFeedObjects.js +4 -2
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +3 -1
- package/lib/cjs/components/TrendingFeed/TrendingFeed.js +2 -2
- package/lib/cjs/components/UserFollowers/UserFollowers.js +3 -1
- package/lib/cjs/components/UserProfileEdit/Section/PublicInfo.js +6 -5
- package/lib/cjs/components/UserProfileInfo/UserProfileInfo.js +3 -1
- package/lib/cjs/components/UsersFollowed/UsersFollowed.js +3 -1
- package/lib/cjs/shared/ContributionActionsMenu/index.js +10 -10
- package/lib/cjs/shared/Lightbox/Lightbox.js +5 -5
- package/lib/cjs/shared/Media/Link/UrlTextField/index.js +3 -3
- package/lib/esm/api-services/src/constants/Endpoints.d.ts.map +1 -1
- package/lib/esm/api-services/src/index.d.ts +26 -3
- package/lib/esm/api-services/src/index.d.ts.map +1 -1
- package/lib/esm/api-services/src/services/category/index.d.ts +42 -0
- package/lib/esm/api-services/src/services/category/index.d.ts.map +1 -1
- package/lib/esm/api-services/src/services/comment/index.d.ts +40 -0
- package/lib/esm/api-services/src/services/comment/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/custom_adv/index.d.ts +16 -0
- package/lib/esm/api-services/src/services/custom_adv/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/custom_page/index.d.ts +16 -0
- package/lib/esm/api-services/src/services/custom_page/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/data_portability/index.d.ts +16 -0
- package/lib/esm/api-services/src/services/data_portability/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/dynamic_preference/index.d.ts +16 -0
- package/lib/esm/api-services/src/services/dynamic_preference/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/embed/index.d.ts +31 -0
- package/lib/esm/api-services/src/services/embed/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/feed/index.d.ts +22 -0
- package/lib/esm/api-services/src/services/feed/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/feed_object/index.d.ts +88 -0
- package/lib/esm/api-services/src/services/feed_object/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/incubator/index.d.ts +28 -0
- package/lib/esm/api-services/src/services/incubator/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/insight/index.d.ts +25 -0
- package/lib/esm/api-services/src/services/insight/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/legal_page/index.d.ts +25 -0
- package/lib/esm/api-services/src/services/legal_page/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/locality/index.d.ts +13 -0
- package/lib/esm/api-services/src/services/locality/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/loyalty/index.d.ts +34 -0
- package/lib/esm/api-services/src/services/loyalty/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/media/index.d.ts +28 -0
- package/lib/esm/api-services/src/services/media/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/moderation/index.d.ts +25 -0
- package/lib/esm/api-services/src/services/moderation/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/notification/index.d.ts +34 -0
- package/lib/esm/api-services/src/services/notification/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/private_message/index.d.ts +37 -0
- package/lib/esm/api-services/src/services/private_message/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/score/index.d.ts +16 -0
- package/lib/esm/api-services/src/services/score/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/sso/index.d.ts +13 -0
- package/lib/esm/api-services/src/services/sso/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/suggestion/index.d.ts +19 -0
- package/lib/esm/api-services/src/services/suggestion/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/tag/index.d.ts +28 -0
- package/lib/esm/api-services/src/services/tag/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/services/user/index.d.ts +132 -0
- package/lib/esm/api-services/src/services/user/index.d.ts.map +1 -1
- package/lib/esm/api-services/src/services/webhook/index.d.ts +43 -0
- package/lib/esm/api-services/src/services/webhook/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/utils/token.d.ts +5 -0
- package/lib/esm/api-services/src/utils/token.d.ts.map +1 -1
- package/lib/esm/components/AccountSignIn/AccountSignIn.js +3 -1
- package/lib/esm/components/BroadcastMessages/BroadcastMessages.js +3 -1
- package/lib/esm/components/BroadcastMessages/Message.js +3 -1
- package/lib/esm/components/CategoriesFollowed/CategoriesFollowed.js +3 -1
- package/lib/esm/components/CategoriesPopular/CategoriesPopular.js +2 -2
- package/lib/esm/components/ChangeCover/ChangeCover.js +2 -2
- package/lib/esm/components/CommentObject/CommentObject.js +5 -3
- package/lib/esm/components/CommentObject/Votes/VotesDialog/VotesDialog.js +3 -1
- package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js +3 -1
- package/lib/esm/components/CommentsObject/CommentsObject.js +3 -3
- package/lib/esm/components/Composer/Composer.js +4 -4
- package/lib/esm/components/Feed/Feed.js +4 -4
- package/lib/esm/components/FeedObject/Actions/Follow/Follow.js +3 -1
- package/lib/esm/components/FeedObject/Actions/Share/Share.js +3 -1
- package/lib/esm/components/FeedObject/Actions/Share/SharesDialog/SharesDialog.js +3 -1
- package/lib/esm/components/FeedObject/Actions/Vote/Vote.js +4 -2
- package/lib/esm/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.js +3 -1
- package/lib/esm/components/FeedObject/Contributors/Contributors.js +3 -1
- package/lib/esm/components/FeedObject/FeedObject.js +3 -1
- package/lib/esm/components/FeedObject/Poll/Poll.js +2 -2
- package/lib/esm/components/FollowCategoryButton/FollowCategoryButton.js +3 -1
- package/lib/esm/components/FollowUserButton/FollowUserButton.js +3 -1
- package/lib/esm/components/Footer/Footer.js +4 -2
- package/lib/esm/components/Incubator/SubscribeButton/SubscribeButton.js +3 -1
- package/lib/esm/components/IncubatorDetail/IncubatorDetail.js +3 -1
- package/lib/esm/components/IncubatorSuggestion/IncubatorSuggestion.js +3 -1
- package/lib/esm/components/IncubatorsList/CreateIncubatorDialog/CreateIncubatorDialog.js +3 -1
- package/lib/esm/components/IncubatorsList/IncubatorsList.js +2 -2
- package/lib/esm/components/Notification/CollapsedFor/CollapsedFor.js +5 -3
- package/lib/esm/components/Notification/DeletedFor/DeletedFor.js +5 -3
- package/lib/esm/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.js +3 -1
- package/lib/esm/components/Notification/KindlyNoticeFor/KindlyNoticeFor.js +5 -3
- package/lib/esm/components/Notification/Notification.js +4 -2
- package/lib/esm/components/PollSuggestion/PollSuggestion.js +3 -1
- package/lib/esm/components/RelatedFeedObjects/RelatedFeedObjects.js +4 -2
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +3 -1
- package/lib/esm/components/TrendingFeed/TrendingFeed.js +2 -2
- package/lib/esm/components/UserFollowers/UserFollowers.js +3 -1
- package/lib/esm/components/UserProfileEdit/Section/PublicInfo.js +6 -5
- package/lib/esm/components/UserProfileInfo/UserProfileInfo.js +3 -1
- package/lib/esm/components/UsersFollowed/UsersFollowed.js +3 -1
- package/lib/esm/react-core/src/hooks/useSCFetchAddressingTagList.d.ts.map +1 -1
- package/lib/esm/react-core/src/hooks/useSCFetchCommentObjects.d.ts +1 -2
- package/lib/esm/react-core/src/hooks/useSCFetchCommentObjects.d.ts.map +1 -1
- package/lib/esm/react-core/src/hooks/useSCWebSocket.d.ts +1 -1
- package/lib/esm/react-core/src/hooks/useSCWebSocket.d.ts.map +1 -1
- package/lib/esm/react-core/src/index.d.ts +2 -7
- package/lib/esm/react-core/src/index.d.ts.map +1 -1
- package/lib/esm/react-core/src/utils/validator.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/AccountSignIn/AccountSignIn.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/BroadcastMessages/BroadcastMessages.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/CategoriesFollowed/CategoriesFollowed.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/CommentObject/Votes/VotesDialog/VotesDialog.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/CommentsFeedObject/CommentsFeedObject.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/Feed/Feed.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/FeedObject/Actions/Follow/Follow.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/FeedObject/Actions/Share/SharesDialog/SharesDialog.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/FeedObject/Actions/Vote/Vote.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/FeedObject/Activities/ActivitiesMenu/ActivitiesMenu.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/FeedObject/Contributors/Contributors.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/IncubatorSuggestion/IncubatorSuggestion.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/IncubatorsList/CreateIncubatorDialog/CreateIncubatorDialog.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/Notification/CollapsedFor/CollapsedFor.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/Notification/DeletedFor/DeletedFor.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/Notification/KindlyNoticeFlag/KindlyNoticeFlag.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/Notification/KindlyNoticeFor/KindlyNoticeFor.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/Notification/Notification.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/PollSuggestion/PollSuggestion.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/RelatedFeedObjects/RelatedFeedObjects.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/SnippetNotifications/SnippetNotifications.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/UserFollowers/UserFollowers.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/UserProfileEdit/Section/PublicInfo.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/UserProfileInfo/UserProfileInfo.d.ts.map +1 -1
- package/lib/esm/react-ui/src/components/UsersFollowed/UsersFollowed.d.ts.map +1 -1
- package/lib/esm/react-ui/src/shared/ContributionActionsMenu/index.d.ts.map +1 -1
- package/lib/esm/shared/ContributionActionsMenu/index.js +10 -10
- package/lib/esm/shared/Lightbox/Lightbox.js +5 -5
- package/lib/esm/shared/Media/Link/UrlTextField/index.js +3 -3
- package/lib/esm/utils/src/index.d.ts +8 -3
- package/lib/esm/utils/src/index.d.ts.map +1 -1
- package/lib/esm/utils/src/utils/browser.d.ts +9 -0
- package/lib/esm/utils/src/utils/browser.d.ts.map +1 -0
- package/lib/esm/{react-core → utils}/src/utils/logger.d.ts +0 -0
- package/lib/esm/utils/src/utils/logger.d.ts.map +1 -0
- package/lib/esm/{react-core → utils}/src/utils/object.d.ts +0 -0
- package/lib/esm/utils/src/utils/object.d.ts.map +1 -0
- package/lib/esm/utils/src/utils/string.d.ts +22 -0
- package/lib/esm/utils/src/utils/string.d.ts.map +1 -1
- package/lib/esm/utils/src/utils/url.d.ts +11 -0
- package/lib/esm/utils/src/utils/url.d.ts.map +1 -1
- package/lib/esm/{react-core → utils}/src/utils/websocket.d.ts +0 -0
- package/lib/esm/utils/src/utils/websocket.d.ts.map +1 -0
- package/lib/umd/react-ui.js +14 -14
- package/lib/umd/react-ui.js.map +1 -1
- package/package.json +6 -6
- package/lib/cjs/scss/styles.scss +0 -0
- package/lib/cjs/utils/string.js +0 -65
- package/lib/cjs/utils/url.js +0 -24
- package/lib/cjs/utils/window.js +0 -41
- package/lib/esm/react-core/src/utils/logger.d.ts.map +0 -1
- package/lib/esm/react-core/src/utils/object.d.ts.map +0 -1
- package/lib/esm/react-core/src/utils/string.d.ts +0 -21
- package/lib/esm/react-core/src/utils/string.d.ts.map +0 -1
- package/lib/esm/react-core/src/utils/url.d.ts +0 -22
- package/lib/esm/react-core/src/utils/url.d.ts.map +0 -1
- package/lib/esm/react-core/src/utils/webPushMessaging.d.ts +0 -14
- package/lib/esm/react-core/src/utils/webPushMessaging.d.ts.map +0 -1
- package/lib/esm/react-core/src/utils/websocket.d.ts.map +0 -1
- package/lib/esm/react-ui/src/utils/url.d.ts +0 -7
- package/lib/esm/react-ui/src/utils/url.d.ts.map +0 -1
- package/lib/esm/scss/styles.scss +0 -0
- package/lib/esm/utils/string.js +0 -65
- package/lib/esm/utils/url.js +0 -24
- package/lib/esm/utils/window.js +0 -41
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@selfcommunity/react-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5-alpha.0",
|
|
4
4
|
"description": "React UI Components to integrate a Community created with SelfCommunity.",
|
|
5
5
|
"author": "SelfCommunity <https://www.selfcommunity.com>",
|
|
6
6
|
"homepage": "https://www.selfcommunity.com",
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
"@rpldy/upload-drop-zone": "^0.18.0",
|
|
69
69
|
"@rpldy/upload-preview": "^0.18.0",
|
|
70
70
|
"@rpldy/uploady": "^0.18.0",
|
|
71
|
-
"@selfcommunity/api-services": "^0.1.
|
|
72
|
-
"@selfcommunity/react-core": "^0.1.
|
|
73
|
-
"@selfcommunity/react-i18n": "^0.1.
|
|
74
|
-
"@selfcommunity/types": "^0.1.
|
|
71
|
+
"@selfcommunity/api-services": "^0.1.5-alpha.0",
|
|
72
|
+
"@selfcommunity/react-core": "^0.1.5-alpha.0",
|
|
73
|
+
"@selfcommunity/react-i18n": "^0.1.5-alpha.0",
|
|
74
|
+
"@selfcommunity/types": "^0.1.5-alpha.0",
|
|
75
75
|
"@types/classnames": "^2.2.11",
|
|
76
76
|
"autosuggest-highlight": "^3.1.1",
|
|
77
77
|
"classnames": "^2.2.6",
|
|
@@ -155,5 +155,5 @@
|
|
|
155
155
|
"bugs": {
|
|
156
156
|
"url": "https://github.com/selfcommunity/community-js/issues"
|
|
157
157
|
},
|
|
158
|
-
"gitHead": "
|
|
158
|
+
"gitHead": "ce47fd80ccb32a7129728396883790828a3722cd"
|
|
159
159
|
}
|
package/lib/cjs/scss/styles.scss
DELETED
|
File without changes
|
package/lib/cjs/utils/string.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.copyTextToClipboard = copyTextToClipboard;
|
|
5
|
-
exports.fallbackCopyTextToClipboard = fallbackCopyTextToClipboard;
|
|
6
|
-
exports.random = random;
|
|
7
|
-
exports.stripHtml = stripHtml;
|
|
8
|
-
|
|
9
|
-
function stripHtml(str) {
|
|
10
|
-
return str.replace(/<[^>]*>?/gm, '').trim();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function random() {
|
|
14
|
-
return (Math.random() + 1).toString(36).substring(7);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Fallback if navigator.clipboard doensn't exist
|
|
18
|
-
* @param text
|
|
19
|
-
* @returns {Promise<void>}
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
function fallbackCopyTextToClipboard(text) {
|
|
24
|
-
let textArea = document.createElement('textarea');
|
|
25
|
-
textArea.value = text; // Avoid scrolling to bottom
|
|
26
|
-
|
|
27
|
-
textArea.style.top = '0';
|
|
28
|
-
textArea.style.left = '0';
|
|
29
|
-
textArea.style.position = 'fixed';
|
|
30
|
-
document.body.appendChild(textArea);
|
|
31
|
-
textArea.focus();
|
|
32
|
-
textArea.select();
|
|
33
|
-
|
|
34
|
-
try {
|
|
35
|
-
let successful = document.execCommand('copy');
|
|
36
|
-
document.body.removeChild(textArea);
|
|
37
|
-
return Promise.success();
|
|
38
|
-
} catch (err) {
|
|
39
|
-
document.body.removeChild(textArea);
|
|
40
|
-
return Promise.reject(err);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Copy text to clipboard
|
|
45
|
-
* @param text
|
|
46
|
-
* @returns {Promise<void>}
|
|
47
|
-
*
|
|
48
|
-
* Ex.
|
|
49
|
-
* copyTextToClipboard(text).then(
|
|
50
|
-
* function () {
|
|
51
|
-
* console.log('Async: Copying to clipboard was successful!');
|
|
52
|
-
* },
|
|
53
|
-
* function (err) {
|
|
54
|
-
* console.error('Async: Could not copy text: ', err);
|
|
55
|
-
* });
|
|
56
|
-
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
function copyTextToClipboard(text) {
|
|
60
|
-
if (!navigator.clipboard) {
|
|
61
|
-
return fallbackCopyTextToClipboard(text);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return navigator.clipboard.writeText(text);
|
|
65
|
-
}
|
package/lib/cjs/utils/url.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.appendURLSearchParams = appendURLSearchParams;
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Append params
|
|
8
|
-
* @param baseUrl
|
|
9
|
-
* @param queryParams
|
|
10
|
-
*/
|
|
11
|
-
function appendURLSearchParams(baseUrl, queryParams) {
|
|
12
|
-
let _url = baseUrl;
|
|
13
|
-
|
|
14
|
-
if (queryParams.length && _url) {
|
|
15
|
-
const key = Object.keys(queryParams[0])[0];
|
|
16
|
-
_url += (_url.split('?')[1] ? '&' : '?') + `${key}=${queryParams[0][key]}`;
|
|
17
|
-
queryParams.slice(1).map(p => {
|
|
18
|
-
const key = Object.keys(p)[0];
|
|
19
|
-
_url += `&${key}=${p[key]}`;
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return _url;
|
|
24
|
-
}
|
package/lib/cjs/utils/window.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.getHighestSafeWindowContext = getHighestSafeWindowContext;
|
|
5
|
-
exports.getWindowHeight = getWindowHeight;
|
|
6
|
-
exports.getWindowWidth = getWindowWidth;
|
|
7
|
-
|
|
8
|
-
function getWindowWidth() {
|
|
9
|
-
return typeof global.window !== 'undefined' ? global.window.innerWidth : 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function getWindowHeight() {
|
|
13
|
-
return typeof global.window !== 'undefined' ? global.window.innerHeight : 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const isCrossOriginFrame = () => {
|
|
17
|
-
try {
|
|
18
|
-
return global.window.location.hostname !== global.window.parent.location.hostname;
|
|
19
|
-
} catch (e) {
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
}; // Get the highest window context that isn't cross-origin
|
|
23
|
-
// (When in an iframe)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
function getHighestSafeWindowContext(self = global.window.self) {
|
|
27
|
-
// If we reached the top level, return self
|
|
28
|
-
if (self === global.window.top) {
|
|
29
|
-
return self;
|
|
30
|
-
} // If parent is the same origin, we can move up one context
|
|
31
|
-
// Reference: https://stackoverflow.com/a/21965342/1601953
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (!isCrossOriginFrame()) {
|
|
35
|
-
return getHighestSafeWindowContext(self.parent);
|
|
36
|
-
} // If a different origin, we consider the current level
|
|
37
|
-
// as the top reachable one
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return self;
|
|
41
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../../react-core/src/utils/logger.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,MAAM;IACjB,MAAM,CAAC,IAAI,CAAC,KAAK,KAAA,EAAE,OAAO,KAAA;IAI1B,MAAM,CAAC,IAAI,CAAC,KAAK,KAAA,EAAE,OAAO,KAAA;IAI1B,MAAM,CAAC,KAAK,CAAC,KAAK,KAAA,EAAE,OAAO,KAAA;IAI3B,MAAM,CAAC,GAAG,CAAC,KAAK,KAAA,EAAE,OAAO,KAAA;IAIzB,MAAM,CAAC,KAAK,CAAC,KAAK,KAAA,EAAE,OAAO,KAAA;CAG5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../../../../react-core/src/utils/object.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,KAAA,WAEzB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAgBhE"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if v is a string
|
|
3
|
-
* @param v
|
|
4
|
-
*/
|
|
5
|
-
export declare function isString(v: any): boolean;
|
|
6
|
-
/**
|
|
7
|
-
* Capitalize a string
|
|
8
|
-
* @param str
|
|
9
|
-
*/
|
|
10
|
-
export declare function capitalize(str: string): string;
|
|
11
|
-
/**
|
|
12
|
-
* CamelCase a string
|
|
13
|
-
* @param str
|
|
14
|
-
*/
|
|
15
|
-
export declare function camelCase(str: string): string;
|
|
16
|
-
/**
|
|
17
|
-
* Stripe html tags from a string
|
|
18
|
-
* @param str
|
|
19
|
-
*/
|
|
20
|
-
export declare function stripHtml(str: string): string;
|
|
21
|
-
//# sourceMappingURL=string.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../../../react-core/src/utils/string.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,CAAC,KAAA,WAEzB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO9C;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAiB7C;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility Url Replacer
|
|
3
|
-
* @param path
|
|
4
|
-
*/
|
|
5
|
-
export declare const urlReplacer: (path: string) => (params: object) => any;
|
|
6
|
-
/**
|
|
7
|
-
* Get domain
|
|
8
|
-
* @param url
|
|
9
|
-
*/
|
|
10
|
-
export declare const getDomain: (url: string) => string;
|
|
11
|
-
/**
|
|
12
|
-
* Check a str is a valid url pattern
|
|
13
|
-
* @param url
|
|
14
|
-
*/
|
|
15
|
-
export declare const isValidUrl: (url: string) => boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Check a str is a valid list of urls separated by delimiter
|
|
18
|
-
* @param value
|
|
19
|
-
* @param delimiter
|
|
20
|
-
*/
|
|
21
|
-
export declare const isValidUrls: (value: string, delimiter: string) => boolean;
|
|
22
|
-
//# sourceMappingURL=url.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../../../../react-core/src/utils/url.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW,SAAU,MAAM,cAWtB,MAAM,QACvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,QAAS,MAAM,KAAG,MAOvC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,QAAS,MAAM,KAAG,OAGxC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,UAAW,MAAM,aAAa,MAAM,KAAG,OAG9D,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Take the application server's public key, which is Base64 URL-safe encoded,
|
|
3
|
-
* and convert it to a UInt8Array, because this is the expected input of the subscribe()
|
|
4
|
-
*/
|
|
5
|
-
export declare const urlB64ToUint8Array: (base64String: any) => Uint8Array;
|
|
6
|
-
/**
|
|
7
|
-
* Get browser version to track on backend
|
|
8
|
-
* @return {{name: string, version: null}|{name: string, version: string}|{name: *, version: *}|{name: string, version}}
|
|
9
|
-
*/
|
|
10
|
-
export declare const loadVersionBrowser: () => {
|
|
11
|
-
name: any;
|
|
12
|
-
version: any;
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=webPushMessaging.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"webPushMessaging.d.ts","sourceRoot":"","sources":["../../../../../../react-core/src/utils/webPushMessaging.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,kBAAkB,mCAW9B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;CAgE9B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["../../../../../../react-core/src/utils/websocket.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,CAAC;IAEtB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,CAAC;IAEvB;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,GAAG,CAAC;IAE5B;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,KAAA,KAAK,GAAG,CAAC;IAE/B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,WAAW,EAAE,CAAC,OAAO,KAAA,KAAK,IAAI,CAAC;IAE/B;;OAEG;IACH,QAAQ,EAAE,MAAM,MAAM,CAAC;IAEvB;;OAEG;IACH,YAAY,EAAE,MAAM,OAAO,CAAC;IAE5B;;OAEG;IACH,WAAW,EAAE,MAAM,OAAO,CAAC;IAE3B;;OAEG;IACH,SAAS,EAAE,MAAM,OAAO,CAAC;IAEzB;;OAEG;IACH,QAAQ,EAAE,MAAM,OAAO,CAAC;IAExB;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,YAAW,YAAY;IACnD,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC;IACzB,OAAO,CAAC,IAAI,CAAC;IACb,OAAO,CAAC,GAAG,CAAC;IACZ,OAAO,CAAC,MAAM,CAAC;IACf,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,kBAAkB,CAAQ;IAClC,OAAO,CAAC,iBAAiB,CAAK;IAE9B;;;OAGG;gBACS,GAAG,EAAE,iBAAiB;IAQlC;;OAEG;WACW,WAAW,CAAC,GAAG,KAAA,GAAG,QAAQ;IAKxC;;OAEG;IACH,OAAO;IAyBP;;;OAGG;IACH,cAAc,CAAC,GAAG,EAAE,iBAAiB;IAqCrC;;;OAGG;IACH,cAAc;IAQd;;;OAGG;IACH,SAAS;IAKT;;;OAGG;IACH,aAAa;IAeb;;;OAGG;IACH,MAAM;IAUN;;;OAGG;IACH,OAAO,CAAC,GAAG,KAAA;IAMX;;;OAGG;IACH,OAAO,CAAC,GAAG,KAAA;IAKX;;;;;OAKG;IACH,SAAS,CAAC,GAAG,KAAA;IASb;;;;OAIG;IACH,eAAe,CAAC,CAAC,KAAA;IAUjB;;;OAGG;IACI,WAAW,CAAC,OAAO,KAAA;IAI1B;;OAEG;IACI,QAAQ;IAIf;;OAEG;IACI,YAAY;IAInB;;OAEG;IACI,WAAW;IAIlB;;OAEG;IACI,SAAS;IAIhB;;OAEG;IACI,QAAQ;IAIf;;OAEG;IACI,KAAK;CAQb"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../../../src/utils/url.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAAE,UAWpG"}
|
package/lib/esm/scss/styles.scss
DELETED
|
File without changes
|
package/lib/esm/utils/string.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.copyTextToClipboard = copyTextToClipboard;
|
|
5
|
-
exports.fallbackCopyTextToClipboard = fallbackCopyTextToClipboard;
|
|
6
|
-
exports.random = random;
|
|
7
|
-
exports.stripHtml = stripHtml;
|
|
8
|
-
|
|
9
|
-
function stripHtml(str) {
|
|
10
|
-
return str.replace(/<[^>]*>?/gm, '').trim();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function random() {
|
|
14
|
-
return (Math.random() + 1).toString(36).substring(7);
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Fallback if navigator.clipboard doensn't exist
|
|
18
|
-
* @param text
|
|
19
|
-
* @returns {Promise<void>}
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
function fallbackCopyTextToClipboard(text) {
|
|
24
|
-
let textArea = document.createElement('textarea');
|
|
25
|
-
textArea.value = text; // Avoid scrolling to bottom
|
|
26
|
-
|
|
27
|
-
textArea.style.top = '0';
|
|
28
|
-
textArea.style.left = '0';
|
|
29
|
-
textArea.style.position = 'fixed';
|
|
30
|
-
document.body.appendChild(textArea);
|
|
31
|
-
textArea.focus();
|
|
32
|
-
textArea.select();
|
|
33
|
-
|
|
34
|
-
try {
|
|
35
|
-
let successful = document.execCommand('copy');
|
|
36
|
-
document.body.removeChild(textArea);
|
|
37
|
-
return Promise.success();
|
|
38
|
-
} catch (err) {
|
|
39
|
-
document.body.removeChild(textArea);
|
|
40
|
-
return Promise.reject(err);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Copy text to clipboard
|
|
45
|
-
* @param text
|
|
46
|
-
* @returns {Promise<void>}
|
|
47
|
-
*
|
|
48
|
-
* Ex.
|
|
49
|
-
* copyTextToClipboard(text).then(
|
|
50
|
-
* function () {
|
|
51
|
-
* console.log('Async: Copying to clipboard was successful!');
|
|
52
|
-
* },
|
|
53
|
-
* function (err) {
|
|
54
|
-
* console.error('Async: Could not copy text: ', err);
|
|
55
|
-
* });
|
|
56
|
-
*/
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
function copyTextToClipboard(text) {
|
|
60
|
-
if (!navigator.clipboard) {
|
|
61
|
-
return fallbackCopyTextToClipboard(text);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return navigator.clipboard.writeText(text);
|
|
65
|
-
}
|
package/lib/esm/utils/url.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.appendURLSearchParams = appendURLSearchParams;
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Append params
|
|
8
|
-
* @param baseUrl
|
|
9
|
-
* @param queryParams
|
|
10
|
-
*/
|
|
11
|
-
function appendURLSearchParams(baseUrl, queryParams) {
|
|
12
|
-
let _url = baseUrl;
|
|
13
|
-
|
|
14
|
-
if (queryParams.length && _url) {
|
|
15
|
-
const key = Object.keys(queryParams[0])[0];
|
|
16
|
-
_url += (_url.split('?')[1] ? '&' : '?') + `${key}=${queryParams[0][key]}`;
|
|
17
|
-
queryParams.slice(1).map(p => {
|
|
18
|
-
const key = Object.keys(p)[0];
|
|
19
|
-
_url += `&${key}=${p[key]}`;
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
return _url;
|
|
24
|
-
}
|
package/lib/esm/utils/window.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.getHighestSafeWindowContext = getHighestSafeWindowContext;
|
|
5
|
-
exports.getWindowHeight = getWindowHeight;
|
|
6
|
-
exports.getWindowWidth = getWindowWidth;
|
|
7
|
-
|
|
8
|
-
function getWindowWidth() {
|
|
9
|
-
return typeof global.window !== 'undefined' ? global.window.innerWidth : 0;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function getWindowHeight() {
|
|
13
|
-
return typeof global.window !== 'undefined' ? global.window.innerHeight : 0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const isCrossOriginFrame = () => {
|
|
17
|
-
try {
|
|
18
|
-
return global.window.location.hostname !== global.window.parent.location.hostname;
|
|
19
|
-
} catch (e) {
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
}; // Get the highest window context that isn't cross-origin
|
|
23
|
-
// (When in an iframe)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
function getHighestSafeWindowContext(self = global.window.self) {
|
|
27
|
-
// If we reached the top level, return self
|
|
28
|
-
if (self === global.window.top) {
|
|
29
|
-
return self;
|
|
30
|
-
} // If parent is the same origin, we can move up one context
|
|
31
|
-
// Reference: https://stackoverflow.com/a/21965342/1601953
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (!isCrossOriginFrame()) {
|
|
35
|
-
return getHighestSafeWindowContext(self.parent);
|
|
36
|
-
} // If a different origin, we consider the current level
|
|
37
|
-
// as the top reachable one
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return self;
|
|
41
|
-
}
|