@brightcove/components-embed-code-modal 0.1.4 → 0.1.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightcove/components-embed-code-modal",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://bithub.brightcove.com/studio-ui-kit/studio-components-embed-code-modal.git"
@@ -64,13 +64,15 @@
64
64
  },
65
65
  "dependencies": {
66
66
  "@brightcove/player-embed-code": "1.4.0",
67
+ "@brightcove/studio-api-services": "^6.49.1",
67
68
  "@brightcove/studio-components": "^4.4.3",
68
69
  "@brightcove/studio-design-tokens": "1.13.0",
69
70
  "@brightcove/studio-icons": "8.6.1",
70
71
  "i18next": "^21.5.4",
71
72
  "react": ">=17.0.2",
72
73
  "react-dom": ">=17.0.2",
73
- "react-i18next": "^11.14.3"
74
+ "react-i18next": "^11.14.3",
75
+ "react-query": "^3.38.0"
74
76
  },
75
77
  "peerDependencies": {
76
78
  "react": ">=17.0.2",
package/src/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import EmbedCodeModal from './js/EmbedCodeModal';
2
- import type { VideoPayload } from './js/types/EmbedCodeModalProps';
3
- export { EmbedCodeModal, VideoPayload };
2
+ import type { VideoPayload, EmbedCodeModalTypes } from './js/types/EmbedCodeModalProps';
3
+ export { EmbedCodeModal, VideoPayload, EmbedCodeModalTypes };
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { EmbedCodeModalProps } from 'js/types/EmbedCodeModalProps';
3
- export declare const EmbedCodeModalComponent: ({ video }: EmbedCodeModalProps) => JSX.Element;
3
+ export declare const EmbedCodeModalComponent: ({ video, type, }: EmbedCodeModalProps) => JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare const DEFAULT_PLAYER_ID = "default";
@@ -0,0 +1,6 @@
1
+ import { EmbedCodeModalTypes } from 'js/types/EmbedCodeModalProps';
2
+ declare const useGetPlayers: (type: EmbedCodeModalTypes, isEmbedTypesEnabled: boolean) => import("react-query").QueryObserverIdleResult<import("../types/players").GetPlayersPayload, unknown> | import("react-query").QueryObserverLoadingErrorResult<import("../types/players").GetPlayersPayload, unknown> | import("react-query").QueryObserverLoadingResult<import("../types/players").GetPlayersPayload, unknown> | import("react-query").QueryObserverRefetchErrorResult<import("../types/players").GetPlayersPayload, unknown> | import("react-query").QueryObserverSuccessResult<import("../types/players").GetPlayersPayload, unknown> | {
3
+ isLoading: boolean;
4
+ data: null;
5
+ };
6
+ export default useGetPlayers;
package/src/js/i18n.d.ts CHANGED
@@ -5,18 +5,22 @@ export declare const resources: {
5
5
  modalHeader: string;
6
6
  mediaNotice: string;
7
7
  tooltipText: string;
8
+ tooltipTextNew: string;
8
9
  tooltipLink: string;
9
10
  previewButton: string;
11
+ player: string;
10
12
  tabs: {
11
13
  labels: {
12
14
  iframe: string;
13
15
  javascript: string;
14
16
  };
15
17
  helperText: string;
18
+ helperTextNew: string;
16
19
  };
17
20
  closeModal: string;
18
21
  toasterTitle: string;
19
22
  toasterMessage: string;
23
+ toasterErrorMessage: string;
20
24
  };
21
25
  };
22
26
  es: {
@@ -24,18 +28,22 @@ export declare const resources: {
24
28
  modalHeader: string;
25
29
  mediaNotice: string;
26
30
  tooltipText: string;
31
+ tooltipTextNew: string;
27
32
  tooltipLink: string;
28
33
  previewButton: string;
34
+ player: string;
29
35
  tabs: {
30
36
  labels: {
31
37
  iframe: string;
32
38
  javascript: string;
33
39
  };
34
40
  helperText: string;
41
+ helperTextNew: string;
35
42
  };
36
43
  closeModal: string;
37
44
  toasterTitle: string;
38
45
  toasterMessage: string;
46
+ toasterErrorMessage: string;
39
47
  };
40
48
  };
41
49
  fr: {
@@ -43,18 +51,22 @@ export declare const resources: {
43
51
  modalHeader: string;
44
52
  mediaNotice: string;
45
53
  tooltipText: string;
54
+ tooltipTextNew: string;
46
55
  tooltipLink: string;
47
56
  previewButton: string;
57
+ player: string;
48
58
  tabs: {
49
59
  labels: {
50
60
  iframe: string;
51
61
  javascript: string;
52
62
  };
53
63
  helperText: string;
64
+ helperTextNew: string;
54
65
  };
55
66
  closeModal: string;
56
67
  toasterTitle: string;
57
68
  toasterMessage: string;
69
+ toasterErrorMessage: string;
58
70
  };
59
71
  };
