Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiipylypchuk1991 committed Apr 24, 2024
0 parents commit 1135499
Show file tree
Hide file tree
Showing 83 changed files with 14,236 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This is a basic workflow to help you get started with Actions

name: Deploy To Site

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master, next, test ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- id: vars
run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/}

- uses: actions/setup-node@v4
with:
node-version: '18.19.0'

- run: yarn install
- run: yarn build

- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
registry: registry.webix.io
- uses: docker/build-push-action@v2
with:
context: .
push: true
tags: registry.webix.io/pivot-docs-alt:${{ steps.vars.outputs.short_ref }}

- run: curl "https://docs.dhtmlx.com/hooks/restart-docker?token=${{ secrets.RESTART_TOKEN }}&project=docs-pivot-alt-${{ steps.vars.outputs.short_ref }}"
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM nginx:1.19.6
COPY docker/nginx.conf /etc/nginx/nginx.conf
COPY docker/redirects.conf /etc/nginx/redirects.conf
COPY ./build /usr/share/nginx/html
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<h1 align="center"><a href="https://docs.dhtmlx.com/pivot/">DHTMLX Pivot Documentation</a></h1>

TODO!!!

## Explore documentation locally

To run the Pivot documentation locally, take the following steps:

#### 1. Clone the documentation to the local folder

```
$ git clone git@github.com:DHTMLX/docs-pivot.git
$ cd docs-pivot
```

#### 2. Install dependencies

```
$ yarn
```

#### 3. Run the documentation on the local server and explore it

```
$ yarn start
```

## Related sources

