cx 26.4.2 → 26.4.4

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/widgets.css CHANGED
@@ -1429,9 +1429,6 @@ th.cxe-calendar-display {
1429
1429
  }
1430
1430
 
1431
1431
  .cxs-single > .cxe-lookupfield-input {
1432
- overflow: hidden;
1433
- text-overflow: ellipsis;
1434
- white-space: nowrap;
1435
1432
  flex-basis: 0%;
1436
1433
  flex-grow: 1;
1437
1434
  }
@@ -1440,6 +1437,15 @@ th.cxe-calendar-display {
1440
1437
  padding-left: 26px;
1441
1438
  }
1442
1439
 
1440
+ .cxe-lookupfield-text {
1441
+ overflow: hidden;
1442
+ text-overflow: ellipsis;
1443
+ white-space: nowrap;
1444
+ min-width: 0;
1445
+ flex-basis: 0%;
1446
+ flex-grow: 1;
1447
+ }
1448
+
1443
1449
  .cxe-lookupfield-tags {
1444
1450
  display: flex;
1445
1451
  margin: -2px -2px -2px -2px;
package/dist/widgets.js CHANGED
@@ -9153,7 +9153,11 @@ class LookupComponent extends VDOM.Component {
9153
9153
  text = this.getPlaceholder(data.placeholder);
9154
9154
  }
9155
9155
  } else {
9156
- text = !data.empty ? data.text || this.getPlaceholder() : this.getPlaceholder(data.placeholder);
9156
+ let content = !data.empty ? data.text || this.getPlaceholder() : this.getPlaceholder(data.placeholder);
9157
+ text = jsx("span", {
9158
+ className: CSS.element(baseClass, "text"),
9159
+ children: content,
9160
+ });
9157
9161
  }