60
72
  ja: {
@@ -62,18 +74,22 @@ export declare const resources: {
62
74
  modalHeader: string;
63
75
  mediaNotice: string;
64
76
  tooltipText: string;
77
+ tooltipTextNew: string;
65
78
  tooltipLink: string;
66
79
  previewButton: string;
80
+ player: string;
67
81
  tabs: {
68
82
  labels: {
69
83
  iframe: string;
70
84
  javascript: string;
71
85
  };
72
86
  helperText: string;
87
+ helperTextNew: string;
73
88
  };
74
89
  closeModal: string;
75
90
  toasterTitle: string;
76
91
  toasterMessage: string;
92
+ toasterErrorMessage: string;
77
93
  };
78
94
  };
79
95
  ko: {
@@ -81,18 +97,22 @@ export declare const resources: {
81
97
  modalHeader: string;
82
98
  mediaNotice: string;
83
99
  tooltipText: string;
100
+ tooltipTextNew: string;
84
101
  tooltipLink: string;
85
102
  previewButton: string;
103
+ player: string;
86
104
  tabs: {
87
105
  labels: {
88
106
  iframe: string;
89
107
  javascript: string;
90
108
  };
91
109
  helperText: string;
110
+ helperTextNew: string;
92
111
  };
93
112
  closeModal: string;
94
113
  toasterTitle: string;
95
114
  toasterMessage: string;
115
+ toasterErrorMessage: string;
96
116
  };
97
117
  };
98
118
  zh: {
@@ -100,18 +120,22 @@ export declare const resources: {
100
120
  modalHeader: string;
101
121
  mediaNotice: string;
102
122
  tooltipText: string;
123
+ tooltipTextNew: string;
103
124
  tooltipLink: string;
104
125
  previewButton: string;
126
+ player: string;
105
127
  tabs: {
106
128
  labels: {
107
129
  iframe: string;
108
130
  javascript: string;
109
131
  };
110
132
  helperText: string;
133
+ helperTextNew: string;
111
134
  };
112
135
  closeModal: string;
113
136
  toasterTitle: string;
114
137
  toasterMessage: string;
138
+ toasterErrorMessage: string;
115
139
  };
116
140
  };
117
141
  };
@@ -0,0 +1,2 @@
1
+ import { GetPlayersPayload } from 'js/types/players';
2
+ export declare const getPlayers: () => Promise<GetPlayersPayload>;
@@ -5,7 +5,12 @@ export interface VideoPayload {
5
5
  posterUrl?: string;
6
6
  duration: number;
7
7
  }
8
+ export declare enum EmbedCodeModalTypes {
9
+ PLAYER = "player",
10
+ VIDEO = "video"
11
+ }
8
12
  export declare type EmbedCodeModalProps = {
9
13
  language?: 'en' | 'es' | 'fr' | 'ko' | 'ja' | 'zh';
10
14
  video: VideoPayload;
15
+ type?: EmbedCodeModalTypes;
11
16
  };
@@ -0,0 +1,27 @@
1
+ export declare type PlayerSelectItem = {
2
+ label: string;
3
+ value: string;
4
+ };
5
+ export declare type PlayersObjectItem = {
6
+ label: string;
7
+ id: string;
8
+ hasPlugins: boolean;
9
+ isCampaignPlayer: boolean;
10
+ };
11
+ export declare type PlayersObject = {
12
+ [key: string]: PlayersObjectItem;
13
+ };
14
+ export declare type PlayerItem = {
15
+ account_id: string;
16
+ id: string;
17
+ name: string;
18
+ description: string;
19
+ branches: object;
20
+ created_at: string;
21
+ embed_count: number;
22
+ url: string;
23
+ };
24
+ export declare type GetPlayersPayload = {
25
+ item_count: number;
26
+ items: PlayerItem[];
27
+ };
@@ -0,0 +1,9 @@
1
+ export declare const getAccountId: () => any;
2
+ export declare const getConfig: () => {
3
+ apiConfig: {
4
+ publisherId: any;
5
+ api: any;
6
+ };
7
+ };
8
+ export declare const call: <T>(options: any) => Promise<T>;
9
+ export declare const callAPI: <T>(apiEndpoint: any, apiArgs: any) => Promise<T>;
@@ -3,6 +3,11 @@
3
3
  * @returns the studio environment
4
4
  */
5
5
  export declare function getStudioEnvironment(): string;
6
+ /**
7
+ * Get embed modal types enabled value.
8
+ * @returns the embed modal types enabled value
9
+ */
10
+ export declare function isEmbedModalTypesEnabled(): boolean;
6
11
  /**
7
12
  * Is the module running in QA environment?
8
13
  */