@oliasoft-open-source/react-ui-library 5.17.0-beta-9 → 5.17.0-beta-10

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/index.d.ts CHANGED
@@ -793,8 +793,8 @@ declare interface IListItem {
793
793
  disabled?: boolean;
794
794
  onClick?: (evt: any) => void;
795
795
  title?: string;
796
- details?: string;
797
- metadata?: string;
796
+ details?: string | ReactElement;
797
+ metadata?: string | ReactElement;
798
798
  testId?: string;
799
799
  level?: number;
800
800
  label?: ILabel;
@@ -1393,6 +1393,12 @@ declare interface ISimpleCell extends TCommonCell {
1393
1393
  type?: TCellType;
1394
1394
  }
1395
1395
 
1396
+ export declare interface ISkeletonProps {
1397
+ count?: number;
1398
+ width?: string | number;
1399
+ height?: string | number;
1400
+ }
1401
+
1396
1402
  declare interface ISliderCell extends TCommonCell {
1397
1403
  type: TCellType;
1398
1404
  label?: string | null;
@@ -2008,6 +2014,8 @@ export declare const SettingField: ({ helpText, disabled, showCustom, children,
2008
2014
 
2009
2015
  export declare const SideBar: default_2.MemoExoticComponent<({ options, startOpen, onShiftClickToggleOpen, top, }: ISideBarProps) => JSX_2.Element>;
2010
2016
 
2017
+ export declare const Skeleton: ({ count, width, height }: ISkeletonProps) => JSX_2.Element;
2018
+
2011
2019
  export declare const Slider: ({ name, label, width, labelWidth, value, min, max, step, marks, showArrows, showTooltip, tooltipFormatter, disabled, range, small, vertical, onChange, }: ISliderProps) => JSX_2.Element;
2012
2020
 
2013
2021
  export declare const SmartUploadModal: ({ visible, prompt, onCloseModal, onUpload, onComplete, onFailed, onError, width, heading, dialogText, fileInputText, fileInputPlaceholder, uploadText, cancelText, testId, }: ISmartUploadModalProps) => JSX_2.Element;
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import { cloneDeep, cloneDeepWith, debounce, every, get, isArray, isBoolean, isE
10
10
  import styled, { css } from "styled-components";
11
11
  import { Resizable } from "react-resizable";
12
12
  import { createPortal } from "react-dom";
13
- import { ALT_UNITS, KNOWN_UNITS, altUnitsList, cleanNumStr, convertAndGetValue, convertSamePrecision, getAltUnitsListByQuantity, getUnit, getUnitsForQuantity, getValue, isNumeric, isScientificStringNum, isValidNum, isValueWithUnit, label, roundByMagnitude, roundByMagnitudeToFixed, roundToFixed, roundToPrecision, split, stripLeadingZeros, toNum, toString, unitFromQuantity, validateNumber, withPrettyUnitLabel, withUnit } from "@oliasoft-open-source/units";
13
+ import { ALT_UNITS, KNOWN_UNITS, altUnitsList, cleanNumStr, convertAndGetValue, convertSamePrecision, getAltUnitsListByQuantity, getUnit, getUnitsForQuantity, getValue, isScientificStringNum, isValidNum, isValueWithUnit, label, roundByMagnitude, roundByMagnitudeToFixed, roundToFixed, roundToPrecision, split, stripLeadingZeros, toNum, toString, unitFromQuantity, validateNumber, withPrettyUnitLabel, withUnit } from "@oliasoft-open-source/units";
14
14
  import { FixedSizeList } from "react-window";
15
15
  import { SortableContext, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
16
16
  import { CSS } from "@dnd-kit/utilities";
@@ -27,6 +27,8 @@ import { EditorContent, useEditor } from "@tiptap/react";
27
27
  import StarterKit from "@tiptap/starter-kit";
28
28
  import Placeholder from "@tiptap/extension-placeholder";
29
29
  import { Markdown } from "@tiptap/markdown";
30
+ import ReactLoadingSkeleton from "react-loading-skeleton";
31
+ import "react-loading-skeleton/dist/skeleton.css";
30
32
  import { DndProvider } from "react-dnd";
31
33
  import { MultiBackend, Tree as Tree$1, getBackendOptions } from "@minoru/react-dnd-treeview";
32
34
  import ReactDiffViewer, { DiffMethod } from "react-diff-viewer-continued";
@@ -6283,6 +6285,19 @@ const Link$1 = ({ isOpen: e, items: t, sectionIndex: n, onClick: r, testId: i })
6283
6285
  })
6284
6286
  });
6285
6287
  }, (e, t) => isEqual$1(e, t));
