@mirai/core 0.3.363 → 0.3.364

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.
Files changed (39) hide show
  1. package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Modal.test.js.snap +24 -24
  2. package/build/components/BookingQuery/__tests__/__snapshots__/BookingQuery.test.js.snap +30 -30
  3. package/build/components/Chat/components/Input/__tests__/__snapshots__/Input.test.jsx.snap +9 -9
  4. package/build/components/Chat/components/InputRich/__tests__/__snapshots__/InputRich.test.jsx.snap +17 -17
  5. package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Confirmation.test.js.snap +30 -24
  6. package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Form.test.js.snap +8 -8
  7. package/build/components/Deals/__tests__/__snapshots__/Deals.Calendar.test.js.snap +6 -6
  8. package/build/components/Deals/__tests__/__snapshots__/Deals.test.js.snap +95 -70
  9. package/build/components/Finder/Finder.compact.js +1 -1
  10. package/build/components/Finder/Finder.compact.js.map +1 -1
  11. package/build/components/Finder/Finder.js +1 -0
  12. package/build/components/Finder/Finder.js.map +1 -1
  13. package/build/components/Finder/Finder.module.css +21 -10
  14. package/build/components/Finder/__tests__/__snapshots__/Finder.test.js.snap +294 -210
  15. package/build/components/Finder/components/Calendar/__tests__/__snapshots__/Calendar.test.js.snap +18 -18
  16. package/build/components/Rates/Rates.js +1 -1
  17. package/build/components/Rates/Rates.js.map +1 -1
  18. package/build/components/Rates/components/Filters/Filters.module.css +4 -0
  19. package/build/components/Rates/components/ModalExtras/ModalExtras.js +0 -1
  20. package/build/components/Rates/components/ModalExtras/ModalExtras.js.map +1 -1
  21. package/build/components/Session/__tests__/__snapshots__/Session.test.js.snap +33 -33
  22. package/build/components/Signup/__tests__/__snapshots__/Signup.test.js.snap +9 -6
  23. package/build/components/__shared__/BookingDetails/__tests__/__snapshots__/BookingDetails.test.js.snap +10 -10
  24. package/build/components/__shared__/BookingTerms/__tests__/__snapshots__/BookingTerms.test.js.snap +8 -8
  25. package/build/components/__shared__/ButtonMore/__tests__/__snapshots__/ButtonMore.test.js.snap +6 -6
  26. package/build/components/__shared__/ButtonPayment/__tests__/__snapshots__/ButtonPayment.test.js.snap +17 -17
  27. package/build/components/__shared__/ButtonPayment/components/FormCheckout/__tests__/__snapshots__/FormCheckout.test.js.snap +9 -9
  28. package/build/components/__shared__/ButtonPayment/components/FormPaycomet/__tests__/__snapshots__/FormPaycomet.test.js.snap +3 -2
  29. package/build/components/__shared__/Field/__tests__/__snapshots__/Field.test.js.snap +32 -32
  30. package/build/components/__shared__/FieldOccupation/FieldOccupation.js +3 -0
  31. package/build/components/__shared__/FieldOccupation/FieldOccupation.js.map +1 -1
  32. package/build/components/__shared__/FieldOccupation/__tests__/__snapshots__/FieldOccupation.test.js.snap +150 -96
  33. package/build/components/__shared__/Occupation/Occupation.Group.js +4 -2
  34. package/build/components/__shared__/Occupation/Occupation.Group.js.map +1 -1
  35. package/build/components/__shared__/Occupation/Occupation.js +2 -1
  36. package/build/components/__shared__/Occupation/Occupation.js.map +1 -1
  37. package/build/components/__shared__/Occupation/__tests__/__snapshots__/Occupation.test.js.snap +258 -168
  38. package/build/theme.css +2 -0
  39. package/package.json +1 -1
@@ -138,8 +138,9 @@ exports[`component:<FormCheckout> renders 1`] = `
138
138
  </ui-view>
139
139
  </ui-view>
140
140
  </ui-view>
141
- <button
141
+ <ui-button
142
142
  class="pressable button large wide"
143
+ disabled="false"
143
144
  tabindex="0"
144
145
  >
145
146
  <ui-view
@@ -154,7 +155,7 @@ exports[`component:<FormCheckout> renders 1`] = `
154
155
  >
