@nestio/pam 2.0.9 → 2.0.10-beta.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.
Files changed (115) hide show
  1. package/.buildkite/docker-compose-ci.yml +1 -1
  2. package/.buildkite/pipeline.yaml +12 -0
  3. package/.buildkite/security/configs/trivy-main-scan.yaml +25 -0
  4. package/.buildkite/security/envs/env.conf +25 -0
  5. package/.buildkite/security/securitychecks.sh +18 -0
  6. package/.buildkite/steps/scan-repo.sh +4 -0
  7. package/.buildkite/{test.sh → steps/test.sh} +1 -1
  8. package/.github/workflows/publish.yaml +69 -0
  9. package/.nvmrc +1 -1
  10. package/.zed/settings.json +10 -0
  11. package/README.md +28 -5
  12. package/package.json +6 -3
  13. package/src/components/AsyncSelect.jsx +11 -11
  14. package/src/components/CalendarInput.jsx +13 -11
  15. package/src/components/CalendarRangeSelectMenu.jsx +1 -1
  16. package/src/components/CalendarSelect.jsx +4 -8
  17. package/src/components/MultiSelect.jsx +8 -8
  18. package/src/components/MultiSelectOption.jsx +13 -12
  19. package/src/components/MultiSelectValue.jsx +10 -8
  20. package/src/components/PriceSelect.jsx +25 -24
  21. package/src/components/SingleSelect.jsx +13 -13
  22. package/src/components/SingleSelectOption.jsx +7 -13
  23. package/src/components/SingleSelectValue.jsx +7 -6
  24. package/src/components/TabbedSelect.jsx +10 -10
  25. package/src/components/TagBox.jsx +1 -1
  26. package/src/components/TagBoxMenuSelect.jsx +8 -8
  27. package/src/components/TagBoxValueSelect.jsx +9 -8
  28. package/.buildkite/pipeline.yml +0 -5
  29. package/jest_0/haste-map-7e9d9c62c6a662023c5d70c339d0ced6-7cc69482edc7eb47bffb62d943e851b2 +0 -1
  30. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/06/CalendarSelectMenu_0679a734fd26e8140710c91a2af73fdc +0 -67
  31. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/0a/MultiSelect.spec_0aefd16b0f09b26294e82fb93fe1e4b0 +0 -56
  32. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/0e/CalendarRangeSelectValueAdapter_0e2460820b4c7f3bc73311146b33d735 +0 -38
  33. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/10/styleMock_1054df670b2b25a407717710ad14248e +0 -2
  34. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/17/BaseValueAdapter_17511db398391484fe4506f5fb9bd5e1 +0 -34
  35. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/1b/SingleSelectInputValue_1b0040997a8e46813a394be3df8d4902 +0 -21
  36. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/1e/SingleSelectOption.spec_1e96cdf77f96dbcb3c3e99ccf1e6162e +0 -48
  37. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/21/SingleSelectValue_21803244102691ca5021420840c10377 +0 -14
  38. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/23/Collapse_233c7ec28f5b68acaeb91eb3fe6ab4a8 +0 -29
  39. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/23/TabbedSelect.spec_23d563a9f085b056db12caf92bdf3a6b +0 -132
  40. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/26/BasicMenu.spec_267a046ea90c9e11ba1060c8d4296399 +0 -41
  41. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/28/comparators_28f44e6dd602b9cf338ddf679330692a +0 -15
  42. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/2a/TagBox.spec_2aab3c34fb4bedfb663e01ed8860b92d +0 -125
  43. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/2c/MultiSelectOption.spec_2ce3fc75e1b935ca998f2de22a5fa1e2 +0 -100
  44. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/30/BadgeValue_3086cf0362fc10cf60860d93d22c44e0 +0 -54
  45. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/32/TagBoxValue_320444b52aab3fde04dd463ac15d98fe +0 -36
  46. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/35/CalendarInput.spec_354c6add6b94157fdd3a7285d6095b54 +0 -149
  47. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/36/CalendarRangeSelectValueAdapter.spec_3626d6dbf2a83120d5a5d862e175d843 +0 -59
  48. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/38/SelectOption.spec_3840fafef6784d17cf7e40b17ecce88e +0 -96
  49. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/45/TabbedMenu.spec_45955bd4d417a673c51fb3a53eaabdb2 +0 -259
  50. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/4d/BaseValueAdapter.spec_4d1d47358891a347e7bf833a6d040ea7 +0 -30
  51. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/4d/SelectValue.spec_4d42c95a61ecede772952464d21833e7 +0 -106
  52. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/4d/TagBoxMenu_4d2e828a6ff7c4a9a4cc2198963a9b70 +0 -34
  53. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/4e/CalendarInput_4ef2298695da3980204ea452b7fdb0a4 +0 -160
  54. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/56/Collapse.spec_560240621f26d92bd3369c0d14e933f0 +0 -26
  55. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/5a/MultiSelectValueAdapter.spec_5a0adb43772ad6bb7389179241874a84 +0 -104
  56. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/5f/InputValue_5fa5b4c2a24f25c31f10553db3eca2a7 +0 -102
  57. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/61/PriceMenu.spec_614afe08ff89b9d73123f4f3fb02a1e5 +0 -214
  58. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/64/InputValueMenu_647f6d09be204b353c37fb7f7ae83528 +0 -30
  59. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/65/CalendarRangeSelect_65dfcee5434a980da3608f757e45331d +0 -91
  60. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/66/CalendarRangeSelect.spec_66a914f5794d15aee1f09b02b6196f3b +0 -93
  61. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/68/CalendarRangeSelectMenu_68b72bc98b1ca2af1002082e02937a3a +0 -94
  62. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/6d/MenuContainer_6d38ef91176713e8764a565c842288be +0 -20
  63. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/74/MenuContainer.spec_743a8c2e8e0fa76429d3bd6f978bd662 +0 -14
  64. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/75/PriceMenu_75405250d3e4f5e03f03595b38367c74 +0 -169
  65. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/78/SingleSelectValueAdapter.spec_78efc1145a6c7b878b73046dd6c377e3 +0 -26
  66. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/7a/MomentValueAdapter.spec_7a902fadac5ab558e9eab31c2efe7e62 +0 -34
  67. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/7d/constants_7d77953ab3aab9177392ca1253527944 +0 -2
  68. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/80/CalendarSelectMenu.spec_802d520df5723c56c5a8c3324b7481da +0 -30
  69. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/83/setupShims_83b5988778590bd57241b8324efa72ca +0 -1
  70. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/86/BadgeValue.spec_8672a63efcfee7da91fa15ba5a35cd01 +0 -68
  71. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/86/PriceSelect.spec_8673730442271be421a9829646d05ce2 +0 -119
  72. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/8a/LoadingIcon_8a35f5a59768201d2879ace3aa9523a7 +0 -10
  73. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/8a/enhanceWithInputEl.spec_8a7b3d4d0425819c272ab4059e697379 +0 -95
  74. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/8b/KeyInterceptingInput.spec_8b687c9b90b903499eaf8f91d9f994b3 +0 -63
  75. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/8e/AsyncSelect_8ea6fa986adeff02b70d417e1a15218c +0 -134
  76. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/8e/keys_8e4410378373c7787da90cac9d9d60af +0 -21
  77. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/8f/PropTypes_8f855737e91f1a2770253b10397ac8ee +0 -10
  78. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/8f/SelectValue_8ff517c39801f6615c73b22975b6447a +0 -119
  79. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/91/SingleSelect_91b44d0827c7f15e26bc4e887823c206 +0 -83
  80. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/93/setupEnzyme_933f67f8c39c258b9d2335cbe4e95364 +0 -4
  81. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/97/PriceSelect_979c59a0e85681717c67156c65f9f809 +0 -109
  82. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/98/BasicMinLengthComponent_98bb21df3528956f5cbb019301e14b94 +0 -15
  83. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/9b/AsyncSelect.spec_9baf86a23020df3259e4fb6df8431f1d +0 -51
  84. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/9c/TagBoxMenu.spec_9cb3bee05b20c81208feb0572bf2bd04 +0 -26
  85. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/9e/TabbedSelect_9e04df7b8be41cc32cc8c50f7f5b7a48 +0 -58
  86. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/a9/InputValueMenu.spec_a9acf02a3913b35fe24e9d3bae4089e5 +0 -26
  87. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/a9/SingleSelectValueAdapter_a9bc352946e0fe578ce65f0c505bda44 +0 -41
  88. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/ae/TagBoxValue.spec_ae6486a049d279c74e941ea760764a14 +0 -34
  89. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/af/MultiSelectValueAdapter_af678a8270b3e04d8f158e8ac9505ca7 +0 -68
  90. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/b0/InputValue.spec_b073e3e2e5dbce98021066a66b122b2c +0 -60
  91. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/b5/OptionsList_b52e9f2995c75ea418697ae4f06db4f5 +0 -45
  92. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/bc/SingleSelectOption_bcf8a7eb60900c59cc157ac55fcfb723 +0 -38
  93. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/c0/MultiSelect_c0cfb2897119c1114c5fd6f7fd7d2e62 +0 -67
  94. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/c4/MomentValueAdapter_c4c276e31cbde7d1dc1dc1d77a594c55 +0 -20
  95. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/c5/StaticOption_c5f2d27b6d481b908294b6f5e0592fc2 +0 -19
  96. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/ce/BadgeMultiSelect.spec_cec7790f84a802fb2c18c54b9a4a921a +0 -54
  97. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/cf/OptionListSet.spec_cfb367e294a0aae3bb664eef88eb623d +0 -228
  98. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/d3/KeyInterceptingInput_d3d304879a1492b66561fce4c7416045 +0 -82
  99. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/d5/BasicEmptyOptionComponent_d58e7bb15fc2c2e13e6a757d28b199ac +0 -9
  100. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/d5/SelectCore.spec_d5e3246996684e4fba29e3631f8aefac +0 -607
  101. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/d6/BadgeMultiSelect_d6bd228b127952f6048b92c9abd3b57b +0 -53
  102. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/de/BasicMenu_de0cecbf6799211a8fe532411d3cc873 +0 -30
  103. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/e0/SelectOption_e0dc8f19358a9abd1be87aa601087b01 +0 -94
  104. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/e4/TabbedMenu_e43d45a4f7ac8251d7ef028ada2db057 +0 -179
  105. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/e6/enzyme-utils_e690f31d3397a9c58160a842e4841fc6 +0 -28
  106. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/ee/MultiSelectValue_eed682d3f60fcaefe5dfb72897e40bc7 +0 -15
  107. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/f2/SingleSelect.spec_f2793726a47820587f4b6f4150a1b24a +0 -61
  108. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/f3/OptionListSet_f3b8e87c2a3458f2b438026d738fc523 +0 -283
  109. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/f3/SingleSelectBadgeValue_f3e3c5ab7337817ca6db6d4fcb5121f8 +0 -26
  110. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/f5/SelectCore_f567e49d18b5a7ff59d0ff5fe63a70e3 +0 -813
  111. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/f6/MultiSelectOption_f608cb6868889a67fc5dac232a6b8ec7 +0 -62
  112. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/f9/enhanceWithInputEl_f9a5a0417082d5840b0e596275f4ee20 +0 -68
  113. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/fa/OptionsList.spec_fa9ff971f8b2b9c2677afe983a25ee14 +0 -26
  114. package/jest_0/jest-transform-cache-7e9d9c62c6a662023c5d70c339d0ced6-cdaa23008ea48aa7daacfe6b1614ac51/fa/TagBox_fa0d3141352322432b32d7aa9686e96e +0 -151
  115. package/jest_0/perf-cache-7e9d9c62c6a662023c5d70c339d0ced6-1f0ac540392d6926145e8e0c6fdddd0b +0 -1