6288
+ var skeleton_module_default = {
6289
+ skeletonContainer: "_skeletonContainer_k2td0_9",
6290
+ skeleton: "_skeleton_k2td0_9"
6291
+ };
6292
+ const Skeleton = ({ count: e, width: t, height: n }) => /* @__PURE__ */ jsx(ReactLoadingSkeleton, {
6293
+ baseColor: "var(--color-skeleton-base)",
6294
+ highlightColor: "var(--color-skeleton-highlight)",
6295
+ containerClassName: skeleton_module_default.skeletonContainer,
6296
+ className: skeleton_module_default.skeleton,
6297
+ count: e,
6298
+ width: t,
6299
+ height: n
6300
+ });
6286
6301
  var tabs_module_default = {
6287
6302
  tabs: "_tabs_1y79t_1",
6288
6303
  padding: "_padding_1y79t_7",
@@ -8911,7 +8926,7 @@ const countDeltas = (e) => (Array.isArray(e) ? e : e ? [e] : []).reduce((e, t) =
8911
8926
  case 1: {
8912
8927
  let [t] = e;
8913
8928
  return {
8914
- type: "created",
8929
+ type: "Created",
8915
8930
  before: "",
8916
8931
  after: toText(t)
8917
8932
  };
@@ -8919,7 +8934,7 @@ const countDeltas = (e) => (Array.isArray(e) ? e : e ? [e] : []).reduce((e, t) =
8919
8934
  case 2: {
8920
8935
  let [t, n] = e;
8921
8936
  return {
8922
- type: "modified",
8937
+ type: "Modified",
8923
8938
  before: toText(t),
8924
8939
  after: toText(n)
8925
8940
  };
@@ -8927,13 +8942,13 @@ const countDeltas = (e) => (Array.isArray(e) ? e : e ? [e] : []).reduce((e, t) =
8927
8942
  case 3: {
8928
8943
  let [t] = e;
8929
8944
  return {
8930
- type: "deleted",
8945
+ type: "Deleted",
8931
8946
  before: toText(t),
8932
8947
  after: ""
8933
8948
  };
8934
8949
  }
8935
8950
  default: return {
8936
- type: "modified",
8951
+ type: "Modified",
8937
8952
  before: "",
8938
8953
  after: ""
8939
8954
  };
@@ -8963,46 +8978,22 @@ const createDiffJson = (e, t, n) => {
8963
8978
  oldJson: a,
8964
8979
  newJson: o
8965
8980
  };
8966
- };
8967
- var humanize = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), formatValue = (e) => {
8968
- if (e == null || e === "") return "empty";
8969
- if (typeof e == "boolean") return e ? "true" : "false";
8970
- if (typeof e == "string") return e;
8971
- if (typeof e == "number") return String(e);
8972
- if (Array.isArray(e)) return e.length ? e.join(", ") : "empty";
8973
- try {
8974
- return JSON.stringify(e);
8975
- } catch {
8976
- return String(e);
8977
- }
8978
- }, findReasonableProperty = (e, t = 0) => {
8979
- if (t >= e.length) return "Value";
8980
- let n = e[t];
8981
- return !n || isNumeric(n) ? findReasonableProperty(e, t + 1) : humanize(n);
8982
- }, buildChangeSentence = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
8983
- let o = formatValue(r), s = formatValue(i);
8984
- switch (t) {
8985
- case "modified": return `${e} updated ${n} from ${o} to ${s} in ${a}.`;
8986
- case "created": return `${e} created ${s} in ${a}.`;
8987
- case "deleted": return `${e} deleted ${o} in ${a}.`;
8988
- default: return `${e} changed ${n} in ${a}.`;
8989
- }
8990
- };
8991
- const ChangesOverview = ({ sectionNames: e, userName: t, diffs: n }) => /* @__PURE__ */ jsx(Table, { table: {
8992
- headers: [{ cells: [{ value: "Changes" }] }],
8981
+ }, ChangesOverview = ({ sectionNames: e, userName: t, diffs: n }) => /* @__PURE__ */ jsx(Table, { table: {
8982
+ headers: [{ cells: [
8983
+ { value: "Modified By" },
8984
+ { value: "Type" },
8985
+ { value: "Before" },
8986
+ { value: "After" },
8987
+ { value: "" }
8988
+ ] }],
8993
8989
  rows: n.map((n) => {
8994
8990
  let { deltaFormat: r, path: i } = n, a = getSectionName(e, i), { type: o, before: s, after: c } = defaultMessage(r);
8995
8991
  return { cells: [
8996
- { value: buildChangeSentence({
8997
- userName: t,
8998
- type: o,
8999
- property: findReasonableProperty(i),
9000
- before: s,
9001
- after: c,
9002
- sectionName: a
9003
- }) },
8992
+ { value: t },
8993
+ { value: o },
9004
8994
  { value: s },
9005
- { value: c }
8995
+ { value: c },
8996
+ { value: a }
9006
8997
  ] };
9007
8998
  })
9008
8999
  } }), viewTypes = Object.freeze({
@@ -9202,4 +9193,4 @@ const ComparisonViewModal = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, se
9202
9193
  e === ConfigKeyType.Translations ? setConfig(e, getTranslations(t)) : setConfig(e, isPrimitiveValue(t) ? t : { ...t });
9203
9194
  });
9204
9195
  };
9205
- export { Accordion, AccordionWithDefaultToggle, Actions, Align, AuditLog, Badge, Breadcrumb, BreadcrumbLinkType, Button, ButtonGroup, ButtonPosition, ButtonType, Card, CheckBox, Chevron, Collapse, Color, ColorInput, Column, Dialog, DiffViewer, DisabledContext, Divider, Drawer, ElementType, Empty, Field, FileButton, FileInput, Flex, FormRow, Grid, GroupOrder, Heading, HelpIcon, Icon, IconType, Input, InputGroup, InputGroupAddon, InputReaderMethods, InputType, Label, List, ListHeading, ListSubheading, Loader, Menu, MenuCarat, MenuType, Message, MessageType, Modal, NativeSelect, NumberInput, OptionDropdown, Page, Pagination, PopConfirm, Popover, Portal, PrintHeader, ProgressBar, RadioButton, RichTextInput, Row, Select, SettingField, SideBar, Slider, SmartUploadModal, Spacer, Spinner, Table, TableImportExport, Tabs, Text, TextArea, TextLink, TextTransform, Theme, Toaster, Toggle, Tooltip, TopBar, Tree, TreeTable, TriggerType, UnitInput, UnitTable, UsageTracker, dismissToast, initializeContext, initializeGuiLibrary, readFile, toast, useFocus, useKeyboardEvent, useWindowWidth };
9196
+ export { Accordion, AccordionWithDefaultToggle, Actions, Align, AuditLog, Badge, Breadcrumb, BreadcrumbLinkType, Button, ButtonGroup, ButtonPosition, ButtonType, Card, CheckBox, Chevron, Collapse, Color, ColorInput, Column, Dialog, DiffViewer, DisabledContext, Divider, Drawer, ElementType, Empty, Field, FileButton, FileInput, Flex, FormRow, Grid, GroupOrder, Heading, HelpIcon, Icon, IconType, Input, InputGroup, InputGroupAddon, InputReaderMethods, InputType, Label, List, ListHeading, ListSubheading, Loader, Menu, MenuCarat, MenuType, Message, MessageType, Modal, NativeSelect, NumberInput, OptionDropdown, Page, Pagination, PopConfirm, Popover, Portal, PrintHeader, ProgressBar, RadioButton, RichTextInput, Row, Select, SettingField, SideBar, Skeleton, Slider, SmartUploadModal, Spacer, Spinner, Table, TableImportExport, Tabs, Text, TextArea, TextLink, TextTransform, Theme, Toaster, Toggle, Tooltip, TopBar, Tree, TreeTable, TriggerType, UnitInput, UnitTable, UsageTracker, dismissToast, initializeContext, initializeGuiLibrary, readFile, toast, useFocus, useKeyboardEvent, useWindowWidth };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "5.17.0-beta-9",
3
+ "version": "5.17.0-beta-10",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {
@@ -60,6 +60,7 @@
60
60
  "react-fast-compare": "^3.2.2",
61
61
  "react-icons": "^5.5.0",
62
62
  "react-laag": "^2.0.5",
63
+ "react-loading-skeleton": "^3.5.0",
63
64
  "react-resizable": "^3.0.5",
64
65
  "react-router-dom": "^7.2.0",
65
66
  "react-svg": "^16.3.0",