155
156
  payments.action.pay
156
157
  </ui-view>
157
- </button>
158
+ </ui-button>
158
159
  </form>
159
160
  <div
160
161
  id="paymentErrorMsg"
@@ -25,7 +25,7 @@ exports[`component:<Field> Mobile environment prop:visible 1`] = `
25
25
  <ui-view
26
26
  class="view row header hideBack"
27
27
  >
28
- <button
28
+ <ui-button
29
29
  class="pressable button small squared transparent button"
30
30
  tabindex="0"
31
31
  >
@@ -51,7 +51,7 @@ exports[`component:<Field> Mobile environment prop:visible 1`] = `
51
51
  />
52
52
  </svg>
53
53
  </ui-icon>
54
- </button>
54
+ </ui-button>
55
55
  </ui-view>
56
56
  Mirai-children
57
57
  </ui-modal>
@@ -84,7 +84,7 @@ exports[`component:<Field> inherit:className 1`] = `
84
84
  <ui-view
85
85
  class="view row header hideBack"
86
86
  >
87
- <button
87
+ <ui-button
88
88
  class="pressable button small squared transparent button"
89
89
  tabindex="0"
90
90
  >
@@ -110,7 +110,7 @@ exports[`component:<Field> inherit:className 1`] = `
110
110
  />
111
111
  </svg>
112
112
  </ui-icon>
113
- </button>
113
+ </ui-button>
114
114
  </ui-view>
115
115
  Mirai-children
116
116
  </ui-modal>
@@ -145,7 +145,7 @@ exports[`component:<Field> prop:caption 1`] = `
145
145
  <ui-view
146
146
  class="view row header hideBack"
147
147
  >
148
- <button
148
+ <ui-button
149
149
  class="pressable button small squared transparent button"
150
150
  tabindex="0"
151
151
  >
@@ -171,7 +171,7 @@ exports[`component:<Field> prop:caption 1`] = `
171
171
  />
172
172
  </svg>
173
173
  </ui-icon>
174
- </button>
174
+ </ui-button>
175
175
  </ui-view>
176
176
  Mirai-children
177
177
  </ui-modal>
@@ -204,7 +204,7 @@ exports[`component:<Field> prop:centered 1`] = `
204
204
  <ui-view
205
205
  class="view row header hideBack"
206
206
  >
207
- <button
207
+ <ui-button
208
208
  class="pressable button small squared transparent button"
209
209
  tabindex="0"
210
210
  >
@@ -230,7 +230,7 @@ exports[`component:<Field> prop:centered 1`] = `
230
230
  />
231
231
  </svg>
232
232
  </ui-icon>
233
- </button>
233
+ </ui-button>
234
234
  </ui-view>
235
235
  Mirai-children
236
236
  </ui-modal>
@@ -251,7 +251,7 @@ exports[`component:<Field> prop:compacted 1`] = `
251
251
  <ui-view
252
252
  class="view row header hideBack"
253
253
  >
254
- <button
254
+ <ui-button
255
255
  class="pressable button small squared transparent button"
256
256
  tabindex="0"
257
257
  >
@@ -277,7 +277,7 @@ exports[`component:<Field> prop:compacted 1`] = `
277
277
  />
278
278
  </svg>
279
279
  </ui-icon>
280
- </button>
280
+ </ui-button>
281
281
  </ui-view>
282
282
  Mirai-children
283
283
  </ui-modal>
@@ -331,7 +331,7 @@ exports[`component:<Field> prop:error 1`] = `
331
331
  <ui-view
332
332
  class="view row header hideBack"
333
333
  >
334
- <button
334
+ <ui-button
335
335
  class="pressable button small squared transparent button"
336
336
  tabindex="0"
337
337
  >
@@ -357,7 +357,7 @@ exports[`component:<Field> prop:error 1`] = `
357
357
  />
358
358
  </svg>
359
359
  </ui-icon>
360
- </button>
360
+ </ui-button>
361
361
  </ui-view>
362
362
  Mirai-children
363
363
  </ui-modal>
