@feathery/react 2.44.0 → 2.45.1
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/cjs/Form/index.d.ts.map +1 -1
- package/cjs/Form/tests/testMocks.d.ts.map +1 -1
- package/cjs/elements/basic/TableElement/Actions.d.ts.map +1 -1
- package/cjs/elements/basic/TableElement/DeleteConfirm.d.ts.map +1 -1
- package/cjs/elements/basic/TableElement/EditableCell.d.ts.map +1 -1
- package/cjs/elements/basic/TableElement/EmptyState.d.ts.map +1 -1
- package/cjs/elements/basic/TableElement/Pagination.d.ts.map +1 -1
- package/cjs/elements/basic/TableElement/Search.d.ts.map +1 -1
- package/cjs/elements/basic/TableElement/Sort.d.ts.map +1 -1
- package/cjs/elements/basic/TableElement/classNames.d.ts +27 -0
- package/cjs/elements/basic/TableElement/classNames.d.ts.map +1 -0
- package/cjs/elements/basic/TableElement/index.d.ts.map +1 -1
- package/cjs/{fthry_AssistantChat.CTrXRHYC.js → fthry_AssistantChat.Cxa5rdNF.js} +4 -4
- package/cjs/{fthry_FormControl.BoilLJu3.js → fthry_FormControl.quZka1xJ.js} +1 -1
- package/cjs/{fthry_InlineTooltip.C3LL7yhx.js → fthry_InlineTooltip.y6-oWSVZ.js} +2 -2
- package/cjs/{fthry_Overlay.C_kMTQo_.js → fthry_Overlay.UyeABG84.js} +1 -1
- package/cjs/{fthry_PaymentMethodField.B7Y0YcQQ.js → fthry_PaymentMethodField.CuxoGehI.js} +4 -4
- package/cjs/{fthry_Placeholder.Ckf5rx3l.js → fthry_Placeholder.CuEfo8VG.js} +1 -1
- package/cjs/{fthry_ShowEyeIcon.Dw983jmd.js → fthry_ShowEyeIcon.BcCMpxvv.js} +1 -1
- package/cjs/{fthry_auto-track.DdU0wd90.js → fthry_auto-track.CC1cAdjH.js} +2 -2
- package/cjs/{fthry_highlighted-body-TPN3WLV5.Dgq3ZfLo.js → fthry_highlighted-body-TPN3WLV5.6Ghg7Q3f.js} +3 -3
- package/cjs/{fthry_index.CVnv_Jad.js → fthry_index.B4E5FZ7Y.js} +1 -1
- package/cjs/{fthry_index.C3PGeG-p.js → fthry_index.B4VCvBKj.js} +10 -10
- package/cjs/{fthry_index.Bv2eS3Vo.js → fthry_index.BGhHAY07.js} +2 -2
- package/cjs/{fthry_index.CZEWDsUp.js → fthry_index.BHTUrSkI.js} +2 -2
- package/cjs/{fthry_index.Dom24Lwj.js → fthry_index.BKQUmnu5.js} +1 -1
- package/cjs/{fthry_index.BfbtecrW.js → fthry_index.BMnE8tC9.js} +1 -1
- package/cjs/{fthry_index.kb1SveDj.js → fthry_index.BRdhmaUx.js} +3 -3
- package/cjs/{fthry_index.Buv2Sg-R.js → fthry_index.BcLktu2D.js} +5 -5
- package/cjs/{fthry_index.D3dqn02k.js → fthry_index.BgKXyZSS.js} +1 -1
- package/cjs/{fthry_index.DicGhamJ.js → fthry_index.BiMrWhBX.js} +1 -1
- package/cjs/{fthry_index.BvbHMtIp.js → fthry_index.BvbplnGd.js} +5 -5
- package/cjs/{fthry_index.D8Red3Ny.js → fthry_index.BwKXpTgl.js} +72 -31
- package/cjs/{fthry_index.Dod7JSDp.js → fthry_index.CBTDUDwZ.js} +1 -1
- package/cjs/{fthry_index.LV1j0g0M.js → fthry_index.CNM0qgO9.js} +6 -6
- package/cjs/{fthry_index.C8F7fXYY.js → fthry_index.CbxH-ZCk.js} +3 -3
- package/cjs/{fthry_index.37lEi-Hp.js → fthry_index.CpXIXkG1.js} +1 -1
- package/cjs/{fthry_index.LvXa1Omo.js → fthry_index.D1EUsyqA.js} +6 -6
- package/cjs/{fthry_index.BHqkdfIz.js → fthry_index.D42hnp_f.js} +5 -5
- package/cjs/{fthry_index.B4peckbq.js → fthry_index.D8Dd0vHB.js} +1 -1
- package/cjs/{fthry_index.jKKDa77s.js → fthry_index.DFaNyQht.js} +2 -2
- package/cjs/{fthry_index.CelZlNgP.js → fthry_index.DGUuHf_s.js} +4 -4
- package/cjs/{fthry_index.29ly7g2Z.js → fthry_index.DHd7cGrD.js} +2 -2
- package/cjs/{fthry_index.DDPSNVyH.js → fthry_index.DLUH5dHn.js} +1 -1
- package/cjs/{fthry_index.BGz622Tq.js → fthry_index.DU4YOg1b.js} +4 -4
- package/cjs/{fthry_index.hlvuql4I.js → fthry_index.DflIYuDc.js} +5 -5
- package/cjs/{fthry_index.3RtrK8MX.js → fthry_index.Dhs6T2jm.js} +86 -35
- package/cjs/{fthry_index.GMymJjG7.js → fthry_index.DjFmBtcB.js} +2 -2
- package/cjs/{fthry_index.DzFvroe5.js → fthry_index.cgMT1wF8.js} +6 -6
- package/cjs/{fthry_index.BI8F8bA_.js → fthry_index.g1wTMWoh.js} +2 -2
- package/cjs/{fthry_index.CKVVzHIN.js → fthry_index.jM9IrUzf.js} +6 -6
- package/cjs/{fthry_index.5r0bFZtm.js → fthry_index.niUrMyTP.js} +8 -8
- package/cjs/{fthry_index.umd.IVs8gbvz.js → fthry_index.umd.CIUOsrAT.js} +1 -1
- package/cjs/{fthry_input.CtQ9PDhT.js → fthry_input.COOOIvlX.js} +1 -1
- package/cjs/{fthry_mermaid-O7DHMXV3.OED8wUgR.js → fthry_mermaid-O7DHMXV3.CBY9gF3b.js} +3 -3
- package/cjs/{fthry_script.BVZmLSex.js → fthry_script.9_UzZkVO.js} +1 -1
- package/cjs/{fthry_styles.D-_UUb_M.js → fthry_styles.CIKtUEGu.js} +1 -1
- package/cjs/{fthry_useElementSize.CDRo_Jkc.js → fthry_useElementSize.hOKCjcSe.js} +1 -1
- package/cjs/{fthry_useSalesforceSync.Bx08h06s.js → fthry_useSalesforceSync.Vr5Ug2zJ.js} +1 -1
- package/cjs/{fthry_webfontloader.BH2uCTmw.js → fthry_webfontloader.A2s9rv8X.js} +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/utils/emotionCache.d.ts +3 -0
- package/cjs/utils/emotionCache.d.ts.map +1 -0
- package/cjs/utils/formContext.d.ts +1 -1
- package/cjs/utils/formContext.d.ts.map +1 -1
- package/dist/Form/index.d.ts.map +1 -1
- package/dist/Form/tests/testMocks.d.ts.map +1 -1
- package/dist/elements/basic/TableElement/Actions.d.ts.map +1 -1
- package/dist/elements/basic/TableElement/DeleteConfirm.d.ts.map +1 -1
- package/dist/elements/basic/TableElement/EditableCell.d.ts.map +1 -1
- package/dist/elements/basic/TableElement/EmptyState.d.ts.map +1 -1
- package/dist/elements/basic/TableElement/Pagination.d.ts.map +1 -1
- package/dist/elements/basic/TableElement/Search.d.ts.map +1 -1
- package/dist/elements/basic/TableElement/Sort.d.ts.map +1 -1
- package/dist/elements/basic/TableElement/classNames.d.ts +27 -0
- package/dist/elements/basic/TableElement/classNames.d.ts.map +1 -0
- package/dist/elements/basic/TableElement/index.d.ts.map +1 -1
- package/dist/elements/basic/tests/TableElement.spec.d.ts +2 -0
- package/dist/elements/basic/tests/TableElement.spec.d.ts.map +1 -0
- package/dist/{fthry_AssistantChat.D97z2Fjs.js → fthry_AssistantChat.CptKI3MJ.js} +4 -4
- package/dist/{fthry_FormControl.DJieQaw-.js → fthry_FormControl.CsOU9cE0.js} +1 -1
- package/dist/{fthry_InlineTooltip.Chat1FIN.js → fthry_InlineTooltip.EK3gPvwe.js} +2 -2
- package/dist/{fthry_Overlay.pCv-XBOA.js → fthry_Overlay.DLfHSitG.js} +1 -1
- package/dist/{fthry_PaymentMethodField._G2uJ6Ks.js → fthry_PaymentMethodField.Dlu7xh7R.js} +4 -4
- package/dist/{fthry_Placeholder.C7B4adz4.js → fthry_Placeholder.D1RmrK_x.js} +1 -1
- package/dist/{fthry_ShowEyeIcon.DrP5GypN.js → fthry_ShowEyeIcon.DIauZsAj.js} +1 -1
- package/dist/{fthry_auto-track.Bb7a2GMR.js → fthry_auto-track._kagu7wX.js} +2 -2
- package/dist/{fthry_highlighted-body-TPN3WLV5.QeEpdZbH.js → fthry_highlighted-body-TPN3WLV5.B0SIuyN5.js} +3 -3
- package/dist/{fthry_index.BMzPHmtX.js → fthry_index.-DIGt7Iz.js} +2 -2
- package/dist/{fthry_index.CIlxRQ4S.js → fthry_index.8sovgfvT.js} +5 -5
- package/dist/{fthry_index.C5BLw18G.js → fthry_index.B-LrQpqs.js} +6 -6
- package/dist/{fthry_index.XG1xyplD.js → fthry_index.B6nKTF21.js} +4 -4
- package/dist/{fthry_index.DJRjeQWm.js → fthry_index.B9rPrwAG.js} +5 -5
- package/dist/{fthry_index.DdgFKsos.js → fthry_index.BMjfEu0y.js} +1 -1
- package/dist/{fthry_index.ChUSP_4k.js → fthry_index.BVtc1Qha.js} +6 -6
- package/dist/{fthry_index.CUY_p8do.js → fthry_index.BWCBtRyN.js} +5 -5
- package/dist/{fthry_index.DA_5F_7_.js → fthry_index.BWclxwtj.js} +1 -1
- package/dist/{fthry_index.0o3T2ouc.js → fthry_index.BWdFbMhj.js} +1 -1
- package/dist/{fthry_index.BJKDlrlW.js → fthry_index.BwiTulQu.js} +4 -4
- package/dist/{fthry_index.CubzFuFl.js → fthry_index.C8sj4mDj.js} +3 -3
- package/dist/{fthry_index.QPKqFn46.js → fthry_index.CB4Y32e_.js} +1 -1
- package/dist/{fthry_index.CXn-UnK8.js → fthry_index.CIYDAXjD.js} +3 -3
- package/dist/{fthry_index.BZvFWQLR.js → fthry_index.CJWAyFVQ.js} +2 -2
- package/dist/{fthry_index.x66JmbiK.js → fthry_index.CQRZTwm-.js} +2 -2
- package/dist/{fthry_index.Csz_U1Oc.js → fthry_index.Cg_j3I3Y.js} +5 -5
- package/dist/{fthry_index.ClZUnlbG.js → fthry_index.D4tLe_Yt.js} +1 -1
- package/dist/{fthry_index.Cqhg3Wmg.js → fthry_index.D7WXkc6s.js} +1 -1
- package/dist/{fthry_index.BWH9S7pc.js → fthry_index.DHQdU-Hq.js} +71 -30
- package/dist/{fthry_index.DJ7vQ3zt.js → fthry_index.DIx5upln.js} +1 -1
- package/dist/{fthry_index.DuRVVFRL.js → fthry_index.DlLRrl91.js} +2 -2
- package/dist/{fthry_index.D4pTk5dr.js → fthry_index.DqhzI4MJ.js} +8 -8
- package/dist/{fthry_index.1SZZv9d2.js → fthry_index.DtfOhhL6.js} +10 -10
- package/dist/{fthry_index.C8LO6uJL.js → fthry_index.DzY7raLN.js} +6 -6
- package/dist/{fthry_index.CDuqBBJn.js → fthry_index.Ijv_o9zh.js} +86 -35
- package/dist/{fthry_index.BpKf-eNy.js → fthry_index.IqW0lm_M.js} +1 -1
- package/dist/{fthry_index.D1iW0N2t.js → fthry_index._3K7F5LE.js} +1 -1
- package/dist/{fthry_index.UTYK1bhI.js → fthry_index.uMrzFN7W.js} +2 -2
- package/dist/{fthry_index.DG6NlwpO.js → fthry_index.uT2AzoIt.js} +2 -2
- package/dist/{fthry_index.umd.DLnl0brp.js → fthry_index.umd.D-4_3WMI.js} +1 -1
- package/dist/{fthry_index.B6pEx1zI.js → fthry_index.zjguVlQJ.js} +5 -5
- package/dist/{fthry_input.BgzKGmQG.js → fthry_input.D8VQ1Mr4.js} +1 -1
- package/dist/{fthry_mermaid-O7DHMXV3.DehdVKQ3.js → fthry_mermaid-O7DHMXV3.C-knn8UL.js} +3 -3
- package/dist/{fthry_script.BcdCwqG3.js → fthry_script.Dr86Djze.js} +1 -1
- package/dist/{fthry_styles.DNxDElEh.js → fthry_styles.C6abImDN.js} +1 -1
- package/dist/{fthry_useElementSize.DvHJBcIE.js → fthry_useElementSize.DMJ4ZQAl.js} +1 -1
- package/dist/{fthry_useSalesforceSync.DHWXQkeF.js → fthry_useSalesforceSync.C6WG-TQK.js} +1 -1
- package/dist/{fthry_webfontloader.C-DWZTL7.js → fthry_webfontloader.DA1UUTp-.js} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/utils/emotionCache.d.ts +3 -0
- package/dist/utils/emotionCache.d.ts.map +1 -0
- package/dist/utils/formContext.d.ts +1 -1
- package/dist/utils/formContext.d.ts.map +1 -1
- package/dist/utils/tests/emotionCache.spec.d.ts +2 -0
- package/dist/utils/tests/emotionCache.spec.d.ts.map +1 -0
- package/package.json +3 -2
- package/umd/529.eeb27f741d6f4da1315b.js +1 -0
- package/umd/TableElement.8c0bec8400517f135fe6.js +1 -0
- package/umd/index.js +1 -1
- package/umd/529.e7a0a831bf80398fda0f.js +0 -1
- package/umd/TableElement.e3da137819e9b84b3b82.js +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./fthry_index.
|
|
3
|
+
var index = require('./fthry_index.Dhs6T2jm.js');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var index$1 = require('./fthry_index.
|
|
5
|
+
var index$1 = require('./fthry_index.CBTDUDwZ.js');
|
|
6
6
|
require('react/jsx-runtime');
|
|
7
7
|
require('react-dom/client');
|
|
8
8
|
require('jszip');
|
|
@@ -1479,7 +1479,7 @@ function SignatureField(_a) {
|
|
|
1479
1479
|
React.useEffect(function () {
|
|
1480
1480
|
if (!global.webfontloaderPromise)
|
|
1481
1481
|
global.webfontloaderPromise = Promise.resolve().then(function () { return require(
|
|
1482
|
-
/* webpackChunkName: "webfontloader" */ './fthry_webfontloader.
|
|
1482
|
+
/* webpackChunkName: "webfontloader" */ './fthry_webfontloader.A2s9rv8X.js'); }).then(function (n) { return n.webfontloader; });
|
|
1483
1483
|
global.webfontloaderPromise.then(function (WebFont) {
|
|
1484
1484
|
WebFont.load({ google: { families: ['La Belle Aurore'] } });
|
|
1485
1485
|
});
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index$1 = require('./fthry_index.
|
|
3
|
+
var index$1 = require('./fthry_index.Dhs6T2jm.js');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var Placeholder = require('./fthry_Placeholder.
|
|
6
|
-
var InlineTooltip = require('./fthry_InlineTooltip.
|
|
7
|
-
var ShowEyeIcon = require('./fthry_ShowEyeIcon.
|
|
5
|
+
var Placeholder = require('./fthry_Placeholder.CuEfo8VG.js');
|
|
6
|
+
var InlineTooltip = require('./fthry_InlineTooltip.y6-oWSVZ.js');
|
|
7
|
+
var ShowEyeIcon = require('./fthry_ShowEyeIcon.BcCMpxvv.js');
|
|
8
8
|
require('react/jsx-runtime');
|
|
9
9
|
require('react-dom/client');
|
|
10
10
|
require('jszip');
|
|
11
11
|
require('react-dom');
|
|
12
|
-
require('./fthry_Overlay.
|
|
12
|
+
require('./fthry_Overlay.UyeABG84.js');
|
|
13
13
|
|
|
14
14
|
function PasswordField(_a) {
|
|
15
15
|
var _b;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index$1 = require('./fthry_index.
|
|
3
|
+
var index$1 = require('./fthry_index.Dhs6T2jm.js');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var InlineTooltip = require('./fthry_InlineTooltip.
|
|
6
|
-
var Placeholder$2 = require('./fthry_Placeholder.
|
|
7
|
-
var useSalesforceSync = require('./fthry_useSalesforceSync.
|
|
8
|
-
var Overlay = require('./fthry_Overlay.
|
|
5
|
+
var InlineTooltip = require('./fthry_InlineTooltip.y6-oWSVZ.js');
|
|
6
|
+
var Placeholder$2 = require('./fthry_Placeholder.CuEfo8VG.js');
|
|
7
|
+
var useSalesforceSync = require('./fthry_useSalesforceSync.Vr5Ug2zJ.js');
|
|
8
|
+
var Overlay = require('./fthry_Overlay.UyeABG84.js');
|
|
9
9
|
var ReactDOM = require('react-dom');
|
|
10
10
|
require('react/jsx-runtime');
|
|
11
11
|
require('react-dom/client');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./fthry_index.
|
|
3
|
+
var index = require('./fthry_index.Dhs6T2jm.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var ReactDOM = require('react-dom');
|
|
6
6
|
require('react/jsx-runtime');
|
|
@@ -408,6 +408,39 @@ var confirmDeleteButtonStyle = index.__assign(index.__assign({}, buttonStyle), {
|
|
|
408
408
|
color: colors.white
|
|
409
409
|
} });
|
|
410
410
|
|
|
411
|
+
// Public, user-targetable class names for the parts of the table element.
|
|
412
|
+
//
|
|
413
|
+
// These are a documented, stable API: form builders write custom CSS against
|
|
414
|
+
// them (e.g. `.feathery-table-cell { ... }`).
|
|
415
|
+
//
|
|
416
|
+
// Treat renames/removals as breaking changes to customer CSS.
|
|
417
|
+
var TABLE_CLASS = {
|
|
418
|
+
container: 'feathery-table-container',
|
|
419
|
+
toolbar: 'feathery-table-toolbar',
|
|
420
|
+
search: 'feathery-table-search',
|
|
421
|
+
searchInput: 'feathery-table-search-input',
|
|
422
|
+
addRowButton: 'feathery-table-add-row-button',
|
|
423
|
+
table: 'feathery-table',
|
|
424
|
+
header: 'feathery-table-header',
|
|
425
|
+
headerCell: 'feathery-table-header-cell',
|
|
426
|
+
sortIcon: 'feathery-table-sort-icon',
|
|
427
|
+
body: 'feathery-table-body',
|
|
428
|
+
row: 'feathery-table-row',
|
|
429
|
+
cell: 'feathery-table-cell',
|
|
430
|
+
editableCell: 'feathery-table-editable-cell',
|
|
431
|
+
cellInput: 'feathery-table-cell-input',
|
|
432
|
+
actionButton: 'feathery-table-action-button',
|
|
433
|
+
actionMenuButton: 'feathery-table-action-menu-button',
|
|
434
|
+
actionMenu: 'feathery-table-action-menu',
|
|
435
|
+
actionMenuItem: 'feathery-table-action-menu-item',
|
|
436
|
+
deleteButton: 'feathery-table-delete-button',
|
|
437
|
+
deleteConfirm: 'feathery-table-delete-confirm',
|
|
438
|
+
pagination: 'feathery-table-pagination',
|
|
439
|
+
pageButton: 'feathery-table-page-button',
|
|
440
|
+
pageSelect: 'feathery-table-page-select',
|
|
441
|
+
empty: 'feathery-table-empty'
|
|
442
|
+
};
|
|
443
|
+
|
|
411
444
|
function SearchIcon() {
|
|
412
445
|
return (index.jsx("svg", index.__assign({ css: searchIconStyle, fill: 'none', viewBox: '0 0 24 24', stroke: 'currentColor', strokeWidth: 2 }, { children: index.jsx("path", { strokeLinecap: 'round', d: 'M21 21l-3.5-3.5M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z' }) })));
|
|
413
446
|
}
|
|
@@ -418,20 +451,20 @@ function Search(_a) {
|
|
|
418
451
|
e.preventDefault();
|
|
419
452
|
}
|
|
420
453
|
};
|
|
421
|
-
return (index.jsxs("div", index.__assign({ css: searchWrapperStyle }, { children: [index.jsx("div", index.__assign({ css: searchIconWrapperStyle }, { children: index.jsx(SearchIcon, {}) })), index.jsx("input", { type: 'text', css: searchInputStyle, placeholder: 'Search', value: searchQuery, onChange: function (e) { return onSearchChange(e.target.value); }, onKeyDown: handleKeyDown })] })));
|
|
454
|
+
return (index.jsxs("div", index.__assign({ className: TABLE_CLASS.search, css: searchWrapperStyle }, { children: [index.jsx("div", index.__assign({ css: searchIconWrapperStyle }, { children: index.jsx(SearchIcon, {}) })), index.jsx("input", { type: 'text', className: TABLE_CLASS.searchInput, css: searchInputStyle, placeholder: 'Search', value: searchQuery, onChange: function (e) { return onSearchChange(e.target.value); }, onKeyDown: handleKeyDown })] })));
|
|
422
455
|
}
|
|
423
456
|
|
|
424
457
|
function SortIcon(_a) {
|
|
425
458
|
var isSorted = _a.isSorted, sortDirection = _a.sortDirection;
|
|
426
|
-
return (index.jsxs("svg", index.__assign({ xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24', fill: 'none', "aria-hidden": 'true' }, { children: [index.jsx("path", { css: sortArrowStyle, stroke: 'currentColor', "data-active": (isSorted && sortDirection === 'asc') || undefined, strokeLinecap: 'round', strokeLinejoin: 'round', strokeWidth: 2, d: 'm8 9 4-4 4 4' }), index.jsx("path", { css: sortArrowStyle, stroke: 'currentColor', "data-active": (isSorted && sortDirection === 'desc') || undefined, strokeLinecap: 'round', strokeLinejoin: 'round', strokeWidth: 2, d: 'm8 15 4 4 4-4' })] })));
|
|
459
|
+
return (index.jsxs("svg", index.__assign({ xmlns: 'http://www.w3.org/2000/svg', className: TABLE_CLASS.sortIcon, viewBox: '0 0 24 24', fill: 'none', "aria-hidden": 'true' }, { children: [index.jsx("path", { css: sortArrowStyle, stroke: 'currentColor', "data-active": (isSorted && sortDirection === 'asc') || undefined, strokeLinecap: 'round', strokeLinejoin: 'round', strokeWidth: 2, d: 'm8 9 4-4 4 4' }), index.jsx("path", { css: sortArrowStyle, stroke: 'currentColor', "data-active": (isSorted && sortDirection === 'desc') || undefined, strokeLinecap: 'round', strokeLinejoin: 'round', strokeWidth: 2, d: 'm8 15 4 4 4-4' })] })));
|
|
427
460
|
}
|
|
428
461
|
function SortHeader(_a) {
|
|
429
462
|
var columns = _a.columns, enableSort = _a.enableSort, sortColumn = _a.sortColumn, sortDirection = _a.sortDirection, onSort = _a.onSort, styles = _a.styles;
|
|
430
|
-
return (index.jsx(
|
|
463
|
+
return (index.jsx(React.Fragment, { children: columns.map(function (column, index$1) {
|
|
431
464
|
var isSortable = enableSort;
|
|
432
465
|
var isSorted = sortColumn === column.name;
|
|
433
466
|
var isFirstColumn = index$1 === 0;
|
|
434
|
-
return (index.jsx("th", index.__assign({ scope: 'col', onClick: function () { return isSortable && onSort(column.name); }, css: index.__assign(index.__assign(index.__assign(index.__assign({}, thStyle), (isFirstColumn ? {} : { paddingLeft: 0 })), styles.getTarget('th')), (isSortable ? { cursor: 'pointer' } : {})) }, { children: index.jsxs("div", index.__assign({ css: sortHeaderContentStyle }, { children: [index.jsx("span", { children: column.name }), isSortable && (index.jsx("span", index.__assign({ css: sortIconContainerStyle }, { children: index.jsx(SortIcon, { isSorted: isSorted, sortDirection: sortDirection }) })))] })) }), index$1));
|
|
467
|
+
return (index.jsx("th", index.__assign({ scope: 'col', className: TABLE_CLASS.headerCell, "data-feathery-field": column.field_key, onClick: function () { return isSortable && onSort(column.name); }, css: index.__assign(index.__assign(index.__assign(index.__assign({}, thStyle), (isFirstColumn ? {} : { paddingLeft: 0 })), styles.getTarget('th')), (isSortable ? { cursor: 'pointer' } : {})) }, { children: index.jsxs("div", index.__assign({ css: sortHeaderContentStyle }, { children: [index.jsx("span", { children: column.name }), isSortable && (index.jsx("span", index.__assign({ css: sortIconContainerStyle }, { children: index.jsx(SortIcon, { isSorted: isSorted, sortDirection: sortDirection }) })))] })) }), index$1));
|
|
435
468
|
}) }));
|
|
436
469
|
}
|
|
437
470
|
|
|
@@ -442,17 +475,17 @@ function PageInfo(_a) {
|
|
|
442
475
|
}
|
|
443
476
|
function PreviousButton(_a) {
|
|
444
477
|
var disabled = _a.disabled, onClick = _a.onClick;
|
|
445
|
-
return (index.jsx("button", index.__assign({ type: 'button', onClick: onClick, disabled: disabled, css: index.__assign(index.__assign({}, pageButtonPrevStyle), (disabled ? pageButtonDisabledStyle : {})) }, { children: "Previous" })));
|
|
478
|
+
return (index.jsx("button", index.__assign({ type: 'button', onClick: onClick, disabled: disabled, className: TABLE_CLASS.pageButton, css: index.__assign(index.__assign({}, pageButtonPrevStyle), (disabled ? pageButtonDisabledStyle : {})) }, { children: "Previous" })));
|
|
446
479
|
}
|
|
447
480
|
function NextButton(_a) {
|
|
448
481
|
var disabled = _a.disabled, onClick = _a.onClick;
|
|
449
|
-
return (index.jsx("button", index.__assign({ type: 'button', onClick: onClick, disabled: disabled, css: index.__assign(index.__assign({}, pageButtonNextStyle), (disabled ? pageButtonDisabledStyle : {})) }, { children: "Next" })));
|
|
482
|
+
return (index.jsx("button", index.__assign({ type: 'button', onClick: onClick, disabled: disabled, className: TABLE_CLASS.pageButton, css: index.__assign(index.__assign({}, pageButtonNextStyle), (disabled ? pageButtonDisabledStyle : {})) }, { children: "Next" })));
|
|
450
483
|
}
|
|
451
484
|
function OverflowSelect(_a) {
|
|
452
485
|
var pages = _a.pages, onPageChange = _a.onPageChange;
|
|
453
486
|
return (index.jsxs("select", index.__assign({ value: '', onChange: function (e) {
|
|
454
487
|
onPageChange(Number(e.target.value));
|
|
455
|
-
}, "aria-label": 'Go to page', css: overflowSelectStyle }, { children: [index.jsx("option", index.__assign({ value: '', disabled: true, hidden: true }, { children: "..." })), pages.map(function (page) { return (index.jsx("option", index.__assign({ value: page }, { children: page + 1 }), page)); })] })));
|
|
488
|
+
}, "aria-label": 'Go to page', className: TABLE_CLASS.pageSelect, css: overflowSelectStyle }, { children: [index.jsx("option", index.__assign({ value: '', disabled: true, hidden: true }, { children: "..." })), pages.map(function (page) { return (index.jsx("option", index.__assign({ value: page }, { children: page + 1 }), page)); })] })));
|
|
456
489
|
}
|
|
457
490
|
function PageNumbers(_a) {
|
|
458
491
|
var currentPage = _a.currentPage, totalPages = _a.totalPages, onPageChange = _a.onPageChange;
|
|
@@ -476,15 +509,15 @@ function PageNumbers(_a) {
|
|
|
476
509
|
}
|
|
477
510
|
items.push({ type: 'page', page: page });
|
|
478
511
|
}
|
|
479
|
-
return (index.jsx(
|
|
512
|
+
return (index.jsx(React.Fragment, { children: items.map(function (item, idx) {
|
|
480
513
|
if (item.type === 'overflow') {
|
|
481
514
|
if (item.pages.length === 1) {
|
|
482
|
-
return (index.jsx("li", { children: index.jsx("button", index.__assign({ type: 'button', onClick: function () { return onPageChange(item.pages[0]); }, css: pageButtonStyle }, { children: item.pages[0] + 1 })) }, "overflow-".concat(idx)));
|
|
515
|
+
return (index.jsx("li", { children: index.jsx("button", index.__assign({ type: 'button', onClick: function () { return onPageChange(item.pages[0]); }, className: TABLE_CLASS.pageButton, css: pageButtonStyle }, { children: item.pages[0] + 1 })) }, "overflow-".concat(idx)));
|
|
483
516
|
}
|
|
484
517
|
return (index.jsx("li", { children: index.jsx(OverflowSelect, { pages: item.pages, onPageChange: onPageChange }) }, "overflow-".concat(idx)));
|
|
485
518
|
}
|
|
486
519
|
var isActive = item.page === currentPage;
|
|
487
|
-
return (index.jsx("li", { children: index.jsx("button", index.__assign({ type: 'button', onClick: function () { return onPageChange(item.page); }, "aria-current": isActive ? 'page' : undefined, css: isActive
|
|
520
|
+
return (index.jsx("li", { children: index.jsx("button", index.__assign({ type: 'button', onClick: function () { return onPageChange(item.page); }, "aria-current": isActive ? 'page' : undefined, className: TABLE_CLASS.pageButton, css: isActive
|
|
488
521
|
? pageButtonActiveStyle
|
|
489
522
|
: pageButtonStyle }, { children: item.page + 1 })) }, item.page));
|
|
490
523
|
}) }));
|
|
@@ -493,7 +526,7 @@ function Pagination(_a) {
|
|
|
493
526
|
var currentPage = _a.currentPage, totalPages = _a.totalPages, totalItems = _a.totalItems, rowsPerPage = _a.rowsPerPage, onPageChange = _a.onPageChange;
|
|
494
527
|
if (totalPages <= 1)
|
|
495
528
|
return null;
|
|
496
|
-
return (index.jsxs("nav", index.__assign({ css: navStyle, "aria-label": 'Table navigation' }, { children: [index.jsx(PageInfo, { currentPage: currentPage, totalItems: totalItems, rowsPerPage: rowsPerPage }), index.jsxs("ul", index.__assign({ css: paginationListStyle }, { children: [index.jsx("li", { children: index.jsx(PreviousButton, { disabled: currentPage === 0, onClick: function () { return onPageChange(Math.max(0, currentPage - 1)); } }) }), index.jsx(PageNumbers, { currentPage: currentPage, totalPages: totalPages, onPageChange: onPageChange }), index.jsx("li", { children: index.jsx(NextButton, { disabled: currentPage >= totalPages - 1, onClick: function () {
|
|
529
|
+
return (index.jsxs("nav", index.__assign({ className: TABLE_CLASS.pagination, css: navStyle, "aria-label": 'Table navigation' }, { children: [index.jsx(PageInfo, { currentPage: currentPage, totalItems: totalItems, rowsPerPage: rowsPerPage }), index.jsxs("ul", index.__assign({ css: paginationListStyle }, { children: [index.jsx("li", { children: index.jsx(PreviousButton, { disabled: currentPage === 0, onClick: function () { return onPageChange(Math.max(0, currentPage - 1)); } }) }), index.jsx(PageNumbers, { currentPage: currentPage, totalPages: totalPages, onPageChange: onPageChange }), index.jsx("li", { children: index.jsx(NextButton, { disabled: currentPage >= totalPages - 1, onClick: function () {
|
|
497
530
|
onPageChange(Math.min(totalPages - 1, currentPage + 1));
|
|
498
531
|
} }) })] }))] })));
|
|
499
532
|
}
|
|
@@ -564,27 +597,27 @@ function ActionButtons(_a) {
|
|
|
564
597
|
var buttonKey = "".concat(tableId, "_").concat(rowIndex, "_").concat(action.label);
|
|
565
598
|
return (_a = buttonLoaders[buttonKey]) === null || _a === void 0 ? void 0 : _a.loader;
|
|
566
599
|
})) === null || _b === void 0 ? void 0 : _b.label)]) === null || _c === void 0 ? void 0 : _c.loader) !== null && _d !== void 0 ? _d : null;
|
|
567
|
-
return (index.jsx("div", index.__assign({ ref: containerRef, css: actionContainerStyle }, { children: useOverflow ? (index.jsxs(
|
|
600
|
+
return (index.jsx("div", index.__assign({ ref: containerRef, css: actionContainerStyle }, { children: useOverflow ? (index.jsxs(React.Fragment, { children: [index.jsx("button", index.__assign({ ref: menuButtonRef, type: 'button', disabled: overflowLoader, onClick: function (e) {
|
|
568
601
|
e.stopPropagation();
|
|
569
602
|
handleMenuToggle();
|
|
570
|
-
}, css: actionIconButtonStyle }, { children: overflowLoader ? (index.jsx("div", index.__assign({ style: {
|
|
603
|
+
}, className: TABLE_CLASS.actionMenuButton, css: actionIconButtonStyle }, { children: overflowLoader ? (index.jsx("div", index.__assign({ style: {
|
|
571
604
|
height: '16px',
|
|
572
605
|
width: '16px',
|
|
573
606
|
display: 'flex',
|
|
574
607
|
alignItems: 'center',
|
|
575
608
|
justifyContent: 'center'
|
|
576
609
|
} }, { children: overflowLoader }))) : (index.jsx(MenuIcon, {})) })), isMenuOpen &&
|
|
577
|
-
ReactDOM.createPortal(index.jsxs("div", index.__assign({ ref: menuRef, css: index.__assign(index.__assign({}, actionMenuStyle), { top: "".concat(menuPosition.top, "px"), left: "".concat(menuPosition.left, "px"), transform: 'translateX(-100%)' }) }, { children: [actions.map(function (action, index$1) {
|
|
610
|
+
ReactDOM.createPortal(index.jsxs("div", index.__assign({ ref: menuRef, className: TABLE_CLASS.actionMenu, css: index.__assign(index.__assign({}, actionMenuStyle), { top: "".concat(menuPosition.top, "px"), left: "".concat(menuPosition.left, "px"), transform: 'translateX(-100%)' }) }, { children: [actions.map(function (action, index$1) {
|
|
578
611
|
var disabled = Object.keys(buttonLoaders).length > 0;
|
|
579
612
|
return (index.jsx("button", index.__assign({ type: 'button', onClick: function (e) {
|
|
580
613
|
e.stopPropagation();
|
|
581
614
|
handleActionClick(action);
|
|
582
|
-
}, css: actionMenuItemStyle, disabled: disabled }, { children: action.label }), index$1));
|
|
615
|
+
}, className: TABLE_CLASS.actionMenuItem, css: actionMenuItemStyle, disabled: disabled }, { children: action.label }), index$1));
|
|
583
616
|
}), canDeleteRows && onDeleteRow && (index.jsxs(index.Fragment, { children: [index.jsx("div", { css: actionMenuSeparatorStyle }), index.jsx("button", index.__assign({ type: 'button', onClick: function (e) {
|
|
584
617
|
e.stopPropagation();
|
|
585
618
|
setIsMenuOpen(false);
|
|
586
619
|
onDeleteRow(rowIndex);
|
|
587
|
-
}, css: actionMenuDeleteItemStyle }, { children: "Delete" }))] }))] })), index.featheryDoc().body)] })) : (actions.map(function (action, index$1) {
|
|
620
|
+
}, className: TABLE_CLASS.actionMenuItem, css: actionMenuDeleteItemStyle }, { children: "Delete" }))] }))] })), index.featheryDoc().body)] })) : (actions.map(function (action, index$1) {
|
|
588
621
|
var _a;
|
|
589
622
|
var buttonKey = "".concat(tableId, "_").concat(rowIndex, "_").concat(action.label);
|
|
590
623
|
var loader = (_a = buttonLoaders[buttonKey]) === null || _a === void 0 ? void 0 : _a.loader;
|
|
@@ -592,7 +625,7 @@ function ActionButtons(_a) {
|
|
|
592
625
|
return (index.jsxs("button", index.__assign({ type: 'button', onClick: function (e) {
|
|
593
626
|
e.stopPropagation();
|
|
594
627
|
handleActionClick(action);
|
|
595
|
-
}, css: actionButtonStyle, disabled: disabled }, { children: [index.jsx("span", index.__assign({ style: { visibility: loader ? 'hidden' : 'visible' } }, { children: action.label })), loader && (index.jsx("div", index.__assign({ style: {
|
|
628
|
+
}, className: TABLE_CLASS.actionButton, css: actionButtonStyle, disabled: disabled }, { children: [index.jsx("span", index.__assign({ style: { visibility: loader ? 'hidden' : 'visible' } }, { children: action.label })), loader && (index.jsx("div", index.__assign({ style: {
|
|
596
629
|
position: 'absolute',
|
|
597
630
|
top: '50%',
|
|
598
631
|
left: '50%',
|
|
@@ -605,7 +638,7 @@ function ActionButtons(_a) {
|
|
|
605
638
|
|
|
606
639
|
function EmptyState(_a) {
|
|
607
640
|
var hasSearchQuery = _a.hasSearchQuery;
|
|
608
|
-
return (index.jsxs("div", index.__assign({ css: emptyStateContainerStyle }, { children: [hasSearchQuery && (index.jsx("svg", index.__assign({ css: {
|
|
641
|
+
return (index.jsxs("div", index.__assign({ className: TABLE_CLASS.empty, css: emptyStateContainerStyle }, { children: [hasSearchQuery && (index.jsx("svg", index.__assign({ css: {
|
|
609
642
|
width: '48px',
|
|
610
643
|
height: '48px',
|
|
611
644
|
color: '#9ca3af',
|
|
@@ -645,7 +678,7 @@ function DeleteConfirm(_a) {
|
|
|
645
678
|
doc.removeEventListener('keydown', handleKeyDown);
|
|
646
679
|
};
|
|
647
680
|
}, [onCancel, anchorEl]);
|
|
648
|
-
return ReactDOM.createPortal(index.jsxs("div", index.__assign({ ref: popoverRef, role: 'alertdialog', "aria-label": message, css: index.__assign(index.__assign({}, confirmPopoverStyle), { top: "".concat(top, "px"), left: "".concat(left, "px"), transform: 'translateX(-100%)' }) }, { children: [index.jsx("p", index.__assign({ css: confirmTextStyle }, { children: message })), index.jsxs("div", index.__assign({ css: confirmButtonRowStyle }, { children: [index.jsx("button", index.__assign({ type: 'button', css: confirmCancelButtonStyle, onClick: function (e) {
|
|
681
|
+
return ReactDOM.createPortal(index.jsxs("div", index.__assign({ ref: popoverRef, role: 'alertdialog', "aria-label": message, className: TABLE_CLASS.deleteConfirm, css: index.__assign(index.__assign({}, confirmPopoverStyle), { top: "".concat(top, "px"), left: "".concat(left, "px"), transform: 'translateX(-100%)' }) }, { children: [index.jsx("p", index.__assign({ css: confirmTextStyle }, { children: message })), index.jsxs("div", index.__assign({ css: confirmButtonRowStyle }, { children: [index.jsx("button", index.__assign({ type: 'button', css: confirmCancelButtonStyle, onClick: function (e) {
|
|
649
682
|
e.stopPropagation();
|
|
650
683
|
onCancel();
|
|
651
684
|
} }, { children: "Cancel" })), index.jsx("button", index.__assign({ type: 'button', css: confirmDeleteButtonStyle, onClick: function (e) {
|
|
@@ -741,12 +774,12 @@ function EditableCell(_a) {
|
|
|
741
774
|
setIsMenuOpen(!isMenuOpen);
|
|
742
775
|
};
|
|
743
776
|
if (isEditing) {
|
|
744
|
-
return (index.jsxs("div", index.__assign({ css: editingCellContentStyle }, { children: [index.jsx("div", index.__assign({ css: editingCellSizerStyle }, { children: "".concat(editValue, "\u200B") })), index.jsx("textarea", { ref: inputRef, value: editValue, onChange: function (e) { return setEditValue(e.target.value); }, onBlur: handleBlur, onKeyDown: handleKeyDown, css: index.__assign(index.__assign({}, cellInputStyle), editingCellInputStyle), onClick: function (e) { return e.stopPropagation(); } })] })));
|
|
777
|
+
return (index.jsxs("div", index.__assign({ className: TABLE_CLASS.editableCell, css: editingCellContentStyle }, { children: [index.jsx("div", index.__assign({ css: editingCellSizerStyle }, { children: "".concat(editValue, "\u200B") })), index.jsx("textarea", { ref: inputRef, value: editValue, onChange: function (e) { return setEditValue(e.target.value); }, onBlur: handleBlur, onKeyDown: handleKeyDown, className: TABLE_CLASS.cellInput, css: index.__assign(index.__assign({}, cellInputStyle), editingCellInputStyle), onClick: function (e) { return e.stopPropagation(); } })] })));
|
|
745
778
|
}
|
|
746
779
|
if (isEmpty) {
|
|
747
|
-
return (index.jsx("span", index.__assign({ css: clickToEditStyle, onClick: startEditing }, { children: "Click to edit" })));
|
|
780
|
+
return (index.jsx("span", index.__assign({ className: TABLE_CLASS.editableCell, css: clickToEditStyle, onClick: startEditing }, { children: "Click to edit" })));
|
|
748
781
|
}
|
|
749
|
-
return (index.jsxs("div", index.__assign({ css: editableCellContentStyle }, { children: [index.jsx("span", index.__assign({ css: editableCellTextStyle }, { children: displayValue })), index.jsx("button", index.__assign({ ref: menuButtonRef, type: 'button', "aria-expanded": isMenuOpen, "aria-haspopup": 'menu', css: overflowIconStyle, onClick: handleMenuToggle }, { children: index.jsx(OverflowIcon, {}) })), isMenuOpen &&
|
|
782
|
+
return (index.jsxs("div", index.__assign({ className: TABLE_CLASS.editableCell, css: editableCellContentStyle }, { children: [index.jsx("span", index.__assign({ css: editableCellTextStyle }, { children: displayValue })), index.jsx("button", index.__assign({ ref: menuButtonRef, type: 'button', "aria-expanded": isMenuOpen, "aria-haspopup": 'menu', css: overflowIconStyle, onClick: handleMenuToggle }, { children: index.jsx(OverflowIcon, {}) })), isMenuOpen &&
|
|
750
783
|
ReactDOM.createPortal(index.jsxs("div", index.__assign({ ref: menuRef, role: 'menu', css: index.__assign(index.__assign({}, actionMenuStyle), { top: "".concat(menuPosition.top, "px"), left: "".concat(menuPosition.left, "px"), transform: 'translateX(-100%)' }) }, { children: [index.jsx("button", index.__assign({ type: 'button', role: 'menuitem', css: actionMenuItemStyle, onClick: function (e) {
|
|
751
784
|
e.stopPropagation();
|
|
752
785
|
startEditing();
|
|
@@ -1450,7 +1483,7 @@ function TableElement(_a) {
|
|
|
1450
1483
|
]);
|
|
1451
1484
|
var showEmptyState = !hasData || !hasSearchResults;
|
|
1452
1485
|
var showToolbar = enableSearch || showAddRow;
|
|
1453
|
-
return (index.jsxs("div", index.__assign({ css: index.__assign(index.__assign({}, containerStyle), styles.getTarget('container')) }, { children: [showToolbar && (index.jsxs("div", index.__assign({ css: toolbarStyle }, { children: [enableSearch ? (index.jsx(Search, { searchQuery: searchQuery, onSearchChange: setSearchQuery })) : (index.jsx("div", {})), showAddRow && (index.jsx("button", index.__assign({ type: 'button', css: addRowButtonStyle, onClick: wrappedHandleAddRow }, { children: "+ Add Row" })))] }))), showEmptyState ? (index.jsx(EmptyState, { hasSearchQuery: searchQuery.trim().length > 0 })) : (index.jsx("div", index.__assign({ css: { overflowX: 'auto' } }, { children: index.jsxs("table", index.__assign({ css: index.__assign(index.__assign({}, tableStyle), styles.getTarget('table')) }, { children: [!isTransposed && (index.jsx("thead", index.__assign({ css: theadStyle }, { children: index.jsxs("tr", { children: [index.jsx(SortHeader, { columns: columns, enableSort: enableSort, sortColumn: sortColumn, sortDirection: sortDirection, onSort: handleSort, styles: styles }), actions.length > 0 && (index.jsx("th", { scope: 'col', css: index.__assign(index.__assign(index.__assign({}, thStyle), { paddingLeft: 0 }), styles.getTarget('th')) })), showStandaloneDeleteColumn && (index.jsx("th", { scope: 'col', css: index.__assign(index.__assign(index.__assign({}, thStyle), deleteColumnStyle), styles.getTarget('th')) }))] }) }))), index.jsxs("tbody", index.__assign({ css: styles.getTarget('tbody') }, { children: [paginatedRowIndices.map(function (rowIndex) {
|
|
1486
|
+
return (index.jsxs("div", index.__assign({ className: TABLE_CLASS.container, css: index.__assign(index.__assign({}, containerStyle), styles.getTarget('container')) }, { children: [showToolbar && (index.jsxs("div", index.__assign({ className: TABLE_CLASS.toolbar, css: toolbarStyle }, { children: [enableSearch ? (index.jsx(Search, { searchQuery: searchQuery, onSearchChange: setSearchQuery })) : (index.jsx("div", {})), showAddRow && (index.jsx("button", index.__assign({ type: 'button', className: TABLE_CLASS.addRowButton, css: addRowButtonStyle, onClick: wrappedHandleAddRow }, { children: "+ Add Row" })))] }))), showEmptyState ? (index.jsx(EmptyState, { hasSearchQuery: searchQuery.trim().length > 0 })) : (index.jsx("div", index.__assign({ css: { overflowX: 'auto' } }, { children: index.jsxs("table", index.__assign({ className: TABLE_CLASS.table, css: index.__assign(index.__assign({}, tableStyle), styles.getTarget('table')) }, { children: [!isTransposed && (index.jsx("thead", index.__assign({ className: TABLE_CLASS.header, css: theadStyle }, { children: index.jsxs("tr", { children: [index.jsx(SortHeader, { columns: columns, enableSort: enableSort, sortColumn: sortColumn, sortDirection: sortDirection, onSort: handleSort, styles: styles }), actions.length > 0 && (index.jsx("th", { scope: 'col', className: TABLE_CLASS.headerCell, css: index.__assign(index.__assign(index.__assign({}, thStyle), { paddingLeft: 0 }), styles.getTarget('th')) })), showStandaloneDeleteColumn && (index.jsx("th", { scope: 'col', className: TABLE_CLASS.headerCell, css: index.__assign(index.__assign(index.__assign({}, thStyle), deleteColumnStyle), styles.getTarget('th')) }))] }) }))), index.jsxs("tbody", index.__assign({ className: TABLE_CLASS.body, css: styles.getTarget('tbody') }, { children: [paginatedRowIndices.map(function (rowIndex) {
|
|
1454
1487
|
var _a, _b;
|
|
1455
1488
|
var rowData = {};
|
|
1456
1489
|
if (!isTransposed) {
|
|
@@ -1470,8 +1503,8 @@ function TableElement(_a) {
|
|
|
1470
1503
|
});
|
|
1471
1504
|
}
|
|
1472
1505
|
};
|
|
1473
|
-
return (index.jsxs("tr", index.__assign({ css: index.__assign(index.__assign({}, rowStyle), styles.getTarget('tr')), onClick: handleRowClick }, { children: [columns.map(function (column, colIndex) {
|
|
1474
|
-
var _a, _b;
|
|
1506
|
+
return (index.jsxs("tr", index.__assign({ className: TABLE_CLASS.row, css: index.__assign(index.__assign({}, rowStyle), styles.getTarget('tr')), onClick: handleRowClick }, { children: [columns.map(function (column, colIndex) {
|
|
1507
|
+
var _a, _b, _c;
|
|
1475
1508
|
var fieldValue = activeFieldValues[column.field_key];
|
|
1476
1509
|
var cellValue = Array.isArray(fieldValue)
|
|
1477
1510
|
? fieldValue[rowIndex]
|
|
@@ -1516,26 +1549,34 @@ function TableElement(_a) {
|
|
|
1516
1549
|
});
|
|
1517
1550
|
}
|
|
1518
1551
|
};
|
|
1519
|
-
|
|
1552
|
+
// In transposed mode each rendered row holds one
|
|
1553
|
+
// original field, so every cell in it belongs to
|
|
1554
|
+
// baseColumns[rowIndex]
|
|
1555
|
+
var cellFieldKey = isTransposed
|
|
1556
|
+
? (_a = baseColumns[rowIndex]) === null || _a === void 0 ? void 0 : _a.field_key
|
|
1557
|
+
: column.field_key;
|
|
1558
|
+
return (index.jsx(CellElement, index.__assign({ className: isFirstColInTranspose
|
|
1559
|
+
? TABLE_CLASS.headerCell
|
|
1560
|
+
: TABLE_CLASS.cell, "data-feathery-field": cellFieldKey, css: cellCss, onClick: handleCellClick }, (isFirstColInTranspose ? { scope: 'row' } : {}), { children: isFirstColInTranspose && isSortable ? (index.jsxs("div", index.__assign({ css: index.__assign(index.__assign({}, sortHeaderContentStyle), { justifyContent: 'space-between' }) }, { children: [index.jsx("span", { children: (_b = index.stringifyWithNull(cellValue)) !== null && _b !== void 0 ? _b : '' }), index.jsx("span", index.__assign({ css: sortIconContainerStyle }, { children: index.jsx(SortIcon, { isSorted: isSorted, sortDirection: sortDirection }) }))] }))) : canEdit ? (index.jsx(EditableCell, { value: cellValue, fieldKey: column.field_key, rowIndex: rowIndex, onEdit: wrappedHandleCellEdit, onClear: handleCellClear })) : ((_c = index.stringifyWithNull(cellValue)) !== null && _c !== void 0 ? _c : '') }), colIndex));
|
|
1520
1561
|
}), !isTransposed && actions.length > 0 && (index.jsxs("td", index.__assign({ ref: function (el) {
|
|
1521
1562
|
if (el)
|
|
1522
1563
|
actionCellRefs.current.set(rowIndex, el);
|
|
1523
1564
|
else
|
|
1524
1565
|
actionCellRefs.current.delete(rowIndex);
|
|
1525
|
-
}, css: index.__assign(index.__assign(index.__assign({}, cellStyle), { paddingLeft: 0 }), styles.getTarget('td')) }, { children: [index.jsx(ActionButtons, { actions: actions, rowIndex: rowIndex, columnData: baseColumns, fieldValues: baseFieldValues, onClick: onClick, tableId: element.id, buttonLoaders: buttonLoaders, canDeleteRows: canDeleteRows && hasOverflowMenu, onDeleteRow: function (ri) { return setDeleteRowIndex(ri); } }), hasOverflowMenu &&
|
|
1566
|
+
}, className: TABLE_CLASS.cell, css: index.__assign(index.__assign(index.__assign({}, cellStyle), { paddingLeft: 0 }), styles.getTarget('td')) }, { children: [index.jsx(ActionButtons, { actions: actions, rowIndex: rowIndex, columnData: baseColumns, fieldValues: baseFieldValues, onClick: onClick, tableId: element.id, buttonLoaders: buttonLoaders, canDeleteRows: canDeleteRows && hasOverflowMenu, onDeleteRow: function (ri) { return setDeleteRowIndex(ri); } }), hasOverflowMenu &&
|
|
1526
1567
|
canDeleteRows &&
|
|
1527
|
-
deleteRowIndex === rowIndex && (index.jsx(DeleteConfirm, { anchorEl: (_a = actionCellRefs.current.get(rowIndex)) !== null && _a !== void 0 ? _a : null, onConfirm: function () { return wrappedHandleDeleteRow(rowIndex); }, onCancel: handleCancelDelete }))] }))), showStandaloneDeleteColumn && (index.jsxs("td", index.__assign({ css: index.__assign(index.__assign({}, deleteColumnStyle), styles.getTarget('td')) }, { children: [index.jsx("button", index.__assign({ type: 'button', ref: function (el) {
|
|
1568
|
+
deleteRowIndex === rowIndex && (index.jsx(DeleteConfirm, { anchorEl: (_a = actionCellRefs.current.get(rowIndex)) !== null && _a !== void 0 ? _a : null, onConfirm: function () { return wrappedHandleDeleteRow(rowIndex); }, onCancel: handleCancelDelete }))] }))), showStandaloneDeleteColumn && (index.jsxs("td", index.__assign({ className: TABLE_CLASS.cell, css: index.__assign(index.__assign({}, deleteColumnStyle), styles.getTarget('td')) }, { children: [index.jsx("button", index.__assign({ type: 'button', ref: function (el) {
|
|
1528
1569
|
if (el)
|
|
1529
1570
|
deleteIconRefs.current.set(rowIndex, el);
|
|
1530
1571
|
else
|
|
1531
1572
|
deleteIconRefs.current.delete(rowIndex);
|
|
1532
|
-
}, css: index.__assign(index.__assign({}, deleteIconStyle), (deleteRowIndex === rowIndex && {
|
|
1573
|
+
}, className: TABLE_CLASS.deleteButton, css: index.__assign(index.__assign({}, deleteIconStyle), (deleteRowIndex === rowIndex && {
|
|
1533
1574
|
opacity: 1
|
|
1534
1575
|
})), onClick: function (e) {
|
|
1535
1576
|
e.stopPropagation();
|
|
1536
1577
|
setDeleteRowIndex(deleteRowIndex === rowIndex ? null : rowIndex);
|
|
1537
1578
|
} }, { children: index.jsx(TrashIcon, {}) })), deleteRowIndex === rowIndex && (index.jsx(DeleteConfirm, { anchorEl: (_b = deleteIconRefs.current.get(rowIndex)) !== null && _b !== void 0 ? _b : null, onConfirm: function () { return wrappedHandleDeleteRow(rowIndex); }, onCancel: handleCancelDelete }))] })))] }), rowIndex));
|
|
1538
|
-
}), isTransposed && actions.length > 0 && (index.jsxs("tr", index.__assign({ css: index.__assign(index.__assign({}, rowStyle), styles.getTarget('tr')) }, { children: [index.jsx("th", { scope: 'row', css: index.__assign(index.__assign(index.__assign({}, thStyle), { backgroundColor: '#f9fafb', borderRight: '1px solid #e5e7eb', width: '1px', whiteSpace: 'nowrap' }), styles.getTarget('th')) }), transposedRowIndices.map(function (originalRowIndex, idx) { return (index.jsx("td", index.__assign({ css: index.__assign(index.__assign(index.__assign({}, cellStyle), (idx === 0 ? {} : { paddingLeft: 0 })), styles.getTarget('td')) }, { children: index.jsx("div", index.__assign({ css: { display: 'flex', justifyContent: 'flex-start' } }, { children: index.jsx(ActionButtons, { actions: actions, rowIndex: originalRowIndex, columnData: baseColumns, fieldValues: baseFieldValues, onClick: onClick, forceInlineButtons: true, tableId: element.id, buttonLoaders: buttonLoaders }) })) }), originalRowIndex)); })] })))] }))] })) }))), !showEmptyState && enablePagination && (index.jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, totalItems: totalRows, rowsPerPage: rowsPerPage, onPageChange: setCurrentPage }))] })));
|
|
1579
|
+
}), isTransposed && actions.length > 0 && (index.jsxs("tr", index.__assign({ className: TABLE_CLASS.row, css: index.__assign(index.__assign({}, rowStyle), styles.getTarget('tr')) }, { children: [index.jsx("th", { scope: 'row', className: TABLE_CLASS.headerCell, css: index.__assign(index.__assign(index.__assign({}, thStyle), { backgroundColor: '#f9fafb', borderRight: '1px solid #e5e7eb', width: '1px', whiteSpace: 'nowrap' }), styles.getTarget('th')) }), transposedRowIndices.map(function (originalRowIndex, idx) { return (index.jsx("td", index.__assign({ className: TABLE_CLASS.cell, css: index.__assign(index.__assign(index.__assign({}, cellStyle), (idx === 0 ? {} : { paddingLeft: 0 })), styles.getTarget('td')) }, { children: index.jsx("div", index.__assign({ css: { display: 'flex', justifyContent: 'flex-start' } }, { children: index.jsx(ActionButtons, { actions: actions, rowIndex: originalRowIndex, columnData: baseColumns, fieldValues: baseFieldValues, onClick: onClick, forceInlineButtons: true, tableId: element.id, buttonLoaders: buttonLoaders }) })) }), originalRowIndex)); })] })))] }))] })) }))), !showEmptyState && enablePagination && (index.jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, totalItems: totalRows, rowsPerPage: rowsPerPage, onPageChange: setCurrentPage }))] })));
|
|
1539
1580
|
}
|
|
1540
1581
|
|
|
1541
1582
|
exports.default = TableElement;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index$1 = require('./fthry_index.
|
|
3
|
+
var index$1 = require('./fthry_index.Dhs6T2jm.js');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var Placeholder = require('./fthry_Placeholder.
|
|
6
|
-
var InlineTooltip = require('./fthry_InlineTooltip.
|
|
7
|
-
var Overlay = require('./fthry_Overlay.
|
|
8
|
-
var useElementSize = require('./fthry_useElementSize.
|
|
5
|
+
var Placeholder = require('./fthry_Placeholder.CuEfo8VG.js');
|
|
6
|
+
var InlineTooltip = require('./fthry_InlineTooltip.y6-oWSVZ.js');
|
|
7
|
+
var Overlay = require('./fthry_Overlay.UyeABG84.js');
|
|
8
|
+
var useElementSize = require('./fthry_useElementSize.hOKCjcSe.js');
|
|
9
9
|
require('react/jsx-runtime');
|
|
10
10
|
require('react-dom/client');
|
|
11
11
|
require('jszip');
|
|
@@ -1804,7 +1804,7 @@ function PhoneField(_a) {
|
|
|
1804
1804
|
// origins. The .woff2 is vendored from country-flag-emoji-polyfill and
|
|
1805
1805
|
// emitted as a sibling asset by webpack/rollup; `new URL(...,
|
|
1806
1806
|
// import.meta.url)` resolves it relative to wherever the bundle is served.
|
|
1807
|
-
var fontUrl = new URL('./TwemojiCountryFlags.woff2', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('fthry_index.
|
|
1807
|
+
var fontUrl = new URL('./TwemojiCountryFlags.woff2', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('fthry_index.CNM0qgO9.js', document.baseURI).href)))
|
|
1808
1808
|
.href;
|
|
1809
1809
|
f('Twemoji Country Flags', fontUrl);
|
|
1810
1810
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./fthry_index.
|
|
3
|
+
var index = require('./fthry_index.Dhs6T2jm.js');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var Overlay = require('./fthry_Overlay.
|
|
6
|
-
var index$1 = require('./fthry_index.
|
|
5
|
+
var Overlay = require('./fthry_Overlay.UyeABG84.js');
|
|
6
|
+
var index$1 = require('./fthry_index.CpXIXkG1.js');
|
|
7
7
|
require('react/jsx-runtime');
|
|
8
8
|
require('react-dom/client');
|
|
9
9
|
require('jszip');
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index$1 = require('./fthry_index.
|
|
3
|
+
var index$1 = require('./fthry_index.Dhs6T2jm.js');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var FormControl = require('./fthry_FormControl.
|
|
6
|
-
var index = require('./fthry_index.
|
|
7
|
-
var InlineTooltip = require('./fthry_InlineTooltip.
|
|
8
|
-
var useSalesforceSync = require('./fthry_useSalesforceSync.
|
|
5
|
+
var FormControl = require('./fthry_FormControl.quZka1xJ.js');
|
|
6
|
+
var index = require('./fthry_index.CpXIXkG1.js');
|
|
7
|
+
var InlineTooltip = require('./fthry_InlineTooltip.y6-oWSVZ.js');
|
|
8
|
+
var useSalesforceSync = require('./fthry_useSalesforceSync.Vr5Ug2zJ.js');
|
|
9
9
|
require('react/jsx-runtime');
|
|
10
10
|
require('react-dom/client');
|
|
11
11
|
require('jszip');
|
|
12
12
|
require('react-dom');
|
|
13
|
-
require('./fthry_Overlay.
|
|
13
|
+
require('./fthry_Overlay.UyeABG84.js');
|
|
14
14
|
|
|
15
15
|
var applyCheckboxGroupStyles = function (element, responsiveStyles) {
|
|
16
16
|
responsiveStyles.addTargets('checkboxGroup');
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./fthry_index.
|
|
3
|
+
var index = require('./fthry_index.Dhs6T2jm.js');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var InlineTooltip = require('./fthry_InlineTooltip.
|
|
6
|
-
var index$1 = require('./fthry_index.
|
|
7
|
-
var useSalesforceSync = require('./fthry_useSalesforceSync.
|
|
5
|
+
var InlineTooltip = require('./fthry_InlineTooltip.y6-oWSVZ.js');
|
|
6
|
+
var index$1 = require('./fthry_index.D8Dd0vHB.js');
|
|
7
|
+
var useSalesforceSync = require('./fthry_useSalesforceSync.Vr5Ug2zJ.js');
|
|
8
8
|
require('react/jsx-runtime');
|
|
9
9
|
require('react-dom/client');
|
|
10
10
|
require('jszip');
|
|
11
11
|
require('react-dom');
|
|
12
|
-
require('./fthry_Overlay.
|
|
12
|
+
require('./fthry_Overlay.UyeABG84.js');
|
|
13
13
|
|
|
14
14
|
function DropdownField(_a) {
|
|
15
15
|
var _b, _c, _d;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./fthry_index.
|
|
3
|
+
var index = require('./fthry_index.Dhs6T2jm.js');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var styles = require('./fthry_styles.
|
|
5
|
+
var styles = require('./fthry_styles.CIKtUEGu.js');
|
|
6
6
|
require('react/jsx-runtime');
|
|
7
7
|
require('react-dom/client');
|
|
8
8
|
require('jszip');
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index$1 = require('./fthry_index.
|
|
3
|
+
var index$1 = require('./fthry_index.Dhs6T2jm.js');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var Placeholder = require('./fthry_Placeholder.
|
|
6
|
-
var InlineTooltip = require('./fthry_InlineTooltip.
|
|
5
|
+
var Placeholder = require('./fthry_Placeholder.CuEfo8VG.js');
|
|
6
|
+
var InlineTooltip = require('./fthry_InlineTooltip.y6-oWSVZ.js');
|
|
7
7
|
require('react/jsx-runtime');
|
|
8
8
|
require('react-dom/client');
|
|
9
9
|
require('jszip');
|
|
10
10
|
require('react-dom');
|
|
11
|
-
require('./fthry_Overlay.
|
|
11
|
+
require('./fthry_Overlay.UyeABG84.js');
|
|
12
12
|
|
|
13
13
|
function TextArea(_a) {
|
|
14
14
|
var element = _a.element, responsiveStyles = _a.responsiveStyles, fieldLabel = _a.fieldLabel, _b = _a.elementProps, elementProps = _b === void 0 ? {} : _b, _c = _a.required, required = _c === void 0 ? false : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, editMode = _a.editMode, _e = _a.onChange, onChange = _e === void 0 ? function () { } : _e, _f = _a.setRef, setRef = _f === void 0 ? function () { } : _f, _g = _a.rawValue, rawValue = _g === void 0 ? '' : _g, inlineError = _a.inlineError, _h = _a.repeatIndex, repeatIndex = _h === void 0 ? null : _h, children = _a.children;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./fthry_index.
|
|
4
|
-
var index$1 = require('./fthry_index.
|
|
3
|
+
var index = require('./fthry_index.Dhs6T2jm.js');
|
|
4
|
+
var index$1 = require('./fthry_index.B4VCvBKj.js');
|
|
5
5
|
require('react/jsx-runtime');
|
|
6
6
|
require('react');
|
|
7
7
|
require('react-dom/client');
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./fthry_index.
|
|
3
|
+
var index = require('./fthry_index.Dhs6T2jm.js');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var InlineTooltip = require('./fthry_InlineTooltip.
|
|
6
|
-
var useSalesforceSync = require('./fthry_useSalesforceSync.
|
|
5
|
+
var InlineTooltip = require('./fthry_InlineTooltip.y6-oWSVZ.js');
|
|
6
|
+
var useSalesforceSync = require('./fthry_useSalesforceSync.Vr5Ug2zJ.js');
|
|
7
7
|
require('react/jsx-runtime');
|
|
8
8
|
require('react-dom/client');
|
|
9
9
|
require('jszip');
|
|
10
10
|
require('react-dom');
|
|
11
|
-
require('./fthry_Overlay.
|
|
11
|
+
require('./fthry_Overlay.UyeABG84.js');
|
|
12
12
|
|
|
13
13
|
function ButtonGroupField(_a) {
|
|
14
14
|
var element = _a.element, responsiveStyles = _a.responsiveStyles, fieldLabel = _a.fieldLabel, inlineError = _a.inlineError, _b = _a.fieldVal, fieldVal = _b === void 0 ? null : _b, _c = _a.repeatIndex, repeatIndex = _c === void 0 ? null : _c, editMode = _a.editMode, _d = _a.onClick, onClick = _d === void 0 ? function () { } : _d, _e = _a.elementProps, elementProps = _e === void 0 ? {} : _e, _f = _a.disabled, disabled = _f === void 0 ? false : _f, children = _a.children;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index$1 = require('./fthry_index.
|
|
3
|
+
var index$1 = require('./fthry_index.Dhs6T2jm.js');
|
|
4
4
|
var React = require('react');
|
|
5
|
-
var Placeholder = require('./fthry_Placeholder.
|
|
6
|
-
var InlineTooltip = require('./fthry_InlineTooltip.
|
|
7
|
-
var Overlay = require('./fthry_Overlay.
|
|
8
|
-
var useElementSize = require('./fthry_useElementSize.
|
|
5
|
+
var Placeholder = require('./fthry_Placeholder.CuEfo8VG.js');
|
|
6
|
+
var InlineTooltip = require('./fthry_InlineTooltip.y6-oWSVZ.js');
|
|
7
|
+
var Overlay = require('./fthry_Overlay.UyeABG84.js');
|
|
8
|
+
var useElementSize = require('./fthry_useElementSize.hOKCjcSe.js');
|
|
9
9
|
require('react/jsx-runtime');
|
|
10
10
|
require('react-dom/client');
|
|
11
11
|
require('jszip');
|