diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ae8f06d..5e5fec7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -40,7 +40,7 @@ jobs: run: | echo "majorMinorPatch=$GitVersion_MajorMinorPatch" >> "$GITHUB_OUTPUT" echo "semver=$GitVersion_SemVer" >> "$GITHUB_OUTPUT" - tests: + tests_components: runs-on: ubuntu-latest defaults: run: @@ -162,7 +162,7 @@ jobs: build_components: runs-on: ubuntu-latest - needs: [version,tests] + needs: [version,tests_components] defaults: run: working-directory: ./packages/components @@ -171,7 +171,7 @@ jobs: steps: - uses: actions/setup-node@v3 with: - node-version: '16' + node-version: '18' registry-url: 'https://registry.npmjs.org' - name: Checkout @@ -265,6 +265,65 @@ jobs: fi fi - + deploy_teams: + runs-on: ubuntu-latest + needs: [version,tests_components] + defaults: + run: + working-directory: ./packages/apps/teams + env: + VERSION: ${{ needs.version.outputs.semver }} + steps: + - uses: actions/setup-node@v3 + with: + node-version: '18' + registry-url: 'https://registry.npmjs.org' + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: pnpm/action-setup@v2 + with: + version: 8 + run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: | + pnpm install + + - name: Run PowerShell deployment + shell: pwsh + run: | + ../../deploy/deploy-teams.ps1 -Env CI -Version "$env:VERSION" + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: appPackage + path: | + ${{ github.workspace }}/apps/teams/appPackage/build/*.zip + !${{ github.workspace }}/**/node_modules + !${{ github.workspace }}/**/src + !${{ github.workspace }}/**/env + !${{ github.workspace }}/**/infra + !${{ github.workspace }}/**/.pnpm-store + !${{ github.workspace }}/**/.vscode + !${{ github.workspace }}/**/.storybook + !${{ github.workspace }}/**/template + !${{ github.workspace }}/**/webpack diff --git a/apps/teams/src/views/index.html b/apps/teams/src/views/index.html index 04eb180..cfc8630 100644 --- a/apps/teams/src/views/index.html +++ b/apps/teams/src/views/index.html @@ -80,8 +80,10 @@ @@ -61,7 +64,7 @@ PnP Modern Search - Core Components -
+
@@ -111,11 +114,14 @@ + + `; + } + return html`
- ${resource.webUrl?.endsWith(".aspx") ? getSvg(SvgIcon.News) : getSvg(SvgIcon.FileOuter)} + ${renderIcon}
@@ -912,7 +927,6 @@ export class SearchResultsComponent extends BaseComponent { return [ css` - img:before { content: ' '; display: block; @@ -925,7 +939,7 @@ export class SearchResultsComponent extends BaseComponent { } // Apply only in SharePoint canvas - .ControlZone svg, svg > path { + .ControlZone svg, svg > path { ${unsafeCSS(`fill: var(${ThemeInternalCSSVariables.textColor})`)}; height: 100%; width: 100%; @@ -935,7 +949,7 @@ export class SearchResultsComponent extends BaseComponent { svg, svg > path { ${unsafeCSS(`fill: var(${ThemeInternalCSSVariables.textColorDark})`)}; } - } + } `, BaseComponent.themeStyles, // Allow component to use them CSS variables from design. The component is a first level component so it is OK to define them variables here BaseComponent.styles // Use base styles (i.e. Tailwind CSS classes) diff --git a/packages/components/src/helpers/SearchResultsHelper.ts b/packages/components/src/helpers/SearchResultsHelper.ts index c539dac..9cd4914 100644 --- a/packages/components/src/helpers/SearchResultsHelper.ts +++ b/packages/components/src/helpers/SearchResultsHelper.ts @@ -26,7 +26,8 @@ export enum WellKnownSearchProperties { Summary = "summary", NormListID = "normlistid", NormUniqueID = "normuniqueid", - NormSiteID = "normsiteid" + NormSiteID = "normsiteid", + DriveId = "driveId" } export const sanitizeSummary = (summary: string) => { diff --git a/packages/components/src/helpers/SearchSvgHelper.ts b/packages/components/src/helpers/SearchSvgHelper.ts index fed1130..575ab61 100644 --- a/packages/components/src/helpers/SearchSvgHelper.ts +++ b/packages/components/src/helpers/SearchSvgHelper.ts @@ -54,5 +54,4 @@ export const getInternalSvg = (svgIcon: SearchSvgIcon) => { case SearchSvgIcon.ArrowLeft: return html``; } -}; - \ No newline at end of file +}; \ No newline at end of file diff --git a/packages/components/webpack.common.cjs b/packages/components/webpack.common.cjs index 8cb1329..02cf284 100644 --- a/packages/components/webpack.common.cjs +++ b/packages/components/webpack.common.cjs @@ -22,18 +22,6 @@ module.exports = { /node_modules/ ] }, - { - test: /\.ts?$/, - use: [ - { - loader: "postcss-loader" - } - ], - exclude: [ - /node_modules/, - /tailwind-styles-css\.ts/ - ] - }, { test: /\.(png|jpg|jpeg|gif)$/i, type: "asset/resource", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 467af25..8454add 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -237,9 +237,6 @@ importers: '@tailwindcss/line-clamp': specifier: 0.4.4 version: 0.4.4(tailwindcss@3.2.4) - '@webcomponents/scoped-custom-element-registry': - specifier: 0.0.9 - version: 0.0.9 autoprefixer: specifier: 10.4.16 version: 10.4.16(postcss@8.4.31)