@@ -1,7 +1,7 @@
1
1
  version: '3'
2
2
  services:
3
3
  pam:
4
- image: node:12
4
+ image: node:24
5
5
  volumes:
6
6
  - ./../:/pam
7
7
  working_dir: /pam
@@ -0,0 +1,12 @@
1
+ steps:
2
+ - label: Run Tests
3
+ command: './.buildkite/steps/test.sh'
4
+ key: tests
5
+ agents:
6
+ queue: small
7
+
8
+ - label: ":mag: Checking Security"
9
+ key: security-checks
10
+ command: './.buildkite/steps/scan-repo.sh'
11
+ agents:
12
+ queue: small
@@ -0,0 +1,25 @@
1
+ timeout: 10m
2
+ format: json
3
+ dependency-tree: true
4
+ list-all-pkgs: true
5
+ exit-code: 0
6
+ output: /trivyscans/results.formatted
7
+ severity:
8
+ - HIGH
9
+ - CRITICAL
10
+ - MEDIUM
11
+ - LOW
12
+ scan:
13
+ skip-dirs:
14
+ - /lib64
15
+ - /lib
16
+ - /usr/lib
17
+ - /usr/include
18
+
19
+ scanners:
20
+ - secret
21
+ vulnerability:
22
+ type:
23
+ - os
24
+ - library
25
+ ignore-unfixed: true
@@ -0,0 +1,25 @@
1
+ # ----- TRIVY -----
2
+ FILESYSTEM_SCAN_ONLY=true
3
+ # Vulnerability scan (image)
4
+ VULN_SCAN_CRIT_THRESHOLD=0
5
+ VULN_SCAN_HIGH_THRESHOLD=10
6
+ VULN_SCAN_MEDIUM_THRESHOLD=1000
7
+ VULN_SCAN_LOW_THRESHOLD=1000
8
+
9
+ # Secret scan (fs)
10
+ SECRET_SCAN_CRIT_THRESHOLD=0
11
+ SECRET_SCAN_HIGH_THRESHOLD=0
12
+ SECRET_SCAN_MEDIUM_THRESHOLD=0
13
+ SECRET_SCAN_LOW_THRESHOLD=0
14
+
15
+ # Misconfig scan (optional)
16
+ MISCONFIG_SCAN_CRIT_THRESHOLD=0
17
+ MISCONFIG_SCAN_HIGH_THRESHOLD=50
18
+ MISCONFIG_SCAN_MEDIUM_THRESHOLD=1000
19
+ MISCONFIG_SCAN_LOW_THRESHOLD=1000
20
+
21
+ # License scan (optional)
22
+ LICENSE_SCAN_CRIT_THRESHOLD=0
23
+ LICENSE_SCAN_HIGH_THRESHOLD=50
24
+ LICENSE_SCAN_MEDIUM_THRESHOLD=1000
25
+ LICENSE_SCAN_LOW_THRESHOLD=1000
@@ -0,0 +1,18 @@
1
+ #!/bin/bash
2
+ REPO_SECURITY_SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
3
+ SECURITY_REPO_PATH="$REPO_SECURITY_SCRIPT_PATH/owaspchecks"
4
+
5
+ get_repo(){
6
+ echo -e "--- Pulling owaspchecks Repo"
7
+ git clone --branch main --single-branch git@github.com:Nestio/owaspchecks.git $REPO_SECURITY_SCRIPT_PATH/owaspchecks
8
+ }
9
+
10
+ run_security_scans(){
11
+ $SECURITY_REPO_PATH/handler.sh "$IMG_HASH_NAME" envfile=$REPO_SECURITY_SCRIPT_PATH/envs/env.conf
12
+ }
13
+
14
+
15
+ security_checker(){
16
+ get_repo
17
+ run_security_scans
18
+ }
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+ export IMG_HASH_NAME="placeholder"
3
+ source ./.buildkite/security/securitychecks.sh
4
+ security_checker
@@ -7,7 +7,7 @@ set -eo pipefail
7
7
  DOCKER_RUN_APP_CMD="docker-compose -f ./.buildkite/docker-compose-ci.yml run --rm pam"