@@ -418,7 +418,7 @@ exports[`component:<Field> prop:icon 1`] = `
418
418
  <ui-view
419
419
  class="view row header hideBack"
420
420
  >
421
- <button
421
+ <ui-button
422
422
  class="pressable button small squared transparent button"
423
423
  tabindex="0"
424
424
  >
@@ -444,7 +444,7 @@ exports[`component:<Field> prop:icon 1`] = `
444
444
  />
445
445
  </svg>
446
446
  </ui-icon>
447
- </button>
447
+ </ui-button>
448
448
  </ui-view>
449
449
  Mirai-children
450
450
  </ui-modal>
@@ -477,7 +477,7 @@ exports[`component:<Field> prop:inline 1`] = `
477
477
  <ui-view
478
478
  class="view row header hideBack"
479
479
  >
480
- <button
480
+ <ui-button
481
481
  class="pressable button small squared transparent button"
482
482
  tabindex="0"
483
483
  >
@@ -503,7 +503,7 @@ exports[`component:<Field> prop:inline 1`] = `
503
503
  />
504
504
  </svg>
505
505
  </ui-icon>
506
- </button>
506
+ </ui-button>
507
507
  </ui-view>
508
508
  Mirai-children
509
509
  </ui-modal>
@@ -561,7 +561,7 @@ exports[`component:<Field> prop:label 1`] = `
561
561
  >
562
562
  Mirai-label
563
563
  </ui-text>
564
- <button
564
+ <ui-button
565
565
  class="pressable button small squared transparent button"
566
566
  tabindex="0"
567
567
  >
@@ -586,7 +586,7 @@ exports[`component:<Field> prop:label 1`] = `
586
586
  />
587
587
  </svg>
588
588
  </ui-icon>
589
- </button>
589
+ </ui-button>
590
590
  </ui-view>
591
591
  Mirai-children
592
592
  </ui-modal>
@@ -621,7 +621,7 @@ exports[`component:<Field> prop:placeholder 1`] = `
621
621
  <ui-view
622
622
  class="view row header hideBack"
623
623
  >
624
- <button
624
+ <ui-button
625
625
  class="pressable button small squared transparent button"
626
626
  tabindex="0"
627
627
  >
@@ -647,7 +647,7 @@ exports[`component:<Field> prop:placeholder 1`] = `
647
647
  />
648
648
  </svg>
649
649
  </ui-icon>
650
- </button>
650
+ </ui-button>
651
651
  </ui-view>
652
652
  Mirai-children
653
653
  </ui-modal>
@@ -680,7 +680,7 @@ exports[`component:<Field> prop:tabIndex 1`] = `
680
680
  <ui-view
681
681
  class="view row header hideBack"
682
682
  >
683
- <button
683
+ <ui-button
684
684
  class="pressable button small squared transparent button"
685
685
  tabindex="0"
686
686
  >
@@ -706,7 +706,7 @@ exports[`component:<Field> prop:tabIndex 1`] = `
706
706
  />
707
707
  </svg>
708
708
  </ui-icon>
709
- </button>
709
+ </ui-button>
710
710
  </ui-view>
711
711
  Mirai-children
712
712
  </ui-modal>
@@ -739,7 +739,7 @@ exports[`component:<Field> prop:visible && centered 1`] = `
739
739
  <ui-view
740
740
  class="view row header hideBack"
741
741
  >
742
- <button
742
+ <ui-button
743
743
  class="pressable button small squared transparent button"
744
744
  tabindex="0"
745
745
  >
@@ -765,7 +765,7 @@ exports[`component:<Field> prop:visible && centered 1`] = `
765
765
  />
766
766
  </svg>
767
767
  </ui-icon>
768
- </button>
768
+ </ui-button>
769
769
  </ui-view>
770
770
  Mirai-children
771
771
  </ui-modal>
@@ -798,7 +798,7 @@ exports[`component:<Field> prop:visible 1`] = `
798
798
  <ui-view
799
799
  class="view row header hideBack"
800
800
  >
801
- <button
801
+ <ui-button
802
802
  class="pressable button small squared transparent button"
803
803
  tabindex="0"
804
804
  >
@@ -824,7 +824,7 @@ exports[`component:<Field> prop:visible 1`] = `
824
824
  />