9158
9162
  let states = {
9159
9163
  visited: state.visited,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cx",
3
- "version": "26.4.2",
3
+ "version": "26.4.4",
4
4
  "description": "Advanced JavaScript UI framework for admin and dashboard applications with ready to use grid, form and chart components.",
5
5
  "exports": {
6
6
  "./data": {
@@ -1,88 +1,89 @@
1
- import { View, ViewConfig } from "./View";
2
- import { Binding } from "./Binding";
3
-
4
- export interface AugmentedViewBaseConfig extends ViewConfig {
5
- store: View<any>;
6
- }
7
-
8
- export class AugmentedViewBase<D = any> extends View<D> {
9
- declare immutable: boolean;
10
- declare store: View;
11
-
12
- constructor(config: AugmentedViewBaseConfig) {
13
- super(config);
14
- }
15
-
16
- getData() {
17
- if (this.sealed && this.meta.version === this.cache.version && this.meta === this.store.meta)
18
- return this.cache.result;
19
- let parentStoreData = this.store.getData();
20
- let result = this.getBaseData(parentStoreData);
21
- this.embedAugmentData(result, parentStoreData);
22
- this.cache.result = result;
23
- this.cache.parentStoreData = parentStoreData;
24
- this.cache.version = this.meta.version;
25
- this.meta = this.store.meta;
26
- return this.cache.result;
27
- }
28
-
29
- protected getBaseData(parentStoreData: any): any {
30
- if (this.sealed || this.immutable || this.store.sealed) return { ...parentStoreData };
31
- return parentStoreData;
32
- }
33
-
34
- protected embedAugmentData(result: any, parentStoreData: any): void {
35
- throw new Error("abstract");
36
- }
37
-
38
- protected isExtraKey(key: string): boolean {
39
- throw new Error("abstract");
40
- }
41
-
42
- // Stores which need to support nested aliases should override this method
43
- protected getExtraKeyBinding(key: string): any {
44
- let binding = Binding.get(key);
45
- return this.isExtraKey(binding.parts[0]) ? Binding.get(binding.parts[0]) : null;
46
- }
47
-
48
- protected setExtraKeyValue(key: string, value: any): boolean {
49
- throw new Error("abstract");
50
- }
51
-
52
- protected deleteExtraKeyValue(key: string): boolean {
53
- throw new Error("abstract");
54
- }
55
-
56
- setItem(path: string, value: any): boolean {
57
- let extraKeyBinding = this.getExtraKeyBinding(path);
58
- if (extraKeyBinding) {
59
- let binding = Binding.get(path);
60
- let newValue = value;
61
- if (binding.parts.length > extraKeyBinding.parts.length) {
62
- let data = {};
63
- this.embedAugmentData(data, this.store.getData());
64
- let binding = Binding.get(path);
65
- data = binding.set(data, value);
66
- newValue = extraKeyBinding.value(data);
67
- }
68
- return this.setExtraKeyValue(extraKeyBinding.path, newValue);
69
- }
70
- return super.setItem(path, value);
71
- }
72
-
73
- deleteItem(path: string): boolean {
74
- let extraKeyBinding = this.getExtraKeyBinding(path);
75
- if (extraKeyBinding) {
76
- if (path == extraKeyBinding.path) return this.deleteExtraKeyValue(extraKeyBinding.path);
77
- let data = {};
78
- this.embedAugmentData(data, this.store.getData());
79
- let binding = Binding.get(path);
80
- data = binding.delete(data);
81
- let newValue = extraKeyBinding.value(data);
82
- return this.setExtraKeyValue(extraKeyBinding.path, newValue);
83
- }
84
- return super.deleteItem(path);
85
- }
86
- }
87
-
88
- AugmentedViewBase.prototype.immutable = false;
1
+ import { View, ViewConfig } from "./View";
2
+ import { Binding } from "./Binding";
3
+
4
+ export interface AugmentedViewBaseConfig extends ViewConfig {
5
+ store: View<any>;
6
+ }
7
+
8
+ export class AugmentedViewBase<D = any> extends View<D> {
9
+ declare immutable: boolean;
10
+ declare store: View;
11
+
12
+ constructor(config: AugmentedViewBaseConfig) {
13
+ super(config);
14
+ }
15
+
16
+ getData() {
17
+ if (this.sealed && this.meta.version === this.cache.version && this.meta === this.store.meta)
18
+ return this.cache.result;
19
+ let parentStoreData = this.store.getData();
20
+ let result = this.getBaseData(parentStoreData);
21
+ this.embedAugmentData(result, parentStoreData);
22
+ if (this.sealed) {
23
+ this.cache.result = result;
24
+ this.cache.version = this.meta.version;
25
+ }
26
+ this.meta = this.store.meta;
27
+ return result;
28
+ }
29
+
30
+ protected getBaseData(parentStoreData: any): any {
31
+ if (this.sealed || this.immutable || this.store.sealed) return { ...parentStoreData };
32
+ return parentStoreData;
33
+ }
34
+
35
+ protected embedAugmentData(result: any, parentStoreData: any): void {
36
+ throw new Error("abstract");
37
+ }
38
+
39
+ protected isExtraKey(key: string): boolean {
40
+ throw new Error("abstract");
41
+ }
42
+
43
+ // Stores which need to support nested aliases should override this method
44
+ protected getExtraKeyBinding(key: string): any {
45
+ let binding = Binding.get(key);
46
+ return this.isExtraKey(binding.parts[0]) ? Binding.get(binding.parts[0]) : null;
47
+ }
48
+
49
+ protected setExtraKeyValue(key: string, value: any): boolean {
50
+ throw new Error("abstract");
51
+ }
52
+
53
+ protected deleteExtraKeyValue(key: string): boolean {
54
+ throw new Error("abstract");
55
+ }
56
+
57
+ setItem(path: string, value: any): boolean {
58
+ let extraKeyBinding = this.getExtraKeyBinding(path);
59
+ if (extraKeyBinding) {
60
+ let binding = Binding.get(path);
61
+ let newValue = value;
62
+ if (binding.parts.length > extraKeyBinding.parts.length) {
63
+ let data = {};
64
+ this.embedAugmentData(data, this.store.getData());
65
+ let binding = Binding.get(path);
66
+ data = binding.set(data, value);
67
+ newValue = extraKeyBinding.value(data);
68
+ }
69
+ return this.setExtraKeyValue(extraKeyBinding.path, newValue);
70
+ }
71
+ return super.setItem(path, value);
72
+ }
73
+
74
+ deleteItem(path: string): boolean {
75
+ let extraKeyBinding = this.getExtraKeyBinding(path);
76
+ if (extraKeyBinding) {
77
+ if (path == extraKeyBinding.path) return this.deleteExtraKeyValue(extraKeyBinding.path);
78
+ let data = {};
79
+ this.embedAugmentData(data, this.store.getData());
80
+ let binding = Binding.get(path);
81
+ data = binding.delete(data);
82
+ let newValue = extraKeyBinding.value(data);
83
+ return this.setExtraKeyValue(extraKeyBinding.path, newValue);
84
+ }
85
+ return super.deleteItem(path);
86
+ }
87
+ }
88
+
89
+ AugmentedViewBase.prototype.immutable = false;