wini-web-components 2.6.9 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/{public → dist}/index.html +43 -43
  2. package/{public → dist}/manifest.json +25 -25
  3. package/{public → dist}/robots.txt +3 -3
  4. package/dist/types/index.d.ts +1 -0
  5. package/dist/vite.svg +1 -0
  6. package/dist/wini-web-components.css +4 -0
  7. package/dist/wini-web-components.js +32 -0
  8. package/dist/wini-web-components.mjs +6753 -0
  9. package/package.json +44 -82
  10. package/.early.coverage/clover.xml +0 -6
  11. package/.early.coverage/coverage-final.json +0 -1
  12. package/.early.coverage/lcov-report/base.css +0 -224
  13. package/.early.coverage/lcov-report/block-navigation.js +0 -87
  14. package/.early.coverage/lcov-report/favicon.png +0 -0
  15. package/.early.coverage/lcov-report/index.html +0 -101
  16. package/.early.coverage/lcov-report/prettify.css +0 -1
  17. package/.early.coverage/lcov-report/prettify.js +0 -2
  18. package/.early.coverage/lcov-report/sort-arrow-sprite.png +0 -0
  19. package/.early.coverage/lcov-report/sorter.js +0 -196
  20. package/.early.coverage/lcov.info +0 -0
  21. package/.early.coverage/v8/coverage-final.json +0 -1
  22. package/README.md +0 -21
  23. package/coverage/early.sample.test.js +0 -1
  24. package/dist/component/button/button.d.ts +0 -21
  25. package/dist/component/button/button.js +0 -73
  26. package/dist/component/calendar/calendar.d.ts +0 -30
  27. package/dist/component/calendar/calendar.js +0 -357
  28. package/dist/component/card/card-info.d.ts +0 -15
  29. package/dist/component/card/card-info.js +0 -51
  30. package/dist/component/card/card.d.ts +0 -13
  31. package/dist/component/card/card.js +0 -33
  32. package/dist/component/checkbox/checkbox.d.ts +0 -24
  33. package/dist/component/checkbox/checkbox.js +0 -90
  34. package/dist/component/ck-editor/ckeditor.d.ts +0 -36
  35. package/dist/component/ck-editor/ckeditor.js +0 -392
  36. package/dist/component/component-status.d.ts +0 -8
  37. package/dist/component/component-status.js +0 -39
  38. package/dist/component/date-picker/date-picker.d.ts +0 -25
  39. package/dist/component/date-picker/date-picker.js +0 -329
  40. package/dist/component/date-time-picker/date-time-picker.d.ts +0 -36
  41. package/dist/component/date-time-picker/date-time-picker.js +0 -528
  42. package/dist/component/dialog/dialog.d.ts +0 -18
  43. package/dist/component/dialog/dialog.js +0 -113
  44. package/dist/component/import-file/import-file.d.ts +0 -33
  45. package/dist/component/import-file/import-file.js +0 -151
  46. package/dist/component/infinite-scroll/infinite-scroll.d.ts +0 -17
  47. package/dist/component/infinite-scroll/infinite-scroll.js +0 -37
  48. package/dist/component/input-multi-select/input-multi-select.d.ts +0 -21
  49. package/dist/component/input-multi-select/input-multi-select.js +0 -260
  50. package/dist/component/input-opt/input-opt.d.ts +0 -21
  51. package/dist/component/input-opt/input-opt.js +0 -157
  52. package/dist/component/input-otp/input-otp.d.ts +0 -21
  53. package/dist/component/input-otp/input-otp.js +0 -131
  54. package/dist/component/number-picker/number-picker.d.ts +0 -19
  55. package/dist/component/number-picker/number-picker.js +0 -125
  56. package/dist/component/pagination/pagination.d.ts +0 -13
  57. package/dist/component/pagination/pagination.js +0 -90
  58. package/dist/component/popup/popup.d.ts +0 -40
  59. package/dist/component/popup/popup.js +0 -125
  60. package/dist/component/progress-bar/progress-bar.d.ts +0 -16
  61. package/dist/component/progress-bar/progress-bar.js +0 -23
  62. package/dist/component/progress-circle/progress-circle.d.ts +0 -14
  63. package/dist/component/progress-circle/progress-circle.js +0 -19
  64. package/dist/component/radio-button/radio-button.d.ts +0 -20
  65. package/dist/component/radio-button/radio-button.js +0 -33
  66. package/dist/component/rating/rating.d.ts +0 -23
  67. package/dist/component/rating/rating.js +0 -54
  68. package/dist/component/select1/select1.d.ts +0 -31
  69. package/dist/component/select1/select1.js +0 -249
  70. package/dist/component/slider/slider.d.ts +0 -31
  71. package/dist/component/slider/slider.js +0 -64
  72. package/dist/component/switch/switch.d.ts +0 -23
  73. package/dist/component/switch/switch.js +0 -50
  74. package/dist/component/table/table.d.ts +0 -51
  75. package/dist/component/table/table.js +0 -66
  76. package/dist/component/tag/tag.d.ts +0 -21
  77. package/dist/component/tag/tag.js +0 -19
  78. package/dist/component/text/text.d.ts +0 -16
  79. package/dist/component/text/text.js +0 -20
  80. package/dist/component/text-area/text-area.d.ts +0 -28
  81. package/dist/component/text-area/text-area.js +0 -54
  82. package/dist/component/text-field/text-field.d.ts +0 -33
  83. package/dist/component/text-field/text-field.js +0 -77
  84. package/dist/component/toast-noti/toast-noti.d.ts +0 -5
  85. package/dist/component/toast-noti/toast-noti.js +0 -25
  86. package/dist/component/wini-icon/winicon.d.ts +0 -20
  87. package/dist/component/wini-icon/winicon.js +0 -176
  88. package/dist/form/login/view.d.ts +0 -40
  89. package/dist/form/login/view.js +0 -66
  90. package/dist/i18n.d.ts +0 -2
  91. package/dist/i18n.js +0 -125
  92. package/dist/index.d.ts +0 -33
  93. package/dist/index.js +0 -2
  94. package/dist/index.js.LICENSE.txt +0 -18
  95. package/dist/language/i18n.d.ts +0 -2
  96. package/dist/language/i18n.js +0 -146
  97. package/global.d.ts +0 -4
  98. /package/{public → dist}/favicon.ico +0 -0
  99. /package/{public → dist}/logo192.png +0 -0
  100. /package/{public → dist}/logo512.png +0 -0