[Download DHTMLX Pivot](https://dhtmlx.com/docs/products/dhtmlxPivot/download.shtml)

[Live demos](https://snippet.dhtmlx.com/)

[Blog](https://dhtmlx.com/blog/)

[Forum](https://forum.dhtmlx.com/)

## Follow us

Star our GitHub repo :star:

Watch our tutorials on [YouTube](https://www.youtube.com/user/dhtmlx/videos) :eyes:

Read us on [Medium](https://medium.com/@dhtmlx) :newspaper:

Follow us on [Twitter](https://twitter.com/dhtmlx) :feet:

Like our page on [Facebook](https://www.facebook.com/dhtmlx/) :thumbsup:

See our news on [Linkedin](https://www.linkedin.com/groups/3345009/) :mega:
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
49 changes: 49 additions & 0 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

user nginx;
worker_processes 1;

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;


events {
worker_connections 1024;
}


http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
keepalive_timeout 65;
types_hash_max_size 2048;
map_hash_bucket_size 256;
gzip on;

map_hash_max_size 8192;
map $uri $new_uri {
include /etc/nginx/redirects.conf;
}

server {
listen 80;
listen [::]:80;
server_name localhost;

if ($new_uri){
return 301 $new_uri;
}

location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
}
}
1 change: 1 addition & 0 deletions docker/redirects.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/markdown-page/ /pivot/overview;
44 changes: 44 additions & 0 deletions docs/api/config/columnshape-property.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
sidebar_label: columnShape
title: columnShape Config
description: You can learn about the columnShape config in the documentation of the DHTMLX JavaScript Pivot library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Pivot.
---

# columnShape

### Description

@short: Optional. TODO ...

### Usage

~~~jsx
columnShape?: {
splitLeft?: number,
width?: string | number,
autoWidth?: {
columns?: string | boolean,
header?: boolean,
data?: boolean,
rows?: number,
firstOnly?: boolean
}
};
~~~

### Parameters

- `splitLeft` - (optional) defines how many of the leftmost columns are frozen. The default value is 0.
- `width` - (optional) defines the width of a column; it's an object where each key is a field id and the value is the width of the column in pixels
- `autoWidth` - (optional) an object that defines how column width should be calculated automatically. The default configuration uses 20 rows, and the width is calculated based on the header and data, with each field analyzed only once. The object parameters are the following:
- `columns` - (optional) an object where each key is a field id and the boolean value defines whether column width should be calculated automatically
- `header` - (optional) if set to **true** (default), adjusts the width to the header text
- `data` - (optional) if set to **true** (default), adjusts the width to the cell with the widest content
- `rows` - (optional) the number of rows to be processed for the autoWidth calculation
- `firstOnly` - (optional) if set to **true** (default), each field of the same data is analyzed only once to calculate the column width; in case of multiple columns based on the same data (e.g., the *oil* field with the *count* operation and the *oil* field with the *sum* operation), only data in the first one will be analyzed and the others will inherit this width

## Example

~~~jsx {}
// TODO
~~~
81 changes: 81 additions & 0 deletions docs/api/config/config-property.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
sidebar_label: config
title: config Config
description: You can learn about the config config in the documentation of the DHTMLX JavaScript Pivot library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Pivot.
---

# config

### Description

@short: Optional. TODO ...

### Usage

~~~jsx
config?: {
rows: string[],
columns: string[],
values: string[],
filters: object
};
~~~

### Parameters

The `config` parameters are used to define which fields will be applied as rows and columns, and what additional data aggregation methods should be applied to rows/columns.

- `rows` - defines the rows of the Pivot table. The default value is an empty array. It can be a string which represents a single field ID or an object with the field ID and a method for data extraction; the object parameters are the following:
- `id` - the ID of a field
- `method` - defines a method for data processing in the field; methods for the time-based data fields are available by default: year, month, day, hour, minute which group data by year/month/day/hour; here you can also add the name of a custom method ([see `predicates`](/api/properties/sv_pivot_predicates)) for the field of any data type
- `columns` - defines columns for the Pivot table. It's an empty array by default. It can be a single field ID or an object with the field ID and a method for data extraction; the object parameters are the following:
- `id` - a field ID
- `method` - defines a method for data processing (for time-based data fields).
By default, methods are available for the time-based fields (the **when** field) with the next values: year, month, day, hour, minute. Here you can also add the name of a custom method ([see `predicates`](/api/properties/sv_pivot_predicates)) for the field of any data type
- `values` - defines the data aggregation for the cells of the Pivot table. It's an empty array by default. Each element can be a string representing a data field ID and aggregation method or an object containing the field ID and the method for data aggregation. The object parameters are the following:
- `id` - the ID of a field
- `method` - defines a method for data extraction; possible types:
- for numeric values: min, max, sum, count
- for text values: count
- for date value: min, max, count
Sum - sums all the values of the selected data property and displays the sum
Min - finds and displays the minimum value of the selected data property
Max - finds and displays the maximum value of the selected data property
Count - looks for all occurrences of the selected data property and displays their number; set by default for each newly added field

<details>

<summary><b>Options for defining values</b></summary>

You can define `values`in either of the two equally valid ways:
- option one is a string representing a data field ID
- option two is an object containing the field ID and the method for data aggregation

Example:

~~~
values: [
"sum(sales)", // option one
{ id: "sales", method: "sum" }, // option two
]
~~~

</details>

- `filters` - (optional) defines how data is filtered in the table; it's an object with field IDs and data aggregation method; the object parameters are the following:
- `name` - (optional) the filter key which is the ID of a field with the filtering rule or exact filtering criteria:
- `condition` - (optional) the filtering rule object with the parameters below:
- `filter` - (optional) the value to filter by
- `type` - (optional) filtering criteria which depend on the field value type (see the **type** parameter for the [`fields`](TODO) property).
Filtering criteria (condition types):
- for text values: equal, notEqual, contains, notContains, beginsWith, notBeginsWith, endsWith, notEndsWith
- for numeric values: greater: less, greaterOrEqual, lessOrEqual, equal, notEqual, contains, notContains
- for date types: greater, less, greaterOrEqual, lessOrEqual, equal, notEqual, between, notBetween

Default condition types:
number: "greater", text: "contains", date: "between"
- `includes` - (optional) an array of values to be displayed from those that are already filtered; available for text and dates values

### Example

TODO!!!
27 changes: 27 additions & 0 deletions docs/api/config/data-property.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
sidebar_label: data
title: data Config
description: You can learn about the data config in the documentation of the DHTMLX JavaScript Pivot library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Pivot.
---

# data

### Description

@short: Optional. TODO ...

### Usage

~~~jsx
data?: [];
~~~

### Parameters

Each object of the `data` property represents a row. The default value is an empty array.

TODO!!!

### Example

TODO!!!
35 changes: 35 additions & 0 deletions docs/api/config/fields-property.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
sidebar_label: fields
title: fields Config
description: You can learn about the fields config in the documentation of the DHTMLX JavaScript Pivot library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Pivot.
---

# fields

### Description

@short: Optional. TODO ...

### Usage

~~~jsx
fields?: [{
id: string,
label?: string,
type: string,
sort?: "asc" | "desc" | ((a: any, b: any) => number),
}];
~~~

### Parameters

Each object in the `fields` array should have the following properties:

- `id` - (required) the ID of a field
- `label` - (optional) the field label to be displayed in GUI
- `type` - (required) data type in a field ( "number", "date", or "string")
- `sort` - (optional) defines the default sorting order for the field. Accepts either "asc", "desc", or a custom sorting function

### Example

TODO!!!
Loading

0 comments on commit 1135499

Please sign in to comment.