@genesislcap/foundation-ui 14.233.2-alpha-eddf1a1.0 → 14.234.0
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/custom-elements.json +20 -0
- package/dist/dts/options-datasource/options-datasource.d.ts +2 -0
- package/dist/dts/options-datasource/options-datasource.d.ts.map +1 -1
- package/dist/esm/options-datasource/options-datasource.js +28 -6
- package/dist/esm/router/configuration.js +1 -1
- package/package.json +16 -16
|
@@ -26850,6 +26850,14 @@
|
|
|
26850
26850
|
},
|
|
26851
26851
|
"default": "'No matching records'"
|
|
26852
26852
|
},
|
|
26853
|
+
{
|
|
26854
|
+
"kind": "field",
|
|
26855
|
+
"name": "allowCustomOptions",
|
|
26856
|
+
"type": {
|
|
26857
|
+
"text": "boolean"
|
|
26858
|
+
},
|
|
26859
|
+
"default": "false"
|
|
26860
|
+
},
|
|
26853
26861
|
{
|
|
26854
26862
|
"kind": "field",
|
|
26855
26863
|
"name": "labelFormatter"
|
|
@@ -26983,6 +26991,10 @@
|
|
|
26983
26991
|
"module": "src/utils/base-datasource.ts"
|
|
26984
26992
|
}
|
|
26985
26993
|
},
|
|
26994
|
+
{
|
|
26995
|
+
"kind": "method",
|
|
26996
|
+
"name": "getInitialLabel"
|
|
26997
|
+
},
|
|
26986
26998
|
{
|
|
26987
26999
|
"kind": "method",
|
|
26988
27000
|
"name": "resetCombobox"
|
|
@@ -27700,6 +27712,14 @@
|
|
|
27700
27712
|
"default": "'No matching records'",
|
|
27701
27713
|
"fieldName": "emptyDataLabel"
|
|
27702
27714
|
},
|
|
27715
|
+
{
|
|
27716
|
+
"name": "allow-custom-options",
|
|
27717
|
+
"type": {
|
|
27718
|
+
"text": "boolean"
|
|
27719
|
+
},
|
|
27720
|
+
"default": "false",
|
|
27721
|
+
"fieldName": "allowCustomOptions"
|
|
27722
|
+
},
|
|
27703
27723
|
{
|
|
27704
27724
|
"type": {
|
|
27705
27725
|
"text": "boolean"
|
|
@@ -6,6 +6,7 @@ export declare class OptionsDatasource extends BaseDatasource {
|
|
|
6
6
|
optionElement: string;
|
|
7
7
|
valueField: string;
|
|
8
8
|
emptyDataLabel: string;
|
|
9
|
+
allowCustomOptions: boolean;
|
|
9
10
|
labelFormatter: any;
|
|
10
11
|
initialSelectedValue: string | number;
|
|
11
12
|
initialSelectedValueChanged(oldValue: any, newValue: any): void;
|
|
@@ -26,6 +27,7 @@ export declare class OptionsDatasource extends BaseDatasource {
|
|
|
26
27
|
clearData(): void;
|
|
27
28
|
private checkOverflow;
|
|
28
29
|
syncComponentData(snapshotData?: any[]): void;
|
|
30
|
+
getInitialLabel(): string | number;
|
|
29
31
|
resetCombobox(): void;
|
|
30
32
|
handleStreamInserts(insertedRows: any[]): void;
|
|
31
33
|
handleStreamDeletes(deletedRows: any[]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options-datasource.d.ts","sourceRoot":"","sources":["../../../src/options-datasource/options-datasource.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,cAAc,EAAqB,MAAM,UAAU,CAAC;AAG7D,qBAGa,iBAAkB,SAAQ,cAAc;IACf,UAAU,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAyB;
|
|
1
|
+
{"version":3,"file":"options-datasource.d.ts","sourceRoot":"","sources":["../../../src/options-datasource/options-datasource.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,cAAc,EAAqB,MAAM,UAAU,CAAC;AAG7D,qBAGa,iBAAkB,SAAQ,cAAc;IACf,UAAU,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAyB;IAC1B,kBAAkB,UAAS;IAC7E,cAAc,MAAC;IAEf,oBAAoB,EAAE,MAAM,GAAG,MAAM,CAAC;IAClD,2BAA2B,CAAC,QAAQ,KAAA,EAAE,QAAQ,KAAA;IAQ9C,8BAA8B,EAAE,OAAO,CAAS;IAEhD,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC7B,UAAU,EAAE,OAAO,CAAQ;IAElC,SAAS,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,GAAG,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAEnD,OAAO,CAAC,cAAc,CAAiB;IAEjC,iBAAiB;IAkBvB,oBAAoB;IAQpB,OAAO,CAAC,sBAAsB,CAI5B;IAEF,mBAAmB,mBAQjB;IAEF,SAAS;IAcH,sBAAsB;IAY5B,SAAS,IAAI,IAAI;IAUjB,OAAO,CAAC,aAAa;IAYrB,iBAAiB,CAAC,YAAY,CAAC,EAAE,GAAG,EAAE;IA8CtC,eAAe;IAcf,aAAa;IAMb,mBAAmB,CAAC,YAAY,EAAE,GAAG,EAAE,GAAG,IAAI;IAI9C,mBAAmB,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,IAAI;IAI7C,mBAAmB,CAAC,WAAW,EAAE,GAAG,EAAE,GAAG,IAAI;CAG9C"}
|
|
@@ -9,6 +9,7 @@ let OptionsDatasource = OptionsDatasource_1 = class OptionsDatasource extends Ba
|
|
|
9
9
|
constructor() {
|
|
10
10
|
super(...arguments);
|
|
11
11
|
this.emptyDataLabel = 'No matching records';
|
|
12
|
+
this.allowCustomOptions = false;
|
|
12
13
|
this.initalSelectedValueInitialized = false;
|
|
13
14
|
this.isSnapshot = true;
|
|
14
15
|
this.resizeObserverCallback = (entries) => {
|
|
@@ -18,8 +19,14 @@ let OptionsDatasource = OptionsDatasource_1 = class OptionsDatasource extends Ba
|
|
|
18
19
|
};
|
|
19
20
|
this.selectChangeHandler = (e) => {
|
|
20
21
|
var _a;
|
|
21
|
-
const
|
|
22
|
-
this.
|
|
22
|
+
const value = e.target.value;
|
|
23
|
+
const selectedOption = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((option) => String(option.label) === value);
|
|
24
|
+
if (!selectedOption && this.allowCustomOptions && this.select instanceof FASTComboBox) {
|
|
25
|
+
this.select.$emit('value-change', { label: value, value });
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
this.select.$emit('value-change', selectedOption);
|
|
29
|
+
}
|
|
23
30
|
};
|
|
24
31
|
}
|
|
25
32
|
initialSelectedValueChanged(oldValue, newValue) {
|
|
@@ -97,7 +104,6 @@ let OptionsDatasource = OptionsDatasource_1 = class OptionsDatasource extends Ba
|
|
|
97
104
|
}
|
|
98
105
|
}
|
|
99
106
|
syncComponentData(snapshotData) {
|
|
100
|
-
var _a;
|
|
101
107
|
const rowData = snapshotData !== null && snapshotData !== void 0 ? snapshotData : Array.from(this.rowsSyncedWithStream.values());
|
|
102
108
|
if (rowData.length > 0) {
|
|
103
109
|
this.options = rowData.map((row) => {
|
|
@@ -122,9 +128,7 @@ let OptionsDatasource = OptionsDatasource_1 = class OptionsDatasource extends Ba
|
|
|
122
128
|
if (!this.initalSelectedValueInitialized ||
|
|
123
129
|
(this.select instanceof FASTComboBox && !this.select.async)) {
|
|
124
130
|
this.resetCombobox();
|
|
125
|
-
const initialLabel = this.
|
|
126
|
-
? (_a = this.options.find((x) => x.value === this.initialSelectedValue)) === null || _a === void 0 ? void 0 : _a.label
|
|
127
|
-
: '';
|
|
131
|
+
const initialLabel = this.getInitialLabel();
|
|
128
132
|
DOM.queueUpdate(() => {
|
|
129
133
|
this.select.value = String(initialLabel);
|
|
130
134
|
});
|
|
@@ -139,6 +143,21 @@ let OptionsDatasource = OptionsDatasource_1 = class OptionsDatasource extends Ba
|
|
|
139
143
|
this.select.appendChild(option);
|
|
140
144
|
}
|
|
141
145
|
}
|
|
146
|
+
getInitialLabel() {
|
|
147
|
+
var _a, _b;
|
|
148
|
+
let initialValue = '';
|
|
149
|
+
if (this.initialSelectedValue || this.initialSelectedValue === 0) {
|
|
150
|
+
if (this.allowCustomOptions && this.select instanceof FASTComboBox) {
|
|
151
|
+
initialValue =
|
|
152
|
+
((_a = this.options.find((x) => x.value === this.initialSelectedValue)) === null || _a === void 0 ? void 0 : _a.label) ||
|
|
153
|
+
this.initialSelectedValue;
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
initialValue = ((_b = this.options.find((x) => x.value === this.initialSelectedValue)) === null || _b === void 0 ? void 0 : _b.label) || '';
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return initialValue;
|
|
160
|
+
}
|
|
142
161
|
resetCombobox() {
|
|
143
162
|
if (this.select && this.select instanceof FASTComboBox) {
|
|
144
163
|
this.select.resetCombobox();
|
|
@@ -166,6 +185,9 @@ __decorate([
|
|
|
166
185
|
__decorate([
|
|
167
186
|
attr({ attribute: 'empty-data-label' })
|
|
168
187
|
], OptionsDatasource.prototype, "emptyDataLabel", void 0);
|
|
188
|
+
__decorate([
|
|
189
|
+
attr({ mode: 'boolean', attribute: 'allow-custom-options' })
|
|
190
|
+
], OptionsDatasource.prototype, "allowCustomOptions", void 0);
|
|
169
191
|
__decorate([
|
|
170
192
|
observable
|
|
171
193
|
], OptionsDatasource.prototype, "labelFormatter", void 0);
|
|
@@ -106,7 +106,7 @@ export class FoundationRouterConfiguration extends RouterConfiguration {
|
|
|
106
106
|
});
|
|
107
107
|
return __awaiter(this, void 0, void 0, function* () {
|
|
108
108
|
const path = yield _super.generateRouteFromName.call(this, name, params);
|
|
109
|
-
return
|
|
109
|
+
return this.generateNavigationPath(path);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
navigateTo(config) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-ui",
|
|
3
3
|
"description": "Genesis Foundation UI",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.234.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -83,13 +83,13 @@
|
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@genesislcap/foundation-testing": "14.
|
|
87
|
-
"@genesislcap/genx": "14.
|
|
88
|
-
"@genesislcap/rollup-builder": "14.
|
|
89
|
-
"@genesislcap/ts-builder": "14.
|
|
90
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
91
|
-
"@genesislcap/vite-builder": "14.
|
|
92
|
-
"@genesislcap/webpack-builder": "14.
|
|
86
|
+
"@genesislcap/foundation-testing": "14.234.0",
|
|
87
|
+
"@genesislcap/genx": "14.234.0",
|
|
88
|
+
"@genesislcap/rollup-builder": "14.234.0",
|
|
89
|
+
"@genesislcap/ts-builder": "14.234.0",
|
|
90
|
+
"@genesislcap/uvu-playwright-builder": "14.234.0",
|
|
91
|
+
"@genesislcap/vite-builder": "14.234.0",
|
|
92
|
+
"@genesislcap/webpack-builder": "14.234.0",
|
|
93
93
|
"copyfiles": "^2.4.1",
|
|
94
94
|
"rimraf": "^5.0.0",
|
|
95
95
|
"rxjs": "^7.5.4"
|
|
@@ -100,13 +100,13 @@
|
|
|
100
100
|
"@fortawesome/free-regular-svg-icons": "^6.2.1",
|
|
101
101
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
|
102
102
|
"@genesiscommunitysuccess/analyzer-import-alias-plugin": "^5.0.3",
|
|
103
|
-
"@genesislcap/foundation-comms": "14.
|
|
104
|
-
"@genesislcap/foundation-criteria": "14.
|
|
105
|
-
"@genesislcap/foundation-errors": "14.
|
|
106
|
-
"@genesislcap/foundation-logger": "14.
|
|
107
|
-
"@genesislcap/foundation-notifications": "14.
|
|
108
|
-
"@genesislcap/foundation-user": "14.
|
|
109
|
-
"@genesislcap/foundation-utils": "14.
|
|
103
|
+
"@genesislcap/foundation-comms": "14.234.0",
|
|
104
|
+
"@genesislcap/foundation-criteria": "14.234.0",
|
|
105
|
+
"@genesislcap/foundation-errors": "14.234.0",
|
|
106
|
+
"@genesislcap/foundation-logger": "14.234.0",
|
|
107
|
+
"@genesislcap/foundation-notifications": "14.234.0",
|
|
108
|
+
"@genesislcap/foundation-user": "14.234.0",
|
|
109
|
+
"@genesislcap/foundation-utils": "14.234.0",
|
|
110
110
|
"@microsoft/fast-colors": "5.3.1",
|
|
111
111
|
"@microsoft/fast-components": "2.30.6",
|
|
112
112
|
"@microsoft/fast-element": "1.14.0",
|
|
@@ -128,5 +128,5 @@
|
|
|
128
128
|
"access": "public"
|
|
129
129
|
},
|
|
130
130
|
"customElements": "dist/custom-elements.json",
|
|
131
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "e3a9483a85395d3322649f3b6bf2a712774040ce"
|
|
132
132
|
}
|