825
825
  </svg>
826
826
  </ui-icon>
827
- </button>
827
+ </ui-button>
828
828
  </ui-view>
829
829
  Mirai-children
830
830
  </ui-modal>
@@ -874,7 +874,7 @@ exports[`component:<Field> prop:warning 1`] = `
874
874
  <ui-view
875
875
  class="view row header hideBack"
876
876
  >
877
- <button
877
+ <ui-button
878
878
  class="pressable button small squared transparent button"
879
879
  tabindex="0"
880
880
  >
@@ -900,7 +900,7 @@ exports[`component:<Field> prop:warning 1`] = `
900
900
  />
901
901
  </svg>
902
902
  </ui-icon>
903
- </button>
903
+ </ui-button>
904
904
  </ui-view>
905
905
  Mirai-children
906
906
  </ui-modal>
@@ -933,7 +933,7 @@ exports[`component:<Field> renders 1`] = `
933
933
  <ui-view
934
934
  class="view row header hideBack"
935
935
  >
936
- <button
936
+ <ui-button
937
937
  class="pressable button small squared transparent button"
938
938
  tabindex="0"
939
939
  >
@@ -959,7 +959,7 @@ exports[`component:<Field> renders 1`] = `
959
959
  />
960
960
  </svg>
961
961
  </ui-icon>
962
- </button>
962
+ </ui-button>
963
963
  </ui-view>
964
964
  Mirai-children
965
965
  </ui-modal>
@@ -995,7 +995,7 @@ exports[`component:<Field> testID 1`] = `
995
995
  <ui-view
996
996
  class="view row header hideBack"
997
997
  >
998
- <button
998
+ <ui-button
999
999
  class="pressable button small squared transparent button"
1000
1000
  data-testid="mirai-modal-button-close"
1001
1001
  tabindex="0"
@@ -1022,7 +1022,7 @@ exports[`component:<Field> testID 1`] = `
1022
1022
  />
1023
1023
  </svg>
1024
1024
  </ui-icon>
1025
- </button>
1025
+ </ui-button>
1026
1026
  </ui-view>
1027
1027
  Mirai-children
1028
1028
  </ui-modal>
@@ -26,6 +26,7 @@ const FieldOccupation = exports.FieldOccupation = /*#__PURE__*/_react.default.fo
26
26
  hideLabel,
27
27
  hotels = [],
28
28
  inline,
29
+ tabIndex,
29
30
  value,
30
31
  visible,
31
32
  warning,
@@ -62,6 +63,7 @@ const FieldOccupation = exports.FieldOccupation = /*#__PURE__*/_react.default.fo
62
63
  icon: _helpers.ICON.PEOPLE,
63
64
  inline: inline,
64
65
  label: !hideLabel ? translate(_FieldOccupation.L10N.LABEL_WHO) : undefined,
66
+ tabIndex: tabIndex,
65
67
  visible: visible,
66
68
  warning: warning,
67
69
  onPress: onPress,
