├── .github
└── FUNDING.yml
├── README.md
├── dist
├── css
│ └── tbsgrid.css
├── tbsgrid-configs.js
├── tbsgrid.js
├── tbsgrid.min.js
└── userImg
│ ├── 0.png
│ ├── 1.png
│ ├── 2.png
│ ├── 3.png
│ ├── 4.png
│ ├── 5.png
│ ├── 6.png
│ ├── 7.png
│ ├── 8.png
│ └── 9.png
├── package-lock.json
├── package.json
├── package_20240927.json
├── src
├── assets
│ └── userImg
│ │ ├── 0.png
│ │ ├── 1.png
│ │ ├── 2.png
│ │ ├── 3.png
│ │ ├── 4.png
│ │ ├── 5.png
│ │ ├── 6.png
│ │ ├── 7.png
│ │ ├── 8.png
│ │ └── 9.png
├── base
│ ├── tbs.grid.base.columns.ts
│ ├── tbs.grid.base.data.ts
│ ├── tbs.grid.base.event.ts
│ ├── tbs.grid.base.is.ts
│ ├── tbs.grid.base.line.ts
│ ├── tbs.grid.base.main.ts
│ ├── tbs.grid.base.rows.ts
│ ├── tbs.grid.base.ts
│ └── tbs.grid.base.user.event.ts
├── columns
│ ├── tbs.grid.columns.ts
│ └── tbs.grid.headers.ts
├── database
│ ├── tbs.data.array.table.ts
│ ├── tbs.data.cell.ts
│ ├── tbs.data.row.ts
│ ├── tbs.data.table.ts
│ └── tbs.database.ts
├── export
│ └── tbs.grid.excel.ts
├── layer
│ ├── tbs.grid.combo.ts
│ └── tbs.grid.date.ts
├── page
│ ├── tbs.grid.page.ts
│ └── tbs.grid.pagination.ts
├── panels
│ ├── tbs.grid.panel.base.ts
│ ├── tbs.grid.panel10.ts
│ ├── tbs.grid.panel20.ts
│ ├── tbs.grid.panel30.ts
│ ├── tbs.grid.panel40.ts
│ ├── tbs.grid.panel50.ts
│ ├── tbs.grid.panel70.ts
│ ├── tbs.grid.panel80.ts
│ ├── tbs.grid.panel90.ts
│ ├── tbs.grid.panel99.ts
│ ├── tbs.grid.render.panel.info.ts
│ ├── tbs.grid.render.panel30.ts
│ ├── tbs.grid.render.panel40.ts
│ └── tbs.grid.render.panel70.ts
├── renderer
│ ├── tbs.grid.render.button.ts
│ ├── tbs.grid.render.checkbox.ts
│ ├── tbs.grid.render.group.ts
│ ├── tbs.grid.render.img.ts
│ ├── tbs.grid.render.link.ts
│ ├── tbs.grid.render.string.ts
│ ├── tbs.grid.render.svg.ts
│ └── tbs.grid.render.tree.ts
├── summary
│ ├── tbs.grid.footer.ts
│ └── tbs.grid.top.ts
├── tbs.base.ts
├── tbs.grid.cell.ts
├── tbs.grid.configs.ts
├── tbs.grid.control.ts
├── tbs.grid.dom.ts
├── tbs.grid.filter.layer.ts
├── tbs.grid.filter.ts
├── tbs.grid.group.ts
├── tbs.grid.range.panel.ts
├── tbs.grid.range.ts
├── tbs.grid.row.ts
├── tbs.grid.scroll.base.ts
├── tbs.grid.scroll.ts
├── tbs.grid.sort.ts
├── tbs.grid.table.ts
├── tbs.grid.tree.ts
├── tbs.grid.ts
└── tbs.grid.types.ts
├── src_css
├── img
│ ├── calendar.png
│ ├── delete.png
│ ├── down-arrow.png
│ ├── filter_find.png
│ ├── loading.gif
│ ├── remove.png
│ ├── save.png
│ ├── search.png
│ ├── select.png
│ ├── start.png
│ ├── tree_closed.png
│ └── tree_open.png
└── tbsgrid.css
├── tsconfig.json
├── types
├── base
│ ├── tbs.base.d.ts
│ ├── tbs.base.d.ts.map
│ ├── tbs.data.array.table.d.ts
│ ├── tbs.data.array.table.d.ts.map
│ ├── tbs.data.cell.d.ts
│ ├── tbs.data.cell.d.ts.map
│ ├── tbs.data.row.d.ts
│ ├── tbs.data.row.d.ts.map
│ ├── tbs.data.table.d.ts
│ ├── tbs.data.table.d.ts.map
│ ├── tbs.database.d.ts
│ └── tbs.database.d.ts.map
├── columns
│ ├── tbs.grid.columns.d.ts
│ ├── tbs.grid.columns.d.ts.map
│ ├── tbs.grid.headers.d.ts
│ └── tbs.grid.headers.d.ts.map
├── export
│ ├── tbs.grid.excel.d.ts
│ └── tbs.grid.excel.d.ts.map
├── panels
│ ├── tbs.grid.panel.base.d.ts
│ ├── tbs.grid.panel.base.d.ts.map
│ ├── tbs.grid.panel10.d.ts
│ ├── tbs.grid.panel10.d.ts.map
│ ├── tbs.grid.panel20.d.ts
│ ├── tbs.grid.panel20.d.ts.map
│ ├── tbs.grid.panel30.d.ts
│ ├── tbs.grid.panel30.d.ts.map
│ ├── tbs.grid.panel40.d.ts
│ ├── tbs.grid.panel40.d.ts.map
│ ├── tbs.grid.panel50.d.ts
│ ├── tbs.grid.panel50.d.ts.map
│ ├── tbs.grid.panel70.d.ts
│ ├── tbs.grid.panel70.d.ts.map
│ ├── tbs.grid.panel80.d.ts
│ ├── tbs.grid.panel80.d.ts.map
│ ├── tbs.grid.panel90.d.ts
│ ├── tbs.grid.panel90.d.ts.map
│ ├── tbs.grid.render.panel.info.d.ts
│ ├── tbs.grid.render.panel.info.d.ts.map
│ ├── tbs.grid.render.panel30.d.ts
│ ├── tbs.grid.render.panel30.d.ts.map
│ ├── tbs.grid.render.panel40.d.ts
│ ├── tbs.grid.render.panel40.d.ts.map
│ ├── tbs.grid.render.panel70.d.ts
│ └── tbs.grid.render.panel70.d.ts.map
├── renderer
│ ├── tbs.grid.render.button.d.ts
│ ├── tbs.grid.render.button.d.ts.map
│ ├── tbs.grid.render.checkbox.d.ts
│ ├── tbs.grid.render.checkbox.d.ts.map
│ ├── tbs.grid.render.group.d.ts
│ ├── tbs.grid.render.group.d.ts.map
│ ├── tbs.grid.render.img.d.ts
│ ├── tbs.grid.render.img.d.ts.map
│ ├── tbs.grid.render.link.d.ts
│ ├── tbs.grid.render.link.d.ts.map
│ ├── tbs.grid.render.string.d.ts
│ ├── tbs.grid.render.string.d.ts.map
│ ├── tbs.grid.render.svg.d.ts
│ ├── tbs.grid.render.svg.d.ts.map
│ ├── tbs.grid.render.tree.d.ts
│ └── tbs.grid.render.tree.d.ts.map
├── summary
│ ├── tbs.grid.footer.d.ts
│ ├── tbs.grid.footer.d.ts.map
│ ├── tbs.grid.top.d.ts
│ └── tbs.grid.top.d.ts.map
├── tbs.grid.base.d.ts
├── tbs.grid.cell.d.ts
├── tbs.grid.combo.d.ts
├── tbs.grid.configs.d.ts
├── tbs.grid.control.d.ts
├── tbs.grid.d.ts
├── tbs.grid.date.d.ts
├── tbs.grid.dom.d.ts
├── tbs.grid.filter.d.ts
├── tbs.grid.filter.layer.d.ts
├── tbs.grid.group.d.ts
├── tbs.grid.page.d.ts
├── tbs.grid.range.d.ts
├── tbs.grid.range.panel.d.ts
├── tbs.grid.row.d.ts
├── tbs.grid.scroll.base.d.ts
├── tbs.grid.scroll.d.ts
├── tbs.grid.sort.d.ts
├── tbs.grid.table.d.ts
├── tbs.grid.tree.d.ts
└── tbs.grid.types.d.ts
├── webpack.config.common.js
└── webpack.config.ts.js
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: [tobesimple7] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9 | liberapay: # Replace with a single Liberapay username
10 | issuehunt: # Replace with a single IssueHunt username
11 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12 | polar: # Replace with a single Polar username
13 | buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14 | thanks_dev: # Replace with a single thanks.dev username
15 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # [TbsGrid - Beta version](https://tobesimple.net)
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | Welcome to TbsGrid.
10 | This grid is javascript web data grid.
11 |
12 | Currently, TbsGrid is in beta.
13 | There may be minor errors.
14 | ---
15 |
16 | Thank you for visiting TbsGrid.
17 | Also, thank you for giving me a star.
18 | I will try to make a good product.
19 |
20 | - The tbs prefix was created from the first letters of 'tobesimple.net'.
21 | - The current github source and min files may be slightly different.
22 | - I am currently trying to manage the version with the beta version.
23 |
24 | ## Plans
25 |
26 | - We plan to develop with a focus on source weight reduction and memory management.
27 | - We are prioritizing the stabilization of Data Grid.
28 |
29 | ## Notable features
30 |
31 | - This grid is made with JavaScript(Module) and CSS.
32 | - It can also bind large amounts of data.
33 | - Supports cross-browser.
34 | - It has various functions such as column movement, sorting, filtering, etc.
35 |
36 |
37 |
38 | ## Getting Started
39 |
40 | ### CDN
41 | ```html
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | ```
50 | ### NPM
51 | ```js
52 | npm install tbsgrid
53 |
54 | import { tbsGridConfigs } from "tbsgrid/dist/tbsgrid-configs.js";
55 | import { TbsGrid as TbsGridComponent } from "tbsgrid";
56 | import "tbsgrid/dist/css/tbsgrid.css"
57 | ```
58 |
59 | tbs.grid.configs.js
60 |
61 | - This file is the grid initial settings file for each country's currency unit or calendar-related characters.
62 | - You can set it by country in the config file.
63 |
64 | ## Documentation & Demo
65 |
66 | - Click the link below to view the demo and documentation.
67 |
68 | * [Index Page](https://tobesimple.net)
69 | * [Getting Started](https://tobesimple.net/page70/page70_001.php)
70 | * [Globalization & Configs](https://tobesimple.net/page70/page70_003.php)
71 | * [Data binding](https://tobesimple.net/page71/page71_001.php)
72 | * [Column Types](https://tobesimple.net/page72/page72_001.php)
73 | * [Header Columns](https://tobesimple.net/page73/page73_002.php)
74 | * [Cell, Row Editor](https://tobesimple.net/page74/page74_001.php)
75 | * [User Events](https://tobesimple.net/page75/page75_001.php)
76 | * [Frozen Column,Row](https://tobesimple.net/page76/page76_001.php)
77 | * [Grouping](https://tobesimple.net/page78/page78_001.php)
78 | * [Filter Panel](https://tobesimple.net/page79/page79_001.php)
79 | * [Tree Grid](https://tobesimple.net/page81/page81_001.php)
80 | * [Paging Grid](https://tobesimple.net/page82/page82_001.php)
81 |
82 |
83 |
--------------------------------------------------------------------------------
/dist/tbsgrid-configs.js:
--------------------------------------------------------------------------------
1 | (function webpackUniversalModuleDefinition(root, factory) {
2 | if(typeof exports === 'object' && typeof module === 'object')
3 | module.exports = factory();
4 | else if(typeof define === 'function' && define.amd)
5 | define([], factory);
6 | else {
7 | var a = factory();
8 | for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9 | }
10 | })(self, function() {
11 | return /******/ (function() { // webpackBootstrap
12 | /******/ "use strict";
13 | var __webpack_exports__ = {};
14 | // This entry need to be wrapped in an IIFE because it uses a non-standard name for the exports (exports).
15 | !function() {
16 | var exports = __webpack_exports__;
17 |
18 | Object.defineProperty(exports, "__esModule", ({ value: true }));
19 | exports.tbsGridConfigs = void 0;
20 | exports.tbsGridConfigs = {};
21 | /**
22 | * Basically, the language with the fastest order is applied.
23 | */
24 | exports.tbsGridConfigs.en = {
25 | culture: {
26 | name: 'us',
27 | language: 'us',
28 | currencyChar: '$',
29 | decimalChar: '.',
30 | thousandChar: ',',
31 | },
32 | calendar: {
33 | dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
34 | dayShortNames: ['Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.'],
35 | dayPattern: 'MM-dd-yyyy',
36 | months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
37 | prevLinkName: 'prev',
38 | nextLinkName: 'next',
39 | todayLinkName: 'today'
40 | },
41 | font: {
42 | fontSize: '12px',
43 | fontFamily: 'Arial, Helvetica, sans-serif',
44 | },
45 | labels: {
46 | /* placeholder */
47 | sort_placeholder: 'Drag columns to sort',
48 | group_placeholder: 'Drag columns to group',
49 | /* Filter Label */
50 | filter_select: 'Select',
51 | filter_equal: 'Equal',
52 | filter_notEqual: 'Does not equal',
53 | filter_greater: 'Greater than',
54 | filter_greaterEqual: 'Greater than or Equal to',
55 | filter_less: 'Less than',
56 | filter_lessEqual: 'Less than or Equal to',
57 | filter_between: 'Between',
58 | filter_blank: 'Blank',
59 | filter_include: 'Include',
60 | filter_notInclude: 'Not Include',
61 | filter_startCharacter: 'Start Characters',
62 | filter_endCharacter: 'End Characters',
63 | /* Toolbar Label */
64 | toolbar_button_filter: 'Filter',
65 | toolbar_button_sorting: 'Sorting',
66 | toolbar_button_grouping: 'Grouping',
67 | toolbar_button_expand: 'Expand',
68 | toolbar_button_collapse: 'Collapse',
69 | toolbar_button_fixedColumn: 'Fixed Column',
70 | toolbar_button_reset: 'Reset',
71 | }
72 | };
73 | exports.tbsGridConfigs.ko = {
74 | culture: {
75 | name: 'ko',
76 | language: 'ko',
77 | currencyChar: '₩',
78 | decimalChar: '.',
79 | thousandChar: ',',
80 | },
81 | calendar: {
82 | dayNames: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
83 | dayShortNames: ['일', '월', '화', '수', '목', '금.', '토'],
84 | dayPattern: 'yyyy-MM-dd',
85 | months: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
86 | prevLinkName: '이전',
87 | nextLinkName: '다음',
88 | todayLinkName: '오늘'
89 | },
90 | font: {
91 | fontSize: '12px',
92 | fontFamily: 'Nanum Gothic, Arial, Helvetica, sans-serif',
93 | },
94 | labels: {
95 | /* placeholder */
96 | sort_placeholder: '소팅 컬럼을 드래그 하세요',
97 | group_placeholder: '그룹 컬럼을 드래그 하세요.',
98 | /* Filter Lables */
99 | filter_select: '[선택]',
100 | filter_equal: '같음',
101 | filter_notEqual: '같지 않음',
102 | filter_greater: '보다 큼',
103 | filter_greaterEqual: '크거나 같음',
104 | filter_less: '보다 작음',
105 | filter_lessEqual: '작거나 같음',
106 | filter_between: '범위',
107 | filter_blank: '공백',
108 | filter_include: '포함',
109 | filter_notInclude: '포함 안함',
110 | filter_startCharacter: '시작 문자',
111 | filter_endCharacter: '끝 문자',
112 | filter_placeholder: '',
113 | /* Toolbar Label */
114 | toolbar_button_filter: '필터',
115 | toolbar_button_sorting: '소팅',
116 | toolbar_button_grouping: '그룹핑',
117 | toolbar_button_expand: '펼치기',
118 | toolbar_button_collapse: '접기',
119 | toolbar_button_fixedColumn: '고정컬럼',
120 | toolbar_button_reset: '초기화',
121 | }
122 | };
123 | /**
124 | * Write options at the end
125 | */
126 | exports.tbsGridConfigs.options = {
127 | //imageRoot: 'https://cdn.jsdelivr.net/npm/tbsgrid@01.2.35/dist/assets/userImg/',
128 | isMobile: /iPhone|iPad|iPod|Android/i.test(navigator.userAgent), // true, false
129 | userAgent: navigator.userAgent, // 'safari' etc
130 | // trueValue : 'Y', // checkbox value
131 | // falseValue : 'N',
132 | // elseValue : 'N',
133 | };
134 |
135 | }();
136 | /******/ return __webpack_exports__;
137 | /******/ })()
138 | ;
139 | });
--------------------------------------------------------------------------------
/dist/userImg/0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/dist/userImg/0.png
--------------------------------------------------------------------------------
/dist/userImg/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/dist/userImg/1.png
--------------------------------------------------------------------------------
/dist/userImg/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/dist/userImg/2.png
--------------------------------------------------------------------------------
/dist/userImg/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/dist/userImg/3.png
--------------------------------------------------------------------------------
/dist/userImg/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/dist/userImg/4.png
--------------------------------------------------------------------------------
/dist/userImg/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/dist/userImg/5.png
--------------------------------------------------------------------------------
/dist/userImg/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/dist/userImg/6.png
--------------------------------------------------------------------------------
/dist/userImg/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/dist/userImg/7.png
--------------------------------------------------------------------------------
/dist/userImg/8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/dist/userImg/8.png
--------------------------------------------------------------------------------
/dist/userImg/9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/dist/userImg/9.png
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tbsgrid",
3 | "version": "0.2.18",
4 | "lockfileVersion": 3,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "tbsgrid",
9 | "version": "0.2.18",
10 | "license": "MIT",
11 | "dependencies": {
12 | "file-saver": "^2.0.5",
13 | "xlsx": "^0.18.5"
14 | }
15 | },
16 | "node_modules/adler-32": {
17 | "version": "1.3.1",
18 | "resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.3.1.tgz",
19 | "integrity": "sha512-ynZ4w/nUUv5rrsR8UUGoe1VC9hZj6V5hU9Qw1HlMDJGEJw5S7TfTErWTjMys6M7vr0YWcPqs3qAr4ss0nDfP+A==",
20 | "license": "Apache-2.0",
21 | "engines": {
22 | "node": ">=0.8"
23 | }
24 | },
25 | "node_modules/cfb": {
26 | "version": "1.2.2",
27 | "resolved": "https://registry.npmjs.org/cfb/-/cfb-1.2.2.tgz",
28 | "integrity": "sha512-KfdUZsSOw19/ObEWasvBP/Ac4reZvAGauZhs6S/gqNhXhI7cKwvlH7ulj+dOEYnca4bm4SGo8C1bTAQvnTjgQA==",
29 | "license": "Apache-2.0",
30 | "dependencies": {
31 | "adler-32": "~1.3.0",
32 | "crc-32": "~1.2.0"
33 | },
34 | "engines": {
35 | "node": ">=0.8"
36 | }
37 | },
38 | "node_modules/codepage": {
39 | "version": "1.15.0",
40 | "resolved": "https://registry.npmjs.org/codepage/-/codepage-1.15.0.tgz",
41 | "integrity": "sha512-3g6NUTPd/YtuuGrhMnOMRjFc+LJw/bnMp3+0r/Wcz3IXUuCosKRJvMphm5+Q+bvTVGcJJuRvVLuYba+WojaFaA==",
42 | "license": "Apache-2.0",
43 | "engines": {
44 | "node": ">=0.8"
45 | }
46 | },
47 | "node_modules/crc-32": {
48 | "version": "1.2.2",
49 | "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz",
50 | "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==",
51 | "license": "Apache-2.0",
52 | "bin": {
53 | "crc32": "bin/crc32.njs"
54 | },
55 | "engines": {
56 | "node": ">=0.8"
57 | }
58 | },
59 | "node_modules/file-saver": {
60 | "version": "2.0.5",
61 | "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz",
62 | "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==",
63 | "license": "MIT"
64 | },
65 | "node_modules/frac": {
66 | "version": "1.1.2",
67 | "resolved": "https://registry.npmjs.org/frac/-/frac-1.1.2.tgz",
68 | "integrity": "sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA==",
69 | "license": "Apache-2.0",
70 | "engines": {
71 | "node": ">=0.8"
72 | }
73 | },
74 | "node_modules/ssf": {
75 | "version": "0.11.2",
76 | "resolved": "https://registry.npmjs.org/ssf/-/ssf-0.11.2.tgz",
77 | "integrity": "sha512-+idbmIXoYET47hH+d7dfm2epdOMUDjqcB4648sTZ+t2JwoyBFL/insLfB/racrDmsKB3diwsDA696pZMieAC5g==",
78 | "license": "Apache-2.0",
79 | "dependencies": {
80 | "frac": "~1.1.2"
81 | },
82 | "engines": {
83 | "node": ">=0.8"
84 | }
85 | },
86 | "node_modules/wmf": {
87 | "version": "1.0.2",
88 | "resolved": "https://registry.npmjs.org/wmf/-/wmf-1.0.2.tgz",
89 | "integrity": "sha512-/p9K7bEh0Dj6WbXg4JG0xvLQmIadrner1bi45VMJTfnbVHsc7yIajZyoSoK60/dtVBs12Fm6WkUI5/3WAVsNMw==",
90 | "license": "Apache-2.0",
91 | "engines": {
92 | "node": ">=0.8"
93 | }
94 | },
95 | "node_modules/word": {
96 | "version": "0.3.0",
97 | "resolved": "https://registry.npmjs.org/word/-/word-0.3.0.tgz",
98 | "integrity": "sha512-OELeY0Q61OXpdUfTp+oweA/vtLVg5VDOXh+3he3PNzLGG/y0oylSOC1xRVj0+l4vQ3tj/bB1HVHv1ocXkQceFA==",
99 | "license": "Apache-2.0",
100 | "engines": {
101 | "node": ">=0.8"
102 | }
103 | },
104 | "node_modules/xlsx": {
105 | "version": "0.18.5",
106 | "resolved": "https://registry.npmjs.org/xlsx/-/xlsx-0.18.5.tgz",
107 | "integrity": "sha512-dmg3LCjBPHZnQp5/F/+nnTa+miPJxUXB6vtk42YjBBKayDNagxGEeIdWApkYPOf3Z3pm3k62Knjzp7lMeTEtFQ==",
108 | "license": "Apache-2.0",
109 | "dependencies": {
110 | "adler-32": "~1.3.0",
111 | "cfb": "~1.2.1",
112 | "codepage": "~1.15.0",
113 | "crc-32": "~1.2.1",
114 | "ssf": "~0.11.2",
115 | "wmf": "~1.0.1",
116 | "word": "~0.3.0"
117 | },
118 | "bin": {
119 | "xlsx": "bin/xlsx.njs"
120 | },
121 | "engines": {
122 | "node": ">=0.8"
123 | }
124 | }
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tbsgrid",
3 | "version": "0.2.40",
4 | "description": "",
5 | "author": "tobesimple7",
6 | "license": "MIT",
7 | "homepage": "https://tobesimple.net",
8 | "repository": "https://github.com/tobesimple7/TbsGrid",
9 | "dependencies": {
10 | "file-saver": "^2.0.5",
11 | "xlsx": "^0.18.5"
12 | },
13 | "files": [
14 | "dist/*", "types/*"
15 | ],
16 | "scripts": {
17 | "test": "echo \"Error: no test specified\" && exit 1",
18 | "ts": "webpack --config ./webpack.config.ts.js"
19 | },
20 | "main": "./dist/tbsgrid.min.js",
21 | "module": "./dist/tbsgrid.min.js",
22 | "types": "./dist/types/**/*",
23 | "exports": {
24 | ".": {
25 | "import": "./dist/tbsgrid.min.js",
26 | "default": "./dist/tbsgrid.min.js"
27 | },
28 | "./package.json": "./package.json",
29 | "./dist/tbsgrid-configs.js": "./dist/tbsgrid-configs.js",
30 | "./dist/css/*": {
31 | "import": "./dist/assets/css/*",
32 | "require": "./dist/assets/css/*"
33 | },
34 | "./dist/userImg/*": {
35 | "import": "./dist/assets/userImg/*",
36 | "require": "./dist/assets/userImg/*"
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/package_20240927.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "tbsgrid_test",
3 | "version": "0.0.11",
4 | "description": "",
5 | "author": "tobesimple7",
6 | "license": "MIT",
7 | "homepage": "https://tobesimple.net",
8 | "repository": "https://github.com/tobesimple7/TbsGrid",
9 | "dependencies": {
10 | "file-saver": "^2.0.5",
11 | "mobile-detect": "^1.4.5"
12 | },
13 | "files": [
14 | "dist/*", "dist-js/*"
15 | ],
16 | "scripts": {
17 | "test": "echo \"Error: no test specified\" && exit 1"
18 | },
19 | "main": "./dist/tbsgrid.min.js",
20 | "module": "./dist/tbsgrid.min.js",
21 | "exports": {
22 | ".": {
23 | "import": "./dist/tbsgrid.min.js",
24 | "default": "./dist/tbsgrid.min.js"
25 | },
26 | "./package.json": "./package.json",
27 | "./dist/tbsgrid-configs.js": "./dist/tbsgrid-configs.js"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/assets/userImg/0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src/assets/userImg/0.png
--------------------------------------------------------------------------------
/src/assets/userImg/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src/assets/userImg/1.png
--------------------------------------------------------------------------------
/src/assets/userImg/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src/assets/userImg/2.png
--------------------------------------------------------------------------------
/src/assets/userImg/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src/assets/userImg/3.png
--------------------------------------------------------------------------------
/src/assets/userImg/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src/assets/userImg/4.png
--------------------------------------------------------------------------------
/src/assets/userImg/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src/assets/userImg/5.png
--------------------------------------------------------------------------------
/src/assets/userImg/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src/assets/userImg/6.png
--------------------------------------------------------------------------------
/src/assets/userImg/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src/assets/userImg/7.png
--------------------------------------------------------------------------------
/src/assets/userImg/8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src/assets/userImg/8.png
--------------------------------------------------------------------------------
/src/assets/userImg/9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src/assets/userImg/9.png
--------------------------------------------------------------------------------
/src/base/tbs.grid.base.columns.ts:
--------------------------------------------------------------------------------
1 | import {ColumnAlias} from "../tbs.grid.types";
2 | import {TbsGrid} from "../tbs.grid";
3 |
4 | export class TbsGridBaseColumns {
5 |
6 | constructor() {
7 | }
8 |
9 | /**
10 | * Column Functions
11 | */
12 |
13 | setFixedColumn(this: TbsGrid, fixedColumnIndex: number) { this.classColumn.setFixedColumn(fixedColumnIndex); }
14 |
15 | removeFixedColumn(this: TbsGrid) { this.classColumn.removeFixedColumn(); }
16 |
17 |
18 | /**
19 | * Columns API.
20 | */
21 |
22 | getColumn(this: TbsGrid, name: string, table?) { return this.isNull(table, this.column_table).selectRow(ColumnAlias.name, name); }
23 |
24 | getColumns(this: TbsGrid, table?: any) { return this.isNull(table, this.column_table).select(); }
25 |
26 | getColumnByIndex(this: TbsGrid, columnIndex: number, table?: any) { return this.isNull(table, this.column_table).selectRowByRowIndex(columnIndex); }
27 |
28 | getColumnName(this: TbsGrid, columnIndex: number, table?: any) { return this.isNull(table, this.column_table).selectValue(columnIndex, ColumnAlias.name); }
29 |
30 | getColumnIndex(this: TbsGrid, columnName: string, table?: any) { return this.isNull(table, this.column_table).selectRowIndex(ColumnAlias.name, columnName); }
31 |
32 | setColumn(this: TbsGrid, columnName: string, property: string, value: any, table?: any) { this.isNull(table, this.column_table).updateRow(columnName, property, value); }
33 |
34 | /**
35 | * Filter Columns
36 | */
37 |
38 | getFilterColumn(this: TbsGrid, columnName: string) { return this.getColumn(columnName, this.filter_column_table); }
39 |
40 | getFilterColumnName(this: TbsGrid, columnIndex: number): string { return this.getColumnName(columnIndex, this.filter_column_table); }
41 |
42 | getFilterColumnIndex(this: TbsGrid, columnName: string): number { return this.getColumnIndex(columnName, this.filter_column_table); }
43 |
44 | /**
45 | * Columns API
46 | */
47 |
48 | setTopColumns(this: TbsGrid, topColumns) { this.classTop.setTopColumns(topColumns); }
49 |
50 | setFooterColumns(this: TbsGrid, footerColumns) { this.classFooter.setFooterColumns(footerColumns); }
51 |
52 | /**
53 | * Header Columns API.
54 | */
55 |
56 | getHeaderColumn(this: TbsGrid, rowIndex: number, columnIndex: number) { return this.classHeader.getHeaderColumn(rowIndex, columnIndex); }
57 |
58 | getHeaderColumnByNumber(this: TbsGrid, num) { return this.classHeader.getHeaderColumnByNumber(num); }
59 |
60 | addColumn(this: TbsGrid, addColumn: any, targetColumnIndex: number, orderType: string) { this.classColumn.addColumn(addColumn, targetColumnIndex, orderType);}
61 |
62 | removeColumn(this: TbsGrid, targetColumnIndex: number) { this.classColumn.removeColumn(targetColumnIndex); }
63 |
64 | setHeaderProperty(this: TbsGrid, rowIndex: number, colIndex: number, property: string, value: any) { this.classHeader.setHeaderProperty(rowIndex, colIndex, property, value); }
65 |
66 |
67 | }
--------------------------------------------------------------------------------
/src/base/tbs.grid.base.ts:
--------------------------------------------------------------------------------
1 | import {GridOption} from '../tbs.grid.types';
2 | import {TbsBase} from '../tbs.base';
3 | import {TbsDatabase, DataTableType} from '../database/tbs.database';
4 | import {TbsDataTable} from '../database/tbs.data.table';
5 | import {tbsGridConfigs} from "../tbs.grid.configs";
6 | import {TbsDataArrayTable} from "../database/tbs.data.array.table";
7 |
8 | export class TbsGridBase extends TbsBase {
9 | gridId: string;
10 | gridConfig: object;
11 | grid_mode: string;
12 | mousePointRange: number;
13 |
14 | isMobile: boolean;
15 | userAgent: string;
16 |
17 | columns: any;
18 | headerColumnTable: any[];
19 |
20 | renderer = null;
21 | infoRenderer = null;
22 |
23 | db: TbsDatabase;
24 |
25 | // field_table: TbsDataTable;
26 | header_column_table: TbsDataArrayTable;
27 | column_table: TbsDataTable;
28 | top_column_table: TbsDataTable;
29 | footer_column_table: TbsDataTable;
30 | sort_column_table: TbsDataTable;
31 | filter_column_table: TbsDataTable;
32 | group_column_table: TbsDataTable;
33 | source_table: TbsDataTable;
34 | view_table: TbsDataTable;
35 | group_table: TbsDataTable;
36 | group_header_table: TbsDataTable;
37 | tree_table: TbsDataTable;
38 | page_table: TbsDataTable;
39 | top_table: TbsDataTable;
40 | footer_table: TbsDataTable;
41 | temp_table: TbsDataTable;
42 |
43 | data_update: any[];
44 | data_insert: any[];
45 | data_delete: any[];
46 |
47 | info_column_table: TbsDataTable;
48 |
49 | panel21_table: TbsDataTable;
50 | panel20_table: TbsDataTable;
51 | panel31_table: TbsDataTable;
52 |
53 | cell_template_table: TbsDataTable;
54 |
55 | data_select_panel30: object[];
56 | data_select_panel31: object[];
57 |
58 | pageRowCount: number;
59 | pageIntRowCount: number;
60 |
61 | startRowIndex: number;
62 | startCellIndex: number;
63 | lastRowIndex: number;
64 | lastCellIndex: number;
65 |
66 | _startRowIndex: number;
67 | _startCellIndex: number;
68 | _lastRowIndex: number;
69 | _lastCellIndex: number;
70 |
71 | selectRangeArray: any[];
72 |
73 | startX: number;
74 | startY: number;
75 | lastX: number;
76 | lastY: number;
77 |
78 | const_filterValue: string;
79 | const_filterType : string;
80 | const_filterReset: string;
81 | const_filterSave : string;
82 |
83 | headerRowCount: number;
84 |
85 | fixedColumnIndex: number;
86 | headerRowHeight: number;
87 | rowHeight: number;
88 | topRowHeight: number;
89 | footerRowHeight: number;
90 |
91 | debug_mode: boolean;
92 | code_horizontal: string;
93 | code_vertical : string;
94 |
95 | constructor(gridId: string, gridConfigs: object) {
96 | super();
97 | this.gridId = gridId;
98 | this.gridConfig = gridConfigs ?
99 | gridConfigs[Object.keys(gridConfigs)[0]] : tbsGridConfigs[Object.keys(tbsGridConfigs)[0]];
100 | this.grid_mode = '';
101 | this.mousePointRange = 15;
102 |
103 | /**
104 | * @description mobile, user agent
105 | *
106 | */
107 | this.isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
108 | this.userAgent = navigator.userAgent; // 'safari' etc
109 |
110 | /**
111 | * columns, headerColumnTable
112 | */
113 |
114 | this.columns = [];
115 | this.headerColumnTable = [];
116 |
117 | this.renderer = null;
118 | this.infoRenderer = null;
119 |
120 | /**
121 | * create database
122 | */
123 | this.db = new TbsDatabase();
124 |
125 | // this.field_table = this.db.createTable('field');
126 |
127 | this.header_column_table= this.db.createArrayTable('header_column');
128 |
129 | this.column_table = this.db.createTable('column');
130 | this.top_column_table = this.db.createTable('top_column');
131 | this.footer_column_table= this.db.createTable('footer_column');
132 | this.sort_column_table = this.db.createTable('sort_column');
133 | this.filter_column_table= this.db.createTable('filter_column');
134 | this.group_column_table = this.db.createTable('group_column');
135 |
136 | this.source_table = this.db.createTable('source');
137 | this.view_table = this.db.createView('view');
138 |
139 | this.group_table = this.db.createView('group');
140 | this.group_header_table = this.db.createView('group_header');
141 |
142 | this.tree_table = this.db.createView('tree');
143 | this.page_table = this.db.createView('page');
144 |
145 | this.top_table = this.db.createTable('top');
146 | this.footer_table = this.db.createTable('footer');
147 |
148 | this.temp_table = this.db.createTable('temp');
149 |
150 | this.data_update = [];
151 | this.data_insert = [];
152 | this.data_delete = [];
153 |
154 | /**
155 | * create info table
156 | */
157 |
158 | this.info_column_table = this.db.createTable('info_column');
159 |
160 | this.info_column_table.insert({ name: 'num' , type: 'number' , align: 'center', width: 50, visible: true });
161 | this.info_column_table.insert({ name: 'mode' , type: 'string' , align: 'center', width: 20, visible: false });
162 | this.info_column_table.insert({ name: 'checkbox', type: 'checkbox', align: 'center', width: 25, visible: false, editable: true });
163 |
164 | this.panel21_table = this.db.createView('panel21');
165 | this.panel20_table = this.db.createView('panel20');
166 | this.panel31_table = this.db.createView('panel31');
167 |
168 | /**
169 | * cell template table
170 | */
171 | this.cell_template_table = this.db.createTable('cellTemplate');
172 |
173 | this.cell_template_table.insert({ type: 'checkbox', cellTemplate: 1, children: ['checkbox', 'string'] }); //default
174 | this.cell_template_table.insert({ type: 'checkbox', cellTemplate: 2, children: ['string', 'checkbox'] });
175 |
176 | this.cell_template_table.insert({ type: 'group', cellTemplate: 1, children: ['icon', 'string'] });
177 | this.cell_template_table.insert({ type: 'group', cellTemplate: 2, children: ['icon', 'img', 'string'] });
178 |
179 | this.cell_template_table.insert({ type: 'tree', cellTemplate: 1, children: ['icon', 'string'] });
180 | this.cell_template_table.insert({ type: 'tree', cellTemplate: 2, children: ['icon', 'img', 'string'] });
181 |
182 | /**
183 | * @description selection data
184 | *
185 | */
186 |
187 | this.data_select_panel30 = [];
188 | this.data_select_panel31 = [];
189 |
190 | /**
191 | * @description Row Count / Select Range
192 | *
193 | */
194 | this.pageRowCount = 0;
195 | this.pageIntRowCount = 0;
196 |
197 | this.startRowIndex = -1;
198 | this.startCellIndex = -1;
199 | this.lastRowIndex = -1;
200 | this.lastCellIndex = -1;
201 |
202 | this._startRowIndex = -1;
203 | this._startCellIndex = -1;
204 | this._lastRowIndex = -1;
205 | this._lastCellIndex = -1;
206 |
207 | this.selectRangeArray = [];
208 |
209 | this.startX = 0;
210 | this.startY = 0;
211 | this.lastX = 0;
212 | this.lastY = 0;
213 |
214 | this.const_filterValue = 'value';
215 | this.const_filterType = 'type';
216 | this.const_filterReset = 'Reset';
217 | this.const_filterSave = 'Save';
218 |
219 | this.headerRowCount = 0;
220 |
221 | /**
222 | * @description layout
223 | *
224 | */
225 | this.fixedColumnIndex = -1;
226 |
227 | /**
228 | * @description constant value
229 | *
230 | */
231 | this.headerRowHeight = 25;
232 | this.rowHeight = 25;
233 | this.topRowHeight = 25;
234 | this.footerRowHeight = 25;
235 |
236 | /**
237 | * @description code
238 | *
239 | */
240 | this.debug_mode = true;
241 | this.code_horizontal = 'horizontal';
242 | this.code_vertical = 'vertical';
243 | }
244 | }
245 |
246 |
247 |
248 |
--------------------------------------------------------------------------------
/src/base/tbs.grid.base.user.event.ts:
--------------------------------------------------------------------------------
1 | export class TbsGridBaseUserEvent {
2 | onClick: any;
3 | onDblclick: any;
4 | onEdit: any;
5 | onClickCheckbox: any;
6 | onClickInfoCheckBox: any;
7 | onClickButton: any;
8 | onClickLink: any;
9 | onRowBounding: any;
10 |
11 | onClickPage: any;
12 | onChangePageRowCount: any;
13 |
14 | onClickPageFirst: any;
15 | onClickPagePrev: any;
16 | onClickPageIndex: any;
17 | onClickPageNext: any;
18 | onClickPageLast: any;
19 |
20 | constructor() {
21 | /**
22 | * user event
23 | */
24 |
25 | this.onClick = null; // (grid, row)
26 |
27 | this.onDblclick = null; // (grid, row)
28 |
29 | this.onEdit = null; // (grid, state, row)
30 |
31 | this.onClickCheckbox = null; // (grid, row)
32 |
33 | this.onClickInfoCheckBox = null; // (grid, row)
34 |
35 | this.onClickButton = null; // (grid, row)
36 |
37 | this.onClickLink = null; // (grid, row)
38 |
39 | this.onRowBounding = null; // grid, element, row
40 |
41 | this.onClickPage = null;
42 |
43 | this.onChangePageRowCount = null;
44 |
45 | this.onClickPageFirst = null; // (grid, pageIndex, selectedPageCount, userFunction)
46 |
47 | this.onClickPagePrev = null; // (grid, pageIndex, selectedPageCount, userFunction)
48 |
49 | this.onClickPageIndex = null; // (grid, pageIndex, selectedPageCount, userFunction)
50 |
51 | this.onClickPageNext = null; // (grid, pageIndex, selectedPageCount, userFunction)
52 |
53 | this.onClickPageLast = null; // (grid, pageIndex, selectedPageCount, userFunction)
54 | }
55 | }
--------------------------------------------------------------------------------
/src/database/tbs.data.array.table.ts:
--------------------------------------------------------------------------------
1 |
2 | import {TbsBase} from "../tbs.base";
3 | import {ColumnAlias} from "../tbs.grid.types";
4 |
5 |
6 |
7 | export class TbsDataArrayTable extends TbsBase {
8 |
9 | tableName: string;
10 | data: object[][];
11 | currentRowId: number;
12 | type: string;
13 |
14 | constructor(tableName: string) {
15 | super();
16 | this.tableName = tableName;
17 | this.data = [];
18 | this.currentRowId = -1;
19 | this.type = 'table';
20 | }
21 |
22 | /**
23 | * select functions
24 | */
25 | selectRows(arrayIndex: any, field: any, value: any, topIndex?: any) {
26 | let result: object[] = [];
27 | for (let i = 0, len = this.data[arrayIndex].length; i < len; i++) {
28 | let dataRow = this.data[arrayIndex][i];
29 | if (dataRow[field] == value) {
30 | result.push(dataRow);
31 | if (topIndex != undefined) {
32 | if (result.length == topIndex) break;
33 | }
34 | }
35 | }
36 | return result;
37 | }
38 |
39 | selectRow(arrayIndex: any, field: any, value: any) {
40 | let dataRows = this.selectRows(arrayIndex, field, value, 1);
41 | return dataRows.length > 0 ? dataRows[0] : null;
42 | }
43 |
44 | selectRowByRowIndex(arrayIndex: any, rowIndex: any) { return this.data[arrayIndex][rowIndex]; }
45 |
46 | selectRowByRowId(arrayIndex: any, rowId: any) {
47 | let dataRows = this.selectRows(arrayIndex, ColumnAlias.rowId, rowId, 1);
48 | return dataRows.length > 0 ? dataRows[0] : null;
49 | }
50 |
51 | selectRowIndexByRowId(arrayIndex: any, rowId: any) { return this.selectRowIndex(arrayIndex, ColumnAlias.rowId, rowId); }
52 |
53 | selectRowIndex(arrayIndex: any, field: any, value: any) {
54 | let result = null;
55 | for (let i = 0, len = this.data[arrayIndex].length; i < len; i++) {
56 | let dataRow = this.data[arrayIndex][i];
57 | if (dataRow[field] == value) { result = i; break; }
58 | }
59 | return result;
60 | }
61 |
62 | selectRowIdByRowIndex(arrayIndex: any, rowIndex: any) {
63 | const dataRow = this.selectRowByRowIndex(arrayIndex, rowIndex);
64 | return dataRow[ColumnAlias.rowId];
65 | }
66 |
67 | selectRowRange(arrayIndex: any, startRowIndex: any, endRowIndex: any) {
68 | if (endRowIndex == undefined) endRowIndex = this.count() - 1
69 |
70 | const result = [];
71 | for (let i = startRowIndex; i <= endRowIndex; i++) result.push(this.data[i]);
72 | return result;
73 | }
74 |
75 | selectValue(arrayIndex: any, rowIndex: any, field: any) {
76 | return this.data[arrayIndex][rowIndex][field];
77 | }
78 |
79 | isRow(arrayIndex: any, field: any, value: any) {
80 | let dataRows = this.selectRows(arrayIndex, field, value, 1);
81 | return dataRows.length > 0;
82 | }
83 |
84 | /**
85 | * Insert
86 | */
87 | insertRows(arrayIndex: any, dataRows: any) {
88 | if (this.type == 'table') {
89 | dataRows.map(dataRow => {
90 | this.currentRowId += 1;
91 | dataRow[ColumnAlias.rowId] = this.currentRowId;
92 | dataRow[ColumnAlias.rowMode] = '';
93 | });
94 | }
95 | if (this.null(this.data[arrayIndex])) this.data[arrayIndex] = [];
96 | this.data[arrayIndex].push(...dataRows);
97 | }
98 |
99 | insertRowsBefore(arrayIndex: any, dataRows: any, rowIndex: any) {
100 | if (this.type == 'table') {
101 | dataRows.map(dataRow => {
102 | this.currentRowId += 1;
103 | dataRow[ColumnAlias.rowId] = this.currentRowId;
104 | dataRow[ColumnAlias.rowMode] = '';
105 | });
106 | }
107 | if (this.null(this.data[arrayIndex])) this.data[arrayIndex] = [];
108 | if (rowIndex < this.data[arrayIndex].length) this.data[arrayIndex].splice(rowIndex, 0, ...dataRows);
109 | else this.data[arrayIndex].push(...dataRows);
110 | }
111 |
112 | insertRowsAfter(arrayIndex: any, dataRows: any, rowIndex: any) {
113 | if (this.type == 'table') {
114 | dataRows.map(dataRow => {
115 | this.currentRowId += 1;
116 | dataRow[ColumnAlias.rowId] = this.currentRowId;
117 | dataRow[ColumnAlias.rowMode] = '';
118 | });
119 | }
120 | if (this.null(this.data[arrayIndex])) this.data[arrayIndex] = [];
121 | if (rowIndex + 1 < this.data[arrayIndex].length) this.data[arrayIndex].splice(rowIndex + 1, 0, ...dataRows);
122 | else this.data[arrayIndex].push(...dataRows);
123 | }
124 |
125 | insert(arrayIndex: any, dataRow: any) {
126 | if (this.type == 'table') {
127 | this.currentRowId += 1;
128 | dataRow[ColumnAlias.rowId] = this.currentRowId;
129 | dataRow[ColumnAlias.rowMode] = '';
130 | }
131 | if (this.null(this.data[arrayIndex])) this.data[arrayIndex] = [];
132 |
133 | this.data[arrayIndex].push(dataRow);
134 | }
135 |
136 | insertBefore(arrayIndex: any, dataRow: any, rowIndex: any) {
137 | if (this.type == 'table') {
138 | this.currentRowId += 1;
139 | dataRow[ColumnAlias.rowId] = this.currentRowId;
140 | dataRow[ColumnAlias.rowMode] = '';
141 | }
142 | if (this.null(this.data[arrayIndex])) this.data[arrayIndex] = [];
143 |
144 | if (rowIndex < this.data[arrayIndex].length) this.data[arrayIndex].splice(rowIndex, 0, dataRow);
145 | else this.data[arrayIndex].push(dataRow);
146 | }
147 |
148 | insertAfter(arrayIndex: any, dataRow: any, rowIndex: any) {
149 | if (this.type == 'table') {
150 | this.currentRowId += 1;
151 | dataRow[ColumnAlias.rowId] = this.currentRowId;
152 | dataRow[ColumnAlias.rowMode] = '';
153 | }
154 | if (this.null(this.data[arrayIndex])) this.data[arrayIndex] = [];
155 | if (rowIndex + 1 < this.data[arrayIndex].length) this.data[arrayIndex].splice(rowIndex + 1, 0, dataRow);
156 | else this.data[arrayIndex].push(dataRow);
157 | }
158 |
159 | /**
160 | * Remove
161 | */
162 | remove(arrayIndex?: any, rowIndex?: any) {
163 | if (arguments.length == 2) this.data[arrayIndex].splice(rowIndex, 1);
164 | else if (arguments.length == 1) this.data[arrayIndex] = [];
165 | else this.data = [];
166 | }
167 |
168 | removeByRowId(arryIndex: any, rowId: any) {
169 | let rowIndex = this.selectRowIndex(arryIndex, ColumnAlias.rowId, rowId);
170 | if (this.notNull(rowIndex)) this.remove(rowIndex);
171 | }
172 |
173 | /**
174 | * Update
175 | */
176 |
177 | update(arrayIndex: any, columnName: any, field: any, value: any) {
178 | let dataRows = this.selectRows(arrayIndex, ColumnAlias.name, columnName);
179 | dataRows.map(dataRow => dataRow[field] = value);
180 | }
181 | updateRow(arrayIndex: any, columnName: any, field: any, value: any) {
182 | let dataRows = this.selectRows(arrayIndex, ColumnAlias.name, columnName);
183 | dataRows.map(dataRow => dataRow[field] = value);
184 | }
185 | updateByRowIndex(arrayIndex: any, rowIndex: any, name: any, value: any) {
186 | let dataRow = this.data[arrayIndex][rowIndex];
187 | dataRow[name] = value;
188 | }
189 |
190 | updateByRowId(arrayIndex: any, rowId: any, name: any, value: any) {
191 | let dataRow = this.selectRowByRowId(arrayIndex, rowId);
192 | dataRow[name] = value;
193 | }
194 |
195 | count(arrayIndex?: any, field?: any, value?: any) : number {
196 | if (arguments.length == 3) {
197 | return this.selectRows(arrayIndex, field, value).length;
198 | }
199 | else if (arguments.length == 1) {
200 | return this.data[arrayIndex].length;
201 | }
202 | else {
203 | return this.data.length;
204 | }
205 | }
206 |
207 | makeColIndex () : void {
208 | for (let i = 0; i < this.count(); i++) {
209 | const columns = this.data[i];
210 | columns.map((column: any, index: any) => column[ColumnAlias.colIndex] = index);
211 | }
212 | }
213 | }
--------------------------------------------------------------------------------
/src/database/tbs.data.cell.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 | export class TbsDataCell {
4 |
5 | constructor() {}
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/src/database/tbs.data.row.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 | export class TbsDataRow {
4 |
5 | constructor() {}
6 |
7 | /**
8 | * select functions
9 | */
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/src/database/tbs.database.ts:
--------------------------------------------------------------------------------
1 | import {TbsBase} from '../tbs.base';
2 | import {TbsDataTable} from "./tbs.data.table";
3 | import {TbsDataArrayTable} from "./tbs.data.array.table";
4 |
5 | export type DataTableType = TbsDataTable | TbsDataArrayTable;
6 |
7 | export class TbsDatabase extends TbsBase {
8 | tables: DataTableType[];
9 |
10 | constructor() {
11 | super();
12 | this.tables = [];
13 | }
14 |
15 | createTable(tableName: string): TbsDataTable {
16 | const table = new TbsDataTable(tableName);
17 | table.type = 'table';
18 | this.tables.push(table);
19 |
20 | return this.getTable(tableName) as TbsDataTable;
21 | }
22 |
23 | createView(tableName: string): TbsDataTable {
24 | const table = new TbsDataTable(tableName);
25 | table.type = 'view';
26 | this.tables.push(table);
27 |
28 | return this.getTable(tableName) as TbsDataTable;
29 | }
30 |
31 | createArrayTable(tableName: string): TbsDataArrayTable {
32 | const table = new TbsDataArrayTable(tableName);
33 | table.type = 'table';
34 | this.tables.push(table);
35 |
36 | return this.getTable(tableName) as TbsDataArrayTable;
37 | }
38 |
39 | removeTable(tableName: string): void {
40 | for (let i = 0, len = this.tables.length; i < len; i++) {
41 | const table: DataTableType = this.tables[i];
42 | if (table!.tableName === tableName) {
43 | this.tables.splice(i, 1);
44 | break;
45 | }
46 | }
47 | }
48 |
49 | getTable(tableName: string): DataTableType {
50 | let result: DataTableType = null;
51 | for (let i: number = 0, len: number = this.tables.length; i < len; i++) {
52 | const table: DataTableType = this.tables[i];
53 | if (table!.tableName == tableName) {
54 | result = table;
55 | break;
56 | }
57 | }
58 | return result;
59 | }
60 | }
61 |
62 |
--------------------------------------------------------------------------------
/src/layer/tbs.grid.combo.ts:
--------------------------------------------------------------------------------
1 |
2 | import {TbsGrid} from "../tbs.grid";
3 | import {CellType, ColumnAlias} from "../tbs.grid.types";
4 |
5 |
6 | export class TbsGridCombo {
7 | colType: any;
8 | grid: TbsGrid;
9 | gridId: string;
10 | column: object;
11 | input: HTMLInputElement;
12 | input_code: HTMLInputElement;
13 |
14 | constructor(grid: TbsGrid, column: any, input: any, input_code: any) {
15 | this.colType = CellType.combo;
16 | this.grid = grid;
17 | this.gridId = grid.gridId;
18 | this.column = column;
19 | this.input = input;
20 | this.input_code = input_code;
21 |
22 | this.create();
23 | }
24 |
25 | create() {
26 | let selector = `#${this.grid.gridId}`;
27 |
28 | let div = document.createElement('div');
29 | div.className = 'tbs-grid-input-combo';
30 | div.style.display = 'none';
31 | let s = '';
32 | s += '';
45 | document.querySelector(`${selector} .tbs-grid-input-layer-panel`).innerHTML = s;
46 |
47 | const inputPanel: HTMLElement = document.querySelector(`${selector} .tbs-grid-input-layer-panel`);
48 | inputPanel.style.width = '140px';
49 | inputPanel.style.height = '130px';
50 |
51 | const inputRect = this.input.getBoundingClientRect();
52 |
53 | let top = inputRect.top;
54 | let left = inputRect.left;
55 | let right = inputRect.right;
56 | let height = inputRect.height;
57 |
58 | let documentRect =document.documentElement.getBoundingClientRect();
59 | let documentRight = documentRect.right;
60 | let documentBottom = documentRect.bottom;
61 |
62 | if (left + 140 > documentRight) {
63 | const el: HTMLElement = document.querySelector(`${selector} .tbs-grid-input-layer-panel`);
64 | el.style.left = `${right - 140}px`;
65 | }
66 | else {
67 | const el: HTMLElement = document.querySelector(`${selector} .tbs-grid-input-layer-panel`);
68 | el.style.left = `${left}px`;
69 | }
70 | if (top + height + 130 > documentBottom) {
71 | const el: HTMLElement = document.querySelector(`${selector} .tbs-grid-input-layer-panel`);
72 | el.style.top = `${top - 130}px`;
73 | }
74 | else {
75 | const el: HTMLElement = document.querySelector(`${selector} .tbs-grid-input-layer-panel`);
76 | el.style.top = `${top + height}px`;
77 | }
78 | this.setData();
79 | this.AddEvent();
80 | }
81 |
82 | clear() {
83 | let selector = `#${this.grid.gridId}`;
84 |
85 | if (document.querySelector(`${selector} .tbs-grid-input-combo-select`)) {
86 | const el: HTMLSelectElement = document.querySelector(`${selector} .tbs-grid-input-combo-select`);
87 | el.options.length = 0;
88 | }
89 | }
90 |
91 | setData() {
92 | let selector = `#${this.grid.gridId}`;
93 | const grid = this.grid;
94 | this.clear();
95 |
96 | const input_combo: HTMLSelectElement = document.querySelector(selector + ' .tbs-grid-input-combo-select');
97 |
98 | let cellIndex = this.input.dataset.columnIndex;
99 |
100 | const column = grid.column_table.data[cellIndex];
101 | let columnName = column[ColumnAlias.name];
102 | const data = grid.renderer[columnName].data;
103 | let key = data.valueName;
104 | let val = data.textName;
105 |
106 | let value = this.input.value;
107 | let eCount = 0;
108 |
109 | input_combo.options.length = 0;
110 |
111 | for (let i = 0, len = data.rows.length; i < len; i++) {
112 | const row = data.rows[i];
113 | const option = document.createElement('option');
114 | option.value = row[key];
115 | option.text = row[val];
116 | option.classList.add('tbs-grid-input-combo-option');
117 | input_combo.append(option);
118 | eCount = 1;
119 | }
120 | }
121 |
122 | AddEvent() {
123 | let selector = '#' + this.grid.gridId;
124 | const grid = this.grid;
125 | let input = this.input;
126 | let input_code = this.input_code;
127 | const changeEvent= e => {
128 | const combo: HTMLSelectElement = document.querySelector(`${selector} .tbs-grid-input-combo-select`);
129 | input.value = combo.selectedOptions[0].text;
130 | input_code.value = combo.selectedOptions[0].value;
131 | grid.input_focus();
132 | this.destroy();
133 | }
134 | document.querySelector(`${selector} .tbs-grid-input-combo-select`).addEventListener('change', changeEvent);
135 | }
136 |
137 | destroy() {
138 | let selector = `#${this.grid.gridId}`;
139 |
140 | (document.querySelector(`${selector} .tbs-grid-input-layer-panel`) as HTMLInputElement).innerHTML = '';
141 | (document.querySelector(`${selector} .tbs-grid-input-layer-panel`) as HTMLInputElement).style.width = '0px';
142 | (document.querySelector(`${selector} .tbs-grid-input-layer-panel`) as HTMLInputElement).style.left = '70000px';
143 | }
144 | };
145 |
146 |
147 |
--------------------------------------------------------------------------------
/src/page/tbs.grid.page.ts:
--------------------------------------------------------------------------------
1 | import {TbsGrid} from "../tbs.grid";
2 | import {ColumnAlias, GridMode} from "../tbs.grid.types";
3 |
4 | export class TbsGridPage {
5 | grid: TbsGrid;
6 | selector: string;
7 |
8 | pageIndex: number;
9 | pageCount: number;
10 | //pageRowCount: number;
11 | pageTotalRowCount: number;
12 |
13 | constructor(grid: TbsGrid) {
14 | this.grid = grid;
15 | this.selector = `#${grid.gridId}`;
16 |
17 | this.pageIndex = 0;
18 | this.pageCount = 0;
19 | //this.pageRowCount = 0;
20 | this.pageTotalRowCount = 0;
21 | }
22 |
23 | setPageData2() {
24 | const selector = this.selector;
25 | const grid = this.grid;
26 |
27 | if (grid.grid_mode != GridMode.page) return;
28 | if (grid.page_table.count() == 0) return;
29 |
30 | let pageRowCount = grid.options.pageRowCount;
31 |
32 | this.pageTotalRowCount = grid.page_table.count();
33 | this.pageCount = Math.ceil(grid.page_table.count() / pageRowCount);
34 |
35 | if (this.pageIndex == 0) this.pageIndex = 1;
36 |
37 | if (this.pageIndex < 1) this.pageIndex = 1;
38 | else if (this.pageIndex > this.pageCount) this.pageIndex = this.pageCount;
39 |
40 | grid.startRowIndex = (this.pageIndex - 1) * pageRowCount;
41 | grid.lastRowIndex = grid.startRowIndex + pageRowCount - 1;
42 |
43 | if (grid.lastRowIndex > grid.page_table.count() - 1) grid.lastRowIndex = grid.page_table.count() - 1;
44 |
45 | grid.view_table.remove();
46 | for (let i = grid.startRowIndex; i <= grid.lastRowIndex; i++) {
47 | const row = grid.page_table.data[i];
48 | grid.view_table.insert(grid.copyJson(row));
49 | }
50 | }
51 | setPageData(data: any[], isFirst: boolean = false) {
52 | let selector = this.selector;
53 | const grid = this.grid;
54 |
55 | if (data == undefined) return;
56 |
57 | if (isFirst) {
58 | grid.source_table.remove();
59 | grid.view_table.remove();
60 | grid.page_table.remove();
61 | grid.data_select_panel30 = [];
62 | grid.data_select_panel31 = [];
63 |
64 | for (let i = 0, len = data.length; i < len; i++) {
65 | const dataRow = data[i];
66 |
67 | const source = {};
68 | const columns: any[] = grid.column_table.selectRows();
69 | for (let x = 0, len = columns.length; x < len; x++) {
70 | const column = columns[x];
71 | let columnName = column[ColumnAlias.name];
72 | source[columnName] = grid.null(dataRow[columnName]) ? null : grid.getFormatValue(column, dataRow[columnName]);
73 | }
74 |
75 | grid.source_table.insert(source);
76 | }
77 |
78 | grid.source_table.data.map(dataRow => grid.view_table.insert(grid.copyJson(dataRow)));
79 |
80 | /* Filter */
81 | grid.classFilter.filters();
82 |
83 | /* Sorting */
84 | grid.classSort.orderBy();
85 |
86 | /**
87 | * pageIndex
88 | */
89 |
90 | grid.view_table.data.map(dataRow => grid.page_table.insert(grid.copyJson(dataRow)));
91 | this.setPageData2();
92 | }
93 | else {
94 | grid.view_table.remove();
95 | grid.page_table.remove();
96 |
97 | grid.source_table.data.map(dataRow => grid.view_table.insert(grid.copyJson(dataRow)));
98 |
99 | /* Filter */
100 | grid.classFilter.filters();
101 |
102 | /* Sorting */
103 | grid.classSort.orderBy();
104 |
105 | /**
106 | * pageIndex
107 | */
108 |
109 | grid.view_table.data.map(dataRow => grid.page_table.insert(grid.copyJson(dataRow)));
110 |
111 | this.setPageData2();
112 | }
113 |
114 | /* create top_data */
115 | //grid.classTop.setTopData();
116 |
117 | /* create footer_data */
118 | //grid.classFooter.setFooterData();
119 |
120 | //if (this.isAutoWidthColumn()) this.setColumnAutoWidth();
121 |
122 | grid.classRange.removeRange(0, -1);
123 | grid.classRange.selectRange(0, 0, 0, 0);
124 |
125 | if (data.length == 0) {
126 | document.querySelector(`${selector} .tbs-grid-panel21 td div`).textContent = '0';
127 | grid.classPanel30.setDataPanel(0);
128 | grid.verticalScroll.setScroll(grid.code_vertical);
129 | }
130 | else {
131 | document.querySelector(`${selector} .tbs-grid-panel21 td div`).textContent = String(data.length);
132 | grid.classPanel30.setDataPanel(0);
133 | grid.verticalScroll.setScroll(grid.code_vertical);
134 | grid.classPanel40.setDataPanel();
135 | grid.classPanel50.setDataPanel();
136 | }
137 | const span = document.querySelector(`${selector} .tbs-grid-panel99-page-select`);
138 | span.textContent = `${this.pageIndex} / ${this.pageCount}`;
139 |
140 | }
141 | }
142 |
143 |
--------------------------------------------------------------------------------
/src/page/tbs.grid.pagination.ts:
--------------------------------------------------------------------------------
1 | import {TbsGrid} from "../tbs.grid";
2 | import {ColumnAlias, GridMode} from "../tbs.grid.types";
3 |
4 | export class TbsGridPagination {
5 | grid: TbsGrid;
6 | selector: string;
7 |
8 | pageIndex: number;
9 | pageCount: number;
10 | pageTotalRowCount: number;
11 |
12 | constructor(grid: TbsGrid) {
13 | this.grid = grid;
14 | this.selector = `#${grid.gridId}`;
15 |
16 | this.pageIndex = 1;
17 | this.pageCount = 0;
18 | this.pageTotalRowCount = 0;
19 | }
20 |
21 | setTotalRowCount(totalRowCount: number) {
22 | this.pageCount = Math.ceil(totalRowCount / this.grid.options.pageRowCount);
23 | this.pageTotalRowCount = totalRowCount;
24 | }
25 |
26 | setPaginationData(data: any[]) {
27 | const selector = this.selector;
28 | const grid = this.grid;
29 |
30 | if (data == undefined) return;
31 |
32 | grid.source_table.remove();
33 | grid.view_table.remove();
34 |
35 | grid.data_select_panel30 = [];
36 | grid.data_select_panel31 = [];
37 |
38 | for (let i = 0, len = data.length; i < len; i++) {
39 | const dataRow = data[i];
40 |
41 | const source = {};
42 | const columns: any[] = grid.column_table.selectRows();
43 | for (let x = 0, len = columns.length; x < len; x++) {
44 | const column = columns[x];
45 | let columnName = column[ColumnAlias.name];
46 | source[columnName] = grid.null(dataRow[columnName]) ? null : grid.getFormatValue(column, dataRow[columnName]);
47 | }
48 |
49 | grid.source_table.insert(source);
50 | }
51 |
52 | grid.source_table.data.map(dataRow => grid.view_table.insert(grid.copyJson(dataRow)));
53 |
54 | /* Filter */
55 | grid.classFilter.filters();
56 |
57 | /* Sorting */
58 | grid.classSort.orderBy();
59 |
60 | /**
61 | * pageIndex
62 | */
63 |
64 | grid.view_table.data.map(dataRow => grid.page_table.insert(grid.copyJson(dataRow)));
65 |
66 | /* create top_data */
67 | //grid.classTop.setTopData();
68 |
69 | /* create footer_data */
70 | //grid.classFooter.setFooterData();
71 |
72 | //if (this.isAutoWidthColumn()) this.setColumnAutoWidth();
73 |
74 | (document.querySelector(`${selector} .tbs-grid-panel10-filter-input`) as any).value = '';
75 | grid.classRange.removeRange(0, -1);
76 | grid.classRange.selectRange(0, 0, 0, 0);
77 |
78 | document.querySelector(`${selector} .tbs-grid-panel21 td div`).textContent = String(this.pageTotalRowCount);
79 | grid.classPanel30.setDataPanel(0);
80 | grid.verticalScroll.setScroll(grid.code_vertical);
81 | grid.classPanel40.setDataPanel();
82 | grid.classPanel50.setDataPanel();
83 | }
84 | }
85 |
86 |
--------------------------------------------------------------------------------
/src/panels/tbs.grid.panel.base.ts:
--------------------------------------------------------------------------------
1 | import { TbsBase } from "../tbs.base";
2 | import {TbsGrid} from "../tbs.grid";
3 |
4 | export class TbsGridPanelBase extends TbsBase {
5 | grid: TbsGrid;
6 | selector: string;
7 | panelName: string;
8 | panelName1: string;
9 | panelName2: string;
10 | panelName0: string;
11 |
12 | constructor(grid: TbsGrid) {
13 | super();
14 | this.grid = grid;
15 | this.selector = '#' + grid.gridId;
16 | this.panelName = null;
17 | this.panelName1 = null;
18 | this.panelName2 = null;
19 | this.panelName0 = null;
20 | }
21 |
22 | /**
23 | * Panel Interface
24 | */
25 | createHtml(parentElement) {}
26 |
27 | createEtcHtml(parentElement: any) {
28 | let s = '';
29 | //content vertical scroll
30 | s += '';
37 | //content horizontal scroll
38 | s += '';
45 | //frozen vertical scroll
46 | // s += '';
53 | //frozen horizontal scroll
54 | // s += '';
61 | /* ETC */
62 | s += '';
63 | s += '';
64 | s += '';
65 | s += '';
66 | s += '';
67 | s += ''; // confuse
68 | s += '';
69 | s += '';
74 | s += '';
75 |
76 | parentElement.insertAdjacentHTML('beforeend', s);
77 | parentElement.querySelector(' .tbs-grid-canvas').appendChild(document.createElement('canvas'));
78 | }
79 | }
80 |
81 |
82 |
--------------------------------------------------------------------------------
/src/panels/tbs.grid.panel50.ts:
--------------------------------------------------------------------------------
1 |
2 | import { TbsGridPanelBase } from './tbs.grid.panel.base';
3 | import { TbsGridRenderPanel40 } from './tbs.grid.render.panel40';
4 | import { TbsGridTable } from "../tbs.grid.table";
5 | import {ColumnAlias} from "../tbs.grid.types";
6 |
7 | export class TbsGridPanel50 extends TbsGridPanelBase {
8 | constructor(grid) {
9 | super(grid);
10 | this.panelName = 'panel50';
11 |
12 | this.panelName1 = 'panel51';
13 | this.panelName2 = 'panel52';
14 | this.panelName0 = 'panel50';
15 | }
16 | createHtml(parentElement) {
17 | const grid = this.grid;
18 | let s = '';
19 | s += '';
20 | s += '
';
21 | s += '
';
22 | s += '
';
23 | s += '
';
24 | s += '
';
25 | s += '';
26 | s += '
';
27 | s += '
';
28 | s += '
';
29 | s += '
';
30 | parentElement.insertAdjacentHTML('beforeend', s);
31 | }
32 |
33 | createTable() {
34 | const grid = this.grid;
35 |
36 | if(grid.footer_column_table.count() == 0) return;
37 |
38 | const classTable = new TbsGridTable(grid);
39 | classTable.createTable('panel51', 0, 1);
40 | classTable.createTable('panel52', 0, 1);
41 | classTable.createTable('panel50', 0, 1);
42 | }
43 |
44 | setDataPanel() {
45 | let selector = this.selector;
46 | const grid = this.grid;
47 |
48 | grid.classRange.removePanelRange('panel50');
49 | this.setDataPanel2();
50 | this.setDataPanel1();
51 | this.setDataPanel0();
52 | }
53 | setDataPanel1() {
54 | let selector = this.selector;
55 | const grid = this.grid;
56 | let panelName = this.panelName1;
57 |
58 | if (grid.footer_table.count() == 0) return;
59 |
60 | let topRowIndex = 0;
61 | let bottomRowIndex = 0;
62 |
63 | let pageRowCount = 1;
64 | let rowHeight = grid.rowHeight;
65 |
66 | let tableRows = document.querySelectorAll(selector + ' .tbs-grid-' + panelName + ' .tbs-grid-table tbody tr');
67 | if (tableRows.length == 0) return;
68 |
69 | //startColumnIndex, lastColumIndex
70 | let result = grid.classHeader.getDisplayedHeaderColumn();
71 | let startColumnIndex= result.startColumnIndex;
72 | let lastColumnIndex = result.lastColumnIndex;
73 |
74 | let tableRowIndex = 0;
75 |
76 | for (let i = topRowIndex; i < bottomRowIndex + 1; i++) {
77 | let tableRow: any = tableRows[tableRowIndex];
78 |
79 | /* Render: TableRow */
80 | grid.classRow.setTableRow(grid, tableRow, i, panelName);
81 |
82 | const tableCell: any = tableRow.childNodes[0];
83 | tableCell.dataset.rowIndex = i;
84 | tableCell.dataset.displayRowIndex = i;
85 |
86 | tableRow.childNodes[0].dataset.cellType = 'number';
87 | grid.classCell.showSelectedCells(grid, panelName, tableCell, 0, i);
88 | }
89 | }
90 | setDataPanel2() {
91 | let selector = this.selector;
92 | const grid = this.grid;
93 |
94 | if (grid.fixedColumnIndex == -1) return;
95 |
96 | let panelName = this.panelName2;
97 |
98 | if (grid.footer_table.count() == 0) return;
99 |
100 | //startColumnIndex, lastColumIndex
101 | let result = grid.classHeader.getDisplayedHeaderColumn();
102 | let startColumnIndex= result.startColumnIndex;
103 | let lastColumnIndex = result.lastColumnIndex;
104 |
105 | /* table thead */
106 | grid.classRow.setTableHead(grid, panelName);
107 |
108 | /* table tbody */
109 | let tableRows = document.querySelectorAll(selector + ' .tbs-grid-' + panelName + ' .tbs-grid-table tbody tr');
110 | let tableRow = tableRows[0];
111 | for (let x = 0; x <= lastColumnIndex; x++) {
112 | let column = grid.column_table.data[x];
113 | let tableCell = tableRow.childNodes[x];
114 |
115 | if (x > grid.fixedColumnIndex && x < startColumnIndex) continue;
116 |
117 | let tbsGridRender = new TbsGridRenderPanel40(grid);
118 | tbsGridRender.start(panelName, tableCell, column, 0, x);
119 | tbsGridRender = null;
120 | //grid.classRender.start(panelName, tableCell, column, 0, x);
121 |
122 | grid.classCell.showSelectedCells(grid, panelName, tableCell, 0, x);
123 | }
124 | // on fixed columns
125 | const tbsGridCell = grid.classCell.hideTableCells(grid, panelName, tableRow, lastColumnIndex);
126 | }
127 | setDataPanel0() {
128 | let selector = this.selector;
129 | const grid = this.grid;
130 | let panelName = this.panelName0;
131 |
132 | if (grid.footer_table.count() == 0) return;
133 | //startColumnIndex, lastColumIndex
134 | let result = grid.classHeader.getDisplayedHeaderColumn();
135 | let startColumnIndex= result.startColumnIndex;
136 | let lastColumnIndex = result.lastColumnIndex;
137 |
138 | /* table thead */
139 | grid.classRow.setTableHead(grid, panelName);
140 |
141 | /* table tbody */
142 | let tableRows = document.querySelectorAll(selector + ' .tbs-grid-' + panelName + ' .tbs-grid-table tbody tr');
143 | let tableRow = tableRows[0];
144 | for (let x = 0, len = grid.column_table.count(); x < len; x++) {
145 | let column = grid.column_table.data[x];
146 | let columnName = column[ColumnAlias.name];
147 | let tableCell = tableRow.childNodes[x];
148 |
149 | if (grid.fixedColumnIndex != -1) {
150 | if (x > grid.fixedColumnIndex && x < startColumnIndex) continue;
151 | }
152 | else { if (x < startColumnIndex) continue; }
153 |
154 | let tbsGridRender = new TbsGridRenderPanel40(grid);
155 | tbsGridRender.start(panelName, tableCell, grid.column_table.data[x], 0, x);
156 | tbsGridRender = null;
157 | //grid.classRender.start(panelName, tableCell, grid.column_table.data[x], 0, x);
158 |
159 | grid.classCell.showSelectedCells(grid, panelName, tableCell, 0, x);
160 | }
161 | // on fixed columns
162 | grid.classCell.hideTableCells(grid, panelName, tableRow, lastColumnIndex);
163 | }
164 |
165 | }
166 |
167 |
168 |
169 |
--------------------------------------------------------------------------------
/src/panels/tbs.grid.panel99.ts:
--------------------------------------------------------------------------------
1 | import {TbsGridPanelBase} from './tbs.grid.panel.base';
2 | import {TbsGrid} from "../tbs.grid";
3 | import {ClickPageOrder, GridMode} from "../tbs.grid.types";
4 |
5 | export class TbsGridPanel99 extends TbsGridPanelBase {
6 |
7 | grid: TbsGrid;
8 | selector: string;
9 | panelName: string;
10 |
11 | constructor(grid: TbsGrid) {
12 | super(grid);
13 | this.grid = grid;
14 | this.selector = `#${grid.gridId}`;
15 | this.panelName = 'panel99';
16 | }
17 |
18 | createHtml(parentElement: any) {
19 | const grid = this.grid;
20 | const isShowToolbar: string =
21 | grid.grid_mode == GridMode.page || grid.grid_mode == GridMode.pagination ? 'tbs-grid-show' : 'tbs-grid-hide';
22 |
23 | let s = '';
24 | s += `';
36 | parentElement.insertAdjacentHTML('beforeend', s);
37 |
38 | grid.classPanel99.panel99_select();
39 | }
40 |
41 | createTable() {
42 | const panel = document.querySelector(`${this.selector} .tbs-grid-panel99`);
43 | panel.classList.add('tbs-grid-show');
44 | }
45 |
46 | panel99_select(){
47 | const selector = this.selector;
48 | const grid = this.grid;
49 |
50 | const firstEvent = e => {
51 | e.stopPropagation();
52 |
53 | if (grid.grid_mode == GridMode.pagination) {
54 | grid.classPagination.pageIndex = 1;
55 | if (grid.notNull(grid.onClickPage)) {
56 | grid.onClickPage(grid, grid.classPage.pageIndex, grid.options.pageRowCount, ClickPageOrder.first);
57 | }
58 | }
59 | else {
60 | grid.classPage.pageIndex = 1;
61 | grid.classPage.setPageData(grid.view_table.data, false);
62 | }
63 | }
64 |
65 | if (document.querySelector(`${selector} .tbs-grid-panel99-page-first`))
66 | document.querySelector(`${selector} .tbs-grid-panel99-page-first`).addEventListener('mousedown', firstEvent);
67 |
68 | const prevEvent = e => {
69 | e.stopPropagation();
70 |
71 | if (grid.grid_mode == GridMode.pagination) {
72 | grid.classPagination.pageIndex -= 1 ;
73 | if (grid.notNull(grid.onClickPage)) {
74 | grid.onClickPage(grid, grid.classPage.pageIndex, grid.options.pageRowCount, ClickPageOrder.prev);
75 | }
76 | }
77 | else {
78 | grid.classPage.pageIndex -= 1 ;
79 | grid.classPage.setPageData(grid.view_table.data, false);
80 | }
81 | }
82 |
83 | if (document.querySelector(`${selector} .tbs-grid-panel99-page-prev`))
84 | document.querySelector(`${selector} .tbs-grid-panel99-page-prev`).addEventListener('mousedown', prevEvent);
85 |
86 | // const curEvent = e => {
87 | // e.stopPropagation();
88 | // if (grid.grid_mode == GridMode.pagination) {
89 | // if (grid.notNull(grid.onClickPage)) {
90 | // grid.onClickPage(grid, grid.classPage.pageIndex, grid.options.pageRowCount, ClickPageOrder.last);
91 | // }
92 | // }
93 | // else grid.classPanel30.setDataPanel(0);
94 | // }
95 | //
96 | // if (document.querySelector(`${selector} .tbs-grid-panel99-page-select`))
97 | // document.querySelector(`${selector} .tbs-grid-panel99-page-select`).addEventListener('mousedown', curEvent);
98 |
99 | const nextEvent = e => {
100 | e.stopPropagation();
101 |
102 | if (grid.grid_mode == GridMode.pagination) {
103 | grid.classPagination.pageIndex += 1 ;
104 | if (grid.notNull(grid.onClickPage)) {
105 | grid.onClickPage(grid, grid.classPage.pageIndex, grid.options.pageRowCount, ClickPageOrder.next);
106 | }
107 | }
108 | else {
109 | grid.classPage.pageIndex += 1 ;
110 | grid.classPage.setPageData(grid.view_table.data, false);
111 | }
112 | }
113 |
114 | if (document.querySelector(`${selector} .tbs-grid-panel99-page-next`))
115 | document.querySelector(`${selector} .tbs-grid-panel99-page-next`).addEventListener('mousedown', nextEvent);
116 |
117 | const lastEvent = e => {
118 | e.stopPropagation();
119 |
120 | if (grid.grid_mode == GridMode.pagination) {
121 | grid.classPagination.pageIndex = grid.classPage.pageCount;
122 | if (grid.notNull(grid.onClickPage)) {
123 | grid.onClickPage(grid, grid.classPage.pageIndex, grid.options.pageRowCount, ClickPageOrder.last);
124 | }
125 | }
126 | else {
127 | grid.classPage.pageIndex = grid.classPage.pageCount;
128 | grid.classPage.setPageData(grid.view_table.data, false);
129 | }
130 | }
131 |
132 | if (document.querySelector(`${selector} .tbs-grid-panel99-page-last`))
133 | document.querySelector(`${selector} .tbs-grid-panel99-page-last`).addEventListener('mousedown', lastEvent);
134 |
135 | const changeEvent = e => {
136 | e.stopPropagation();
137 | if (grid.grid_mode == GridMode.pagination) {
138 | grid.classPagination.pageIndex = 1;
139 | grid.options.pageRowCount = Number(e.target.value);
140 |
141 | if (grid.notNull(grid.onChangePageRowCount)) {
142 | grid.onChangePageRowCount(grid, 1, grid.options.pageRowCount);
143 | }
144 | }
145 | else {
146 | grid.classPage.pageIndex = 1;
147 | grid.options.pageRowCount = Number(e.target.value);
148 | grid.classPage.setPageData(grid.view_table.data, false);
149 | }
150 | }
151 |
152 | if (document.querySelector(`${selector} .tbs-grid-panel99-page-combo`))
153 | document.querySelector(`${selector} .tbs-grid-panel99-page-combo`).addEventListener('change', changeEvent);
154 | }
155 |
156 | setPageRowCountList(data?: any[]) {
157 | const grid = this.grid;
158 | const selector = this.selector;
159 |
160 | if (grid.null(data)) {
161 | data = grid.options.pageRowCountList;
162 | }
163 | const pageRowcount = grid.options.pageRowCount;
164 |
165 | const combo = document.querySelector(`${selector} .tbs-grid-panel99-page-combo`);
166 | for (let i = 0, len = data.length; i < len; i++) {
167 | const row: number = data[i];
168 | const option = document.createElement('option');
169 | option.value = String(row);
170 | option.text = String(row);
171 | if (pageRowcount == Number(row)) option.selected = true;
172 | combo.append(option);
173 | }
174 | }
175 |
176 | showPagePanel() {
177 | const selector = this.selector;
178 | const grid = this.grid;
179 |
180 | grid.options.showToolbarPanel = true;
181 | const panel = document.querySelector(`${selector} .tbs-grid-panel99`);
182 | panel.classList.remove('tbs-grid-hide');
183 | panel.classList.add('tbs-grid-show');
184 |
185 | this.setPageRowCountList();
186 |
187 | grid.classRange.removeRange(0, -1);
188 | grid.classScroll.setPanelSize();
189 | grid.apply();
190 | }
191 |
192 | hidePagePanel() {
193 | const selector = this.selector;
194 | const grid = this.grid;
195 |
196 | grid.options.showToolbarPanel = false;
197 | const panel = document.querySelector(`${selector} .tbs-grid-panel99`);
198 | panel.classList.remove('tbs-grid-show');
199 | panel.classList.add('tbs-grid-hide');
200 |
201 | grid.classRange.removeRange(0, -1);
202 | grid.classScroll.setPanelSize();
203 | grid.apply();
204 | }
205 | }
206 |
207 |
208 |
--------------------------------------------------------------------------------
/src/panels/tbs.grid.render.panel40.ts:
--------------------------------------------------------------------------------
1 | import {TbsGrid} from "../tbs.grid";
2 | import {ColumnAlias} from "../tbs.grid.types";
3 | import {TbsGridRenderString} from "../renderer/tbs.grid.render.string";
4 |
5 |
6 | export class TbsGridRenderPanel40 {
7 | grid: TbsGrid;
8 | selector: string;
9 |
10 | column: any;
11 | columnIndex: number;
12 | columnName: string;
13 | columnType: string;
14 |
15 | valueName: string;
16 | textName: string;
17 |
18 | rowIndex: number;
19 |
20 | cellValue: any;
21 | cellText: any;
22 |
23 | align: string;
24 | className: string;
25 |
26 | width: number;
27 | visible: boolean;
28 | editable: boolean;
29 |
30 | tableCell: any;
31 | panelName: string;
32 |
33 | cellTemplate: any;
34 | depth: number;
35 | constructor(grid) {
36 | this.grid = grid;
37 | this.selector = '#' + grid.gridId;
38 |
39 | this.column = null;
40 | this.columnIndex = null;
41 | this.columnName = null;
42 | this.columnType = null;
43 |
44 | this.valueName = null;
45 | this.textName = null;
46 |
47 | this.rowIndex = null;
48 | this.columnIndex = null;
49 |
50 | this.cellValue = null;
51 | this.cellText = null; //user
52 |
53 | this.align = null; //user
54 | this.className = null; //user
55 |
56 | this.width = null;
57 | this.visible = null;
58 | this.editable = null;
59 |
60 | this.tableCell = null;
61 | this.panelName = null;
62 |
63 | this.cellTemplate = null;
64 | }
65 |
66 | start(panelName, tableCell, column, rowIndex, columnIndex) {
67 | const grid = this.grid;
68 | const render = this;
69 |
70 | this.panelName = panelName;
71 | this.tableCell = tableCell;
72 | this.column = column;
73 | this.rowIndex = rowIndex;
74 | this.columnIndex= columnIndex;
75 |
76 | this.columnName = column[ColumnAlias.name];
77 | this.columnType = column[ColumnAlias.type];
78 |
79 | this.visible = column[ColumnAlias.visible];
80 | this.width = column[ColumnAlias.width];
81 |
82 | let columnTable = null;
83 | let dataTable = null;
84 |
85 | if (['panel40', 'panel42'].indexOf(this.panelName) != -1) {
86 | columnTable = grid.top_column_table;
87 | dataTable = grid.top_table;
88 | }
89 | else if (['panel50', 'panel52'].indexOf(this.panelName) != -1) {
90 | columnTable = grid.footer_column_table;
91 | dataTable = grid.footer_table;
92 | }
93 |
94 | const summaryColumn = columnTable.selectRow(ColumnAlias.name, this.columnName);
95 | if (grid.notNull(summaryColumn)) {
96 | this.align = grid.notNull(summaryColumn[ColumnAlias.align]) ?
97 | summaryColumn[ColumnAlias.align] : column[ColumnAlias.align];
98 |
99 | this.className = grid.notNull(summaryColumn[ColumnAlias.className]) ?
100 | summaryColumn[ColumnAlias.className] : column[ColumnAlias.className];
101 |
102 | this.cellValue = grid.getValue(this.rowIndex, this.columnName, dataTable);
103 | this.cellText = grid.getText(this.rowIndex, this.columnName, dataTable);
104 | }
105 | else {
106 | this.align = column[ColumnAlias.align];
107 | this.className = column[ColumnAlias.className];
108 | }
109 |
110 |
111 | render.updateData();
112 | }
113 |
114 | updateData() {
115 | const grid = this.grid;
116 |
117 | if (grid.fixedColumnIndex != -1) {
118 | if (this.panelName.substring(6) == '2') {
119 | if (this.columnIndex > grid.fixedColumnIndex) this.visible = false;
120 | }
121 | else if (this.panelName.substring(6) == '0') {
122 | if (this.columnIndex <= grid.fixedColumnIndex) this.visible = false;
123 | }
124 | }
125 | this.createHtml();
126 | }
127 |
128 | createHtml() {
129 | const render = new TbsGridRenderString();
130 | render.addElement(this);
131 |
132 | this.setBounding();
133 | }
134 |
135 | setBounding() {
136 | const render = new TbsGridRenderString();
137 | render.setBounding(this);
138 |
139 | }
140 | }
141 |
142 |
143 |
--------------------------------------------------------------------------------
/src/panels/tbs.grid.render.panel70.ts:
--------------------------------------------------------------------------------
1 | import {TbsGrid} from "../tbs.grid";
2 | import {ColumnAlias} from "../tbs.grid.types";
3 |
4 |
5 |
6 | export class TbsGridRenderPanel70 {
7 | grid: TbsGrid;
8 | selector: string;
9 |
10 | column: any;
11 | columnIndex: number;
12 | columnName: string;
13 | columnType: string;
14 |
15 | valueName: string;
16 | textName: string;
17 |
18 | rowIndex: number;
19 |
20 | cellValue: any;
21 | cellText: any;
22 |
23 | align: string;
24 | className: string;
25 |
26 | width: number;
27 | visible: boolean;
28 | editable: boolean;
29 |
30 | tableCell: any;
31 | panelName: string;
32 |
33 | cellTemplate: any;
34 | depth: number;
35 | constructor(grid) {
36 | this.grid = grid;
37 | this.selector = '#' + grid.gridId;
38 |
39 | this.column = null;
40 | this.columnIndex = null;
41 | this.columnName = null;
42 | this.columnType = null;
43 |
44 | this.valueName = null;
45 | this.textName = null;
46 |
47 | this.rowIndex = null;
48 | this.columnIndex = null;
49 |
50 | this.cellValue = null;
51 | this.cellText = null; //user
52 |
53 | this.align = null; //user
54 | this.className = null; //user
55 |
56 | this.width = null;
57 | this.visible = null;
58 | this.editable = null;
59 |
60 | this.tableCell = null;
61 | this.panelName = null;
62 |
63 | this.cellTemplate = null;
64 | }
65 |
66 | start(panelName, tableCell, column, rowIndex, columnIndex) {
67 | const grid = this.grid;
68 | const render = this;
69 |
70 | this.panelName = panelName;
71 | this.tableCell = tableCell;
72 | this.column = column;
73 | this.rowIndex = rowIndex;
74 | this.columnIndex= columnIndex;
75 |
76 | this.columnName = column[ColumnAlias.name];
77 | this.columnType = column[ColumnAlias.type];
78 |
79 | this.visible = column[ColumnAlias.visible];
80 | this.width = column[ColumnAlias.width];
81 |
82 | this.align = column[ColumnAlias.align];
83 | this.className = column[ColumnAlias.className];
84 |
85 | render.updateData();
86 | }
87 |
88 | updateData() {
89 | const grid = this.grid;
90 |
91 | if (grid.fixedColumnIndex != -1) {
92 | if (this.panelName.substring(6) == '2') {
93 | if (this.columnIndex > grid.fixedColumnIndex) this.visible = false;
94 | }
95 | else if (this.panelName.substring(6) == '0') {
96 | if (this.columnIndex <= grid.fixedColumnIndex) this.visible = false;
97 | }
98 | }
99 | this.createHtml();
100 | }
101 |
102 | createHtml() {
103 | // const render = new TbsGridRenderString();
104 | // render.addElement(this);
105 | //
106 | // this.setBounding();
107 | }
108 |
109 | setBounding() {
110 | // const render = new TbsGridRenderString();
111 | // render.setBounding(this);
112 |
113 | }
114 | }
115 |
116 |
117 |
--------------------------------------------------------------------------------
/src/renderer/tbs.grid.render.button.ts:
--------------------------------------------------------------------------------
1 | import {TbsGridDom} from "../tbs.grid.dom";
2 |
3 | export class TbsGridRenderButton {
4 |
5 | addElement(param) {
6 | const element = TbsGridDom.createElement('button');
7 | const tableCell = param.tableCell;
8 |
9 | const count: number = tableCell.querySelectorAll('.tbs-grid-html-button').length;
10 | const rootChildCount: number = tableCell.childNodes[0].childNodes.length;
11 |
12 | if (rootChildCount > 1 || (rootChildCount == 1 && count == 0)) {
13 | tableCell.childNodes[0].innerHTML = '';
14 | tableCell.childNodes[0].append(element);
15 | }
16 | else if (count == 0) tableCell.childNodes[0].append(element);
17 | }
18 |
19 | setBounding(param) {
20 | const element = param.tableCell.querySelector('.tbs-grid-html-button');
21 | if (!element) return;
22 |
23 | TbsGridDom.setStyle(param.tableCell, param); // editable, align, className,
24 | TbsGridDom.setCell(element, 'disabled', (param.editable ? '' : 'disabled'));
25 |
26 | TbsGridDom.setCellStyle(param.tableCell.childNodes[0], 'paddingLeft', '0px');
27 |
28 | // set value
29 | element.innerHTML = param.cellText;
30 | }
31 | }
--------------------------------------------------------------------------------
/src/renderer/tbs.grid.render.checkbox.ts:
--------------------------------------------------------------------------------
1 | import {TbsGridDom} from "../tbs.grid.dom";
2 |
3 | export class TbsGridRenderCheckbox {
4 | addElement(param) {
5 | const element = TbsGridDom.createElement('checkbox');
6 | const tableCell = param.tableCell;
7 |
8 | let count = tableCell.querySelectorAll('.tbs-grid-html-checkbox').length;
9 | let rootChildCount = tableCell.childNodes[0].childNodes.length;
10 |
11 | if (rootChildCount > 1 || (rootChildCount == 1 && count == 0)) {
12 | tableCell.childNodes[0].innerHTML = '';
13 | tableCell.childNodes[0].append(element);
14 | }
15 | else if (count == 0) tableCell.childNodes[0].append(element);
16 | }
17 |
18 | setBounding(param) {
19 | const element = param.tableCell.querySelector('.tbs-grid-html-checkbox');
20 | if (!element) return;
21 |
22 | TbsGridDom.setStyle(param.tableCell, param); // editable, align, className,
23 | if (['panel30', 'panel31', 'panel32'].indexOf(param.panelName) != -1) {
24 | TbsGridDom.setCell(element, 'disabled', (param.editable ? '' : 'disabled'));
25 | }
26 | TbsGridDom.setCellStyle(param.tableCell.childNodes[0], 'paddingLeft', '0px');
27 | // set value
28 | element.checked = param.cellValue;
29 | }
30 | }
--------------------------------------------------------------------------------
/src/renderer/tbs.grid.render.group.ts:
--------------------------------------------------------------------------------
1 |
2 | import {TbsGridDom} from "../tbs.grid.dom";
3 |
4 | export class TbsGridRenderGroup {
5 |
6 | addElement(param) {
7 | const row = param.grid.view_table.selectRowByRowIndex(param.rowIndex);;
8 |
9 | if (param.columnIndex == 0 && param.depth <= param.grid.group_column_table.count()) {
10 | const icon = TbsGridDom.createElement('icon');
11 | const element = TbsGridDom.createElement('string');
12 | if (param.tableCell.childNodes[0].innerHTML != '') param.tableCell.childNodes[0].innerHTML = '';
13 | param.tableCell.childNodes[0].append(icon);
14 | param.tableCell.childNodes[0].append(element);
15 | }
16 | else if (param.columnIndex == 0 && param.depth > param.grid.group_column_table.count()) {
17 | const element = TbsGridDom.createElement('string');
18 | if (param.tableCell.childNodes[0].innerHTML != '') param.tableCell.childNodes[0].innerHTML = '';
19 | param.tableCell.childNodes[0].append(element);
20 | }
21 | else {
22 | const element = TbsGridDom.createElement('string');
23 | if (param.tableCell.childNodes[0].innerHTML != '') param.tableCell.childNodes[0].innerHTML = '';
24 | param.tableCell.childNodes[0].append(element);
25 | }
26 | }
27 |
28 | setBounding(param) {
29 | const row = param.grid.view_table.selectRowByRowIndex(param.rowIndex);;
30 | if (param.columnIndex == 0 && param.depth <= param.grid.group_column_table.count()) {
31 | TbsGridDom.setStyle(param.tableCell, param);
32 | TbsGridDom.setCellStyle(param.tableCell.childNodes[0], 'paddingLeft', (param.depth * 15) + 'px');
33 | param.grid.classGroup.setGroupIcon(param.tableCell, param.rowIndex);
34 |
35 | const element = param.tableCell.querySelector('.tbs-grid-html-string');
36 | TbsGridDom.setCell(element, 'textContent', param.cellText);
37 | }
38 | else if (param.columnIndex == 0 && param.depth > param.grid.group_column_table.count()) {
39 | TbsGridDom.setStyle(param.tableCell, param);
40 | TbsGridDom.setCellStyle(param.tableCell.childNodes[0], 'paddingLeft', (param.depth * 15) + 'px');
41 |
42 | const element = param.tableCell.querySelector('.tbs-grid-html-string');
43 | TbsGridDom.setCell(element, 'textContent', param.cellText);
44 |
45 | }
46 | else {
47 | TbsGridDom.setStyle(param.tableCell, param);
48 | TbsGridDom.setCellStyle(param.tableCell.childNodes[0], 'paddingLeft', '0px');
49 |
50 | const element = param.tableCell.querySelector('.tbs-grid-html-string');
51 | TbsGridDom.setCell(element, 'textContent', param.cellText);
52 |
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/src/renderer/tbs.grid.render.img.ts:
--------------------------------------------------------------------------------
1 | import {TbsGridDom} from "../tbs.grid.dom";
2 | import {ColumnAlias} from "../tbs.grid.types";
3 |
4 | export class TbsGridRenderImg {
5 |
6 | addElement(param) {
7 | const element = TbsGridDom.createElement('img');
8 | const tableCell = param.tableCell;
9 |
10 | let count = tableCell.querySelectorAll('.tbs-grid-html-img').length;
11 | let rootChildCount = tableCell.childNodes[0].childNodes.length;
12 |
13 | if (rootChildCount > 1 || (rootChildCount == 1 && count == 0)) {
14 | tableCell.childNodes[0].innerHTML = '';
15 | tableCell.childNodes[0].append(element);
16 | }
17 | else if (count == 0) tableCell.childNodes[0].append(element);
18 | }
19 |
20 | setBounding(param) {
21 | const element = param.tableCell.querySelector('.tbs-grid-html-img');
22 |
23 | TbsGridDom.setStyle(param.tableCell, param); // editable, align, className,
24 | //TbsGridDom.setCell(element, 'disabled', (param.editable ? '' : 'disabled'));
25 | TbsGridDom.setCellStyle(param.tableCell.childNodes[0], 'paddingLeft', '0px');
26 |
27 | // set value
28 | element.src = param.grid.getUserImageRoot(param.columnName) + param.cellValue;
29 | element.width = param.grid.getRenderer(param.columnName, 'width') ?
30 | param.grid.getRenderer(param.columnName, 'width') : param.column[ColumnAlias.width];
31 | element.height = param.grid.getRenderer(param.columnName, 'height') ?
32 | param.grid.getRenderer(param.columnName, 'height') : param.grid.rowHeight;
33 | }
34 | }
--------------------------------------------------------------------------------
/src/renderer/tbs.grid.render.link.ts:
--------------------------------------------------------------------------------
1 | import {TbsGridDom} from "../tbs.grid.dom";
2 |
3 | export class TbsGridRenderLink {
4 |
5 | addElement(param) {
6 | const element = TbsGridDom.createElement('link');
7 | const tableCell = param.tableCell;
8 |
9 | let count = tableCell.querySelectorAll('.tbs-grid-html-link').length;
10 | let rootChildCount = tableCell.childNodes[0].childNodes.length;
11 |
12 | if (rootChildCount > 1 || (rootChildCount == 1 && count == 0)) {
13 | tableCell.childNodes[0].innerHTML = '';
14 | tableCell.childNodes[0].append(element);
15 | }
16 | else if (count == 0) tableCell.childNodes[0].append(element);
17 | }
18 |
19 | setBounding(param) {
20 | const element = param.tableCell.querySelector('.tbs-grid-html-link');
21 |
22 | TbsGridDom.setStyle(param.tableCell, param); // editable, align, className,
23 | //TbsGridDom.setCell(element, 'disabled', (param.editable ? '' : 'disabled'));
24 | TbsGridDom.setCellStyle(param.tableCell.childNodes[0], 'paddingLeft', '0px');
25 | // set value
26 | element.href = param.cellValue;
27 | element.innerHTML = param.cellText;
28 | element.target = '_blank';
29 | }
30 | }
--------------------------------------------------------------------------------
/src/renderer/tbs.grid.render.string.ts:
--------------------------------------------------------------------------------
1 | import {TbsGridDom} from "../tbs.grid.dom";
2 |
3 |
4 | export class TbsGridRenderString {
5 | /**
6 | * @param { panelName, columnName, tableCell, cellValue, className, visible, align, width }
7 | */
8 | addElement(param) {
9 | const element = TbsGridDom.createElement('string');
10 | const tableCell = param.tableCell;
11 |
12 | let count = tableCell.querySelectorAll('.tbs-grid-html-string').length;
13 | let rootChildCount = tableCell.childNodes[0].childNodes.length;
14 |
15 | if (rootChildCount > 1 || (rootChildCount == 1 && count == 0)) {
16 | tableCell.childNodes[0].innerHTML = '';
17 | tableCell.childNodes[0].append(element);
18 | }
19 | else if (count == 0) tableCell.childNodes[0].append(element);
20 | }
21 | /**
22 | * @param { panelName, columnName, tableCell, cellValue, className, visible, align, width }
23 | */
24 | setBounding(param) {
25 | TbsGridDom.setStyle(param.tableCell, param);
26 | if (param.depth && param.columnIndex == 0) {
27 | TbsGridDom.setCellStyle(param.tableCell.childNodes[0], 'paddingLeft', (param.depth * 15) + 'px');
28 | }
29 | else {
30 | TbsGridDom.setCellStyle(param.tableCell.childNodes[0], 'paddingLeft', '0px');
31 | }
32 | const element = param.tableCell.querySelector('.tbs-grid-html-string');
33 | if (param.cellValue) {
34 | TbsGridDom.setCell(element, 'textContent', param.cellText);
35 | }
36 | else {
37 | TbsGridDom.setCell(element, 'textContent', '');
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/src/renderer/tbs.grid.render.svg.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 | export class TbsGridRenderSvg {
4 |
5 | }
--------------------------------------------------------------------------------
/src/renderer/tbs.grid.render.tree.ts:
--------------------------------------------------------------------------------
1 |
2 | import {TbsGridDom} from "../tbs.grid.dom";
3 | import {ColumnAlias} from "../tbs.grid.types";
4 |
5 | export class TbsGridRenderTree {
6 | addElement(param) {
7 | const row = param.grid.view_table.selectRowByRowIndex(param.rowIndex);;
8 | const children = row[ColumnAlias.children];
9 | for (let i = param.tableCell.childNodes[0].childNodes.length - 1; i >= 0; i--) {
10 | param.tableCell.childNodes[0].childNodes[i].remove();
11 | }
12 |
13 | if (children.length > 0) {
14 | const icon = TbsGridDom.createElement('icon');
15 | const element = TbsGridDom.createElement('string');
16 | param.tableCell.childNodes[0].appendChild(icon);
17 | param.tableCell.childNodes[0].appendChild(element);
18 | }
19 | else {
20 | const element = TbsGridDom.createElement('string');
21 | param.tableCell.childNodes[0].appendChild(element);
22 | }
23 | }
24 |
25 | setBounding(param) {
26 | const row = param.grid.view_table.selectRowByRowIndex(param.rowIndex);
27 | const children = row[ColumnAlias.children];
28 | let rowDepth = row[ColumnAlias.depth];
29 |
30 | TbsGridDom.setStyle(param.tableCell, param);
31 |
32 | if (children.length > 0) {
33 | TbsGridDom.setCellStyle(param.tableCell.childNodes[0], 'paddingLeft', (rowDepth * 15) + 'px');
34 | param.grid.classTree.setTreeIcon(param.tableCell, param.rowIndex);
35 | }
36 | else {
37 | TbsGridDom.setCellStyle(param.tableCell.childNodes[0], 'paddingLeft', ((rowDepth * 15) + 15) + 'px');
38 | }
39 |
40 | const element = param.tableCell.querySelector('.tbs-grid-html-string');
41 | TbsGridDom.setCell(element, 'textContent', param.cellText);
42 | }
43 | }
--------------------------------------------------------------------------------
/src/summary/tbs.grid.footer.ts:
--------------------------------------------------------------------------------
1 | import {TbsGrid} from "../tbs.grid";
2 | import {ColumnAlias} from "../tbs.grid.types";
3 |
4 | export class TbsGridFooter {
5 | grid: TbsGrid;
6 | selector: string;
7 |
8 | constructor(grid: TbsGrid) {
9 | this.grid = grid;
10 | this.selector = `#${grid.gridId}`;
11 | }
12 |
13 | setFooterColumns(columns) {
14 | const grid = this.grid;
15 | columns.map(column => {
16 | if (grid.null(column[ColumnAlias.align])) column[ColumnAlias.align] = 'center';
17 | grid.footer_column_table.insert(column);
18 | });
19 | }
20 |
21 | setFooterData() {
22 | const grid = this.grid;
23 |
24 | if (grid.footer_column_table.count() == 0) return;
25 |
26 | let dataRow = {};
27 | let columns = grid.column_table.data;
28 | for (let x = 0, len = columns.length; x < len; x++) {
29 | let column = columns[x];
30 | let columnName = column[ColumnAlias.name];
31 | dataRow[columnName] = null;
32 | }
33 | grid.footer_table.insert(dataRow);
34 |
35 | /* get sum, avg */
36 | for (let x = 0, len2 = grid.footer_column_table.count(); x < len2; x++) {
37 | const footerColumn = grid.footer_column_table.data[x];
38 | let columnName = footerColumn[ColumnAlias.name];
39 |
40 | let summaryType = footerColumn[ColumnAlias.summaryType];
41 | let result = null;
42 |
43 | if (summaryType == 'avg') {
44 | result = grid.view_table.getAvg(columnName);
45 | grid.footer_table.updateByRowIndex(0, columnName, result);
46 | }
47 | else if (summaryType == 'sum') {
48 | result = grid.view_table.getSum(columnName);
49 | grid.footer_table.updateByRowIndex(0, columnName, result);
50 | }
51 | else if (summaryType == 'max') {
52 | result = grid.view_table.getMax(columnName);
53 | grid.footer_table.updateByRowIndex(0, columnName, result);
54 | }
55 | else if (summaryType == 'min') {
56 | result = grid.view_table.getMin(columnName);
57 | grid.footer_table.updateByRowIndex(0, columnName, result);
58 | }
59 | else grid.footer_table.updateByRowIndex(0, columnName, footerColumn[ColumnAlias.text]);
60 | }
61 | }
62 |
63 | setFooterValue(rowIndex, columnName, value) {
64 | const grid = this.grid;
65 | let column = grid.column_table.selectRow(ColumnAlias.name, columnName);
66 | const result: any = grid.getFormat(column, value);
67 | grid.footer_table.updateByRowIndex(rowIndex, columnName, result.value);
68 | }
69 | }
70 |
71 |
--------------------------------------------------------------------------------
/src/summary/tbs.grid.top.ts:
--------------------------------------------------------------------------------
1 | import {TbsGrid} from "../tbs.grid";
2 | import {ColumnAlias} from "../tbs.grid.types";
3 |
4 | export class TbsGridTop {
5 | grid: TbsGrid;
6 | selector: string;
7 |
8 | constructor(grid) {
9 | this.grid = grid;
10 | this.selector = '#' + grid.gridId;
11 | }
12 |
13 | setTopColumns(columns) {
14 | const grid = this.grid;
15 | columns.map(column => {
16 | if (grid.null(column[ColumnAlias.align])) column[ColumnAlias.align] = 'center';
17 | grid.top_column_table.insert(column);
18 | });
19 | }
20 |
21 | setTopData() {
22 | const grid = this.grid;
23 |
24 | if (grid.top_column_table.count() == 0) return;
25 |
26 | let topColumns = grid.top_column_table.data;
27 |
28 | let dataRow = {};
29 | let columns = grid.column_table.data;
30 | for (let x = 0, len = columns.length; x < len; x++) {
31 | let column = columns[x];
32 | let columnName = column[ColumnAlias.name];
33 | dataRow[columnName] = null;
34 | }
35 | grid.top_table.insert(dataRow);
36 |
37 | /* get sum, avg */
38 | for (let x = 0, len2 = grid.top_column_table.count(); x < len2; x++) {
39 | let footerColumn = grid.top_column_table.data[x];
40 | let columnName = footerColumn[ColumnAlias.name];
41 |
42 | let summaryType = footerColumn[ColumnAlias.summaryType];
43 | let result = null;
44 |
45 | if (summaryType == 'avg') {
46 | result = grid.view_table.getAvg(columnName);
47 | grid.top_table.updateByRowIndex(0, columnName, result);
48 | }
49 | else if (summaryType == 'sum') {
50 | result = grid.view_table.getSum(columnName);
51 | grid.top_table.updateByRowIndex(0, columnName, result);
52 | }
53 | else if (summaryType == 'max') {
54 | result = grid.view_table.getMax(columnName);
55 | grid.top_table.updateByRowIndex(0, columnName, result);
56 | }
57 | else if (summaryType == 'min') {
58 | result = grid.view_table.getMin(columnName);
59 | grid.top_table.updateByRowIndex(0, columnName, result);
60 | }
61 | else grid.top_table.updateByRowIndex(0, columnName, footerColumn[ColumnAlias.text]);
62 | }
63 | }
64 |
65 | setTopValue(rowIndex, columnName, value) {
66 | const grid = this.grid;
67 | let column = grid.column_table.selectRow(ColumnAlias.name, columnName);
68 | const result: any = grid.getFormat(column, value);
69 | grid.top_table.updateByRowIndex(rowIndex, columnName, result.value);
70 | }
71 | }
72 |
73 |
--------------------------------------------------------------------------------
/src/tbs.base.ts:
--------------------------------------------------------------------------------
1 | export class TbsBase {
2 | debug_mode: any;
3 |
4 | constructor() {
5 | this.debug_mode = false;
6 | }
7 |
8 | null(p: any) {
9 | return p == null || p == undefined;
10 | }
11 |
12 | notNull(p: any) {
13 | return !(this.null(p));
14 | }
15 |
16 | empty(p: any) {
17 | return p == null || p == undefined || this.trim(p) == '';
18 | }
19 |
20 | notEmpty(p: any) {
21 | return !(this.empty(p));
22 | }
23 |
24 | isNull(a: any, b: any) {
25 | return this.null(a) ? b : a;
26 | }
27 |
28 | error(p: any) {
29 | if (this.debug_mode) { console.log('[TbsGrid error] ' + p); }
30 | }
31 |
32 | caution(p: any) {
33 | if (this.debug_mode) { console.log('[TbsGrid caution] ' + p); }
34 | }
35 |
36 | copyJson(p: any) {
37 | return this.null(p) ? {} : JSON.parse(JSON.stringify(p));
38 | }
39 |
40 | substr2 (s: any, index: any, len: any) {
41 | let result = '';
42 | try {
43 | s = s.toString();
44 | if (arguments.length == 2) result = s.substring(index);
45 | else if (arguments.length == 3) result = s.substring(index).substring(0, len);
46 | return result;
47 | }
48 | catch (e) {
49 | return result;
50 | }
51 | }
52 |
53 | trim (s: any) {
54 | if (this.null(s)) return '';
55 | else return s.toString().replace(/^\s+|\s+$/gi,"");
56 | }
57 |
58 | round(num: number, dpLen: number) {
59 | if (num > 0) return + (Math.round(Number(num.toString() + 'e+' + dpLen.toString())) + 'e-' + dpLen.toString());
60 | else return -(Math.round(Number(Math.abs(num).toString() + 'e+' + dpLen.toString())) + 'e-' + dpLen.toString());
61 | }
62 |
63 | ceil(num: any, dpLen: any) {
64 | let s = '1';
65 | for (let i = 0; i < dpLen; i++) { s += '0'; }
66 | let n = parseInt(s);
67 | return (Math.ceil(num * n) / n);
68 | }
69 |
70 | floor(num: any, dpLen: any) {
71 | let s = '1';
72 | for (let i = 0; i < dpLen; i++) { s += '0'; }
73 | let n = parseInt(s);
74 | return (Math.floor(num * n) / n);
75 | }
76 |
77 | getProperty(jsonObject: any, property: any) {
78 | if (this.empty(jsonObject[property])) return null;
79 | else return jsonObject[property];
80 | }
81 |
82 | printMe() {
83 |
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/src/tbs.grid.cell.ts:
--------------------------------------------------------------------------------
1 |
2 | import {TbsGridDom} from "./tbs.grid.dom";
3 | import {TbsGrid} from "./tbs.grid";
4 | import {ColumnAlias} from "./tbs.grid.types";
5 |
6 | export class TbsGridCell {
7 | grid: TbsGrid;
8 | column: any;
9 |
10 | constructor(grid: TbsGrid, column: any) {
11 | this.grid = grid;
12 | this.column = column;
13 | }
14 |
15 | createHtml() {
16 | // const grid = this.grid;
17 | //
18 | // let type = this.column[ColumnAlias.type];
19 | // let cellTemplate = this.column[ColumnAlias.cellTemplate];
20 | //
21 | // if (grid.null(cellTemplate)) {
22 | // this.createCell(type);
23 | // }
24 | // else {
25 | // this.createTemplate();
26 | // }
27 | }
28 |
29 | createCell() {
30 |
31 | }
32 |
33 | createTemplate() {
34 |
35 | }
36 |
37 | hideTableCells(grid, panelName, tableRow, lastColumnIndex) {
38 | if (grid.fixedColumnIndex != -1) {
39 | for (let x = 0, len = grid.column_table.count(); x < len; x++) {
40 | let tableCell = tableRow.childNodes[x];
41 |
42 | if (panelName.substring(6) == '2' && x > grid.fixedColumnIndex) {
43 | TbsGridDom.setCellStyle(tableCell, 'width', '0px');
44 | TbsGridDom.setCellStyle(tableCell, 'display', 'none');
45 | }
46 | else if (panelName.substring(6) == '0' && x <= grid.fixedColumnIndex) {
47 | TbsGridDom.setCellStyle(tableCell, 'width', '0px');
48 | TbsGridDom.setCellStyle(tableCell, 'display', 'none');
49 | }
50 | }
51 | }
52 | }
53 |
54 | showSelectedCells(grid, panelName, tableCell, rowIndex, cellIndex) {
55 | let value = grid.isSelectedCell(panelName, rowIndex, cellIndex);
56 | if (value == 1) {
57 | if (grid.startRowIndex == rowIndex && grid.startCellIndex == cellIndex) tableCell.classList.add('tbs-grid-cell-start');
58 | else tableCell.classList.add('tbs-grid-cell-select');
59 | }
60 | }
61 | }
62 | /*
63 | export class TbsGridCellGroup extends TbsGridCell {}
64 |
65 | export class TbsGridCellTree extends TbsGridCell {}
66 |
67 | export class TbsGridCellCheckbox extends TbsGridCell {}
68 |
69 | export class TbsGridCellImage extends TbsGridCell {}
70 |
71 | export class TbsGridCellButton extends TbsGridCell {}
72 |
73 | */
--------------------------------------------------------------------------------
/src/tbs.grid.configs.ts:
--------------------------------------------------------------------------------
1 | export const tbsGridConfigs: object = {}
2 |
3 | /**
4 | * Basically, the language with the fastest order is applied.
5 | */
6 |
7 | tbsGridConfigs['en'] = {
8 | culture: {
9 | name: 'us',
10 | language: 'us',
11 | currencyChar: '$',
12 | decimalChar: '.',
13 | thousandChar: ',',
14 | },
15 | calendar: {
16 | dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
17 | dayShortNames: ['Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.'],
18 | dayPattern: 'MM-dd-yyyy',
19 | months : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
20 | prevLinkName : 'prev',
21 | nextLinkName : 'next',
22 | todayLinkName: 'today'
23 | },
24 | font: {
25 | fontSize: '12px',
26 | fontFamily: 'Arial, Helvetica, sans-serif',
27 | },
28 | labels: {
29 | /* placeholder */
30 | sort_placeholder : 'Drag columns to sort',
31 | group_placeholder : 'Drag columns to group',
32 |
33 | /* Filter Label */
34 | filter_select : 'Select',
35 | filter_equal : 'Equal',
36 | filter_notEqual : 'Does not equal',
37 | filter_greater : 'Greater than',
38 | filter_greaterEqual : 'Greater than or Equal to',
39 | filter_less : 'Less than',
40 | filter_lessEqual : 'Less than or Equal to',
41 | filter_between : 'Between',
42 | filter_blank : 'Blank',
43 | filter_include : 'Include',
44 | filter_notInclude : 'Not Include',
45 | filter_startCharacter: 'Start Characters',
46 | filter_endCharacter : 'End Characters',
47 |
48 | /* Toolbar Label */
49 | toolbar_button_filter : 'Filter',
50 | toolbar_button_sorting : 'Sorting',
51 | toolbar_button_grouping : 'Grouping',
52 | toolbar_button_expand : 'Expand',
53 | toolbar_button_collapse : 'Collapse',
54 | toolbar_button_fixedColumn: 'Fixed Column',
55 | toolbar_button_reset : 'Reset',
56 | }
57 | };
58 |
59 | tbsGridConfigs['ko'] = {
60 | culture: {
61 | name: 'ko',
62 | language: 'ko',
63 | currencyChar: '₩',
64 | decimalChar: '.',
65 | thousandChar: ',',
66 | },
67 | calendar: {
68 | dayNames: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
69 | dayShortNames: ['일', '월', '화', '수', '목', '금.', '토'],
70 | dayPattern: 'yyyy-MM-dd',
71 | months : ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
72 | prevLinkName : '이전',
73 | nextLinkName : '다음',
74 | todayLinkName: '오늘'
75 | },
76 | font: {
77 | fontSize: '12px',
78 | fontFamily: 'Nanum Gothic, Arial, Helvetica, sans-serif',
79 | },
80 | labels: {
81 | /* placeholder */
82 | sort_placeholder : '소팅 컬럼을 드래그 하세요',
83 | group_placeholder : '그룹 컬럼을 드래그 하세요.',
84 |
85 | /* Filter Lables */
86 | filter_select : '[선택]',
87 | filter_equal : '같음',
88 | filter_notEqual : '같지 않음',
89 | filter_greater : '보다 큼',
90 | filter_greaterEqual : '크거나 같음',
91 | filter_less : '보다 작음',
92 | filter_lessEqual : '작거나 같음',
93 | filter_between : '범위',
94 | filter_blank : '공백',
95 | filter_include : '포함',
96 | filter_notInclude : '포함 안함',
97 | filter_startCharacter: '시작 문자',
98 | filter_endCharacter : '끝 문자',
99 | filter_placeholder : '',
100 | /* Toolbar Label */
101 | toolbar_button_filter : '필터',
102 | toolbar_button_sorting : '소팅',
103 | toolbar_button_grouping : '그룹핑',
104 | toolbar_button_expand : '펼치기',
105 | toolbar_button_collapse : '접기',
106 | toolbar_button_fixedColumn: '고정컬럼',
107 | toolbar_button_reset : '초기화',
108 | }
109 | };
110 |
111 | /**
112 | * Write options at the end
113 | */
114 | tbsGridConfigs['options'] = {
115 | //imageRoot: 'https://cdn.jsdelivr.net/npm/tbsgrid@01.2.35/dist/assets/userImg/',
116 | isMobile: /iPhone|iPad|iPod|Android/i.test(navigator.userAgent), // true, false
117 | userAgent: navigator.userAgent, // 'safari' etc
118 |
119 | // trueValue : 'Y', // checkbox value
120 | // falseValue : 'N',
121 | // elseValue : 'N',
122 | }
123 |
124 |
--------------------------------------------------------------------------------
/src/tbs.grid.control.ts:
--------------------------------------------------------------------------------
1 | import {TbsGrid} from "./tbs.grid";
2 |
3 | export class TbsGridControl {
4 | grid: TbsGrid;
5 | selector: string;
6 |
7 | constructor(grid: TbsGrid) {
8 | this.grid = grid;
9 | this.selector = '#' + grid.gridId;
10 | }
11 |
12 | after_changeColumnOrder() {
13 | const grid = this.grid;
14 |
15 | grid.classColumn.createColumnTable();
16 | grid.classHeader.createHeaderColumns();
17 | grid.classHeader.createHeaderColumnTable();
18 | grid.updateGrid();
19 |
20 | grid.classRange.removeRange(0, -1);
21 | let _topRowIndex = grid.classRange.selectRange(0, 0, 0, 0);
22 | grid.classPanel30.setDataPanel(_topRowIndex);
23 | grid.classPanel20.setDataPanel();
24 | grid.classPanel40.setDataPanel();
25 | grid.classPanel50.setDataPanel();
26 | grid.classPanel70.setDataPanel();
27 | }
28 |
29 | after_addColumn() {
30 | const grid = this.grid;
31 |
32 | grid.classColumn.createColumnTable();
33 | grid.classHeader.createHeaderColumns();
34 | grid.classHeader.createHeaderColumnTable();
35 | grid.updateGrid();
36 |
37 | grid.classRange.removeRange(0, -1);
38 | let _topRowIndex = grid.classRange.selectRange(0, 0, 0, 0);
39 | grid.classPanel30.setDataPanel(_topRowIndex);
40 | grid.classPanel20.setDataPanel();
41 | }
42 |
43 | after_removeColumn(headerColumns, columns) {
44 | let selector = this.selector;
45 | const grid = this.grid;
46 | let classControl = this;
47 |
48 |
49 | grid.classColumn.createColumnTable();
50 | grid.classHeader.createHeaderColumns();
51 | grid.classHeader.createHeaderColumnTable();
52 | grid.updateGrid();
53 |
54 | grid.classRange.removeRange(0, -1);
55 | let _topRowIndex = grid.classRange.selectRange(0, 0, 0, 0);
56 | grid.classPanel30.setDataPanel(_topRowIndex);
57 | grid.classPanel20.setDataPanel();
58 | }
59 |
60 | after_showFilterPanel() {
61 | let selector = this.selector;
62 | const grid = this.grid;
63 | let classControl = this;
64 |
65 | grid.classRange.removeRange(0, -1);
66 | grid.classScroll.setPanelSize();
67 | grid.classPanel70.setDataPanel();
68 | grid.classPanel30.setDataPanel(0);
69 | }
70 |
71 | after_hideFilterPanel() {
72 | let selector = this.selector;
73 | const grid = this.grid;
74 | let classControl = this;
75 |
76 | grid.classRange.removeRange(0, -1);
77 | grid.classScroll.setPanelSize();
78 | grid.classPanel70.setDataPanel();
79 | grid.classPanel30.setDataPanel(0);
80 | }
81 |
82 | after_showSortrPanel() {
83 | let selector = this.selector;
84 | const grid = this.grid;
85 | let classControl = this;
86 |
87 | grid.classRange.removeRange(0, -1);
88 | grid.classScroll.setPanelSize();
89 | grid.classPanel30.setDataPanel(0);
90 | }
91 |
92 | after_hideSortPanel() {
93 | let selector = this.selector;
94 | const grid = this.grid;
95 | let classControl = this;
96 |
97 | grid.classRange.removeRange(0, -1);
98 | grid.classScroll.setPanelSize();
99 | grid.classPanel30.setDataPanel(0);
100 | }
101 |
102 | after_setColumnVisible() {
103 | let selector = this.selector;
104 | const grid = this.grid;
105 | let classControl = this;
106 |
107 | grid.classRange.removeRange(0, -1);
108 | grid.apply();
109 | }
110 | }
111 |
112 |
113 |
114 |
--------------------------------------------------------------------------------
/src/tbs.grid.dom.ts:
--------------------------------------------------------------------------------
1 | import { TbsBase } from './tbs.base';
2 |
3 | export class TbsGridDom extends TbsBase {
4 |
5 | static createElement(type){
6 | let tag = 'span';
7 | let tagType = '';
8 | let className = 'tbs-grid-html-string';
9 |
10 | if (type == 'string') {}
11 | else if (type == 'icon') {
12 | tag = 'span';
13 | className = 'tbs-grid-html-icon';
14 | }
15 | else if (type == 'checkbox') {
16 | tag = 'input';
17 | tagType = 'checkbox';
18 | className = 'tbs-grid-html-checkbox';
19 | }
20 | else if (type == 'button') {
21 | tag = 'button';
22 | tagType = 'button';
23 | className = 'tbs-grid-html-button';
24 | }
25 | else if (type == 'link') {
26 | tag = 'a';
27 | //tagType = 'button';
28 | className = 'tbs-grid-html-link';
29 | }
30 | else if (type == 'img') {
31 | tag = 'img';
32 | //tagType = 'button';
33 | className = 'tbs-grid-html-img';
34 | }
35 | return TbsGridDom.createHtml(tag, tagType, className);
36 | }
37 |
38 | static createHtml(tag, tagType, className) {
39 | const element = document.createElement(tag);
40 | element.classList.add(className);
41 | if (tag == 'input') element.type = tagType;
42 | return element;
43 | }
44 |
45 | static addElement() {
46 |
47 | }
48 |
49 | static setBounding() {
50 |
51 | }
52 |
53 | static setStyle(tableCell, param) {
54 | let className = param.className;
55 | let display = param.visible == true ? '' : 'none';
56 | let textAlign = param.align;
57 | let width = param.width;
58 |
59 | TbsGridDom.addUserClass(tableCell, className); // user event
60 | TbsGridDom.setCellStyle(tableCell, 'display', display);
61 | TbsGridDom.setCellStyle(tableCell, 'textAlign', textAlign); // user event
62 | TbsGridDom.setCellStyle(tableCell, 'width', width);
63 | }
64 |
65 | static setCell(element, property, value) {
66 | if (element[property] != value) element[property] = value;
67 | }
68 |
69 | static setCellStyle(tableCell, property, value) {
70 | if (tableCell.style[property] != value) tableCell.style[property] = value;
71 | }
72 |
73 | static addUserClass(tableCell, className) {
74 | TbsGridDom.removeUserClass(tableCell);
75 | if (className && className != '') tableCell.classList.add(className);
76 | }
77 |
78 | static removeUserClass(tableCell) {
79 | // Create classNameArray : for remove except tbs-* className
80 | const classNameArray = [];
81 | for (let i = 0, len = tableCell.classList.length; i < len; i++) {
82 | if (tableCell.classList[i].startsWith('tbs-grid-')) continue;
83 | else classNameArray.push(tableCell.classList[i]);
84 | }
85 | // Remove classNameArray
86 | for (let i = 0, len = classNameArray.length; i < len; i++) tableCell.classList.remove(classNameArray[i]);
87 | }
88 | /**
89 | * Dom Functions
90 | *
91 | */
92 | static createElementCellDiv() {
93 | const element = document.createElement('div');
94 | element.classList.add('tbs-grid-cell-div');
95 | return element;
96 | }
97 |
98 | static createElementCellText() {
99 | const element = document.createElement('span');
100 | element.classList.add('tbs-grid-html-string');
101 | element.textContent = '';
102 | return element;
103 | }
104 |
105 | static createTable() {
106 | const table = document.createElement('table');
107 | table.className = 'tbs-grid-table';
108 | return table;
109 | }
110 | }
111 |
112 |
--------------------------------------------------------------------------------
/src/tbs.grid.row.ts:
--------------------------------------------------------------------------------
1 |
2 | import { TbsGridDom } from "./tbs.grid.dom";
3 | import {TbsGrid} from "./tbs.grid";
4 | import {ColumnAlias} from "./tbs.grid.types";
5 |
6 | export class TbsGridRow {
7 | grid: TbsGrid;
8 |
9 | constructor(grid: TbsGrid) {
10 | this.grid = grid;
11 | }
12 |
13 | setTableHead(grid: TbsGrid, panelName: string) {
14 | let selector = '#' + grid.gridId;
15 |
16 | if (grid.fixedColumnIndex != -1) {
17 | let tableRow = document.querySelector(selector + ' .tbs-grid-' + panelName + ' .tbs-grid-table thead tr');
18 |
19 | for (let x = 0, len = grid.column_table.count(); x < len; x++) {
20 | let column = grid.column_table.data[x];
21 | let tableCell = tableRow.childNodes[x];
22 |
23 | TbsGridDom.setCellStyle(tableCell, 'width', column[ColumnAlias.width] + 'px');
24 | TbsGridDom.setCellStyle(tableCell, 'display', '');
25 | if (column[ColumnAlias.visible] == false) {
26 | TbsGridDom.setCellStyle(tableCell, 'width', '0px');
27 | TbsGridDom.setCellStyle(tableCell, 'display', 'none');
28 | }
29 | if (panelName.substring(6) == '2' && x > grid.fixedColumnIndex) {
30 | TbsGridDom.setCellStyle(tableCell, 'width', '0px');
31 | TbsGridDom.setCellStyle(tableCell, 'display', 'none');
32 | }
33 | else if (panelName.substring(6) == '0' && x <= grid.fixedColumnIndex) {
34 | TbsGridDom.setCellStyle(tableCell, 'width', '0px');
35 | TbsGridDom.setCellStyle(tableCell, 'display', 'none');
36 | }
37 | }
38 | }
39 | else {
40 | let tableRow = document.querySelector(selector + ' .tbs-grid-' + panelName + ' .tbs-grid-table thead tr');
41 |
42 | for (let x = 0, len = grid.column_table.count(); x < len; x++) {
43 | let column = grid.column_table.data[x];
44 | let tableCell = tableRow.childNodes[x];
45 | if (panelName.substring(6) == '0') {
46 | TbsGridDom.setCellStyle(tableCell, 'display', column[ColumnAlias.visible] ? '' : 'none');
47 | TbsGridDom.setCellStyle(tableCell, 'width', column[ColumnAlias.width] + 'px');
48 | }
49 | }
50 | }
51 | }
52 |
53 | setTableRow(grid, tableRow, rowIndex, panelName = 'panel30') {
54 | let selector = '#' + grid.gridId;
55 |
56 | tableRow.dataset.rowIndex = rowIndex;
57 |
58 | if (tableRow.style.height != grid.rowHeight + 'px') tableRow.style.height = grid.rowHeight + 'px';
59 |
60 | if (tableRow.style.display == 'none') tableRow.style.display = '';
61 |
62 | if (grid.group_column_table.count() > 0) {
63 | if (panelName.substring(6) == '0' || panelName.substring(6) == '2') {
64 | let rowData = grid.getRow(rowIndex);
65 | let depth = rowData[ColumnAlias.depth];
66 |
67 | if (depth == grid.group_column_table.count() + 1) TbsGridDom.addUserClass(tableRow, '.tbs-row-color-white');
68 | else if (depth <= 5) TbsGridDom.addUserClass(tableRow, 'tbs-row-color' + depth);
69 | else TbsGridDom.addUserClass(tableRow, '.tbs-row-color-white');
70 | }
71 | if (grid.onRowBounding) {
72 | if (panelName.substring(6) == '0' || panelName.substring(6) == '2') {
73 | let param = {element: tableRow, rowIndex: rowIndex, data: grid.getRow(rowIndex)};
74 | grid.executeEvent(grid.onRowBounding, 'onRowBounding', param);
75 | }
76 | }
77 | }
78 | else {
79 | TbsGridDom.removeUserClass(tableRow);
80 | if (panelName.substring(6) == '0' || panelName.substring(6) == '2') {
81 | let param = {element: tableRow, rowIndex: rowIndex, data: grid.getRow(rowIndex)};
82 | grid.executeEvent(grid.onRowBounding, 'onRowBounding', param);
83 | }
84 | }
85 | /* row alternative background color */
86 | grid.classRow.showAlternativeRowColor(grid, panelName, tableRow, rowIndex);
87 | }
88 |
89 | showAlternativeRowColor(grid, panelName, tableRow, rowIndex) {
90 | return;
91 | // tableRow.classList.remove('tbs-grid-tr-bg', 'tbs-grid-tr-bg2');
92 | // if (rowIndex % 2) tableRow.classList.add('tbs-grid-tr-bg2');
93 | // else tableRow.classList.add('tbs-grid-tr-bg');
94 | }
95 |
96 | hideTableRows(grid, panelName, tableRows, fromRowIndex, toRowIndex) {
97 | if (grid.column_table.count() == 0) {
98 | fromRowIndex = 0;
99 | }
100 | for (let i = fromRowIndex, len = tableRows.length; i < len; i++) {
101 | const tableRow = tableRows[i];
102 | if (tableRow) {
103 | if (tableRow.style.display != 'none') tableRow.style.display = 'none';
104 | }
105 | }
106 | }
107 | }
108 |
109 |
110 |
--------------------------------------------------------------------------------
/src/tbs.grid.table.ts:
--------------------------------------------------------------------------------
1 |
2 | import { TbsGridDom } from "./tbs.grid.dom";
3 | import {TbsGrid} from "./tbs.grid";
4 | import {ColumnAlias} from "./tbs.grid.types";
5 |
6 | export class TbsGridTable {
7 |
8 | grid: TbsGrid;
9 |
10 | constructor(grid: TbsGrid) {
11 | this.grid = grid;
12 | }
13 |
14 | createTable(panelName, startRowIndex, rowCount) {
15 | let selector = '#' + this.grid.gridId;
16 | const grid = this.grid;
17 |
18 | const table = TbsGridDom.createTable();
19 |
20 | /**
21 | * table head
22 | */
23 |
24 | this.createTableHead(panelName, table);
25 |
26 | /**
27 | * table body
28 | */
29 |
30 | let tbody = document.createElement('tbody');
31 | for (let rowIndex= startRowIndex; rowIndex < rowCount; rowIndex++) this.createTableRow(panelName, tbody);
32 | table.appendChild(tbody);
33 |
34 | document.querySelector(selector + ' .tbs-grid-' + panelName).innerHTML = '';
35 | document.querySelector(selector + ' .tbs-grid-' + panelName).appendChild(table);
36 |
37 | if (grid.column_table.count() == 0) {
38 | const tableRows = document.querySelectorAll(selector + ' .tbs-grid-' + panelName + ' tbody tr');
39 | for (let i = 0; i < tableRows.length; i++) {
40 | const tableRow: any = tableRows[i];
41 | tableRow.style.display = 'none';
42 | }
43 | }
44 | }
45 |
46 | createTableHead(panelName: string, table: any) {
47 | const grid = this.grid;
48 |
49 | let s = panelName.substring(6);
50 | if (s == '1') this.createTableHead1(panelName, table);
51 | else if (s == '2') this.createTableHead2(panelName, table);
52 | else this.createTableHead0(panelName, table);
53 | }
54 |
55 | createTableHead1(panelName: string, table: any) {
56 | const grid = this.grid;
57 |
58 | let thead = document.createElement('thead');
59 | let tr = document.createElement('tr');
60 | for (let i = 0, len = grid.info_column_table.count(); i < len; i++) {
61 | let dataRow = grid.info_column_table.data[i];
62 |
63 | let th = document.createElement('th');
64 | th.style.width = dataRow[ColumnAlias.width] + 'px';
65 | th.style.display = dataRow[ColumnAlias.visible] ? '' : 'none';
66 | tr.appendChild(th);
67 | }
68 | thead.appendChild(tr);
69 | table.appendChild(thead);
70 | }
71 |
72 | createTableHead2(panelName, table) {
73 | return this.createTableHead0(panelName, table);
74 | }
75 |
76 | createTableHead0(panelName, table) {
77 | let selector = '#' + this.grid.gridId;
78 | const grid = this.grid;
79 |
80 | let thead = document.createElement('thead');
81 | let tr = document.createElement('tr');
82 | let sumWidth = 0;
83 | for (let i = 0, len = grid.column_table.count(); i < len; i++) {
84 | let column = grid.column_table.data[i];
85 | let th = document.createElement('th');
86 | th.style.width = (column[ColumnAlias.visible] == true) ? parseInt(column[ColumnAlias.width]) + 'px' : '0px';
87 | th.style.display = (column[ColumnAlias.visible] == true) ? '' : 'none';
88 | sumWidth += (grid.column_table.data[i][ColumnAlias.visible] == true) ? parseInt(column[ColumnAlias.width]) : 0;
89 | tr.appendChild(th);
90 | }
91 | thead.appendChild(tr);
92 | table.appendChild(thead);
93 | return sumWidth;
94 | }
95 |
96 | createTableRow(panelName, tbody) {
97 | let selector = '#' + this.grid.gridId;
98 | const grid = this.grid;
99 |
100 | let tr: any = document.createElement('tr');
101 | if (panelName == 'panel20' || panelName == 'panel22') {
102 | tr.style = 'height:' + grid.headerRowHeight + 'px';
103 |
104 | for (let i = 0; i < grid.column_table.count(); i++) {
105 | let td = document.createElement('td');
106 |
107 | td.classList.add('tbs-grid-cell');
108 | td.style.display = 'none';
109 |
110 | let div = document.createElement('div');
111 | div.classList.add('tbs-grid-cell-div');
112 | td.appendChild(div);
113 |
114 | let input = document.createElement('input');
115 | input.type = 'checkbox';
116 | input.classList.add('tbs-grid-html-checkbox');
117 | input.style.display = 'none';
118 | div.appendChild(input);
119 |
120 | let span = document.createElement('span');
121 | span.classList.add('tbs-grid-html-string');
122 | div.appendChild(span);
123 |
124 | let spanSort = document.createElement('span');
125 | spanSort.classList.add('tbs-grid-html-sort');
126 | div.appendChild(spanSort);
127 |
128 | let reSizeDiv = document.createElement('div');
129 | reSizeDiv.classList.add('tbs-grid-html-resize');
130 |
131 | let sortDiv = document.createElement('div');
132 | sortDiv.classList.add('tbs-grid-html-sort');
133 |
134 | td.appendChild(div);
135 | td.appendChild(reSizeDiv);
136 | tr.appendChild(td);
137 | }
138 | tbody.appendChild(tr);
139 | }
140 | else if (panelName.substring(6) == '1') {
141 | tr.style = 'display:;height:' + grid.rowHeight + 'px';
142 |
143 | for (let i = 0; i < grid.info_column_table.count(); i++) {
144 | const column: any = grid.info_column_table.data[i];
145 | const td: any = document.createElement('td');
146 | td.classList.add('tbs-grid-cell');
147 | td.style.width = column[ColumnAlias.width] + 'px';
148 | td.dataset.name = column[ColumnAlias.name];
149 | td.dataset.columnIndex = i;
150 |
151 | let div = TbsGridDom.createElementCellDiv();
152 | td.appendChild(div);
153 | tr.appendChild(td);
154 | }
155 | tbody.appendChild(tr);
156 | }
157 | else {
158 | if (panelName == 'panel40' || panelName == 'panel50' || panelName == 'panel70') {
159 | tr.style = 'display:;height:' + grid.rowHeight + 'px';
160 | }
161 | else if (panelName == 'panel22' || panelName == 'panel42' || panelName == 'panel52' || panelName == 'panel72') {
162 | tr.style = 'display:;height:' + grid.rowHeight + 'px';
163 | }
164 | else {
165 | tr.style = 'display:none;height:' + grid.rowHeight + 'px';
166 | }
167 |
168 | for (let i = 0; i < grid.column_table.count(); i++) {
169 | const column: any = grid.column_table.data[i];
170 | const td: any = document.createElement('td');
171 | td.classList.add('tbs-grid-cell');
172 | td.style.width = column[ColumnAlias.width] + 'px';
173 |
174 | if (panelName == 'panel22' || panelName == 'panel32' || panelName == 'panel42' || panelName == 'panel52' || panelName == 'panel72') {
175 | td.style.display = 'none';
176 | }
177 |
178 | td.dataset.name = column[ColumnAlias.name];
179 | td.dataset.columnIndex = i;
180 |
181 | let div = TbsGridDom.createElementCellDiv();
182 | let spanText = TbsGridDom.createElementCellText();
183 | div.appendChild(spanText);
184 | td.appendChild(div);
185 | tr.appendChild(td);
186 | }
187 | tbody.appendChild(tr);
188 | }
189 | }
190 |
191 | updateTableRows(panelName, rowCount) {
192 | let selector = '#' + this.grid.gridId;
193 |
194 | /**
195 | * table row add
196 | */
197 |
198 | const tbody = document.querySelector(selector + ' .tbs-grid-' + panelName + ' table tbody');
199 | for (let rowIndex= 0; rowIndex < rowCount; rowIndex++) this.createTableRow(panelName, tbody);
200 | }
201 | }
--------------------------------------------------------------------------------
/src/tbs.grid.types.ts:
--------------------------------------------------------------------------------
1 | export interface FormatData {
2 | text: string,
3 | value: string | number
4 | }
5 |
6 | export interface TopColumn {
7 | name: string,
8 | text?: string,
9 | align?: string,
10 | summaryType?: string,
11 | className?: string,
12 | }
13 |
14 | export interface FooterColumn {
15 | name: string,
16 | text?: string,
17 | align?: string,
18 | summaryType?: string,
19 | className?: string,
20 | }
21 |
22 | export interface GroupColumn {
23 | name: string
24 | }
25 |
26 | export interface SortColumn {
27 | name: string,
28 | order: string,
29 | orderNumber: number
30 | }
31 |
32 | export interface FilterColumn {
33 | name: string,
34 | type: string,
35 | value: any,
36 | }
37 |
38 | export interface Column {
39 | _rowId: number,
40 | _rowMode: string,
41 | _isChecked: boolean,
42 | _number: number,
43 | _parentNumber: number,
44 | _depth: number;
45 |
46 | _childRowIds: any[],
47 | _childRows: any[],
48 | _childCount: number,
49 | _isOpen: boolean,
50 |
51 | /**
52 | * User Property
53 | */
54 | name: string,
55 | text?: string,
56 | type?: string,
57 | children?: string,
58 | dataType?: string,
59 | width?: string | number,
60 | editable?: boolean,
61 | visible?: boolean,
62 | align?: string,
63 | scale?: string,
64 | roundType?: string,
65 | fixedScale?: string,
66 | scaleMax?: string,
67 | scaleMin?: string,
68 | showZero?: boolean,
69 | commaUnit?: boolean,
70 | thousandChar?: boolean,
71 | decimalChar?: string,
72 | currencyChar?: string,
73 | className?: string,
74 | resizable?: boolean,
75 | sortable?: boolean,
76 | movable?: boolean,
77 | autoResizable?: boolean,
78 | autoWidth?: boolean,
79 | summaryType?: string,
80 | required?: boolean,
81 | format?: boolean,
82 | kind?: ColumnKind,
83 | }
84 |
85 | export interface GridOption {
86 | showToolbarPanel?: boolean,
87 | showFilterPanel?: boolean,
88 | showSortPanel?: boolean,
89 | showGroupPanel?: boolean,
90 |
91 | // Columns GridOption
92 | sortable?: boolean,
93 | resizable?: boolean,
94 | movable?: boolean,
95 | autoResizable?: boolean,
96 | autoWidth?: boolean,
97 |
98 | // Rows GridOption
99 | selectMode?: string,
100 | addRow?: boolean,
101 | delRow?: boolean,
102 | insertRow?: boolean,
103 | updateRow?: boolean,
104 | deleteRow?: boolean,
105 | zeroChar?: string,
106 | useToolbar?: boolean,
107 | imageRoot?: string,
108 |
109 | // Tree Options
110 | treeItemName?: string,
111 | treeParentName?: string,
112 | treeRootValue?: string,
113 |
114 | // Paging Options
115 | pageRowCount?: number;
116 | pageRowCountList?: number[];
117 |
118 | trueValue?: any;
119 | falseValue?: any;
120 | elseValue?: any;
121 | }
122 |
123 | export interface GridRenderer {
124 | trueValue?: any;
125 | falseValue?: any;
126 | elseValue?: any;
127 | }
128 | export enum ClickPageOrder {
129 | first = 'first',
130 | last = 'last',
131 | prev = 'prev',
132 | next = 'next'
133 | }
134 |
135 | export enum FilterType {
136 | Select = 0,
137 | Equal = 1,
138 | NotEqual = 2,
139 | Greater = 3,
140 | GreaterEqual = 4,
141 | Less = 5,
142 | LessEqual = 6,
143 | Between = 7,
144 | Blank = 8,
145 | Include = 9,
146 | NotInclude = 10,
147 | StartCharacter = 11,
148 | EndCharacter = 12,
149 | }
150 |
151 | export enum ColumnKind {
152 | column = 'column',
153 | header = 'header',
154 | empty = 'empty',
155 | }
156 |
157 | export enum CellType {
158 | string = 'string',
159 | number = 'number',
160 | date = 'date',
161 | combo = 'combo',
162 | checkbox = 'checkbox',
163 | img = 'img',
164 | button = 'button',
165 | link = 'link',
166 | group = 'group',
167 | tree = 'tree'
168 | }
169 |
170 | export enum GridMode {
171 | grid = '',
172 | tree = 'tree',
173 | page = 'page',
174 | pagination = 'pagination',
175 | }
176 |
177 | export enum AddRowDirection {
178 | top = 'top',
179 | bottom = 'bottom',
180 | before = 'before',
181 | after = 'after'
182 | }
183 |
184 | export enum Direction {
185 | up = 'up',
186 | down = 'down',
187 | left = 'left',
188 | right = 'right',
189 | }
190 |
191 | export enum BeforeAfter {
192 | before = 'before',
193 | after = 'after'
194 | }
195 |
196 | /**
197 | * Alias
198 | */
199 |
200 | export enum OptionAlias {
201 | rowMode = 'rowMode',
202 | checkbox = 'checkbox',
203 | numWidth = 'numWidth',
204 | rowModeWidth = 'rowModeWidth',
205 | checkBoxWidth = 'checkBoxWidth',
206 | insertRow = 'insertRow',
207 | updateRow = 'updateRow',
208 | deleteRow = 'deleteRow',
209 | zeroChar = 'zeroChar',
210 | useToolbar = 'useToolbar',
211 | imageRoot = 'imageRoot',
212 | }
213 |
214 | export enum ColumnAlias {
215 | rowId = '_rowId',
216 | rowMode = '_mode',
217 | isChecked = '_isChecked',
218 | num = '_number',
219 | mode = '_mode',
220 | checkbox = '_checkbox',
221 | parentNum = '_parentNumber',
222 | depth = '_depth',
223 | children = 'children',
224 | childRowIds = '_childRowIds',
225 | childRows = '_childRows',
226 | childCount = '_childCount',
227 | isOpen = '_isOpen',
228 | isShow = '_isShow',
229 | open = 'open',
230 | closed = 'closed',
231 | rowCount = '_rowCount',
232 | /**
233 | * User Property
234 | */
235 | name = 'name',
236 | text = 'text',
237 | type = 'type',
238 | dataType = 'dataType',
239 | width = 'width',
240 | editable = 'editable',
241 | visible = 'visible',
242 | align = 'align',
243 | scale = 'scale',
244 | roundType = 'roundType',
245 | fixedScale = 'fixedScale',
246 | scaleMax = 'scaleMax',
247 | scaleMin = 'scalemin',
248 | showZero = 'showZero',
249 | commaUnit = 'commaUnit', // to be deprecated, Fixed 3
250 | thousandChar = 'thousandChar',
251 | decimalChar = 'decimalChar',
252 | currencyChar = 'currencyChar',
253 | className = 'className', // className
254 | resizable = 'resizable',
255 | sortable = 'sortable',
256 | movable = 'movable',
257 | autoResizable = 'autoResizable',
258 | autoWidth = 'autoWidth',
259 | summaryType = 'summaryType',
260 | required = 'required',
261 | combo = 'combo',
262 | format = 'format',
263 | kind = 'kind', //header, column, empty
264 | rowSpan = 'rowSpan',
265 | colSpan = 'colSpan',
266 | rowIndex = 'rowIndex',
267 | colIndex = 'colIndex',
268 | subRowSpan = 'subRowSpan',
269 | subColSpan = 'subColSpan',
270 | order = 'order',
271 | value = 'value'
272 | }
273 |
274 | export enum RowAlias {
275 | selectMode = 'selectMode',
276 | addRow = 'addRow',
277 | delRow = 'delRow'
278 | }
279 |
280 | export enum TreeAlias {
281 | itemName = 'itemName',
282 | parentName = 'parentName',
283 | rootValue = 'rootValue',
284 | }
285 |
286 |
287 |
288 |
289 |
--------------------------------------------------------------------------------
/src_css/img/calendar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src_css/img/calendar.png
--------------------------------------------------------------------------------
/src_css/img/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src_css/img/delete.png
--------------------------------------------------------------------------------
/src_css/img/down-arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src_css/img/down-arrow.png
--------------------------------------------------------------------------------
/src_css/img/filter_find.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src_css/img/filter_find.png
--------------------------------------------------------------------------------
/src_css/img/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src_css/img/loading.gif
--------------------------------------------------------------------------------
/src_css/img/remove.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src_css/img/remove.png
--------------------------------------------------------------------------------
/src_css/img/save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src_css/img/save.png
--------------------------------------------------------------------------------
/src_css/img/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src_css/img/search.png
--------------------------------------------------------------------------------
/src_css/img/select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src_css/img/select.png
--------------------------------------------------------------------------------
/src_css/img/start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src_css/img/start.png
--------------------------------------------------------------------------------
/src_css/img/tree_closed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src_css/img/tree_closed.png
--------------------------------------------------------------------------------
/src_css/img/tree_open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tobesimple7/TbsGrid/7d4c30699b8fa4f55d1c25adf154c7ff56183dee/src_css/img/tree_open.png
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "outDir": "./dist-source",
4 | //"noEmit": true,
5 | "sourceMap": false,
6 | "emitDeclarationOnly": false,
7 | "noImplicitAny": false,
8 | "strictNullChecks": false,
9 | "target": "ES5",
10 | "module": "commonJS",
11 | "jsx": "react",
12 | "allowJs": false,
13 | "moduleResolution": "node",
14 | "resolveJsonModule": true,
15 | "baseUrl": ".",
16 | "paths": {
17 | "@t/*": ["types/*"]
18 | },
19 | //"typeRoots": ["./types"],
20 | "types": ["node"],
21 | "lib": ["esnext", "dom", "dom.iterable"],
22 | "typeRoots": ["./node_modules/@types"],
23 | //"typeRoots": ["./types", "./node_modules/@types"],
24 | "declaration": true,
25 | //"declarationMap": false,
26 | },
27 | "include": ["src"],
28 | "exclude" : ["node_modules"]
29 | }
--------------------------------------------------------------------------------
/types/base/tbs.base.d.ts:
--------------------------------------------------------------------------------
1 | export declare class TbsBase {
2 | debug_mode: any;
3 | constructor();
4 | null(p: any): boolean;
5 | notNull(p: any): boolean;
6 | empty(p: any): boolean;
7 | notEmpty(p: any): boolean;
8 | isNull(a: any, b: any): any;
9 | error(p: any): void;
10 | caution(p: any): void;
11 | copyJson(p: any): any;
12 | substr2(s: any, index: any, len: any): string;
13 | trim(s: any): any;
14 | round(num: number, dpLen: number): number;
15 | ceil(num: any, dpLen: any): number;
16 | floor(num: any, dpLen: any): number;
17 | getProperty(jsonObject: any, property: any): any;
18 | printMe(): void;
19 | }
20 | //# sourceMappingURL=tbs.base.d.ts.map
--------------------------------------------------------------------------------
/types/base/tbs.base.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.base.d.ts","sourceRoot":"","sources":["../../src/base/tbs.base.ts"],"names":[],"mappings":"AAAA,qBAAa,OAAO;IAChB,UAAU,EAAE,GAAG,CAAC;;IAMhB,IAAI,CAAC,CAAC,EAAE,GAAG;IAIX,OAAO,CAAC,CAAC,EAAE,GAAG;IAId,KAAK,CAAC,CAAC,EAAE,GAAG;IAIZ,QAAQ,CAAC,CAAC,EAAE,GAAG;IAIf,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG;IAIrB,KAAK,CAAC,CAAC,EAAE,GAAG;IAIZ,OAAO,CAAC,CAAC,EAAE,GAAG;IAId,QAAQ,CAAC,CAAC,EAAE,GAAG;IAIf,OAAO,CAAE,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;IAarC,IAAI,CAAE,CAAC,EAAE,GAAG;IAKZ,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAKhC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAOzB,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAO1B,WAAW,CAAC,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;IAK1C,OAAO;CAGV"}
--------------------------------------------------------------------------------
/types/base/tbs.data.array.table.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsBase } from "./tbs.base";
2 | export declare class TbsDataArrayTable extends TbsBase {
3 | tableName: string;
4 | data: object[][];
5 | currentRowId: number;
6 | type: string;
7 | constructor(tableName: string);
8 | /**
9 | * select functions
10 | */
11 | selectRows(arrayIndex: any, field: any, value: any, topIndex?: any): object[];
12 | selectRow(arrayIndex: any, field: any, value: any): object;
13 | selectRowByRowIndex(arrayIndex: any, rowIndex: any): object;
14 | selectRowByRowId(arrayIndex: any, rowId: any): object;
15 | selectRowIndexByRowId(arrayIndex: any, rowId: any): any;
16 | selectRowIndex(arrayIndex: any, field: any, value: any): any;
17 | selectRowIdByRowIndex(arrayIndex: any, rowIndex: any): any;
18 | selectRowRange(arrayIndex: any, startRowIndex: any, endRowIndex: any): any[];
19 | selectValue(arrayIndex: any, rowIndex: any, field: any): any;
20 | isRow(arrayIndex: any, field: any, value: any): boolean;
21 | /**
22 | * Insert
23 | */
24 | insertRows(arrayIndex: any, dataRows: any): void;
25 | insertRowsBefore(arrayIndex: any, dataRows: any, rowIndex: any): void;
26 | insertRowsAfter(arrayIndex: any, dataRows: any, rowIndex: any): void;
27 | insert(arrayIndex: any, dataRow: any): void;
28 | insertBefore(arrayIndex: any, dataRow: any, rowIndex: any): void;
29 | insertAfter(arrayIndex: any, dataRow: any, rowIndex: any): void;
30 | /**
31 | * Remove
32 | */
33 | remove(arrayIndex?: any, rowIndex?: any): void;
34 | removeByRowId(arryIndex: any, rowId: any): void;
35 | /**
36 | * Update
37 | */
38 | update(arrayIndex: any, columnName: any, field: any, value: any): void;
39 | updateRow(arrayIndex: any, columnName: any, field: any, value: any): void;
40 | updateByRowIndex(arrayIndex: any, rowIndex: any, name: any, value: any): void;
41 | updateByRowId(arrayIndex: any, rowId: any, name: any, value: any): void;
42 | count(arrayIndex?: any, field?: any, value?: any): number;
43 | makeColIndex(): void;
44 | }
45 | //# sourceMappingURL=tbs.data.array.table.d.ts.map
--------------------------------------------------------------------------------
/types/base/tbs.data.array.table.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.data.array.table.d.ts","sourceRoot":"","sources":["../../src/base/tbs.data.array.table.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAC;AAKnC,qBAAa,iBAAkB,SAAQ,OAAO;IAE1C,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;gBAED,SAAS,EAAE,MAAM;IAQ7B;;OAEG;IACH,UAAU,CAAC,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,GAAG;IAclE,SAAS,CAAC,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAKjD,mBAAmB,CAAC,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;IAElD,gBAAgB,CAAC,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAK5C,qBAAqB,CAAC,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAEjD,cAAc,CAAC,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAStD,qBAAqB,CAAC,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;IAKpD,cAAc,CAAC,UAAU,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG;IAQpE,WAAW,CAAC,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAItD,KAAK,CAAC,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAK7C;;OAEG;IACH,UAAU,CAAC,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;IAYzC,gBAAgB,CAAC,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;IAa9D,eAAe,CAAC,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;IAa7D,MAAM,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG;IAWpC,YAAY,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;IAYzD,WAAW,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG;IAWxD;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,GAAG;IAMvC,aAAa,CAAC,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAKxC;;OAEG;IAEH,MAAM,CAAC,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAI/D,SAAS,CAAC,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAIlE,gBAAgB,CAAC,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAKtE,aAAa,CAAC,UAAU,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAKhE,KAAK,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,GAAG,GAAI,MAAM;IAY1D,YAAY,IAAM,IAAI;CAMzB"}
--------------------------------------------------------------------------------
/types/base/tbs.data.cell.d.ts:
--------------------------------------------------------------------------------
1 | export declare class TbsDataCell {
2 | constructor();
3 | }
4 | //# sourceMappingURL=tbs.data.cell.d.ts.map
--------------------------------------------------------------------------------
/types/base/tbs.data.cell.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.data.cell.d.ts","sourceRoot":"","sources":["../../src/base/tbs.data.cell.ts"],"names":[],"mappings":"AAEA,qBAAa,WAAW;;CAIvB"}
--------------------------------------------------------------------------------
/types/base/tbs.data.row.d.ts:
--------------------------------------------------------------------------------
1 | export declare class TbsDataRow {
2 | constructor();
3 | }
4 | //# sourceMappingURL=tbs.data.row.d.ts.map
--------------------------------------------------------------------------------
/types/base/tbs.data.row.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.data.row.d.ts","sourceRoot":"","sources":["../../src/base/tbs.data.row.ts"],"names":[],"mappings":"AAEA,qBAAa,UAAU;;CAQtB"}
--------------------------------------------------------------------------------
/types/base/tbs.data.table.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsBase } from './tbs.base';
2 | export declare class TbsDataTable extends TbsBase {
3 | tableName: string;
4 | data: any[];
5 | currentRowId: number;
6 | type: string;
7 | constructor(tableName: string);
8 | /**
9 | * select functions
10 | */
11 | select(): void;
12 | selectRows(field?: string, value?: any, topIndex?: number): object[];
13 | selectRow(field: any, value: any): object;
14 | selectRowByRowIndex(rowIndex: number): object;
15 | selectRowByRowId(rowId: any): object;
16 | selectRowIndexByRowId(rowId: any): number;
17 | selectRowIndex(field: any, value: any): number;
18 | selectRowIdByRowIndex(rowIndex: any): any;
19 | selectRowRange(startRowIndex?: number, endRowIndex?: number): object[];
20 | selectValue(rowIndex: any, field: any): any;
21 | isRow(field: any, value: any): boolean;
22 | /**
23 | * Insert
24 | */
25 | insertRows(dataRows: any): void;
26 | insertRowsBefore(dataRows: object[], rowIndex: number): void;
27 | insertRowsAfter(dataRows: object[], rowIndex: number): void;
28 | insert(dataRow: object): void;
29 | insertBefore(dataRow: object, rowIndex: any): void;
30 | insertAfter(dataRow: any, rowIndex: number): void;
31 | /**
32 | * Remove
33 | */
34 | remove(rowIndex?: number): void;
35 | removeByRowId(rowId: any): void;
36 | /**
37 | * Update
38 | */
39 | update(columnName: string, field: string, value: any): void;
40 | updateRow(columnName: string, field: string, value: any): void;
41 | updateByRowIndex(rowIndex: number, name: string, value: any): void;
42 | updateByRowId(rowId: number, name: string, value: any): void;
43 | count(field?: any, value?: any): number;
44 | getSum(columnName: string): number;
45 | getAvg(columnName: string): number;
46 | getMax(columnName: string): number;
47 | getMin(columnName: string): number;
48 | }
49 | //# sourceMappingURL=tbs.data.table.d.ts.map
--------------------------------------------------------------------------------
/types/base/tbs.data.table.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.data.table.d.ts","sourceRoot":"","sources":["../../src/base/tbs.data.table.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAMrC,qBAAa,YAAa,SAAQ,OAAO;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;gBAED,SAAS,EAAE,MAAM;IAQ7B;;OAEG;IAEH,MAAM;IASN,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,MAAM;IAmBzD,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,MAAM;IAKzC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAE7C,gBAAgB,CAAC,KAAK,EAAE,GAAG,GAAI,MAAM;IAKrC,qBAAqB,CAAC,KAAK,EAAE,GAAG,GAAI,MAAM;IAE1C,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,GAAI,MAAM;IAS/C,qBAAqB,CAAC,QAAQ,EAAE,GAAG;IAKnC,cAAc,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;IAQ3D,WAAW,CAAC,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAIrC,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAK5B;;OAEG;IACH,UAAU,CAAC,QAAQ,EAAE,GAAG;IAWxB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM;IAYrD,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM;IAapD,MAAM,CAAC,OAAO,EAAE,MAAM;IAStB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG;IAW3C,WAAW,CAAC,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM;IAW1C;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM;IAKxB,aAAa,CAAC,KAAK,EAAE,GAAG;IAKxB;;OAEG;IAEH,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;IAIpD,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;IAIvD,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;IAK3D,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG;IAKrD,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,GAAG;IAkD9B,MAAM,CAAC,UAAU,EAAE,MAAM;IASzB,MAAM,CAAC,UAAU,EAAE,MAAM;IAMzB,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAYlC,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;CAgIrC"}
--------------------------------------------------------------------------------
/types/base/tbs.database.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsBase } from './tbs.base';
2 | import { TbsDataTable } from "./tbs.data.table";
3 | import { TbsDataArrayTable } from "./tbs.data.array.table";
4 | export type DataTableType = TbsDataTable | TbsDataArrayTable;
5 | export declare class TbsDatabase extends TbsBase {
6 | tables: DataTableType[];
7 | constructor();
8 | createTable(tableName: string): TbsDataTable;
9 | createView(tableName: string): TbsDataTable;
10 | createArrayTable(tableName: string): TbsDataArrayTable;
11 | removeTable(tableName: string): void;
12 | getTable(tableName: string): DataTableType;
13 | }
14 | //# sourceMappingURL=tbs.database.d.ts.map
--------------------------------------------------------------------------------
/types/base/tbs.database.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.database.d.ts","sourceRoot":"","sources":["../../src/base/tbs.database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAC,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,iBAAiB,CAAC;AAG7D,qBAAa,WAAY,SAAQ,OAAO;IACpC,MAAM,EAAE,aAAa,EAAE,CAAC;;IAOxB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY;IAQ5C,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY;IAQ3C,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,iBAAiB;IAQtD,WAAW,CAAC,SAAS,EAAE,MAAM,GAAI,IAAI;IAUrC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAI,aAAa;CAW9C"}
--------------------------------------------------------------------------------
/types/columns/tbs.grid.columns.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "../tbs.grid";
2 | export declare class TbsGridColumns {
3 | grid: TbsGrid;
4 | selector: string;
5 | constructor(grid: any);
6 | getUserColumns(): any[];
7 | setColumnDefaultValue(column: any): any;
8 | createColumns(columns: any): void;
9 | createColumnTable(): void;
10 | addColumn(addColumn: any, columnIndex: any, orderType: any): void;
11 | removeColumn(targetColumnIndex: any): void;
12 | getParentTableCell(column: any): any;
13 | changeColumnOrder(moveColumn: any, targetColumn: any, orderType: any): void;
14 | getSelectedTableCell(rowIndex?: any, cellIndex?: any): any;
15 | getRowIndexInTable(tableRowIndex: any, panelName?: any): number;
16 | getLeftTableCell(rowIndex: any, panel?: any): any;
17 | getJsonRow(jsonArray: any, name: any, value: any): any;
18 | setFixedColumn(fixedColumnIndex: any): void;
19 | removeFixedColumn(): void;
20 | getFirstVisibleColumnIndex(): any;
21 | getLastVisibleColumnIndex(): any;
22 | }
23 | //# sourceMappingURL=tbs.grid.columns.d.ts.map
--------------------------------------------------------------------------------
/types/columns/tbs.grid.columns.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.columns.d.ts","sourceRoot":"","sources":["../../src/columns/tbs.grid.columns.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAEpC,qBAAa,cAAc;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;gBAEL,IAAI,EAAE,GAAG;IAKrB,cAAc;IAgDd,qBAAqB,CAAC,MAAM,EAAE,GAAG;IAuCjC,aAAa,CAAC,OAAO,EAAE,GAAG;IAe1B,iBAAiB;IAiBjB,SAAS,CAAC,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG;IA4B1D,YAAY,CAAC,iBAAiB,EAAE,GAAG;IA8BnC,kBAAkB,CAAC,MAAM,EAAE,GAAG;IAuB9B,iBAAiB,CAAC,UAAU,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG;IAgHpE,oBAAoB,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,SAAS,CAAC,EAAE,GAAG;IA6BpD,kBAAkB,CAAC,aAAa,EAAE,GAAG,EAAE,SAAS,GAAE,GAAe;IAWjE,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE,KAAK,GAAE,GAAe;IActD,UAAU,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG;IAYhD,cAAc,CAAC,gBAAgB,EAAE,GAAG;IAgBpC,iBAAiB;IAYjB,0BAA0B;IAW1B,yBAAyB;CAU3B"}
--------------------------------------------------------------------------------
/types/columns/tbs.grid.headers.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "../tbs.grid";
2 | export declare class TbsGridHeaders {
3 | grid: TbsGrid;
4 | selector: string;
5 | constructor(grid: TbsGrid);
6 | createHeaderColumns(): void;
7 | createHeaderColumnTable(): void;
8 | updateHeaderFixedColumns(): void;
9 | getDisplayedHeaderColumn(panelName?: string): {
10 | startColumnIndex: number;
11 | lastColumnIndex: number;
12 | };
13 | getHeaderRootColumn(rowId: any): void;
14 | getHeaderParentColumn(rowId: any): void;
15 | getHeaderColumnByRowId(rowId: any): void;
16 | getHeaderChildColumns(rowId: any, depth?: number): void;
17 | setHeaderValue(rowIndex: any, columnIndex: any, value: any): void;
18 | getHeaderColumn(rowIndex: any, columnIndex: any): object;
19 | getHeaderColumnByNumber(num: any): any;
20 | getHeaderPropertyByIndex(columnIndex: any, property: any): any;
21 | getHeaderProperty(columnName: any, property: any): any;
22 | setHeaderProperty(rowIndex: any, colIndex: any, property: any, value: any): void;
23 | }
24 | //# sourceMappingURL=tbs.grid.headers.d.ts.map
--------------------------------------------------------------------------------
/types/columns/tbs.grid.headers.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.headers.d.ts","sourceRoot":"","sources":["../../src/columns/tbs.grid.headers.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAKpC,qBAAa,cAAc;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;gBAEL,IAAI,EAAE,OAAO;IAKzB,mBAAmB;IAwDnB,uBAAuB;IA6IvB,wBAAwB;IA0BxB,wBAAwB,CAAC,SAAS,SAAY;;;;IAuB9C,mBAAmB,CAAC,KAAK,KAAA;IAGzB,qBAAqB,CAAC,KAAK,KAAA;IAG3B,sBAAsB,CAAC,KAAK,KAAA;IAG5B,qBAAqB,CAAC,KAAK,KAAA,EAAE,KAAK,SAAI;IAItC,cAAc,CAAC,QAAQ,KAAA,EAAE,WAAW,KAAA,EAAE,KAAK,KAAA;IAI3C,eAAe,CAAC,QAAQ,KAAA,EAAE,WAAW,KAAA;IAKrC,uBAAuB,CAAC,GAAG,KAAA;IAiB3B,wBAAwB,CAAC,WAAW,KAAA,EAAE,QAAQ,KAAA;IAS9C,iBAAiB,CAAC,UAAU,KAAA,EAAE,QAAQ,KAAA;IAQtC,iBAAiB,CAAC,QAAQ,KAAA,EAAE,QAAQ,KAAA,EAAE,QAAQ,KAAA,EAAE,KAAK,KAAA;CAqBvD"}
--------------------------------------------------------------------------------
/types/export/tbs.grid.excel.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "../tbs.grid";
2 | export declare class TbsGridExcel {
3 | grid: TbsGrid;
4 | constructor(grid: TbsGrid);
5 | exportExcel(options: any): void;
6 | s2ab(s: any): ArrayBuffer;
7 | createTableHead(): any[];
8 | createPanel20(): any[];
9 | createPanel30(): any[];
10 | createPanel40(): any[];
11 | createPanel50(): any[];
12 | }
13 | //# sourceMappingURL=tbs.grid.excel.d.ts.map
--------------------------------------------------------------------------------
/types/export/tbs.grid.excel.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.excel.d.ts","sourceRoot":"","sources":["../../src/export/tbs.grid.excel.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAGpC,qBAAa,YAAY;IACrB,IAAI,EAAE,OAAO,CAAC;gBAEF,IAAI,EAAE,OAAO;IAIzB,WAAW,CAAC,OAAO,EAAE,GAAG;IAyFxB,IAAI,CAAC,CAAC,KAAA;IAON,eAAe;IAcf,aAAa;IAiCb,aAAa;IAqCb,aAAa;IA4Cb,aAAa;CAwChB"}
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel.base.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsBase } from "../base/tbs.base";
2 | import { TbsGrid } from "../tbs.grid";
3 | export declare class TbsGridPanelBase extends TbsBase {
4 | grid: TbsGrid;
5 | selector: string;
6 | panelName: string;
7 | panelName1: string;
8 | panelName2: string;
9 | panelName0: string;
10 | constructor(grid: TbsGrid);
11 | /**
12 | * Panel Interface
13 | */
14 | createHtml(parentElement: any): void;
15 | createEtcHtml(parentElement: any): void;
16 | }
17 | //# sourceMappingURL=tbs.grid.panel.base.d.ts.map
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel.base.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.panel.base.d.ts","sourceRoot":"","sources":["../../src/panels/tbs.grid.panel.base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAEpC,qBAAa,gBAAkB,SAAQ,OAAO;IAC1C,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;gBAEP,IAAI,EAAE,OAAO;IAUzB;;OAEG;IACH,UAAU,CAAC,aAAa,KAAA;IAExB,aAAa,CAAC,aAAa,EAAE,GAAG;CAmDnC"}
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel10.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGridPanelBase } from './tbs.grid.panel.base';
2 | import { TbsGrid } from "../tbs.grid";
3 | export declare class TbsGridPanel10 extends TbsGridPanelBase {
4 | grid: TbsGrid;
5 | panelName: string;
6 | constructor(grid: TbsGrid);
7 | createHtml(parentElement: any): void;
8 | createTable(): void;
9 | panel10_select(): void;
10 | showToolbarPanel(): void;
11 | hideToolbarPanel(): void;
12 | showToolbarButtons(buttonType: any): void;
13 | hideToolbarButtons(buttonType: any): void;
14 | }
15 | //# sourceMappingURL=tbs.grid.panel10.d.ts.map
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel10.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.panel10.d.ts","sourceRoot":"","sources":["../../src/panels/tbs.grid.panel10.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAEpC,qBAAa,cAAe,SAAQ,gBAAgB;IAChD,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;gBACN,IAAI,EAAE,OAAO;IAMzB,UAAU,CAAC,aAAa,KAAA;IAqCxB,WAAW;IAOX,cAAc;IAmId,gBAAgB;IAchB,gBAAgB;IAchB,kBAAkB,CAAC,UAAU,KAAA;IA2B7B,kBAAkB,CAAC,UAAU,KAAA;CAuBhC"}
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel20.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGridPanelBase } from './tbs.grid.panel.base';
2 | import { TbsGrid } from "../tbs.grid";
3 | export declare class TbsGridPanel20 extends TbsGridPanelBase {
4 | isChecked: boolean;
5 | constructor(grid: TbsGrid);
6 | createHtml(parentElement: any): void;
7 | createTable(): void;
8 | setDataPanel(topRowIndex?: number): void;
9 | setDataPanel1(param: any): void;
10 | setDataPanel2(param: any): void;
11 | setDataPanel0(param: any): void;
12 | setDataPanelSub(panelName: any, param: any): void;
13 | panel21_select(): void;
14 | panel20_select(panelName: any): void;
15 | }
16 | //# sourceMappingURL=tbs.grid.panel20.d.ts.map
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel20.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.panel20.d.ts","sourceRoot":"","sources":["../../src/panels/tbs.grid.panel20.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAGpC,qBAAa,cAAe,SAAQ,gBAAgB;IAChD,SAAS,EAAE,OAAO,CAAC;gBAEP,IAAI,EAAE,OAAO;IASzB,UAAU,CAAC,aAAa,EAAE,GAAG;IAiB7B,WAAW;IAWX,YAAY,CAAC,WAAW,CAAC,EAAE,MAAM;IAUjC,aAAa,CAAC,KAAK,EAAE,GAAG;IAwDxB,aAAa,CAAC,KAAK,KAAA;IAInB,aAAa,CAAC,KAAK,KAAA;IAInB,eAAe,CAAC,SAAS,KAAA,EAAE,KAAK,KAAA;IA8EhC,cAAc;IAwEd,cAAc,CAAC,SAAS,KAAA;CAkiB3B"}
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel30.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGridPanelBase } from './tbs.grid.panel.base';
2 | export declare class TbsGridPanel30 extends TbsGridPanelBase {
3 | constructor(grid: any);
4 | createHtml(parentElement: any): void;
5 | createTable(): void;
6 | updateTableRows(): void;
7 | setDataPanel(topRowIndex: any): void;
8 | setDataPanel1(param: any): void;
9 | setDataPanel2(param: any): void;
10 | setDataPanel0(param: any): void;
11 | panel30_select(eventPanelName: any): void;
12 | panel31_select(eventPanelName: any): void;
13 | }
14 | //# sourceMappingURL=tbs.grid.panel30.d.ts.map
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel30.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.panel30.d.ts","sourceRoot":"","sources":["../../src/panels/tbs.grid.panel30.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAezD,qBAAa,cAAe,SAAQ,gBAAgB;gBAEpC,IAAI,KAAA;IAUhB,UAAU,CAAC,aAAa,KAAA;IAiBxB,WAAW;IASX,eAAe;IAcf,YAAY,CAAC,WAAW,KAAA;IAwBxB,aAAa,CAAC,KAAK,KAAA;IAoDnB,aAAa,CAAC,KAAK,KAAA;IAwDnB,aAAa,CAAC,KAAK,KAAA;IAsEnB,cAAc,CAAC,cAAc,KAAA;IA4oB7B,cAAc,CAAC,cAAc,KAAA;CAoehC"}
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel40.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGridPanelBase } from './tbs.grid.panel.base';
2 | export declare class TbsGridPanel40 extends TbsGridPanelBase {
3 | constructor(grid: any);
4 | createHtml(parentElement: any): void;
5 | createTable(): void;
6 | setDataPanel(): void;
7 | setDataPanel1(): void;
8 | setDataPanel2(): void;
9 | setDataPanel0(): void;
10 | panel40_select(eventPanelName: any): void;
11 | panel41_select(eventPanelName: any): void;
12 | }
13 | //# sourceMappingURL=tbs.grid.panel40.d.ts.map
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel40.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.panel40.d.ts","sourceRoot":"","sources":["../../src/panels/tbs.grid.panel40.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAMzD,qBAAa,cAAe,SAAQ,gBAAgB;gBAEpC,IAAI,KAAA;IAShB,UAAU,CAAC,aAAa,KAAA;IAiBxB,WAAW;IAYX,YAAY;IAUZ,aAAa;IAsCb,aAAa;IAqCb,aAAa;IAuCb,cAAc,CAAC,cAAc,KAAA;IAiW7B,cAAc,CAAC,cAAc,KAAA;CAsNhC"}
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel50.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGridPanelBase } from './tbs.grid.panel.base';
2 | export declare class TbsGridPanel50 extends TbsGridPanelBase {
3 | constructor(grid: any);
4 | createHtml(parentElement: any): void;
5 | createTable(): void;
6 | setDataPanel(): void;
7 | setDataPanel1(): void;
8 | setDataPanel2(): void;
9 | setDataPanel0(): void;
10 | }
11 | //# sourceMappingURL=tbs.grid.panel50.d.ts.map
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel50.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.panel50.d.ts","sourceRoot":"","sources":["../../src/panels/tbs.grid.panel50.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAKzD,qBAAa,cAAe,SAAQ,gBAAgB;gBACpC,IAAI,KAAA;IAQhB,UAAU,CAAC,aAAa,KAAA;IAiBxB,WAAW;IAWX,YAAY;IASZ,aAAa;IAqCb,aAAa;IAqCb,aAAa;CAsChB"}
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel70.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGridPanelBase } from './tbs.grid.panel.base';
2 | export declare class TbsGridPanel70 extends TbsGridPanelBase {
3 | constructor(grid: any);
4 | createHtml(parentElement: any): void;
5 | createTable(): void;
6 | setDataPanel(): void;
7 | setDataPanel2(param: any): void;
8 | setDataPanel0(param: any): void;
9 | panel70_select(panelName: any): void;
10 | }
11 | //# sourceMappingURL=tbs.grid.panel70.d.ts.map
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel70.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.panel70.d.ts","sourceRoot":"","sources":["../../src/panels/tbs.grid.panel70.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,qBAAa,cAAe,SAAQ,gBAAgB;gBAEpC,IAAI,KAAA;IAShB,UAAU,CAAC,aAAa,KAAA;IAiBxB,WAAW;IASX,YAAY;IAQZ,aAAa,CAAC,KAAK,KAAA;IAoEnB,aAAa,CAAC,KAAK,KAAA;IAuEnB,cAAc,CAAC,SAAS,KAAA;CAmG3B"}
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel80.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGridPanelBase } from './tbs.grid.panel.base';
2 | export declare class TbsGridPanel80 extends TbsGridPanelBase {
3 | constructor(grid: any);
4 | createHtml(parentElement: any): void;
5 | createTable(): void;
6 | panel80_select(): void;
7 | }
8 | //# sourceMappingURL=tbs.grid.panel80.d.ts.map
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel80.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.panel80.d.ts","sourceRoot":"","sources":["../../src/panels/tbs.grid.panel80.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,qBAAa,cAAe,SAAQ,gBAAgB;gBAEpC,IAAI,KAAA;IAKhB,UAAU,CAAC,aAAa,KAAA;IAUxB,WAAW;IAeX,cAAc;CAoYjB"}
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel90.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGridPanelBase } from './tbs.grid.panel.base';
2 | export declare class TbsGridPanel90 extends TbsGridPanelBase {
3 | constructor(grid: any);
4 | createHtml(parentElement: any): void;
5 | createTable(): void;
6 | panel90_select(): void;
7 | }
8 | //# sourceMappingURL=tbs.grid.panel90.d.ts.map
--------------------------------------------------------------------------------
/types/panels/tbs.grid.panel90.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.panel90.d.ts","sourceRoot":"","sources":["../../src/panels/tbs.grid.panel90.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD,qBAAa,cAAe,SAAQ,gBAAgB;gBAEpC,IAAI,KAAA;IAKhB,UAAU,CAAC,aAAa,KAAA;IAUxB,WAAW;IAkBX,cAAc;CAoYjB"}
--------------------------------------------------------------------------------
/types/panels/tbs.grid.render.panel.info.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "../tbs.grid";
2 | export declare class TbsGridRenderPanelInfo {
3 | /**
4 | * num, mode, checkbox
5 | */
6 | grid: TbsGrid;
7 | selector: string;
8 | column: any;
9 | columnIndex: number;
10 | columnName: string;
11 | columnType: string;
12 | valueName: string;
13 | textName: string;
14 | rowIndex: number;
15 | cellValue: any;
16 | cellText: any;
17 | align: string;
18 | className: string;
19 | width: number;
20 | visible: boolean;
21 | editable: boolean;
22 | tableCell: any;
23 | panelName: string;
24 | constructor(grid: TbsGrid);
25 | start(panelName: any, tableCell: any, column: any, rowIndex: any, columnIndex: any): void;
26 | createHtml(): void;
27 | setBounding(): void;
28 | }
29 | //# sourceMappingURL=tbs.grid.render.panel.info.d.ts.map
--------------------------------------------------------------------------------
/types/panels/tbs.grid.render.panel.info.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.render.panel.info.d.ts","sourceRoot":"","sources":["../../src/panels/tbs.grid.render.panel.info.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAGpC,qBAAa,sBAAsB;IAE/B;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,GAAG,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IAEnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IAEjB,QAAQ,EAAE,MAAM,CAAC;IAEjB,SAAS,EAAE,GAAG,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IAEd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAElB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,GAAG,CAAA;IACd,SAAS,EAAE,MAAM,CAAC;gBAEN,IAAI,EAAE,OAAO;IA2BzB,KAAK,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,MAAM,KAAA,EAAE,QAAQ,KAAA,EAAE,WAAW,KAAA;IA8GzD,UAAU;IAeV,WAAW;CA0Cd"}
--------------------------------------------------------------------------------
/types/panels/tbs.grid.render.panel30.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "../tbs.grid";
2 | export declare class TbsGridRenderPanel30 {
3 | grid: TbsGrid;
4 | selector: string;
5 | column: any;
6 | columnIndex: number;
7 | columnName: string;
8 | columnType: string;
9 | valueName: string;
10 | textName: string;
11 | rowIndex: number;
12 | cellValue: any;
13 | cellText: any;
14 | align: string;
15 | className: string;
16 | width: number;
17 | visible: boolean;
18 | editable: boolean;
19 | tableCell: any;
20 | panelName: string;
21 | cellTemplate: any;
22 | depth: number;
23 | constructor(grid: any);
24 | start(panelName: any, tableCell: any, column: any, rowIndex: any, columnIndex: any): void;
25 | updateData(): void;
26 | createHtml(): void;
27 | setBounding(): void;
28 | }
29 | //# sourceMappingURL=tbs.grid.render.panel30.d.ts.map
--------------------------------------------------------------------------------
/types/panels/tbs.grid.render.panel30.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.render.panel30.d.ts","sourceRoot":"","sources":["../../src/panels/tbs.grid.render.panel30.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAWpC,qBAAa,oBAAoB;IAE7B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,GAAG,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IAEnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IAEjB,QAAQ,EAAE,MAAM,CAAC;IAEjB,SAAS,EAAE,GAAG,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IAEd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAElB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAElB,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAElB,YAAY,EAAE,GAAG,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;gBAEF,IAAI,KAAA;IA+BhB,KAAK,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,MAAM,KAAA,EAAE,QAAQ,KAAA,EAAE,WAAW,KAAA;IA0BzD,UAAU;IA6CV,UAAU;IAkCV,WAAW;CAuDd"}
--------------------------------------------------------------------------------
/types/panels/tbs.grid.render.panel40.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "../tbs.grid";
2 | export declare class TbsGridRenderPanel40 {
3 | grid: TbsGrid;
4 | selector: string;
5 | column: any;
6 | columnIndex: number;
7 | columnName: string;
8 | columnType: string;
9 | valueName: string;
10 | textName: string;
11 | rowIndex: number;
12 | cellValue: any;
13 | cellText: any;
14 | align: string;
15 | className: string;
16 | width: number;
17 | visible: boolean;
18 | editable: boolean;
19 | tableCell: any;
20 | panelName: string;
21 | cellTemplate: any;
22 | depth: number;
23 | constructor(grid: any);
24 | start(panelName: any, tableCell: any, column: any, rowIndex: any, columnIndex: any): void;
25 | updateData(): void;
26 | createHtml(): void;
27 | setBounding(): void;
28 | }
29 | //# sourceMappingURL=tbs.grid.render.panel40.d.ts.map
--------------------------------------------------------------------------------
/types/panels/tbs.grid.render.panel40.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.render.panel40.d.ts","sourceRoot":"","sources":["../../src/panels/tbs.grid.render.panel40.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAKpC,qBAAa,oBAAoB;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,GAAG,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IAEnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IAEjB,QAAQ,EAAE,MAAM,CAAC;IAEjB,SAAS,EAAE,GAAG,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IAEd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAElB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAElB,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAElB,YAAY,EAAE,GAAG,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;gBACF,IAAI,KAAA;IA+BhB,KAAK,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,MAAM,KAAA,EAAE,QAAQ,KAAA,EAAE,WAAW,KAAA;IAgDzD,UAAU;IAcV,UAAU;IAOV,WAAW;CAKd"}
--------------------------------------------------------------------------------
/types/panels/tbs.grid.render.panel70.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "../tbs.grid";
2 | export declare class TbsGridRenderPanel70 {
3 | grid: TbsGrid;
4 | selector: string;
5 | column: any;
6 | columnIndex: number;
7 | columnName: string;
8 | columnType: string;
9 | valueName: string;
10 | textName: string;
11 | rowIndex: number;
12 | cellValue: any;
13 | cellText: any;
14 | align: string;
15 | className: string;
16 | width: number;
17 | visible: boolean;
18 | editable: boolean;
19 | tableCell: any;
20 | panelName: string;
21 | cellTemplate: any;
22 | depth: number;
23 | constructor(grid: any);
24 | start(panelName: any, tableCell: any, column: any, rowIndex: any, columnIndex: any): void;
25 | updateData(): void;
26 | createHtml(): void;
27 | setBounding(): void;
28 | }
29 | //# sourceMappingURL=tbs.grid.render.panel70.d.ts.map
--------------------------------------------------------------------------------
/types/panels/tbs.grid.render.panel70.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.render.panel70.d.ts","sourceRoot":"","sources":["../../src/panels/tbs.grid.render.panel70.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAKpC,qBAAa,oBAAoB;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,GAAG,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IAEnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IAEjB,QAAQ,EAAE,MAAM,CAAC;IAEjB,SAAS,EAAE,GAAG,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IAEd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAElB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAElB,SAAS,EAAE,GAAG,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAElB,YAAY,EAAE,GAAG,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;gBACF,IAAI,KAAA;IA+BhB,KAAK,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,MAAM,KAAA,EAAE,QAAQ,KAAA,EAAE,WAAW,KAAA;IAsBzD,UAAU;IAcV,UAAU;IAOV,WAAW;CAKd"}
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.button.d.ts:
--------------------------------------------------------------------------------
1 | export declare class TbsGridRenderButton {
2 | addElement(param: any): void;
3 | setBounding(param: any): void;
4 | }
5 | //# sourceMappingURL=tbs.grid.render.button.d.ts.map
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.button.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.render.button.d.ts","sourceRoot":"","sources":["../../src/renderer/tbs.grid.render.button.ts"],"names":[],"mappings":"AAEA,qBAAa,mBAAmB;IAE5B,UAAU,CAAC,KAAK,KAAA;IAchB,WAAW,CAAC,KAAK,KAAA;CAYpB"}
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.checkbox.d.ts:
--------------------------------------------------------------------------------
1 | export declare class TbsGridRenderCheckbox {
2 | addElement(param: any): void;
3 | setBounding(param: any): void;
4 | }
5 | //# sourceMappingURL=tbs.grid.render.checkbox.d.ts.map
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.checkbox.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.render.checkbox.d.ts","sourceRoot":"","sources":["../../src/renderer/tbs.grid.render.checkbox.ts"],"names":[],"mappings":"AAEA,qBAAa,qBAAqB;IAC9B,UAAU,CAAC,KAAK,KAAA;IAchB,WAAW,CAAC,KAAK,KAAA;CAYpB"}
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.group.d.ts:
--------------------------------------------------------------------------------
1 | export declare class TbsGridRenderGroup {
2 | addElement(param: any): void;
3 | setBounding(param: any): void;
4 | }
5 | //# sourceMappingURL=tbs.grid.render.group.d.ts.map
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.group.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.render.group.d.ts","sourceRoot":"","sources":["../../src/renderer/tbs.grid.render.group.ts"],"names":[],"mappings":"AAGA,qBAAa,kBAAkB;IAE3B,UAAU,CAAC,KAAK,KAAA;IAsBhB,WAAW,CAAC,KAAK,KAAA;CA2BpB"}
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.img.d.ts:
--------------------------------------------------------------------------------
1 | export declare class TbsGridRenderImg {
2 | addElement(param: any): void;
3 | setBounding(param: any): void;
4 | }
5 | //# sourceMappingURL=tbs.grid.render.img.d.ts.map
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.img.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.render.img.d.ts","sourceRoot":"","sources":["../../src/renderer/tbs.grid.render.img.ts"],"names":[],"mappings":"AAGA,qBAAa,gBAAgB;IAEzB,UAAU,CAAC,KAAK,KAAA;IAchB,WAAW,CAAC,KAAK,KAAA;CAcpB"}
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.link.d.ts:
--------------------------------------------------------------------------------
1 | export declare class TbsGridRenderLink {
2 | addElement(param: any): void;
3 | setBounding(param: any): void;
4 | }
5 | //# sourceMappingURL=tbs.grid.render.link.d.ts.map
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.link.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.render.link.d.ts","sourceRoot":"","sources":["../../src/renderer/tbs.grid.render.link.ts"],"names":[],"mappings":"AAEA,qBAAa,iBAAiB;IAE1B,UAAU,CAAC,KAAK,KAAA;IAchB,WAAW,CAAC,KAAK,KAAA;CAWpB"}
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.string.d.ts:
--------------------------------------------------------------------------------
1 | export declare class TbsGridRenderString {
2 | /**
3 | * @param { panelName, columnName, tableCell, cellValue, className, visible, align, width }
4 | */
5 | addElement(param: any): void;
6 | /**
7 | * @param { panelName, columnName, tableCell, cellValue, className, visible, align, width }
8 | */
9 | setBounding(param: any): void;
10 | }
11 | //# sourceMappingURL=tbs.grid.render.string.d.ts.map
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.string.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.render.string.d.ts","sourceRoot":"","sources":["../../src/renderer/tbs.grid.render.string.ts"],"names":[],"mappings":"AAGA,qBAAa,mBAAmB;IAC5B;;OAEG;IACH,UAAU,CAAC,KAAK,KAAA;IAahB;;OAEG;IACH,WAAW,CAAC,KAAK,KAAA;CAgBpB"}
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.svg.d.ts:
--------------------------------------------------------------------------------
1 | export declare class TbsGridRenderSvg {
2 | }
3 | //# sourceMappingURL=tbs.grid.render.svg.d.ts.map
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.svg.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.render.svg.d.ts","sourceRoot":"","sources":["../../src/renderer/tbs.grid.render.svg.ts"],"names":[],"mappings":"AAEA,qBAAa,gBAAgB;CAE5B"}
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.tree.d.ts:
--------------------------------------------------------------------------------
1 | export declare class TbsGridRenderTree {
2 | addElement(param: any): void;
3 | setBounding(param: any): void;
4 | }
5 | //# sourceMappingURL=tbs.grid.render.tree.d.ts.map
--------------------------------------------------------------------------------
/types/renderer/tbs.grid.render.tree.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.render.tree.d.ts","sourceRoot":"","sources":["../../src/renderer/tbs.grid.render.tree.ts"],"names":[],"mappings":"AAIA,qBAAa,iBAAiB;IAC1B,UAAU,CAAC,KAAK,KAAA;IAmBhB,WAAW,CAAC,KAAK,KAAA;CAkBpB"}
--------------------------------------------------------------------------------
/types/summary/tbs.grid.footer.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "../tbs.grid";
2 | export declare class TbsGridFooter {
3 | grid: TbsGrid;
4 | selector: string;
5 | constructor(grid: TbsGrid);
6 | setFooterColumns(columns: any): void;
7 | setFooterData(): void;
8 | setFooterValue(rowIndex: any, columnName: any, value: any): void;
9 | }
10 | //# sourceMappingURL=tbs.grid.footer.d.ts.map
--------------------------------------------------------------------------------
/types/summary/tbs.grid.footer.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.footer.d.ts","sourceRoot":"","sources":["../../src/summary/tbs.grid.footer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAGpC,qBAAa,aAAa;IACtB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;gBAEL,IAAI,EAAE,OAAO;IAKzB,gBAAgB,CAAC,OAAO,KAAA;IAQxB,aAAa;IA4Cb,cAAc,CAAC,QAAQ,KAAA,EAAE,UAAU,KAAA,EAAE,KAAK,KAAA;CAM7C"}
--------------------------------------------------------------------------------
/types/summary/tbs.grid.top.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "../tbs.grid";
2 | export declare class TbsGridTop {
3 | grid: TbsGrid;
4 | selector: string;
5 | constructor(grid: any);
6 | setTopColumns(columns: any): void;
7 | setTopData(): void;
8 | setTopValue(rowIndex: any, columnName: any, value: any): void;
9 | }
10 | //# sourceMappingURL=tbs.grid.top.d.ts.map
--------------------------------------------------------------------------------
/types/summary/tbs.grid.top.d.ts.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"tbs.grid.top.d.ts","sourceRoot":"","sources":["../../src/summary/tbs.grid.top.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AAGpC,qBAAa,UAAU;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;gBAEL,IAAI,KAAA;IAKhB,aAAa,CAAC,OAAO,KAAA;IAQrB,UAAU;IA4CV,WAAW,CAAC,QAAQ,KAAA,EAAE,UAAU,KAAA,EAAE,KAAK,KAAA;CAM1C"}
--------------------------------------------------------------------------------
/types/tbs.grid.base.d.ts:
--------------------------------------------------------------------------------
1 | import { Options } from './tbs.grid.types';
2 | import { TbsBase } from './base/tbs.base';
3 | import { TbsDatabase } from './base/tbs.database';
4 | import { TbsDataTable } from './base/tbs.data.table';
5 | import { TbsDataArrayTable } from "./base/tbs.data.array.table";
6 |
7 | export declare class TbsGridBase extends TbsBase {
8 | gridId: string;
9 | gridConfig: object;
10 | gridConfigOptions: object;
11 | grid_mode: string;
12 | mousePointRange: number;
13 | isMobile: boolean;
14 | userAgent: string;
15 | columns: any;
16 | headerColumnTable: any[];
17 | renderer: any;
18 | infoRenderer: any;
19 | db: TbsDatabase;
20 | field_table: TbsDataTable;
21 | header_column_table: TbsDataArrayTable;
22 | column_table: TbsDataTable;
23 | top_column_table: TbsDataTable;
24 | footer_column_table: TbsDataTable;
25 | sort_column_table: TbsDataTable;
26 | filter_column_table: TbsDataTable;
27 | group_column_table: TbsDataTable;
28 | source_table: TbsDataTable;
29 | view_table: TbsDataTable;
30 | group_table: TbsDataTable;
31 | group_header_table: TbsDataTable;
32 | tree_table: TbsDataTable;
33 | page_table: TbsDataTable;
34 | top_table: TbsDataTable;
35 | footer_table: TbsDataTable;
36 | temp_table: TbsDataTable;
37 | data_update: any[];
38 | data_insert: any[];
39 | data_delete: any[];
40 | info_column_table: TbsDataTable;
41 | panel21_table: TbsDataTable;
42 | panel20_table: TbsDataTable;
43 | panel31_table: TbsDataTable;
44 | cell_template_table: TbsDataTable;
45 | data_select_panel30: object[];
46 | data_select_panel31: object[];
47 | pageRowCount: number;
48 | pageIntRowCount: number;
49 | startRowIndex: number;
50 | startCellIndex: number;
51 | lastRowIndex: number;
52 | lastCellIndex: number;
53 | _startRowIndex: number;
54 | _startCellIndex: number;
55 | _lastRowIndex: number;
56 | _lastCellIndex: number;
57 | selectRangeArray: any[];
58 | startX: number;
59 | startY: number;
60 | lastX: number;
61 | lastY: number;
62 | const_filterValue: string;
63 | const_filterType: string;
64 | const_filterReset: string;
65 | const_filterSave: string;
66 | headerRowCount: number;
67 | options: Options;
68 | fixedColumnIndex: number;
69 | headerRowHeight: number;
70 | rowHeight: number;
71 | topRowHeight: number;
72 | footerRowHeight: number;
73 | debug_mode: boolean;
74 | code_horizontal: string;
75 | code_vertical: string;
76 | click: any;
77 | dblclick: any;
78 | edit: any;
79 | onClickCheckbox: any;
80 | onClickInfoCheckBox: any;
81 | onClickButton: any;
82 | onClickLink: any;
83 | onRowBounding: any;
84 | onClickPageFirst: any;
85 | onClickPagePrev: any;
86 | onClickPageIndex: any;
87 | onClickPageNext: any;
88 | onClickPageLast: any;
89 | constructor(gridId: string, gridConfigs: object);
90 | /**
91 | * get configs value
92 | */
93 | getConfigCulture(label: string): any;
94 | getConfigCalendar(label: string): any;
95 | getConfigFont(label: string): any;
96 | getConfigOption(label: string): any;
97 | getConfigLabel(label: string): any;
98 | }
99 | //# sourceMappingURL=tbs.grid.base.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.cell.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "./tbs.grid";
2 | export declare class TbsGridCell {
3 | grid: TbsGrid;
4 | column: any;
5 | constructor(grid: TbsGrid, column: any);
6 | createHtml(): void;
7 | createCell(): void;
8 | createTemplate(): void;
9 | hideTableCells(grid: any, panelName: any, tableRow: any, lastColumnIndex: any): void;
10 | showSelectedCells(grid: any, panelName: any, tableCell: any, rowIndex: any, cellIndex: any): void;
11 | }
12 | //# sourceMappingURL=tbs.grid.cell.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.combo.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "./tbs.grid";
2 | export declare class TbsGridCombo {
3 | colType: any;
4 | grid: TbsGrid;
5 | gridId: string;
6 | column: object;
7 | input: HTMLInputElement;
8 | input_code: HTMLInputElement;
9 | constructor(grid: TbsGrid, column: any, input: any, input_code: any);
10 | create(): void;
11 | clear(): void;
12 | setData(): void;
13 | AddEvent(): void;
14 | destroy(): void;
15 | }
16 | //# sourceMappingURL=tbs.grid.combo.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.configs.d.ts:
--------------------------------------------------------------------------------
1 | export declare const tbsGridConfigs: object;
2 | //# sourceMappingURL=tbs.grid.configs.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.control.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "./tbs.grid";
2 | export declare class TbsGridControl {
3 | grid: TbsGrid;
4 | selector: string;
5 | constructor(grid: TbsGrid);
6 | after_changeColumnOrder(): void;
7 | after_addColumn(): void;
8 | after_removeColumn(headerColumns: any, columns: any): void;
9 | after_showFilterPanel(): void;
10 | after_hideFilterPanel(): void;
11 | after_showSortrPanel(): void;
12 | after_hideSortPanel(): void;
13 | after_setColumnVisible(): void;
14 | }
15 | //# sourceMappingURL=tbs.grid.control.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.date.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "./tbs.grid";
2 | export declare class TbsGridDate {
3 | colType: any;
4 | grid: TbsGrid;
5 | gridId: string;
6 | column: object;
7 | input: HTMLInputElement;
8 | constructor(grid: TbsGrid, column: object, input: HTMLInputElement);
9 | create(): void;
10 | clear(): void;
11 | setData(data?: any): void;
12 | getToday(): string;
13 | today(): void;
14 | prev(): void;
15 | next(): void;
16 | selectMonth(value: any): void;
17 | addEvent(): void;
18 | addZero(value: any): any;
19 | destroy(): void;
20 | }
21 | //# sourceMappingURL=tbs.grid.date.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.dom.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsBase } from './base/tbs.base';
2 | export declare class TbsGridDom extends TbsBase {
3 | static createElement(type: any): any;
4 | static createHtml(tag: any, tagType: any, className: any): any;
5 | static addElement(): void;
6 | static setBounding(): void;
7 | static setStyle(tableCell: any, param: any): void;
8 | static setCell(element: any, property: any, value: any): void;
9 | static setCellStyle(tableCell: any, property: any, value: any): void;
10 | static addUserClass(tableCell: any, className: any): void;
11 | static removeUserClass(tableCell: any): void;
12 | /**
13 | * Base Functions
14 | *
15 | */
16 | /**
17 | * Dom Functions
18 | *
19 | */
20 | static createElementCheckbox(): HTMLInputElement;
21 | static createElementCellDiv(): HTMLDivElement;
22 | static createElementCellIcon(): HTMLSpanElement;
23 | static createElementCellText(): HTMLSpanElement;
24 | static prependCheckbox(element: any, childElement: any): void;
25 | static prependIcon(element: any, childElement: any): void;
26 | /**
27 | * Table Functions
28 | */
29 | static createTable(): HTMLTableElement;
30 | }
31 | //# sourceMappingURL=tbs.grid.dom.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.filter.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "./tbs.grid";
2 | export declare class TbsGridFilter {
3 | grid: TbsGrid;
4 | selector: string;
5 | constructor(grid: TbsGrid);
6 | showFilterPanel(): void;
7 | hideFilterPanel(): void;
8 | filters(): void;
9 | filter(data: any, filterColumn: any): any;
10 | filterNumberByType(filterType: any, n: any, targetNumber: any): boolean;
11 | filterStringByType(filterType: any, s: any, targetString: any): any;
12 | setFilterColumn(column: any, filterType: any, word: any): void;
13 | removeFilterColumn(column: any): void;
14 | createFilterCombo(column: any): HTMLSelectElement;
15 | addFilterComboOption(combo: any, value: any, text: any): void;
16 | initFilterData(): void;
17 | }
18 | //# sourceMappingURL=tbs.grid.filter.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.filter.layer.d.ts:
--------------------------------------------------------------------------------
1 | export declare class TbsGridFilterLayer {
2 | }
3 | //# sourceMappingURL=tbs.grid.filter.layer.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.group.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "./tbs.grid";
2 | import { columnAlias } from "./tbs.grid.types";
3 | export declare class TbsGridGroup {
4 | grid: TbsGrid;
5 | selector: string;
6 | openDepth: number;
7 | splitChar: string;
8 | constructor(grid: any);
9 | setGroupData(data: any, openDepth?: number, isFirst?: boolean): void;
10 | createGroupData(): void;
11 | createGroupKeyData(dataRows: any, depth?: number): any[];
12 | getGroupKeyByDepth(row: any, depth: any): string;
13 | getGroupKeyRowByDepth(row: any, depth: any): {};
14 | /**
15 | * Group Sum, Avg
16 | */
17 | getGroupDepthSummary(rowIndex: any): void;
18 | getGroupSummary(): void;
19 | /**
20 | * spanIcon, spanImg, spanText
21 | */
22 | setGroupIcon(tableCell: any, rowIndex: any): void;
23 | toggleGroupIcon(rowIndex: any, element: any, type: any): void;
24 | isGroupChildrenRow(rowIndex: any): boolean;
25 | getGroupchildRows(folding: any, rowIndex: any): any[];
26 | setGroupFolding(tableCell: any): void;
27 | getGroupFlodingStatus(tableCell: any): columnAlias.open | columnAlias.closed;
28 | openChildRow(arrayRows: any, rootRow: any): void;
29 | openGroupRow(rowIndex?: number): void;
30 | closeChildRow(rowIndex: any): void;
31 | closeGroupRow(rowIndex: any): void;
32 | /**
33 | * Group Button
34 | */
35 | changeGroupButtonOrder(name: any, text: any, order: any, targetIndex: any): void;
36 | addGroupButton(name: any, text: any, order: any, targetIndex: any): void;
37 | removeGroupButton(element: any): void;
38 | removeGroupButtonList(): void;
39 | getGroupButtonList(): void;
40 | createGroupButton(columnName: any): HTMLDivElement;
41 | toggleGroupPlaceHolder(): void;
42 | destroy(): void;
43 | showGroupPanel(): void;
44 | hideGroupPanel(): void;
45 | initGroupData(): void;
46 | getGroupRow(columnName: any): object;
47 | expandGroup(): void;
48 | collapseGroup(): void;
49 | }
50 | //# sourceMappingURL=tbs.grid.group.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.page.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "./tbs.grid";
2 | export declare class TbsGridPage {
3 | grid: TbsGrid;
4 | selector: string;
5 | pageIndex: number;
6 | pageCount: number;
7 | pageRowCount: number;
8 | pageTotalRowCount: number;
9 | options: any;
10 | user_clickPageFirst: any;
11 | user_clickPagePrev: any;
12 | user_clickPageIndex: any;
13 | user_clickPageNext: any;
14 | user_clickPageLast: any;
15 | constructor(grid: any);
16 | setPageOption(optionName: any, optionValue: any): void;
17 | setPageData(): void;
18 | }
19 | //# sourceMappingURL=tbs.grid.page.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.range.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "./tbs.grid";
2 | export declare class TbsGridRange {
3 | grid: TbsGrid;
4 | selector: string;
5 | constructor(grid: TbsGrid);
6 | removePanelRange: (panelName?: string) => void;
7 | selectRange: (startRowIndex: any, lastRowIndex: any, startCellIndex: any, lastCellIndex: any, topRowIndex?: number) => any;
8 | setRange: (startRowIndex: any, lastRowIndex: any, startCellIndex: any, lastCellIndex: any, topRowIndex: any, type?: string) => any;
9 | setRangeValue: (startRowIndex: any, lastRowIndex: any, startCellIndex: any, lastCellIndex: any) => void;
10 | removeRange: (startRowIndex: any, lastRowIndex: any, startCellIndex?: any, lastCellIndex?: any) => void;
11 | addRange: (startRowIndex: any, lastRowIndex: any, startCellIndex: any, lastCellIndex: any, topRowIndex: any) => void;
12 | }
13 | //# sourceMappingURL=tbs.grid.range.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.range.panel.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "./tbs.grid";
2 | export declare class TbsGridRangePanel {
3 | grid: TbsGrid;
4 | selector: string;
5 | panelName: string;
6 | startRowIndex: number;
7 | startCellIndex: number;
8 | lastRowIndex: number;
9 | lastCellIndex: number;
10 | _startRowIndex: number;
11 | _startCellIndex: number;
12 | _lastRowIndex: number;
13 | _lastCellIndex: number;
14 | selectRangeArray: any[];
15 | data_select_panel31: any[];
16 | data_select_panel30: any[];
17 | data_summary: any[];
18 | constructor(grid: TbsGrid, panelName: string);
19 | selectRange(startRowIndex: number, lastRowIndex: number, startCellIndex?: number, lastCellIndex?: number, topRowIndex?: number): void;
20 | setRange(startRowIndex: any, lastRowIndex: any, startCellIndex: any, lastCellIndex: any, topRowIndex: any, type?: string): void;
21 | setRangeValue(startRowIndex: any, lastRowIndex: any, startCellIndex: any, lastCellIndex: any): void;
22 | removeRange(startRowIndex: number, lastRowIndex: number, startCellIndex?: number, lastCellIndex?: number): void;
23 | addRange(startRowIndex: any, lastRowIndex: any, startCellIndex: any, lastCellIndex: any, topRowIndex: any): void;
24 | getMaxCellIndexByMouseMove(): any;
25 | getMinCellIndexByMouseMove(): any;
26 | getMaxCellIndexByMouseMove2(panelName: any): any;
27 | getMinCellIndexByMouseMove2(panelName: any): any;
28 | }
29 | //# sourceMappingURL=tbs.grid.range.panel.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.row.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "./tbs.grid";
2 | export declare class TbsGridRow {
3 | grid: TbsGrid;
4 | constructor(grid: any);
5 | setTableHead(grid: any, panelName: any): void;
6 | setTableRow(grid: any, tableRow: any, rowIndex: any, panelName?: string): void;
7 | showAlternativeRowColor(grid: any, panelName: any, tableRow: any, rowIndex: any): void;
8 | hideTableRows(grid: any, panelName: any, tableRows: any, fromRowIndex: any, toRowIndex: any): void;
9 | }
10 | //# sourceMappingURL=tbs.grid.row.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.scroll.base.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "./tbs.grid";
2 | export declare class TbsGridScrollBase {
3 | grid: TbsGrid;
4 | selector: string;
5 | constructor(grid: any);
6 | setPanelSize(): void;
7 | setBarPosition(type: string, topRowIndex?: number): void;
8 | setBarPositionByDirection(type: any, rowIndex?: any): number | false;
9 | getContentPanelLeft(value: any): string;
10 | setContentPanelLeft(value: any): void;
11 | setContentPanelLeftMove(value: any): void;
12 | setColumnWidth(panelName: any, colIndex: any, value: any): void;
13 | setColumnWidth20(panelName: any, colIndex: any, value: any): void;
14 | setColumnWidth22(panelName: any, colIndex: any, value: any): void;
15 | getFixedColumnsWidth(): number;
16 | setAllColumnWidth(arr: any): void;
17 | setPageRowCount(panelName?: string): void;
18 | }
19 | //# sourceMappingURL=tbs.grid.scroll.base.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.scroll.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "./tbs.grid";
2 | export declare class TbsGridScroll {
3 | /**
4 | * ScrollName : verticalScroll, horizontalScroll, verticalScroll60, horizontalScroll32
5 | *
6 | */
7 | grid: TbsGrid;
8 | selector: string;
9 | scrollName: string;
10 | barSize: number;
11 | railSize: number;
12 | moveCount: number;
13 | margin: string;
14 | hiddenSize: number;
15 | panelName: string;
16 | type: string;
17 | constructor(grid: TbsGrid, scrollName: string);
18 | setScroll(type: any): void;
19 | setHorizontalScroll(): void;
20 | setVerticalScroll(): void;
21 | showScroll(type: any): void;
22 | hideScroll(type: any): void;
23 | setScrollSize(type: any): void;
24 | getBarSize(type: any): any;
25 | getHorizontalBarSize(): any;
26 | getVerticalBarSize(): number;
27 | getRailSize(type: any, barSize: any): number;
28 | getHorizontalRailSize(barSize: any): number;
29 | getVerticalRailSize(barSize: any): number;
30 | getMoveCount(type: any, railSize: any): number;
31 | getHiddenSize(type: any): any;
32 | getBarWidth(type: any, barSize: any): string;
33 | }
34 | //# sourceMappingURL=tbs.grid.scroll.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.sort.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "./tbs.grid";
2 | export declare class TbsGridSort {
3 | grid: TbsGrid;
4 | selector: string;
5 | sortColumns: any[];
6 | options: any;
7 | constructor(grid: TbsGrid);
8 | setSortData(data: any, sortColumns: any): void;
9 | getSortRow(columnName: any): object;
10 | changeSortButtonOrder(name: any, text: any, order: any, targetIndex: any): void;
11 | addSortButton(name: any, text: any, order: any, targetIndex: any): void;
12 | removeSortButton(element: any): void;
13 | removeSortButtonList(): void;
14 | getSortButtonList(): void;
15 | createSortButton(columnName: any): HTMLDivElement;
16 | toggleSortPlaceHolder(): void;
17 | showSortPanel(): void;
18 | hideSortPanel(): void;
19 | initSortData(): void;
20 | }
21 | //# sourceMappingURL=tbs.grid.sort.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.table.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "./tbs.grid";
2 | export declare class TbsGridTable {
3 | grid: TbsGrid;
4 | constructor(grid: TbsGrid);
5 | createTable(panelName: any, startRowIndex: any, rowCount: any): void;
6 | createTableHead(panelName: string, table: any): void;
7 | createTableHead1(panelName: string, table: any): void;
8 | createTableHead2(panelName: any, table: any): number;
9 | createTableHead0(panelName: any, table: any): number;
10 | createTableRow(panelName: any, tbody: any): void;
11 | updateTableRows(panelName: any, rowCount: any): void;
12 | }
13 | //# sourceMappingURL=tbs.grid.table.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.tree.d.ts:
--------------------------------------------------------------------------------
1 | import { TbsGrid } from "./tbs.grid";
2 | import { columnAlias } from "./tbs.grid.types";
3 | export declare class TbsGridTree {
4 | grid: TbsGrid;
5 | selector: string;
6 | openDepth: number;
7 | constructor(grid: any);
8 | createTreeData(): void;
9 | setTreeSortColumns(sortColumns: any): void;
10 | setTreeData(data: any, openDepth?: number, isFirst?: boolean): void;
11 | setTreeIcon(tableCell: any, rowIndex: any): void;
12 | toggleTreeIcon(rowIndex: any, element: any, type?: any): void;
13 | getTreeFlodingStatus(tableCell: any): columnAlias.open | columnAlias.closed;
14 | setTreeFolding(tableCell: any): void;
15 | getTreechildRows(folding: any, rowIndex: any, isAll?: boolean): any[];
16 | openTreeRow(rowIndex: any): void;
17 | closeTreeRow(rowIndex: any): void;
18 | addTreeRows(rowIndex: any): void;
19 | addTreeRow(startRowIndex: any, row: any): void;
20 | removeTreeRow(row: any): void;
21 | }
22 | //# sourceMappingURL=tbs.grid.tree.d.ts.map
--------------------------------------------------------------------------------
/types/tbs.grid.types.d.ts:
--------------------------------------------------------------------------------
1 | export interface FormatData {
2 | text: string;
3 | value: string | number;
4 | }
5 | export interface TopColumn {
6 | name: string;
7 | text?: string;
8 | align?: string;
9 | summaryType?: string;
10 | className?: string;
11 | }
12 | export interface FooterColumn {
13 | name: string;
14 | text?: string;
15 | align?: string;
16 | summaryType?: string;
17 | className?: string;
18 | }
19 | export interface GroupColumn {
20 | name: string;
21 | }
22 | export interface SortColumn {
23 | name: string;
24 | order: string;
25 | }
26 | export interface FilterColumn {
27 | name: string;
28 | type: string;
29 | value: any;
30 | }
31 | export interface Column {
32 | _rowId: number;
33 | _rowMode: string;
34 | _isChecked: boolean;
35 | _number: number;
36 | _parentNumber: number;
37 | _depth: number;
38 | _childRowIds: any[];
39 | _childRows: any[];
40 | _childCount: number;
41 | _isOpen: boolean;
42 | /**
43 | * User Property
44 | */
45 | name: string;
46 | text?: string;
47 | type?: string;
48 | children?: string;
49 | dataType?: string;
50 | width?: string | number;
51 | editable?: boolean;
52 | visible?: boolean;
53 | align?: string;
54 | scale?: string;
55 | roundType?: string;
56 | fixedScale?: string;
57 | scaleMax?: string;
58 | scaleMin?: string;
59 | showZero?: boolean;
60 | commaUnit?: boolean;
61 | thousandChar?: boolean;
62 | decimalChar?: string;
63 | currencyChar?: string;
64 | className?: string;
65 | resizable?: boolean;
66 | sortable?: boolean;
67 | movable?: boolean;
68 | autoResizable?: boolean;
69 | autoWidth?: boolean;
70 | summaryType?: string;
71 | required?: boolean;
72 | format?: boolean;
73 | kind?: ColumnKind;
74 | }
75 | export declare enum FilterType {
76 | Select = 0,
77 | Equal = 1,
78 | NotEqual = 2,
79 | Greater = 3,
80 | GreaterEqual = 4,
81 | Less = 5,
82 | LessEqual = 6,
83 | Between = 7,
84 | Blank = 8,
85 | Include = 9,
86 | NotInclude = 10,
87 | StartCharacter = 11,
88 | EndCharacter = 12
89 | }
90 | export declare enum ColumnKind {
91 | column = "column",
92 | header = "header",
93 | empty = "empty"
94 | }
95 | export declare enum CellType {
96 | string = "string",
97 | number = "number",
98 | date = "date",
99 | combo = "combo",
100 | checkbox = "checkbox",
101 | img = "img",
102 | button = "button",
103 | link = "link",
104 | group = "group",
105 | tree = "tree"
106 | }
107 | export declare enum GridMode {
108 | tree = "tree",
109 | page = "page",
110 | pagination = "pagination"
111 | }
112 | export declare enum Direction {
113 | up = "up",
114 | down = "down",
115 | left = "left",
116 | right = "right"
117 | }
118 | export declare enum BeforeAfter {
119 | before = "before",
120 | after = "after"
121 | }
122 | export declare enum columnAlias {
123 | rowId = "_rowId",
124 | rowMode = "_mode",
125 | isChecked = "_isChecked",
126 | num = "_number",
127 | mode = "_mode",
128 | checkbox = "_checkbox",
129 | parentNum = "_parentNumber",
130 | depth = "_depth",
131 | children = "children",
132 | childRowIds = "_childRowIds",
133 | childRows = "_childRows",
134 | childCount = "_childCount",
135 | isOpen = "_isOpen",
136 | isShow = "_isShow",
137 | open = "open",
138 | closed = "closed",
139 | rowCount = "_rowCount",
140 | /**
141 | * User Property
142 | */
143 | name = "name",
144 | text = "text",
145 | type = "type",
146 | dataType = "dataType",
147 | width = "width",
148 | editable = "editable",
149 | visible = "visible",
150 | align = "align",
151 | scale = "scale",
152 | roundType = "roundType",
153 | fixedScale = "fixedScale",
154 | scaleMax = "scaleMax",
155 | scaleMin = "scalemin",
156 | showZero = "showZero",
157 | commaUnit = "commaUnit",// to be deprecated, Fixed 3
158 | thousandChar = "thousandChar",
159 | decimalChar = "decimalChar",
160 | currencyChar = "currencyChar",
161 | className = "className",// className
162 | resizable = "resizable",
163 | sortable = "sortable",
164 | movable = "movable",
165 | autoResizable = "autoResizable",
166 | autoWidth = "autoWidth",
167 | summaryType = "summaryType",
168 | required = "required",
169 | combo = "combo",
170 | format = "format",
171 | kind = "kind",//header, column, empty
172 | rowSpan = "rowSpan",
173 | colSpan = "colSpan",
174 | rowIndex = "rowIndex",
175 | colIndex = "colIndex",
176 | subRowSpan = "subRowSpan",
177 | subColSpan = "subColSpan",
178 | order = "order",
179 | value = "value"
180 | }
181 | /**
182 | * row property name
183 | */
184 | export declare enum rowAlias {
185 | selectMode = "selectMode",
186 | addRow = "addRow",
187 | delRow = "delRow"
188 | }
189 | /**
190 | * tree property name
191 | */
192 | export declare enum treeAlias {
193 | itemName = "itemName",
194 | parentName = "parentName",
195 | rootValue = "rootValue"
196 | }
197 | export declare enum optionAlias {
198 | rowMode = "rowMode",
199 | checkbox = "checkbox",
200 | numWidth = "numWidth",
201 | rowModeWidth = "rowModeWidth",
202 | checkBoxWidth = "checkBoxWidth",
203 | insertRow = "insertRow",
204 | updateRow = "updateRow",
205 | deleteRow = "deleteRow",
206 | zeroChar = "zeroChar",
207 | useToolbar = "useToolbar",
208 | imageRoot = "imageRoot"
209 | }
210 | export interface Options {
211 | showToolbarPanel?: boolean;
212 | showFilterPanel?: boolean;
213 | showSortPanel?: boolean;
214 | showGroupPanel?: boolean;
215 | sortable?: boolean;
216 | resizable?: boolean;
217 | movable?: boolean;
218 | autoResizable?: boolean;
219 | autoWidth?: boolean;
220 | selectMode?: string;
221 | addRow?: boolean;
222 | delRow?: boolean;
223 | insertRow?: boolean;
224 | updateRow?: boolean;
225 | deleteRow?: boolean;
226 | zeroChar?: string;
227 | useToolbar?: boolean;
228 | imageRoot?: string;
229 | treeItemName?: string;
230 | treeParentName?: string;
231 | treeRootValue?: string;
232 | }
233 | //# sourceMappingURL=tbs.grid.types.d.ts.map
--------------------------------------------------------------------------------
/webpack.config.common.js:
--------------------------------------------------------------------------------
1 | module.exports = common = {}
--------------------------------------------------------------------------------
/webpack.config.ts.js:
--------------------------------------------------------------------------------
1 | const path = require('path');
2 | const HtmlWebpackPlugin = require('html-webpack-plugin');
3 | const MiniCssExtractPlugin = require("mini-css-extract-plugin");
4 | const TerserJSPlugin = require('terser-webpack-plugin');
5 | const webpack = require('webpack');
6 | const merge = require('webpack-merge');
7 |
8 | module.exports = webpackConfigTs = {
9 | mode: 'production',
10 | entry: {
11 | "tbsgrid-configs": path.resolve(__dirname, 'src/tbs.grid.configs.ts'),
12 | "tbsgrid": path.resolve(__dirname, 'src/tbs.grid.ts'),
13 | "tbsgrid.min": path.resolve(__dirname, 'src/tbs.grid.ts'),
14 | },
15 | resolve: {
16 | extensions: ['.tsx', '.ts', '.js'],
17 | },
18 | output: {
19 | filename: '[name].js',
20 | path: path.resolve(__dirname, 'dist'),
21 | clean: false,
22 | libraryTarget: "umd",
23 | //library: 'tbs-grid',
24 | //globalObject: 'this',
25 | environment: {
26 | arrowFunction: false,
27 | bigIntLiteral: false,
28 | const: false,
29 | destructuring: false,
30 | dynamicImport: false,
31 | forOf: false,
32 | module: false,
33 | optionalChaining: false,
34 | templateLiteral: false
35 | }
36 | },
37 | module: {
38 | rules: [
39 | {
40 | test: /\.tsx?$/,
41 | use: 'ts-loader',
42 | exclude: /node_modules/,
43 | },
44 | {
45 | test: /\.css$/i,
46 | exclude: /node_modules/,
47 | use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'],
48 | },
49 | {
50 | test: /\.(png|svg|jpg|jpeg|gif)$/i,
51 | type: 'asset/resource',
52 | },
53 | ],
54 | },
55 | externals: {
56 | xlsx: {
57 | commonjs: 'xlsx',
58 | commonjs2: 'xlsx',
59 | amd: 'xlsx',
60 | root: 'XLSX',
61 | },
62 | saveAs: 'file-saver'
63 | },
64 | plugins: [
65 | new MiniCssExtractPlugin({
66 | linkType: false,
67 | filename: '[name].[contenthash].css',
68 | chunkFilename: '[id].[contenthash].css',
69 | }),
70 | new HtmlWebpackPlugin({
71 | title: 'Output Management',
72 | }),
73 | ],
74 | optimization: {
75 | concatenateModules: false,
76 | minimize: true,
77 | minimizer: [new TerserJSPlugin({
78 | terserOptions: {
79 | keep_classnames: true,
80 | keep_fnames: true,
81 | },
82 | include: /\.min\.js$/
83 | })]
84 | }
85 | }
86 | //const commonConfig = require('./webpack.config.common.js');
87 | //module.exports = merge(commonConfig, webpackConfigTs);
--------------------------------------------------------------------------------