@xh/hoist 73.0.0-SNAPSHOT.1746476925456 → 73.0.0-SNAPSHOT.1746482507483
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/CHANGELOG.md +15 -3
- package/admin/columns/Rest.ts +0 -1
- package/admin/columns/Tracking.ts +6 -9
- package/admin/tabs/activity/tracking/ActivityTrackingModel.ts +14 -47
- package/admin/tabs/activity/tracking/ActivityTrackingPanel.ts +1 -1
- package/admin/tabs/activity/tracking/detail/ActivityDetailModel.ts +35 -51
- package/admin/tabs/activity/tracking/detail/ActivityDetailView.ts +5 -7
- package/admin/tabs/client/clients/ClientsModel.ts +2 -7
- package/admin/tabs/client/clients/ClientsPanel.ts +2 -3
- package/build/types/admin/tabs/activity/tracking/ActivityTrackingModel.d.ts +2 -7
- package/build/types/admin/tabs/activity/tracking/detail/ActivityDetailModel.d.ts +6 -18
- package/build/types/cmp/grid/Types.d.ts +4 -1
- package/build/types/desktop/cmp/grid/impl/filter/headerfilter/values/ValuesTabModel.d.ts +2 -0
- package/build/types/desktop/cmp/input/DateInput.d.ts +3 -2
- package/build/types/desktop/cmp/input/NumberInput.d.ts +3 -2
- package/build/types/desktop/cmp/input/TextInput.d.ts +3 -2
- package/build/types/mobile/cmp/input/DateInput.d.ts +3 -2
- package/build/types/mobile/cmp/input/NumberInput.d.ts +3 -2
- package/build/types/mobile/cmp/input/SearchInput.d.ts +3 -2
- package/build/types/mobile/cmp/input/TextInput.d.ts +3 -2
- package/cmp/grid/Types.ts +4 -1
- package/cmp/grid/filter/GridFilterModel.ts +1 -1
- package/desktop/cmp/grid/impl/filter/headerfilter/values/ValuesTab.scss +13 -0
- package/desktop/cmp/grid/impl/filter/headerfilter/values/ValuesTab.ts +29 -2
- package/desktop/cmp/grid/impl/filter/headerfilter/values/ValuesTabModel.ts +37 -15
- package/desktop/cmp/input/DateInput.ts +3 -2
- package/desktop/cmp/input/NumberInput.ts +3 -2
- package/desktop/cmp/input/TextInput.ts +3 -2
- package/mobile/cmp/input/DateInput.ts +3 -2
- package/mobile/cmp/input/NumberInput.ts +3 -2
- package/mobile/cmp/input/SearchInput.ts +3 -2
- package/mobile/cmp/input/TextInput.ts +3 -2
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/admin/tabs/client/clients/activity/ClientDetail.scss +0 -24
- package/admin/tabs/client/clients/activity/ClientDetailModel.ts +0 -83
- package/admin/tabs/client/clients/activity/ClientDetailPanel.ts +0 -63
- package/build/types/admin/tabs/client/clients/activity/ClientDetailModel.d.ts +0 -21
- package/build/types/admin/tabs/client/clients/activity/ClientDetailPanel.d.ts +0 -3
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { HoistInputProps } from '@xh/hoist/cmp/input';
|
|
2
|
-
import { HoistProps, StyleProps, LayoutProps,
|
|
2
|
+
import { HoistProps, StyleProps, LayoutProps, PlainObject } from '@xh/hoist/core';
|
|
3
3
|
import '@xh/hoist/mobile/register';
|
|
4
4
|
import { LocalDate } from '@xh/hoist/utils/datetime';
|
|
5
|
+
import type { Property } from 'csstype';
|
|
5
6
|
import './DateInput.scss';
|
|
6
7
|
import { ReactElement } from 'react';
|
|
7
8
|
export interface DateInputProps extends HoistProps, HoistInputProps, StyleProps, LayoutProps {
|
|
@@ -43,7 +44,7 @@ export interface DateInputProps extends HoistProps, HoistInputProps, StyleProps,
|
|
|
43
44
|
/** Props passed to SingleDatePicker component, as per SingleDatePicker docs. */
|
|
44
45
|
singleDatePickerProps?: PlainObject;
|
|
45
46
|
/** Alignment of entry text within control, default 'left'. */
|
|
46
|
-
textAlign?:
|
|
47
|
+
textAlign?: Property.TextAlign;
|
|
47
48
|
/** Type of value to publish. Defaults to 'date'. */
|
|
48
49
|
valueType?: 'date' | 'localDate';
|
|
49
50
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { HoistInputProps } from '@xh/hoist/cmp/input';
|
|
3
|
-
import { HoistProps,
|
|
3
|
+
import { HoistProps, LayoutProps, StyleProps } from '@xh/hoist/core';
|
|
4
4
|
import { NumericPrecision, ZeroPad } from '@xh/hoist/format';
|
|
5
5
|
import '@xh/hoist/mobile/register';
|
|
6
|
+
import type { Property } from 'csstype';
|
|
6
7
|
import './NumberInput.scss';
|
|
7
8
|
export interface NumberInputProps extends HoistProps, HoistInputProps, StyleProps, LayoutProps {
|
|
8
9
|
value?: number;
|
|
@@ -38,7 +39,7 @@ export interface NumberInputProps extends HoistProps, HoistInputProps, StyleProp
|
|
|
38
39
|
/** True to select contents when control receives focus. */
|
|
39
40
|
selectOnFocus?: boolean;
|
|
40
41
|
/** Alignment of entry text within control, default 'right'. */
|
|
41
|
-
textAlign?:
|
|
42
|
+
textAlign?: Property.TextAlign;
|
|
42
43
|
/**
|
|
43
44
|
* Text appended to the rendered value within control when not editing.
|
|
44
45
|
* Can be used to append e.g. "%" or a unit without need for an external right label.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { HoistInputProps } from '@xh/hoist/cmp/input';
|
|
3
|
-
import { HoistProps
|
|
3
|
+
import { HoistProps } from '@xh/hoist/core';
|
|
4
4
|
import '@xh/hoist/mobile/register';
|
|
5
5
|
import './SearchInput.scss';
|
|
6
|
+
import type { Property } from 'csstype';
|
|
6
7
|
export interface SearchInputProps extends HoistProps, HoistInputProps {
|
|
7
8
|
value?: string;
|
|
8
9
|
/** True to commit on every change/keystroke, default false. */
|
|
@@ -16,7 +17,7 @@ export interface SearchInputProps extends HoistProps, HoistInputProps {
|
|
|
16
17
|
/** Whether to allow browser spell check, defaults to false */
|
|
17
18
|
spellCheck?: boolean;
|
|
18
19
|
/** Alignment of entry text within control, default 'left'. */
|
|
19
|
-
textAlign?:
|
|
20
|
+
textAlign?: Property.TextAlign;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
23
|
* A Search Input
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { HoistInputProps } from '@xh/hoist/cmp/input';
|
|
3
|
-
import { HoistProps,
|
|
3
|
+
import { HoistProps, LayoutProps, StyleProps } from '@xh/hoist/core';
|
|
4
4
|
import '@xh/hoist/mobile/register';
|
|
5
|
+
import type { Property } from 'csstype';
|
|
5
6
|
import './TextInput.scss';
|
|
6
7
|
export interface TextInputProps extends HoistProps, HoistInputProps, StyleProps, LayoutProps {
|
|
7
8
|
value?: string;
|
|
@@ -36,7 +37,7 @@ export interface TextInputProps extends HoistProps, HoistInputProps, StyleProps,
|
|
|
36
37
|
/** Whether to allow browser spell check, defaults to false */
|
|
37
38
|
spellCheck?: boolean;
|
|
38
39
|
/** Alignment of entry text within control, default 'left'. */
|
|
39
|
-
textAlign?:
|
|
40
|
+
textAlign?: Property.TextAlign;
|
|
40
41
|
/** Underlying HTML <input> element type. */
|
|
41
42
|
type?: 'text' | 'password';
|
|
42
43
|
}
|
package/cmp/grid/Types.ts
CHANGED
|
@@ -90,7 +90,10 @@ export interface GridFilterModelConfig {
|
|
|
90
90
|
*/
|
|
91
91
|
bind?: Store | View;
|
|
92
92
|
|
|
93
|
-
/**
|
|
93
|
+
/**
|
|
94
|
+
* True to update filters immediately after each change made in the column-based filter UI.
|
|
95
|
+
* Defaults to False.
|
|
96
|
+
*/
|
|
94
97
|
commitOnChange?: boolean;
|
|
95
98
|
|
|
96
99
|
/**
|
|
@@ -46,7 +46,7 @@ export class GridFilterModel extends HoistModel {
|
|
|
46
46
|
static BLANK_PLACEHOLDER = '[blank]';
|
|
47
47
|
|
|
48
48
|
constructor(
|
|
49
|
-
{bind, commitOnChange =
|
|
49
|
+
{bind, commitOnChange = false, fieldSpecs, fieldSpecDefaults}: GridFilterModelConfig,
|
|
50
50
|
gridModel: GridModel
|
|
51
51
|
) {
|
|
52
52
|
super();
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
.xh-values-filter-tab {
|
|
2
|
+
.store-filter-header {
|
|
3
|
+
padding: 5px 7px;
|
|
4
|
+
border-bottom: 1px solid var(--xh-grid-header-border-color);
|
|
5
|
+
row-gap: 5px;
|
|
6
|
+
.bp5-control-indicator {
|
|
7
|
+
font-size: 1em;
|
|
8
|
+
}
|
|
9
|
+
span {
|
|
10
|
+
font-size: var(--xh-grid-compact-header-font-size-px);
|
|
11
|
+
color: var(--xh-grid-header-text-color);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
2
15
|
&__hidden-values-message {
|
|
3
16
|
display: flex;
|
|
4
17
|
padding: var(--xh-pad-half-px);
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
* Copyright © 2025 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
7
|
import {grid} from '@xh/hoist/cmp/grid';
|
|
8
|
-
import {div, placeholder, vframe} from '@xh/hoist/cmp/layout';
|
|
8
|
+
import {div, hframe, placeholder, span, vbox, vframe} from '@xh/hoist/cmp/layout';
|
|
9
9
|
import {storeFilterField} from '@xh/hoist/cmp/store';
|
|
10
10
|
import {hoistCmp, uses} from '@xh/hoist/core';
|
|
11
11
|
import {button} from '@xh/hoist/desktop/cmp/button';
|
|
12
|
+
import {checkbox} from '@xh/hoist/desktop/cmp/input';
|
|
12
13
|
import {panel} from '@xh/hoist/desktop/cmp/panel';
|
|
13
14
|
import {toolbar} from '@xh/hoist/desktop/cmp/toolbar';
|
|
14
15
|
import {Icon} from '@xh/hoist/icon';
|
|
@@ -47,7 +48,33 @@ const tbar = hoistCmp.factory(() => {
|
|
|
47
48
|
const body = hoistCmp.factory<ValuesTabModel>(({model}) => {
|
|
48
49
|
const {isCustomFilter} = model.headerFilterModel;
|
|
49
50
|
if (isCustomFilter) return customFilterPlaceholder();
|
|
50
|
-
return vframe(grid(), hiddenValuesMessage());
|
|
51
|
+
return vframe(storeFilterSelect(), grid(), hiddenValuesMessage());
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
const storeFilterSelect = hoistCmp.factory<ValuesTabModel>(({model}) => {
|
|
55
|
+
const {gridModel, allVisibleRecsChecked, filterText, headerFilterModel} = model,
|
|
56
|
+
{store} = gridModel;
|
|
57
|
+
return vbox({
|
|
58
|
+
className: 'store-filter-header',
|
|
59
|
+
items: [
|
|
60
|
+
hframe(
|
|
61
|
+
checkbox({
|
|
62
|
+
disabled: store.empty,
|
|
63
|
+
displayUnsetState: true,
|
|
64
|
+
value: allVisibleRecsChecked,
|
|
65
|
+
onChange: () => model.toggleAllRecsChecked()
|
|
66
|
+
}),
|
|
67
|
+
span(`(Select All${filterText ? ' Search Results' : ''})`)
|
|
68
|
+
),
|
|
69
|
+
hframe({
|
|
70
|
+
omit: !filterText || store.empty || headerFilterModel.commitOnChange,
|
|
71
|
+
items: [
|
|
72
|
+
checkbox({bind: 'combineCurrentFilters'}),
|
|
73
|
+
span(`Add current selection to filter`)
|
|
74
|
+
]
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
});
|
|
51
78
|
});
|
|
52
79
|
|
|
53
80
|
const customFilterPlaceholder = hoistCmp.factory<ValuesTabModel>(({model}) => {
|
|
@@ -10,7 +10,7 @@ import {FieldFilterSpec} from '@xh/hoist/data';
|
|
|
10
10
|
import {HeaderFilterModel} from '../HeaderFilterModel';
|
|
11
11
|
import {checkbox} from '@xh/hoist/desktop/cmp/input';
|
|
12
12
|
import {action, bindable, computed, makeObservable, observable} from '@xh/hoist/mobx';
|
|
13
|
-
import {castArray, difference, isEmpty, partition, uniq, without} from 'lodash';
|
|
13
|
+
import {castArray, difference, flatten, isEmpty, map, partition, uniq, without} from 'lodash';
|
|
14
14
|
|
|
15
15
|
export class ValuesTabModel extends HoistModel {
|
|
16
16
|
override xhImpl = true;
|
|
@@ -26,6 +26,12 @@ export class ValuesTabModel extends HoistModel {
|
|
|
26
26
|
/** Bound search term for `StoreFilterField` */
|
|
27
27
|
@bindable filterText: string = null;
|
|
28
28
|
|
|
29
|
+
/*
|
|
30
|
+
* Available only when commit on change is false merge
|
|
31
|
+
* current filter with pendingValues on commit
|
|
32
|
+
*/
|
|
33
|
+
@bindable combineCurrentFilters: boolean = false;
|
|
34
|
+
|
|
29
35
|
/** FieldFilter output by this model. */
|
|
30
36
|
@computed.struct
|
|
31
37
|
get filter(): FieldFilterSpec {
|
|
@@ -81,11 +87,18 @@ export class ValuesTabModel extends HoistModel {
|
|
|
81
87
|
this.headerFilterModel = headerFilterModel;
|
|
82
88
|
this.gridModel = this.createGridModel();
|
|
83
89
|
|
|
84
|
-
this.addReaction(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
90
|
+
this.addReaction(
|
|
91
|
+
{
|
|
92
|
+
track: () => this.pendingValues,
|
|
93
|
+
run: () => this.syncGrid(),
|
|
94
|
+
fireImmediately: true
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
track: () => [this.filterText, this.combineCurrentFilters],
|
|
98
|
+
run: () => this.setPendingValues(),
|
|
99
|
+
debounce: 300
|
|
100
|
+
}
|
|
101
|
+
);
|
|
89
102
|
}
|
|
90
103
|
|
|
91
104
|
syncWithFilter() {
|
|
@@ -115,6 +128,23 @@ export class ValuesTabModel extends HoistModel {
|
|
|
115
128
|
//-------------------
|
|
116
129
|
// Implementation
|
|
117
130
|
//-------------------
|
|
131
|
+
@action
|
|
132
|
+
setPendingValues() {
|
|
133
|
+
if (!this.filterText) {
|
|
134
|
+
this.doSyncWithFilter();
|
|
135
|
+
this.syncGrid();
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const {records} = this.gridModel.store,
|
|
140
|
+
currentFilterValues = flatten(map(this.columnFilters, 'value')),
|
|
141
|
+
values = map(records, it => it.get('value'));
|
|
142
|
+
|
|
143
|
+
this.pendingValues = uniq(
|
|
144
|
+
this.combineCurrentFilters ? [...currentFilterValues, ...values] : values
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
118
148
|
private getFilter() {
|
|
119
149
|
const {gridFilterModel, pendingValues, values, valueCount, field} = this,
|
|
120
150
|
included = pendingValues.map(it => gridFilterModel.fromDisplayValue(it)),
|
|
@@ -217,17 +247,10 @@ export class ValuesTabModel extends HoistModel {
|
|
|
217
247
|
onRowClicked: ({data: record}) => {
|
|
218
248
|
this.setRecsChecked(!record.get('isChecked'), record.get('value'));
|
|
219
249
|
},
|
|
250
|
+
hideHeaders: true,
|
|
220
251
|
columns: [
|
|
221
252
|
{
|
|
222
253
|
field: 'isChecked',
|
|
223
|
-
headerName: ({gridModel}) => {
|
|
224
|
-
return checkbox({
|
|
225
|
-
disabled: gridModel.store.empty,
|
|
226
|
-
displayUnsetState: true,
|
|
227
|
-
value: this.allVisibleRecsChecked,
|
|
228
|
-
onChange: () => this.toggleAllRecsChecked()
|
|
229
|
-
});
|
|
230
|
-
},
|
|
231
254
|
width: 28,
|
|
232
255
|
autosizable: false,
|
|
233
256
|
pinned: true,
|
|
@@ -245,7 +268,6 @@ export class ValuesTabModel extends HoistModel {
|
|
|
245
268
|
},
|
|
246
269
|
{
|
|
247
270
|
field: 'value',
|
|
248
|
-
displayName: '(Select All)',
|
|
249
271
|
align: 'left',
|
|
250
272
|
comparator: (v1, v2, sortDir, abs, {defaultComparator}) => {
|
|
251
273
|
const mul = sortDir === 'desc' ? -1 : 1;
|
|
@@ -9,7 +9,7 @@ import {TimePickerProps} from '@blueprintjs/datetime';
|
|
|
9
9
|
import {ReactDayPickerSingleProps} from '@blueprintjs/datetime2/src/common/reactDayPickerProps';
|
|
10
10
|
import {HoistInputModel, HoistInputProps, useHoistInputModel} from '@xh/hoist/cmp/input';
|
|
11
11
|
import {div, hbox} from '@xh/hoist/cmp/layout';
|
|
12
|
-
import {hoistCmp, HoistProps,
|
|
12
|
+
import {hoistCmp, HoistProps, LayoutProps, Some} from '@xh/hoist/core';
|
|
13
13
|
import {button} from '@xh/hoist/desktop/cmp/button';
|
|
14
14
|
import {textInput, TextInputModel} from '@xh/hoist/desktop/cmp/input';
|
|
15
15
|
import '@xh/hoist/desktop/register';
|
|
@@ -22,6 +22,7 @@ import {isLocalDate, LocalDate} from '@xh/hoist/utils/datetime';
|
|
|
22
22
|
import {consumeEvent, getTestId, withDefault} from '@xh/hoist/utils/js';
|
|
23
23
|
import {getLayoutProps} from '@xh/hoist/utils/react';
|
|
24
24
|
import classNames from 'classnames';
|
|
25
|
+
import type {Property} from 'csstype';
|
|
25
26
|
import {assign, castArray, clone, isEmpty, trim} from 'lodash';
|
|
26
27
|
import moment from 'moment';
|
|
27
28
|
import {createRef, ReactElement, ReactNode} from 'react';
|
|
@@ -128,7 +129,7 @@ export interface DateInputProps extends HoistProps, LayoutProps, HoistInputProps
|
|
|
128
129
|
strictInputParsing?: boolean;
|
|
129
130
|
|
|
130
131
|
/** Alignment of entry text within control, default 'left'. */
|
|
131
|
-
textAlign?:
|
|
132
|
+
textAlign?: Property.TextAlign;
|
|
132
133
|
|
|
133
134
|
/**
|
|
134
135
|
* Props passed to the TimePicker, as per Blueprint docs.
|
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import composeRefs from '@seznam/compose-react-refs';
|
|
8
8
|
import {HoistInputModel, HoistInputProps, useHoistInputModel} from '@xh/hoist/cmp/input';
|
|
9
|
-
import {hoistCmp, HoistProps,
|
|
9
|
+
import {hoistCmp, HoistProps, LayoutProps, StyleProps} from '@xh/hoist/core';
|
|
10
10
|
import '@xh/hoist/desktop/register';
|
|
11
11
|
import {fmtNumber, NumericPrecision, parseNumber, Precision, ZeroPad} from '@xh/hoist/format';
|
|
12
12
|
import {numericInput} from '@xh/hoist/kit/blueprint';
|
|
13
13
|
import {wait} from '@xh/hoist/promise';
|
|
14
14
|
import {TEST_ID, throwIf, withDefault} from '@xh/hoist/utils/js';
|
|
15
15
|
import {getLayoutProps} from '@xh/hoist/utils/react';
|
|
16
|
+
import type {Property} from 'csstype';
|
|
16
17
|
import {debounce, isNaN, isNil, isNumber, round} from 'lodash';
|
|
17
18
|
import {KeyboardEventHandler, ReactElement, ReactNode, Ref, useLayoutEffect} from 'react';
|
|
18
19
|
|
|
@@ -82,7 +83,7 @@ export interface NumberInputProps extends HoistProps, LayoutProps, StyleProps, H
|
|
|
82
83
|
stepSize?: number;
|
|
83
84
|
|
|
84
85
|
/** Alignment of entry text within control, default 'right'. */
|
|
85
|
-
textAlign?:
|
|
86
|
+
textAlign?: Property.TextAlign;
|
|
86
87
|
|
|
87
88
|
/**
|
|
88
89
|
* Text appended to the rendered value within control when not editing.
|
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
import composeRefs from '@seznam/compose-react-refs';
|
|
8
8
|
import {HoistInputModel, HoistInputProps, useHoistInputModel} from '@xh/hoist/cmp/input';
|
|
9
9
|
import {div} from '@xh/hoist/cmp/layout';
|
|
10
|
-
import {hoistCmp, HoistProps,
|
|
10
|
+
import {hoistCmp, HoistProps, LayoutProps, StyleProps} from '@xh/hoist/core';
|
|
11
11
|
import {button} from '@xh/hoist/desktop/cmp/button';
|
|
12
12
|
import '@xh/hoist/desktop/register';
|
|
13
13
|
import {Icon} from '@xh/hoist/icon';
|
|
14
14
|
import {inputGroup} from '@xh/hoist/kit/blueprint';
|
|
15
15
|
import {getTestId, TEST_ID, withDefault} from '@xh/hoist/utils/js';
|
|
16
16
|
import {getLayoutProps} from '@xh/hoist/utils/react';
|
|
17
|
+
import type {Property} from 'csstype';
|
|
17
18
|
import {isEmpty} from 'lodash';
|
|
18
19
|
import {FocusEvent, KeyboardEventHandler, ReactElement, ReactNode, Ref} from 'react';
|
|
19
20
|
|
|
@@ -63,7 +64,7 @@ export interface TextInputProps extends HoistProps, HoistInputProps, LayoutProps
|
|
|
63
64
|
selectOnFocus?: boolean;
|
|
64
65
|
|
|
65
66
|
/** Alignment of entry text within control, default 'left'. */
|
|
66
|
-
textAlign?:
|
|
67
|
+
textAlign?: Property.TextAlign;
|
|
67
68
|
|
|
68
69
|
/** True to allow browser spell check, default false. */
|
|
69
70
|
spellCheck?: boolean;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import {HoistInputModel, HoistInputProps, useHoistInputModel} from '@xh/hoist/cmp/input';
|
|
8
8
|
import {div} from '@xh/hoist/cmp/layout';
|
|
9
|
-
import {hoistCmp, HoistProps, StyleProps, LayoutProps,
|
|
9
|
+
import {hoistCmp, HoistProps, StyleProps, LayoutProps, PlainObject} from '@xh/hoist/core';
|
|
10
10
|
import {fmtDate} from '@xh/hoist/format';
|
|
11
11
|
import {Icon} from '@xh/hoist/icon';
|
|
12
12
|
import {singleDatePicker} from '@xh/hoist/kit/react-dates';
|
|
@@ -15,6 +15,7 @@ import {action, makeObservable, observable} from '@xh/hoist/mobx';
|
|
|
15
15
|
import {isLocalDate, LocalDate} from '@xh/hoist/utils/datetime';
|
|
16
16
|
import {withDefault} from '@xh/hoist/utils/js';
|
|
17
17
|
import {getLayoutProps} from '@xh/hoist/utils/react';
|
|
18
|
+
import type {Property} from 'csstype';
|
|
18
19
|
import moment from 'moment';
|
|
19
20
|
import './DateInput.scss';
|
|
20
21
|
import {ReactElement} from 'react';
|
|
@@ -68,7 +69,7 @@ export interface DateInputProps extends HoistProps, HoistInputProps, StyleProps,
|
|
|
68
69
|
singleDatePickerProps?: PlainObject;
|
|
69
70
|
|
|
70
71
|
/** Alignment of entry text within control, default 'left'. */
|
|
71
|
-
textAlign?:
|
|
72
|
+
textAlign?: Property.TextAlign;
|
|
72
73
|
|
|
73
74
|
/** Type of value to publish. Defaults to 'date'. */
|
|
74
75
|
valueType?: 'date' | 'localDate';
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
* Copyright © 2025 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
7
|
import {HoistInputModel, HoistInputProps, useHoistInputModel} from '@xh/hoist/cmp/input';
|
|
8
|
-
import {hoistCmp, HoistProps,
|
|
8
|
+
import {hoistCmp, HoistProps, LayoutProps, StyleProps} from '@xh/hoist/core';
|
|
9
9
|
import {fmtNumber, NumericPrecision, Precision, ZeroPad} from '@xh/hoist/format';
|
|
10
10
|
import {input} from '@xh/hoist/kit/onsen';
|
|
11
11
|
import '@xh/hoist/mobile/register';
|
|
12
12
|
import {wait} from '@xh/hoist/promise';
|
|
13
13
|
import {throwIf, withDefault} from '@xh/hoist/utils/js';
|
|
14
14
|
import {getLayoutProps} from '@xh/hoist/utils/react';
|
|
15
|
+
import type {Property} from 'csstype';
|
|
15
16
|
import {debounce, isNaN, isNil, isNumber, round} from 'lodash';
|
|
16
17
|
import './NumberInput.scss';
|
|
17
18
|
|
|
@@ -60,7 +61,7 @@ export interface NumberInputProps extends HoistProps, HoistInputProps, StyleProp
|
|
|
60
61
|
selectOnFocus?: boolean;
|
|
61
62
|
|
|
62
63
|
/** Alignment of entry text within control, default 'right'. */
|
|
63
|
-
textAlign?:
|
|
64
|
+
textAlign?: Property.TextAlign;
|
|
64
65
|
|
|
65
66
|
/**
|
|
66
67
|
* Text appended to the rendered value within control when not editing.
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
* Copyright © 2025 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
7
|
import {HoistInputModel, HoistInputProps, useHoistInputModel} from '@xh/hoist/cmp/input';
|
|
8
|
-
import {hoistCmp, HoistProps
|
|
8
|
+
import {hoistCmp, HoistProps} from '@xh/hoist/core';
|
|
9
9
|
import {searchInput as onsenSearchInput} from '@xh/hoist/kit/onsen';
|
|
10
10
|
import '@xh/hoist/mobile/register';
|
|
11
11
|
import {withDefault} from '@xh/hoist/utils/js';
|
|
12
12
|
import {getLayoutProps} from '@xh/hoist/utils/react';
|
|
13
13
|
import './SearchInput.scss';
|
|
14
|
+
import type {Property} from 'csstype';
|
|
14
15
|
|
|
15
16
|
export interface SearchInputProps extends HoistProps, HoistInputProps {
|
|
16
17
|
value?: string;
|
|
@@ -31,7 +32,7 @@ export interface SearchInputProps extends HoistProps, HoistInputProps {
|
|
|
31
32
|
spellCheck?: boolean;
|
|
32
33
|
|
|
33
34
|
/** Alignment of entry text within control, default 'left'. */
|
|
34
|
-
textAlign?:
|
|
35
|
+
textAlign?: Property.TextAlign;
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
/**
|
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import {HoistInputModel, HoistInputProps, useHoistInputModel} from '@xh/hoist/cmp/input';
|
|
8
8
|
import {hbox} from '@xh/hoist/cmp/layout';
|
|
9
|
-
import {hoistCmp, HoistProps,
|
|
9
|
+
import {hoistCmp, HoistProps, LayoutProps, StyleProps} from '@xh/hoist/core';
|
|
10
10
|
import {Icon} from '@xh/hoist/icon';
|
|
11
11
|
import {input} from '@xh/hoist/kit/onsen';
|
|
12
12
|
import {button} from '@xh/hoist/mobile/cmp/button';
|
|
13
13
|
import '@xh/hoist/mobile/register';
|
|
14
14
|
import {withDefault} from '@xh/hoist/utils/js';
|
|
15
15
|
import {getLayoutProps} from '@xh/hoist/utils/react';
|
|
16
|
+
import type {Property} from 'csstype';
|
|
16
17
|
import {isEmpty} from 'lodash';
|
|
17
18
|
import './TextInput.scss';
|
|
18
19
|
|
|
@@ -58,7 +59,7 @@ export interface TextInputProps extends HoistProps, HoistInputProps, StyleProps,
|
|
|
58
59
|
spellCheck?: boolean;
|
|
59
60
|
|
|
60
61
|
/** Alignment of entry text within control, default 'left'. */
|
|
61
|
-
textAlign?:
|
|
62
|
+
textAlign?: Property.TextAlign;
|
|
62
63
|
|
|
63
64
|
/** Underlying HTML <input> element type. */
|
|
64
65
|
type?: 'text' | 'password';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "73.0.0-SNAPSHOT.
|
|
3
|
+
"version": "73.0.0-SNAPSHOT.1746482507483",
|
|
4
4
|
"description": "Hoist add-on for building and deploying React Applications.",
|
|
5
5
|
"repository": "github:xh/hoist-react",
|
|
6
6
|
"homepage": "https://xh.io",
|