8
8
 
9
9
  echo -e "--- Setting Up Environment"
10
- $DOCKER_RUN_APP_CMD /bin/bash -c "rm -rf node_modules && rm -rf lib && npm ci"
10
+ $DOCKER_RUN_APP_CMD /bin/bash -c "rm -rf node_modules && rm -rf lib && npm ci --legacy-peer-deps"
11
11
 
12
12
  echo -e "--- Running JS Tests"
13
13
  $DOCKER_RUN_APP_CMD npm run test
@@ -0,0 +1,69 @@
1
+ name: Publish npm package
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ permissions:
9
+ contents: write
10
+ id-token: write
11
+
12
+ concurrency:
13
+ group: publish-${{ github.ref }}
14
+ cancel-in-progress: false
15
+
16
+ jobs:
17
+ publish:
18
+ runs-on: ubuntu-latest
19
+
20
+ steps:
21
+ - name: Checkout
22
+ uses: actions/checkout@v4
23
+ with:
24
+ fetch-depth: 0
25
+
26
+ - name: Setup Node.js 24
27
+ uses: actions/setup-node@v4
28
+ with:
29
+ node-version: 24
30
+ registry-url: https://registry.npmjs.org
31
+
32
+ - name: Install dependencies
33
+ run: npm ci --legacy-peer-deps
34
+
35
+ - name: Run tests
36
+ run: npm test
37
+
38
+ - name: Read package metadata
39
+ id: pkg
40
+ run: |
41
+ node -e "const fs=require('fs'); const p=require('./package.json'); fs.appendFileSync(process.env.GITHUB_OUTPUT, 'name=' + p.name + '\nversion=' + p.version + '\n');"
42
+
43
+ - name: Check whether npm version already exists
44
+ id: npm_check
45
+ run: |
46
+ if npm view "${{ steps.pkg.outputs.name }}@${{ steps.pkg.outputs.version }}" version >/dev/null 2>&1; then
47
+ echo "already_published=true" >> "$GITHUB_OUTPUT"
48
+ echo "Version ${{ steps.pkg.outputs.version }} is already on npm; skipping publish."
49
+ else
50
+ echo "already_published=false" >> "$GITHUB_OUTPUT"
51
+ echo "Version ${{ steps.pkg.outputs.version }} is not on npm; publishing."
52
+ fi
53
+
54
+ - name: Publish package to npm
55
+ if: steps.npm_check.outputs.already_published == 'false'
56
+ run: npm publish --access public
57
+
58
+ - name: Create GitHub release
59
+ if: steps.npm_check.outputs.already_published == 'false'
60
+ env:
61
+ GH_TOKEN: ${{ github.token }}
62
+ run: |
63
+ if gh release view "${{ steps.pkg.outputs.version }}" >/dev/null 2>&1; then
64
+ echo "Release ${{ steps.pkg.outputs.version }} already exists; skipping."
65
+ else
66
+ gh release create "${{ steps.pkg.outputs.version }}" \
67
+ --title "${{ steps.pkg.outputs.version }}" \
68
+ --generate-notes
69
+ fi
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 12
1
+ 24
@@ -0,0 +1,10 @@
1
+ {
2
+ "prettier": {
3
+ "allowed": false,
4
+ },
5
+ "languages": {
6
+ "JavaScript": {
7
+ "language_servers": ["...", "!biome", "!prettier"],
8
+ },
9
+ },
10
+ }
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  Nestio React Component Kit
6
6
 
