Skip to content

Commit

Permalink
add share item
Browse files Browse the repository at this point in the history
  • Loading branch information
jmhauck committed Nov 6, 2023
1 parent f8ab5ff commit 8096d5a
Show file tree
Hide file tree
Showing 6 changed files with 192 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,8 @@ export namespace Components {
*/
"sketchPolygonSymbol": __esri.SimpleFillSymbol;
}
interface ShareItem {
}
interface SolutionConfiguration {
/**
* Credentials for requests, which can be a serialized UserSession
Expand Down Expand Up @@ -1408,6 +1410,12 @@ declare global {
prototype: HTMLRefineSelectionElement;
new (): HTMLRefineSelectionElement;
};
interface HTMLShareItemElement extends Components.ShareItem, HTMLStencilElement {
}
var HTMLShareItemElement: {
prototype: HTMLShareItemElement;
new (): HTMLShareItemElement;
};
interface HTMLSolutionConfigurationElement extends Components.SolutionConfiguration, HTMLStencilElement {
}
var HTMLSolutionConfigurationElement: {
Expand Down Expand Up @@ -1584,6 +1592,7 @@ declare global {
"pdf-download": HTMLPdfDownloadElement;
"public-notification": HTMLPublicNotificationElement;
"refine-selection": HTMLRefineSelectionElement;
"share-item": HTMLShareItemElement;
"solution-configuration": HTMLSolutionConfigurationElement;
"solution-contents": HTMLSolutionContentsElement;
"solution-item": HTMLSolutionItemElement;
Expand Down Expand Up @@ -2427,6 +2436,8 @@ declare namespace LocalJSX {
*/
"sketchPolygonSymbol"?: __esri.SimpleFillSymbol;
}
interface ShareItem {
}
interface SolutionConfiguration {
/**
* Credentials for requests, which can be a serialized UserSession
Expand Down Expand Up @@ -2621,6 +2632,7 @@ declare namespace LocalJSX {
"pdf-download": PdfDownload;
"public-notification": PublicNotification;
"refine-selection": RefineSelection;
"share-item": ShareItem;
"solution-configuration": SolutionConfiguration;
"solution-contents": SolutionContents;
"solution-item": SolutionItem;
Expand Down Expand Up @@ -2671,6 +2683,7 @@ declare module "@stencil/core" {
"pdf-download": LocalJSX.PdfDownload & JSXBase.HTMLAttributes<HTMLPdfDownloadElement>;
"public-notification": LocalJSX.PublicNotification & JSXBase.HTMLAttributes<HTMLPublicNotificationElement>;
"refine-selection": LocalJSX.RefineSelection & JSXBase.HTMLAttributes<HTMLRefineSelectionElement>;
"share-item": LocalJSX.ShareItem & JSXBase.HTMLAttributes<HTMLShareItemElement>;
"solution-configuration": LocalJSX.SolutionConfiguration & JSXBase.HTMLAttributes<HTMLSolutionConfigurationElement>;
"solution-contents": LocalJSX.SolutionContents & JSXBase.HTMLAttributes<HTMLSolutionContentsElement>;
"solution-item": LocalJSX.SolutionItem & JSXBase.HTMLAttributes<HTMLSolutionItemElement>;
Expand Down
10 changes: 10 additions & 0 deletions src/components/share-item/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# share-item



<!-- Auto Generated Below -->


----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*
19 changes: 19 additions & 0 deletions src/components/share-item/share-item.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/** @license
* Copyright 2022 Esri
*
* 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
*
* http://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.
*/

:host {
display: block;
}
89 changes: 89 additions & 0 deletions src/components/share-item/share-item.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
/** @license
* Copyright 2022 Esri
*
* 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
*
* http://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 { Component, Element, Host, h } from '@stencil/core';

@Component({
tag: 'share-item',
styleUrl: 'share-item.css',
shadow: true,
})
export class ShareItem {
//--------------------------------------------------------------------------
//
// Host element access
//
//--------------------------------------------------------------------------

@Element() el: HTMLShareItemElement;

//--------------------------------------------------------------------------
//
// Properties (public)
//
//--------------------------------------------------------------------------

//--------------------------------------------------------------------------
//
// State (internal)
//
//--------------------------------------------------------------------------

//--------------------------------------------------------------------------
//
// Properties (protected)
//
//--------------------------------------------------------------------------

//--------------------------------------------------------------------------
//
// Watch handlers
//
//--------------------------------------------------------------------------

//--------------------------------------------------------------------------
//
// Methods (public)
//
//--------------------------------------------------------------------------

//--------------------------------------------------------------------------
//
// Events (public)
//
//--------------------------------------------------------------------------

//--------------------------------------------------------------------------
//
// Functions (lifecycle)
//
//--------------------------------------------------------------------------

render() {
return (
<Host>
<slot/>
</Host>
);
}

//--------------------------------------------------------------------------
//
// Functions (protected)
//
//--------------------------------------------------------------------------

}
27 changes: 27 additions & 0 deletions src/components/share-item/test/share-item.e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/** @license
* Copyright 2022 Esri
*
* 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
*
* http://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 { newE2EPage } from '@stencil/core/testing';

xdescribe('share-item', () => {
it('renders', async () => {
const page = await newE2EPage();
await page.setContent('<share-item></share-item>');

const element = await page.find('share-item');
expect(element).toHaveClass('hydrated');
});
});
34 changes: 34 additions & 0 deletions src/components/share-item/test/share-item.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/** @license
* Copyright 2022 Esri
*
* 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
*
* http://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 { newSpecPage } from '@stencil/core/testing';
import { ShareItem } from '../share-item';

xdescribe('share-item', () => {
it('renders', async () => {
const page = await newSpecPage({
components: [ShareItem],
html: `<share-item></share-item>`,
});
expect(page.root).toEqualHtml(`
<share-item>
<mock:shadow-root>
<slot></slot>
</mock:shadow-root>
</share-item>
`);
});
});

0 comments on commit 8096d5a

Please sign in to comment.