@panneau/intl 1.0.0-alpha.259 → 1.0.0-alpha.261

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/es/index.js CHANGED
@@ -152,4 +152,23 @@ var ResourceMessage = function ResourceMessage(_ref) {
152
152
  ResourceMessage.propTypes = propTypes;
153
153
  ResourceMessage.defaultProps = defaultProps;
154
154
 
155
- export { IntlManager, IntlProvider, ResourceMessage, intlManager as default };
155
+ var useResourceValues = function useResourceValues(resource) {
156
+ var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
157
+ var allValues = useMemo(function () {
158
+ var contextResource = useResource();
159
+
160
+ var _ref = resource || contextResource || {},
161
+ _ref$name = _ref.name,
162
+ name = _ref$name === void 0 ? null : _ref$name,
163
+ _ref$intl = _ref.intl;
164
+
165
+ _ref$intl = _ref$intl === void 0 ? {} : _ref$intl;
166
+ var resourceValues = _ref$intl.values;
167
+ return _objectSpread(_objectSpread({
168
+ name: name
169
+ }, resourceValues), values);
170
+ }, [resource, values]);
171
+ return allValues;
172
+ };
173
+
174
+ export { IntlManager, IntlProvider, ResourceMessage, intlManager as default, useResourceValues };
package/lib/index.js CHANGED
@@ -165,7 +165,27 @@ var ResourceMessage = function ResourceMessage(_ref) {
165
165
  ResourceMessage.propTypes = propTypes;
166
166
  ResourceMessage.defaultProps = defaultProps;
167
167
 
168
+ var useResourceValues = function useResourceValues(resource) {
169
+ var values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
170
+ var allValues = React.useMemo(function () {
171
+ var contextResource = contexts.useResource();
172
+
173
+ var _ref = resource || contextResource || {},
174
+ _ref$name = _ref.name,
175
+ name = _ref$name === void 0 ? null : _ref$name,
176
+ _ref$intl = _ref.intl;
177
+
178
+ _ref$intl = _ref$intl === void 0 ? {} : _ref$intl;
179
+ var resourceValues = _ref$intl.values;
180
+ return _objectSpread__default["default"](_objectSpread__default["default"]({
181
+ name: name
182
+ }, resourceValues), values);
183
+ }, [resource, values]);
184
+ return allValues;
185
+ };
186
+
168
187
  exports.IntlManager = IntlManager;
169
188
  exports.IntlProvider = IntlProvider;
170
189
  exports.ResourceMessage = ResourceMessage;
171
190
  exports["default"] = intlManager;
191
+ exports.useResourceValues = useResourceValues;
package/locale/en.cjs.js CHANGED
@@ -22,13 +22,16 @@ var EsoYzX = [{
22
22
  type: 0,
23
23
  value: "Previous"
24
24
  }];
25
- var HOobY2 = [{
25
+ var FntHPK = [{
26
26
  type: 0,
27
- value: "Error 401"
27
+ value: "View "
28
+ }, {
29
+ type: 1,
30
+ value: "the_plural"
28
31
  }];
29
- var IbZVf0 = [{
32
+ var HOobY2 = [{
30
33
  type: 0,
31
- value: "Submit"
34
+ value: "Error 401"
32
35
  }];
33
36
  var IuqEHB = [{
34
37
  type: 0,
@@ -54,10 +57,6 @@ var NI9440 = [{
54
57
  type: 0,
55
58
  value: "Add file"
56
59
  }];
57
- var PKCv5M = [{
58
- type: 0,
59
- value: "No item..."
60
- }];
61
60
  var Pih2UO = [{
62
61
  type: 0,
63
62
  value: "Error 403"
@@ -82,6 +81,10 @@ var UUv8FR = [{
82
81
  type: 0,
83
82
  value: "Name"
84
83
  }];
84
+ var UbmsLL = [{
85
+ type: 0,
86
+ value: "No item found."
87
+ }];
85
88
  var UpStcP = [{
86
89
  type: 0,
87
90
  value: "Could not find type for this item"
@@ -118,6 +121,13 @@ var d0g58T = [{
118
121
  type: 0,
119
122
  value: "Login"
120
123
  }];
124
+ var dkRdks = [{
125
+ type: 1,
126
+ value: "The_singular"
127
+ }, {
128
+ type: 0,
129
+ value: " has been deleted."
130
+ }];
121
131
  var ejwBSw = [{
122
132
  type: 0,
123
133
  value: "Error 500"
@@ -130,18 +140,25 @@ var gWmL5V = [{
130
140
  type: 0,
131
141
  value: "Disable two factor authentication"
132
142
  }];
133
- var gjBiyj = [{
134
- type: 0,
135
- value: "Loading..."
136
- }];
137
143
  var hezcGl = [{
138
144
  type: 0,
139
145
  value: "Go to home page"
140
146
  }];
147
+ var iFsDVR = [{
148
+ type: 0,
149
+ value: "Loading"
150
+ }];
141
151
  var li2Qqu = [{
142
152
  type: 0,
143
153
  value: "Skip setup"
144
154
  }];
155
+ var mCfzkJ = [{
156
+ type: 0,
157
+ value: "Edit "
158
+ }, {
159
+ type: 1,
160
+ value: "a_singular"
161
+ }];
145
162
  var owrRHV = [{
146
163
  type: 0,
147
164
  value: "Error 500"
@@ -178,6 +195,22 @@ var yALN2p = [{
178
195
  type: 0,
179
196
  value: "There was an error"
180
197
  }];
198
+ var yzfiXJ = [{
199
+ type: 0,
200
+ value: "Are you sure you want to delete "
201
+ }, {
202
+ type: 1,
203
+ value: "the_singular"
204
+ }, {
205
+ type: 0,
206
+ value: " #"
207
+ }, {
208
+ type: 1,
209
+ value: "id"
210
+ }, {
211
+ type: 0,
212
+ value: "?"
213
+ }];
181
214
  var zTiC4D = [{
182
215
  type: 0,
183
216
  value: "Do you wish to enable two factor authentication on your account? You will have to use an authentication app such as Google Authenticator or Microsoft Authenticator in addition to your password to connect."
@@ -257,6 +290,13 @@ var messages = {
257
290
  type: 0,
258
291
  value: "Error 401"
259
292
  }],
293
+ "6viUpq": [{
294
+ type: 0,
295
+ value: "Create "
296
+ }, {
297
+ type: 1,
298
+ value: "a_singular"
299
+ }],
260
300
  "7M0o0q": [{
261
301
  type: 0,
262
302
  value: "Item"
@@ -289,15 +329,14 @@ var messages = {
289
329
  }],
290
330
  ESkxLX: ESkxLX,
291
331
  EsoYzX: EsoYzX,
332
+ FntHPK: FntHPK,
292
333
  HOobY2: HOobY2,
293
- IbZVf0: IbZVf0,
294
334
  IuqEHB: IuqEHB,
295
335
  Ke35Pv: Ke35Pv,
296
336
  LI0Gz4: LI0Gz4,
297
337
  MHldGi: MHldGi,
298
338
  Mo0yQb: Mo0yQb,
299
339
  NI9440: NI9440,
300
- PKCv5M: PKCv5M,
301
340
  "PQX/ph": [{
302
341
  type: 0,
303
342
  value: "Create account"
@@ -316,6 +355,7 @@ var messages = {
316
355
  value: "Error 404"
317
356
  }],
318
357
  UUv8FR: UUv8FR,
358
+ UbmsLL: UbmsLL,
319
359
  UpStcP: UpStcP,
320
360
  VhJUeW: VhJUeW,
321
361
  X5RJlB: X5RJlB,
@@ -324,83 +364,34 @@ var messages = {
324
364
  ZBNqY2: ZBNqY2,
325
365
  ZxgNge: ZxgNge,
326
366
  bPk79b: bPk79b,
367
+ "bfP/d8": [{
368
+ type: 1,
369
+ value: "The_singular"
370
+ }, {
371
+ type: 0,
372
+ value: " has been created."
373
+ }],
327
374
  d0g58T: d0g58T,
375
+ dkRdks: dkRdks,
328
376
  ejwBSw: ejwBSw,
329
377
  g6qbbX: g6qbbX,
330
378
  gWmL5V: gWmL5V,
331
- gjBiyj: gjBiyj,
332
379
  hezcGl: hezcGl,
333
- li2Qqu: li2Qqu,
334
- owrRHV: owrRHV,
335
- pVHYDd: pVHYDd,
336
- "rSt+KL": [{
337
- type: 0,
338
- value: "No"
339
- }],
340
- "resources.confirm_delete": [{
341
- type: 0,
342
- value: "Are you sure you want to delete "
343
- }, {
344
- type: 1,
345
- value: "the_singular"
346
- }, {
347
- type: 0,
348
- value: " #"
349
- }, {
350
- type: 1,
351
- value: "id"
352
- }, {
353
- type: 0,
354
- value: "?"
355
- }],
356
- "resources.create": [{
380
+ iFsDVR: iFsDVR,
381
+ "l+ddDH": [{
357
382
  type: 0,
358
383
  value: "Create "
359
384
  }, {
360
385
  type: 1,
361
386
  value: "a_singular"
362
387
  }],
363
- "resources.create_btn": [{
364
- type: 0,
365
- value: "Create "
366
- }, {
367
- type: 1,
368
- value: "a_singular"
369
- }],
370
- "resources.created": [{
371
- type: 1,
372
- value: "the_singular"
373
- }, {
374
- type: 0,
375
- value: " has been created."
376
- }],
377
- "resources.delete": [{
378
- type: 0,
379
- value: "Delete "
380
- }, {
381
- type: 1,
382
- value: "a_singular"
383
- }],
384
- "resources.deleted": [{
385
- type: 1,
386
- value: "the_singular"
387
- }, {
388
- type: 0,
389
- value: " has been deleted."
390
- }],
391
- "resources.edit": [{
392
- type: 0,
393
- value: "Edit "
394
- }, {
395
- type: 1,
396
- value: "a_singular"
397
- }],
398
- "resources.view": [{
388
+ li2Qqu: li2Qqu,
389
+ mCfzkJ: mCfzkJ,
390
+ owrRHV: owrRHV,
391
+ pVHYDd: pVHYDd,
392
+ "rSt+KL": [{
399
393
  type: 0,
400
- value: "View "
401
- }, {
402
- type: 1,
403
- value: "plural"
394
+ value: "No"
404
395
  }],
405
396
  s4Xrs9: s4Xrs9,
406
397
  tPeIKO: tPeIKO,
@@ -409,6 +400,14 @@ var messages = {
409
400
  wa783M: wa783M,
410
401
  y9zauY: y9zauY,
411
402
  yALN2p: yALN2p,
403
+ yzfiXJ: yzfiXJ,
404
+ "zN5N/Q": [{
405
+ type: 0,
406
+ value: "Delete "
407
+ }, {
408
+ type: 1,
409
+ value: "a_singular"
410
+ }],
412
411
  zTiC4D: zTiC4D,
413
412
  zwks3g: zwks3g
414
413
  };
package/locale/en.js CHANGED
@@ -16,13 +16,16 @@ var EsoYzX = [{
16
16
  type: 0,
17
17
  value: "Previous"
18
18
  }];
19
- var HOobY2 = [{
19
+ var FntHPK = [{
20
20
  type: 0,
21
- value: "Error 401"
21
+ value: "View "
22
+ }, {
23
+ type: 1,
24
+ value: "the_plural"
22
25
  }];
23
- var IbZVf0 = [{
26
+ var HOobY2 = [{
24
27
  type: 0,
25
- value: "Submit"
28
+ value: "Error 401"
26
29
  }];
27
30
  var IuqEHB = [{
28
31
  type: 0,
@@ -48,10 +51,6 @@ var NI9440 = [{
48
51
  type: 0,
49
52
  value: "Add file"
50
53
  }];
51
- var PKCv5M = [{
52
- type: 0,
53
- value: "No item..."
54
- }];
55
54
  var Pih2UO = [{
56
55
  type: 0,
57
56
  value: "Error 403"
@@ -76,6 +75,10 @@ var UUv8FR = [{
76
75
  type: 0,
77
76
  value: "Name"
78
77
  }];
78
+ var UbmsLL = [{
79
+ type: 0,
80
+ value: "No item found."
81
+ }];
79
82
  var UpStcP = [{
80
83
  type: 0,
81
84
  value: "Could not find type for this item"
@@ -112,6 +115,13 @@ var d0g58T = [{
112
115
  type: 0,
113
116
  value: "Login"
114
117
  }];
118
+ var dkRdks = [{
119
+ type: 1,
120
+ value: "The_singular"
121
+ }, {
122
+ type: 0,
123
+ value: " has been deleted."
124
+ }];
115
125
  var ejwBSw = [{
116
126
  type: 0,
117
127
  value: "Error 500"
@@ -124,18 +134,25 @@ var gWmL5V = [{
124
134
  type: 0,
125
135
  value: "Disable two factor authentication"
126
136
  }];
127
- var gjBiyj = [{
128
- type: 0,
129
- value: "Loading..."
130
- }];
131
137
  var hezcGl = [{
132
138
  type: 0,
133
139
  value: "Go to home page"
134
140
  }];
141
+ var iFsDVR = [{
142
+ type: 0,
143
+ value: "Loading"
144
+ }];
135
145
  var li2Qqu = [{
136
146
  type: 0,
137
147
  value: "Skip setup"
138
148
  }];
149
+ var mCfzkJ = [{
150
+ type: 0,
151
+ value: "Edit "
152
+ }, {
153
+ type: 1,
154
+ value: "a_singular"
155
+ }];
139
156
  var owrRHV = [{
140
157
  type: 0,
141
158
  value: "Error 500"
@@ -172,6 +189,22 @@ var yALN2p = [{
172
189
  type: 0,
173
190
  value: "There was an error"
174
191
  }];
192
+ var yzfiXJ = [{
193
+ type: 0,
194
+ value: "Are you sure you want to delete "
195
+ }, {
196
+ type: 1,
197
+ value: "the_singular"
198
+ }, {
199
+ type: 0,
200
+ value: " #"
201
+ }, {
202
+ type: 1,
203
+ value: "id"
204
+ }, {
205
+ type: 0,
206
+ value: "?"
207
+ }];
175
208
  var zTiC4D = [{
176
209
  type: 0,
177
210
  value: "Do you wish to enable two factor authentication on your account? You will have to use an authentication app such as Google Authenticator or Microsoft Authenticator in addition to your password to connect."
@@ -251,6 +284,13 @@ var messages = {
251
284
  type: 0,
252
285
  value: "Error 401"
253
286
  }],
287
+ "6viUpq": [{
288
+ type: 0,
289
+ value: "Create "
290
+ }, {
291
+ type: 1,
292
+ value: "a_singular"
293
+ }],
254
294
  "7M0o0q": [{
255
295
  type: 0,
256
296
  value: "Item"
@@ -283,15 +323,14 @@ var messages = {
283
323
  }],
284
324
  ESkxLX: ESkxLX,
285
325
  EsoYzX: EsoYzX,
326
+ FntHPK: FntHPK,
286
327
  HOobY2: HOobY2,
287
- IbZVf0: IbZVf0,
288
328
  IuqEHB: IuqEHB,
289
329
  Ke35Pv: Ke35Pv,
290
330
  LI0Gz4: LI0Gz4,
291
331
  MHldGi: MHldGi,
292
332
  Mo0yQb: Mo0yQb,
293
333
  NI9440: NI9440,
294
- PKCv5M: PKCv5M,
295
334
  "PQX/ph": [{
296
335
  type: 0,
297
336
  value: "Create account"
@@ -310,6 +349,7 @@ var messages = {
310
349
  value: "Error 404"
311
350
  }],
312
351
  UUv8FR: UUv8FR,
352
+ UbmsLL: UbmsLL,
313
353
  UpStcP: UpStcP,
314
354
  VhJUeW: VhJUeW,
315
355
  X5RJlB: X5RJlB,
@@ -318,83 +358,34 @@ var messages = {
318
358
  ZBNqY2: ZBNqY2,
319
359
  ZxgNge: ZxgNge,
320
360
  bPk79b: bPk79b,
361
+ "bfP/d8": [{
362
+ type: 1,
363
+ value: "The_singular"
364
+ }, {
365
+ type: 0,
366
+ value: " has been created."
367
+ }],
321
368
  d0g58T: d0g58T,
369
+ dkRdks: dkRdks,
322
370
  ejwBSw: ejwBSw,
323
371
  g6qbbX: g6qbbX,
324
372
  gWmL5V: gWmL5V,
325
- gjBiyj: gjBiyj,
326
373
  hezcGl: hezcGl,
327
- li2Qqu: li2Qqu,
328
- owrRHV: owrRHV,
329
- pVHYDd: pVHYDd,
330
- "rSt+KL": [{
331
- type: 0,
332
- value: "No"
333
- }],
334
- "resources.confirm_delete": [{
335
- type: 0,
336
- value: "Are you sure you want to delete "
337
- }, {
338
- type: 1,
339
- value: "the_singular"
340
- }, {
341
- type: 0,
342
- value: " #"
343
- }, {
344
- type: 1,
345
- value: "id"
346
- }, {
347
- type: 0,
348
- value: "?"
349
- }],
350
- "resources.create": [{
374
+ iFsDVR: iFsDVR,
375
+ "l+ddDH": [{
351
376
  type: 0,
352
377
  value: "Create "
353
378
  }, {
354
379
  type: 1,
355
380
  value: "a_singular"
356
381
  }],
357
- "resources.create_btn": [{
358
- type: 0,
359
- value: "Create "
360
- }, {
361
- type: 1,
362
- value: "a_singular"
363
- }],
364
- "resources.created": [{
365
- type: 1,
366
- value: "the_singular"
367
- }, {
368
- type: 0,
369
- value: " has been created."
370
- }],
371
- "resources.delete": [{
372
- type: 0,
373
- value: "Delete "
374
- }, {
375
- type: 1,
376
- value: "a_singular"
377
- }],
378
- "resources.deleted": [{
379
- type: 1,
380
- value: "the_singular"
381
- }, {
382
- type: 0,
383
- value: " has been deleted."
384
- }],
385
- "resources.edit": [{
386
- type: 0,
387
- value: "Edit "
388
- }, {
389
- type: 1,
390
- value: "a_singular"
391
- }],
392
- "resources.view": [{
382
+ li2Qqu: li2Qqu,
383
+ mCfzkJ: mCfzkJ,
384
+ owrRHV: owrRHV,
385
+ pVHYDd: pVHYDd,
386
+ "rSt+KL": [{
393
387
  type: 0,
394
- value: "View "
395
- }, {
396
- type: 1,
397
- value: "plural"
388
+ value: "No"
398
389
  }],
399
390
  s4Xrs9: s4Xrs9,
400
391
  tPeIKO: tPeIKO,
@@ -403,6 +394,14 @@ var messages = {
403
394
  wa783M: wa783M,
404
395
  y9zauY: y9zauY,
405
396
  yALN2p: yALN2p,
397
+ yzfiXJ: yzfiXJ,
398
+ "zN5N/Q": [{
399
+ type: 0,
400
+ value: "Delete "
401
+ }, {
402
+ type: 1,
403
+ value: "a_singular"
404
+ }],
406
405
  zTiC4D: zTiC4D,
407
406
  zwks3g: zwks3g
408
407
  };