7
7
  ### How To Develop
8
- - `nvm use 12`
8
+ - `nvm use 24`
9
9
  - `npm install`
10
10
  - `npm start`
11
11
  - `http://localhost:8888`
@@ -13,19 +13,42 @@ Nestio React Component Kit
13
13
 
14
14
  ### How to Release a new version
15
15
 
16
+ 1. Update `version` in `package.json`, commit, and merge to `master`.
17
+ 2. GitHub Actions workflow `.github/workflows/publish.yml` runs on `master` and:
18
+ - installs dependencies and runs tests (`npm ci && npm test`)
19
+ - checks whether `@nestio/pam@<package.json version>` already exists on npm
20
+ - if that version does not exist, publishes to npm (`npm publish --access public`)
21
+ - creates a GitHub release with generated notes (`tag = version`, `title = version`)
22
+
23
+ Merges that do **not** bump `package.json` version are skipped (that version is already on npm).
24
+
25
+ Publish only runs from `master`.
26
+
27
+ Manual fallback (same as before):
16
28
  - Update version in package.json, commit, and push
17
- - Create a new release in github
29
+ - Create a new GitHub release:
18
30
  - Tag: new version number
19
31
  - Name: new version number
20
32
  - Description: Reference all PRs that are in the release
21
33
 
