Skip to content

Commit 801bb06

Browse files
author
Tom German
committed
Merge branch 'dev' into dynamic-form-list-customization
2 parents e13cff8 + 15897b7 commit 801bb06

File tree

8 files changed

+302
-17
lines changed

8 files changed

+302
-17
lines changed

CHANGELOG.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
"`DynamicForm`: New items are always created with the default content type if the list has multiple content types [#1626](https://github.com/pnp/sp-dev-fx-controls-react/pull/1626)",
2323
"`PeoplePicker`:PeoplePicker won't accept Multiple Users with the same name [#1620] (https://github.com/pnp/sp-dev-fx-controls-react/pull/1620)",
2424
"`DynamicForm`: Dynamic Form accessed TaxonomyFieldTypeMulti without considering sub-array results [#1614](https://github.com/pnp/sp-dev-fx-controls-react/pull/1614)",
25-
"`DynamicForm`: Number validations are working, but the percentage values are not getting saved [#1601](https://github.com/pnp/sp-dev-fx-controls-react/pull/1601)"
25+
"`DynamicForm`: Number validations are working, but the percentage values are not getting saved [#1601](https://github.com/pnp/sp-dev-fx-controls-react/pull/1601)",
26+
"`DynamicForm`: Number validation is preventing form save in certain circumstances, not enabled for currency fields [#1604](https://github.com/pnp/sp-dev-fx-controls-react/issues/1604)"
2627
]
2728
},
2829
"contributions": [
@@ -33,7 +34,8 @@
3334
"[Nishkalank Bezawada](https://github.com/NishkalankBezawada)",
3435
"[Rico van de Ven](https://github.com/RicoNL)",
3536
"[Steve Beaugé](https://github.com/stevebeauge)",
36-
"[wuxiaojun514](https://github.com/wuxiaojun514)"
37+
"[wuxiaojun514](https://github.com/wuxiaojun514)",
38+
"[Tom G](https://github.com/t0mgerman)"
3739
]
3840
},
3941
{

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@
2525
- `PeoplePicker`:PeoplePicker won't accept Multiple Users with the same name [#1620] (https://github.com/pnp/sp-dev-fx-controls-react/pull/1620)
2626
- `DynamicForm`: Dynamic Form accessed TaxonomyFieldTypeMulti without considering sub-array results [#1614](https://github.com/pnp/sp-dev-fx-controls-react/pull/1614)
2727
- `DynamicForm`: Number validations are working, but the percentage values are not getting saved [#1601](https://github.com/pnp/sp-dev-fx-controls-react/pull/1601)
28+
- `DynamicForm`: Number validation is preventing form save in certain circumstances, not enabled for currency fields [#1604](https://github.com/pnp/sp-dev-fx-controls-react/issues/1604)
2829

2930
### Contributors
3031

31-
Special thanks to our contributors (in alphabetical order): [Guido Zambarda](https://github.com/GuidoZam), [Joakim](https://github.com/daenur76), [Michaël Maillot](https://github.com/michaelmaillot), [Nils Andresen](https://github.com/nils-a), [Nishkalank Bezawada](https://github.com/NishkalankBezawada), [Rico van de Ven](https://github.com/RicoNL), [Steve Beaugé](https://github.com/stevebeauge), [wuxiaojun514](https://github.com/wuxiaojun514).
32+
Special thanks to our contributors (in alphabetical order): [Guido Zambarda](https://github.com/GuidoZam), [Joakim](https://github.com/daenur76), [Michaël Maillot](https://github.com/michaelmaillot), [Nils Andresen](https://github.com/nils-a), [Nishkalank Bezawada](https://github.com/NishkalankBezawada), [Rico van de Ven](https://github.com/RicoNL), [Steve Beaugé](https://github.com/stevebeauge), [wuxiaojun514](https://github.com/wuxiaojun514), [Tom G](https://github.com/t0mgerman).
3233

3334
## 3.15.0
3435

docs/documentation/docs/about/release-notes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@
2525
- `PeoplePicker`:PeoplePicker won't accept Multiple Users with the same name [#1620] (https://github.com/pnp/sp-dev-fx-controls-react/pull/1620)
2626
- `DynamicForm`: Dynamic Form accessed TaxonomyFieldTypeMulti without considering sub-array results [#1614](https://github.com/pnp/sp-dev-fx-controls-react/pull/1614)
2727
- `DynamicForm`: Number validations are working, but the percentage values are not getting saved [#1601](https://github.com/pnp/sp-dev-fx-controls-react/pull/1601)
28+
- `DynamicForm`: Number validation is preventing form save in certain circumstances, not enabled for currency fields [#1604](https://github.com/pnp/sp-dev-fx-controls-react/issues/1604)
2829

2930
### Contributors
3031

31-
Special thanks to our contributors (in alphabetical order): [Guido Zambarda](https://github.com/GuidoZam), [Joakim](https://github.com/daenur76), [Michaël Maillot](https://github.com/michaelmaillot), [Nils Andresen](https://github.com/nils-a), [Nishkalank Bezawada](https://github.com/NishkalankBezawada), [Rico van de Ven](https://github.com/RicoNL), [Steve Beaugé](https://github.com/stevebeauge), [wuxiaojun514](https://github.com/wuxiaojun514).
32+
Special thanks to our contributors (in alphabetical order): [Guido Zambarda](https://github.com/GuidoZam), [Joakim](https://github.com/daenur76), [Michaël Maillot](https://github.com/michaelmaillot), [Nils Andresen](https://github.com/nils-a), [Nishkalank Bezawada](https://github.com/NishkalankBezawada), [Rico van de Ven](https://github.com/RicoNL), [Steve Beaugé](https://github.com/stevebeauge), [wuxiaojun514](https://github.com/wuxiaojun514), [Tom G](https://github.com/t0mgerman).
3233

3334
## 3.15.0
3435

Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
export default {
2+
AD: 'EUR',
3+
AE: 'AED',
4+
AF: 'AFN',
5+
AG: 'XCD',
6+
AI: 'XCD',
7+
AL: 'ALL',
8+
AM: 'AMD',
9+
AO: 'AOA',
10+
AR: 'ARS',
11+
AS: 'USD',
12+
AT: 'EUR',
13+
AU: 'AUD',
14+
AW: 'AWG',
15+
AX: 'EUR',
16+
AZ: 'AZN',
17+
BA: 'BAM',
18+
BB: 'BBD',
19+
BD: 'BDT',
20+
BE: 'EUR',
21+
BF: 'XOF',
22+
BG: 'BGN',
23+
BH: 'BHD',
24+
BI: 'BIF',
25+
BJ: 'XOF',
26+
BL: 'EUR',
27+
BM: 'BMD',
28+
BN: 'BND',
29+
BO: 'BOB',
30+
BQ: 'USD',
31+
BR: 'BRL',
32+
BS: 'BSD',
33+
BT: 'BTN',
34+
BV: 'NOK',
35+
BW: 'BWP',
36+
BY: 'BYN',
37+
BZ: 'BZD',
38+
CA: 'CAD',
39+
CC: 'AUD',
40+
CD: 'CDF',
41+
CF: 'XAF',
42+
CG: 'XAF',
43+
CH: 'CHF',
44+
CI: 'XOF',
45+
CK: 'NZD',
46+
CL: 'CLP',
47+
CM: 'XAF',
48+
CN: 'CNY',
49+
CO: 'COP',
50+
CR: 'CRC',
51+
CU: 'CUP',
52+
CV: 'CVE',
53+
CW: 'ANG',
54+
CX: 'AUD',
55+
CY: 'EUR',
56+
CZ: 'CZK',
57+
DE: 'EUR',
58+
DJ: 'DJF',
59+
DK: 'DKK',
60+
DM: 'XCD',
61+
DO: 'DOP',
62+
DZ: 'DZD',
63+
EC: 'USD',
64+
EE: 'EUR',
65+
EG: 'EGP',
66+
EH: 'MAD',
67+
ER: 'ERN',
68+
ES: 'EUR',
69+
ET: 'ETB',
70+
FI: 'EUR',
71+
FJ: 'FJD',
72+
FK: 'FKP',
73+
FM: 'USD',
74+
FO: 'DKK',
75+
FR: 'EUR',
76+
GA: 'XAF',
77+
GB: 'GBP',
78+
GD: 'XCD',
79+
GE: 'GEL',
80+
GF: 'EUR',
81+
GG: 'GBP',
82+
GH: 'GHS',
83+
GI: 'GIP',
84+
GL: 'DKK',
85+
GM: 'GMD',
86+
GN: 'GNF',
87+
GP: 'EUR',
88+
GQ: 'XAF',
89+
GR: 'EUR',
90+
GS: 'GBP',
91+
GT: 'GTQ',
92+
GU: 'USD',
93+
GW: 'XOF',
94+
GY: 'GYD',
95+
HK: 'HKD',
96+
HM: 'AUD',
97+
HN: 'HNL',
98+
HR: 'EUR',
99+
HT: 'HTG',
100+
HU: 'HUF',
101+
ID: 'IDR',
102+
IE: 'EUR',
103+
IL: 'ILS',
104+
IM: 'GBP',
105+
IN: 'INR',
106+
IO: 'USD',
107+
IQ: 'IQD',
108+
IR: 'IRR',
109+
IS: 'ISK',
110+
IT: 'EUR',
111+
JE: 'GBP',
112+
JM: 'JMD',
113+
JO: 'JOD',
114+
JP: 'JPY',
115+
KE: 'KES',
116+
KG: 'KGS',
117+
KH: 'KHR',
118+
KI: 'AUD',
119+
KM: 'KMF',
120+
KN: 'XCD',
121+
KP: 'KPW',
122+
KR: 'KRW',
123+
KW: 'KWD',
124+
KY: 'KYD',
125+
KZ: 'KZT',
126+
LA: 'LAK',
127+
LB: 'LBP',
128+
LC: 'XCD',
129+
LI: 'CHF',
130+
LK: 'LKR',
131+
LR: 'LRD',
132+
LS: 'LSL',
133+
LT: 'EUR',
134+
LU: 'EUR',
135+
LV: 'EUR',
136+
LY: 'LYD',
137+
MA: 'MAD',
138+
MC: 'EUR',
139+
MD: 'MDL',
140+
ME: 'EUR',
141+
MF: 'EUR',
142+
MG: 'MGA',
143+
MH: 'USD',
144+
MK: 'MKD',
145+
ML: 'XOF',
146+
MM: 'MMK',
147+
MN: 'MNT',
148+
MO: 'MOP',
149+
MP: 'USD',
150+
MQ: 'EUR',
151+
MR: 'MRO',
152+
MS: 'XCD',
153+
MT: 'EUR',
154+
MU: 'MUR',
155+
MV: 'MVR',
156+
MW: 'MWK',
157+
MX: 'MXN',
158+
MY: 'MYR',
159+
MZ: 'MZN',
160+
NA: 'NAD',
161+
NC: 'XPF',
162+
NE: 'XOF',
163+
NF: 'AUD',
164+
NG: 'NGN',
165+
NI: 'NIO',
166+
NL: 'EUR',
167+
NO: 'NOK',
168+
NP: 'NPR',
169+
NR: 'AUD',
170+
NU: 'NZD',
171+
NZ: 'NZD',
172+
OM: 'OMR',
173+
PA: 'PAB',
174+
PE: 'PEN',
175+
PF: 'XPF',
176+
PG: 'PGK',
177+
PH: 'PHP',
178+
PK: 'PKR',
179+
PL: 'PLN',
180+
PM: 'EUR',
181+
PN: 'NZD',
182+
PR: 'USD',
183+
PS: 'ILS',
184+
PT: 'EUR',
185+
PW: 'USD',
186+
PY: 'PYG',
187+
QA: 'QAR',
188+
RE: 'EUR',
189+
RO: 'RON',
190+
RS: 'RSD',
191+
RU: 'RUB',
192+
RW: 'RWF',
193+
SA: 'SAR',
194+
SB: 'SBD',
195+
SC: 'SCR',
196+
SD: 'SDG',
197+
SE: 'SEK',
198+
SG: 'SGD',
199+
SH: 'SHP',
200+
SI: 'EUR',
201+
SJ: 'NOK',
202+
SK: 'EUR',
203+
SL: 'SLL',
204+
SM: 'EUR',
205+
SN: 'XOF',
206+
SO: 'SOS',
207+
SR: 'SRD',
208+
ST: 'STD',
209+
SV: 'SVC',
210+
SX: 'ANG',
211+
SY: 'SYP',
212+
SZ: 'SZL',
213+
TC: 'USD',
214+
TD: 'XAF',
215+
TF: 'EUR',
216+
TG: 'XOF',
217+
TH: 'THB',
218+
TJ: 'TJS',
219+
TK: 'NZD',
220+
TL: 'USD',
221+
TM: 'TMT',
222+
TN: 'TND',
223+
TO: 'TOP',
224+
TR: 'TRY',
225+
TT: 'TTD',
226+
TV: 'AUD',
227+
TW: 'TWD',
228+
TZ: 'TZS',
229+
UA: 'UAH',
230+
UG: 'UGX',
231+
UM: 'USD',
232+
US: 'USD',
233+
UY: 'UYU',
234+
UZ: 'UZS',
235+
VA: 'EUR',
236+
VC: 'XCD',
237+
VE: 'VEF',
238+
VG: 'USD',
239+
VI: 'USD',
240+
VN: 'VND',
241+
VU: 'VUV',
242+
WF: 'XPF',
243+
WS: 'WST',
244+
YE: 'YER',
245+
YT: 'EUR',
246+
ZA: 'ZAR',
247+
ZM: 'ZMW',
248+
ZW: 'ZWL'
249+
};

src/controls/dynamicForm/DynamicForm.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* eslint-disable @microsoft/spfx/no-async-await */
2+
import { SPHttpClient } from "@microsoft/sp-http";
3+
import { IInstalledLanguageInfo, sp } from "@pnp/sp/presets/all";
24
import * as strings from "ControlStrings";
35
import {
46
DefaultButton,
@@ -888,6 +890,12 @@ export class DynamicForm extends React.Component<
888890
disabledFields
889891
);
890892

893+
// Get installed languages for Currency fields
894+
let installedLanguages: IInstalledLanguageInfo[];
895+
if (tempFields.filter(f => f.fieldType === "Currency").length > 0) {
896+
installedLanguages = await sp.web.regionalSettings.getInstalledLanguages();
897+
}
898+
891899
this.setState({
892900
clientValidationFormulas,
893901
fieldCollection: tempFields,

src/controls/dynamicForm/IDynamicFormState.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
import { IInstalledLanguageInfo } from '@pnp/sp/regional-settings';
23
import { ISPField } from '../../common/SPEntities';
34
import { MessageBarType } from 'office-ui-fabric-react/lib/MessageBar';
45
import { ICustomFormattingBodySection, ICustomFormattingNode } from '../../common/utilities/ICustomFormatting';
@@ -10,6 +11,7 @@ export interface IDynamicFormState {
1011
}[];
1112
/** Form and List Item data */
1213
fieldCollection: IDynamicFieldProps[];
14+
installedLanguages?: IInstalledLanguageInfo[];
1315
/** Validation Formulas set in List Column settings */
1416
validationFormulas: Record<string, Pick<ISPField, 'ValidationFormula' | 'ValidationMessage'>>;
1517
/** Field Show / Hide Validation Formulas, set in Edit Form > Edit Columns > Edit Conditional Formula */

0 commit comments

Comments
 (0)