sea-react-components 1.3.14 → 1.3.16
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/components/accordion/index.d.ts +2 -0
- package/dist/components/accordion/index.d.ts.map +1 -1
- package/dist/components/accordion/index.js +5 -2
- package/dist/components/activity-message/index.d.ts.map +1 -1
- package/dist/components/activity-message/index.js +2 -2
- package/dist/components/auto-complete/auto-complete-context copy.d.ts +16 -0
- package/dist/components/auto-complete/auto-complete-context copy.d.ts.map +1 -0
- package/dist/components/auto-complete/auto-complete-context copy.js +8 -0
- package/dist/components/auto-complete/auto-complete-context.d.ts +22 -0
- package/dist/components/auto-complete/auto-complete-context.d.ts.map +1 -0
- package/dist/components/auto-complete/auto-complete-context.js +9 -0
- package/dist/components/auto-complete/auto-complete-dropdown.d.ts +7 -0
- package/dist/components/auto-complete/auto-complete-dropdown.d.ts.map +1 -0
- package/dist/components/auto-complete/auto-complete-dropdown.js +11 -0
- package/dist/components/auto-complete/auto-complete-input.d.ts +2 -0
- package/dist/components/auto-complete/auto-complete-input.d.ts.map +1 -0
- package/dist/components/auto-complete/auto-complete-input.js +8 -0
- package/dist/components/auto-complete/auto-complete-selected.d.ts +7 -0
- package/dist/components/auto-complete/auto-complete-selected.d.ts.map +1 -0
- package/dist/components/auto-complete/auto-complete-selected.js +9 -0
- package/dist/components/auto-complete/auto-complete.d.ts +19 -0
- package/dist/components/auto-complete/auto-complete.d.ts.map +1 -0
- package/dist/components/auto-complete/auto-complete.js +35 -0
- package/dist/components/auto-complete/component.d.ts +29 -0
- package/dist/components/auto-complete/component.d.ts.map +1 -0
- package/dist/components/auto-complete/component.js +47 -0
- package/dist/components/auto-complete/index.d.ts +7 -0
- package/dist/components/auto-complete/index.d.ts.map +1 -0
- package/dist/components/auto-complete/index.js +6 -0
- package/dist/components/auto-complete/use-autocomplete.d.ts +20 -0
- package/dist/components/auto-complete/use-autocomplete.d.ts.map +1 -0
- package/dist/components/auto-complete/use-autocomplete.js +57 -0
- package/dist/components/auto-complete-input/index.d.ts +2 -1
- package/dist/components/auto-complete-input/index.d.ts.map +1 -1
- package/dist/components/auto-complete-input/index.js +2 -2
- package/dist/components/auto-complete-input copy/index.d.ts +27 -0
- package/dist/components/auto-complete-input copy/index.d.ts.map +1 -0
- package/dist/components/auto-complete-input copy/index.js +75 -0
- package/dist/components/auto-complete-input2/auto-complete-context.d.ts +16 -0
- package/dist/components/auto-complete-input2/auto-complete-context.d.ts.map +1 -0
- package/dist/components/auto-complete-input2/auto-complete-context.js +8 -0
- package/dist/components/auto-complete-input2/auto-complete-dropdown.d.ts +2 -0
- package/dist/components/auto-complete-input2/auto-complete-dropdown.d.ts.map +1 -0
- package/dist/components/auto-complete-input2/auto-complete-dropdown.js +9 -0
- package/dist/components/auto-complete-input2/auto-complete-input copy.d.ts +2 -0
- package/dist/components/auto-complete-input2/auto-complete-input copy.d.ts.map +1 -0
- package/dist/components/auto-complete-input2/auto-complete-input copy.js +9 -0
- package/dist/components/auto-complete-input2/auto-complete-input.d.ts +2 -0
- package/dist/components/auto-complete-input2/auto-complete-input.d.ts.map +1 -0
- package/dist/components/auto-complete-input2/auto-complete-input.js +9 -0
- package/dist/components/auto-complete-input2/auto-complete.d.ts +14 -0
- package/dist/components/auto-complete-input2/auto-complete.d.ts.map +1 -0
- package/dist/components/auto-complete-input2/auto-complete.js +20 -0
- package/dist/components/auto-complete-input2/component.d.ts +29 -0
- package/dist/components/auto-complete-input2/component.d.ts.map +1 -0
- package/dist/components/auto-complete-input2/component.js +47 -0
- package/dist/components/auto-complete-input2/index.d.ts +3 -0
- package/dist/components/auto-complete-input2/index.d.ts.map +1 -0
- package/dist/components/auto-complete-input2/index.js +2 -0
- package/dist/components/auto-complete-input2/use-autocomplete.d.ts +21 -0
- package/dist/components/auto-complete-input2/use-autocomplete.d.ts.map +1 -0
- package/dist/components/auto-complete-input2/use-autocomplete.js +56 -0
- package/dist/components/auto-complete-input2/useAutocomplete.d.ts +21 -0
- package/dist/components/auto-complete-input2/useAutocomplete.d.ts.map +1 -0
- package/dist/components/auto-complete-input2/useAutocomplete.js +59 -0
- package/dist/components/break-line/index.d.ts +7 -0
- package/dist/components/break-line/index.d.ts.map +1 -0
- package/dist/components/break-line/index.js +12 -0
- package/dist/components/button/index.d.ts +4 -1
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/button/index.js +11 -2
- package/dist/components/cards-list/index.d.ts +5 -1
- package/dist/components/cards-list/index.d.ts.map +1 -1
- package/dist/components/cards-list/index.js +6 -2
- package/dist/components/comments-container/comment-event-bus/index.d.ts.map +1 -1
- package/dist/components/comments-container/comment-event-bus/index.js +1 -0
- package/dist/components/comments-container/comment-form/index.d.ts.map +1 -1
- package/dist/components/comments-container/comment-item/index.d.ts.map +1 -1
- package/dist/components/comments-container/comments-list/index.d.ts.map +1 -1
- package/dist/components/comments-container/comments-list/index.js +1 -1
- package/dist/components/comments-container/constants/index.d.ts.map +1 -1
- package/dist/components/comments-container/constants/index.js +1 -0
- package/dist/components/comments-container/index.d.ts.map +1 -1
- package/dist/components/comments-container/index.js +8 -4
- package/dist/components/confirm/index.d.ts +9 -0
- package/dist/components/confirm/index.d.ts.map +1 -0
- package/dist/components/confirm/index.js +40 -0
- package/dist/components/expandable-text/index.d.ts +2 -1
- package/dist/components/expandable-text/index.d.ts.map +1 -1
- package/dist/components/expandable-text/index.js +2 -2
- package/dist/components/icon/index.d.ts.map +1 -1
- package/dist/components/input/index.d.ts +2 -1
- package/dist/components/input/index.d.ts.map +1 -1
- package/dist/components/input/index.js +3 -3
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/index.d.ts.map +1 -1
- package/dist/components/modal/index.js +1 -1
- package/dist/components/notifications-menu/index.js +1 -1
- package/dist/components/search-input/index.d.ts.map +1 -1
- package/dist/components/search-input/index.js +1 -2
- package/dist/components/select/index.d.ts +5 -2
- package/dist/components/select/index.d.ts.map +1 -1
- package/dist/components/select/index.js +37 -15
- package/dist/components/tab/index.d.ts +20 -9
- package/dist/components/tab/index.d.ts.map +1 -1
- package/dist/components/tab/index.js +23 -8
- package/dist/components/textarea/index.d.ts +1 -1
- package/dist/components/textarea/index.d.ts.map +1 -1
- package/dist/components/textarea/index.js +2 -2
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/auth-axios/index.d.ts.map +1 -1
- package/dist/utils/auth-axios/index.js +2 -0
- package/dist/utils/axios/index.d.ts +1 -0
- package/dist/utils/axios/index.d.ts.map +1 -1
- package/dist/utils/axios/index.js +20 -5
- package/dist/utils/cookie/index.d.ts +8 -0
- package/dist/utils/cookie/index.d.ts.map +1 -1
- package/dist/utils/cookie/index.js +31 -0
- package/dist/utils/device/index.d.ts +2 -0
- package/dist/utils/device/index.d.ts.map +1 -0
- package/dist/utils/device/index.js +12 -0
- package/package.json +4 -3
- package/dist/components/comments-container/comments-list copy/index.d.ts +0 -1
- package/dist/components/comments-container/comments-list copy/index.d.ts.map +0 -1
- package/dist/components/comments-container/comments-list copy/index.js +0 -75
- package/dist/hooks/aaaa/useHasApplicationAccess.d.ts +0 -3
- package/dist/hooks/aaaa/useHasApplicationAccess.d.ts.map +0 -1
- package/dist/hooks/aaaa/useHasApplicationAccess.js +0 -8
- package/dist/hooks/user-has-application-access/useHasApplicationAccess.d.ts +0 -3
- package/dist/hooks/user-has-application-access/useHasApplicationAccess.d.ts.map +0 -1
- package/dist/hooks/user-has-application-access/useHasApplicationAccess.js +0 -8
- package/dist/middleware/firebase-token-handler/index.d.ts +0 -8
- package/dist/middleware/firebase-token-handler/index.d.ts.map +0 -1
- package/dist/middleware/firebase-token-handler/index.js +0 -28
- package/dist/utils/firebase/index.d.ts +0 -1
- package/dist/utils/firebase/index.d.ts.map +0 -1
- package/dist/utils/firebase/index.js +0 -0
- package/dist/utils/firebase-client/config.d.ts +0 -1
- package/dist/utils/firebase-client/config.d.ts.map +0 -1
- package/dist/utils/firebase-client/config.js +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * as AxiosUtils from "./utils/axios";
|
|
|
6
6
|
export * as FileUtils from "./utils/file";
|
|
7
7
|
export * as CookieUtils from "./utils/cookie";
|
|
8
8
|
export * as FirebaseUtils from "./utils/firebase-client";
|
|
9
|
+
export * as DeviceUtils from "./utils/device";
|
|
9
10
|
export { default as MustAuth } from "./middleware/must-auth";
|
|
10
11
|
export { useHasApplicationAccess } from "./hooks/user-has-application-access";
|
|
11
12
|
export { useHasOneOfPermissions, useHasPermission, } from "./hooks/use-has-permission-access";
|
|
@@ -21,7 +22,9 @@ export { default as NativeMenuItem, Props as NativeMenuItemProps, } from "./comp
|
|
|
21
22
|
export { default as Select, Props as SelectProps, SelectOption, } from "./components/select";
|
|
22
23
|
export { default as Paper, Props as PaperProps } from "./components/paper";
|
|
23
24
|
export { default as Input, Props as InputProps } from "./components/input";
|
|
25
|
+
export { default as SearchInput, Props as SearchInputProps, } from "./components/search-input";
|
|
24
26
|
export { default as AutoCompleteInput, Props as AutoCompleteInputProps, } from "./components/auto-complete-input";
|
|
27
|
+
export * from "./components/auto-complete";
|
|
25
28
|
export { default as EditableText, Props as EditableTextProps, } from "./components/editable-text";
|
|
26
29
|
export { default as Textarea, Props as TextareaProps, } from "./components/textarea";
|
|
27
30
|
export { default as Toggle, Props as ToggleProps } from "./components/toggle";
|
|
@@ -33,7 +36,7 @@ export * as ListItemsOptions from "./hooks/list-items-hook/types";
|
|
|
33
36
|
export { default as ListItem, Props as ListItemProps, } from "./components/list-item";
|
|
34
37
|
export { default as CardsList, Props as CardsListProps, DEFAULT_CARDS_LIST_ROWS_PER_PAGE_OPTIONS, } from "./components/cards-list";
|
|
35
38
|
export { default as Table, Props as TableProps, TableColumn, DEFAULT_TABLE_ROWS_PER_PAGE_OPTIONS, } from "./components/table";
|
|
36
|
-
export { default as Tab, Props as TabProps } from "./components/tab";
|
|
39
|
+
export { default as Tab, Props as TabProps, TabItem } from "./components/tab";
|
|
37
40
|
export { default as ProgressBar, Props as ProgressBarProps, } from "./components/progress-bar";
|
|
38
41
|
export { default as Breadcrumb, Props as BreadcrumbProps, } from "./components/breadcrumb";
|
|
39
42
|
export { default as Drawer, Props as DrawerProps, Placement as DrawerPlacement, } from "./components/drawer";
|
|
@@ -52,6 +55,7 @@ export { default as MonthCalendar, Props as MonthCalendarProps, } from "./compon
|
|
|
52
55
|
export { default as WeekCalendar, Props as WeekCalendarProps, } from "./components/week-calendar";
|
|
53
56
|
export { default as DayCalendar, Props as DayCalendarProps, } from "./components/day-calendar";
|
|
54
57
|
export { default as Loader, Props as LoaderProps } from "./components/loader";
|
|
58
|
+
export { default as BreakLine, Props as BreakLineProps, } from "./components/break-line";
|
|
55
59
|
export { default as ExpandableText, Props as ExpandableTextProps, } from "./components/expandable-text";
|
|
56
60
|
export { default as ItemNouFound, Props as ItemNouFoundProps, } from "./components/item-not-found";
|
|
57
61
|
export * from "./components/accordion";
|
|
@@ -60,5 +64,6 @@ export { default as CommentsContainer, Props as CommentsContainerProps, } from "
|
|
|
60
64
|
export { default as ActivityMessage } from "./components/activity-message";
|
|
61
65
|
export { default as WithAuthorization, Props as WithAuthorizationProps, } from "./HOC/with-authorization";
|
|
62
66
|
export { default as CanAccessApplication, Props as CanAccessApplicationProps, } from "./HOC/can-access-application";
|
|
67
|
+
export { default as showConfirm } from "./components/confirm";
|
|
63
68
|
export { default as FirebaseTokenHandler } from "./components/firebase-token-handler";
|
|
64
69
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AAGzC,OAAO,KAAK,eAAe,MAAM,oBAAoB,CAAC;A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MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,OAAO,IAAI,WAAW,EACtB,KAAK,IAAI,gBAAgB,GAC1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EACL,OAAO,IAAI,SAAS,EACpB,KAAK,IAAI,cAAc,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,OAAO,IAAI,cAAc,EACzB,KAAK,IAAI,mBAAmB,GAC7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,OAAO,IAAI,YAAY,EACvB,KAAK,IAAI,iBAAiB,GAC3B,MAAM,6BAA6B,CAAC;AAErC,cAAc,wBAAwB,CAAC;AAEvC,OAAO,EACL,OAAO,IAAI,iBAAiB,EAC5B,KAAK,IAAI,sBAAsB,GAChC,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EACL,OAAO,IAAI,iBAAiB,EAC5B,KAAK,IAAI,sBAAsB,GAChC,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAE3E,OAAO,EACL,OAAO,IAAI,iBAAiB,EAC5B,KAAK,IAAI,sBAAsB,GAChC,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,OAAO,IAAI,oBAAoB,EAC/B,KAAK,IAAI,yBAAyB,GACnC,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,qCAAqC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export * as AxiosUtils from "./utils/axios";
|
|
|
8
8
|
export * as FileUtils from "./utils/file";
|
|
9
9
|
export * as CookieUtils from "./utils/cookie";
|
|
10
10
|
export * as FirebaseUtils from "./utils/firebase-client";
|
|
11
|
+
export * as DeviceUtils from "./utils/device";
|
|
11
12
|
// middleware
|
|
12
13
|
export { default as MustAuth } from "./middleware/must-auth";
|
|
13
14
|
// hooks
|
|
@@ -26,7 +27,9 @@ export { default as NativeMenuItem, } from "./components/native-menu/native-menu
|
|
|
26
27
|
export { default as Select, } from "./components/select";
|
|
27
28
|
export { default as Paper } from "./components/paper";
|
|
28
29
|
export { default as Input } from "./components/input";
|
|
30
|
+
export { default as SearchInput, } from "./components/search-input";
|
|
29
31
|
export { default as AutoCompleteInput, } from "./components/auto-complete-input";
|
|
32
|
+
export * from "./components/auto-complete";
|
|
30
33
|
export { default as EditableText, } from "./components/editable-text";
|
|
31
34
|
export { default as Textarea, } from "./components/textarea";
|
|
32
35
|
export { default as Toggle } from "./components/toggle";
|
|
@@ -57,6 +60,7 @@ export { default as MonthCalendar, } from "./components/month-calendar";
|
|
|
57
60
|
export { default as WeekCalendar, } from "./components/week-calendar";
|
|
58
61
|
export { default as DayCalendar, } from "./components/day-calendar";
|
|
59
62
|
export { default as Loader } from "./components/loader";
|
|
63
|
+
export { default as BreakLine, } from "./components/break-line";
|
|
60
64
|
export { default as ExpandableText, } from "./components/expandable-text";
|
|
61
65
|
export { default as ItemNouFound, } from "./components/item-not-found";
|
|
62
66
|
export * from "./components/accordion";
|
|
@@ -65,4 +69,5 @@ export { default as CommentsContainer, } from "./components/comments-container";
|
|
|
65
69
|
export { default as ActivityMessage } from "./components/activity-message";
|
|
66
70
|
export { default as WithAuthorization, } from "./HOC/with-authorization";
|
|
67
71
|
export { default as CanAccessApplication, } from "./HOC/can-access-application";
|
|
72
|
+
export { default as showConfirm } from "./components/confirm";
|
|
68
73
|
export { default as FirebaseTokenHandler } from "./components/firebase-token-handler";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../src/index.ts","../src/hoc/can-access-application/index.tsx","../src/hoc/with-authorization/index.tsx","../src/components/accordion/index.tsx","../src/components/activity-message/index.tsx","../src/components/alert/index.tsx","../src/components/auto-complete-input/index.tsx","../src/components/avatar/index.tsx","../src/components/badge/index.tsx","../src/components/breadcrumb/index.tsx","../src/components/button/index.tsx","../src/components/calendar/index.tsx","../src/components/cards-list/index.tsx","../src/components/carousel/index.tsx","../src/components/checkbox/index.tsx","../src/components/color-picker/index.tsx","../src/components/comments-container/index.tsx","../src/components/comments-container/comment-event-bus/index.ts","../src/components/comments-container/comment-form/index.tsx","../src/components/comments-container/comment-item/index.tsx","../src/components/comments-container/comments-list/index.tsx","../src/components/comments-container/constants/index.ts","../src/components/comments-container/use-comments/index.tsx","../src/components/count-down/index.tsx","../src/components/day-calendar/index.tsx","../src/components/drawer/index.tsx","../src/components/editable-text/index.tsx","../src/components/expandable-text/index.tsx","../src/components/file-input/index.tsx","../src/components/file-input/components/file-item/index.tsx","../src/components/firebase-token-handler/index.tsx","../src/components/icon/index.tsx","../src/components/input/index.tsx","../src/components/item-not-found/index.tsx","../src/components/list-item/index.tsx","../src/components/list-item/components/page-button/index.tsx","../src/components/list-item/components/pagination/index.tsx","../src/components/loader/index.tsx","../src/components/menu/index.tsx","../src/components/menu/menu-item/index.tsx","../src/components/modal/index.tsx","../src/components/month-calendar/index.tsx","../src/components/native-menu/index.tsx","../src/components/native-menu/native-menu-item/index.tsx","../src/components/not-authorized/index.tsx","../src/components/notifications-menu/index.tsx","../src/components/otp-input/index.tsx","../src/components/paper/index.tsx","../src/components/progress-bar/index.tsx","../src/components/radio-button/index.tsx","../src/components/search-input/index.tsx","../src/components/select/index.tsx","../src/components/skeleton/index.tsx","../src/components/stacked-avatars/index.tsx","../src/components/tab/index.tsx","../src/components/table/index.tsx","../src/components/text-editor/index.tsx","../src/components/text-editor/components/toolbar/index.tsx","../src/components/text-editor/utils/index.ts","../src/components/textarea/index.tsx","../src/components/toggle/index.tsx","../src/components/tooltip/index.tsx","../src/components/tree-checkbox/index.tsx","../src/components/tree-checkbox/components/tree-checkbox-item/index.tsx","../src/components/tree-checkbox/utils/index.ts","../src/components/week-calendar/index.tsx","../src/constants/index.ts","../src/hooks/list-items-hook/types.ts","../src/hooks/list-items-hook/usebulkactions.ts","../src/hooks/list-items-hook/usefilters.ts","../src/hooks/list-items-hook/usepagination.ts","../src/hooks/use-has-permission-access/index.ts","../src/hooks/user-has-application-access/index.ts","../src/middleware/must-auth/index.tsx","../src/utils/auth-axios/index.ts","../src/utils/axios/index.ts","../src/utils/color/index.ts","../src/utils/cookie/index.ts","../src/utils/file/index.ts","../src/utils/firebase-client/firebase.ts","../src/utils/firebase-client/index.ts","../src/utils/firebase-client/types.ts","../src/utils/jwt/index.ts","../src/utils/notification-localstorage/index.ts","../src/utils/validation/index.ts"],"version":"5.6.3"}
|
|
1
|
+
{"root":["../src/index.ts","../src/hoc/can-access-application/index.tsx","../src/hoc/with-authorization/index.tsx","../src/components/accordion/index.tsx","../src/components/activity-message/index.tsx","../src/components/alert/index.tsx","../src/components/auto-complete/auto-complete-context.tsx","../src/components/auto-complete/auto-complete-dropdown.tsx","../src/components/auto-complete/auto-complete-input.tsx","../src/components/auto-complete/auto-complete-selected.tsx","../src/components/auto-complete/auto-complete.tsx","../src/components/auto-complete/index.tsx","../src/components/auto-complete/use-autocomplete.ts","../src/components/auto-complete-input/index.tsx","../src/components/avatar/index.tsx","../src/components/badge/index.tsx","../src/components/breadcrumb/index.tsx","../src/components/break-line/index.tsx","../src/components/button/index.tsx","../src/components/calendar/index.tsx","../src/components/cards-list/index.tsx","../src/components/carousel/index.tsx","../src/components/checkbox/index.tsx","../src/components/color-picker/index.tsx","../src/components/comments-container/index.tsx","../src/components/comments-container/comment-event-bus/index.ts","../src/components/comments-container/comment-form/index.tsx","../src/components/comments-container/comment-item/index.tsx","../src/components/comments-container/comments-list/index.tsx","../src/components/comments-container/constants/index.ts","../src/components/comments-container/use-comments/index.tsx","../src/components/confirm/index.tsx","../src/components/count-down/index.tsx","../src/components/day-calendar/index.tsx","../src/components/drawer/index.tsx","../src/components/editable-text/index.tsx","../src/components/expandable-text/index.tsx","../src/components/file-input/index.tsx","../src/components/file-input/components/file-item/index.tsx","../src/components/firebase-token-handler/index.tsx","../src/components/icon/index.tsx","../src/components/input/index.tsx","../src/components/item-not-found/index.tsx","../src/components/list-item/index.tsx","../src/components/list-item/components/page-button/index.tsx","../src/components/list-item/components/pagination/index.tsx","../src/components/loader/index.tsx","../src/components/menu/index.tsx","../src/components/menu/menu-item/index.tsx","../src/components/modal/index.tsx","../src/components/month-calendar/index.tsx","../src/components/native-menu/index.tsx","../src/components/native-menu/native-menu-item/index.tsx","../src/components/not-authorized/index.tsx","../src/components/notifications-menu/index.tsx","../src/components/otp-input/index.tsx","../src/components/paper/index.tsx","../src/components/progress-bar/index.tsx","../src/components/radio-button/index.tsx","../src/components/search-input/index.tsx","../src/components/select/index.tsx","../src/components/skeleton/index.tsx","../src/components/stacked-avatars/index.tsx","../src/components/tab/index.tsx","../src/components/table/index.tsx","../src/components/text-editor/index.tsx","../src/components/text-editor/components/toolbar/index.tsx","../src/components/text-editor/utils/index.ts","../src/components/textarea/index.tsx","../src/components/toggle/index.tsx","../src/components/tooltip/index.tsx","../src/components/tree-checkbox/index.tsx","../src/components/tree-checkbox/components/tree-checkbox-item/index.tsx","../src/components/tree-checkbox/utils/index.ts","../src/components/week-calendar/index.tsx","../src/constants/index.ts","../src/hooks/list-items-hook/types.ts","../src/hooks/list-items-hook/usebulkactions.ts","../src/hooks/list-items-hook/usefilters.ts","../src/hooks/list-items-hook/usepagination.ts","../src/hooks/use-has-permission-access/index.ts","../src/hooks/user-has-application-access/index.ts","../src/middleware/must-auth/index.tsx","../src/utils/auth-axios/index.ts","../src/utils/axios/index.ts","../src/utils/color/index.ts","../src/utils/cookie/index.ts","../src/utils/device/index.ts","../src/utils/file/index.ts","../src/utils/firebase-client/firebase.ts","../src/utils/firebase-client/index.ts","../src/utils/firebase-client/types.ts","../src/utils/jwt/index.ts","../src/utils/notification-localstorage/index.ts","../src/utils/validation/index.ts"],"version":"5.6.3"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/auth-axios/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/auth-axios/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,iBAAiB,+BAK5B,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { CONSTANTS } from "sea-platform-helpers";
|
|
2
2
|
import { getCookie } from "../cookie";
|
|
3
3
|
import axios from "axios";
|
|
4
|
+
import { getDeviceId } from "../device";
|
|
4
5
|
const accessToken = getCookie(CONSTANTS.JWT.JWTCookieKey);
|
|
5
6
|
export const authAxiosInstance = axios.create({
|
|
6
7
|
headers: {
|
|
7
8
|
Authorization: `Bearer ${accessToken}`,
|
|
9
|
+
[CONSTANTS.Server.DEVICE_ID_HEADER_KEY]: getDeviceId(),
|
|
8
10
|
},
|
|
9
11
|
});
|
|
@@ -3,6 +3,7 @@ type AxiosOptions = {
|
|
|
3
3
|
JWTTokenKey?: string;
|
|
4
4
|
withCredentials?: boolean;
|
|
5
5
|
storage?: "localStorage" | "cookie";
|
|
6
|
+
deviceIdKey?: string;
|
|
6
7
|
};
|
|
7
8
|
export declare const createInstance: (baseURL: string, options?: AxiosOptions) => import("axios").AxiosInstance;
|
|
8
9
|
export default axios;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/axios/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/axios/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAKzD,KAAK,YAAY,GAAG;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,cAAc,GAAG,QAAQ,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,cAAc,YAChB,MAAM,YACN,YAAY,kCA6DtB,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
|
-
import { getCookie } from "../cookie";
|
|
2
|
+
import { getCookie, removeCookie } from "../cookie";
|
|
3
|
+
import { CONSTANTS } from "sea-platform-helpers";
|
|
4
|
+
import { getDeviceId } from "../device";
|
|
3
5
|
export const createInstance = (baseURL, options = {
|
|
4
6
|
withCredentials: true,
|
|
5
7
|
JWTTokenKey: "JWTToken",
|
|
6
8
|
storage: "localStorage",
|
|
9
|
+
deviceIdKey: CONSTANTS.Server.DEVICE_ID_HEADER_KEY,
|
|
7
10
|
}) => {
|
|
8
11
|
const axiosInstance = axios.create({
|
|
9
12
|
baseURL,
|
|
10
13
|
withCredentials: options.withCredentials,
|
|
11
14
|
});
|
|
15
|
+
console.log("Creating axios instance with options:", options);
|
|
12
16
|
axiosInstance.interceptors.request.use((config) => {
|
|
13
|
-
|
|
17
|
+
var _a;
|
|
18
|
+
const deviceId = getDeviceId();
|
|
14
19
|
let token = undefined;
|
|
15
20
|
if (options.storage === "localStorage") {
|
|
16
21
|
token = localStorage.getItem(options.JWTTokenKey);
|
|
@@ -18,7 +23,9 @@ export const createInstance = (baseURL, options = {
|
|
|
18
23
|
else if (options.storage === "cookie") {
|
|
19
24
|
token = getCookie(options.JWTTokenKey);
|
|
20
25
|
}
|
|
26
|
+
console.log("deviceId:", deviceId);
|
|
21
27
|
config.headers["Authorization"] = `Bearer ${token}`;
|
|
28
|
+
config.headers[(_a = options.deviceIdKey) !== null && _a !== void 0 ? _a : CONSTANTS.Server.DEVICE_ID_HEADER_KEY] = deviceId;
|
|
22
29
|
return config;
|
|
23
30
|
}, (error) => {
|
|
24
31
|
// Handle request error
|
|
@@ -27,9 +34,17 @@ export const createInstance = (baseURL, options = {
|
|
|
27
34
|
axiosInstance.interceptors.response.use((response) => {
|
|
28
35
|
return response.data;
|
|
29
36
|
}, (error) => {
|
|
30
|
-
var _a;
|
|
31
|
-
|
|
32
|
-
|
|
37
|
+
var _a, _b, _c, _d;
|
|
38
|
+
const message = (_c = String((_b = (_a = error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message)) !== null && _c !== void 0 ? _c : error.message;
|
|
39
|
+
console.log(`Error: ${message}`);
|
|
40
|
+
if ([
|
|
41
|
+
CONSTANTS.Server.ERROR_MESSAGES.UNAUTHENTICATED,
|
|
42
|
+
CONSTANTS.Server.ERROR_MESSAGES.REVOKED_TOKEN,
|
|
43
|
+
].includes(message)) {
|
|
44
|
+
console.log("Unauthenticated or invalid input - logging out");
|
|
45
|
+
removeCookie(options.JWTTokenKey);
|
|
46
|
+
}
|
|
47
|
+
return Promise.reject((_d = error.response) === null || _d === void 0 ? void 0 : _d.data);
|
|
33
48
|
});
|
|
34
49
|
return axiosInstance;
|
|
35
50
|
};
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
export declare const getCookie: (name: string) => string | undefined;
|
|
2
|
+
export declare const setCookie: (name: string, value: string, options?: {
|
|
3
|
+
days?: number;
|
|
4
|
+
path?: string;
|
|
5
|
+
domain?: string;
|
|
6
|
+
secure?: boolean;
|
|
7
|
+
sameSite?: "Strict" | "Lax" | "None";
|
|
8
|
+
}) => void;
|
|
9
|
+
export declare const removeCookie: (name: string) => void;
|
|
2
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/cookie/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,SAAU,MAAM,KAAG,MAAM,GAAG,SAMjD,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/cookie/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,SAAU,MAAM,KAAG,MAAM,GAAG,SAMjD,CAAC;AAEF,eAAO,MAAM,SAAS,SACd,MAAM,SACL,MAAM,YACH;IACR,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;CACtC,KACA,IAiBF,CAAC;AAEF,eAAO,MAAM,YAAY,SAAU,MAAM,KAAG,IAa3C,CAAC"}
|
|
@@ -6,3 +6,34 @@ export const getCookie = (name) => {
|
|
|
6
6
|
return (_a = parts.pop()) === null || _a === void 0 ? void 0 : _a.split(";").shift();
|
|
7
7
|
}
|
|
8
8
|
};
|
|
9
|
+
export const setCookie = (name, value, options) => {
|
|
10
|
+
var _a;
|
|
11
|
+
let cookie = `${encodeURIComponent(name)}=${encodeURIComponent(value)};`;
|
|
12
|
+
// Expiration
|
|
13
|
+
if (options === null || options === void 0 ? void 0 : options.days) {
|
|
14
|
+
const date = new Date();
|
|
15
|
+
date.setTime(date.getTime() + options.days * 24 * 60 * 60 * 1000);
|
|
16
|
+
cookie += ` expires=${date.toUTCString()};`;
|
|
17
|
+
}
|
|
18
|
+
// Path, Domain, Security, SameSite
|
|
19
|
+
cookie += ` path=${(_a = options === null || options === void 0 ? void 0 : options.path) !== null && _a !== void 0 ? _a : "/"};`;
|
|
20
|
+
if (options === null || options === void 0 ? void 0 : options.domain)
|
|
21
|
+
cookie += ` domain=${options.domain};`;
|
|
22
|
+
if (options === null || options === void 0 ? void 0 : options.secure)
|
|
23
|
+
cookie += ` secure;`;
|
|
24
|
+
if (options === null || options === void 0 ? void 0 : options.sameSite)
|
|
25
|
+
cookie += ` SameSite=${options.sameSite};`;
|
|
26
|
+
document.cookie = cookie;
|
|
27
|
+
};
|
|
28
|
+
export const removeCookie = (name) => {
|
|
29
|
+
// Try removing it for all common scopes
|
|
30
|
+
const domains = [window.location.hostname, `.${window.location.hostname}`];
|
|
31
|
+
const paths = ["/", ""];
|
|
32
|
+
domains.forEach((domain) => {
|
|
33
|
+
paths.forEach((path) => {
|
|
34
|
+
document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=${path}; domain=${domain};`;
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
// Also try without domain (just in case)
|
|
38
|
+
document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;`;
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/device/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,QAAO,MAS9B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { v4 as uuidv4 } from "uuid";
|
|
2
|
+
import { getCookie, setCookie } from "../cookie";
|
|
3
|
+
export const getDeviceId = () => {
|
|
4
|
+
if (typeof window === "undefined")
|
|
5
|
+
return ""; // SSR safety
|
|
6
|
+
let deviceId = getCookie("deviceId");
|
|
7
|
+
if (!deviceId) {
|
|
8
|
+
deviceId = uuidv4();
|
|
9
|
+
setCookie("deviceId", deviceId, { days: 3650, path: "/" });
|
|
10
|
+
}
|
|
11
|
+
return deviceId;
|
|
12
|
+
};
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sea-react-components",
|
|
3
3
|
"description": "SEA react components library",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.16",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsc --build && npx postcss src/styles.css -o dist/styles.css && npx postcss src/components/text-editor/style.css -o dist/components/text-editor/style.css",
|
|
8
|
-
"watch": "concurrently \"tsc --watch\" \"npx postcss src/styles.css -o dist/styles.css --watch\" \"npx postcss src/components/text-editor/style.css -o dist/components/text-editor/style.css --watch\"",
|
|
8
|
+
"watch": "concurrently \"npm run link:dev\" \"tsc --watch\" \"npx postcss src/styles.css -o dist/styles.css --watch\" \"npx postcss src/components/text-editor/style.css -o dist/components/text-editor/style.css --watch\"",
|
|
9
9
|
"link:dev": "npm link sea-platform-helpers"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
@@ -48,8 +48,9 @@
|
|
|
48
48
|
"jwt-decode": "^4.0.0",
|
|
49
49
|
"lowlight": "^3.3.0",
|
|
50
50
|
"react-dom": "^18.3.1",
|
|
51
|
-
"sea-platform-helpers": "^1.5.
|
|
51
|
+
"sea-platform-helpers": "^1.5.13",
|
|
52
52
|
"sea-react-components": "file:",
|
|
53
|
+
"uuid": "^13.0.0",
|
|
53
54
|
"yup": "^1.5.0"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/comments-container/comments-list copy/index.tsx"],"names":[],"mappings":""}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// "use client";
|
|
2
|
-
// import React from "react";
|
|
3
|
-
// import Skeleton from "../../skeleton";
|
|
4
|
-
// import { DTO } from "sea-platform-helpers";
|
|
5
|
-
// import CommentItem from "../comment-item";
|
|
6
|
-
// import Button from "../../button";
|
|
7
|
-
// type Props = {
|
|
8
|
-
// loading?: boolean;
|
|
9
|
-
// comments: DTO.Comment.IComment[];
|
|
10
|
-
// currentAccountId?: string;
|
|
11
|
-
// highlightCommentId?: string;
|
|
12
|
-
// editComment: (comment: DTO.Comment.IComment | undefined) => void;
|
|
13
|
-
// replyOnComment: (comment: DTO.Comment.IComment | undefined) => void;
|
|
14
|
-
// loadMoreComments?: () => void;
|
|
15
|
-
// hasMoreComments?: boolean;
|
|
16
|
-
// totalCount?: number;
|
|
17
|
-
// };
|
|
18
|
-
// export default function CommentsList({
|
|
19
|
-
// loading,
|
|
20
|
-
// comments,
|
|
21
|
-
// currentAccountId,
|
|
22
|
-
// highlightCommentId,
|
|
23
|
-
// editComment,
|
|
24
|
-
// replyOnComment,
|
|
25
|
-
// hasMoreComments,
|
|
26
|
-
// loadMoreComments,
|
|
27
|
-
// totalCount = 0,
|
|
28
|
-
// }: Props) {
|
|
29
|
-
// return (
|
|
30
|
-
// <div className="flex flex-col gap-3">
|
|
31
|
-
// {comments.length === 0 && !loading ? (
|
|
32
|
-
// <p className="text-text text-sm text-center">
|
|
33
|
-
// There are no comments yet
|
|
34
|
-
// </p>
|
|
35
|
-
// ) : (
|
|
36
|
-
// <>
|
|
37
|
-
// <div className="flex flex-col gap-1">
|
|
38
|
-
// {comments.map((comment) => (
|
|
39
|
-
// <CommentItem
|
|
40
|
-
// key={comment.id}
|
|
41
|
-
// comment={comment}
|
|
42
|
-
// currentAccountId={currentAccountId}
|
|
43
|
-
// isHighlight={highlightCommentId === comment.id}
|
|
44
|
-
// editComment={editComment}
|
|
45
|
-
// replyOnComment={replyOnComment}
|
|
46
|
-
// />
|
|
47
|
-
// ))}
|
|
48
|
-
// </div>
|
|
49
|
-
// {loading && (
|
|
50
|
-
// <>
|
|
51
|
-
// {Array(3)
|
|
52
|
-
// .fill(null)
|
|
53
|
-
// .map((_, i) => (
|
|
54
|
-
// <Skeleton
|
|
55
|
-
// key={`comment-loading-${i}`}
|
|
56
|
-
// className="h-24 w-full"
|
|
57
|
-
// />
|
|
58
|
-
// ))}
|
|
59
|
-
// </>
|
|
60
|
-
// )}
|
|
61
|
-
// {totalCount !== 0 && (
|
|
62
|
-
// <p className="text-text text-sm text-right">
|
|
63
|
-
// {comments.length} of {totalCount} comments
|
|
64
|
-
// </p>
|
|
65
|
-
// )}
|
|
66
|
-
// {hasMoreComments && !loading && (
|
|
67
|
-
// <Button type="button" onClick={loadMoreComments}>
|
|
68
|
-
// Load more
|
|
69
|
-
// </Button>
|
|
70
|
-
// )}
|
|
71
|
-
// </>
|
|
72
|
-
// )}
|
|
73
|
-
// </div>
|
|
74
|
-
// );
|
|
75
|
-
// }
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useHasApplicationAccess.d.ts","sourceRoot":"","sources":["../../../src/hooks/aaaa/useHasApplicationAccess.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,SAAS,CAAC,WAAW,CAAC,eAAe,GACpD,OAAO,CAIT"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useAppSelector } from "@/store/hooks";
|
|
3
|
-
import { selectAccountData } from "@/store/slices/auth/slice";
|
|
4
|
-
export function useHasApplicationAccess(applicationKey) {
|
|
5
|
-
var _a, _b;
|
|
6
|
-
const account = useAppSelector(selectAccountData);
|
|
7
|
-
return (_b = (_a = account === null || account === void 0 ? void 0 : account.applicationKeys) === null || _a === void 0 ? void 0 : _a.includes(applicationKey)) !== null && _b !== void 0 ? _b : false;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useHasApplicationAccess.d.ts","sourceRoot":"","sources":["../../../src/hooks/user-has-application-access/useHasApplicationAccess.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,SAAS,CAAC,WAAW,CAAC,eAAe,GACpD,OAAO,CAIT"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useAppSelector } from "@/store/hooks";
|
|
3
|
-
import { selectAccountData } from "@/store/slices/auth/slice";
|
|
4
|
-
export function useHasApplicationAccess(applicationKey) {
|
|
5
|
-
var _a, _b;
|
|
6
|
-
const account = useAppSelector(selectAccountData);
|
|
7
|
-
return (_b = (_a = account === null || account === void 0 ? void 0 : account.applicationKeys) === null || _a === void 0 ? void 0 : _a.includes(applicationKey)) !== null && _b !== void 0 ? _b : false;
|
|
8
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FirebaseConfig, NotificationPayload } from "../../utils/firebase-client";
|
|
2
|
-
export default function FirebaseTokenHandler({ config, updateFirebaseTokenUrl, _onForegroundMessage, _onGetToken, }: Readonly<{
|
|
3
|
-
config: FirebaseConfig;
|
|
4
|
-
updateFirebaseTokenUrl: any;
|
|
5
|
-
_onForegroundMessage?: (notification: NotificationPayload) => void;
|
|
6
|
-
_onGetToken?: (token: string) => void;
|
|
7
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/middleware/firebase-token-handler/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EAIL,cAAc,EACd,mBAAmB,EACpB,MAAM,6BAA6B,CAAC;AAQrC,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,MAAM,EACN,sBAAsB,EACtB,oBAAoB,EACpB,WAAW,GACZ,EAAE,QAAQ,CAAC;IACV,MAAM,EAAE,cAAc,CAAC;IACvB,sBAAsB,MAAC;IACvB,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACnE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,CAAC,2CAiBD"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { useEffect } from "react";
|
|
4
|
-
import axios from "axios";
|
|
5
|
-
import { CONSTANTS } from "sea-platform-helpers";
|
|
6
|
-
import { getCookie } from "../../utils/cookie";
|
|
7
|
-
import { initFirebase, requestForToken, onForegroundMessage, } from "../../utils/firebase-client";
|
|
8
|
-
const axiosOptions = {
|
|
9
|
-
headers: {
|
|
10
|
-
Authorization: `Bearer ${getCookie(CONSTANTS.JWT.JWTCookieKey)}`,
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
export default function FirebaseTokenHandler({ config, updateFirebaseTokenUrl, _onForegroundMessage, _onGetToken, }) {
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
initFirebase(config);
|
|
16
|
-
requestForToken(config.vapidKey).then((token) => {
|
|
17
|
-
if (token) {
|
|
18
|
-
axios.put(updateFirebaseTokenUrl, { token }, axiosOptions);
|
|
19
|
-
_onGetToken && _onGetToken(token);
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
onForegroundMessage((notification) => {
|
|
23
|
-
console.log("Foreground notification:", notification);
|
|
24
|
-
_onForegroundMessage && _onForegroundMessage(notification);
|
|
25
|
-
});
|
|
26
|
-
}, [config]);
|
|
27
|
-
return _jsx(_Fragment, {});
|
|
28
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/firebase/index.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/utils/firebase-client/config.ts"],"names":[],"mappings":""}
|
|
File without changes
|