diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 7466c6b08..b24c67cab 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -7,7 +7,7 @@ jobs: name: Deploy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: valitydev/action-frontend/setup-install@v2 - name: Build run: npm run build @@ -16,32 +16,14 @@ jobs: with: registry-username: ${{ github.actor }} registry-access-token: ${{ secrets.GITHUB_TOKEN }} - # - name: set config - # run: | - # printf "$APP_ENV_FILE" > dist/control-center/browser/assets/appConfig.json - # printf "$AUTH_ENV_FILE" > dist/control-center/browser/assets/authConfig.json - # env: - # APP_ENV_FILE: ${{secrets.APP_CONF}} - # AUTH_ENV_FILE: ${{secrets.AUTH_CONF}} - # - name: Publish to CF Pages - # uses: cloudflare/pages-action@1 - # with: - # apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - # accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - # projectName: 'cc' - # directory: 'dist/control-center/browser' - # gitHubToken: ${{ secrets.GITHUB_TOKEN }} - # branch: main - # - name: Publish MatEz Library - # uses: valitydev/action-frontend/publish@v1.0 - # with: - # npm-token: ${{ secrets.NPM_TOKEN }} - # directory: ./dist/libs/matez - # - name: Publish NgThrift Library - # uses: valitydev/action-frontend/publish@v1.0 - # with: - # npm-token: ${{ secrets.NPM_TOKEN }} - # directory: ./dist/libs/ng-thrift + - name: Build MatEz Library + run: npm run build -- matez + - name: Publish MatEz Library + uses: valitydev/action-frontend/publish@v2 + with: + directory: ./dist/matez + npm-token: ${{ secrets.NPM_TOKEN }} + pr-label: 'matez' notify: name: Notify runs-on: ubuntu-latest diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 1dae543b6..4eee3ca2b 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -1,44 +1,31 @@ name: PR on: pull_request: + types: [opened, synchronize, reopened, labeled] jobs: check: name: Check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: valitydev/action-frontend/setup-install@v2 - name: Check run: npm run check build: name: Build runs-on: ubuntu-latest - env: - SHORT_SHA: $(echo "${{ github.event.pull_request.head.sha }}" | cut -c1-7) steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: valitydev/action-frontend/setup-install@v2 with: npm-install-force: true - name: Build run: npm run build - # - name: Publish MatEz Library - # if: > - # contains(github.event.pull_request.labels.*.name, 'publish') - # || contains(github.event.pull_request.labels.*.name, 'publish matez') - # working-directory: ./dist/libs/matez - # run: > - # npm version prerelease --preid pr-${{ github.event.number }}-${{ env.SHORT_SHA }} --no-git-tag-version - # && npm publish --tag pr - # env: - # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - # - name: Publish NgThrift Library - # if: > - # contains(github.event.pull_request.labels.*.name, 'publish') - # || contains(github.event.pull_request.labels.*.name, 'publish ng-thrift') - # working-directory: ./dist/libs/ng-thrift - # run: > - # npm version prerelease --preid pr-${{ github.event.number }}-${{ env.SHORT_SHA }} --no-git-tag-version - # && npm publish --tag pr - # env: - # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Build MatEz Library + run: npm run build -- matez + - name: Publish MatEz Library + uses: valitydev/action-frontend/publish@v2 + with: + directory: ./dist/matez + npm-token: ${{ secrets.NPM_TOKEN }} + pr-label: 'matez' diff --git a/package-lock.json b/package-lock.json index 038b70c6c..13eb75ccd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1918,12 +1918,6 @@ "node": ">=14" } }, - "node_modules/@dinero.js/currencies": { - "version": "2.0.0-alpha.14", - "resolved": "https://registry.npmjs.org/@dinero.js/currencies/-/currencies-2.0.0-alpha.14.tgz", - "integrity": "sha512-Ck5ZLjRI7Pl7Y4VkeOst4WEwiN5vZezv8GHcXWsVLUfTNsmkV37VeLYDRAuTUP4akEJyIry+1o1qHYNtLq3eNw==", - "license": "MIT" - }, "node_modules/@emnapi/core": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.1.tgz", @@ -8551,6 +8545,15 @@ "dev": true, "license": "MIT" }, + "node_modules/dinero.js": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/dinero.js/-/dinero.js-2.0.2.tgz", + "integrity": "sha512-d+4egJTvNinkb66KSed11Daqz6MWaOHzyalLu6h3p+BLrsmwKFjHjvOKivOWeM7WyoX89te+xx4cKI6zrDtCfQ==", + "license": "MIT", + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/doctrine": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", @@ -16563,12 +16566,12 @@ "name": "@vality/matez", "version": "21.0.0", "dependencies": { - "@dinero.js/currencies": "^2.0.0-alpha.14", "@ng-matero/extensions": "^21.1.4", "@s-libs/js-core": "^20.2.0", "@s-libs/micro-dash": "^20.0.0", "@s-libs/ng-core": "^20.2.0", "@s-libs/rxjs-core": "^20.2.0", + "dinero.js": "^2.0.0", "papaparse": "^5.5.3" }, "devDependencies": { diff --git a/projects/matez/ng-package.json b/projects/matez/ng-package.json index 1be0a7a71..fc0d72622 100644 --- a/projects/matez/ng-package.json +++ b/projects/matez/ng-package.json @@ -3,5 +3,14 @@ "dest": "../../dist/matez", "lib": { "entryFile": "src/public-api.ts" - } + }, + "allowedNonPeerDependencies": [ + "@ng-matero/extensions", + "@s-libs/js-core", + "@s-libs/micro-dash", + "@s-libs/ng-core", + "@s-libs/rxjs-core", + "dinero.js", + "papaparse" + ] } diff --git a/projects/matez/package.json b/projects/matez/package.json index ba6f0b08e..fecc4b38b 100644 --- a/projects/matez/package.json +++ b/projects/matez/package.json @@ -24,12 +24,12 @@ "utility-types": "^3.11.0" }, "dependencies": { - "@dinero.js/currencies": "^2.0.0-alpha.14", "@ng-matero/extensions": "^21.1.4", "@s-libs/js-core": "^20.2.0", "@s-libs/micro-dash": "^20.0.0", "@s-libs/ng-core": "^20.2.0", "@s-libs/rxjs-core": "^20.2.0", + "dinero.js": "^2.0.0", "papaparse": "^5.5.3" }, "devDependencies": { diff --git a/projects/matez/src/lib/components/cmdk/index.ts b/projects/matez/src/lib/components/cmdk/index.ts index 94e638a04..fc813d7c3 100644 --- a/projects/matez/src/lib/components/cmdk/index.ts +++ b/projects/matez/src/lib/components/cmdk/index.ts @@ -3,3 +3,4 @@ export * from './types/cmdk-option'; export * from './types/cmdk-options'; export * from './cmdk.module'; export * from './cmdk.component'; +export * from './components/cmdk-button.component'; diff --git a/projects/matez/src/lib/components/table/table-resource.component.ts b/projects/matez/src/lib/components/table/table-resource.component.ts index 8f5f92ba5..50e8e4539 100644 --- a/projects/matez/src/lib/components/table/table-resource.component.ts +++ b/projects/matez/src/lib/components/table/table-resource.component.ts @@ -1,8 +1,9 @@ import { Component, TemplateRef, booleanAttribute, computed, input, model } from '@angular/core'; -import { Column, ObservableResource, PagedObservableResource, UpdateOptions } from '@vality/matez'; +import { ObservableResource, PagedObservableResource } from '../../utils'; import { TableModule } from './table.module'; +import { Column, UpdateOptions } from './types'; @Component({ selector: 'v-table-resource', diff --git a/projects/matez/src/lib/utils/currency/get-currency-exponent.ts b/projects/matez/src/lib/utils/currency/get-currency-exponent.ts index dd3360210..6d8730175 100644 --- a/projects/matez/src/lib/utils/currency/get-currency-exponent.ts +++ b/projects/matez/src/lib/utils/currency/get-currency-exponent.ts @@ -1,4 +1,4 @@ -import * as currencies from '@dinero.js/currencies'; +import * as currencies from 'dinero.js/currencies'; export const getCurrencyExponent = (currencyCode: string): number => currencies[currencyCode as keyof typeof currencies]?.exponent;