asv-hlps 1.2.36 → 1.2.37
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.
- package/lib/cjs/models/types/Type.d.ts +8 -0
- package/lib/cjs/reacts/index.d.ts +2 -1
- package/lib/cjs/reacts/index.js +3 -1
- package/lib/cjs/reacts/minton/btns/BtnToggle.d.ts +8 -0
- package/lib/cjs/reacts/minton/btns/BtnToggle.js +20 -0
- package/lib/esm/models/types/Type.d.ts +8 -0
- package/lib/esm/reacts/index.d.ts +2 -1
- package/lib/esm/reacts/index.js +2 -1
- package/lib/esm/reacts/minton/btns/BtnToggle.d.ts +8 -0
- package/lib/esm/reacts/minton/btns/BtnToggle.js +18 -0
- package/package.json +3 -3
|
@@ -50,6 +50,14 @@ export declare type HeaderTableColumnType = {
|
|
|
50
50
|
tooltipH?: any;
|
|
51
51
|
tooltipB?: any;
|
|
52
52
|
};
|
|
53
|
+
export declare type ReactTableColumnType = {
|
|
54
|
+
Header: string;
|
|
55
|
+
accessor: string;
|
|
56
|
+
sort?: boolean;
|
|
57
|
+
Cell?: any;
|
|
58
|
+
className?: string;
|
|
59
|
+
auth?: AuthParam;
|
|
60
|
+
};
|
|
53
61
|
export declare const colNa: HeaderTableColumnType[];
|
|
54
62
|
export declare const colNaCo: HeaderTableColumnType[];
|
|
55
63
|
export declare const colNaCoSh: HeaderTableColumnType[];
|
package/lib/cjs/reacts/index.js
CHANGED
|
@@ -3,6 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useReadonlyFetchTobs = void 0;
|
|
6
|
+
exports.BtnToggle = exports.useReadonlyFetchTobs = void 0;
|
|
7
7
|
const useReadonlyFetchTobs_1 = __importDefault(require("./hooks/useReadonlyFetchTobs"));
|
|
8
8
|
exports.useReadonlyFetchTobs = useReadonlyFetchTobs_1.default;
|
|
9
|
+
const BtnToggle_1 = __importDefault(require("./minton/btns/BtnToggle"));
|
|
10
|
+
exports.BtnToggle = BtnToggle_1.default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const BtnToggle = ({ check, onToggle, theme }) => {
|
|
5
|
+
const toggle = () => {
|
|
6
|
+
let icon = "fas fa-";
|
|
7
|
+
switch (theme) {
|
|
8
|
+
case "bullhorn":
|
|
9
|
+
return check ? (icon += "bullhorn text-success") : (icon += "bullhorn text-danger");
|
|
10
|
+
case "userLock":
|
|
11
|
+
return check ? (icon += "user-plus text-success") : (icon += "user-lock text-danger");
|
|
12
|
+
case "thumbs":
|
|
13
|
+
return check ? (icon += "thumbs-up text-success") : (icon += "thumbs-down text-danger");
|
|
14
|
+
default:
|
|
15
|
+
return check ? (icon += "check") : (icon += "times");
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)("span", Object.assign({ role: "button", onClick: onToggle }, { children: (0, jsx_runtime_1.jsx)("i", { className: toggle() }) })));
|
|
19
|
+
};
|
|
20
|
+
exports.default = BtnToggle;
|
|
@@ -50,6 +50,14 @@ export declare type HeaderTableColumnType = {
|
|
|
50
50
|
tooltipH?: any;
|
|
51
51
|
tooltipB?: any;
|
|
52
52
|
};
|
|
53
|
+
export declare type ReactTableColumnType = {
|
|
54
|
+
Header: string;
|
|
55
|
+
accessor: string;
|
|
56
|
+
sort?: boolean;
|
|
57
|
+
Cell?: any;
|
|
58
|
+
className?: string;
|
|
59
|
+
auth?: AuthParam;
|
|
60
|
+
};
|
|
53
61
|
export declare const colNa: HeaderTableColumnType[];
|
|
54
62
|
export declare const colNaCo: HeaderTableColumnType[];
|
|
55
63
|
export declare const colNaCoSh: HeaderTableColumnType[];
|
package/lib/esm/reacts/index.js
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
const BtnToggle = ({ check, onToggle, theme }) => {
|
|
3
|
+
const toggle = () => {
|
|
4
|
+
let icon = "fas fa-";
|
|
5
|
+
switch (theme) {
|
|
6
|
+
case "bullhorn":
|
|
7
|
+
return check ? (icon += "bullhorn text-success") : (icon += "bullhorn text-danger");
|
|
8
|
+
case "userLock":
|
|
9
|
+
return check ? (icon += "user-plus text-success") : (icon += "user-lock text-danger");
|
|
10
|
+
case "thumbs":
|
|
11
|
+
return check ? (icon += "thumbs-up text-success") : (icon += "thumbs-down text-danger");
|
|
12
|
+
default:
|
|
13
|
+
return check ? (icon += "check") : (icon += "times");
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
return (_jsx("span", Object.assign({ role: "button", onClick: onToggle }, { children: _jsx("i", { className: toggle() }) })));
|
|
17
|
+
};
|
|
18
|
+
export default BtnToggle;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "asv-hlps",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.37",
|
|
4
4
|
"description": "helpers",
|
|
5
5
|
"main": "./lib/cjs/index.js",
|
|
6
6
|
"module": "./lib/esm/index.js",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/bcryptjs": "^2.4.2",
|
|
20
20
|
"@types/randomatic": "^3.1.3",
|
|
21
|
-
"@types/react": "^18.0.
|
|
22
|
-
"typescript": "^4.
|
|
21
|
+
"@types/react": "^18.0.19",
|
|
22
|
+
"typescript": "^4.8.3"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@capacitor/preferences": "^4.0.1",
|