@qoretechnologies/reqore 0.73.6-pr.640.g3f54fde → 0.73.6
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/dist/components/Button/index.d.ts +0 -19
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index.js +2 -67
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Callout/index.d.ts.map +1 -1
- package/dist/components/Callout/index.js +15 -1
- package/dist/components/Callout/index.js.map +1 -1
- package/dist/components/Effect/index.d.ts +0 -6
- package/dist/components/Effect/index.d.ts.map +1 -1
- package/dist/components/Effect/index.js +19 -23
- package/dist/components/Effect/index.js.map +1 -1
- package/dist/components/Table/body.d.ts +2 -0
- package/dist/components/Table/body.d.ts.map +1 -1
- package/dist/components/Table/body.js +54 -7
- package/dist/components/Table/body.js.map +1 -1
- package/dist/components/Table/index.d.ts +44 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/Table/index.js +109 -17
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Table/row.d.ts +9 -1
- package/dist/components/Table/row.d.ts.map +1 -1
- package/dist/components/Table/row.js +67 -8
- package/dist/components/Table/row.js.map +1 -1
- package/package.json +1 -1
- package/tests.json +1 -0
- package/dist/components/Button/DescriptionModal.d.ts +0 -18
- package/dist/components/Button/DescriptionModal.d.ts.map +0 -1
- package/dist/components/Button/DescriptionModal.js +0 -104
- package/dist/components/Button/DescriptionModal.js.map +0 -1
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface IReqoreButtonDescriptionModalProps {
|
|
2
|
-
/** Modal heading — the button's label when it is a plain string. */
|
|
3
|
-
label?: string;
|
|
4
|
-
/** The FULL description text. */
|
|
5
|
-
value: string;
|
|
6
|
-
onClose: () => void;
|
|
7
|
-
copyLabel?: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* The full-value viewer behind `ReqoreButton.descriptionModal` — the whole
|
|
11
|
-
* description in a selectable, scrollable body with a Copy action (modeled on
|
|
12
|
-
* `ReqoreExportModal`). Lives in its own module and is imported LAZILY by
|
|
13
|
-
* Button: Modal transitively imports Button (Modal → Drawer → Panel → Button),
|
|
14
|
-
* so a static import from Button would close a module cycle.
|
|
15
|
-
*/
|
|
16
|
-
export declare const ReqoreButtonDescriptionModal: import("react").MemoExoticComponent<({ label, value, onClose, copyLabel }: IReqoreButtonDescriptionModalProps) => import("react/jsx-runtime").JSX.Element>;
|
|
17
|
-
export default ReqoreButtonDescriptionModal;
|
|
18
|
-
//# sourceMappingURL=DescriptionModal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptionModal.d.ts","sourceRoot":"","sources":["../../../src/components/Button/DescriptionModal.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,kCAAkC;IACjD,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AASD;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,6EACS,kCAAkC,6CAoDnF,CAAC;AAIF,eAAe,4BAA4B,CAAC"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.ReqoreButtonDescriptionModal = void 0;
|
|
43
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
44
|
-
var react_1 = require("react");
|
|
45
|
-
var __1 = require("../..");
|
|
46
|
-
var Modal_1 = require("../Modal");
|
|
47
|
-
var Textarea_1 = __importDefault(require("../Textarea"));
|
|
48
|
-
/* Fill the modal's fixed-height body instead of scaling with content: a
|
|
49
|
-
content-scaled textarea stops short of the body (dead space below, a
|
|
50
|
-
partial-height scrollbar) or explodes it on huge values. Filling hands the
|
|
51
|
-
whole body to the textarea, so its scrollbar spans the modal body. Module
|
|
52
|
-
scope for stable identity. */
|
|
53
|
-
var FILL_STYLE = { height: '100%' };
|
|
54
|
-
/**
|
|
55
|
-
* The full-value viewer behind `ReqoreButton.descriptionModal` — the whole
|
|
56
|
-
* description in a selectable, scrollable body with a Copy action (modeled on
|
|
57
|
-
* `ReqoreExportModal`). Lives in its own module and is imported LAZILY by
|
|
58
|
-
* Button: Modal transitively imports Button (Modal → Drawer → Panel → Button),
|
|
59
|
-
* so a static import from Button would close a module cycle.
|
|
60
|
-
*/
|
|
61
|
-
exports.ReqoreButtonDescriptionModal = (0, react_1.memo)(function (_a) {
|
|
62
|
-
var label = _a.label, value = _a.value, onClose = _a.onClose, _b = _a.copyLabel, copyLabel = _b === void 0 ? 'Copy' : _b;
|
|
63
|
-
var addNotification = (0, __1.useReqoreProperty)('addNotification');
|
|
64
|
-
var handleCopyClick = (0, react_1.useCallback)(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
65
|
-
var error_1;
|
|
66
|
-
return __generator(this, function (_a) {
|
|
67
|
-
switch (_a.label) {
|
|
68
|
-
case 0:
|
|
69
|
-
_a.trys.push([0, 2, , 3]);
|
|
70
|
-
return [4 /*yield*/, navigator.clipboard.writeText(value)];
|
|
71
|
-
case 1:
|
|
72
|
-
_a.sent();
|
|
73
|
-
addNotification({
|
|
74
|
-
content: 'Copied to clipboard',
|
|
75
|
-
intent: 'success',
|
|
76
|
-
duration: 3000,
|
|
77
|
-
});
|
|
78
|
-
return [3 /*break*/, 3];
|
|
79
|
-
case 2:
|
|
80
|
-
error_1 = _a.sent();
|
|
81
|
-
addNotification({
|
|
82
|
-
content: 'Could not copy to clipboard',
|
|
83
|
-
intent: 'danger',
|
|
84
|
-
duration: 3000,
|
|
85
|
-
});
|
|
86
|
-
return [3 /*break*/, 3];
|
|
87
|
-
case 3: return [2 /*return*/];
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}); }, [value, addNotification]);
|
|
91
|
-
return ((0, jsx_runtime_1.jsx)(Modal_1.ReqoreModal, { isOpen: true, label: label || 'Full value', icon: 'FileTextLine', height: '70vh', onClose: onClose, className: 'reqore-button-description-modal', bottomActions: [
|
|
92
|
-
{
|
|
93
|
-
position: 'right',
|
|
94
|
-
label: copyLabel,
|
|
95
|
-
icon: 'ClipboardLine',
|
|
96
|
-
onClick: function () {
|
|
97
|
-
handleCopyClick();
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
], children: (0, jsx_runtime_1.jsx)(Textarea_1.default, { readOnly: true, value: value, minimal: true, fluid: true, style: FILL_STYLE, wrapperStyle: FILL_STYLE }) }));
|
|
101
|
-
});
|
|
102
|
-
exports.ReqoreButtonDescriptionModal.displayName = 'ReqoreButtonDescriptionModal';
|
|
103
|
-
exports.default = exports.ReqoreButtonDescriptionModal;
|
|
104
|
-
//# sourceMappingURL=DescriptionModal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptionModal.js","sourceRoot":"","sources":["../../../src/components/Button/DescriptionModal.tsx"],"names":[],"mappings":";;;;;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