Skip to content

Integration of Indexed DB #283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions .github/workflows/deploy-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,28 @@ on:

jobs:
build-component:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.7

- name: Build
run: npm ci

deploy-storybook:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: npm ci
run: npm ci
- name: Build component
run: npm run build
- name: Build Storybook
run: npm run build-storybook
- name: Upload Storybook to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: "storybook-static"

- name: Deploy Storybook to GitHub Pages
uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
with:
path: storybook-static
build_command: |
npm run build
npm run build-storybook
token: ${{ github.token }}
8 changes: 4 additions & 4 deletions .github/workflows/github-npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
- run: npm ci

publish-gpr:
Expand All @@ -24,10 +24,10 @@ jobs:
contents: read
packages: write
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/real-npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 19
node-version: 20
registry-url: https://registry.npmjs.org/
- run: npm clean-install
- run: npm run build
Expand Down
14 changes: 8 additions & 6 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Ignore artifacts:
.stencil
.storybook
dist
loader
node_modules
www
/src/index.html
/www/
/node_modules/
/dist/
/loader/
/.storybook/
/.stencil/
/storybook-static/
21 changes: 12 additions & 9 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
const config = {
export default {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
staticDirs: [{from: '../dist', to: '/assets'}, {from: '../loader', to: '/assets'}],
framework: {
name: '@storybook/web-components-vite',
options: {},
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials'
],
staticDirs: [{ from: '../dist', to: '/assets' }, { from: '../loader', to: '/assets' }],
framework: '@storybook/web-components-vite',
docs: {
source: {
type: 'code',
}
},
docs: {},
core: {
disableTelemetry: true,
}
},
};
export default config;
12 changes: 0 additions & 12 deletions .storybook/preview-head.html

This file was deleted.

6 changes: 3 additions & 3 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineCustomElements } from '../loader';

defineCustomElements();

const preview = {
export default {
parameters: {
controls: {
matchers: {
Expand All @@ -12,6 +12,6 @@ const preview = {
},
},
},
};

export default preview;
tags: ['autodocs']
};
26 changes: 13 additions & 13 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
contributors and maintainers pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance, race,
Expand All @@ -14,21 +14,21 @@ religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
Expand Down Expand Up @@ -56,8 +56,8 @@ further defined and clarified by project maintainers.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at {{ email }}. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
complaints will be reviewed and investigated and will result in a response deemed necessary and appropriate to the
circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Please note we have a code of conduct, please follow it in all your interactions
## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
2. State in the Pull Request details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters.
2. State in the Pull Request details of changes to the interface, this includes new environment variables, exposed
ports, useful file locations and container parameters.
3. Pull Requests are merged after successful review of at least one of the project owners.

## Code of Conduct
Expand Down Expand Up @@ -81,4 +82,5 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage], versi
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org

[version]: http://contributor-covenant.org/version/1/4/
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ By default, it is set to 1, which means that it will only render the first level
You can prohibit unfolding of the component by setting the `current-level-of-subcomponents` to the same value as
the `level-of-subcomponents` property.

To use the component, import the [npm-package](https://www.npmjs.com/package/@kit-data-manager/pid-component) via [unpkg](https://unpkg.com/):
To use the component, import the [npm-package](https://www.npmjs.com/package/@kit-data-manager/pid-component)
via [unpkg](https://unpkg.com/):

```html

<head>
<script type='module' src='https://unpkg.com/@kit-data-manager/pid-component'></script>
<script type="module" src="https://unpkg.com/@kit-data-manager/pid-component"></script>
</head>
```

Expand All @@ -33,7 +33,7 @@ Then, you can use this component like this:

```html

<pid-component value='21.T11981/be908bd1-e049-4d35-975e-8e27d40117e6'></pid-component>
<pid-component value="21.T11981/be908bd1-e049-4d35-975e-8e27d40117e6"></pid-component>
```

You can try this web component in the [demo](https://kit-data-manager.github.io/pid-component).
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@
"codeRepository": "https://github.com/kit-data-manager/pid-component",
"buildInstructions": "https://kit-data-manager.github.io/pid-component",
"url": "https://kit-data-manager.github.io/pid-component"
}
}
16 changes: 16 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintConfigPrettier from 'eslint-config-prettier';
import storybook from 'eslint-plugin-storybook';

export default [
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
{ files: ['**/*.js'], languageOptions: { sourceType: 'commonjs' } },
{ languageOptions: { globals: globals.browser } },
{ ignores: ['node_modules/', 'dist/', 'www/', 'loader/', '.stencil/', '.storybook/', 'storybook-static'] },
...storybook.configs['flat/recommended'],
eslintConfigPrettier,
pluginJs.configs.recommended,
...tseslint.configs.recommended,
];
Loading