-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…oint Enhance/#8786 - Implement JS entry point for RRM
- Loading branch information
Showing
29 changed files
with
960 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* Settings constants. | ||
* | ||
* Site Kit by Google, Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
export const NEW_MODULES = [ 'ads', 'reader-revenue-manager' ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Reader Revenue Manager module entrypoint. | ||
* | ||
* Site Kit by Google, Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import Data from 'googlesitekit-data'; | ||
import Modules from 'googlesitekit-modules'; | ||
import { | ||
registerStore, | ||
registerModule, | ||
} from './modules/reader-revenue-manager'; | ||
|
||
registerStore( Data ); | ||
registerModule( Modules ); |
37 changes: 37 additions & 0 deletions
37
assets/js/modules/reader-revenue-manager/components/settings/SettingsEdit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* Reader Revenue Manager SettingsEdit component. | ||
* | ||
* Site Kit by Google, Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
export default function SettingsEdit() { | ||
return ( | ||
<div className="googlesitekit-setup-module googlesitekit-setup-module--thank-with-google"> | ||
<h2 className="googlesitekit-heading-3 googlesitekit-setup-module__title"> | ||
{ __( | ||
'Reader Revenue Manager Settings Edit', | ||
'google-site-kit' | ||
) } | ||
</h2> | ||
|
||
{ /* TODO: Add the rest of the settings steps */ } | ||
</div> | ||
); | ||
} |
34 changes: 34 additions & 0 deletions
34
assets/js/modules/reader-revenue-manager/components/settings/SettingsEdit.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* Reader Revenue Manager SettingsEdit component stories. | ||
* | ||
* Site Kit by Google, Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import SettingsEdit from './SettingsEdit'; | ||
|
||
function Template() { | ||
return <SettingsEdit />; | ||
} | ||
|
||
export const Default = Template.bind( {} ); | ||
Default.storyName = 'Default'; | ||
|
||
export default { | ||
title: 'Modules/ReaderRevenueManager/Settings/SettingsEdit', | ||
component: SettingsEdit, | ||
}; |
30 changes: 30 additions & 0 deletions
30
assets/js/modules/reader-revenue-manager/components/settings/SettingsEdit.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Reader Revenue Manager SettingsEdit component tests. | ||
* | ||
* Site Kit by Google, Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { render } from '../../../../../../tests/js/test-utils'; | ||
import SettingsEdit from './SettingsEdit'; | ||
|
||
describe( 'SettingsEdit', () => { | ||
it( 'should render the component', () => { | ||
const { getByText } = render( <SettingsEdit /> ); | ||
|
||
expect( | ||
getByText( /Reader Revenue Manager Settings Edit/i ) | ||
).toBeInTheDocument(); | ||
} ); | ||
} ); |
37 changes: 37 additions & 0 deletions
37
assets/js/modules/reader-revenue-manager/components/settings/SettingsView.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* Reader Revenue Manager SettingsView component. | ||
* | ||
* Site Kit by Google, Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
export default function SettingsView() { | ||
return ( | ||
<div className="googlesitekit-setup-module googlesitekit-setup-module--thank-with-google"> | ||
<h2 className="googlesitekit-heading-3 googlesitekit-setup-module__title"> | ||
{ __( | ||
'Reader Revenue Manager Settings View', | ||
'google-site-kit' | ||
) } | ||
</h2> | ||
|
||
{ /* TODO: Add the rest of the settings steps */ } | ||
</div> | ||
); | ||
} |
34 changes: 34 additions & 0 deletions
34
assets/js/modules/reader-revenue-manager/components/settings/SettingsView.stories.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** | ||
* Reader Revenue Manager SettingsView component stories. | ||
* | ||
* Site Kit by Google, Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import SettingsView from './SettingsView'; | ||
|
||
function Template() { | ||
return <SettingsView />; | ||
} | ||
|
||
export const Default = Template.bind( {} ); | ||
Default.storyName = 'Default'; | ||
|
||
export default { | ||
title: 'Modules/ReaderRevenueManager/Settings/SettingsView', | ||
component: SettingsView, | ||
}; |
30 changes: 30 additions & 0 deletions
30
assets/js/modules/reader-revenue-manager/components/settings/SettingsView.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Reader Revenue Manager SettingsView component tests. | ||
* | ||
* Site Kit by Google, Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { render } from '../../../../../../tests/js/test-utils'; | ||
import SettingsView from './SettingsView'; | ||
|
||
describe( 'SettingsView', () => { | ||
it( 'should render the component', () => { | ||
const { getByText } = render( <SettingsView /> ); | ||
|
||
expect( | ||
getByText( /Reader Revenue Manager Settings View/i ) | ||
).toBeInTheDocument(); | ||
} ); | ||
} ); |
20 changes: 20 additions & 0 deletions
20
assets/js/modules/reader-revenue-manager/components/settings/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* Reader Revenue Manager Settings components. | ||
* | ||
* Site Kit by Google, Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
export { default as SettingsEdit } from './SettingsEdit'; | ||
export { default as SettingsView } from './SettingsView'; |
47 changes: 47 additions & 0 deletions
47
assets/js/modules/reader-revenue-manager/components/setup/SetupMain.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* Reader Revenue Manager SetupMain component. | ||
* | ||
* Site Kit by Google, Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { _x } from '@wordpress/i18n'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import ReaderRevenueManagerIcon from '../../../../../svg/graphics/reader-revenue-manager.svg'; | ||
|
||
export default function SetupMain() { | ||
return ( | ||
<div className="googlesitekit-setup-module googlesitekit-setup-module--reader-revenue-manager"> | ||
<div className="googlesitekit-setup-module__logo"> | ||
<ReaderRevenueManagerIcon width="33" height="33" /> | ||
</div> | ||
|
||
<h2 className="googlesitekit-heading-3 googlesitekit-setup-module__title"> | ||
{ _x( | ||
'Reader Revenue Manager', | ||
'Service name', | ||
'google-site-kit' | ||
) } | ||
</h2> | ||
|
||
{ /* TODO: Add the rest of the setup steps */ } | ||
</div> | ||
); | ||
} |
Oops, something went wrong.