@@ -85,6 +87,7 @@ FieldOccupation.propTypes = {
85
87
  hotels: _propTypes.default.array,
86
88
  hideLabel: _propTypes.default.bool,
87
89
  inline: _propTypes.default.bool,
90
+ tabIndex: _propTypes.default.any,
88
91
  value: _propTypes.default.arrayOf(_propTypes.default.arrayOf(_Occupation2.SHAPE.VALUE)),
89
92
  visible: _propTypes.default.bool,
90
93
  warning: _propTypes.default.bool,
@@ -1 +1 @@
1
- {"version":3,"file":"FieldOccupation.js","names":["_dataSources","require","_locale","_propTypes","_interopRequireDefault","_react","_FieldOccupation","style","_interopRequireWildcard","_prepareRoom","_helpers","_Field","_Occupation","_Occupation2","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","_extends","assign","bind","target","arguments","length","source","key","apply","FieldOccupation","exports","React","forwardRef","_ref","ref","compacted","error","hideLabel","hotels","inline","value","visible","warning","withWarning","onPress","onSubmit","others","translate","useLocale","config","dataSource","lodgingDenomination","individual","useStore","minRooms","testId","type","getAccommodationType","caption","getOccupationSummary","Array","map","prepareRoom","createElement","Field","icon","ICON","PEOPLE","label","L10N","LABEL_WHO","undefined","className","occupation","concat","Occupation","displayName","propTypes","PropTypes","bool","array","arrayOf","SHAPE","VALUE","func"],"sources":["../../../../src/components/__shared__/FieldOccupation/FieldOccupation.jsx"],"sourcesContent":["import { useStore } from '@mirai/data-sources';\nimport { useLocale } from '@mirai/locale';\nimport PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { L10N } from './FieldOccupation.l10n';\nimport * as style from './FieldOccupation.module.css';\nimport { prepareRoom } from '../../../helpers/prepareRoom';\nimport { getAccommodationType, getOccupationSummary, ICON } from '../../helpers';\nimport { Field } from '../Field';\nimport { Occupation as OccupationBase } from '../Occupation';\nimport { SHAPE } from '../Occupation/Occupation.constants';\n\nconst FieldOccupation = React.forwardRef(\n (\n {\n compacted,\n error,\n hideLabel,\n hotels = [],\n inline,\n value,\n visible,\n warning,\n withWarning,\n onPress,\n onSubmit,\n ...others\n },\n ref,\n ) => {\n const { translate } = useLocale();\n const {\n value: { config: { hotels: dataSource, lodgingDenomination: individual } = {} },\n } = useStore();\n\n const { minRooms = 1, testId } = others;\n const type = getAccommodationType({ dataSource, hotels, individual });\n const caption = getOccupationSummary(\n value || [...Array(minRooms)].map(() => prepareRoom(others.dataSource)),\n translate,\n type,\n );\n\n return (\n <Field\n caption={caption}\n compacted={compacted}\n error={error}\n icon={ICON.PEOPLE}\n inline={inline}\n label={!hideLabel ? translate(L10N.LABEL_WHO) : undefined}\n visible={visible}\n warning={warning}\n onPress={onPress}\n className={[style.occupation, others.className]}\n testId={testId ? `${testId}-field` : undefined}\n style={others.style}\n >\n <OccupationBase\n {...others}\n ref={ref}\n type={type}\n value={value}\n warning={withWarning}\n onSubmit={onSubmit}\n className={undefined}\n style={undefined}\n />\n </Field>\n );\n },\n);\n\nFieldOccupation.displayName = 'Mirai:Core:FieldOccupation';\n\nFieldOccupation.propTypes = {\n compacted: PropTypes.bool,\n error: PropTypes.bool,\n hotels: PropTypes.array,\n hideLabel: PropTypes.bool,\n inline: PropTypes.bool,\n value: PropTypes.arrayOf(PropTypes.arrayOf(SHAPE.VALUE)),\n visible: PropTypes.bool,\n warning: PropTypes.bool,\n withWarning: PropTypes.bool,\n onPress: PropTypes.func,\n onSubmit: PropTypes.func,\n};\n\nexport { FieldOccupation };\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IA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AAED,SAAU;IACrBhF,KAAK,EAAEgF;EAAU,EAClB,CACI,CAAC;AAEZ,CACF,CAAC;AAED1C,eAAe,CAAC+C,WAAW,GAAG,4BAA4B;AAE1D/C,eAAe,CAACgD,SAAS,GAAG;EAC1B1C,SAAS,EAAE2C,kBAAS,CAACC,IAAI;EACzB3C,KAAK,EAAE0C,kBAAS,CAACC,IAAI;EACrBzC,MAAM,EAAEwC,kBAAS,CAACE,KAAK;EACvB3C,SAAS,EAAEyC,kBAAS,CAACC,IAAI;EACzBxC,MAAM,EAAEuC,kBAAS,CAACC,IAAI;EACtBvC,KAAK,EAAEsC,kBAAS,CAACG,OAAO,CAACH,kBAAS,CAACG,OAAO,CAACC,kBAAK,CAACC,KAAK,CAAC,CAAC;EACxD1C,OAAO,EAAEqC,kBAAS,CAACC,IAAI;EACvBrC,OAAO,EAAEoC,kBAAS,CAACC,IAAI;EACvBpC,WAAW,EAAEmC,kBAAS,CAACC,IAAI;EAC3BnC,OAAO,EAAEkC,kBAAS,CAACM,IAAI;EACvBvC,QAAQ,EAAEiC,kBAAS,CAACM;AACtB,CAAC"}
1
+ {"version":3,"file":"FieldOccupation.js","names":["_dataSources","require","_locale","_propTypes","_interopRequireDefault","_react","_FieldOccupation","style","_interopRequireWildcard","_prepareRoom","_helpers","_Field","_Occupation","_Occupation2","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","_extends","assign","bind","target","arguments","length","source","key","apply","FieldOccupation","exports","React","forwardRef","_ref","ref","compacted","error","hideLabel","hotels","inline","tabIndex","value","visible","warning","withWarning","onPress","onSubmit","others","translate","useLocale","config","dataSource","lodgingDenomination","individual","useStore","minRooms","testId","type","getAccommodationType","caption","getOccupationSummary","Array","map","prepareRoom","createElement","Field","icon","ICON","PEOPLE","label","L10N","LABEL_WHO","undefined","className","occupation","concat","Occupation","displayName","propTypes","PropTypes","bool","array","any","arrayOf","SHAPE","VALUE","func"],"sources":["../../../../src/components/__shared__/FieldOccupation/FieldOccupation.jsx"],"sourcesContent":["import { useStore } from '@mirai/data-sources';\nimport { useLocale } from '@mirai/locale';\nimport PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { L10N } from './FieldOccupation.l10n';\nimport * as style from './FieldOccupation.module.css';\nimport { prepareRoom } from '../../../helpers/prepareRoom';\nimport { getAccommodationType, getOccupationSummary, ICON } from '../../helpers';\nimport { Field } from '../Field';\nimport { Occupation as OccupationBase } from '../Occupation';\nimport { SHAPE } from '../Occupation/Occupation.constants';\n\nconst FieldOccupation = React.forwardRef(\n (\n {\n compacted,\n error,\n hideLabel,\n hotels = [],\n inline,\n tabIndex,\n value,\n visible,\n warning,\n withWarning,\n onPress,\n onSubmit,\n ...others\n },\n ref,\n ) => {\n const { translate } = useLocale();\n const {\n value: { config: { hotels: dataSource, lodgingDenomination: individual } = {} },\n } = useStore();\n\n const { minRooms = 1, testId } = others;\n const type = getAccommodationType({ dataSource, hotels, individual });\n const caption = getOccupationSummary(\n value || [...Array(minRooms)].map(() => prepareRoom(others.dataSource)),\n translate,\n type,\n );\n\n return (\n <Field\n caption={caption}\n compacted={compacted}\n error={error}\n icon={ICON.PEOPLE}\n inline={inline}\n label={!hideLabel ? translate(L10N.LABEL_WHO) : undefined}\n tabIndex={tabIndex}\n visible={visible}\n warning={warning}\n onPress={onPress}\n className={[style.occupation, others.className]}\n testId={testId ? `${testId}-field` : undefined}\n style={others.style}\n >\n <OccupationBase\n {...others}\n ref={ref}\n type={type}\n value={value}\n warning={withWarning}\n onSubmit={onSubmit}\n className={undefined}\n style={undefined}\n />\n </Field>\n );\n },\n);\n\nFieldOccupation.displayName = 'Mirai:Core:FieldOccupation';\n\nFieldOccupation.propTypes = {\n compacted: PropTypes.bool,\n error: PropTypes.bool,\n hotels: PropTypes.array,\n hideLabel: PropTypes.bool,\n inline: PropTypes.bool,\n tabIndex: PropTypes.any,\n value: PropTypes.arrayOf(PropTypes.arrayOf(SHAPE.VALUE)),\n visible: PropTypes.bool,\n warning: PropTypes.bool,\n withWarning: PropTypes.bool,\n onPress: PropTypes.func,\n onSubmit: PropTypes.func,\n};\n\nexport { FieldOccupation };\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,MAAA,GAAAD,sBAAA,CAAAH,OAAA;AAEA,IAAAK,gBAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAC,uBAAA,CAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,YAAA,GAAAZ,OAAA;AAA2D,SAAAa,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,I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