@@ -1,196 +0,0 @@
1
- /* eslint-disable */
2
- var addSorting = (function() {
3
- 'use strict';
4
- var cols,
5
- currentSort = {
6
- index: 0,
7
- desc: false
8
- };
9
-
10
- // returns the summary table element
11
- function getTable() {
12
- return document.querySelector('.coverage-summary');
13
- }
14
- // returns the thead element of the summary table
15
- function getTableHeader() {
16
- return getTable().querySelector('thead tr');
17
- }
18
- // returns the tbody element of the summary table
19
- function getTableBody() {
20
- return getTable().querySelector('tbody');
21
- }
22
- // returns the th element for nth column
23
- function getNthColumn(n) {
24
- return getTableHeader().querySelectorAll('th')[n];
25
- }
26
-
27
- function onFilterInput() {
28
- const searchValue = document.getElementById('fileSearch').value;
29
- const rows = document.getElementsByTagName('tbody')[0].children;
30
- for (let i = 0; i < rows.length; i++) {
31
- const row = rows[i];
32
- if (
33
- row.textContent
34
- .toLowerCase()
35
- .includes(searchValue.toLowerCase())
36
- ) {
37
- row.style.display = '';
38
- } else {
39
- row.style.display = 'none';
40
- }
41
- }
42
- }
43
-
44
- // loads the search box
45
- function addSearchBox() {
46
- var template = document.getElementById('filterTemplate');
47
- var templateClone = template.content.cloneNode(true);
48
- templateClone.getElementById('fileSearch').oninput = onFilterInput;
49
- template.parentElement.appendChild(templateClone);
50
- }
51
-
52
- // loads all columns
53
- function loadColumns() {
54
- var colNodes = getTableHeader().querySelectorAll('th'),
55
- colNode,
56
- cols = [],
57
- col,
58
- i;
59
-
60
- for (i = 0; i < colNodes.length; i += 1) {
61
- colNode = colNodes[i];
62
- col = {
63
- key: colNode.getAttribute('data-col'),
64
- sortable: !colNode.getAttribute('data-nosort'),
65
- type: colNode.getAttribute('data-type') || 'string'
66
- };
67
- cols.push(col);
68
- if (col.sortable) {
69
- col.defaultDescSort = col.type === 'number';
70
- colNode.innerHTML =
71
- colNode.innerHTML + '<span class="sorter"></span>';
72
- }
73
- }
74
- return cols;
75
- }
76
- // attaches a data attribute to every tr element with an object
77
- // of data values keyed by column name
78
- function loadRowData(tableRow) {
79
- var tableCols = tableRow.querySelectorAll('td'),
80
- colNode,
81
- col,
82
- data = {},
83
- i,
84
- val;
85
- for (i = 0; i < tableCols.length; i += 1) {
86
- colNode = tableCols[i];
87
- col = cols[i];
88
- val = colNode.getAttribute('data-value');
89
- if (col.type === 'number') {
90
- val = Number(val);
91
- }
92
- data[col.key] = val;
93
- }
94
- return data;
95
- }
96
- // loads all row data
97
- function loadData() {
98
- var rows = getTableBody().querySelectorAll('tr'),
99
- i;
100
-
101
- for (i = 0; i < rows.length; i += 1) {
102
- rows[i].data = loadRowData(rows[i]);
103
- }
104
- }
105
- // sorts the table using the data for the ith column
106
- function sortByIndex(index, desc) {
107
- var key = cols[index].key,
108
- sorter = function(a, b) {
109
- a = a.data[key];
110
- b = b.data[key];
111
- return a < b ? -1 : a > b ? 1 : 0;
112
- },
113
- finalSorter = sorter,
114
- tableBody = document.querySelector('.coverage-summary tbody'),
115
- rowNodes = tableBody.querySelectorAll('tr'),
116
- rows = [],
117
- i;
118
-
119
- if (desc) {
120
- finalSorter = function(a, b) {
121
- return -1 * sorter(a, b);
122
- };
123
- }
124
-
125
- for (i = 0; i < rowNodes.length; i += 1) {
126
- rows.push(rowNodes[i]);
127
- tableBody.removeChild(rowNodes[i]);
128
- }
129
-
130
- rows.sort(finalSorter);
131
-
132
- for (i = 0; i < rows.length; i += 1) {
133
- tableBody.appendChild(rows[i]);
134
- }
135
- }
136
- // removes sort indicators for current column being sorted
137
- function removeSortIndicators() {
138
- var col = getNthColumn(currentSort.index),
139
- cls = col.className;
140
-
141
- cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
142
- col.className = cls;
143
- }
144
- // adds sort indicators for current column being sorted
145
- function addSortIndicators() {
146
- getNthColumn(currentSort.index).className += currentSort.desc
147
- ? ' sorted-desc'
148
- : ' sorted';
149
- }
150
- // adds event listeners for all sorter widgets
151
- function enableUI() {
152
- var i,
153
- el,
154
- ithSorter = function ithSorter(i) {
155
- var col = cols[i];
156
-
157
- return function() {
158
- var desc = col.defaultDescSort;
159
-
160
- if (currentSort.index === i) {
161
- desc = !currentSort.desc;
162
- }
163
- sortByIndex(i, desc);
164
- removeSortIndicators();
165
- currentSort.index = i;
166
- currentSort.desc = desc;
167
- addSortIndicators();
168
- };
169
- };
170
- for (i = 0; i < cols.length; i += 1) {
171
- if (cols[i].sortable) {
172
- // add the click event handler on the th so users
173
- // dont have to click on those tiny arrows
174
- el = getNthColumn(i).querySelector('.sorter').parentElement;
175
- if (el.addEventListener) {
176
- el.addEventListener('click', ithSorter(i));
177
- } else {
178
- el.attachEvent('onclick', ithSorter(i));
179
- }
180
- }
181
- }
182
- }
183
- // adds sorting functionality to the UI
184
- return function() {
185
- if (!getTable()) {
186
- return;
187
- }
188
- cols = loadColumns();
189
- loadData();
190
- addSearchBox();
191
- addSortIndicators();
192
- enableUI();
193
- };
194
- })();
195
-
196
- window.addEventListener('load', addSorting);
File without changes
@@ -1 +0,0 @@
1
- {}
package/README.md DELETED
@@ -1,21 +0,0 @@
1
- # Getting Started with Create React App
2
-
3
- This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
4
-
5
- ## Available Scripts
6
-
7
- In the project directory, you can run:
8
-
9
- ### `npm i wini-web-components`
10
-
11
- ### Using Skin
12
- add this cdn link into your App.css file. \
13
- @import url(https://cdn.jsdelivr.net/gh/WiniGit/web-component@latest/src/skin/root.css); \
14
- @import url(https://cdn.jsdelivr.net/gh/WiniGit/web-component@latest/src/skin/typography.css); \
15
- @import url(https://cdn.jsdelivr.net/gh/WiniGit/web-component@latest/src/skin/layout.css);
16
-
17
- add this import css into your App.js \
18
- import 'ckeditor5/ckeditor5.css';
19
-
20
-
21
-
@@ -1 +0,0 @@
1
- test('sample test', () => {});
@@ -1,21 +0,0 @@
1
- import React, { CSSProperties, ReactNode } from 'react';
2
- interface ButtonProps {
3
- id?: string;
4
- label: string;
5
- prefix?: ReactNode;
6
- suffix?: ReactNode;
7
- disabled?: boolean;
8
- linkTo?: string;
9
- target?: string;
10
- style?: CSSProperties;
11
- type?: "button" | "reset" | "submit";
12
- /**
13
- * default: size32: button-text-3 \
14
- * recommend: size64: button-text-1 | size56: button-text-1 | size48: button-text-1 | size40: button-text-3 | size32: button-text-3 | size24: button-text-5
15
- * status button: button-primary | button-infor | button-warning | button-error | button-success | button-grey | button-neutral | button-infor-main | button-warning-main | button-error-main | button-success-main
16
- * */
17
- className?: string;
18
- onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;
19
- }
20
- export declare function Button(props: ButtonProps): React.JSX.Element;
21
- export {};
@@ -1,73 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.Button = Button;
40
- const react_1 = __importStar(require("react"));
41
- const text_1 = require("../text/text");
42
- const button_module_css_1 = __importDefault(require("./button.module.css"));
43
- function Button(props) {
44
- var _a, _b, _c;
45
- const btnRef = (0, react_1.useRef)(null);
46
- (0, react_1.useEffect)(() => {
47
- if (btnRef.current) {
48
- switch (props.type) {
49
- case "submit":
50
- function handleSubmit(ev) {
51
- switch (ev.key.toLowerCase()) {
52
- case "enter":
53
- btnRef.current.click();
54
- break;
55
- default:
56
- break;
57
- }
58
- }
59
- window.addEventListener("keydown", handleSubmit);
60
- return () => { window.removeEventListener("keydown", handleSubmit); };
61
- default:
62
- break;
63
- }
64
- }
65
- }, [props.type, btnRef.current]);
66
- return props.linkTo ? react_1.default.createElement("a", { id: props.id, href: props.disabled ? undefined : props.linkTo, target: props.target, className: `${button_module_css_1.default['button-container']} row ${(_a = props.className) !== null && _a !== void 0 ? _a : "button-text-3"}`, style: props.style, onClick: props.onClick },
67
- props.prefix,
68
- react_1.default.createElement(text_1.Text, { maxLine: 1, className: button_module_css_1.default['button-label'] }, props.label),
69
- props.suffix) : react_1.default.createElement("button", { ref: btnRef, id: props.id, type: (_b = props.type) !== null && _b !== void 0 ? _b : "button", disabled: props.disabled, className: `${button_module_css_1.default['button-container']} row ${(_c = props.className) !== null && _c !== void 0 ? _c : "button-text-3"}`, style: props.style, onClick: props.onClick },
70
- props.prefix,
71
- react_1.default.createElement(text_1.Text, { maxLine: 1, className: button_module_css_1.default['button-label'] }, props.label),
72
- props.suffix);
73
- }
@@ -1,30 +0,0 @@
1
- import React, { CSSProperties, ReactNode } from "react";
2
- import { WithTranslation } from 'react-i18next';
3
- export declare const today: Date;
4
- export declare const startDate: Date;
5
- export declare const endDate: Date;
6
- export declare const inRangeTime: (date: Date, startDate: Date, endDate: Date) => boolean;
7
- interface CalendarProps extends WithTranslation {
8
- id?: string;
9
- value?: Date | {
10
- sTime: Date;
11
- eTime: Date;
12
- };
13
- range?: boolean;
14
- min?: Date;
15
- max?: Date;
16
- onSelect?: (props: Date | {
17
- sTime: Date;
18
- eTime: Date;
19
- }) => void;
20
- disabled?: boolean;
21
- helperText?: string;
22
- helperTextColor?: string;
23
- placeholder?: string;
24
- className?: string;
25
- style?: CSSProperties;
26
- header?: ReactNode;
27
- footer?: ReactNode;
28
- }
29
- export declare const Calendar: React.ComponentType<Omit<import("react-i18next/helpers").$Subtract<CalendarProps, import("react-i18next").WithTranslationProps>, keyof WithTranslation<Ns, undefined>> & import("react-i18next").WithTranslationProps>;
30
- export {};