22
34
  ![Release form](http://nestio-wiki.s3.amazonaws.com/pam/release.png)
23
-
24
35
  - Release a new version to npm
25
-
26
36
  `npm publish`
27
37
 
28
- - Bump the version in corresponding package.json where pam is a dependency
38
+ ### Using Pam with Chuck (local / staging / prod)
39
+
40
+ Chuck does not build Pam from this repo. It installs a **pinned published version** of `@nestio/pam` from npm (see `package.json` / lockfile in Chuck).
41
+
42
+ That means Pam changes are not visible in Chuck until you:
43
+
44
+ 1. Publish a new `@nestio/pam` version (see above).
45
+ 2. Point the Chuck environment you care about at that version by updating its `@nestio/pam` dependency and reinstalling (`npm install` locally, or whatever deploy path staging uses).
46
+
47
+ **Local or staging:** bump `@nestio/pam` to your new release and verify Chuck there first.
48
+
49
+ **Production:** leave Chuck on the current Pam version until you are ready to promote; then bump `@nestio/pam` in Chuck’s prod config the same way.
50
+
51
+ Publishing Pam to npm alone does not change what Chuck runs in any environment—you have to update the version Chuck is pinned to for the changes to go into effect.
29
52
 
30
53
  ### Required Webpack Loaders
31
54
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestio/pam",
3
- "version": "2.0.9",
3
+ "version": "2.0.10-beta.0",
4
4
  "description": "Nestio UI modules",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -60,13 +60,13 @@
60
60
  "file-loader": "^0.11.2",
61
61
  "identity-obj-proxy": "^3.0.0",
62
62
  "jest": "^20.0.4",
63
- "node-sass": "^4.14.1",
64
63
  "null-loader": "^0.1.1",
65
64
  "raf": "^3.4.0",
66
65
  "react": "^16.2.0",
67
66
  "react-dom": "^16.2.0",
68
67
  "react-router-dom": "^4.1.2",
69
- "sass-loader": "^7.0.1",
68
+ "sass": "^1.99.0",
69
+ "sass-loader": "^7.3.1",
70
70
  "sinon": "^1.17.4",
71
71
  "style-loader": "^0.13.2",
72
72
  "tap-webpack-plugin": "^1.1.0",
@@ -92,5 +92,8 @@
92
92
  "<rootDir>/test/setupShims.js",
93
93
  "<rootDir>/test/setupEnzyme.js"
94
94
  ]
95
+ },
96
+ "engines": {
97
+ "node": ">=24 <25"
95
98
  }
96
99
  }
@@ -17,9 +17,9 @@ import SingleSelectValueAdapter from '../adapters/SingleSelectValueAdapter';
17
17
  import MultiSelectValueAdapter from '../adapters/MultiSelectValueAdapter';
18
18
 
19
19
  /*
20
- Wrapper around SelectCore which bunldes various Async components. Can be used to render both single and multiple selects, along with normal and "search form"-styled selects.
20
+ Wrapper around SelectCore which bundles various Async components. Can be used to render both single and multiple selects, along with normal and "search form"-styled selects.
21
21
  */
