@atscript/vue-table 0.1.112 → 0.1.113
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/as-action-form-dialog.cjs +1 -1
- package/dist/as-action-form-dialog.mjs +1 -1
- package/dist/{as-action-menu-content-C_-ndF6S.cjs → as-action-menu-content-C7n_dJx0.cjs} +63 -7
- package/dist/{as-action-menu-content-CVZJpVPG.mjs → as-action-menu-content-CWmWeQam.mjs} +63 -7
- package/dist/as-column-menu.d.cts +1 -1
- package/dist/as-column-menu.d.mts +1 -1
- package/dist/{as-column-menu.vue-BbdaVsNi.d.cts → as-column-menu.vue-DL5N9mKR.d.mts} +2 -2
- package/dist/{as-column-menu.vue-CwhbMgzZ.d.mts → as-column-menu.vue-u_DNy3f-.d.cts} +2 -2
- package/dist/{as-config-dialog-Dvnlubkp.mjs → as-config-dialog-0e-az0nn.mjs} +2 -2
- package/dist/{as-config-dialog-ulI6e9vX.cjs → as-config-dialog-B6MFmBRW.cjs} +2 -2
- package/dist/as-config-dialog.cjs +1 -1
- package/dist/as-config-dialog.mjs +1 -1
- package/dist/{as-confirm-dialog-B7SM0zxy.cjs → as-confirm-dialog-CYiLQUP-.cjs} +1 -1
- package/dist/{as-confirm-dialog-DLR2ejrF.mjs → as-confirm-dialog-DlZzfASO.mjs} +1 -1
- package/dist/as-confirm-dialog.cjs +1 -1
- package/dist/as-confirm-dialog.mjs +1 -1
- package/dist/{as-filter-dialog-CiIPgmt8.mjs → as-filter-dialog-Bole60UC.mjs} +7 -7
- package/dist/{as-filter-dialog-DfX7ahsa.cjs → as-filter-dialog-OiRuTYfh.cjs} +7 -7
- package/dist/as-filter-dialog.cjs +1 -1
- package/dist/as-filter-dialog.mjs +1 -1
- package/dist/{as-filter-field-D8kv8lOm.cjs → as-filter-field-iJbKFVSw.cjs} +3 -3
- package/dist/{as-filter-field-C3wmTg22.mjs → as-filter-field-xzcm2aGE.mjs} +3 -3
- package/dist/as-filter-field.cjs +1 -1
- package/dist/as-filter-field.mjs +1 -1
- package/dist/{as-filters-Dmn0ykIo.mjs → as-filters-CGRd9vX0.mjs} +3 -3
- package/dist/{as-filters-BhPQXswG.cjs → as-filters-DfkxKGNU.cjs} +3 -3
- package/dist/as-filters.cjs +1 -1
- package/dist/as-filters.mjs +1 -1
- package/dist/{as-preset-dialog-B3fC0Eqc.mjs → as-preset-dialog-BbnwfYzC.mjs} +1 -1
- package/dist/{as-preset-dialog-DYxEVZ7V.cjs → as-preset-dialog-D77Dg9ll.cjs} +1 -1
- package/dist/as-preset-dialog.cjs +1 -1
- package/dist/as-preset-dialog.mjs +1 -1
- package/dist/{as-preset-picker-B9hw2qc8.mjs → as-preset-picker-Bwr3kM4o.mjs} +1 -1
- package/dist/{as-preset-picker-PbSNiBDr.cjs → as-preset-picker-Divz_1ZG.cjs} +1 -1
- package/dist/as-preset-picker.cjs +1 -1
- package/dist/as-preset-picker.mjs +1 -1
- package/dist/{as-row-actions-C4mSAqeh.mjs → as-row-actions-CBVF6B2-.mjs} +55 -28
- package/dist/{as-row-actions-N30up8uG.cjs → as-row-actions-DC6-kpsJ.cjs} +54 -27
- package/dist/as-row-actions.cjs +1 -1
- package/dist/as-row-actions.mjs +1 -1
- package/dist/{as-table-DnUc3TB1.mjs → as-table-DQwYi63u.mjs} +2 -2
- package/dist/{as-table-3TbYx5tz.cjs → as-table-DaT2K-7n.cjs} +2 -2
- package/dist/{as-table-actions-CoN68w6P.cjs → as-table-actions-CEhZXH97.cjs} +48 -19
- package/dist/{as-table-actions-Ct3tEarY.mjs → as-table-actions-ChR9MGQt.mjs} +49 -20
- package/dist/as-table-actions.cjs +1 -1
- package/dist/as-table-actions.d.cts +1 -1
- package/dist/as-table-actions.d.mts +1 -1
- package/dist/as-table-actions.mjs +1 -1
- package/dist/{as-table-actions.vue-62ZjZoIa.d.cts → as-table-actions.vue-DTGYOsZh.d.mts} +6 -6
- package/dist/{as-table-actions.vue-B2C_nC86.d.mts → as-table-actions.vue-WXkllHVw.d.cts} +6 -6
- package/dist/{as-table-base-CbxfXR2t.cjs → as-table-base-1uBBmFuL.cjs} +2 -2
- package/dist/{as-table-base-O9cMoTBL.mjs → as-table-base-DOvVedJg.mjs} +2 -2
- package/dist/{as-table-header-cell-D025cLjb.cjs → as-table-header-cell-DD6Tw87_.cjs} +1 -1
- package/dist/{as-table-header-cell-BlDhjZNp.mjs → as-table-header-cell-DfjfNeq4.mjs} +1 -1
- package/dist/as-table-header-cell.cjs +1 -1
- package/dist/as-table-header-cell.d.cts +1 -1
- package/dist/as-table-header-cell.d.mts +1 -1
- package/dist/as-table-header-cell.mjs +1 -1
- package/dist/{as-table-header-cell.vue-BjQUPdmH.d.cts → as-table-header-cell.vue-BCszzxtU.d.mts} +2 -2
- package/dist/{as-table-header-cell.vue-PEFiv40i.d.mts → as-table-header-cell.vue-BzTzfGRo.d.cts} +2 -2
- package/dist/{as-table-root-IzffHCVo.mjs → as-table-root-BSbO16CM.mjs} +9 -4
- package/dist/{as-table-root-CeypME9M.cjs → as-table-root-BnW1SL4W.cjs} +9 -4
- package/dist/as-table-root.cjs +1 -1
- package/dist/as-table-root.d.cts +1 -1
- package/dist/as-table-root.d.mts +1 -1
- package/dist/as-table-root.mjs +1 -1
- package/dist/{as-table-root.vue-D5Tp8U_d.d.cts → as-table-root.vue-DRv85M1N.d.cts} +26 -5
- package/dist/{as-table-root.vue-DtJBjtoC.d.mts → as-table-root.vue-TUauKr31.d.mts} +26 -5
- package/dist/{as-table-status-f4QmdAZ0.cjs → as-table-status-2eUIHBmk.cjs} +4 -4
- package/dist/{as-table-status-d3iUSOoH.mjs → as-table-status-Dy3rA0T-.mjs} +4 -4
- package/dist/as-table.cjs +1 -1
- package/dist/as-table.d.cts +1 -1
- package/dist/as-table.d.mts +1 -1
- package/dist/as-table.mjs +1 -1
- package/dist/{as-table.vue-53yyA7zP.d.cts → as-table.vue-B2ywpIo_.d.mts} +4 -4
- package/dist/{as-table.vue-CdSb4IUc.d.mts → as-table.vue-Co8kYS_o.d.cts} +4 -4
- package/dist/{as-window-table-C3o72zaM.mjs → as-window-table-B9k_nv4c.mjs} +2 -2
- package/dist/{as-window-table-BzyV1iDL.cjs → as-window-table-iwpsLq0K.cjs} +2 -2
- package/dist/as-window-table.cjs +1 -1
- package/dist/as-window-table.d.cts +1 -1
- package/dist/as-window-table.d.mts +1 -1
- package/dist/as-window-table.mjs +1 -1
- package/dist/{as-window-table.vue-DU6UdjA3.d.cts → as-window-table.vue-0ykWW1_K.d.mts} +4 -4
- package/dist/{as-window-table.vue-DQPjWA3T.d.mts → as-window-table.vue-DajUEg5q.d.cts} +4 -4
- package/dist/index.cjs +17 -17
- package/dist/index.d.cts +7 -7
- package/dist/index.d.mts +7 -7
- package/dist/index.mjs +17 -17
- package/dist/{types-DAgdkjji.d.cts → types-ByU4O0Yf.d.mts} +10 -2
- package/dist/{types-iSundY5p.d.mts → types-CTMxE_zA.d.cts} +10 -2
- package/dist/{use-table-Dwl4JoZR.cjs → use-table-BWgcmQS7.cjs} +2 -1
- package/dist/{use-table-ClKUAYU4.mjs → use-table-DHN_frAf.mjs} +2 -1
- package/dist/{use-table-component-QIECHhdZ.mjs → use-table-component-Bu7CIG5I.mjs} +1 -1
- package/dist/{use-table-component-xSoXI7Jm.cjs → use-table-component-QDcfYIBU.cjs} +1 -1
- package/dist/{use-table-nav-bridge-Cs4R_6F2.cjs → use-table-nav-bridge-BlqeY53w.cjs} +1 -1
- package/dist/{use-table-nav-bridge-0WVZrMv9.mjs → use-table-nav-bridge-CVO5_ttZ.mjs} +1 -1
- package/dist/{use-table-state-CI8i5m7s.cjs → use-table-state-CElgF_iy.cjs} +95 -1
- package/dist/{use-table-state-kxv6_Biy.mjs → use-table-state-Dju5bxt8.mjs} +72 -2
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as _default$11 } from "./as-filters.vue-fv-tRL2H.cjs";
|
|
2
2
|
import { t as _default$13 } from "./as-preset-picker.vue-DfXS3pGl.cjs";
|
|
3
|
-
import { _ as TableNavBridge, c as NavKeyOptions, d as ReactiveTableState, f as RowDeleteOpt, g as TableActionsState, h as TVueTableActionInfo, m as TAsTableControls, n as ColumnMenuConfig, o as InvokeOpts, p as TAsCellTypeComponents, r as ConfigTab, s as MainActionRequest, t as ActionResult, u as QueryErrorKind } from "./types-
|
|
4
|
-
import { t as _default$16 } from "./as-table-actions.vue-
|
|
5
|
-
import { $ as createTableState, A as createDefaultControls, B as useTableSearch, C as formatCellValue, D as provideCellLocale, E as CellLocale, F as AS_PRESETS_APP, G as useTable, H as useTableNavBridge, I as injectPresetsApp, J as CreateStaticTableStateOptions, K as SelectionPersistence, L as UseTableUrlQueryOptions, M as UseAppPrefsOptions, N as UseAppPrefsReturn, O as useCellLocale, P as useAppPrefs, Q as createStaticTableState, R as useTableUrlQuery, S as extractIdentifier, T as getColumnWidth, U as UseTableOptions, V as useTableFilter, W as clearTableCache, X as TableContext, Y as CreateTableStateOptions, Z as TableStateInternals, _ as getDefaultClientFactory, a as PRESET_ASPECTS, at as usePresets, b as resolveSystemPresets, c as PresetData, ct as UseLocalDraftReturn, d as STANDARD_PRESET_ID, et as useTableContext, f as SYSTEM_PRESET_PREFIX, g as UserConfData, h as UrlQuerySync, i as ClientFactory, it as UsePresetsReturn, j as useTableComponent, k as createDefaultCellTypes, l as PresetSnapshot, lt as useLocalDraft, m as SystemPresetInput, n as AppConfData, nt as ActivePresetView, o as PresetAspect, ot as StorageLike, p as SystemPreset, q as useTableSelection, r as AsPresetEntryRow, rt as UsePresetsOptions, s as PresetCapabilities, st as UseLocalDraftOptions, t as _default$19, tt as useTableContextOptional, u as PresetSnapshotWire, v as isSystemPresetId, w as getCellValue, x as setDefaultClientFactory, y as resetDefaultClientFactory, z as useTableActions } from "./as-table-root.vue-
|
|
6
|
-
import { t as _default$15 } from "./as-table.vue-
|
|
7
|
-
import { t as _default$20 } from "./as-window-table.vue-
|
|
3
|
+
import { _ as TableNavBridge, c as NavKeyOptions, d as ReactiveTableState, f as RowDeleteOpt, g as TableActionsState, h as TVueTableActionInfo, m as TAsTableControls, n as ColumnMenuConfig, o as InvokeOpts, p as TAsCellTypeComponents, r as ConfigTab, s as MainActionRequest, t as ActionResult, u as QueryErrorKind } from "./types-CTMxE_zA.cjs";
|
|
4
|
+
import { t as _default$16 } from "./as-table-actions.vue-WXkllHVw.cjs";
|
|
5
|
+
import { $ as createTableState, A as createDefaultControls, B as useTableSearch, C as formatCellValue, D as provideCellLocale, E as CellLocale, F as AS_PRESETS_APP, G as useTable, H as useTableNavBridge, I as injectPresetsApp, J as CreateStaticTableStateOptions, K as SelectionPersistence, L as UseTableUrlQueryOptions, M as UseAppPrefsOptions, N as UseAppPrefsReturn, O as useCellLocale, P as useAppPrefs, Q as createStaticTableState, R as useTableUrlQuery, S as extractIdentifier, T as getColumnWidth, U as UseTableOptions, V as useTableFilter, W as clearTableCache, X as TableContext, Y as CreateTableStateOptions, Z as TableStateInternals, _ as getDefaultClientFactory, a as PRESET_ASPECTS, at as usePresets, b as resolveSystemPresets, c as PresetData, ct as UseLocalDraftReturn, d as STANDARD_PRESET_ID, et as useTableContext, f as SYSTEM_PRESET_PREFIX, g as UserConfData, h as UrlQuerySync, i as ClientFactory, it as UsePresetsReturn, j as useTableComponent, k as createDefaultCellTypes, l as PresetSnapshot, lt as useLocalDraft, m as SystemPresetInput, n as AppConfData, nt as ActivePresetView, o as PresetAspect, ot as StorageLike, p as SystemPreset, q as useTableSelection, r as AsPresetEntryRow, rt as UsePresetsOptions, s as PresetCapabilities, st as UseLocalDraftOptions, t as _default$19, tt as useTableContextOptional, u as PresetSnapshotWire, v as isSystemPresetId, w as getCellValue, x as setDefaultClientFactory, y as resetDefaultClientFactory, z as useTableActions } from "./as-table-root.vue-DRv85M1N.cjs";
|
|
6
|
+
import { t as _default$15 } from "./as-table.vue-Co8kYS_o.cjs";
|
|
7
|
+
import { t as _default$20 } from "./as-window-table.vue-DajUEg5q.cjs";
|
|
8
8
|
import { t as _default } from "./as-cell-array.vue-pFs5GcCR.cjs";
|
|
9
9
|
import { t as _default$1 } from "./as-cell-date.vue-BBSps2B2.cjs";
|
|
10
10
|
import { t as _default$2 } from "./as-cell-json.vue-C6wg4ARZ.cjs";
|
|
11
11
|
import { t as _default$3 } from "./as-cell-number.vue-CJ2K5zeM.cjs";
|
|
12
12
|
import { t as _default$4 } from "./as-cell-union.vue-CslPM_c2.cjs";
|
|
13
|
-
import { t as _default$5 } from "./as-column-menu.vue-
|
|
13
|
+
import { t as _default$5 } from "./as-column-menu.vue-u_DNy3f-.cjs";
|
|
14
14
|
import { t as _default$6 } from "./as-config-dialog.vue-DvvJi3xx.cjs";
|
|
15
15
|
import { t as _default$7 } from "./as-confirm-dialog.vue-CXxLpzbu.cjs";
|
|
16
16
|
import { t as _default$8 } from "./as-filter-dialog.vue-BV2J8PgZ.cjs";
|
|
@@ -19,5 +19,5 @@ import { t as _default$10 } from "./as-filter-input.vue-CS4nOk_Q.cjs";
|
|
|
19
19
|
import { t as _default$12 } from "./as-preset-dialog.vue-DP9fy00Y.cjs";
|
|
20
20
|
import { t as _default$14 } from "./as-row-actions.vue-Bvcc2tUN.cjs";
|
|
21
21
|
import { t as _default$17 } from "./as-table-cell-value.vue-BgFDv2JQ.cjs";
|
|
22
|
-
import { t as _default$18 } from "./as-table-header-cell.vue-
|
|
22
|
+
import { t as _default$18 } from "./as-table-header-cell.vue-BzTzfGRo.cjs";
|
|
23
23
|
export { AS_PRESETS_APP, ActionResult, ActivePresetView, AppConfData, _default as AsCellArray, _default$1 as AsCellDate, _default$2 as AsCellJson, _default$3 as AsCellNumber, _default$4 as AsCellUnion, _default$5 as AsColumnMenu, _default$6 as AsConfigDialog, _default$7 as AsConfirmDialog, _default$8 as AsFilterDialog, _default$9 as AsFilterField, _default$10 as AsFilterInput, _default$11 as AsFilters, _default$12 as AsPresetDialog, AsPresetEntryRow, _default$13 as AsPresetPicker, _default$14 as AsRowActions, _default$15 as AsTable, _default$16 as AsTableActions, _default$17 as AsTableCellValue, _default$18 as AsTableHeaderCell, _default$19 as AsTableRoot, _default$20 as AsWindowTable, CellLocale, ClientFactory, ColumnMenuConfig, ConfigTab, CreateStaticTableStateOptions, CreateTableStateOptions, InvokeOpts, MainActionRequest, NavKeyOptions, PRESET_ASPECTS, PresetAspect, PresetCapabilities, PresetData, PresetSnapshot, PresetSnapshotWire, QueryErrorKind, ReactiveTableState, RowDeleteOpt, STANDARD_PRESET_ID, SYSTEM_PRESET_PREFIX, SelectionPersistence, StorageLike, SystemPreset, SystemPresetInput, TAsCellTypeComponents, TAsTableControls, TVueTableActionInfo, TableActionsState, TableContext, TableNavBridge, TableStateInternals, UrlQuerySync, UseAppPrefsOptions, UseAppPrefsReturn, UseLocalDraftOptions, UseLocalDraftReturn, UsePresetsOptions, UsePresetsReturn, UseTableOptions, UseTableUrlQueryOptions, UserConfData, clearTableCache, createDefaultCellTypes, createDefaultControls, createStaticTableState, createTableState, extractIdentifier, formatCellValue, getCellValue, getColumnWidth, getDefaultClientFactory, injectPresetsApp, isSystemPresetId, provideCellLocale, resetDefaultClientFactory, resolveSystemPresets, setDefaultClientFactory, useAppPrefs, useCellLocale, useLocalDraft, usePresets, useTable, useTableActions, useTableComponent, useTableContext, useTableContextOptional, useTableFilter, useTableNavBridge, useTableSearch, useTableSelection, useTableUrlQuery };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { t as _default$11 } from "./as-filters.vue-DmECMd1v.mjs";
|
|
2
2
|
import { t as _default$13 } from "./as-preset-picker.vue-BPjsiaVt.mjs";
|
|
3
|
-
import { _ as TableNavBridge, c as NavKeyOptions, d as ReactiveTableState, f as RowDeleteOpt, g as TableActionsState, h as TVueTableActionInfo, m as TAsTableControls, n as ColumnMenuConfig, o as InvokeOpts, p as TAsCellTypeComponents, r as ConfigTab, s as MainActionRequest, t as ActionResult, u as QueryErrorKind } from "./types-
|
|
4
|
-
import { t as _default$16 } from "./as-table-actions.vue-
|
|
5
|
-
import { $ as createTableState, A as createDefaultControls, B as useTableSearch, C as formatCellValue, D as provideCellLocale, E as CellLocale, F as AS_PRESETS_APP, G as useTable, H as useTableNavBridge, I as injectPresetsApp, J as CreateStaticTableStateOptions, K as SelectionPersistence, L as UseTableUrlQueryOptions, M as UseAppPrefsOptions, N as UseAppPrefsReturn, O as useCellLocale, P as useAppPrefs, Q as createStaticTableState, R as useTableUrlQuery, S as extractIdentifier, T as getColumnWidth, U as UseTableOptions, V as useTableFilter, W as clearTableCache, X as TableContext, Y as CreateTableStateOptions, Z as TableStateInternals, _ as getDefaultClientFactory, a as PRESET_ASPECTS, at as usePresets, b as resolveSystemPresets, c as PresetData, ct as UseLocalDraftReturn, d as STANDARD_PRESET_ID, et as useTableContext, f as SYSTEM_PRESET_PREFIX, g as UserConfData, h as UrlQuerySync, i as ClientFactory, it as UsePresetsReturn, j as useTableComponent, k as createDefaultCellTypes, l as PresetSnapshot, lt as useLocalDraft, m as SystemPresetInput, n as AppConfData, nt as ActivePresetView, o as PresetAspect, ot as StorageLike, p as SystemPreset, q as useTableSelection, r as AsPresetEntryRow, rt as UsePresetsOptions, s as PresetCapabilities, st as UseLocalDraftOptions, t as _default$19, tt as useTableContextOptional, u as PresetSnapshotWire, v as isSystemPresetId, w as getCellValue, x as setDefaultClientFactory, y as resetDefaultClientFactory, z as useTableActions } from "./as-table-root.vue-
|
|
6
|
-
import { t as _default$15 } from "./as-table.vue-
|
|
7
|
-
import { t as _default$20 } from "./as-window-table.vue-
|
|
3
|
+
import { _ as TableNavBridge, c as NavKeyOptions, d as ReactiveTableState, f as RowDeleteOpt, g as TableActionsState, h as TVueTableActionInfo, m as TAsTableControls, n as ColumnMenuConfig, o as InvokeOpts, p as TAsCellTypeComponents, r as ConfigTab, s as MainActionRequest, t as ActionResult, u as QueryErrorKind } from "./types-ByU4O0Yf.mjs";
|
|
4
|
+
import { t as _default$16 } from "./as-table-actions.vue-DTGYOsZh.mjs";
|
|
5
|
+
import { $ as createTableState, A as createDefaultControls, B as useTableSearch, C as formatCellValue, D as provideCellLocale, E as CellLocale, F as AS_PRESETS_APP, G as useTable, H as useTableNavBridge, I as injectPresetsApp, J as CreateStaticTableStateOptions, K as SelectionPersistence, L as UseTableUrlQueryOptions, M as UseAppPrefsOptions, N as UseAppPrefsReturn, O as useCellLocale, P as useAppPrefs, Q as createStaticTableState, R as useTableUrlQuery, S as extractIdentifier, T as getColumnWidth, U as UseTableOptions, V as useTableFilter, W as clearTableCache, X as TableContext, Y as CreateTableStateOptions, Z as TableStateInternals, _ as getDefaultClientFactory, a as PRESET_ASPECTS, at as usePresets, b as resolveSystemPresets, c as PresetData, ct as UseLocalDraftReturn, d as STANDARD_PRESET_ID, et as useTableContext, f as SYSTEM_PRESET_PREFIX, g as UserConfData, h as UrlQuerySync, i as ClientFactory, it as UsePresetsReturn, j as useTableComponent, k as createDefaultCellTypes, l as PresetSnapshot, lt as useLocalDraft, m as SystemPresetInput, n as AppConfData, nt as ActivePresetView, o as PresetAspect, ot as StorageLike, p as SystemPreset, q as useTableSelection, r as AsPresetEntryRow, rt as UsePresetsOptions, s as PresetCapabilities, st as UseLocalDraftOptions, t as _default$19, tt as useTableContextOptional, u as PresetSnapshotWire, v as isSystemPresetId, w as getCellValue, x as setDefaultClientFactory, y as resetDefaultClientFactory, z as useTableActions } from "./as-table-root.vue-TUauKr31.mjs";
|
|
6
|
+
import { t as _default$15 } from "./as-table.vue-B2ywpIo_.mjs";
|
|
7
|
+
import { t as _default$20 } from "./as-window-table.vue-0ykWW1_K.mjs";
|
|
8
8
|
import { t as _default } from "./as-cell-array.vue-D4vS7C_D.mjs";
|
|
9
9
|
import { t as _default$1 } from "./as-cell-date.vue-Chs7WTZ9.mjs";
|
|
10
10
|
import { t as _default$2 } from "./as-cell-json.vue-C0_LDvQw.mjs";
|
|
11
11
|
import { t as _default$3 } from "./as-cell-number.vue-BBF0OuU8.mjs";
|
|
12
12
|
import { t as _default$4 } from "./as-cell-union.vue-CL-Lf-Rm.mjs";
|
|
13
|
-
import { t as _default$5 } from "./as-column-menu.vue-
|
|
13
|
+
import { t as _default$5 } from "./as-column-menu.vue-DL5N9mKR.mjs";
|
|
14
14
|
import { t as _default$6 } from "./as-config-dialog.vue-BvFZZRuY.mjs";
|
|
15
15
|
import { t as _default$7 } from "./as-confirm-dialog.vue-Cz52-v6c.mjs";
|
|
16
16
|
import { t as _default$8 } from "./as-filter-dialog.vue-likNLqzF.mjs";
|
|
@@ -19,5 +19,5 @@ import { t as _default$10 } from "./as-filter-input.vue-B9ma2l9j.mjs";
|
|
|
19
19
|
import { t as _default$12 } from "./as-preset-dialog.vue-BRjjfPty.mjs";
|
|
20
20
|
import { t as _default$14 } from "./as-row-actions.vue-DUSDuoR2.mjs";
|
|
21
21
|
import { t as _default$17 } from "./as-table-cell-value.vue-kfNgVhzn.mjs";
|
|
22
|
-
import { t as _default$18 } from "./as-table-header-cell.vue-
|
|
22
|
+
import { t as _default$18 } from "./as-table-header-cell.vue-BCszzxtU.mjs";
|
|
23
23
|
export { AS_PRESETS_APP, ActionResult, ActivePresetView, AppConfData, _default as AsCellArray, _default$1 as AsCellDate, _default$2 as AsCellJson, _default$3 as AsCellNumber, _default$4 as AsCellUnion, _default$5 as AsColumnMenu, _default$6 as AsConfigDialog, _default$7 as AsConfirmDialog, _default$8 as AsFilterDialog, _default$9 as AsFilterField, _default$10 as AsFilterInput, _default$11 as AsFilters, _default$12 as AsPresetDialog, AsPresetEntryRow, _default$13 as AsPresetPicker, _default$14 as AsRowActions, _default$15 as AsTable, _default$16 as AsTableActions, _default$17 as AsTableCellValue, _default$18 as AsTableHeaderCell, _default$19 as AsTableRoot, _default$20 as AsWindowTable, CellLocale, ClientFactory, ColumnMenuConfig, ConfigTab, CreateStaticTableStateOptions, CreateTableStateOptions, InvokeOpts, MainActionRequest, NavKeyOptions, PRESET_ASPECTS, PresetAspect, PresetCapabilities, PresetData, PresetSnapshot, PresetSnapshotWire, QueryErrorKind, ReactiveTableState, RowDeleteOpt, STANDARD_PRESET_ID, SYSTEM_PRESET_PREFIX, SelectionPersistence, StorageLike, SystemPreset, SystemPresetInput, TAsCellTypeComponents, TAsTableControls, TVueTableActionInfo, TableActionsState, TableContext, TableNavBridge, TableStateInternals, UrlQuerySync, UseAppPrefsOptions, UseAppPrefsReturn, UseLocalDraftOptions, UseLocalDraftReturn, UsePresetsOptions, UsePresetsReturn, UseTableOptions, UseTableUrlQueryOptions, UserConfData, clearTableCache, createDefaultCellTypes, createDefaultControls, createStaticTableState, createTableState, extractIdentifier, formatCellValue, getCellValue, getColumnWidth, getDefaultClientFactory, injectPresetsApp, isSystemPresetId, provideCellLocale, resetDefaultClientFactory, resolveSystemPresets, setDefaultClientFactory, useAppPrefs, useCellLocale, useLocalDraft, usePresets, useTable, useTableActions, useTableComponent, useTableContext, useTableContextOptional, useTableFilter, useTableNavBridge, useTableSearch, useTableSelection, useTableUrlQuery };
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as useTableContext, m as extractIdentifier, n as createTableState, o as useTableContextOptional, t as createStaticTableState, x as ROW_ACTIONS_TYPE } from "./use-table-state-Dju5bxt8.mjs";
|
|
2
2
|
import { n as useTableSelection } from "./use-table-selection-C84z4OZy.mjs";
|
|
3
|
-
import { a as AS_PRESETS_APP, i as useLocalDraft, n as useTable, o as injectPresetsApp, r as usePresets, t as clearTableCache } from "./use-table-
|
|
4
|
-
import { t as useTableNavBridge } from "./use-table-nav-bridge-
|
|
5
|
-
import { t as useTableComponent } from "./use-table-component-
|
|
3
|
+
import { a as AS_PRESETS_APP, i as useLocalDraft, n as useTable, o as injectPresetsApp, r as usePresets, t as clearTableCache } from "./use-table-DHN_frAf.mjs";
|
|
4
|
+
import { t as useTableNavBridge } from "./use-table-nav-bridge-CVO5_ttZ.mjs";
|
|
5
|
+
import { t as useTableComponent } from "./use-table-component-Bu7CIG5I.mjs";
|
|
6
6
|
import { t as getCellValue } from "./get-cell-value-C8LLc_Rr.mjs";
|
|
7
7
|
import { t as as_cell_array_default } from "./as-cell-array-2qmJ1lT2.mjs";
|
|
8
8
|
import { t as as_cell_date_default } from "./as-cell-date-BwFgi6O0.mjs";
|
|
@@ -12,21 +12,21 @@ import { t as as_cell_number_default } from "./as-cell-number-DKRaS9pM.mjs";
|
|
|
12
12
|
import { t as formatCellValue } from "./format-cell-D1Ziv96Q.mjs";
|
|
13
13
|
import { t as as_cell_union_default } from "./as-cell-union-C9FukGqF.mjs";
|
|
14
14
|
import { t as as_column_menu_default } from "./as-column-menu-kTIQfLTi.mjs";
|
|
15
|
-
import { t as as_config_dialog_default } from "./as-config-dialog-
|
|
16
|
-
import { t as as_confirm_dialog_default } from "./as-confirm-dialog-
|
|
15
|
+
import { t as as_config_dialog_default } from "./as-config-dialog-0e-az0nn.mjs";
|
|
16
|
+
import { t as as_confirm_dialog_default } from "./as-confirm-dialog-DlZzfASO.mjs";
|
|
17
17
|
import { t as as_filter_input_default } from "./as-filter-input-BM23TNeh.mjs";
|
|
18
|
-
import { t as as_filter_dialog_default } from "./as-filter-dialog-
|
|
19
|
-
import { t as as_table_header_cell_default } from "./as-table-header-cell-
|
|
20
|
-
import { t as as_window_table_default } from "./as-window-table-
|
|
21
|
-
import { t as as_filter_field_default } from "./as-filter-field-
|
|
22
|
-
import { t as as_filters_default } from "./as-filters-
|
|
23
|
-
import { t as as_preset_dialog_default } from "./as-preset-dialog-
|
|
24
|
-
import { t as as_row_actions_default } from "./as-row-actions-
|
|
18
|
+
import { t as as_filter_dialog_default } from "./as-filter-dialog-Bole60UC.mjs";
|
|
19
|
+
import { t as as_table_header_cell_default } from "./as-table-header-cell-DfjfNeq4.mjs";
|
|
20
|
+
import { t as as_window_table_default } from "./as-window-table-B9k_nv4c.mjs";
|
|
21
|
+
import { t as as_filter_field_default } from "./as-filter-field-xzcm2aGE.mjs";
|
|
22
|
+
import { t as as_filters_default } from "./as-filters-CGRd9vX0.mjs";
|
|
23
|
+
import { t as as_preset_dialog_default } from "./as-preset-dialog-BbnwfYzC.mjs";
|
|
24
|
+
import { t as as_row_actions_default } from "./as-row-actions-CBVF6B2-.mjs";
|
|
25
25
|
import { t as as_table_cell_value_default } from "./as-table-cell-value-CPcFxSOj.mjs";
|
|
26
|
-
import { t as as_table_root_default } from "./as-table-root-
|
|
27
|
-
import { t as as_table_default } from "./as-table-
|
|
28
|
-
import { t as as_table_actions_default } from "./as-table-actions-
|
|
29
|
-
import { t as as_preset_picker_default } from "./as-preset-picker-
|
|
26
|
+
import { t as as_table_root_default } from "./as-table-root-BSbO16CM.mjs";
|
|
27
|
+
import { t as as_table_default } from "./as-table-DQwYi63u.mjs";
|
|
28
|
+
import { t as as_table_actions_default } from "./as-table-actions-ChR9MGQt.mjs";
|
|
29
|
+
import { t as as_preset_picker_default } from "./as-preset-picker-Bwr3kM4o.mjs";
|
|
30
30
|
import { getDefaultClientFactory, resetDefaultClientFactory, setDefaultClientFactory } from "@atscript/ui";
|
|
31
31
|
import { computed, effectScope, ref, shallowRef } from "vue";
|
|
32
32
|
import { AppPrefsClient, PRESET_ASPECTS, STANDARD_PRESET_ID, SYSTEM_PRESET_PREFIX, columnFilterType, conditionsForType, defaultCondition, isAuthError, isFilled, isSystemPresetId, resolveSystemPresets } from "@atscript/ui-table";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Component, ComputedRef, Ref, ShallowRef } from "vue";
|
|
2
|
-
import { ClientError, TDbActionInfo, TDbActionProcessor, TDbDeleteResult } from "@atscript/db-client";
|
|
3
1
|
import { ColumnDef, PaginationControl, SortControl, TableDef } from "@atscript/ui";
|
|
2
|
+
import { Component, ComputedRef, Ref, ShallowRef } from "vue";
|
|
4
3
|
import { AsPresetEntryRow, AspectMask, ColumnWidthsMap, ConfigTab, FieldFilters, PresetAspect, PresetCapabilities, PresetSnapshot, SelectionMode, SystemPreset, SystemPresetInput, TableStateMethods } from "@atscript/ui-table";
|
|
4
|
+
import { ClientError, TDbActionInfo, TDbActionProcessor, TDbDeleteResult } from "@atscript/db-client";
|
|
5
5
|
|
|
6
6
|
//#region src/types.d.ts
|
|
7
7
|
/** UI-side sentinel for the synthesised row-delete processor. */
|
|
@@ -342,6 +342,14 @@ interface ReactiveTableState extends TableStateMethods {
|
|
|
342
342
|
selectedCount: ComputedRef<number>;
|
|
343
343
|
/** Extract unique value from a row for selection tracking. */
|
|
344
344
|
rowValueFn: (row: Record<string, unknown>) => unknown;
|
|
345
|
+
/**
|
|
346
|
+
* Map a navigate action's interpolated href before it is used as an
|
|
347
|
+
* anchor's `href` attribute or a mod/middle-click `window.open` target —
|
|
348
|
+
* e.g. `router.resolve(url).href` for apps served under a base path.
|
|
349
|
+
* Identity when not configured. NEVER applied on the plain-left-click
|
|
350
|
+
* invoke path — the Client's `navigate` hook owns that URL.
|
|
351
|
+
*/
|
|
352
|
+
resolveHref: (url: string) => string;
|
|
345
353
|
/**
|
|
346
354
|
* Row-delete opt-in — writable ref owned by the renderer. `<AsTable>` and
|
|
347
355
|
* `<AsWindowTable>` push their `:row-delete` prop into this ref via a
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ColumnDef, PaginationControl, SortControl, TableDef } from "@atscript/ui";
|
|
2
1
|
import { Component, ComputedRef, Ref, ShallowRef } from "vue";
|
|
3
|
-
import { AsPresetEntryRow, AspectMask, ColumnWidthsMap, ConfigTab, FieldFilters, PresetAspect, PresetCapabilities, PresetSnapshot, SelectionMode, SystemPreset, SystemPresetInput, TableStateMethods } from "@atscript/ui-table";
|
|
4
2
|
import { ClientError, TDbActionInfo, TDbActionProcessor, TDbDeleteResult } from "@atscript/db-client";
|
|
3
|
+
import { ColumnDef, PaginationControl, SortControl, TableDef } from "@atscript/ui";
|
|
4
|
+
import { AsPresetEntryRow, AspectMask, ColumnWidthsMap, ConfigTab, FieldFilters, PresetAspect, PresetCapabilities, PresetSnapshot, SelectionMode, SystemPreset, SystemPresetInput, TableStateMethods } from "@atscript/ui-table";
|
|
5
5
|
|
|
6
6
|
//#region src/types.d.ts
|
|
7
7
|
/** UI-side sentinel for the synthesised row-delete processor. */
|
|
@@ -342,6 +342,14 @@ interface ReactiveTableState extends TableStateMethods {
|
|
|
342
342
|
selectedCount: ComputedRef<number>;
|
|
343
343
|
/** Extract unique value from a row for selection tracking. */
|
|
344
344
|
rowValueFn: (row: Record<string, unknown>) => unknown;
|
|
345
|
+
/**
|
|
346
|
+
* Map a navigate action's interpolated href before it is used as an
|
|
347
|
+
* anchor's `href` attribute or a mod/middle-click `window.open` target —
|
|
348
|
+
* e.g. `router.resolve(url).href` for apps served under a base path.
|
|
349
|
+
* Identity when not configured. NEVER applied on the plain-left-click
|
|
350
|
+
* invoke path — the Client's `navigate` hook owns that URL.
|
|
351
|
+
*/
|
|
352
|
+
resolveHref: (url: string) => string;
|
|
345
353
|
/**
|
|
346
354
|
* Row-delete opt-in — writable ref owned by the renderer. `<AsTable>` and
|
|
347
355
|
* `<AsWindowTable>` push their `:row-delete` prop into this ref via a
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-CElgF_iy.cjs");
|
|
2
2
|
const require_use_table_selection = require("./use-table-selection-Cmiu1h4S.cjs");
|
|
3
3
|
let _atscript_ui = require("@atscript/ui");
|
|
4
4
|
let vue = require("vue");
|
|
@@ -410,6 +410,7 @@ function useTable(url, opts) {
|
|
|
410
410
|
},
|
|
411
411
|
actions: {
|
|
412
412
|
refreshOnAction: opts?.refreshOnAction,
|
|
413
|
+
resolveHref: opts?.resolveHref,
|
|
413
414
|
onResolved: opts?.onActionResolved
|
|
414
415
|
},
|
|
415
416
|
preset: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createTableState, r as provideTableContext, s as DEFAULT_AVAILABLE_ASPECTS } from "./use-table-state-
|
|
1
|
+
import { n as createTableState, r as provideTableContext, s as DEFAULT_AVAILABLE_ASPECTS } from "./use-table-state-Dju5bxt8.mjs";
|
|
2
2
|
import { n as useTableSelection } from "./use-table-selection-C84z4OZy.mjs";
|
|
3
3
|
import { createTableDef, getMetaEntry, resetMetaCache } from "@atscript/ui";
|
|
4
4
|
import { computed, inject, isRef, ref, shallowRef, watch } from "vue";
|
|
@@ -410,6 +410,7 @@ function useTable(url, opts) {
|
|
|
410
410
|
},
|
|
411
411
|
actions: {
|
|
412
412
|
refreshOnAction: opts?.refreshOnAction,
|
|
413
|
+
resolveHref: opts?.resolveHref,
|
|
413
414
|
onResolved: opts?.onActionResolved
|
|
414
415
|
},
|
|
415
416
|
preset: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as useTableContextOptional } from "./use-table-state-
|
|
1
|
+
import { o as useTableContextOptional } from "./use-table-state-Dju5bxt8.mjs";
|
|
2
2
|
//#region src/composables/use-table-component.ts
|
|
3
3
|
/**
|
|
4
4
|
* Resolve a single skin-slot component from the injected `controls` map,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_use_table_state = require("./use-table-state-
|
|
1
|
+
const require_use_table_state = require("./use-table-state-CElgF_iy.cjs");
|
|
2
2
|
//#region src/composables/use-table-component.ts
|
|
3
3
|
/**
|
|
4
4
|
* Resolve a single skin-slot component from the injected `controls` map,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as useTableContextOptional } from "./use-table-state-
|
|
1
|
+
import { o as useTableContextOptional } from "./use-table-state-Dju5bxt8.mjs";
|
|
2
2
|
//#region src/composables/use-table-nav-bridge.ts
|
|
3
3
|
function isPassthroughKey(event) {
|
|
4
4
|
const key = event.key;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require("@atscript/ui");
|
|
1
|
+
let _atscript_ui = require("@atscript/ui");
|
|
2
2
|
let vue = require("vue");
|
|
3
3
|
let _atscript_ui_table = require("@atscript/ui-table");
|
|
4
4
|
let _atscript_db_client = require("@atscript/db-client");
|
|
@@ -180,6 +180,75 @@ function intentClass(prefix, action) {
|
|
|
180
180
|
return action.intent ? `${prefix}-intent-${action.intent}` : void 0;
|
|
181
181
|
}
|
|
182
182
|
/**
|
|
183
|
+
* `true` for an unmodified main-button click — the only click an anchor-mode
|
|
184
|
+
* navigate action intercepts (preventDefault + SPA invoke path). Modified /
|
|
185
|
+
* middle / right clicks fall through to native anchor behaviour. Mirrors
|
|
186
|
+
* vue-router's `guardEvent`, including the bail on an already-handled event.
|
|
187
|
+
*/
|
|
188
|
+
function isPlainLeftClick(e) {
|
|
189
|
+
return !e.defaultPrevented && e.button === 0 && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey;
|
|
190
|
+
}
|
|
191
|
+
/** `true` for the "open in new tab" chord on a button: cmd/ctrl + main-button click. */
|
|
192
|
+
function isModClick(e) {
|
|
193
|
+
return e.button === 0 && (e.ctrlKey || e.metaKey);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Render-time href for a `processor: 'navigate'` action, mapped through
|
|
197
|
+
* `state.resolveHref`. Returns `undefined` when no link is possible —
|
|
198
|
+
* non-navigate processors, actions with an `inputForm` (the dialog IS the
|
|
199
|
+
* interaction), or a row-level action without a computable identifier — so
|
|
200
|
+
* callers keep the plain button + invoke path. Actions WITH `promptText`
|
|
201
|
+
* still get their href (the button's mod/middle-click new-tab path needs
|
|
202
|
+
* it); whether to render an anchor is the call site's `promptText` check.
|
|
203
|
+
*/
|
|
204
|
+
function actionHref(state, action, id) {
|
|
205
|
+
if (action.processor !== "navigate" || action.inputForm) return void 0;
|
|
206
|
+
const href = (0, _atscript_ui.navigateHrefFor)(action, id, state.tableDef.value?.preferredId ?? []);
|
|
207
|
+
return href === void 0 ? void 0 : state.resolveHref(href);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* "Open in new tab" path for navigate actions: run the action's confirmation
|
|
211
|
+
* (immediate accept when it declares no `promptText`), then hand the already
|
|
212
|
+
* `resolveHref`-mapped `href` to the browser via `window.open`. Never touches
|
|
213
|
+
* `state.actions.invoke` and never reaches the `@action` emit — the browser
|
|
214
|
+
* owns the navigation.
|
|
215
|
+
*/
|
|
216
|
+
async function openNavigateInNewTab(state, action, ctx, href) {
|
|
217
|
+
if (!await confirmAction(state, action, ctx)) return;
|
|
218
|
+
window.open(href, "_blank", "noopener,noreferrer");
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Gesture handler set for the primary trigger (single CTA anchor/button)
|
|
222
|
+
* shared by `<AsRowActions>` and `<AsTableActions>`. Parameterized only by
|
|
223
|
+
* the surface's prompt-context getter and href resolver so the click-dispatch
|
|
224
|
+
* policy — plain left → SPA invoke, cmd/ctrl or middle on a promptText
|
|
225
|
+
* navigate button → confirm → new tab — has a single home.
|
|
226
|
+
*/
|
|
227
|
+
function createNavigateGestures(state, promptCtx, hrefFor) {
|
|
228
|
+
return {
|
|
229
|
+
onTriggerClick(action, href, asLink, event) {
|
|
230
|
+
if (asLink) {
|
|
231
|
+
if (!isPlainLeftClick(event)) return;
|
|
232
|
+
event.preventDefault();
|
|
233
|
+
} else if (href !== void 0 && isModClick(event)) {
|
|
234
|
+
openNavigateInNewTab(state, action, promptCtx(), href);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
triggerAction(state, action, promptCtx(), event);
|
|
238
|
+
},
|
|
239
|
+
onTriggerAuxClick(action, href, asLink, event) {
|
|
240
|
+
if (asLink || href === void 0 || event.button !== 1) return;
|
|
241
|
+
event.preventDefault();
|
|
242
|
+
openNavigateInNewTab(state, action, promptCtx(), href);
|
|
243
|
+
},
|
|
244
|
+
openNewTab(action) {
|
|
245
|
+
const href = hrefFor(action);
|
|
246
|
+
if (href === void 0) return;
|
|
247
|
+
openNavigateInNewTab(state, action, promptCtx(), href);
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
183
252
|
* Run `state.prompt()` if the action declares a `promptText`. Resolves
|
|
184
253
|
* `true` on accept, or `true` immediately when no prompt is needed.
|
|
185
254
|
*
|
|
@@ -1531,6 +1600,7 @@ function createTableState(opts) {
|
|
|
1531
1600
|
selectedRows,
|
|
1532
1601
|
selectedCount,
|
|
1533
1602
|
rowValueFn,
|
|
1603
|
+
resolveHref: opts.actions?.resolveHref ?? ((url) => url),
|
|
1534
1604
|
isPkSelected,
|
|
1535
1605
|
rowDelete,
|
|
1536
1606
|
includeActions,
|
|
@@ -1934,6 +2004,12 @@ Object.defineProperty(exports, "ROW_ACTIONS_TYPE", {
|
|
|
1934
2004
|
return ROW_ACTIONS_TYPE;
|
|
1935
2005
|
}
|
|
1936
2006
|
});
|
|
2007
|
+
Object.defineProperty(exports, "actionHref", {
|
|
2008
|
+
enumerable: true,
|
|
2009
|
+
get: function() {
|
|
2010
|
+
return actionHref;
|
|
2011
|
+
}
|
|
2012
|
+
});
|
|
1937
2013
|
Object.defineProperty(exports, "applyRowGate", {
|
|
1938
2014
|
enumerable: true,
|
|
1939
2015
|
get: function() {
|
|
@@ -1958,6 +2034,12 @@ Object.defineProperty(exports, "collectIdentifiers", {
|
|
|
1958
2034
|
return collectIdentifiers;
|
|
1959
2035
|
}
|
|
1960
2036
|
});
|
|
2037
|
+
Object.defineProperty(exports, "createNavigateGestures", {
|
|
2038
|
+
enumerable: true,
|
|
2039
|
+
get: function() {
|
|
2040
|
+
return createNavigateGestures;
|
|
2041
|
+
}
|
|
2042
|
+
});
|
|
1961
2043
|
Object.defineProperty(exports, "createStaticTableState", {
|
|
1962
2044
|
enumerable: true,
|
|
1963
2045
|
get: function() {
|
|
@@ -1988,6 +2070,18 @@ Object.defineProperty(exports, "intentToScope", {
|
|
|
1988
2070
|
return intentToScope;
|
|
1989
2071
|
}
|
|
1990
2072
|
});
|
|
2073
|
+
Object.defineProperty(exports, "isModClick", {
|
|
2074
|
+
enumerable: true,
|
|
2075
|
+
get: function() {
|
|
2076
|
+
return isModClick;
|
|
2077
|
+
}
|
|
2078
|
+
});
|
|
2079
|
+
Object.defineProperty(exports, "isPlainLeftClick", {
|
|
2080
|
+
enumerable: true,
|
|
2081
|
+
get: function() {
|
|
2082
|
+
return isPlainLeftClick;
|
|
2083
|
+
}
|
|
2084
|
+
});
|
|
1991
2085
|
Object.defineProperty(exports, "provideTableContext", {
|
|
1992
2086
|
enumerable: true,
|
|
1993
2087
|
get: function() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "@atscript/ui";
|
|
1
|
+
import { navigateHrefFor } from "@atscript/ui";
|
|
2
2
|
import { computed, inject, nextTick, onBeforeUnmount, onScopeDispose, provide, ref, shallowRef, toValue, watch } from "vue";
|
|
3
3
|
import { STANDARD_PRESET_ID, blockStartFor, buildTableQuery, debounce, fromWireSnapshot, isDirtyAgainst, isFilled, isSystemPresetId, pageAlignedBlocksFor, planFetch, reconcileColumnWidthDefaults, resolveAspectGate, resolveSystemPresets, sameColumnSet, sortersEqual, stateToUrlQueryString, togglePk, urlQueryStringToState, walkBackwardAbsorb, walkForwardAbsorb } from "@atscript/ui-table";
|
|
4
4
|
import { formatIdentifier } from "@atscript/db-client";
|
|
@@ -180,6 +180,75 @@ function intentClass(prefix, action) {
|
|
|
180
180
|
return action.intent ? `${prefix}-intent-${action.intent}` : void 0;
|
|
181
181
|
}
|
|
182
182
|
/**
|
|
183
|
+
* `true` for an unmodified main-button click — the only click an anchor-mode
|
|
184
|
+
* navigate action intercepts (preventDefault + SPA invoke path). Modified /
|
|
185
|
+
* middle / right clicks fall through to native anchor behaviour. Mirrors
|
|
186
|
+
* vue-router's `guardEvent`, including the bail on an already-handled event.
|
|
187
|
+
*/
|
|
188
|
+
function isPlainLeftClick(e) {
|
|
189
|
+
return !e.defaultPrevented && e.button === 0 && !e.ctrlKey && !e.metaKey && !e.shiftKey && !e.altKey;
|
|
190
|
+
}
|
|
191
|
+
/** `true` for the "open in new tab" chord on a button: cmd/ctrl + main-button click. */
|
|
192
|
+
function isModClick(e) {
|
|
193
|
+
return e.button === 0 && (e.ctrlKey || e.metaKey);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Render-time href for a `processor: 'navigate'` action, mapped through
|
|
197
|
+
* `state.resolveHref`. Returns `undefined` when no link is possible —
|
|
198
|
+
* non-navigate processors, actions with an `inputForm` (the dialog IS the
|
|
199
|
+
* interaction), or a row-level action without a computable identifier — so
|
|
200
|
+
* callers keep the plain button + invoke path. Actions WITH `promptText`
|
|
201
|
+
* still get their href (the button's mod/middle-click new-tab path needs
|
|
202
|
+
* it); whether to render an anchor is the call site's `promptText` check.
|
|
203
|
+
*/
|
|
204
|
+
function actionHref(state, action, id) {
|
|
205
|
+
if (action.processor !== "navigate" || action.inputForm) return void 0;
|
|
206
|
+
const href = navigateHrefFor(action, id, state.tableDef.value?.preferredId ?? []);
|
|
207
|
+
return href === void 0 ? void 0 : state.resolveHref(href);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* "Open in new tab" path for navigate actions: run the action's confirmation
|
|
211
|
+
* (immediate accept when it declares no `promptText`), then hand the already
|
|
212
|
+
* `resolveHref`-mapped `href` to the browser via `window.open`. Never touches
|
|
213
|
+
* `state.actions.invoke` and never reaches the `@action` emit — the browser
|
|
214
|
+
* owns the navigation.
|
|
215
|
+
*/
|
|
216
|
+
async function openNavigateInNewTab(state, action, ctx, href) {
|
|
217
|
+
if (!await confirmAction(state, action, ctx)) return;
|
|
218
|
+
window.open(href, "_blank", "noopener,noreferrer");
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Gesture handler set for the primary trigger (single CTA anchor/button)
|
|
222
|
+
* shared by `<AsRowActions>` and `<AsTableActions>`. Parameterized only by
|
|
223
|
+
* the surface's prompt-context getter and href resolver so the click-dispatch
|
|
224
|
+
* policy — plain left → SPA invoke, cmd/ctrl or middle on a promptText
|
|
225
|
+
* navigate button → confirm → new tab — has a single home.
|
|
226
|
+
*/
|
|
227
|
+
function createNavigateGestures(state, promptCtx, hrefFor) {
|
|
228
|
+
return {
|
|
229
|
+
onTriggerClick(action, href, asLink, event) {
|
|
230
|
+
if (asLink) {
|
|
231
|
+
if (!isPlainLeftClick(event)) return;
|
|
232
|
+
event.preventDefault();
|
|
233
|
+
} else if (href !== void 0 && isModClick(event)) {
|
|
234
|
+
openNavigateInNewTab(state, action, promptCtx(), href);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
triggerAction(state, action, promptCtx(), event);
|
|
238
|
+
},
|
|
239
|
+
onTriggerAuxClick(action, href, asLink, event) {
|
|
240
|
+
if (asLink || href === void 0 || event.button !== 1) return;
|
|
241
|
+
event.preventDefault();
|
|
242
|
+
openNavigateInNewTab(state, action, promptCtx(), href);
|
|
243
|
+
},
|
|
244
|
+
openNewTab(action) {
|
|
245
|
+
const href = hrefFor(action);
|
|
246
|
+
if (href === void 0) return;
|
|
247
|
+
openNavigateInNewTab(state, action, promptCtx(), href);
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
183
252
|
* Run `state.prompt()` if the action declares a `promptText`. Resolves
|
|
184
253
|
* `true` on accept, or `true` immediately when no prompt is needed.
|
|
185
254
|
*
|
|
@@ -1531,6 +1600,7 @@ function createTableState(opts) {
|
|
|
1531
1600
|
selectedRows,
|
|
1532
1601
|
selectedCount,
|
|
1533
1602
|
rowValueFn,
|
|
1603
|
+
resolveHref: opts.actions?.resolveHref ?? ((url) => url),
|
|
1534
1604
|
isPkSelected,
|
|
1535
1605
|
rowDelete,
|
|
1536
1606
|
includeActions,
|
|
@@ -1916,4 +1986,4 @@ function useRegisterMainActionListener(state, listener, enabled) {
|
|
|
1916
1986
|
});
|
|
1917
1987
|
}
|
|
1918
1988
|
//#endregion
|
|
1919
|
-
export {
|
|
1989
|
+
export { isModClick as _, useTableContext as a, ROW_ACTIONS_PATH as b, actionHref as c, ariaLabelFor as d, collectIdentifiers as f, intentToScope as g, intentClass as h, useRegisterMainActionListener as i, applyRowGate as l, extractIdentifier as m, createTableState as n, useTableContextOptional as o, createNavigateGestures as p, provideTableContext as r, DEFAULT_AVAILABLE_ASPECTS as s, createStaticTableState as t, applyRowsGate as u, isPlainLeftClick as v, ROW_ACTIONS_TYPE as x, triggerAction as y };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atscript/vue-table",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.113",
|
|
4
4
|
"description": "Type-driven table components for Atscript with Vue 3",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"atscript",
|
|
@@ -162,9 +162,9 @@
|
|
|
162
162
|
"access": "public"
|
|
163
163
|
},
|
|
164
164
|
"dependencies": {
|
|
165
|
-
"@atscript/ui": "^0.1.
|
|
166
|
-
"@atscript/
|
|
167
|
-
"@atscript/
|
|
165
|
+
"@atscript/ui": "^0.1.113",
|
|
166
|
+
"@atscript/vue-form": "^0.1.113",
|
|
167
|
+
"@atscript/ui-table": "^0.1.113"
|
|
168
168
|
},
|
|
169
169
|
"devDependencies": {
|
|
170
170
|
"@atscript/db-client": "^0.1.111",
|