Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pix666 committed May 22, 2024
0 parents commit 2fa8d17
Show file tree
Hide file tree
Showing 15 changed files with 8,997 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"presets": [
[
"@babel/preset-env",
{
"loose": true,
"modules": false
}
]
],
"plugins": [
"@babel/plugin-syntax-dynamic-import"
]
}
20 changes: 20 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Run Tests

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
- name: Install NPM dependencies
run: npm ci
- name: Build NPM package
run: npm run build
25 changes: 25 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release

on:
push:
tags:
- "v[0-9]+.*"

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
registry-url: "https://registry.npmjs.org"
- name: Install NPM dependencies
run: npm ci
- name: Build NPM package
run: npm run build
- name: Publish NPM package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules/*
npm-debug.log
/.idea/*
/cache/
/dist/
16 changes: 16 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Dot files
.idea/
.github/
.babelrc
.prettierignore

# tests
cypress/
cypress.config.js

# build
cache/
rollup.config.js

# source
src/
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules/
dist/
cypress/
*.yml
*.yaml
*.html
*.min.js
*.min.css
package.json
package-lock.json
28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause License

Copyright (c) 2023, dldevinc

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
62 changes: 62 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="./dist/index.css">
<script src="./dist/umd/index.js" defer></script>
</head>
<body>
<form action="" method="get">
<select multiple name="interest" class="pct-tree">
<optgroup label="Authentication and Authorization">
<option value="can_add_user" disabled>user | Can add user</option>
<option value="can_change_user">user | Can change user</option>
<option value="can_delete_user" selected>user | Can delete user</option>
<option value="can_view_user">user | Can view user</option>
</optgroup>

<optgroup label="Product Management">
<option value="can_add_product">product | Can add product</option>
<option value="can_change_product">product | Can change product</option>
<option value="can_delete_product">product | Can delete product</option>
<option value="can_view_product">product | Can view product</option>
</optgroup>

<optgroup label="Order Management">
<option value="can_add_order">order | Can add order</option>
<option value="can_change_order">order | Can change order</option>
<option value="can_delete_order">order | Can delete order</option>
<option value="can_view_order">order | Can view order</option>
</optgroup>

<optgroup label="Reporting">
<option value="can_create_report">report | Can create report</option>
<option value="can_change_report">report | Can change report</option>
<option value="can_delete_report">report | Can delete report</option>
<option value="can_view_report">report | Can view report</option>
</optgroup>

<optgroup label="Customer Support">
<option value="can_add_ticket">support | Can add ticket</option>
<option value="can_change_ticket">support | Can change ticket</option>
<option value="can_delete_ticket">support | Can delete ticket</option>
<option value="can_view_ticket">support | Can view ticket</option>
</optgroup>
</select>

<div style="margin-top: 10px;">
<button type="submit">Submit</button>
</div>
</form>

<script>
document.addEventListener("DOMContentLoaded", function() {
const select = document.querySelector("select");
new PaperCheckboxTree(select);
});
</script>
</body>
</html>
Loading

0 comments on commit 2fa8d17

Please sign in to comment.