@deviceinsight/ng-ui-components 7.27.0 → 7.29.0
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/README.md +2 -1
- package/dist/index.cjs +64 -127
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +63 -125
- package/dist/index.js.map +1 -1
- package/dist/style.css +70 -41
- package/dist/types/components/upload/FileUpload.stories.d.ts +66 -0
- package/dist/types/components/upload/FileUpload.stories.d.ts.map +1 -1
- package/dist/types/components/upload/ImageUpload.stories.d.ts +24 -0
- package/dist/types/components/upload/ImageUpload.stories.d.ts.map +1 -1
- package/package.json +34 -30
package/README.md
CHANGED
|
@@ -170,4 +170,5 @@ Example: `ng-ui-scale` uses 7.22.0 while 7.24.0 is already released (the version
|
|
|
170
170
|
In `CHANGELOG.md`, keep the 7.22.1 entry between the entries for 7.23.0 and 7.22.0.
|
|
171
171
|
Do not merge the hotfix branch into `main`.
|
|
172
172
|
9. Delete the local hotfix branch: `git branch -d hotfix/7.22.1`.
|
|
173
|
-
10.
|
|
173
|
+
10. Delete the remote hotfix branch: `git push origin --delete hotfix/7.22.1`.
|
|
174
|
+
11. Update `ng-ui-scale` on its hotfix branch to 7.22.1.
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
2
|
+
// \0rolldown/runtime.js
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -20,7 +20,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
20
20
|
value: mod,
|
|
21
21
|
enumerable: true
|
|
22
22
|
}) : target, mod));
|
|
23
|
-
//#endregion
|
|
24
23
|
let react_toastify_unstyled = require("react-toastify/unstyled");
|
|
25
24
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
26
25
|
let nanoid = require("nanoid");
|
|
@@ -76,7 +75,7 @@ let _rc_component_slider = require("@rc-component/slider");
|
|
|
76
75
|
_rc_component_slider = __toESM(_rc_component_slider, 1);
|
|
77
76
|
let _rc_component_tooltip = require("@rc-component/tooltip");
|
|
78
77
|
_rc_component_tooltip = __toESM(_rc_component_tooltip, 1);
|
|
79
|
-
|
|
78
|
+
// src/modules/messageBox/messageBox.tsx
|
|
80
79
|
var groupNamesToToastIds = {};
|
|
81
80
|
var DEFAULT_AUTO_CLOSE_MS = 3e3;
|
|
82
81
|
var globalMessageBoxOptions = {};
|
|
@@ -147,8 +146,7 @@ var MessageBoxContainer = ({ position = "top-center", theme = "colored", autoClo
|
|
|
147
146
|
transition,
|
|
148
147
|
...props
|
|
149
148
|
});
|
|
150
|
-
|
|
151
|
-
//#region src/modules/utils/uuidGen.ts
|
|
149
|
+
// src/modules/utils/uuidGen.ts
|
|
152
150
|
var uuidV4 = (length = 32) => {
|
|
153
151
|
let uuid = "";
|
|
154
152
|
for (let i = 0; i < length; i++) {
|
|
@@ -159,16 +157,14 @@ var uuidV4 = (length = 32) => {
|
|
|
159
157
|
return uuid;
|
|
160
158
|
};
|
|
161
159
|
var nanoid10 = (0, nanoid.customAlphabet)("0123456789abcdefghijklmnopqrstuvwxyz", 10);
|
|
162
|
-
|
|
163
|
-
//#region src/i18n/index.ts
|
|
160
|
+
// src/i18n/index.ts
|
|
164
161
|
var Trans;
|
|
165
162
|
var useTranslation;
|
|
166
163
|
function initializeTranslation(transComponent, useTranslationHook) {
|
|
167
164
|
Trans = transComponent;
|
|
168
165
|
useTranslation = useTranslationHook;
|
|
169
166
|
}
|
|
170
|
-
|
|
171
|
-
//#region src/components/treeview/treeutils.ts
|
|
167
|
+
// src/components/treeview/treeutils.ts
|
|
172
168
|
function removeDuplicatesFromArray(arr) {
|
|
173
169
|
return arr.filter((id, index, arr) => arr.indexOf(id) === index);
|
|
174
170
|
}
|
|
@@ -313,8 +309,7 @@ function getTreeNodePathById(currentNode, idToFind, idKey, childNodeKey, display
|
|
|
313
309
|
const nodePathArray = getTreeNodePathByIdArray(currentNode, idToFind, idKey, childNodeKey, displayNameKey);
|
|
314
310
|
return nodePathArray ? nodePathArray.join(".") : null;
|
|
315
311
|
}
|
|
316
|
-
|
|
317
|
-
//#region src/components/colorpicker/ColorPickerPopper.tsx
|
|
312
|
+
// src/components/colorpicker/ColorPickerPopper.tsx
|
|
318
313
|
function ColorPickerPopper({ isOpen, onOpenChange, className, style, value, placement, children }) {
|
|
319
314
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deviceinsight_ng_ui_basic_components.Popup, {
|
|
320
315
|
handler: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -340,8 +335,7 @@ function ColorPickerPopper({ isOpen, onOpenChange, className, style, value, plac
|
|
|
340
335
|
})
|
|
341
336
|
});
|
|
342
337
|
}
|
|
343
|
-
|
|
344
|
-
//#region src/components/colorpicker/GridColorPicker.tsx
|
|
338
|
+
// src/components/colorpicker/GridColorPicker.tsx
|
|
345
339
|
/**
|
|
346
340
|
* Unlike the GradientColorPicker, the GridColorPicker uses a predefined set of colors.
|
|
347
341
|
* The colors can be defined individually for each GridColorPicker and passed in as prop.
|
|
@@ -372,8 +366,7 @@ function GridColorPicker({ value, isOpen, onOpenStateChange, direction, colors,
|
|
|
372
366
|
children: picker
|
|
373
367
|
});
|
|
374
368
|
}
|
|
375
|
-
|
|
376
|
-
//#region src/components/input/ValidatedTextInput.tsx
|
|
369
|
+
// src/components/input/ValidatedTextInput.tsx
|
|
377
370
|
var isValid = (value, pattern, required) => {
|
|
378
371
|
if (!value.length) return !required;
|
|
379
372
|
return pattern.test(value);
|
|
@@ -409,8 +402,7 @@ var ValidatedTextInput = class extends react.Component {
|
|
|
409
402
|
});
|
|
410
403
|
}
|
|
411
404
|
};
|
|
412
|
-
|
|
413
|
-
//#region src/components/colorpicker/ColorTextInput.tsx
|
|
405
|
+
// src/components/colorpicker/ColorTextInput.tsx
|
|
414
406
|
function ColorTextInput({ value, pattern, onChange, placeholder, style }) {
|
|
415
407
|
const [text, setText] = (0, react.useState)(value);
|
|
416
408
|
const [lastValue, setLastValue] = (0, react.useState)(value);
|
|
@@ -432,8 +424,7 @@ function ColorTextInput({ value, pattern, onChange, placeholder, style }) {
|
|
|
432
424
|
style
|
|
433
425
|
});
|
|
434
426
|
}
|
|
435
|
-
|
|
436
|
-
//#region src/components/colorpicker/GradientColorPicker.tsx
|
|
427
|
+
// src/components/colorpicker/GradientColorPicker.tsx
|
|
437
428
|
var VALIDATE_HEX_COLOR_REGEX = /^#([A-Fa-f0-9]{6})$/;
|
|
438
429
|
var VALIDATE_RGB_COLOR_REGEX = /^rgb\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/;
|
|
439
430
|
var convertRgbaToRgb = (color) => {
|
|
@@ -488,8 +479,7 @@ function GradientColorPicker({ onOpenStateChange, onPick, allowTextInput, classN
|
|
|
488
479
|
children: picker
|
|
489
480
|
});
|
|
490
481
|
}
|
|
491
|
-
|
|
492
|
-
//#region src/utils/dayjsLocales.ts
|
|
482
|
+
// src/utils/dayjsLocales.ts
|
|
493
483
|
var supportedLocales = [
|
|
494
484
|
"en",
|
|
495
485
|
"en-gb",
|
|
@@ -503,8 +493,7 @@ var supportedLocales = [
|
|
|
503
493
|
function isLocaleSupported(locale) {
|
|
504
494
|
return supportedLocales.includes(locale);
|
|
505
495
|
}
|
|
506
|
-
|
|
507
|
-
//#region src/components/input/DateInput.tsx
|
|
496
|
+
// src/components/input/DateInput.tsx
|
|
508
497
|
dayjs.default.extend(dayjs_plugin_utc.default);
|
|
509
498
|
dayjs.default.extend(dayjs_plugin_timezone.default);
|
|
510
499
|
dayjs.default.extend(dayjs_plugin_localeData.default);
|
|
@@ -678,8 +667,7 @@ var DateInput = (0, react.forwardRef)(({ value, clearable, inline, readOnly, wra
|
|
|
678
667
|
})
|
|
679
668
|
});
|
|
680
669
|
});
|
|
681
|
-
|
|
682
|
-
//#region src/components/input/UrnInput.tsx
|
|
670
|
+
// src/components/input/UrnInput.tsx
|
|
683
671
|
/**
|
|
684
672
|
* UrnInput offers a convenient way to add or edit Asset URNs.
|
|
685
673
|
* Usually, a generated default value is passed in as prop.
|
|
@@ -711,8 +699,7 @@ var UrnInput = class extends react.Component {
|
|
|
711
699
|
})] });
|
|
712
700
|
}
|
|
713
701
|
};
|
|
714
|
-
|
|
715
|
-
//#region src/components/prompt/Prompt.tsx
|
|
702
|
+
// src/components/prompt/Prompt.tsx
|
|
716
703
|
/**
|
|
717
704
|
* This component should not be used directly, instead use `@withPrompt` to inject a promise-based prompt method
|
|
718
705
|
*/
|
|
@@ -767,8 +754,7 @@ function Prompt({ title, message, onAccept, onCancel, inputPlaceholder, cancelBu
|
|
|
767
754
|
width: 600
|
|
768
755
|
});
|
|
769
756
|
}
|
|
770
|
-
|
|
771
|
-
//#region src/components/prompt/withPrompt.tsx
|
|
757
|
+
// src/components/prompt/withPrompt.tsx
|
|
772
758
|
function withPrompt(WrappedComponent) {
|
|
773
759
|
return class WithPromptWrapper extends react.Component {
|
|
774
760
|
constructor(..._args) {
|
|
@@ -803,8 +789,7 @@ function withPrompt(WrappedComponent) {
|
|
|
803
789
|
}
|
|
804
790
|
};
|
|
805
791
|
}
|
|
806
|
-
|
|
807
|
-
//#region src/components/link/RouteLink.tsx
|
|
792
|
+
// src/components/link/RouteLink.tsx
|
|
808
793
|
var isModifiedEvent = (event) => !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
|
809
794
|
/**
|
|
810
795
|
* RouteLink enables the possibility to add new links to existing routes.
|
|
@@ -855,8 +840,7 @@ function RouteLink({ to, confirm, className, title, children, keyboardShortcut,
|
|
|
855
840
|
children
|
|
856
841
|
});
|
|
857
842
|
}
|
|
858
|
-
|
|
859
|
-
//#region src/components/infobox/InfoBox.tsx
|
|
843
|
+
// src/components/infobox/InfoBox.tsx
|
|
860
844
|
var colors = {
|
|
861
845
|
info: "#ffffff",
|
|
862
846
|
success: "#cce0cc",
|
|
@@ -933,13 +917,11 @@ var CSS = /*#__PURE__*/ Object.freeze({
|
|
|
933
917
|
return property + " " + duration + "ms " + easing;
|
|
934
918
|
} }
|
|
935
919
|
});
|
|
936
|
-
|
|
937
|
-
//#region src/utils/resolvePath.ts
|
|
920
|
+
// src/utils/resolvePath.ts
|
|
938
921
|
function resolvePath(basePath, match) {
|
|
939
922
|
return `${basePath}${basePath.endsWith("/") ? "" : "/"}${match}`;
|
|
940
923
|
}
|
|
941
|
-
|
|
942
|
-
//#region src/components/tabs/RouteTabs.tsx
|
|
924
|
+
// src/components/tabs/RouteTabs.tsx
|
|
943
925
|
var TabHeader = ({ id, to, className, title, children, draggingDisabled }) => {
|
|
944
926
|
const { attributes, listeners, setNodeRef, transform, transition } = (0, _dnd_kit_sortable.useSortable)({
|
|
945
927
|
id,
|
|
@@ -1029,19 +1011,16 @@ function RouteTabs({ pages, onOrderChange, basePath, ...otherProps }) {
|
|
|
1029
1011
|
} }) })] })]
|
|
1030
1012
|
});
|
|
1031
1013
|
}
|
|
1032
|
-
|
|
1033
|
-
//#region src/assets/svg/icon_folder_loading.svg
|
|
1014
|
+
// src/assets/svg/icon_folder_loading.svg
|
|
1034
1015
|
var icon_folder_loading_default = "data:image/svg+xml,%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20width='24px'%20height='24px'%20viewBox='0%200%2024%2024'%20style='enable-background:new%200%200%2050%2050;'%20xml:space='preserve'%3e%3crect%20x='0'%20y='0'%20width='5'%20height='10'%20fill='%23000'%3e%3canimateTransform%20attributeType='xml'%20attributeName='transform'%20type='translate'%20values='0%200;%200%2014;%200%200'%20begin='0'%20dur='0.6s'%20repeatCount='indefinite'%20/%3e%3c/rect%3e%3crect%20x='9'%20y='0'%20width='5'%20height='10'%20fill='%23000'%3e%3canimateTransform%20attributeType='xml'%20attributeName='transform'%20type='translate'%20values='0%200;%200%2014;%200%200'%20begin='0.2s'%20dur='0.6s'%20repeatCount='indefinite'%20/%3e%3c/rect%3e%3crect%20x='19'%20y='0'%20width='5'%20height='10'%20fill='%23000'%3e%3canimateTransform%20attributeType='xml'%20attributeName='transform'%20type='translate'%20values='0%200;%200%2014;%200%200'%20begin='0.4s'%20dur='0.6s'%20repeatCount='indefinite'%20/%3e%3c/rect%3e%3c/svg%3e";
|
|
1035
|
-
|
|
1036
|
-
//#region src/components/treeview/constants.ts
|
|
1016
|
+
// src/components/treeview/constants.ts
|
|
1037
1017
|
var SelectionState = /* @__PURE__ */ function(SelectionState) {
|
|
1038
1018
|
SelectionState["ALL"] = "all";
|
|
1039
1019
|
SelectionState["SOME"] = "some";
|
|
1040
1020
|
SelectionState["NONE"] = "none";
|
|
1041
1021
|
return SelectionState;
|
|
1042
1022
|
}({});
|
|
1043
|
-
|
|
1044
|
-
//#region src/components/treeview/components/NodeInfo.tsx
|
|
1023
|
+
// src/components/treeview/components/NodeInfo.tsx
|
|
1045
1024
|
var Skeleton = ({ lastChild }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1046
1025
|
className: "skeleton",
|
|
1047
1026
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "skeleton-cell top" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -1117,8 +1096,7 @@ var NodeInfo = class extends react.PureComponent {
|
|
|
1117
1096
|
});
|
|
1118
1097
|
}
|
|
1119
1098
|
};
|
|
1120
|
-
|
|
1121
|
-
//#region src/components/treeview/components/Node.tsx
|
|
1099
|
+
// src/components/treeview/components/Node.tsx
|
|
1122
1100
|
var Node = class Node extends react.Component {
|
|
1123
1101
|
constructor(..._args) {
|
|
1124
1102
|
super(..._args);
|
|
@@ -1200,8 +1178,7 @@ var Node = class Node extends react.Component {
|
|
|
1200
1178
|
});
|
|
1201
1179
|
}
|
|
1202
1180
|
};
|
|
1203
|
-
|
|
1204
|
-
//#region src/components/treeview/TreeView.tsx
|
|
1181
|
+
// src/components/treeview/TreeView.tsx
|
|
1205
1182
|
/**
|
|
1206
1183
|
* TreeView adds the functionality to display "folders" and their content.
|
|
1207
1184
|
* This can come in handy for several data structures.
|
|
@@ -1299,11 +1276,9 @@ var TreeView = class extends react.Component {
|
|
|
1299
1276
|
});
|
|
1300
1277
|
}
|
|
1301
1278
|
};
|
|
1302
|
-
|
|
1303
|
-
//#region src/components/multiMenu/components/MultiMenuContext.ts
|
|
1279
|
+
// src/components/multiMenu/components/MultiMenuContext.ts
|
|
1304
1280
|
var MultiMenuContext = react.createContext({ toggleMenu: () => {} });
|
|
1305
|
-
|
|
1306
|
-
//#region src/components/multiMenu/MultiMenu.tsx
|
|
1281
|
+
// src/components/multiMenu/MultiMenu.tsx
|
|
1307
1282
|
/**
|
|
1308
1283
|
* MultiMenu enables a toggleable menu to either show more content and further functionality.
|
|
1309
1284
|
*/
|
|
@@ -1330,8 +1305,7 @@ function MultiMenuFunctional({ menuButton, children, direction, className, open,
|
|
|
1330
1305
|
})
|
|
1331
1306
|
}) });
|
|
1332
1307
|
}
|
|
1333
|
-
|
|
1334
|
-
//#region src/components/pagination/Pagination.tsx
|
|
1308
|
+
// src/components/pagination/Pagination.tsx
|
|
1335
1309
|
var sizeOptions = [
|
|
1336
1310
|
5,
|
|
1337
1311
|
10,
|
|
@@ -1483,8 +1457,7 @@ function Pagination({ onChangePage, page, totalPages, onChangeSize, size }) {
|
|
|
1483
1457
|
})
|
|
1484
1458
|
});
|
|
1485
1459
|
}
|
|
1486
|
-
|
|
1487
|
-
//#region src/components/input/SelectWithSearch.tsx
|
|
1460
|
+
// src/components/input/SelectWithSearch.tsx
|
|
1488
1461
|
function getSortedOptions(options, compareOptions) {
|
|
1489
1462
|
if (!compareOptions) return (0, lodash.orderBy)(options, "label", "asc");
|
|
1490
1463
|
if (options.every((option) => !option.options)) return [...options].sort(compareOptions);
|
|
@@ -1585,8 +1558,7 @@ var SelectWithSearch = class extends react.Component {
|
|
|
1585
1558
|
});
|
|
1586
1559
|
}
|
|
1587
1560
|
};
|
|
1588
|
-
|
|
1589
|
-
//#region src/components/reactable/helpers/ReactableTextFilter.tsx
|
|
1561
|
+
// src/components/reactable/helpers/ReactableTextFilter.tsx
|
|
1590
1562
|
var getInitialValueFromColumnDef = (columnDef) => {
|
|
1591
1563
|
return columnDef.filterable?.initialValue ?? "";
|
|
1592
1564
|
};
|
|
@@ -1606,8 +1578,7 @@ var ReactableTextFilter = ({ columnDef, changeFilter, "data-testid": testId }) =
|
|
|
1606
1578
|
"data-testid": testId
|
|
1607
1579
|
});
|
|
1608
1580
|
};
|
|
1609
|
-
|
|
1610
|
-
//#region src/components/reactable/helpers/helper.tsx
|
|
1581
|
+
// src/components/reactable/helpers/helper.tsx
|
|
1611
1582
|
function makePageable(items, paginationSettings, customSortFunction) {
|
|
1612
1583
|
if (!items) return null;
|
|
1613
1584
|
const { page, size, sort } = paginationSettings;
|
|
@@ -1678,8 +1649,7 @@ function extendColumnDefsWithCheckboxes(columnDefs, onSelectChange, onSelectAllC
|
|
|
1678
1649
|
function getClassName(tableName, columnName) {
|
|
1679
1650
|
return `${tableName || "unnamedTable"}-${columnName}`;
|
|
1680
1651
|
}
|
|
1681
|
-
|
|
1682
|
-
//#region src/components/reactable/helpers/ReactableTableFilterRow.tsx
|
|
1652
|
+
// src/components/reactable/helpers/ReactableTableFilterRow.tsx
|
|
1683
1653
|
var ReactableTableFilterRow = ({ columnDefs, onFilter, tableName, "data-testid": testId }) => {
|
|
1684
1654
|
const { t } = useTranslation();
|
|
1685
1655
|
const [state, setState] = (0, react.useState)({});
|
|
@@ -1770,8 +1740,7 @@ var ReactableTableFilterRow = ({ columnDefs, onFilter, tableName, "data-testid":
|
|
|
1770
1740
|
}, columnDef.name))
|
|
1771
1741
|
});
|
|
1772
1742
|
};
|
|
1773
|
-
|
|
1774
|
-
//#region src/components/reactable/helpers/ReactableTableHeader.tsx
|
|
1743
|
+
// src/components/reactable/helpers/ReactableTableHeader.tsx
|
|
1775
1744
|
var toggleSortDirection = (direction) => direction === "ASC" ? "DESC" : "ASC";
|
|
1776
1745
|
var ReactableTableHeader = class extends react.Component {
|
|
1777
1746
|
constructor(..._args) {
|
|
@@ -1816,8 +1785,7 @@ var ReactableTableHeader = class extends react.Component {
|
|
|
1816
1785
|
function isTranslationDescriptor(label) {
|
|
1817
1786
|
return typeof label === "object" && label != null && "id" in label && label.id !== void 0;
|
|
1818
1787
|
}
|
|
1819
|
-
|
|
1820
|
-
//#region src/components/reactable/helpers/ReactableTableRow.tsx
|
|
1788
|
+
// src/components/reactable/helpers/ReactableTableRow.tsx
|
|
1821
1789
|
var ReactableTableRow = class extends react.Component {
|
|
1822
1790
|
constructor(..._args) {
|
|
1823
1791
|
super(..._args);
|
|
@@ -1867,8 +1835,7 @@ var ReactableTableRow = class extends react.Component {
|
|
|
1867
1835
|
});
|
|
1868
1836
|
}
|
|
1869
1837
|
};
|
|
1870
|
-
|
|
1871
|
-
//#region src/components/reactable/helpers/ReactableTable.tsx
|
|
1838
|
+
// src/components/reactable/helpers/ReactableTable.tsx
|
|
1872
1839
|
function ReactableTable({ columnDefs, uniqueItemKey, paginationSettings, onSort, onFilter, tableName, pageable, isLoading, rowDef, clickable, messageWhenEmpty, "data-testid": testId }) {
|
|
1873
1840
|
const containerRef = (0, react.useRef)(null);
|
|
1874
1841
|
const tableRef = (0, react.useRef)(null);
|
|
@@ -1981,8 +1948,7 @@ function ReactableTable({ columnDefs, uniqueItemKey, paginationSettings, onSort,
|
|
|
1981
1948
|
})
|
|
1982
1949
|
});
|
|
1983
1950
|
}
|
|
1984
|
-
|
|
1985
|
-
//#region src/components/reactable/Reactable.tsx
|
|
1951
|
+
// src/components/reactable/Reactable.tsx
|
|
1986
1952
|
/**
|
|
1987
1953
|
* Reactable displays paginated results nicely, while adding the possibility to add further functionality to each row.
|
|
1988
1954
|
* Each column can also be extended to be sortable and/or filterable
|
|
@@ -2008,8 +1974,7 @@ var Reactable = class extends react.Component {
|
|
|
2008
1974
|
})] });
|
|
2009
1975
|
}
|
|
2010
1976
|
};
|
|
2011
|
-
|
|
2012
|
-
//#region src/components/reactableWithClientSidePagination/ReactableWithClientSidePagination.tsx
|
|
1977
|
+
// src/components/reactableWithClientSidePagination/ReactableWithClientSidePagination.tsx
|
|
2013
1978
|
var DEFAULT_PAGINATION_SETTINGS = {
|
|
2014
1979
|
page: 0,
|
|
2015
1980
|
size: 15,
|
|
@@ -2147,8 +2112,7 @@ var ReactableWithClientSidePagination = class extends react.Component {
|
|
|
2147
2112
|
});
|
|
2148
2113
|
}
|
|
2149
2114
|
};
|
|
2150
|
-
|
|
2151
|
-
//#region src/components/upload/FileUpload.tsx
|
|
2115
|
+
// src/components/upload/FileUpload.tsx
|
|
2152
2116
|
/**
|
|
2153
2117
|
* FileUpload enables the possibility to upload files conveniently
|
|
2154
2118
|
*/
|
|
@@ -2201,7 +2165,7 @@ var FileUpload = class FileUpload extends react.Component {
|
|
|
2201
2165
|
},
|
|
2202
2166
|
rejectHint: {
|
|
2203
2167
|
id: "fileUpload.rejectHint",
|
|
2204
|
-
defaultValue: "This file
|
|
2168
|
+
defaultValue: "This file cannot be uploaded"
|
|
2205
2169
|
}
|
|
2206
2170
|
};
|
|
2207
2171
|
}
|
|
@@ -2272,8 +2236,7 @@ var FileUpload = class FileUpload extends react.Component {
|
|
|
2272
2236
|
});
|
|
2273
2237
|
}
|
|
2274
2238
|
};
|
|
2275
|
-
|
|
2276
|
-
//#region src/components/upload/ImageUpload.tsx
|
|
2239
|
+
// src/components/upload/ImageUpload.tsx
|
|
2277
2240
|
var PreviewImage = ({ url, imageSize, onRemoveFile, onDragOver, onDownloadFile }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2278
2241
|
className: "di upload preview-container",
|
|
2279
2242
|
onDragOver,
|
|
@@ -2348,8 +2311,7 @@ var ImageUpload = class extends react.Component {
|
|
|
2348
2311
|
});
|
|
2349
2312
|
}
|
|
2350
2313
|
};
|
|
2351
|
-
|
|
2352
|
-
//#region src/components/contentHeader/ContentHeader.tsx
|
|
2314
|
+
// src/components/contentHeader/ContentHeader.tsx
|
|
2353
2315
|
/**
|
|
2354
2316
|
* `parentPageLink` set to true shows a back button to go to the parent page.
|
|
2355
2317
|
* `subPagePathPrefix` needs to be used with `parentPageLink` set to true. It allows to customize what is considered the parent page.
|
|
@@ -2394,8 +2356,7 @@ var ContentHeader = ({ parentPageLink, title, subPagePathPrefixArray, subPagePat
|
|
|
2394
2356
|
]
|
|
2395
2357
|
});
|
|
2396
2358
|
};
|
|
2397
|
-
|
|
2398
|
-
//#region src/components/input/DateTimeInput.tsx
|
|
2359
|
+
// src/components/input/DateTimeInput.tsx
|
|
2399
2360
|
var formatTime = (timezone, date) => {
|
|
2400
2361
|
try {
|
|
2401
2362
|
return dayjs.default.tz(date, timezone).format("HH:mm");
|
|
@@ -2459,8 +2420,7 @@ var DateTimeInput = (0, react.forwardRef)(({ timestamp, timezone, warning, readO
|
|
|
2459
2420
|
})]
|
|
2460
2421
|
});
|
|
2461
2422
|
});
|
|
2462
|
-
|
|
2463
|
-
//#region src/components/input/SelectWithSearchAsync.tsx
|
|
2423
|
+
// src/components/input/SelectWithSearchAsync.tsx
|
|
2464
2424
|
/**
|
|
2465
2425
|
* SelectWithSearchAsync enhances a native select list by applying a search functionality to it.
|
|
2466
2426
|
* Fetches selectable results asynchronously while showing small loading indicator
|
|
@@ -2571,8 +2531,7 @@ var SelectWithSearchAsync = class extends react.Component {
|
|
|
2571
2531
|
});
|
|
2572
2532
|
}
|
|
2573
2533
|
};
|
|
2574
|
-
|
|
2575
|
-
//#region src/components/multiMenu/components/MultiMenuItem.tsx
|
|
2534
|
+
// src/components/multiMenu/components/MultiMenuItem.tsx
|
|
2576
2535
|
var MultiMenuItem = class extends react.PureComponent {
|
|
2577
2536
|
constructor(..._args) {
|
|
2578
2537
|
super(..._args);
|
|
@@ -2611,8 +2570,7 @@ var MultiMenuItem = class extends react.PureComponent {
|
|
|
2611
2570
|
}) });
|
|
2612
2571
|
}
|
|
2613
2572
|
};
|
|
2614
|
-
|
|
2615
|
-
//#region src/components/periodpicker/components/Inputs.tsx
|
|
2573
|
+
// src/components/periodpicker/components/Inputs.tsx
|
|
2616
2574
|
var ONE_HOUR = 36e5;
|
|
2617
2575
|
function Inputs({ period, onChange, readOnly, locale, timezone }) {
|
|
2618
2576
|
const [showWarningTarget, setShowWarningTarget] = (0, react.useState)("");
|
|
@@ -2684,8 +2642,7 @@ function Inputs({ period, onChange, readOnly, locale, timezone }) {
|
|
|
2684
2642
|
]
|
|
2685
2643
|
});
|
|
2686
2644
|
}
|
|
2687
|
-
|
|
2688
|
-
//#region src/components/periodpicker/components/MonthPicker.tsx
|
|
2645
|
+
// src/components/periodpicker/components/MonthPicker.tsx
|
|
2689
2646
|
var MonthPicker = class extends react.Component {
|
|
2690
2647
|
constructor(props) {
|
|
2691
2648
|
super(props);
|
|
@@ -2767,14 +2724,11 @@ var MonthPicker = class extends react.Component {
|
|
|
2767
2724
|
});
|
|
2768
2725
|
}
|
|
2769
2726
|
};
|
|
2770
|
-
|
|
2771
|
-
//#region src/assets/svg/icon_calendar.svg
|
|
2727
|
+
// src/assets/svg/icon_calendar.svg
|
|
2772
2728
|
var icon_calendar_default = "data:image/svg+xml,%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cdefs%3e%3cstyle%3e%20.cls-1%20{%20fill:%20%23fff;%20}%20%3c/style%3e%3c/defs%3e%3cg%3e%3cg%3e%3crect%20class='cls-1'%20x='3.5'%20y='7.5'%20width='2'%20height='2'/%3e%3cpath%20d='M5,8V9H4V8H5M6,7H3v3H6V7Z'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='8'%20y='7'%20width='1'%20height='1'/%3e%3cpolygon%20points='9%207%208%207%208%208%209%208%209%207%209%207'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='10'%20y='7'%20width='1'%20height='1'/%3e%3cpolygon%20points='11%207%2010%207%2010%208%2011%208%2011%207%2011%207'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='12'%20y='7'%20width='1'%20height='1'/%3e%3cpolygon%20points='13%207%2012%207%2012%208%2013%208%2013%207%2013%207'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='8'%20y='9'%20width='1'%20height='1'/%3e%3cpolygon%20points='9%209%208%209%208%2010%209%2010%209%209%209%209'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='8'%20y='11'%20width='1'%20height='1'/%3e%3cpolygon%20points='9%2011%208%2011%208%2012%209%2012%209%2011%209%2011'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='6'%20y='11'%20width='1'%20height='1'/%3e%3cpolygon%20points='7%2011%206%2011%206%2012%207%2012%207%2011%207%2011'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='4'%20y='11'%20width='1'%20height='1'/%3e%3cpolygon%20points='5%2011%204%2011%204%2012%205%2012%205%2011%205%2011'/%3e%3c/g%3e%3cg%3e%3crect%20class='cls-1'%20x='10.5'%20y='9.5'%20width='2'%20height='2'/%3e%3cpath%20d='M12,10v1H11V10h1m1-1H10v3h3V9Z'/%3e%3c/g%3e%3cpath%20d='M15.31,2H.69A.69.69,0,0,0,0,2.69V14.31A.69.69,0,0,0,.69,15H15.31a.69.69,0,0,0,.69-.69V2.69A.69.69,0,0,0,15.31,2ZM14,13H2V6H14Z'/%3e%3c/g%3e%3crect%20x='3'%20width='3'%20height='2'/%3e%3crect%20x='10'%20width='3'%20height='2'/%3e%3c/svg%3e";
|
|
2773
|
-
|
|
2774
|
-
//#region src/assets/svg/triangle_down.svg
|
|
2729
|
+
// src/assets/svg/triangle_down.svg
|
|
2775
2730
|
var triangle_down_default = "data:image/svg+xml,%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3e%3cpolygon%20points='7.5%2010%204%206%2011%206%207.5%2010'/%3e%3c/svg%3e";
|
|
2776
|
-
|
|
2777
|
-
//#region src/components/periodpicker/periods.ts
|
|
2731
|
+
// src/components/periodpicker/periods.ts
|
|
2778
2732
|
dayjs.default.extend(dayjs_plugin_timezone.default);
|
|
2779
2733
|
dayjs.default.extend(dayjs_plugin_utc.default);
|
|
2780
2734
|
function dayjsTz(timezone, ts) {
|
|
@@ -2826,8 +2780,7 @@ var DAY_TO_MILLIS = 864e5;
|
|
|
2826
2780
|
function periodToDays({ tsStart, tsEnd }) {
|
|
2827
2781
|
return Math.round((tsEnd - tsStart + 1) / DAY_TO_MILLIS);
|
|
2828
2782
|
}
|
|
2829
|
-
|
|
2830
|
-
//#region src/components/periodpicker/components/Menu.tsx
|
|
2783
|
+
// src/components/periodpicker/components/Menu.tsx
|
|
2831
2784
|
function Menu({ onChange, onShowCustomPeriod, periodName, timezone }) {
|
|
2832
2785
|
const [visible, setVisible] = (0, react.useState)(false);
|
|
2833
2786
|
const [showDatePicker, setShowDatePicker] = (0, react.useState)(false);
|
|
@@ -3033,8 +2986,7 @@ function Menu({ onChange, onShowCustomPeriod, periodName, timezone }) {
|
|
|
3033
2986
|
})
|
|
3034
2987
|
}) });
|
|
3035
2988
|
}
|
|
3036
|
-
|
|
3037
|
-
//#region src/components/periodpicker/usePeriodName.ts
|
|
2989
|
+
// src/components/periodpicker/usePeriodName.ts
|
|
3038
2990
|
function compare(period1, period2) {
|
|
3039
2991
|
return period1.tsStart === period2.tsStart && period1.tsEnd === period2.tsEnd;
|
|
3040
2992
|
}
|
|
@@ -3056,8 +3008,7 @@ function usePeriodName(period, timezone) {
|
|
|
3056
3008
|
days
|
|
3057
3009
|
});
|
|
3058
3010
|
}
|
|
3059
|
-
|
|
3060
|
-
//#region src/components/periodpicker/PeriodPicker.tsx
|
|
3011
|
+
// src/components/periodpicker/PeriodPicker.tsx
|
|
3061
3012
|
function PeriodPicker({ period, onChange, inputsHiddenByDefault, menuHidden, readOnly, locale, defaultPeriodName, timezone, ...props }) {
|
|
3062
3013
|
const [showInputs, setShowInputs] = (0, react.useState)(!inputsHiddenByDefault);
|
|
3063
3014
|
const periodName = usePeriodName(period, timezone) ?? defaultPeriodName;
|
|
@@ -3078,8 +3029,7 @@ function PeriodPicker({ period, onChange, inputsHiddenByDefault, menuHidden, rea
|
|
|
3078
3029
|
})]
|
|
3079
3030
|
});
|
|
3080
3031
|
}
|
|
3081
|
-
|
|
3082
|
-
//#region src/components/svg/utils/findConflicts.ts
|
|
3032
|
+
// src/components/svg/utils/findConflicts.ts
|
|
3083
3033
|
var CONFLICTING_IDS_DETECTION_DELAY = 500;
|
|
3084
3034
|
var calculateIdCountsInElement = (element) => {
|
|
3085
3035
|
return Array.from(element.querySelectorAll("[id]")).map((element) => element.getAttribute("id")).reduce((acc, id) => {
|
|
@@ -3098,8 +3048,7 @@ function findConflicts(svgElement, onConflict) {
|
|
|
3098
3048
|
}, CONFLICTING_IDS_DETECTION_DELAY);
|
|
3099
3049
|
return () => clearTimeout(timeoutId);
|
|
3100
3050
|
}
|
|
3101
|
-
|
|
3102
|
-
//#region src/components/svg/utils/createHyperlinkModification.ts
|
|
3051
|
+
// src/components/svg/utils/createHyperlinkModification.ts
|
|
3103
3052
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
3104
3053
|
function createHyperlinkModification(element, { hoverColor, internalLink, link }, globalStyleElement, onInternalLinkChange) {
|
|
3105
3054
|
const anchor = wrapIntoAnchor(element);
|
|
@@ -3123,8 +3072,7 @@ function wrapIntoAnchor(wrappedElement) {
|
|
|
3123
3072
|
else parentNode.appendChild(wrapperElement);
|
|
3124
3073
|
return wrapperElement;
|
|
3125
3074
|
}
|
|
3126
|
-
|
|
3127
|
-
//#region src/components/svg/utils/getMutableNodeList.ts
|
|
3075
|
+
// src/components/svg/utils/getMutableNodeList.ts
|
|
3128
3076
|
var removeSvgNamespace = (xml) => xml.replace(/<svg:svg/g, "<svg").replace(/<\/svg:svg/g, "</svg");
|
|
3129
3077
|
var parseFromString = (imageData) => {
|
|
3130
3078
|
const parser = new DOMParser();
|
|
@@ -3134,8 +3082,7 @@ var parseFromString = (imageData) => {
|
|
|
3134
3082
|
function getMutableNodeList_default(imageData, diFieldId) {
|
|
3135
3083
|
return parseFromString(imageData).querySelectorAll(`[id^="${diFieldId}"]`);
|
|
3136
3084
|
}
|
|
3137
|
-
|
|
3138
|
-
//#region src/components/svg/utils/transformPositionModifications.ts
|
|
3085
|
+
// src/components/svg/utils/transformPositionModifications.ts
|
|
3139
3086
|
var mergePositionChanges = (modifications) => {
|
|
3140
3087
|
const positionModifications = modifications.filter(({ type }) => type === "positionX" || type === "positionY");
|
|
3141
3088
|
const restModifications = modifications.filter(({ type }) => type !== "positionX" && type !== "positionY");
|
|
@@ -3170,8 +3117,7 @@ var transformPositionModifications_default = (modifications) => {
|
|
|
3170
3117
|
}), {});
|
|
3171
3118
|
return Object.keys(modificationsByTarget).reduce((acc, target) => acc.concat(mergePositionChanges(modificationsByTarget[target])), []);
|
|
3172
3119
|
};
|
|
3173
|
-
|
|
3174
|
-
//#region src/components/svg/utils/createPositionModification.ts
|
|
3120
|
+
// src/components/svg/utils/createPositionModification.ts
|
|
3175
3121
|
var limitPercentagePosition = (position) => Math.max(0, Math.min(100, position));
|
|
3176
3122
|
function createPositionModification(element, modification, svgElement) {
|
|
3177
3123
|
const svg = (0, _svgdotjs_svg_js.SVG)(svgElement);
|
|
@@ -3186,8 +3132,7 @@ function createPositionModification(element, modification, svgElement) {
|
|
|
3186
3132
|
targetEl.y(bbox.y + limitPercentagePosition(modification.positionY) * bbox.height / 100);
|
|
3187
3133
|
}
|
|
3188
3134
|
}
|
|
3189
|
-
|
|
3190
|
-
//#region src/components/svg/utils/renderSvg.ts
|
|
3135
|
+
// src/components/svg/utils/renderSvg.ts
|
|
3191
3136
|
function renderSvg(svgWrapper, imageData, modifications, globalStyleElement, onInternalLinkChange) {
|
|
3192
3137
|
const svgElement = parseFromString(imageData).querySelector("svg");
|
|
3193
3138
|
if (svgElement) {
|
|
@@ -3255,8 +3200,7 @@ function applyModification(element, modification, svgElement, globalStyleElement
|
|
|
3255
3200
|
function sortModifications(modifications) {
|
|
3256
3201
|
return modifications.sort(({ type: type1 }, { type: type2 }) => type1 !== type2 && type2 === "rotation" ? -1 : 1);
|
|
3257
3202
|
}
|
|
3258
|
-
|
|
3259
|
-
//#region src/components/svg/SvgImage.tsx
|
|
3203
|
+
// src/components/svg/SvgImage.tsx
|
|
3260
3204
|
function useGlobalStyleElement() {
|
|
3261
3205
|
const [styleElement] = (0, react.useState)(() => {
|
|
3262
3206
|
const element = document.createElement("style");
|
|
@@ -3290,8 +3234,7 @@ function SvgImage({ imageData, modifications, onConflict }) {
|
|
|
3290
3234
|
]);
|
|
3291
3235
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { ref: svgWrapperRef });
|
|
3292
3236
|
}
|
|
3293
|
-
|
|
3294
|
-
//#region src/components/svg/utils/getSvgElement.ts
|
|
3237
|
+
// src/components/svg/utils/getSvgElement.ts
|
|
3295
3238
|
var getSvgElement_default = (imageData) => {
|
|
3296
3239
|
try {
|
|
3297
3240
|
return parseFromString(imageData).querySelector("svg");
|
|
@@ -3299,14 +3242,12 @@ var getSvgElement_default = (imageData) => {
|
|
|
3299
3242
|
return null;
|
|
3300
3243
|
}
|
|
3301
3244
|
};
|
|
3302
|
-
|
|
3303
|
-
//#region src/components/svg/utils/validateSvg.ts
|
|
3245
|
+
// src/components/svg/utils/validateSvg.ts
|
|
3304
3246
|
var validateSvg_default = (imageData) => {
|
|
3305
3247
|
const svgElement = getSvgElement_default(imageData);
|
|
3306
3248
|
return !!svgElement && !!svgElement.style;
|
|
3307
3249
|
};
|
|
3308
|
-
|
|
3309
|
-
//#region src/components/chart/Chart.tsx
|
|
3250
|
+
// src/components/chart/Chart.tsx
|
|
3310
3251
|
function createTooltip(header, name, value) {
|
|
3311
3252
|
return `<div>${header}</div><div>${name}: <strong>${value}</strong></div>`;
|
|
3312
3253
|
}
|
|
@@ -3430,8 +3371,7 @@ var Chart = class extends react.Component {
|
|
|
3430
3371
|
});
|
|
3431
3372
|
}
|
|
3432
3373
|
};
|
|
3433
|
-
|
|
3434
|
-
//#region src/components/slider/RcSliderWithTooltip.tsx
|
|
3374
|
+
// src/components/slider/RcSliderWithTooltip.tsx
|
|
3435
3375
|
var HandleTooltip = (props) => {
|
|
3436
3376
|
const { value, children, visible, tipFormatter = (val) => `${val}`, ...restProps } = props;
|
|
3437
3377
|
const tooltipRef = (0, react.useRef)(null);
|
|
@@ -3472,8 +3412,7 @@ var TooltipSlider = ({ tipFormatter, tipProps, ...props }) => {
|
|
|
3472
3412
|
handleRender: tipHandleRender
|
|
3473
3413
|
});
|
|
3474
3414
|
};
|
|
3475
|
-
|
|
3476
|
-
//#region src/components/slider/useLimitStyling.ts
|
|
3415
|
+
// src/components/slider/useLimitStyling.ts
|
|
3477
3416
|
function useLimitStyling(limit, min, max) {
|
|
3478
3417
|
const [slider, setSlider] = (0, react.useState)(null);
|
|
3479
3418
|
(0, react.useEffect)(() => {
|
|
@@ -3524,8 +3463,7 @@ function useLimitStyling(limit, min, max) {
|
|
|
3524
3463
|
}, [slider, updateLimitAreaSize]);
|
|
3525
3464
|
return setSlider;
|
|
3526
3465
|
}
|
|
3527
|
-
|
|
3528
|
-
//#region src/components/slider/Slider.tsx
|
|
3466
|
+
// src/components/slider/Slider.tsx
|
|
3529
3467
|
/**
|
|
3530
3468
|
* Enables picking the desired value from a specified range.
|
|
3531
3469
|
* Can have a tooltip and labels
|
|
@@ -3563,7 +3501,6 @@ var Slider = ({ min, max, step, value, tooltip = true, labels, format, onChange,
|
|
|
3563
3501
|
})
|
|
3564
3502
|
});
|
|
3565
3503
|
};
|
|
3566
|
-
//#endregion
|
|
3567
3504
|
exports.Chart = Chart;
|
|
3568
3505
|
exports.ColorPicker = GridColorPicker;
|
|
3569
3506
|
exports.ContentHeader = ContentHeader;
|