@xh/hoist 78.0.0-SNAPSHOT.1763398903260 → 78.0.0-SNAPSHOT.1763568169798

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 CHANGED
@@ -2,11 +2,16 @@
2
2
 
3
3
  ## 78.0.0-SNAPSHOT - unreleased
4
4
 
5
+ ### 🎁 New Features
6
+
7
+ * `FieldFilter` implementation expanded to support `not begins` and `not ends` operators.
8
+
5
9
  ### ⚙️ Technical
6
10
 
7
11
  * `FetchService` will recognize variants on the `application/json` content-type when processing
8
12
  failed responses and decoding exceptions - e.g. `application/problem+json`.
9
13
 
14
+
10
15
  ## 77.1.1 - 2025-11-12
11
16
 
12
17
  ### 🎁 New Features
@@ -40,6 +40,7 @@ export declare class ZoneMapperModel extends HoistModel {
40
40
  value: string;
41
41
  label: string;
42
42
  }[];
43
+ get headersAreHidden(): boolean;
43
44
  constructor(config: ZoneMapperConfig);
44
45
  restoreDefaultsAsync(): Promise<void>;
45
46
  open(): void;
@@ -8,7 +8,7 @@ export interface CompoundFilterSpec {
8
8
  /** logical operator 'AND' (default) or 'OR'. */
9
9
  op?: CompoundFilterOperator;
10
10
  }
11
- export type FieldFilterOperator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'like' | 'not like' | 'begins' | 'ends' | 'includes' | 'excludes';
11
+ export type FieldFilterOperator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'like' | 'not like' | 'begins' | 'not begins' | 'ends' | 'not ends' | 'includes' | 'excludes';
12
12
  export interface FieldFilterSpec {
13
13
  /** Name of Field to filter or Field instance. */
14
14
  field: string | Field;
@@ -23,6 +23,6 @@ export declare class CustomRowModel extends HoistModel {
23
23
  get hideInput(): boolean;
24
24
  constructor(parentModel: CustomTabModel, op?: FieldFilterOperator, value?: any);
25
25
  removeRow(): void;
26
- getOperatorLabel(op: FieldFilterOperator): "includes" | "excludes" | "Equals" | "Not equals" | "Greater than" | "Greater than or equals" | "Less than" | "Less than or equals" | "Like" | "Not like" | "Begins with" | "Ends with";
26
+ getOperatorLabel(op: FieldFilterOperator): "includes" | "not begins" | "not ends" | "excludes" | "Equals" | "Not equals" | "Greater than" | "Greater than or equals" | "Less than" | "Less than or equals" | "Like" | "Not like" | "Begins with" | "Ends with";
27
27
  }
28
28
  export {};
@@ -93,6 +93,10 @@ export class ZoneMapperModel extends HoistModel {
93
93
  });
94
94
  }
95
95
 
