@oliasoft-open-source/react-ui-library 4.4.9-beta-1 → 4.4.9
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/404.html +1 -0
- package/dist/assets/{index-UlXF8M5L.js → index-neKlYvgy.js} +5 -21
- package/dist/index.d.ts +4 -8
- package/dist/index.html +1 -1
- package/dist/index.js +66 -31
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/{Color-6VNJS4EI-dBRov0iu.js → Color-6VNJS4EI-Cz_xXUi-.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-NNNQARDV-XOipoxsx.js → DocsRenderer-NNNQARDV-CGE_1VFf.js} +1 -1
- package/dist/storybook/assets/{WithTooltip-4HIR6TLV-N9BTPjWv.js → WithTooltip-4HIR6TLV-QXrbnnFF.js} +1 -1
- package/dist/storybook/assets/{accordion-MRdNs3mQ.js → accordion-6_27SROY.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-UmGPZpjJ.js → accordion.stories-DAmwlTmm.js} +2 -2
- package/dist/storybook/assets/{actions--jdeAagr.js → actions-SGexXf58.js} +1 -1
- package/dist/storybook/assets/actions.stories-dDCC23QK.js +1 -0
- package/dist/storybook/assets/afe.stories-n9sXDAMv.js +88 -0
- package/dist/storybook/assets/badge.stories-nzXJ1qip.js +1 -0
- package/dist/storybook/assets/blowout.stories-ro9WCHli.js +40 -0
- package/dist/storybook/assets/button-IoNblLER.js +1 -0
- package/dist/storybook/assets/{button-group-kcxXYkIJ.js → button-group-KeeGgC4K.js} +1 -1
- package/dist/storybook/assets/{button-group.stories-U6DjmSki.js → button-group.stories-DG3i2d7K.js} +2 -2
- package/dist/storybook/assets/button.stories-R9_1tl9l.js +71 -0
- package/dist/storybook/assets/{buttons-and-links-e6-ikhN9.js → buttons-and-links-_u2w_3Sb.js} +2 -2
- package/dist/storybook/assets/card.stories-OtRekExg.js +1 -0
- package/dist/storybook/assets/{casing-loads.stories-xqjG7_uN.js → casing-loads.stories-lPhHcaix.js} +2 -2
- package/dist/storybook/assets/{cell.stories-SsCpOpZw.js → cell.stories-S9IDsuIA.js} +2 -2
- package/dist/storybook/assets/{check-box-7DccPNCs.js → check-box-BX5dfQFk.js} +1 -1
- package/dist/storybook/assets/{check-box.stories-QBPARD7M.js → check-box.stories-FNs72smP.js} +2 -2
- package/dist/storybook/assets/{chunk-HLWAVYOI-HfFAKSRB.js → chunk-HLWAVYOI-T9XhWyqr.js} +1 -1
- package/dist/storybook/assets/color-A6C9HdIl.js +25 -0
- package/dist/storybook/assets/{column.stories-FWqVDX5B.js → column.stories-5pd3N4bE.js} +4 -4
- package/dist/storybook/assets/{dialog-e8amLd6m.js → dialog-dekS0lUR.js} +1 -1
- package/dist/storybook/assets/{drawer-LFjap9lP.js → drawer-TM-jK3WR.js} +1 -1
- package/dist/storybook/assets/{drawer.stories-liH4UlvJ.js → drawer.stories-a2C35tbD.js} +4 -4
- package/dist/storybook/assets/empty.stories-KIByp315.js +1 -0
- package/dist/storybook/assets/{field-9udMeZdr.js → field-kOZPBHf6.js} +1 -1
- package/dist/storybook/assets/{field.stories-H98nslNw.js → field.stories-aEccauPi.js} +2 -2
- package/dist/storybook/assets/file-input.stories-hWN8tShr.js +66 -0
- package/dist/storybook/assets/{flex.stories-JzmT6lSO.js → flex.stories-kjbyZMWP.js} +2 -2
- package/dist/storybook/assets/footer.stories-4uhW-z_4.js +3 -0
- package/dist/storybook/assets/form.stories-sBK-yzVk.js +49 -0
- package/dist/storybook/assets/formation.stories-ZGzBQKt1.js +74 -0
- package/dist/storybook/assets/{formatter-SWP5E3XI-s19u3emO.js → formatter-SWP5E3XI-h14nWp8H.js} +1 -1
- package/dist/storybook/assets/{heading-sY0SLHoQ.js → heading-cUVItwKq.js} +1 -1
- package/dist/storybook/assets/{heading.stories-hnhUBXVe.js → heading.stories-K-Z0sIoo.js} +2 -2
- package/dist/storybook/assets/{help-icon-yrJgkgdC.js → help-icon-nI9A506M.js} +1 -1
- package/dist/storybook/assets/help-icon.stories-Qz7MKCnQ.js +4 -0
- package/dist/storybook/assets/{icon-_m67DAr0.js → icon-y1a2N5SZ.js} +3 -3
- package/dist/storybook/assets/icon.stories-icqUrCtQ.js +6 -0
- package/dist/storybook/assets/iframe-ewnG0vJp.js +7 -0
- package/dist/storybook/assets/{index-oLFGkfb-.js → index-uoOEqMy3.js} +5 -5
- package/dist/storybook/assets/index.es-JXn3JM7k.js +86 -0
- package/dist/storybook/assets/{input-group.stories-zQ6b9scC.js → input-group.stories-EouZEW-v.js} +2 -2
- package/dist/storybook/assets/{input-validation-lIx2JTiW.js → input-validation-n6eao7SU.js} +2 -2
- package/dist/storybook/assets/{inputs-ubhN8jR5.js → inputs-GPmW4E0V.js} +14 -14
- package/dist/storybook/assets/{label-J7MI85wD.js → label-RpB4JmHX.js} +1 -1
- package/dist/storybook/assets/label.stories-HcdQ1bEB.js +11 -0
- package/dist/storybook/assets/{layout-forms-R_iC_SeZ.js → layout-forms-MHQI2bRl.js} +4 -4
- package/dist/storybook/assets/{layout-general-2sM6LsZn.js → layout-general-CZQ7ghD4.js} +2 -2
- package/dist/storybook/assets/list-FJ7byNrg.js +8 -0
- package/dist/storybook/assets/{list-heading-vbaXVA9N.js → list-heading-XbqCJOHh.js} +1 -1
- package/dist/storybook/assets/{list.stories-data-tBKSPg9P.js → list.stories-data-spFiMtCi.js} +1 -1
- package/dist/storybook/assets/list.stories-nWamVbJ2.js +457 -0
- package/dist/storybook/assets/{loader.stories-9Tv8nlOO.js → loader.stories-G8Q_Fm8u.js} +2 -2
- package/dist/storybook/assets/{menu.stories-iE1tUnCd.js → menu.stories-sot2Whii.js} +2 -2
- package/dist/storybook/assets/{message-p9VAXLNZ.js → message-uMHaTEXV.js} +1 -1
- package/dist/storybook/assets/{message.stories-34ul5gSz.js → message.stories-BqM_-mrZ.js} +2 -2
- package/dist/storybook/assets/{modal.stories-RMMVeIMK.js → modal.stories-K4XxeWTp.js} +2 -2
- package/dist/storybook/assets/{number-input.stories-477qVsQF.js → number-input.stories-SOsG2FLJ.js} +2 -2
- package/dist/storybook/assets/option-dropdown.stories-1Y5JDaBF.js +21 -0
- package/dist/storybook/assets/{padding-and-spacing-_thODzSW.js → padding-and-spacing-bEYmbHUL.js} +1 -1
- package/dist/storybook/assets/page.stories-B5gzoAi8.js +57 -0
- package/dist/storybook/assets/{pagination-qKZAUHlD.js → pagination-Eaj_UOBW.js} +1 -1
- package/dist/storybook/assets/{pagination.stories-tRiEpkH6.js → pagination.stories-sl2a8BMq.js} +2 -2
- package/dist/storybook/assets/pop-confirm.stories-94l3Xg8w.js +9 -0
- package/dist/storybook/assets/{popover-GnGIPc9x.js → popover-uAo1e4-D.js} +1 -1
- package/dist/storybook/assets/popover.stories-XaqJOrng.js +1 -0
- package/dist/storybook/assets/{preview-FRdqQg8W.js → preview-h-cDYi03.js} +3 -3
- package/dist/storybook/assets/{preview-eDFlm4aX.js → preview-v0YDNRHB.js} +2 -2
- package/dist/storybook/assets/projects.stories-UU4irLQZ.js +47 -0
- package/dist/storybook/assets/{radio-button-T38JdN-I.js → radio-button-QcS9mLYi.js} +1 -1
- package/dist/storybook/assets/{radio-button.stories-MbtUJQ4_.js → radio-button.stories-KCS981-F.js} +5 -5
- package/dist/storybook/assets/{reservoirs.stories-ttnZYnPz.js → reservoirs.stories-iKvudcEf.js} +2 -2
- package/dist/storybook/assets/{rich-text-input.stories-OiAxLAVQ.js → rich-text-input.stories-D55Op5Gf.js} +3 -3
- package/dist/storybook/assets/{row.stories-8AoB-Dlf.js → row.stories-HVr8m6RK.js} +2 -2
- package/dist/storybook/assets/{select-0hek2Baz.js → select-Z1HqJ5aU.js} +1 -1
- package/dist/storybook/assets/{select.stories-tCGanTNP.js → select.stories-oUxeDUts.js} +2 -2
- package/dist/storybook/assets/{side-bar-0iIgujp4.js → side-bar-GJ2tcZYY.js} +1 -1
- package/dist/storybook/assets/side-bar.stories-q_bRwHV_.js +1 -0
- package/dist/storybook/assets/{site.stories-2PTp7gw0.js → site.stories-4pPVEtn7.js} +2 -2
- package/dist/storybook/assets/{slider-t5EokN-o.js → slider-_5NQKbM-.js} +2 -2
- package/dist/storybook/assets/{slider.stories-Knk-d29_.js → slider.stories-QyyBB_rz.js} +4 -4
- package/dist/storybook/assets/spacer.stories-CWSQp7tw.js +1 -0
- package/dist/storybook/assets/{syntaxhighlighter-NMPM6SWI-y1MAbcc6.js → syntaxhighlighter-NMPM6SWI-6X_Ph-aa.js} +1 -1
- package/dist/storybook/assets/{table-o1Zuxe0v.js → table-_jWgMFOi.js} +1 -1
- package/dist/storybook/assets/{table.stories-data-tHq-3JM9.js → table.stories-data-2BZDVr2X.js} +1 -1
- package/dist/storybook/assets/{table.stories-K2LI80yY.js → table.stories-lwqVUJHa.js} +2 -2
- package/dist/storybook/assets/text-link.stories-kjfUeFtk.js +1 -0
- package/dist/storybook/assets/{title.stories-waT6sG0P.js → title.stories-Djnk3crF.js} +3 -3
- package/dist/storybook/assets/{toaster-bqqWcltU.js → toaster-eOozfa7U.js} +1 -1
- package/dist/storybook/assets/{toaster.stories-oExX0THb.js → toaster.stories-ft_M65x0.js} +2 -2
- package/dist/storybook/assets/{toggle-b0PkHQDl.js → toggle-wk0GbVB8.js} +1 -1
- package/dist/storybook/assets/{toggle.stories-wWcYddEt.js → toggle.stories-LC6LSCD2.js} +2 -2
- package/dist/storybook/assets/tooltip.test-case.stories-y-bQOM0s.js +3 -0
- package/dist/storybook/assets/{top-bar-odjinr_b.js → top-bar-0fDAFWyC.js} +1 -1
- package/dist/storybook/assets/top-bar.stories-YKtteM_h.js +1 -0
- package/dist/storybook/assets/top-bar.testcase.stories-Z-6C5D2R.js +30 -0
- package/dist/storybook/assets/{tree.stories-vNmT3unc.js → tree.stories-Fsb5fGEv.js} +3 -3
- package/dist/storybook/assets/unit-input.stories-ZdrR9JWT.js +273 -0
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/storybook/stories.json +1 -1
- package/package.json +1 -2
- package/dist/storybook/assets/actions.stories-T8b1WLu9.js +0 -1
- package/dist/storybook/assets/afe.stories-Vw9r62sk.js +0 -88
- package/dist/storybook/assets/badge.stories-spKtjcPw.js +0 -1
- package/dist/storybook/assets/blowout.stories-U_cS_3Xs.js +0 -40
- package/dist/storybook/assets/button-qfybxFqE.js +0 -1
- package/dist/storybook/assets/button.stories-6GvGJMKF.js +0 -80
- package/dist/storybook/assets/card.stories-v_QIHoI3.js +0 -1
- package/dist/storybook/assets/color-RZTO_BH4.js +0 -25
- package/dist/storybook/assets/empty.stories-quAOsHNV.js +0 -1
- package/dist/storybook/assets/file-input.stories-WyK9TFKC.js +0 -66
- package/dist/storybook/assets/footer.stories-wPp58LMn.js +0 -3
- package/dist/storybook/assets/form.stories-RMbO5qjE.js +0 -49
- package/dist/storybook/assets/formation.stories-0fppcLax.js +0 -74
- package/dist/storybook/assets/help-icon.stories-gjzAU_pF.js +0 -4
- package/dist/storybook/assets/hoist-non-react-statics.cjs-pnyno-Dk.js +0 -8
- package/dist/storybook/assets/icon.stories-vAvCbxZP.js +0 -6
- package/dist/storybook/assets/iframe-uF49rd0M.js +0 -7
- package/dist/storybook/assets/index.es-LXZC0YVN.js +0 -79
- package/dist/storybook/assets/label.stories-kmvMrgz2.js +0 -11
- package/dist/storybook/assets/list-1fS-ZLaF.js +0 -8
- package/dist/storybook/assets/list.stories-maVHoPyy.js +0 -478
- package/dist/storybook/assets/objectWithoutPropertiesLoose-9Q1jwsKS.js +0 -1
- package/dist/storybook/assets/option-dropdown.stories-NRogMOtD.js +0 -21
- package/dist/storybook/assets/page.stories-qo9KEiWt.js +0 -57
- package/dist/storybook/assets/pop-confirm.stories-aFXfbsuI.js +0 -9
- package/dist/storybook/assets/popover.stories-zzxDYG13.js +0 -1
- package/dist/storybook/assets/projects.stories-mDHzd2Nc.js +0 -47
- package/dist/storybook/assets/react-router-dom-2JKSc1g5.js +0 -8
- package/dist/storybook/assets/side-bar.stories-v7wWMQcv.js +0 -1
- package/dist/storybook/assets/spacer.stories--6Lac6Fz.js +0 -1
- package/dist/storybook/assets/text-link.stories-sfurduAc.js +0 -14
- package/dist/storybook/assets/tooltip.test-case.stories-8mCQYXFD.js +0 -3
- package/dist/storybook/assets/top-bar.stories-Q3tcZHmc.js +0 -1
- package/dist/storybook/assets/top-bar.testcase.stories-85g2VfLi.js +0 -30
- package/dist/storybook/assets/unit-input.stories-OL_uzjER.js +0 -273
package/dist/404.html
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!doctype html><head><title>React UI Library</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1" user-scalable="no"><meta name="apple-mobile-web-app-capable" content="yes"><script type="module" crossorigin src="/react-ui-library/assets/index-neKlYvgy.js"></script><link rel="stylesheet" crossorigin href="/react-ui-library/assets/index-AkeNwthw.css"></head><body><div id="content"></div></body>
|
|
@@ -18318,10 +18318,8 @@ const Button$1 = ({
|
|
|
18318
18318
|
warning: warning2,
|
|
18319
18319
|
testId,
|
|
18320
18320
|
tooltip: tooltip2,
|
|
18321
|
-
inverted: inverted2 = false
|
|
18321
|
+
inverted: inverted2 = false
|
|
18322
18322
|
// *Deprecated*
|
|
18323
|
-
component: Component2 = "button",
|
|
18324
|
-
url
|
|
18325
18323
|
}) => {
|
|
18326
18324
|
const disabledContext = reactExports.useContext(DisabledContext);
|
|
18327
18325
|
const color2 = (() => {
|
|
@@ -18355,7 +18353,7 @@ const Button$1 = ({
|
|
|
18355
18353
|
return "";
|
|
18356
18354
|
})();
|
|
18357
18355
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonTooltipWrapper, { tooltip: tooltip2, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
18358
|
-
|
|
18356
|
+
"button",
|
|
18359
18357
|
{
|
|
18360
18358
|
type: type2 === ButtonType.SUBMIT ? ButtonType.SUBMIT : ButtonType.BUTTON,
|
|
18361
18359
|
className: cx$2(
|
|
@@ -18379,7 +18377,6 @@ const Button$1 = ({
|
|
|
18379
18377
|
...title2 ? { title: title2 } : {},
|
|
18380
18378
|
style: { width: width2 },
|
|
18381
18379
|
"data-testid": testId,
|
|
18382
|
-
to: url,
|
|
18383
18380
|
children: [
|
|
18384
18381
|
icon2 && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: buttonStyles.icon, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Icon, { icon: icon2 }) }),
|
|
18385
18382
|
loading && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: buttonStyles.icon, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -26150,12 +26147,10 @@ reactExports.forwardRef(
|
|
|
26150
26147
|
({ items: items2, expanding, invokeEditOnRowClick, provided, draggable }, listRowRefs) => {
|
|
26151
26148
|
const disabledContext = reactExports.useContext(DisabledContext);
|
|
26152
26149
|
const listElement = (index2, provided2, item2, indent, hasOnClick, edit2) => {
|
|
26153
|
-
const Component2 = item2.component || "a";
|
|
26154
26150
|
return /* @__PURE__ */ reactExports.createElement(
|
|
26155
|
-
|
|
26151
|
+
"a",
|
|
26156
26152
|
{
|
|
26157
26153
|
href: item2.url,
|
|
26158
|
-
to: item2.url,
|
|
26159
26154
|
ref: provided2 == null ? void 0 : provided2.innerRef,
|
|
26160
26155
|
...provided2.draggableProps,
|
|
26161
26156
|
style: getItemStyle(provided2.draggableProps, item2),
|
|
@@ -68328,20 +68323,9 @@ const TextLink = ({
|
|
|
68328
68323
|
href = void 0,
|
|
68329
68324
|
target = void 0,
|
|
68330
68325
|
testId,
|
|
68331
|
-
onClick
|
|
68332
|
-
component: Component2 = "a"
|
|
68326
|
+
onClick
|
|
68333
68327
|
}) => {
|
|
68334
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
68335
|
-
Component2,
|
|
68336
|
-
{
|
|
68337
|
-
href,
|
|
68338
|
-
to: href,
|
|
68339
|
-
target,
|
|
68340
|
-
onClick,
|
|
68341
|
-
"data-testid": testId,
|
|
68342
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { link: true, children })
|
|
68343
|
-
}
|
|
68344
|
-
);
|
|
68328
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href, target, onClick, "data-testid": testId, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { link: true, children }) });
|
|
68345
68329
|
};
|
|
68346
68330
|
const inputInTable = "_inputInTable_66zck_1";
|
|
68347
68331
|
const inputHover = "_inputHover_66zck_13";
|
package/dist/index.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export declare enum BreadcrumbLinkType {
|
|
|
41
41
|
CUSTOM = "custom"
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
export declare const Button: ({ active, basic, colored, disabled, groupOrder, icon, label, loading, name, pill, round, small, styles, width, title, type, onClick, error, warning, testId, tooltip, inverted,
|
|
44
|
+
export declare const Button: ({ active, basic, colored, disabled, groupOrder, icon, label, loading, name, pill, round, small, styles, width, title, type, onClick, error, warning, testId, tooltip, inverted, }: IButtonProps) => JSX_2.Element;
|
|
45
45
|
|
|
46
46
|
export declare const ButtonGroup: (props: IButtonGroupProps) => JSX_2.Element;
|
|
47
47
|
|
|
@@ -198,7 +198,6 @@ export declare interface IButtonGroupProps {
|
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
export declare interface IButtonProps {
|
|
201
|
-
href?: string;
|
|
202
201
|
active?: boolean;
|
|
203
202
|
basic?: boolean;
|
|
204
203
|
colored?: boolean | string;
|
|
@@ -221,8 +220,6 @@ export declare interface IButtonProps {
|
|
|
221
220
|
testId?: string;
|
|
222
221
|
tooltip?: ReactNode | string;
|
|
223
222
|
inverted?: boolean;
|
|
224
|
-
component?: React_2.ElementType;
|
|
225
|
-
url?: string;
|
|
226
223
|
}
|
|
227
224
|
|
|
228
225
|
export declare interface ICardProps {
|
|
@@ -661,7 +658,6 @@ declare interface IListItem {
|
|
|
661
658
|
id?: TStringOrNumber;
|
|
662
659
|
type?: string;
|
|
663
660
|
metaCount?: number;
|
|
664
|
-
component?: React.ElementType;
|
|
665
661
|
}
|
|
666
662
|
|
|
667
663
|
export declare interface IListProps {
|
|
@@ -1374,7 +1370,6 @@ export declare interface ITextLinkProps {
|
|
|
1374
1370
|
testId?: string;
|
|
1375
1371
|
onClick?: (e: React_2.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
|
|
1376
1372
|
children?: React_2.ReactNode;
|
|
1377
|
-
component?: React_2.ElementType;
|
|
1378
1373
|
}
|
|
1379
1374
|
|
|
1380
1375
|
export declare interface ITextProps {
|
|
@@ -1499,6 +1494,7 @@ export declare interface ITreeProps {
|
|
|
1499
1494
|
expand: React_2.ReactNode;
|
|
1500
1495
|
collapse: React_2.ReactNode;
|
|
1501
1496
|
};
|
|
1497
|
+
allowParentReassignment?: boolean;
|
|
1502
1498
|
}
|
|
1503
1499
|
|
|
1504
1500
|
export declare interface IUnitInputProps {
|
|
@@ -1664,7 +1660,7 @@ export { Text_2 as Text }
|
|
|
1664
1660
|
|
|
1665
1661
|
export declare const TextArea: ({ name, value, placeholder, cols, rows, disabled, onChange, onKeyPress, onFocus, onBlur, tabIndex, error, warning, tooltip, maxTooltipWidth, resize, monospace, testId, }: ITextAreaProps) => JSX_2.Element;
|
|
1666
1662
|
|
|
1667
|
-
export declare const TextLink: ({ children, href, target, testId, onClick,
|
|
1663
|
+
export declare const TextLink: ({ children, href, target, testId, onClick, }: ITextLinkProps) => JSX_2.Element;
|
|
1668
1664
|
|
|
1669
1665
|
declare type TFileReaderMethod = TInputReaderMethods | string;
|
|
1670
1666
|
|
|
@@ -1715,7 +1711,7 @@ export declare const Tooltip: ({ children, text, error, placement, possiblePlace
|
|
|
1715
1711
|
|
|
1716
1712
|
export declare const TopBar: ({ title, appSwitcher, content, contentRight, warning, height, fixedPosition, }: ITopBarProps) => JSX_2.Element;
|
|
1717
1713
|
|
|
1718
|
-
export declare const Tree: ({ list, draggable, onListReorder, onChangeOpen, testId, isInitialOpen, treeRef, itemHasChild, onItemToggle, icons, }: ITreeProps) => JSX_2.Element;
|
|
1714
|
+
export declare const Tree: ({ list, draggable, onListReorder, onChangeOpen, testId, isInitialOpen, treeRef, itemHasChild, onItemToggle, icons, allowParentReassignment, }: ITreeProps) => JSX_2.Element;
|
|
1719
1715
|
|
|
1720
1716
|
export declare enum TriggerType {
|
|
1721
1717
|
TEXT = "Text",
|
package/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><head><title>React UI Library</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1" user-scalable="no"><meta name="apple-mobile-web-app-capable" content="yes"><script type="module" crossorigin src="/react-ui-library/assets/index-
|
|
1
|
+
<!doctype html><head><title>React UI Library</title><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1" user-scalable="no"><meta name="apple-mobile-web-app-capable" content="yes"><script type="module" crossorigin src="/react-ui-library/assets/index-neKlYvgy.js"></script><link rel="stylesheet" crossorigin href="/react-ui-library/assets/index-AkeNwthw.css"></head><body><div id="content"></div></body>
|
package/dist/index.js
CHANGED
|
@@ -4133,10 +4133,8 @@ const Button$1 = ({
|
|
|
4133
4133
|
warning: warning2,
|
|
4134
4134
|
testId,
|
|
4135
4135
|
tooltip: tooltip2,
|
|
4136
|
-
inverted: inverted2 = false
|
|
4136
|
+
inverted: inverted2 = false
|
|
4137
4137
|
// *Deprecated*
|
|
4138
|
-
component: Component2 = "button",
|
|
4139
|
-
url
|
|
4140
4138
|
}) => {
|
|
4141
4139
|
const disabledContext = useContext(DisabledContext);
|
|
4142
4140
|
const color2 = (() => {
|
|
@@ -4170,7 +4168,7 @@ const Button$1 = ({
|
|
|
4170
4168
|
return "";
|
|
4171
4169
|
})();
|
|
4172
4170
|
return /* @__PURE__ */ jsx(ButtonTooltipWrapper, { tooltip: tooltip2, children: /* @__PURE__ */ jsxs(
|
|
4173
|
-
|
|
4171
|
+
"button",
|
|
4174
4172
|
{
|
|
4175
4173
|
type: type === ButtonType.SUBMIT ? ButtonType.SUBMIT : ButtonType.BUTTON,
|
|
4176
4174
|
className: cx$2(
|
|
@@ -4194,7 +4192,6 @@ const Button$1 = ({
|
|
|
4194
4192
|
...title2 ? { title: title2 } : {},
|
|
4195
4193
|
style: { width: width2 },
|
|
4196
4194
|
"data-testid": testId,
|
|
4197
|
-
to: url,
|
|
4198
4195
|
children: [
|
|
4199
4196
|
icon2 && /* @__PURE__ */ jsx("span", { className: buttonStyles.icon, children: /* @__PURE__ */ jsx(Icon, { icon: icon2 }) }),
|
|
4200
4197
|
loading && /* @__PURE__ */ jsx("span", { className: buttonStyles.icon, children: /* @__PURE__ */ jsx(
|
|
@@ -18993,12 +18990,10 @@ const ListRow = forwardRef(
|
|
|
18993
18990
|
({ items, expanding, invokeEditOnRowClick, provided, draggable: draggable2 }, listRowRefs) => {
|
|
18994
18991
|
const disabledContext = useContext(DisabledContext);
|
|
18995
18992
|
const listElement = (index2, provided2, item2, indent, hasOnClick, edit2) => {
|
|
18996
|
-
const Component2 = item2.component || "a";
|
|
18997
18993
|
return /* @__PURE__ */ createElement(
|
|
18998
|
-
|
|
18994
|
+
"a",
|
|
18999
18995
|
{
|
|
19000
18996
|
href: item2.url,
|
|
19001
|
-
to: item2.url,
|
|
19002
18997
|
ref: provided2 == null ? void 0 : provided2.innerRef,
|
|
19003
18998
|
...provided2.draggableProps,
|
|
19004
18999
|
style: getItemStyle(provided2.draggableProps, item2),
|
|
@@ -56733,20 +56728,9 @@ const TextLink = ({
|
|
|
56733
56728
|
href = void 0,
|
|
56734
56729
|
target = void 0,
|
|
56735
56730
|
testId,
|
|
56736
|
-
onClick
|
|
56737
|
-
component: Component2 = "a"
|
|
56731
|
+
onClick
|
|
56738
56732
|
}) => {
|
|
56739
|
-
return /* @__PURE__ */ jsx(
|
|
56740
|
-
Component2,
|
|
56741
|
-
{
|
|
56742
|
-
href,
|
|
56743
|
-
to: href,
|
|
56744
|
-
target,
|
|
56745
|
-
onClick,
|
|
56746
|
-
"data-testid": testId,
|
|
56747
|
-
children: /* @__PURE__ */ jsx(Text, { link: true, children })
|
|
56748
|
-
}
|
|
56749
|
-
);
|
|
56733
|
+
return /* @__PURE__ */ jsx("a", { href, target, onClick, "data-testid": testId, children: /* @__PURE__ */ jsx(Text, { link: true, children }) });
|
|
56750
56734
|
};
|
|
56751
56735
|
const inputInTable = "_inputInTable_66zck_1";
|
|
56752
56736
|
const inputHover = "_inputHover_66zck_13";
|
|
@@ -70026,24 +70010,75 @@ const Tree = ({
|
|
|
70026
70010
|
treeRef,
|
|
70027
70011
|
itemHasChild,
|
|
70028
70012
|
onItemToggle,
|
|
70029
|
-
icons: icons2
|
|
70013
|
+
icons: icons2,
|
|
70014
|
+
allowParentReassignment
|
|
70030
70015
|
}) => {
|
|
70031
70016
|
var _a;
|
|
70032
|
-
const
|
|
70033
|
-
if (
|
|
70034
|
-
|
|
70017
|
+
const handleOpen = (id2) => {
|
|
70018
|
+
if (onChangeOpen) {
|
|
70019
|
+
onChangeOpen(id2);
|
|
70020
|
+
}
|
|
70021
|
+
};
|
|
70022
|
+
const findNodeIndexById = (tree22, id2) => {
|
|
70023
|
+
return (tree22 == null ? void 0 : tree22.findIndex((node2) => (node2 == null ? void 0 : node2.id) === id2)) ?? -1;
|
|
70024
|
+
};
|
|
70025
|
+
const setDragSourceParentToGrandparent = (dragSource, workingTree) => {
|
|
70026
|
+
const dragSourceParentIndex = findNodeIndexById(
|
|
70027
|
+
workingTree,
|
|
70028
|
+
dragSource == null ? void 0 : dragSource.parent
|
|
70029
|
+
);
|
|
70030
|
+
if (dragSourceParentIndex >= 0) {
|
|
70031
|
+
const grandparent = workingTree == null ? void 0 : workingTree.find(
|
|
70032
|
+
(node2) => {
|
|
70033
|
+
var _a2;
|
|
70034
|
+
return (node2 == null ? void 0 : node2.id) === ((_a2 = workingTree[dragSourceParentIndex]) == null ? void 0 : _a2.parent);
|
|
70035
|
+
}
|
|
70036
|
+
);
|
|
70037
|
+
dragSource.parent = grandparent ? grandparent.id : 0;
|
|
70038
|
+
}
|
|
70039
|
+
};
|
|
70040
|
+
const removeDragSourceFromWorkingTree = (dragSource, workingTree) => {
|
|
70041
|
+
return (workingTree == null ? void 0 : workingTree.filter((node2) => (node2 == null ? void 0 : node2.id) !== (dragSource == null ? void 0 : dragSource.id))) ?? [];
|
|
70042
|
+
};
|
|
70043
|
+
const insertDragSourceAfterParentInWorkingTree = (dragSource, dragSourceParentIndex, workingTree) => {
|
|
70044
|
+
workingTree == null ? void 0 : workingTree.splice(dragSourceParentIndex, 0, dragSource);
|
|
70045
|
+
return workingTree;
|
|
70046
|
+
};
|
|
70047
|
+
const transformTreeToList = (tree22) => {
|
|
70048
|
+
return tree22.map(({ id: id2, parent, droppable: droppable2, data }) => {
|
|
70049
|
+
return {
|
|
70035
70050
|
id: id2,
|
|
70036
70051
|
parent,
|
|
70037
70052
|
droppable: droppable2,
|
|
70038
70053
|
...data
|
|
70039
|
-
}
|
|
70040
|
-
|
|
70041
|
-
}
|
|
70054
|
+
};
|
|
70055
|
+
});
|
|
70042
70056
|
};
|
|
70043
|
-
const
|
|
70044
|
-
|
|
70045
|
-
|
|
70057
|
+
const handleDrop = (newTree, option2) => {
|
|
70058
|
+
const { dragSource, dropTarget: dropTarget2 } = option2;
|
|
70059
|
+
let workingTree = [...newTree];
|
|
70060
|
+
if (!onListReorder)
|
|
70061
|
+
return;
|
|
70062
|
+
const dragSourceIndex = findNodeIndexById(workingTree, dragSource == null ? void 0 : dragSource.id);
|
|
70063
|
+
const dragSourceParentIndex = findNodeIndexById(
|
|
70064
|
+
workingTree,
|
|
70065
|
+
dragSource == null ? void 0 : dragSource.parent
|
|
70066
|
+
);
|
|
70067
|
+
let newList = [];
|
|
70068
|
+
if ((dragSource == null ? void 0 : dragSource.parent) === (dropTarget2 == null ? void 0 : dropTarget2.id) && dragSourceIndex === 0 && allowParentReassignment) {
|
|
70069
|
+
setDragSourceParentToGrandparent(dragSource, workingTree);
|
|
70070
|
+
workingTree = removeDragSourceFromWorkingTree(
|
|
70071
|
+
dragSource,
|
|
70072
|
+
workingTree
|
|
70073
|
+
);
|
|
70074
|
+
workingTree = insertDragSourceAfterParentInWorkingTree(
|
|
70075
|
+
dragSource,
|
|
70076
|
+
dragSourceParentIndex,
|
|
70077
|
+
workingTree
|
|
70078
|
+
);
|
|
70046
70079
|
}
|
|
70080
|
+
newList = transformTreeToList(workingTree);
|
|
70081
|
+
onListReorder(newList);
|
|
70047
70082
|
};
|
|
70048
70083
|
const tree2 = (_a = list2 == null ? void 0 : list2.items) == null ? void 0 : _a.map(({ id: id2, droppable: droppable2, parent, name: name2, ...rest }) => ({
|
|
70049
70084
|
id: id2,
|