sg-widgets-core 0.2.0 → 0.3.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/dist/{client-B2PCySg9.d.mts → client-CP9sWEVZ.d.mts} +26 -1
- package/dist/{client-BdePDloQ.mjs → client-izKszX7l.mjs} +8 -0
- package/dist/index.d.mts +102 -3
- package/dist/index.mjs +212 -4
- package/dist/mock.d.mts +53 -4
- package/dist/mock.mjs +617 -30
- package/package.json +1 -1
|
@@ -115,6 +115,8 @@ interface RawFieldSchema {
|
|
|
115
115
|
editable: RawProperty<boolean>;
|
|
116
116
|
mandatory: RawProperty<boolean>;
|
|
117
117
|
unique: RawProperty<boolean>;
|
|
118
|
+
/** `editable` here says whether the site may hide the field (056_stock_vs_custom_field). */
|
|
119
|
+
visible?: RawProperty<boolean>;
|
|
118
120
|
properties: Record<string, RawProperty<unknown>>;
|
|
119
121
|
}
|
|
120
122
|
type RawFieldsResponse = {
|
|
@@ -145,6 +147,12 @@ interface FieldSchema {
|
|
|
145
147
|
operators?: Operator[];
|
|
146
148
|
defaultValue?: unknown;
|
|
147
149
|
description?: string;
|
|
150
|
+
/**
|
|
151
|
+
* `visible.editable`: whether the site may hide the field. False is stock and safe to
|
|
152
|
+
* depend on; true is every custom field and a few stock ones, so a strong hint and not
|
|
153
|
+
* a proof. The `sg_` prefix decides nothing (056_stock_vs_custom_field).
|
|
154
|
+
*/
|
|
155
|
+
hideable?: boolean;
|
|
148
156
|
}
|
|
149
157
|
/**
|
|
150
158
|
* Fields the schema types one way and the API answers another, keyed
|
|
@@ -380,6 +388,13 @@ interface EntityRow {
|
|
|
380
388
|
data: EntityRef | EntityRef[] | null;
|
|
381
389
|
}>;
|
|
382
390
|
}
|
|
391
|
+
/** What `read` asks for. */
|
|
392
|
+
interface ReadOptions {
|
|
393
|
+
/** The fields to return. Dotted paths are allowed. */
|
|
394
|
+
fields?: string[];
|
|
395
|
+
/** Read a retired row, which answers 404 otherwise; a live row then answers 404 (get_entity_type_id, 103_batch_delete_revive). */
|
|
396
|
+
retired?: boolean;
|
|
397
|
+
}
|
|
383
398
|
interface SearchResult {
|
|
384
399
|
data: EntityRow[];
|
|
385
400
|
/** True when another page exists. Computed from data length, not `links.next`, which is emitted on empty pages too (probe 006). */
|
|
@@ -639,6 +654,15 @@ interface SgClient {
|
|
|
639
654
|
*/
|
|
640
655
|
fieldWithProject(entityType: string, field: string, projectId: number): Promise<FieldSchema>;
|
|
641
656
|
search(entityType: string, options: SearchOptions): Promise<SearchResult>;
|
|
657
|
+
/**
|
|
658
|
+
* One row by id, in the `_search` row shape.
|
|
659
|
+
*
|
|
660
|
+
* A row that is not there rejects 404 code 104, and a retired row answers the same
|
|
661
|
+
* 404 unless read with `retired`: only that second read tells the two apart
|
|
662
|
+
* (get_entity_type_id). A batch create with no `project` answers an id this read
|
|
663
|
+
* never reaches (recipes/002).
|
|
664
|
+
*/
|
|
665
|
+
read(entityType: string, id: number, options?: ReadOptions): Promise<EntityRow>;
|
|
642
666
|
/**
|
|
643
667
|
* Free-text search across several types at once. Every word must match, each as
|
|
644
668
|
* a case-insensitive substring of the row's name or of the linked row's name
|
|
@@ -796,6 +820,7 @@ declare class RestClient implements SgClient {
|
|
|
796
820
|
fields(entityType: string, projectId?: number): Promise<Record<string, FieldSchema>>;
|
|
797
821
|
fieldWithProject(entityType: string, field: string, projectId: number): Promise<FieldSchema>;
|
|
798
822
|
search(entityType: string, options: SearchOptions): Promise<SearchResult>;
|
|
823
|
+
read(entityType: string, id: number, options?: ReadOptions): Promise<EntityRow>;
|
|
799
824
|
textSearch(text: string, entityTypes: Record<string, TextSearchFilter>, page?: {
|
|
800
825
|
size?: number;
|
|
801
826
|
number?: number;
|
|
@@ -817,4 +842,4 @@ declare class RestClient implements SgClient {
|
|
|
817
842
|
/** One `_search` row of `EventLogEntry`, with `meta` decoded as the API returns it. */
|
|
818
843
|
declare function normalizeEventLogEntry(row: EntityRow): EventLogEntry;
|
|
819
844
|
//#endregion
|
|
820
|
-
export {
|
|
845
|
+
export { NATIVE_STATUSES as $, ValueShape as $t, ThreadRow as A, Scalar as At, StatusIcon as B, referencedPaths as Bt, SummarizeResult as C, undeclaredField as Ct, SummaryType as D, FilterGroup as Dt, SummaryGrouping as E, FilterCondition as Et, hierarchyEntity as F, emptyFilter as Ft, intersectStatuses as G, DataType as Gt, StatusPaint as H, toFilterArray as Ht, normalizeEventLogEntry as I, fromWire as It, rgbToCss as J, OPERATORS_BY_TYPE as Jt, parseBgColor as K, NEGATING_OPERATORS as Kt, normalizeHierarchyNode as L, group as Lt, UploadResult as M, WireCondition as Mt, batchResults as N, WireGroup as Nt, TextSearchRow as O, FilterNode as Ot, eventLogFilters as P, condition as Pt, usableStatuses as Q, VALUE_SHAPE as Qt, Rgb as R, isBlankCondition as Rt, SummarizeOptions as S, statusFieldNameFor as St, SummaryGroup as T, EntityRef as Tt, StatusRecord as U, walk as Ut, StatusOption as V, toApi3Hash as Vt, foregroundFor as W, DATA_TYPES as Wt, statusLabel as X, TIME_UNITS as Xt, statusGlyph as Y, Operator as Yt, statusPaint as Z, TimeUnit as Zt, RestClientOptions as _, displayNameOf as _t, EntityTypeInfo as a, isTemporalType as an, SpriteCell as at, SgApiError as b, normalizeFields as bt, EventLogResult as c, nativeStatus as ct, HierarchyPath as d, DISPLAY_NAME_FIELDS as dt, isDataType as en, NativeStatus as et, HierarchyRef as f, FIELD_SCHEMA_OVERRIDES as ft, RestClient as g, RawProperty as gt, ReadOptions as h, RawFieldsResponse as ht, EntityRow as i, isOperator as in, STOCK_SPRITE_PATH as it, UploadFile as j, TextSearchFilter as jt, ThreadAuthor as k, LogicalOperator as kt, FollowingOptions as l, spriteStyle as lt, RawHierarchyNode as m, RawFieldSchema as mt, BatchResult as n, isLinkType as nn, STOCK_ICON_DATA_URLS as nt, EventLogEntry as o, operatorsFor as on, StockIconSource as ot, RawBatchRow as p, FieldSchema as pt, relativeLuminance as q, OPERATORS as qt, EVENT_LOG_FIELDS as r, isNumericType as rn, STOCK_ICON_KEYS as rt, EventLogOptions as s, supportsOperator as sn, isNativeStatus as st, BatchRequest as t, isFilterable as tn, STOCK_ICON_CELLS as tt, HierarchyNode as u, stockIconSource as ut, SearchOptions as v, fieldSchemaOverride as vt, SummaryField as w, ConditionValue as wt, SgClient as x, statusFieldFor as xt, SearchResult as y, normalizeField as yt, StatusGlyph as z, isEmptyFilter as zt };
|
|
@@ -452,6 +452,7 @@ function normalizeField(name, raw) {
|
|
|
452
452
|
if (defaultValue !== void 0) field.defaultValue = defaultValue;
|
|
453
453
|
const description = prop(props, "description");
|
|
454
454
|
if (description) field.description = description;
|
|
455
|
+
if (raw.visible) field.hideable = raw.visible.editable;
|
|
455
456
|
return {
|
|
456
457
|
...field,
|
|
457
458
|
...fieldSchemaOverride(field.entityType, name)
|
|
@@ -760,6 +761,13 @@ var RestClient = class {
|
|
|
760
761
|
hasMore: res.data.length === size
|
|
761
762
|
};
|
|
762
763
|
}
|
|
764
|
+
async read(entityType, id, options = {}) {
|
|
765
|
+
const params = {
|
|
766
|
+
fields: options.fields?.join(","),
|
|
767
|
+
"options[return_only]": options.retired ? "retired" : void 0
|
|
768
|
+
};
|
|
769
|
+
return (await this.request("GET", `/entity/${pluralPath(entityType)}/${id}`, void 0, params)).data;
|
|
770
|
+
}
|
|
763
771
|
async textSearch(text, entityTypes, page) {
|
|
764
772
|
const types = {};
|
|
765
773
|
for (const [t, f] of Object.entries(entityTypes)) types[t] = toHashGroup(f);
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as NATIVE_STATUSES, $t as ValueShape, A as ThreadRow, At as Scalar, B as StatusIcon, Bt as referencedPaths, C as SummarizeResult, Ct as undeclaredField, D as SummaryType, Dt as FilterGroup, E as SummaryGrouping, Et as FilterCondition, F as hierarchyEntity, Ft as emptyFilter, G as intersectStatuses, Gt as DataType, H as StatusPaint, Ht as toFilterArray, I as normalizeEventLogEntry, It as fromWire, J as rgbToCss, Jt as OPERATORS_BY_TYPE, K as parseBgColor, Kt as NEGATING_OPERATORS, L as normalizeHierarchyNode, Lt as group, M as UploadResult, Mt as WireCondition, N as batchResults, Nt as WireGroup, O as TextSearchRow, Ot as FilterNode, P as eventLogFilters, Pt as condition, Q as usableStatuses, Qt as VALUE_SHAPE, R as Rgb, Rt as isBlankCondition, S as SummarizeOptions, St as statusFieldNameFor, T as SummaryGroup, Tt as EntityRef, U as StatusRecord, Ut as walk, V as StatusOption, Vt as toApi3Hash, W as foregroundFor, Wt as DATA_TYPES, X as statusLabel, Xt as TIME_UNITS, Y as statusGlyph, Yt as Operator, Z as statusPaint, Zt as TimeUnit, _ as RestClientOptions, _t as displayNameOf, a as EntityTypeInfo, an as isTemporalType, at as SpriteCell, b as SgApiError, bt as normalizeFields, c as EventLogResult, ct as nativeStatus, d as HierarchyPath, dt as DISPLAY_NAME_FIELDS, en as isDataType, et as NativeStatus, f as HierarchyRef, ft as FIELD_SCHEMA_OVERRIDES, g as RestClient, gt as RawProperty, h as ReadOptions, ht as RawFieldsResponse, i as EntityRow, in as isOperator, it as STOCK_SPRITE_PATH, j as UploadFile, jt as TextSearchFilter, k as ThreadAuthor, kt as LogicalOperator, l as FollowingOptions, lt as spriteStyle, m as RawHierarchyNode, mt as RawFieldSchema, n as BatchResult, nn as isLinkType, nt as STOCK_ICON_DATA_URLS, o as EventLogEntry, on as operatorsFor, ot as StockIconSource, p as RawBatchRow, pt as FieldSchema, q as relativeLuminance, qt as OPERATORS, r as EVENT_LOG_FIELDS, rn as isNumericType, rt as STOCK_ICON_KEYS, s as EventLogOptions, sn as supportsOperator, st as isNativeStatus, t as BatchRequest, tn as isFilterable, tt as STOCK_ICON_CELLS, u as HierarchyNode, ut as stockIconSource, v as SearchOptions, vt as fieldSchemaOverride, w as SummaryField, wt as ConditionValue, x as SgClient, xt as statusFieldFor, y as SearchResult, yt as normalizeField, z as StatusGlyph, zt as isEmptyFilter } from "./client-CP9sWEVZ.mjs";
|
|
2
2
|
//#region src/field-icons.d.ts
|
|
3
3
|
/** The catch-all glyph, used for a data type this build does not know. */
|
|
4
4
|
export declare const DEFAULT_FIELD_ICON = "file-text";
|
|
@@ -1154,6 +1154,11 @@ export interface EntitySource {
|
|
|
1154
1154
|
loadMore(): Promise<void>;
|
|
1155
1155
|
/** Read every page already shown again, keeping the row count. */
|
|
1156
1156
|
refresh(): Promise<void>;
|
|
1157
|
+
/**
|
|
1158
|
+
* Read these paths as well. The rows already shown are read again when one of them
|
|
1159
|
+
* is new, keeping the row count and the total; otherwise nothing is read.
|
|
1160
|
+
*/
|
|
1161
|
+
addFields(paths: readonly string[]): Promise<void>;
|
|
1157
1162
|
setFilters(filters: SourceFilters): Promise<void>;
|
|
1158
1163
|
setSort(sort: SortSpec[]): Promise<void>;
|
|
1159
1164
|
/** Show one page of the set. `pages` mode only. */
|
|
@@ -1766,6 +1771,7 @@ export declare class ProxyClient implements SgClient {
|
|
|
1766
1771
|
fields(entityType: string, projectId?: number): Promise<Record<string, FieldSchema>>;
|
|
1767
1772
|
fieldWithProject(entityType: string, field: string, projectId: number): Promise<FieldSchema>;
|
|
1768
1773
|
search(entityType: string, options: SearchOptions): Promise<SearchResult>;
|
|
1774
|
+
read(entityType: string, id: number, options?: ReadOptions): Promise<EntityRow>;
|
|
1769
1775
|
textSearch(text: string, entityTypes: Record<string, TextSearchFilter>, page?: {
|
|
1770
1776
|
size?: number;
|
|
1771
1777
|
number?: number;
|
|
@@ -1788,7 +1794,7 @@ export declare class ProxyClient implements SgClient {
|
|
|
1788
1794
|
//#endregion
|
|
1789
1795
|
//#region src/proxy-handler.d.ts
|
|
1790
1796
|
/** The methods the protocol carries, one POST each. */
|
|
1791
|
-
export declare const PROXY_METHODS: readonly ['entityTypes', 'fields', 'fieldWithProject', 'search', 'textSearch', 'statuses', 'create', 'update', 'upload', 'hierarchyExpand', 'hierarchySearch', 'summarize', 'threadContents', 'eventLog', 'following', 'delete', 'revive', 'batch'];
|
|
1797
|
+
export declare const PROXY_METHODS: readonly ['entityTypes', 'fields', 'fieldWithProject', 'search', 'read', 'textSearch', 'statuses', 'create', 'update', 'upload', 'hierarchyExpand', 'hierarchySearch', 'summarize', 'threadContents', 'eventLog', 'following', 'delete', 'revive', 'batch'];
|
|
1792
1798
|
export type ProxyMethod = (typeof PROXY_METHODS)[number];
|
|
1793
1799
|
/** An error as it crosses the wire. `ProxyClient` rebuilds an `SgApiError` from it. */
|
|
1794
1800
|
export interface ProxyError {
|
|
@@ -2085,6 +2091,11 @@ export declare function traversalTargets(field: Pick<FieldSchema, 'dataType' | '
|
|
|
2085
2091
|
export declare function deriveFieldOptions(fields: Record<string, FieldSchema>, input: FieldOptionsInput): FieldOption[];
|
|
2086
2092
|
/** Rows matching the search box. */
|
|
2087
2093
|
export declare function searchFieldOptions(options: readonly FieldOption[], query: string): FieldOption[];
|
|
2094
|
+
/**
|
|
2095
|
+
* The labels more than one entry carries, as given, so a list can show what tells them
|
|
2096
|
+
* apart. Case and outer spaces do not count as a difference.
|
|
2097
|
+
*/
|
|
2098
|
+
export declare function repeatedLabels(labels: readonly string[]): Set<string>;
|
|
2088
2099
|
/** The list with `path` appended, or dropped when it is already there. */
|
|
2089
2100
|
export declare function toggleFieldPath(paths: readonly string[], path: string): string[];
|
|
2090
2101
|
/** The list with the entry at `from` moved to `to`. An index off either end leaves the order alone. */
|
|
@@ -2357,6 +2368,94 @@ export declare function collapseStateFrom(state: CollapseState, shut: readonly s
|
|
|
2357
2368
|
/** True when two collapse states shut the same groups. */
|
|
2358
2369
|
export declare function sameCollapse(a: CollapseState, b: CollapseState): boolean;
|
|
2359
2370
|
//#endregion
|
|
2371
|
+
//#region src/selection.d.ts
|
|
2372
|
+
/** Where a range starts and what it is laid over. */
|
|
2373
|
+
export interface SelectionAnchor {
|
|
2374
|
+
/** The row the range runs from, `Type:id`. */
|
|
2375
|
+
key: string;
|
|
2376
|
+
/** True when the range selects, false when it clears: what the anchor row became. */
|
|
2377
|
+
on: boolean;
|
|
2378
|
+
/** The selection the range is laid over. */
|
|
2379
|
+
base: EntityRef[];
|
|
2380
|
+
/** The selection the last step produced. One that no longer reads this has moved under the anchor. */
|
|
2381
|
+
last: EntityRef[];
|
|
2382
|
+
}
|
|
2383
|
+
/** A selection and the anchor the next Shift gesture ranges from. */
|
|
2384
|
+
export interface SelectionStep {
|
|
2385
|
+
selection: EntityRef[];
|
|
2386
|
+
anchor: SelectionAnchor | null;
|
|
2387
|
+
}
|
|
2388
|
+
/** What a press on a row does: toggle it, or range to it. */
|
|
2389
|
+
export type SelectionGesture = 'toggle' | 'range';
|
|
2390
|
+
/** What a key does to the selection. */
|
|
2391
|
+
export type SelectionKeyIntent = 'toggle' | 'extend-up' | 'extend-down' | 'all';
|
|
2392
|
+
interface Modifiers {
|
|
2393
|
+
shiftKey?: boolean;
|
|
2394
|
+
metaKey?: boolean;
|
|
2395
|
+
ctrlKey?: boolean;
|
|
2396
|
+
altKey?: boolean;
|
|
2397
|
+
}
|
|
2398
|
+
/** Shift ranges; a plain press and Cmd or Ctrl both toggle. */
|
|
2399
|
+
export declare function gestureOf(event: Modifiers): SelectionGesture;
|
|
2400
|
+
/** Space toggles, Shift+ArrowUp and Shift+ArrowDown extend, Cmd or Ctrl+A takes every loaded row. */
|
|
2401
|
+
export declare function selectionKeyIntent(event: Modifiers & {
|
|
2402
|
+
key: string;
|
|
2403
|
+
}): SelectionKeyIntent | null;
|
|
2404
|
+
/** `selection` with every ref of `refs` added, or every one of them dropped. */
|
|
2405
|
+
export declare function setRefs(selection: readonly EntityRef[], refs: readonly EntityRef[], on: boolean): EntityRef[];
|
|
2406
|
+
/** Toggle the row at `index` and anchor on it. A disabled row refuses. */
|
|
2407
|
+
export declare function toggleRow(selection: readonly EntityRef[], anchor: SelectionAnchor | null, rows: readonly EntityRow[], index: number, isRowDisabled?: RowDisabledFn | null): SelectionStep;
|
|
2408
|
+
/**
|
|
2409
|
+
* Range from the anchor to the row at `index`, skipping disabled rows.
|
|
2410
|
+
*
|
|
2411
|
+
* With no anchor among the rows, the row pressed is selected and becomes the anchor.
|
|
2412
|
+
*/
|
|
2413
|
+
export declare function extendRange(selection: readonly EntityRef[], anchor: SelectionAnchor | null, rows: readonly EntityRow[], index: number, isRowDisabled?: RowDisabledFn | null): SelectionStep;
|
|
2414
|
+
/**
|
|
2415
|
+
* Shift+arrow: move the far end of the range from row `from` to row `to`. With no
|
|
2416
|
+
* anchor among the rows, the row the cursor leaves becomes one, selecting.
|
|
2417
|
+
*/
|
|
2418
|
+
export declare function extendByStep(selection: readonly EntityRef[], anchor: SelectionAnchor | null, rows: readonly EntityRow[], from: number, to: number, isRowDisabled?: RowDisabledFn | null): SelectionStep;
|
|
2419
|
+
/** What the line offering the whole set reads. */
|
|
2420
|
+
export interface MatchingOffer {
|
|
2421
|
+
show: boolean;
|
|
2422
|
+
/** How many rows the set holds, when something counted it. */
|
|
2423
|
+
total: number | null;
|
|
2424
|
+
}
|
|
2425
|
+
/**
|
|
2426
|
+
* Whether to offer every row the filter matches: once every loaded row is picked and
|
|
2427
|
+
* the set holds more than is loaded, until the selection covers a counted set.
|
|
2428
|
+
*/
|
|
2429
|
+
export declare function matchingOffer(state: {
|
|
2430
|
+
allLoaded: boolean;
|
|
2431
|
+
loaded: number;
|
|
2432
|
+
selected: number;
|
|
2433
|
+
hasMore: boolean;
|
|
2434
|
+
total: number | null;
|
|
2435
|
+
}): MatchingOffer;
|
|
2436
|
+
//#endregion
|
|
2437
|
+
//#region src/column-choice.d.ts
|
|
2438
|
+
/** Where a choice is kept: the caller's key, or one per entity type. */
|
|
2439
|
+
export declare function columnsStorageKey(entityType: string, key?: string | null): string;
|
|
2440
|
+
/** A stored choice as paths. Null for nothing, an empty list, or anything that is not a list of paths. */
|
|
2441
|
+
export declare function parseColumnChoice(raw: string | null | undefined): string[] | null;
|
|
2442
|
+
/** The string a choice is kept as. */
|
|
2443
|
+
export declare function serializeColumnChoice(paths: readonly string[]): string;
|
|
2444
|
+
/** The paths of a column list, in order. */
|
|
2445
|
+
export declare function columnPaths(columns: readonly CollectionColumn[]): string[];
|
|
2446
|
+
/** True when two path lists name the same columns in the same order. */
|
|
2447
|
+
export declare function sameColumnPaths(a: readonly string[], b: readonly string[]): boolean;
|
|
2448
|
+
/** The paths a source with `fields` does not read yet. */
|
|
2449
|
+
export declare function unreadPaths(fields: readonly string[], paths: readonly string[]): string[];
|
|
2450
|
+
/** The known columns in the order `paths` names them. A path none of them carries is dropped. */
|
|
2451
|
+
export declare function arrangeColumns(paths: readonly string[], known: readonly CollectionColumn[]): CollectionColumn[];
|
|
2452
|
+
/**
|
|
2453
|
+
* A choice as columns: the ones already resolved are kept as they are, the rest are
|
|
2454
|
+
* resolved from the schema, and a path the type does not have is skipped, so a
|
|
2455
|
+
* choice kept before a field was removed still opens.
|
|
2456
|
+
*/
|
|
2457
|
+
export declare function resolveColumnChoice(schema: SchemaService, entityType: string, paths: readonly string[], known: readonly CollectionColumn[]): Promise<CollectionColumn[]>;
|
|
2458
|
+
//#endregion
|
|
2360
2459
|
//#region src/entity-card.d.ts
|
|
2361
2460
|
export interface EntityCardOptions {
|
|
2362
2461
|
/** Dotted field paths for the grid, in order. */
|
|
@@ -2726,4 +2825,4 @@ export declare function markOverflow(list: HTMLElement | null | undefined): bool
|
|
|
2726
2825
|
*/
|
|
2727
2826
|
export declare function watchOverflow(list: HTMLElement | null | undefined): () => void;
|
|
2728
2827
|
//#endregion
|
|
2729
|
-
export { BatchRequest, BatchResult, ConditionValue, DATA_TYPES, DISPLAY_NAME_FIELDS, DataType, EVENT_LOG_FIELDS, EntityRef, EntityRow, EntityTypeInfo, EventLogEntry, EventLogOptions, EventLogResult, FIELD_SCHEMA_OVERRIDES, FieldSchema, FilterCondition, FilterGroup, FilterNode, FollowingOptions, HierarchyNode, HierarchyPath, HierarchyRef, LogicalOperator, NATIVE_STATUSES, NEGATING_OPERATORS, NativeStatus, OPERATORS, OPERATORS_BY_TYPE, Operator, RawBatchRow, RawFieldSchema, RawFieldsResponse, RawHierarchyNode, RawProperty, RestClient, RestClientOptions, Rgb, STOCK_ICON_CELLS, STOCK_ICON_DATA_URLS, STOCK_ICON_KEYS, STOCK_SPRITE_PATH, Scalar, SearchOptions, SearchResult, SgApiError, SgClient, SpriteCell, StatusGlyph, StatusIcon, StatusOption, StatusPaint, StatusRecord, StockIconSource, SummarizeOptions, SummarizeResult, SummaryField, SummaryGroup, SummaryGrouping, SummaryType, TIME_UNITS, TextSearchFilter, TextSearchRow, ThreadAuthor, ThreadRow, TimeUnit, UploadFile, UploadResult, VALUE_SHAPE, ValueShape, WireCondition, WireGroup, batchResults, condition, displayNameOf, emptyFilter, eventLogFilters, fieldSchemaOverride, foregroundFor, fromWire, group, hierarchyEntity, intersectStatuses, isBlankCondition, isDataType, isEmptyFilter, isFilterable, isLinkType, isNativeStatus, isNumericType, isOperator, isTemporalType, nativeStatus, normalizeEventLogEntry, normalizeField, normalizeFields, normalizeHierarchyNode, operatorsFor, parseBgColor, referencedPaths, relativeLuminance, rgbToCss, spriteStyle, statusFieldFor, statusFieldNameFor, statusGlyph, statusLabel, statusPaint, stockIconSource, supportsOperator, toApi3Hash, toFilterArray, undeclaredField, usableStatuses, walk };
|
|
2828
|
+
export { BatchRequest, BatchResult, ConditionValue, DATA_TYPES, DISPLAY_NAME_FIELDS, DataType, EVENT_LOG_FIELDS, EntityRef, EntityRow, EntityTypeInfo, EventLogEntry, EventLogOptions, EventLogResult, FIELD_SCHEMA_OVERRIDES, FieldSchema, FilterCondition, FilterGroup, FilterNode, FollowingOptions, HierarchyNode, HierarchyPath, HierarchyRef, LogicalOperator, NATIVE_STATUSES, NEGATING_OPERATORS, NativeStatus, OPERATORS, OPERATORS_BY_TYPE, Operator, RawBatchRow, RawFieldSchema, RawFieldsResponse, RawHierarchyNode, RawProperty, ReadOptions, RestClient, RestClientOptions, Rgb, STOCK_ICON_CELLS, STOCK_ICON_DATA_URLS, STOCK_ICON_KEYS, STOCK_SPRITE_PATH, Scalar, SearchOptions, SearchResult, SgApiError, SgClient, SpriteCell, StatusGlyph, StatusIcon, StatusOption, StatusPaint, StatusRecord, StockIconSource, SummarizeOptions, SummarizeResult, SummaryField, SummaryGroup, SummaryGrouping, SummaryType, TIME_UNITS, TextSearchFilter, TextSearchRow, ThreadAuthor, ThreadRow, TimeUnit, UploadFile, UploadResult, VALUE_SHAPE, ValueShape, WireCondition, WireGroup, batchResults, condition, displayNameOf, emptyFilter, eventLogFilters, fieldSchemaOverride, foregroundFor, fromWire, group, hierarchyEntity, intersectStatuses, isBlankCondition, isDataType, isEmptyFilter, isFilterable, isLinkType, isNativeStatus, isNumericType, isOperator, isTemporalType, nativeStatus, normalizeEventLogEntry, normalizeField, normalizeFields, normalizeHierarchyNode, operatorsFor, parseBgColor, referencedPaths, relativeLuminance, rgbToCss, spriteStyle, statusFieldFor, statusFieldNameFor, statusGlyph, statusLabel, statusPaint, stockIconSource, supportsOperator, toApi3Hash, toFilterArray, undeclaredField, usableStatuses, walk };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as NEGATING_OPERATORS, B as isTemporalType, C as isBlankCondition, D as toFilterArray, E as toApi3Hash, F as isDataType, H as supportsOperator, I as isFilterable, L as isLinkType, M as OPERATORS_BY_TYPE, N as TIME_UNITS, O as walk, P as VALUE_SHAPE, R as isNumericType, S as group, T as referencedPaths, V as operatorsFor, _ as undeclaredField, a as eventLogFilters, b as emptyFilter, c as normalizeHierarchyNode, d as displayNameOf, f as fieldSchemaOverride, g as statusFieldNameFor, h as statusFieldFor, i as batchResults, j as OPERATORS, k as DATA_TYPES, l as DISPLAY_NAME_FIELDS, m as normalizeFields, n as RestClient, o as hierarchyEntity, p as normalizeField, r as SgApiError, s as normalizeEventLogEntry, t as EVENT_LOG_FIELDS, u as FIELD_SCHEMA_OVERRIDES, w as isEmptyFilter, x as fromWire, y as condition, z as isOperator } from "./client-
|
|
1
|
+
import { A as NEGATING_OPERATORS, B as isTemporalType, C as isBlankCondition, D as toFilterArray, E as toApi3Hash, F as isDataType, H as supportsOperator, I as isFilterable, L as isLinkType, M as OPERATORS_BY_TYPE, N as TIME_UNITS, O as walk, P as VALUE_SHAPE, R as isNumericType, S as group, T as referencedPaths, V as operatorsFor, _ as undeclaredField, a as eventLogFilters, b as emptyFilter, c as normalizeHierarchyNode, d as displayNameOf, f as fieldSchemaOverride, g as statusFieldNameFor, h as statusFieldFor, i as batchResults, j as OPERATORS, k as DATA_TYPES, l as DISPLAY_NAME_FIELDS, m as normalizeFields, n as RestClient, o as hierarchyEntity, p as normalizeField, r as SgApiError, s as normalizeEventLogEntry, t as EVENT_LOG_FIELDS, u as FIELD_SCHEMA_OVERRIDES, w as isEmptyFilter, x as fromWire, y as condition, z as isOperator } from "./client-izKszX7l.mjs";
|
|
2
2
|
//#region src/field-icons.ts
|
|
3
3
|
const ICONS = {
|
|
4
4
|
text: "type",
|
|
@@ -3689,6 +3689,7 @@ function createQueryCache(client, options = {}) {
|
|
|
3689
3689
|
}
|
|
3690
3690
|
function invalidateSearches(entityType) {
|
|
3691
3691
|
drop(`search:[${JSON.stringify(entityType)}`);
|
|
3692
|
+
drop(`read:[${JSON.stringify(entityType)}`);
|
|
3692
3693
|
drop("textSearch");
|
|
3693
3694
|
drop(`summarize:[${JSON.stringify(entityType)}`);
|
|
3694
3695
|
}
|
|
@@ -3708,6 +3709,7 @@ function createQueryCache(client, options = {}) {
|
|
|
3708
3709
|
function invalidateAllRows() {
|
|
3709
3710
|
for (const prefix of [
|
|
3710
3711
|
"search",
|
|
3712
|
+
"read",
|
|
3711
3713
|
"textSearch",
|
|
3712
3714
|
"summarize",
|
|
3713
3715
|
"threadContents",
|
|
@@ -3732,6 +3734,13 @@ function createQueryCache(client, options = {}) {
|
|
|
3732
3734
|
search(entityType, searchOptions) {
|
|
3733
3735
|
return run("search", [entityType, searchOptions], () => client.search(entityType, searchOptions));
|
|
3734
3736
|
},
|
|
3737
|
+
read(entityType, id, readOptions) {
|
|
3738
|
+
return run("read", [
|
|
3739
|
+
entityType,
|
|
3740
|
+
id,
|
|
3741
|
+
readOptions ?? null
|
|
3742
|
+
], () => client.read(entityType, id, readOptions));
|
|
3743
|
+
},
|
|
3735
3744
|
textSearch(text, entityTypes, page) {
|
|
3736
3745
|
return run("textSearch", [
|
|
3737
3746
|
text,
|
|
@@ -4710,6 +4719,7 @@ const PROXY_METHODS = [
|
|
|
4710
4719
|
"fields",
|
|
4711
4720
|
"fieldWithProject",
|
|
4712
4721
|
"search",
|
|
4722
|
+
"read",
|
|
4713
4723
|
"textSearch",
|
|
4714
4724
|
"statuses",
|
|
4715
4725
|
"create",
|
|
@@ -4828,6 +4838,7 @@ function call(client, method, p) {
|
|
|
4828
4838
|
case "fields": return client.fields(str(p.entityType, "entityType"), optionalNum(p.projectId, "projectId"));
|
|
4829
4839
|
case "fieldWithProject": return client.fieldWithProject(str(p.entityType, "entityType"), str(p.field, "field"), num(p.projectId, "projectId"));
|
|
4830
4840
|
case "search": return client.search(str(p.entityType, "entityType"), p.options ?? {});
|
|
4841
|
+
case "read": return client.read(str(p.entityType, "entityType"), num(p.id, "id"), p.options ?? {});
|
|
4831
4842
|
case "textSearch": return client.textSearch(str(p.text, "text"), p.entityTypes ?? {}, p.page ?? void 0);
|
|
4832
4843
|
case "statuses": return client.statuses();
|
|
4833
4844
|
case "create": return client.create(str(p.entityType, "entityType"), obj(p.body, "body"));
|
|
@@ -4905,6 +4916,13 @@ var ProxyClient = class {
|
|
|
4905
4916
|
options
|
|
4906
4917
|
});
|
|
4907
4918
|
}
|
|
4919
|
+
read(entityType, id, options = {}) {
|
|
4920
|
+
return this.post("read", {
|
|
4921
|
+
entityType,
|
|
4922
|
+
id,
|
|
4923
|
+
options
|
|
4924
|
+
});
|
|
4925
|
+
}
|
|
4908
4926
|
textSearch(text, entityTypes, page) {
|
|
4909
4927
|
return this.post("textSearch", {
|
|
4910
4928
|
text,
|
|
@@ -5934,6 +5952,16 @@ function searchFieldOptions(options, query) {
|
|
|
5934
5952
|
if (!query.trim()) return [...options];
|
|
5935
5953
|
return options.filter((option) => matchesEveryWord(haystack(option.displayName, option.name, option.dataType), query));
|
|
5936
5954
|
}
|
|
5955
|
+
/**
|
|
5956
|
+
* The labels more than one entry carries, as given, so a list can show what tells them
|
|
5957
|
+
* apart. Case and outer spaces do not count as a difference.
|
|
5958
|
+
*/
|
|
5959
|
+
function repeatedLabels(labels) {
|
|
5960
|
+
const counts = /* @__PURE__ */ new Map();
|
|
5961
|
+
const key = (label) => label.trim().toLowerCase();
|
|
5962
|
+
for (const label of labels) counts.set(key(label), (counts.get(key(label)) ?? 0) + 1);
|
|
5963
|
+
return new Set(labels.filter((label) => (counts.get(key(label)) ?? 0) > 1));
|
|
5964
|
+
}
|
|
5937
5965
|
/** The list with `path` appended, or dropped when it is already there. */
|
|
5938
5966
|
function toggleFieldPath(paths, path) {
|
|
5939
5967
|
return paths.includes(path) ? paths.filter((entry) => entry !== path) : [...paths, path];
|
|
@@ -6475,7 +6503,7 @@ function asError$1(value) {
|
|
|
6475
6503
|
}
|
|
6476
6504
|
function createEntitySource(options) {
|
|
6477
6505
|
const { client, entityType } = options;
|
|
6478
|
-
|
|
6506
|
+
let fields = [.../* @__PURE__ */ new Set(["id", ...options.fields])];
|
|
6479
6507
|
let state = {
|
|
6480
6508
|
rows: [],
|
|
6481
6509
|
status: "idle",
|
|
@@ -6561,7 +6589,9 @@ function createEntitySource(options) {
|
|
|
6561
6589
|
}
|
|
6562
6590
|
const source = {
|
|
6563
6591
|
entityType,
|
|
6564
|
-
fields
|
|
6592
|
+
get fields() {
|
|
6593
|
+
return fields;
|
|
6594
|
+
},
|
|
6565
6595
|
get rows() {
|
|
6566
6596
|
return state.rows;
|
|
6567
6597
|
},
|
|
@@ -6614,6 +6644,15 @@ function createEntitySource(options) {
|
|
|
6614
6644
|
set({ total: null });
|
|
6615
6645
|
return run(() => read(pages, "loading", [], 1));
|
|
6616
6646
|
},
|
|
6647
|
+
addFields(paths) {
|
|
6648
|
+
const added = paths.filter((path) => path && !fields.includes(path));
|
|
6649
|
+
if (added.length === 0) return Promise.resolve();
|
|
6650
|
+
fields = [...fields, ...new Set(added)];
|
|
6651
|
+
if (state.status === "idle") return Promise.resolve();
|
|
6652
|
+
if (state.mode === "pages") return run(() => read(1, "loading", [], state.page));
|
|
6653
|
+
const pages = Math.max(1, Math.ceil(state.rows.length / state.pageSize));
|
|
6654
|
+
return run(() => read(pages, "loading", [], 1));
|
|
6655
|
+
},
|
|
6617
6656
|
setFilters(filters) {
|
|
6618
6657
|
set({ filters: toWireGroup(filters) });
|
|
6619
6658
|
return source.load();
|
|
@@ -7012,6 +7051,175 @@ function sameCollapse(a, b) {
|
|
|
7012
7051
|
return a.all === b.all && sameIds(a.except, b.except);
|
|
7013
7052
|
}
|
|
7014
7053
|
//#endregion
|
|
7054
|
+
//#region src/selection.ts
|
|
7055
|
+
const refOf = (row) => ({
|
|
7056
|
+
type: row.type,
|
|
7057
|
+
id: row.id
|
|
7058
|
+
});
|
|
7059
|
+
/** Shift ranges; a plain press and Cmd or Ctrl both toggle. */
|
|
7060
|
+
function gestureOf(event) {
|
|
7061
|
+
return event.shiftKey ? "range" : "toggle";
|
|
7062
|
+
}
|
|
7063
|
+
/** Space toggles, Shift+ArrowUp and Shift+ArrowDown extend, Cmd or Ctrl+A takes every loaded row. */
|
|
7064
|
+
function selectionKeyIntent(event) {
|
|
7065
|
+
const command = event.metaKey || event.ctrlKey;
|
|
7066
|
+
if (event.key === " " && !command && !event.altKey) return "toggle";
|
|
7067
|
+
if (event.shiftKey && !command && !event.altKey) {
|
|
7068
|
+
if (event.key === "ArrowDown") return "extend-down";
|
|
7069
|
+
if (event.key === "ArrowUp") return "extend-up";
|
|
7070
|
+
}
|
|
7071
|
+
if (command && !event.shiftKey && !event.altKey && event.key.toLowerCase() === "a") return "all";
|
|
7072
|
+
return null;
|
|
7073
|
+
}
|
|
7074
|
+
/** `selection` with every ref of `refs` added, or every one of them dropped. */
|
|
7075
|
+
function setRefs(selection, refs, on) {
|
|
7076
|
+
const named = new Set(refs.map(rowKey));
|
|
7077
|
+
if (!on) return selection.filter((entry) => !named.has(rowKey(entry)));
|
|
7078
|
+
const held = new Set(selection.map(rowKey));
|
|
7079
|
+
return [...selection, ...refs.filter((entry) => !held.has(rowKey(entry))).map((entry) => ({ ...entry }))];
|
|
7080
|
+
}
|
|
7081
|
+
/** Toggle the row at `index` and anchor on it. A disabled row refuses. */
|
|
7082
|
+
function toggleRow(selection, anchor, rows, index, isRowDisabled) {
|
|
7083
|
+
const row = rows[index];
|
|
7084
|
+
if (!row || rowIsDisabled(row, isRowDisabled)) return {
|
|
7085
|
+
selection: [...selection],
|
|
7086
|
+
anchor
|
|
7087
|
+
};
|
|
7088
|
+
const key = rowKey(row);
|
|
7089
|
+
const on = !selection.some((entry) => rowKey(entry) === key);
|
|
7090
|
+
const next = setRefs(selection, [refOf(row)], on);
|
|
7091
|
+
return {
|
|
7092
|
+
selection: next,
|
|
7093
|
+
anchor: {
|
|
7094
|
+
key,
|
|
7095
|
+
on,
|
|
7096
|
+
base: next,
|
|
7097
|
+
last: next
|
|
7098
|
+
}
|
|
7099
|
+
};
|
|
7100
|
+
}
|
|
7101
|
+
/**
|
|
7102
|
+
* Range from the anchor to the row at `index`, skipping disabled rows.
|
|
7103
|
+
*
|
|
7104
|
+
* With no anchor among the rows, the row pressed is selected and becomes the anchor.
|
|
7105
|
+
*/
|
|
7106
|
+
function extendRange(selection, anchor, rows, index, isRowDisabled) {
|
|
7107
|
+
const row = rows[index];
|
|
7108
|
+
if (!row) return {
|
|
7109
|
+
selection: [...selection],
|
|
7110
|
+
anchor
|
|
7111
|
+
};
|
|
7112
|
+
const from = anchor ? rows.findIndex((entry) => rowKey(entry) === anchor.key) : -1;
|
|
7113
|
+
if (!anchor || from < 0) {
|
|
7114
|
+
if (rowIsDisabled(row, isRowDisabled)) return {
|
|
7115
|
+
selection: [...selection],
|
|
7116
|
+
anchor
|
|
7117
|
+
};
|
|
7118
|
+
const next = setRefs(selection, [refOf(row)], true);
|
|
7119
|
+
return {
|
|
7120
|
+
selection: next,
|
|
7121
|
+
anchor: {
|
|
7122
|
+
key: rowKey(row),
|
|
7123
|
+
on: true,
|
|
7124
|
+
base: next,
|
|
7125
|
+
last: next
|
|
7126
|
+
}
|
|
7127
|
+
};
|
|
7128
|
+
}
|
|
7129
|
+
const base = sameRefs(selection, anchor.last) ? anchor.base : [...selection];
|
|
7130
|
+
const [lo, hi] = from <= index ? [from, index] : [index, from];
|
|
7131
|
+
const next = setRefs(base, rows.slice(lo, hi + 1).filter((entry) => !rowIsDisabled(entry, isRowDisabled)).map(refOf), anchor.on);
|
|
7132
|
+
return {
|
|
7133
|
+
selection: next,
|
|
7134
|
+
anchor: {
|
|
7135
|
+
...anchor,
|
|
7136
|
+
base,
|
|
7137
|
+
last: next
|
|
7138
|
+
}
|
|
7139
|
+
};
|
|
7140
|
+
}
|
|
7141
|
+
/**
|
|
7142
|
+
* Shift+arrow: move the far end of the range from row `from` to row `to`. With no
|
|
7143
|
+
* anchor among the rows, the row the cursor leaves becomes one, selecting.
|
|
7144
|
+
*/
|
|
7145
|
+
function extendByStep(selection, anchor, rows, from, to, isRowDisabled) {
|
|
7146
|
+
const start = rows[from];
|
|
7147
|
+
return extendRange(selection, anchor !== null && rows.some((entry) => rowKey(entry) === anchor.key) || !start ? anchor : {
|
|
7148
|
+
key: rowKey(start),
|
|
7149
|
+
on: true,
|
|
7150
|
+
base: [...selection],
|
|
7151
|
+
last: [...selection]
|
|
7152
|
+
}, rows, to, isRowDisabled);
|
|
7153
|
+
}
|
|
7154
|
+
/**
|
|
7155
|
+
* Whether to offer every row the filter matches: once every loaded row is picked and
|
|
7156
|
+
* the set holds more than is loaded, until the selection covers a counted set.
|
|
7157
|
+
*/
|
|
7158
|
+
function matchingOffer(state) {
|
|
7159
|
+
const { allLoaded, loaded, selected, hasMore, total } = state;
|
|
7160
|
+
return {
|
|
7161
|
+
show: allLoaded && (hasMore || total !== null && total > loaded) && !(total !== null && selected >= total),
|
|
7162
|
+
total
|
|
7163
|
+
};
|
|
7164
|
+
}
|
|
7165
|
+
//#endregion
|
|
7166
|
+
//#region src/column-choice.ts
|
|
7167
|
+
const PREFIX = "sg-widgets:columns:";
|
|
7168
|
+
/** Where a choice is kept: the caller's key, or one per entity type. */
|
|
7169
|
+
function columnsStorageKey(entityType, key) {
|
|
7170
|
+
return key ? key : `${PREFIX}${entityType}`;
|
|
7171
|
+
}
|
|
7172
|
+
/** A stored choice as paths. Null for nothing, an empty list, or anything that is not a list of paths. */
|
|
7173
|
+
function parseColumnChoice(raw) {
|
|
7174
|
+
if (!raw) return null;
|
|
7175
|
+
let value;
|
|
7176
|
+
try {
|
|
7177
|
+
value = JSON.parse(raw);
|
|
7178
|
+
} catch {
|
|
7179
|
+
return null;
|
|
7180
|
+
}
|
|
7181
|
+
if (!Array.isArray(value) || !value.every((entry) => typeof entry === "string")) return null;
|
|
7182
|
+
const paths = [...new Set(value.map((entry) => entry.trim()).filter(Boolean))];
|
|
7183
|
+
return paths.length > 0 ? paths : null;
|
|
7184
|
+
}
|
|
7185
|
+
/** The string a choice is kept as. */
|
|
7186
|
+
function serializeColumnChoice(paths) {
|
|
7187
|
+
return JSON.stringify(paths);
|
|
7188
|
+
}
|
|
7189
|
+
/** The paths of a column list, in order. */
|
|
7190
|
+
function columnPaths(columns) {
|
|
7191
|
+
return columns.map((column) => column.path);
|
|
7192
|
+
}
|
|
7193
|
+
/** True when two path lists name the same columns in the same order. */
|
|
7194
|
+
function sameColumnPaths(a, b) {
|
|
7195
|
+
return a.length === b.length && a.every((path, at) => path === b[at]);
|
|
7196
|
+
}
|
|
7197
|
+
/** The paths a source with `fields` does not read yet. */
|
|
7198
|
+
function unreadPaths(fields, paths) {
|
|
7199
|
+
const read = new Set(fields);
|
|
7200
|
+
return paths.filter((path) => !read.has(path));
|
|
7201
|
+
}
|
|
7202
|
+
/** The known columns in the order `paths` names them. A path none of them carries is dropped. */
|
|
7203
|
+
function arrangeColumns(paths, known) {
|
|
7204
|
+
const byPath = /* @__PURE__ */ new Map();
|
|
7205
|
+
for (const column of known) if (!byPath.has(column.path)) byPath.set(column.path, column);
|
|
7206
|
+
return paths.flatMap((path) => {
|
|
7207
|
+
const column = byPath.get(path);
|
|
7208
|
+
return column ? [column] : [];
|
|
7209
|
+
});
|
|
7210
|
+
}
|
|
7211
|
+
/**
|
|
7212
|
+
* A choice as columns: the ones already resolved are kept as they are, the rest are
|
|
7213
|
+
* resolved from the schema, and a path the type does not have is skipped, so a
|
|
7214
|
+
* choice kept before a field was removed still opens.
|
|
7215
|
+
*/
|
|
7216
|
+
async function resolveColumnChoice(schema, entityType, paths, known) {
|
|
7217
|
+
const have = new Set(known.map((column) => column.path));
|
|
7218
|
+
const missing = paths.filter((path) => !have.has(path));
|
|
7219
|
+
const resolved = await Promise.all(missing.map((path) => resolveColumns(schema, entityType, [path]).then((columns) => columns, () => [])));
|
|
7220
|
+
return arrangeColumns(paths, [...known, ...resolved.flat()]);
|
|
7221
|
+
}
|
|
7222
|
+
//#endregion
|
|
7015
7223
|
//#region src/entity-card.ts
|
|
7016
7224
|
const DEFAULT_IMAGE_PATH = "image";
|
|
7017
7225
|
/**
|
|
@@ -7987,4 +8195,4 @@ function watchOverflow(list) {
|
|
|
7987
8195
|
};
|
|
7988
8196
|
}
|
|
7989
8197
|
//#endregion
|
|
7990
|
-
export { AppSessionError, COLOR_SENTINEL, DATA_TYPES, DEFAULT_FIELD_ICON, DISPLAY_NAME_FIELDS, ELLIPSIS_CHIPS, ERROR_LABEL, EVENT_LOG_FIELDS, FIELD_ICON_NAMES, FIELD_SCHEMA_OVERRIDES, FLOAT_PRECISION, HIERARCHY_LEAF_LIMIT, INT32_MAX, INT32_MIN, LOADING_LABEL, NAME_HUES, NATIVE_STATUSES, NEGATING_OPERATORS, NOTHING_CHOSEN_LABEL, NO_MATCH_LABEL, NO_ROWS_LABEL, OPERATORS, OPERATORS_BY_TYPE, OPERATOR_LABELS, OVERFLOW_END_VAR, OVERFLOW_START_VAR, PATH_SEPARATOR, PRESS_WINDOW_MS, PROJECT_PICKER_FIELDS, PROXY_METHODS, ProxyClient, RestClient, SCROLL_THRESHOLD, SEARCHING_LABEL, SEARCH_DEBOUNCE_MS, SEARCH_PAGE_SIZE, SORTABLE_HANDLE_ATTRIBUTE, SORTABLE_ID_ATTRIBUTE, STOCK_ICON_CELLS, STOCK_ICON_DATA_URLS, STOCK_ICON_KEYS, STOCK_SPRITE_PATH, SgApiError, THUMBNAIL_PENDING_PATH, TIME_UNITS, TIME_UNIT_LABELS, TREE_STATUS_FIELDS, UNRESOLVED_PATH_LABEL, USER_PICKER_FIELDS, VALUE_SHAPE, appendAt, applyPreset, asCollapseState, asFilterGroup, base64ToBytes, batchResults, breadcrumb, bytesToBase64, canLoadNext, cellValue, clearableForField, collapseAll, collapseStateFrom, collapsedKeys, collectionBottom, collectionView, colorToHex, condition, conditionArity, conditionList, conditionParts, conditionValues, contextFromClient, countActiveConditions, countConditions, countLine, createEntitySearch, createEntitySource, createProxyHandler, createQueryCache, createSchemaService, createSessionTokenAuth, createSgContext, createSortable, createSortableController, createStatusService, createTree, currentPlatform, currentType, defaultCondition, defaultValueFor, deriveFieldOptions, describeCondition, describeEntityCard, describePaging, displayNameOf, editorKindFor, editorNeedsContext, editorPlacementFor, emptyFilter, emptyValueFor, entityCardFields, entityCardSlot, entityDetailUrl, entityKey, entityTypeOptions, errorText, eventLogFilters, expandAll, facetCounts, facetLists, facetPresets, facetScopes, facetShape, facetValues, facetValuesFromGroups, fieldOperators, fieldPathOf, fieldSchemaOverride, fieldText, fileHref, fileNameFromUrl, filterEntityTypes, filterableFields, findCondition, findFacet, firstEnabledIndex, fitChips, flattenRow, focusChip, foregroundFor, formatCurrency, formatDate, formatDateTime, formatDuration, formatFloat, formatNumberInput, formatPercent, formatTimecode, friendlyFieldPath, fromApiDateTime, fromSortString, fromWire, group, groupKeyText, groupRows, groupRowsKeyed, hasFailedPage, hasMorePage, hierarchyEntity, hierarchyLoader, hierarchySearcher, hydrate, iconNameFor, idsForRefs, imageState, initialsOf, intersectStatuses, isBareRef, isBlankCondition, isCollapsed, isDataType, isEditableType, isEmptyFilter, isEmptyValue, isFilterable, isGroupingRefusal, isHiddenPath, isLinkType, isNativeStatus, isNumericType, isOperator, isParseError, isPinned, isProxyMethod, isSortable, isTemporalType, isValidListValue, isoDay, isoDayParts, listStatus, loadEntityCard, loadsOnArrowDown, markOverflow, matchRuns, matchesEveryWord, measureSortable, mergeFilters, moveAt, moveFieldPath, nameColorIndex, nameHue, nameSearchFilter, nativeStatus, nextEnabledIndex, nodeAt, normalizeEventLogEntry, normalizeField, normalizeFields, normalizeHierarchyNode, normalizeSiteUrl, numberDigits, numberDraft, numberSteps, numberWire, operatorLabel, operatorMenu, operatorsFor, overflowEdges, parseBgColor, parseColorInput, parseDurationInput, parseFloatInput, parseInteger, parseNumberInput, parseTextInput, parseTimecodeInput, parseUrlInput, pathLabel, pathOf, pathRefs, pathTypes, pickerKeyIntent, placeholderName, playSortableFlip, pollAppSession, preferencesOf, prependRecent, presetById, presetIdOf, presetsFor, pressGate, projectOfPath, projectPickerFilters, pruneFilterToFields, queryPlan, reachedEnd, referencedPaths, refsForIds, relativeFrom, relativeLuminance, relativeOperator, relativeValue, relativeWindow, removeAt, renderKindFor, replaceAt, requestAppSession, requestGate, resolveColumns, resolveFieldPathOptions, resolveRowFields, resolveTreeFields, rgbToCss, rowCode, rowFields, rowIdOf, rowIsDisabled, rowKey, rowSecondary, rowSubLabel, rowThumbnail, sameCollapse, sameFilters, sameIds, sameRefs, sameSort, scopeToProject, scrollHighlightedIntoView, searchFieldOptions, searchFieldPathOptions, searchKeyIntent, searchTypeMap, searchView, searchWords, secondaryType, selectableRefs, selectionState, serializeSort, setFacet, setFacetPreset, settleStep, shouldLoadNext, sortableAnnouncements, sortableDropIndex, sortableFields, sortableScrollStep, sortableStride, sourceModeFor, spriteStyle, stateLine, statusFieldFor, statusFieldNameFor, statusGlyph, statusLabel, statusPaint, stepNumber, stockIconSource, storedNumber, subLabelType, summariseSelection, supportsEmpty, supportsOperator, thumbnailField, timeUnitField, timeUnitLabel, timeZoneName, toApi3Hash, toApiDate, toApiDateTime, toApiFloat, toColumn, toFilterArray, toRef, toSearchHit, toSortKeys, toSortSpecs, toSortString, toWireGroup, toggleCollapsed, toggleFieldPath, toggleId, toggleRef, traversalTargets, undeclaredField, unformatNumberInput, urlLink, usableStatuses, userPickerFilters, userPickerSearchFields, userPickerSubLabel, userPickerTypes, userSearchFields, validateCondition, valueArity, valueEditorFor, walk, watchHighlight, watchOverflow, withAddedListValue, withListValue, withRelativeWindow, withSelectedPinned, withoutListValue, withoutPaths };
|
|
8198
|
+
export { AppSessionError, COLOR_SENTINEL, DATA_TYPES, DEFAULT_FIELD_ICON, DISPLAY_NAME_FIELDS, ELLIPSIS_CHIPS, ERROR_LABEL, EVENT_LOG_FIELDS, FIELD_ICON_NAMES, FIELD_SCHEMA_OVERRIDES, FLOAT_PRECISION, HIERARCHY_LEAF_LIMIT, INT32_MAX, INT32_MIN, LOADING_LABEL, NAME_HUES, NATIVE_STATUSES, NEGATING_OPERATORS, NOTHING_CHOSEN_LABEL, NO_MATCH_LABEL, NO_ROWS_LABEL, OPERATORS, OPERATORS_BY_TYPE, OPERATOR_LABELS, OVERFLOW_END_VAR, OVERFLOW_START_VAR, PATH_SEPARATOR, PRESS_WINDOW_MS, PROJECT_PICKER_FIELDS, PROXY_METHODS, ProxyClient, RestClient, SCROLL_THRESHOLD, SEARCHING_LABEL, SEARCH_DEBOUNCE_MS, SEARCH_PAGE_SIZE, SORTABLE_HANDLE_ATTRIBUTE, SORTABLE_ID_ATTRIBUTE, STOCK_ICON_CELLS, STOCK_ICON_DATA_URLS, STOCK_ICON_KEYS, STOCK_SPRITE_PATH, SgApiError, THUMBNAIL_PENDING_PATH, TIME_UNITS, TIME_UNIT_LABELS, TREE_STATUS_FIELDS, UNRESOLVED_PATH_LABEL, USER_PICKER_FIELDS, VALUE_SHAPE, appendAt, applyPreset, arrangeColumns, asCollapseState, asFilterGroup, base64ToBytes, batchResults, breadcrumb, bytesToBase64, canLoadNext, cellValue, clearableForField, collapseAll, collapseStateFrom, collapsedKeys, collectionBottom, collectionView, colorToHex, columnPaths, columnsStorageKey, condition, conditionArity, conditionList, conditionParts, conditionValues, contextFromClient, countActiveConditions, countConditions, countLine, createEntitySearch, createEntitySource, createProxyHandler, createQueryCache, createSchemaService, createSessionTokenAuth, createSgContext, createSortable, createSortableController, createStatusService, createTree, currentPlatform, currentType, defaultCondition, defaultValueFor, deriveFieldOptions, describeCondition, describeEntityCard, describePaging, displayNameOf, editorKindFor, editorNeedsContext, editorPlacementFor, emptyFilter, emptyValueFor, entityCardFields, entityCardSlot, entityDetailUrl, entityKey, entityTypeOptions, errorText, eventLogFilters, expandAll, extendByStep, extendRange, facetCounts, facetLists, facetPresets, facetScopes, facetShape, facetValues, facetValuesFromGroups, fieldOperators, fieldPathOf, fieldSchemaOverride, fieldText, fileHref, fileNameFromUrl, filterEntityTypes, filterableFields, findCondition, findFacet, firstEnabledIndex, fitChips, flattenRow, focusChip, foregroundFor, formatCurrency, formatDate, formatDateTime, formatDuration, formatFloat, formatNumberInput, formatPercent, formatTimecode, friendlyFieldPath, fromApiDateTime, fromSortString, fromWire, gestureOf, group, groupKeyText, groupRows, groupRowsKeyed, hasFailedPage, hasMorePage, hierarchyEntity, hierarchyLoader, hierarchySearcher, hydrate, iconNameFor, idsForRefs, imageState, initialsOf, intersectStatuses, isBareRef, isBlankCondition, isCollapsed, isDataType, isEditableType, isEmptyFilter, isEmptyValue, isFilterable, isGroupingRefusal, isHiddenPath, isLinkType, isNativeStatus, isNumericType, isOperator, isParseError, isPinned, isProxyMethod, isSortable, isTemporalType, isValidListValue, isoDay, isoDayParts, listStatus, loadEntityCard, loadsOnArrowDown, markOverflow, matchRuns, matchesEveryWord, matchingOffer, measureSortable, mergeFilters, moveAt, moveFieldPath, nameColorIndex, nameHue, nameSearchFilter, nativeStatus, nextEnabledIndex, nodeAt, normalizeEventLogEntry, normalizeField, normalizeFields, normalizeHierarchyNode, normalizeSiteUrl, numberDigits, numberDraft, numberSteps, numberWire, operatorLabel, operatorMenu, operatorsFor, overflowEdges, parseBgColor, parseColorInput, parseColumnChoice, parseDurationInput, parseFloatInput, parseInteger, parseNumberInput, parseTextInput, parseTimecodeInput, parseUrlInput, pathLabel, pathOf, pathRefs, pathTypes, pickerKeyIntent, placeholderName, playSortableFlip, pollAppSession, preferencesOf, prependRecent, presetById, presetIdOf, presetsFor, pressGate, projectOfPath, projectPickerFilters, pruneFilterToFields, queryPlan, reachedEnd, referencedPaths, refsForIds, relativeFrom, relativeLuminance, relativeOperator, relativeValue, relativeWindow, removeAt, renderKindFor, repeatedLabels, replaceAt, requestAppSession, requestGate, resolveColumnChoice, resolveColumns, resolveFieldPathOptions, resolveRowFields, resolveTreeFields, rgbToCss, rowCode, rowFields, rowIdOf, rowIsDisabled, rowKey, rowSecondary, rowSubLabel, rowThumbnail, sameCollapse, sameColumnPaths, sameFilters, sameIds, sameRefs, sameSort, scopeToProject, scrollHighlightedIntoView, searchFieldOptions, searchFieldPathOptions, searchKeyIntent, searchTypeMap, searchView, searchWords, secondaryType, selectableRefs, selectionKeyIntent, selectionState, serializeColumnChoice, serializeSort, setFacet, setFacetPreset, setRefs, settleStep, shouldLoadNext, sortableAnnouncements, sortableDropIndex, sortableFields, sortableScrollStep, sortableStride, sourceModeFor, spriteStyle, stateLine, statusFieldFor, statusFieldNameFor, statusGlyph, statusLabel, statusPaint, stepNumber, stockIconSource, storedNumber, subLabelType, summariseSelection, supportsEmpty, supportsOperator, thumbnailField, timeUnitField, timeUnitLabel, timeZoneName, toApi3Hash, toApiDate, toApiDateTime, toApiFloat, toColumn, toFilterArray, toRef, toSearchHit, toSortKeys, toSortSpecs, toSortString, toWireGroup, toggleCollapsed, toggleFieldPath, toggleId, toggleRef, toggleRow, traversalTargets, undeclaredField, unformatNumberInput, unreadPaths, urlLink, usableStatuses, userPickerFilters, userPickerSearchFields, userPickerSubLabel, userPickerTypes, userSearchFields, validateCondition, valueArity, valueEditorFor, walk, watchHighlight, watchOverflow, withAddedListValue, withListValue, withRelativeWindow, withSelectedPinned, withoutListValue, withoutPaths };
|