96
+ get headersAreHidden(): boolean {
97
+ return this.zoneGridModel.gridModel.hideHeaders;
98
+ }
99
+
96
100
  constructor(config: ZoneMapperConfig) {
97
101
  super();
98
102
  makeObservable(this);
@@ -54,7 +54,9 @@ export class FieldFilter extends Filter {
54
54
  'like',
55
55
  'not like',
56
56
  'begins',
57
+ 'not begins',
57
58
  'ends',
59
+ 'not ends',
58
60
  'includes',
59
61
  'excludes'
60
62
  ];
@@ -64,7 +66,9 @@ export class FieldFilter extends Filter {
64
66
  'like',
65
67
  'not like',
66
68
  'begins',
69
+ 'not begins',
67
70
  'ends',
71
+ 'not ends',
68
72
  'includes',
69
73
  'excludes'
70
74
  ];
@@ -161,10 +165,18 @@ export class FieldFilter extends Filter {
161
165
  regExps = value.map(v => new RegExp('^' + escapeRegExp(v), 'i'));
162
166
  opFn = v => regExps.some(re => re.test(v));
163
167
  break;
168
+ case 'not begins':
169
+ regExps = value.map(v => new RegExp('^' + escapeRegExp(v), 'i'));
170
+ opFn = v => regExps.every(re => !re.test(v));
171
+ break;
164
172
  case 'ends':
165
173
  regExps = value.map(v => new RegExp(escapeRegExp(v) + '$', 'i'));
166
174
  opFn = v => regExps.some(re => re.test(v));
167
175
  break;
176
+ case 'not ends':
177
+ regExps = value.map(v => new RegExp(escapeRegExp(v) + '$', 'i'));
178
+ opFn = v => regExps.every(re => !re.test(v));
179
+ break;
168
180
  case 'includes':
169
181
  opFn = v => !isNil(v) && v.some(it => value.includes(it));
170
182
  break;
@@ -28,7 +28,9 @@ export type FieldFilterOperator =
28
28
  | 'like'
29
29
  | 'not like'
30
30
  | 'begins'
31
+ | 'not begins'
31
32
  | 'ends'
33
+ | 'not ends'
32
34
  | 'includes'
33
35
  | 'excludes';
34
36
  export interface FieldFilterSpec {
@@ -1,6 +1,6 @@
1
1
  .xh-zone-mapper {
2
2
  width: 350px;
3
- height: 500px;
3
+ height: 550px;
4
4
 
5
5
  &__zone-picker {
6
6
  padding: var(--xh-pad-px);
@@ -25,8 +25,10 @@
25
25
  }
26
26
 
27
27
  &--selected {
28
- box-shadow: var(--xh-form-field-focused-box-shadow);
29
- background: var(--xh-grid-tree-group-bg);
28
+ box-shadow:
29
+ inset 0 0 0 1px var(--xh-intent-warning),
30
+ inset 0 1px 1px var(--xh-intent-warning);
31
+ background: var(--xh-intent-warning-trans1);
30
32
  }
31
33
 
32
34
  &.tl {
@@ -75,7 +77,11 @@
75
77
  }
76
78
 
77
79
  &__intro-text {
78
- padding: var(--xh-pad-px);
80
+ padding: var(--xh-pad-px) var(--xh-pad-px) 0 var(--xh-pad-px);
79
81
  font-size: var(--xh-font-size-small-px);
82
+
83
+ .xh-icon {
84
+ margin-right: 2px;
85
+ }
80
86
  }
81
87
  }
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import '@xh/hoist/desktop/register';
8
8
  import {hoistCmp, HoistModel, lookup, managed, useLocalModel, uses} from '@xh/hoist/core';
9
- import {div, filler, hbox, hframe, span, vbox} from '@xh/hoist/cmp/layout';
9
+ import {div, filler, hbox, hframe, p, span, vbox} from '@xh/hoist/cmp/layout';
10
10
  import {panel} from '@xh/hoist/desktop/cmp/panel';
11
11
  import {grid, GridModel} from '@xh/hoist/cmp/grid';
12
12
  import {checkbox} from '@xh/hoist/desktop/cmp/input';
@@ -70,12 +70,20 @@ export const [ZoneMapper, zoneMapper] = hoistCmp.withFactory<ZoneMapperModel>({
70
70
  }
71
71
  });
72
72
 
73
- const introText = hoistCmp.factory({
74
- render() {
73
+ const introText = hoistCmp.factory<ZoneMapperModel>({
74
+ render({model}) {
75
75
  return div({
76
76
  className: 'xh-zone-mapper__intro-text',
77
77
  items: [
78
- 'Click any of the four quadrants in the sample row below to customize the fields displayed within. Fields will be shown in the order they are selected. The first field within the top zones will always be labelled by the column headers.'
78
+ p(
79
+ Icon.questionCircle(),
80
+ 'Click to highlight any of the four quadrants in the sample row below, then check the field(s) you wish to show in that zone.'
81
+ ),
82
+ p('Fields will be shown in the order they are selected.'),
83
+ p({
84
+ omit: model.headersAreHidden,
85
+ item: 'The first field within the top two zones will always be labelled by the column headers.'
86
+ })
79
87
  ]
80
88
  });
81
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "78.0.0-SNAPSHOT.1763398903260",
3
+ "version": "78.0.0-SNAPSHOT.1763568169798",
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",