22
- export default function AsyncSelect (props) {
22
+ export default function AsyncSelect(props) {
23
23
  const components = {};
24
24
  let valueAdapter;
25
25
 
@@ -66,6 +66,11 @@ export default function AsyncSelect (props) {
66
66
  closeOnSelect = props.multiple ? false : true;
67
67
  }
68
68
 
69
+ const {
70
+ label = 'Search...',
71
+ filterOption = () => true
72
+ } = props;
73
+
69
74
  return (
70
75
  <SelectCore
71
76
  {...components}
@@ -74,10 +79,10 @@ export default function AsyncSelect (props) {
74
79
  valueAdapter={valueAdapter}
75
80
 
76
81
  ariaLabel={props.ariaLabel}
77
- valueLabel={props.label}
82
+ valueLabel={label}
78
83
  disabled={props.disabled}
79
- filterOption={props.filterOption}
80
- label={props.label}
84
+ filterOption={filterOption}
85
+ label={label}
81
86
  loadOptions={props.loadOptions}
82
87
  loadFromValue={props.loadFromValue}
83
88
  minLength={props.minLength}
@@ -87,7 +92,7 @@ export default function AsyncSelect (props) {
87
92
  onOpen={props.onOpen}
88
93
  options={props.options}
89
94
  optionSets={props.optionSets}
90
- placeholder={props.label}
95
+ placeholder={label}
91
96
  processLoadFromValue={props.processLoadFromValue}
92
97
  processLoadOptions={props.processLoadOptions}
93
98
  renderValueLabel={props.renderValueLabel}
@@ -98,11 +103,6 @@ export default function AsyncSelect (props) {
98
103
  );
99
104
  }
100
105
 
101
- AsyncSelect.defaultProps = {
102
- label: 'Search',
103
- filterOption: () => true
104
- };
105
-
106
106
  AsyncSelect.propTypes = {
107
107
  /* Unique Props */
108
108
  /**
@@ -16,13 +16,19 @@ const valueAdapter = new BaseValueAdapter();
16
16
  Select designed for choosing a single date
17
17
  */
18
18
  export const CalendarInput = (props) => {
19
- const restProps = omit(props, 'valueLabel');
19
+ const {
20
+ format = DEFAULT_DISPLAY_FORMAT,
21
+ defaultValue = moment(new Date()).format(DEFAULT_DISPLAY_FORMAT),
22
+ } = props;
23
+ const restProps = omit(props, ['valueLabel', 'format', 'defaultValue']);
20
24
 
21
25
  return (
22
26
  <SelectCore
23
27
  MenuComponent={CalendarSelectMenuWrap}
24
28
  ValueComponent={InputWrap}
25
29
  valueAdapter={valueAdapter}
30
+ format={format}
31
+ defaultValue={defaultValue}
26
32
  {...restProps}
27
33
  id={props.id}
28
34
  />
@@ -31,10 +37,10 @@ export const CalendarInput = (props) => {
31
37
 
32
38
  export class CalendarSelectMenuWrap extends PureComponent {
33
39
  constructor(props) {
34
- super(props);
40
+ super(props);
35
41
 
36
- this.changeValue = this.changeValue.bind(this);
37
- this.parseDate = this.parseDate.bind(this);
42
+ this.changeValue = this.changeValue.bind(this);
43
+ this.parseDate = this.parseDate.bind(this);
38
44
  }
39
45
 
40
46
  parseDate() {
@@ -52,7 +58,7 @@ export class CalendarSelectMenuWrap extends PureComponent {
52
58
 
53
59
  return (
54
60
  <CalendarSelectMenu
55
- { ...this.props }
61
+ {...this.props}
56
62
  currentValue={this.parseDate()}
57
63
  defaultValue={defaultValue}
58
64
  changeValue={this.changeValue}
@@ -104,7 +110,7 @@ export class InputWrap extends PureComponent {
104
110
  render() {
105
111
  return (
106
112
  <InputValue
107
- { ...this.props }
113
+ {...this.props}
108
114
  currentText={!this.props.currentValue ? this.props.defaultValue : this.props.currentValue}
109
115
  changeText={this.changeText}
110
116
  />
@@ -141,6 +147,7 @@ CalendarInput.propTypes = {
141
147
  Initial value
142
148
  */
143
149
  value: PropTypes.string,
150
+ defaultValue: PropTypes.string,
144
151
  /**
145
152
  Label displayed if no value is selected
146
153
  */
@@ -152,9 +159,4 @@ CalendarInput.propTypes = {
152
159
  id: PropTypes.string,
153
160
  };
154
161
 
155
- CalendarInput.defaultProps = {
156
- format: DEFAULT_DISPLAY_FORMAT,
157
- defaultValue: moment(new Date()).format(DEFAULT_DISPLAY_FORMAT)
158
- };
159
-
160
162
  export default CalendarInput;
@@ -25,7 +25,7 @@ const defaultProps = {
25
25
  };
26
26
 
27
27
  /**
28
- Menu used for CalendarRangeSelec
28
+ Menu used for CalendarRangeSelect
29
29
  */
30
30
  export default class CalendarRangeSelectMenu extends Component {
31
31
  constructor (props) {
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import omit from 'lodash/omit';
4
3
 
5
4
  import CalendarSelectMenu from './CalendarSelectMenu';
6
5
  import MomentValueAdapter from '../adapters/MomentValueAdapter';
@@ -10,7 +9,7 @@ import { validMomentObject } from '../utils/PropTypes';
10
9
 
11
10
  const DEFAULT_DISPLAY_FORMAT = 'M/D/YYYY';
12
11
 
13
- const renderValueLabel = (format=DEFAULT_DISPLAY_FORMAT, valueLabel='Select Date') => momentValue => {
12
+ const renderValueLabel = (format = DEFAULT_DISPLAY_FORMAT, valueLabel = 'Select Date') => momentValue => {
14
13
  return momentValue ? momentValue.format(format) : valueLabel;
15
14
  };
16
15
 
@@ -19,8 +18,8 @@ const valueAdapter = new MomentValueAdapter();
19
18
  /**
20
19
  Select designed for choosing a single date
21
20
  */
22
- export default function CalendarSelect (props) {
23
- const { format, valueLabel, value } = props;
21
+ export default function CalendarSelect(props) {
22
+ const { format, valueLabel, value, ValueComponent = SingleSelectValue } = props;
24
23
  const restProps = omit(props, 'format', 'value');
25
24
 
26
25
  return (
@@ -29,6 +28,7 @@ export default function CalendarSelect (props) {
29
28
  renderValueLabel={renderValueLabel(format, valueLabel)}
30
29
  value={value || null}
31
30
  valueAdapter={valueAdapter}
31
+ ValueComponent={ValueComponent}
32
32
  {...restProps}
33
33
  id={props.id}
34
34
  />
@@ -51,7 +51,3 @@ CalendarSelect.propTypes = {
51
51
  ValueComponent: PropTypes.func.isRequired,
52
52
  id: PropTypes.string
53
53
  };
54
-
55
- CalendarSelect.defaultProps = {
56
- ValueComponent: SingleSelectValue
57
- };
@@ -12,13 +12,18 @@ const valueAdapter = new MultiSelectValueAdapter();
12
12
  /**
13
13
  Wrapper around SelectCore to render a MultiSelect
14
14
  */
15
- export default function MultiSelect (props){
15
+ export default function MultiSelect(props) {
16
+ const {
17
+ ValueComponent = MultiSelectValue,
18
+ filterable = false
19
+ } = props;
20
+
16
21
  return (
17
22
  <SelectCore
18
23
  ariaLabel={props.ariaLabel}
19
24
  closeOnSelect={false}
20
25
  emptyValue={[]}
21
- filterable={props.filterable}
26
+ filterable={filterable}
22
27
  MenuComponent={BasicMenu}
23
28
  OptionComponent={MultiSelectOption}
24
29
  menuContainerClassName={props.menuContainerClassName}
@@ -35,7 +40,7 @@ export default function MultiSelect (props){
35
40
  renderValueLabel={props.renderValueLabel}
36
41
  value={props.value}
37
42
  valueAdapter={valueAdapter}
38
- ValueComponent={props.ValueComponent}
43
+ ValueComponent={ValueComponent}
39
44
  collapsibleOptions={props.collapsibleOptions}
40
45
  id={props.id}
41
46
  />
@@ -61,8 +66,3 @@ MultiSelect.propTypes = {
61
66
  ValueComponent: PropTypes.func.isRequired,
62
67
  id: PropTypes.string,
63
68
  };
64
-
65
- MultiSelect.defaultProps = {
66
- ValueComponent: MultiSelectValue,
67
- filterable: false
68
- };
@@ -9,10 +9,17 @@ import styles from './styles/MultiSelectOption.scss';
9
9
  /**
10
10
  OptionComponent designed for use in MultiSelects
11
11
  */
12
- export default function MultiSelectOption (props) {
13
- const { isSelected, isHighlighted, option, currentText, collapsibleOptions } = props;
12
+ export default function MultiSelectOption(props) {
13
+ const {
14
+ isSelected,
15
+ isHighlighted,
16
+ option,
17
+ currentText,
18
+ collapsibleOptions,
19
+ renderOptionLabel = (o) => o.label
20
+ } = props;
14
21
 
15
- function _getCollapsibleClassName(){
22
+ function _getCollapsibleClassName() {
16
23
  if (currentText) {
17
24
  return null;
18
25
  }
@@ -33,11 +40,11 @@ export default function MultiSelectOption (props) {
33
40
  _getCollapsibleClassName()
34
41
  );
35
42
 
36
- const checkboxClass = classnames({[styles.checked]: isSelected}, {[styles.unchecked]: !isSelected});
37
- const label = props.renderOptionLabel(props.option);
43
+ const checkboxClass = classnames({ [styles.checked]: isSelected }, { [styles.unchecked]: !isSelected });
44
+ const label = renderOptionLabel(props.option);
38
45
 
39
46
  return (
40
- <SelectOption className={optionClass} {...props} >
47
+ <SelectOption className={optionClass} {...props} renderOptionLabel={renderOptionLabel}>
41
48
  <span className={styles.checkbox}>
42
49
  <i className={checkboxClass} />
43
50
  </span>
@@ -55,9 +62,3 @@ MultiSelectOption.propTypes = {
55
62
  collapsibleOptions: PropTypes.array,
56
63
  currentText: PropTypes.string
57
64
  };
58
-
59
- MultiSelectOption.defaultProps = {
60
- renderOptionLabel: function(option) {
61
- return option.label;
62
- }
63
- };
@@ -1,16 +1,18 @@
1
1
  import React from 'react';
2
2
 
3
3
  import SelectValue from './SelectValue';
4
-
5
- export default function MultiSelectValue(props){
6
- return <SelectValue {...props} />;
7
- }
4
+ import PropTypes from 'prop-types';
8
5
 
9
6
  /**
10
7
  ValueComponent designed for use in MultiSelects
11
8
  */
12
- MultiSelectValue.defaultProps = {
13
- renderValueLabel: function(currentValue) {
14
- return currentValue.length ? `${currentValue.length} selected` : 'Select options';
15
- }
9
+ export default function MultiSelectValue(props) {
10
+ const {
11
+ renderValueLabel = (v) => v.length ? `${v.length} selected` : 'Select options'
12
+ } = props;
13
+ return <SelectValue {...props} renderValueLabel={renderValueLabel} />;
14
+ }
15
+
16
+ MultiSelectValue.propTypes = {
17
+ renderValueLabel: PropTypes.func,
16
18
  };
@@ -11,7 +11,7 @@ export const DEFAULT_PRICE_MAX_GRADATIONS = [1000, 1500, 1750, 2000, 2250, 2500,
11
11
 
12
12
  export const createRenderValueLabelFunction = (valueLabel, minKey, maxKey) => {
13
13
  return (currentValue) => {
14
- if (currentValue.hasOwnProperty(minKey) && currentValue.hasOwnProperty(maxKey)){
14
+ if (currentValue.hasOwnProperty(minKey) && currentValue.hasOwnProperty(maxKey)) {
15
15
  return `$${currentValue[minKey].toLocaleString()} - $${currentValue[maxKey].toLocaleString()}`;
16
16
  } else if (currentValue.hasOwnProperty(minKey)) {
17
17
  return `$${currentValue[minKey].toLocaleString()} or more`;
@@ -23,7 +23,7 @@ export const createRenderValueLabelFunction = (valueLabel, minKey, maxKey) => {
23
23
  };
24
24
  };
25
25
 
26
- function sanitizeInitialValue(valObj, key){
26
+ function sanitizeInitialValue(valObj, key) {
27
27
  if (valObj.hasOwnProperty(key)) {
28
28
  const stripped = String(valObj[key]).replace(/\D/g, '');
29
29
  if (stripped) {
@@ -36,33 +36,44 @@ function sanitizeInitialValue(valObj, key){
36
36
  return valObj;
37
37
  }
38
38
 
39
- const valueAdapter = new BaseValueAdapter({emptyValue: {}});
39
+ const valueAdapter = new BaseValueAdapter({ emptyValue: {} });
40
40
 
41
41
  /**
42
42
  Select for selecting either a minimum, maximum or range of prices
43
43
  */
44
- export default function PriceSelect (props){
44
+ export default function PriceSelect(props) {
45
+ const {
46
+ minKey = 'min',
47
+ maxKey = 'max',
48
+ priceMinGradations = DEFAULT_PRICE_MIN_GRADATIONS,
49
+ priceMaxGradations = DEFAULT_PRICE_MAX_GRADATIONS,
50
+ priceStep = 250,
51
+ valueLabel = 'Price',
52
+ ValueComponent = SingleSelectValue
53
+ } = props;
54
+
55
+
45
56
  const value = props.value || {};
46
- sanitizeInitialValue(value, props.minKey);
47
- sanitizeInitialValue(value, props.maxKey);
57
+ sanitizeInitialValue(value, minKey);
58
+ sanitizeInitialValue(value, maxKey);
48
59
 
49
60
  return (
50
61
  <SelectCore
51
62
  MenuComponent={PriceMenu}
52
- renderValueLabel={createRenderValueLabelFunction(props.valueLabel, props.minKey, props.maxKey)}
63
+ renderValueLabel={createRenderValueLabelFunction(valueLabel, minKey, maxKey)}
53
64
  valueAdapter={valueAdapter}
54
65
 
55
66
  value={value}
56
- valueLabel={props.valueLabel}
67
+ valueLabel={valueLabel}
57
68
  onChange={props.onChange}
58
69
  onOpen={props.onOpen}
59
70
  onClose={props.onClose}
60
- minKey={props.minKey}
61
- maxKey={props.maxKey}
62
- priceMinGradations={props.priceMinGradations}
63
- priceMaxGradations={props.priceMaxGradations}
64
- priceStep={props.priceStep}
65
- ValueComponent={props.ValueComponent}
71
+ minKey={minKey}
72
+ maxKey={maxKey}
73
+ priceMinGradations={priceMinGradations}
74
+ priceMaxGradations={priceMaxGradations}
75
+ priceStep={priceStep}
76
+ ValueComponent={ValueComponent}
66
77
  />
67
78
  );
68
79
  }
@@ -98,13 +109,3 @@ PriceSelect.propTypes = {
98
109
  ValueComponent: PropTypes.func.isRequired,
99
110
  valueLabel: PropTypes.string
100
111
  };
101
-
102
- PriceSelect.defaultProps = {
103
- minKey: 'min',
104
- maxKey: 'max',
105
- priceMinGradations: DEFAULT_PRICE_MIN_GRADATIONS,
106
- priceMaxGradations: DEFAULT_PRICE_MAX_GRADATIONS,
107
- priceStep: 250,
108
- valueLabel: 'Price',
109
- ValueComponent: SingleSelectValue
110
- };