diff --git a/demo/package.json b/demo/package.json index 363fbb4c..28dfcc9a 100644 --- a/demo/package.json +++ b/demo/package.json @@ -6,28 +6,29 @@ "dependencies": { "@chakra-ui/icons": "^2.1.1", "@chakra-ui/react": "^2.8.2", - "@emotion/react": "^11.11.1", + "@emotion/react": "^11.11.3", "@emotion/styled": "^11.11.0", - "@testing-library/jest-dom": "^6.1.4", - "@testing-library/react": "^14.1.0", - "@testing-library/user-event": "^14.5.1", - "@types/jest": "^29.5.8", - "@types/node": "^20.9.0", - "@types/react": "^18.2.37", - "@types/react-dom": "^18.2.15", - "firebase": "^9.22.1", - "framer-motion": "^10.16.5", - "json-edit-react": "^1.2.0", + "@testing-library/jest-dom": "^6.3.0", + "@testing-library/react": "^14.1.2", + "@testing-library/user-event": "^14.5.2", + "@types/jest": "^29.5.11", + "@types/node": "^20.11.6", + "@types/react": "^18.2.48", + "@types/react-dom": "^18.2.18", + "firebase": "^10.7.2", + "framer-motion": "^11.0.3", + "json-edit-react": "^1.2.1", "just-clone": "^6.2.0", "just-compare": "^2.3.0", "react": "^18.2.0", + "react-datepicker": "^5.0.0", "react-dom": "^18.2.0", "react-firebase-hooks": "^5.1.1", - "react-icons": "^4.12.0", + "react-icons": "^5.0.1", "react-scripts": "5.0.1", - "typescript": "^5.2.2", + "typescript": "^5.3.3", "use-undo": "^1.1.1", - "web-vitals": "^3.5.0" + "web-vitals": "^3.5.2" }, "scripts": { "start": "rimraf ./src/json-edit-react && mkdir ./src/json-edit-react && mkdir ./src/json-edit-react/src && concurrently --kill-others-on-fail \"PORT=3008 react-scripts start\" \"nodemon watch.js\"", @@ -65,8 +66,8 @@ }, "devDependencies": { "concurrently": "^8.2.2", - "gh-pages": "^6.0.0", + "gh-pages": "^6.1.1", "node-fetch": "^3.3.2", - "nodemon": "^3.0.1" + "nodemon": "^3.0.3" } } diff --git a/demo/src/App.tsx b/demo/src/App.tsx index 7d29c261..374080d3 100644 --- a/demo/src/App.tsx +++ b/demo/src/App.tsx @@ -1,10 +1,8 @@ +import DatePicker from 'react-datepicker' +import 'react-datepicker/dist/react-datepicker.css' + import React, { useEffect, useRef } from 'react' -/* Local version */ -// import { JsonEditor, themes, ThemeName, Theme, ThemeInput } from './json-edit-react/src' -/* npm version */ -import { JsonEditor, themes, ThemeName, Theme, ThemeInput } from 'json-edit-react' -/* Local built version */ -// import { JsonEditor, themes, ThemeName, Theme, ThemeInput } from './package' +import { JsonEditor, themes, ThemeName, Theme, ThemeInput } from './JsonEditImport' import { FaNpm, FaExternalLinkAlt, FaGithub } from 'react-icons/fa' import { BiReset } from 'react-icons/bi' import { AiOutlineCloudUpload } from 'react-icons/ai' diff --git a/demo/src/JsonEditImport.ts b/demo/src/JsonEditImport.ts new file mode 100644 index 00000000..cea6139b --- /dev/null +++ b/demo/src/JsonEditImport.ts @@ -0,0 +1,46 @@ +/* Local version */ +import { + JsonEditor, + themes, + Theme, + ThemeName, + ThemeInput, + CustomNodeProps, + CustomNodeDefinition, + FilterFunction, +} from './json-edit-react/src' + +/* npm version */ +// import { +// JsonEditor, +// themes, +// ThemeName, +// Theme, +// ThemeInput, +// CustomNodeProps, +// CustomNodeDefinition, +// FilterFunction, +// } from 'json-edit-react' + +/* Local built version */ +// import { +// JsonEditor, +// themes, +// ThemeName, +// Theme, +// ThemeInput, +// CustomNodeProps, +// CustomNodeDefinition, +// FilterFunction, +// } from './package' + +export { + JsonEditor, + themes, + type Theme, + type ThemeName, + type ThemeInput, + type CustomNodeProps, + type CustomNodeDefinition, + type FilterFunction, +} diff --git a/demo/src/customComponents/DateTimePicker.tsx b/demo/src/customComponents/DateTimePicker.tsx new file mode 100644 index 00000000..33bbd9b9 --- /dev/null +++ b/demo/src/customComponents/DateTimePicker.tsx @@ -0,0 +1,96 @@ +/** + * An example Custom Component: + * https://github.com/CarlosNZ/json-edit-react#custom-nodes + * + * A date/time picker which can be configure to show (using the + * CustomNodeDefinitions at the bottom of this file) when an ISO date/time + * string is present in the JSON data, and present a Date picker interface + * rather than requiring the user to edit the ISO string directly. + */ + +import React from 'react' +import DatePicker from 'react-datepicker' +import { Button } from '@chakra-ui/react' +import { CustomNodeProps, CustomNodeDefinition } from '../JsonEditImport' + +// Styles +import 'react-datepicker/dist/react-datepicker.css' +// For better matching with Chakra-UI +import './style.css' + +export const DateTimePicker: React.FC = ({ + value, + setValue, + handleEdit, + handleCancel, + handleKeyPress, + isEditing, + setIsEditing, + styles, + customProps, +}) => { + const { dateFormat = 'MMM d, yyyy h:mm aa', showTimeSelect = true } = customProps ?? {} + + const date = new Date(value as string) + + return isEditing ? ( + // Picker only shows up when "editing". Due to the `showOnView: false` in + // the definition below, this component will not show at all when viewing + // (and so will show raw ISO strings). However, we've defined an alternative + // here too, when showOnView == true, in which case the date/time string is + // shown as a localised date/time. + setValue(date.toISOString())} + open={true} + onKeyDown={handleKeyPress} + > +
+ {/* These buttons are not really necessary -- you can either use the + standard Ok/Cancel icons, or keyboard Enter/Esc, but shown for demo + purposes */} + + +
+
+ ) : ( +
setIsEditing(true)} + className="jer-value-string" + style={styles.string} + > + "{new Date(value as string).toLocaleDateString()}" +
+ ) +} + +// Definition for custom node behaviour +export const dateNodeDefinition: CustomNodeDefinition = { + // Condition is a regex to match ISO strings + condition: ({ value }) => + typeof value === 'string' && + /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[\d\.]*(Z?|[\+-][\d:]+)$/.test(value), + element: DateTimePicker, // the component defined above + showOnView: false, + showOnEdit: true, + name: 'Date', // shown in the Type selector menu + showInTypesSelector: true, + defaultValue: new Date().toISOString(), // when instantiated, default to the current date/time +} diff --git a/demo/src/customComponents/style.css b/demo/src/customComponents/style.css new file mode 100644 index 00000000..438f9422 --- /dev/null +++ b/demo/src/customComponents/style.css @@ -0,0 +1,102 @@ +/* Styles to make Date picker more like Chakra-UI + From https://github.com/chakra-ui/chakra-ui/issues/580#issuecomment-653527951 +*/ + +.react-datepicker { + font-family: -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', + sans-serif; + overflow: hidden; +} + +react-datepicker__navigation--next--with-time:not( + .react-datepicker__navigation--next--with-today-button + ) { + right: 90px; +} + +/* .react-datepicker__navigation--previous, +.react-datepicker__navigation--next { + height: 8px; +} */ + +.react-datepicker__navigation--previous { + border-right-color: #cbd5e0; + + &:hover { + border-right-color: #a0aec0; + } +} + +.react-datepicker__navigation--next { + border-left-color: #cbd5e0; + + &:hover { + border-left-color: #a0aec0; + } +} + +.react-datepicker-wrapper, +.react-datepicker__input-container { + display: block; +} + +.react-datepicker__input-container input { + padding-left: 1em; + padding-right: 1em; + color: darkslategrey; +} + +.react-datepicker__header { + border-radius: 0; + background: #f7fafc; +} + +.react-datepicker, +.react-datepicker__header, +.react-datepicker__time-container { + border-color: #e2e8f0; +} + +.react-datepicker__current-month, +.react-datepicker-time__header, +.react-datepicker-year-header { + font-size: inherit; + font-weight: 600; +} + +.react-datepicker__time-container + .react-datepicker__time + .react-datepicker__time-box + ul.react-datepicker__time-list + li.react-datepicker__time-list-item { + margin: 0 1px 0 0; + height: auto; + padding: 7px 10px; + + &:hover { + background: #edf2f7; + } +} + +.react-datepicker__day:hover { + background: #edf2f7; +} + +.react-datepicker__day--selected, +.react-datepicker__day--in-selecting-range, +.react-datepicker__day--in-range, +.react-datepicker__month-text--selected, +.react-datepicker__month-text--in-selecting-range, +.react-datepicker__month-text--in-range, +.react-datepicker__time-container + .react-datepicker__time + .react-datepicker__time-box + ul.react-datepicker__time-list + li.react-datepicker__time-list-item--selected { + background: #3182ce; + font-weight: normal; + + &:hover { + background: #2a69ac; + } +} diff --git a/demo/src/data.tsx b/demo/src/data.tsx index b30fc0aa..f87168bd 100644 --- a/demo/src/data.tsx +++ b/demo/src/data.tsx @@ -1,7 +1,22 @@ import React from 'react' import { Flex, Box, Link, Text } from '@chakra-ui/react' +import { dateNodeDefinition } from './customComponents/DateTimePicker' +import { CustomNodeDefinition, FilterFunction } from './JsonEditImport' -const data = { +interface DemoData { + name: string + description: JSX.Element + data: object + rootName?: string + collapse?: number + restrictEdit?: FilterFunction + restrictDelete?: FilterFunction + restrictAdd?: FilterFunction + restrictTypeSelection?: boolean + customNodeDefinitions?: CustomNodeDefinition[] +} + +const data: Record = { basic: { name: '🔰 Basic', description: ( @@ -44,6 +59,7 @@ const data = { 'When copying to clipboard': 'Hold down "Ctrl/Cmd" to copy path instead of data', }, }, + customNodeDefinitions: [dateNodeDefinition], }, starWars: { name: '🚀 Star Wars', @@ -64,6 +80,12 @@ const data = { Learn more + + Also, notice the ISO date strings are editable by a date picker control — this is a{' '} + + Custom component. + + ), restrictEdit: ({ value }) => typeof value === 'object' && value !== null, @@ -71,6 +93,7 @@ const data = { restrictAdd: ({ value }) => !Array.isArray(value), restrictTypeSelection: true, collapse: 1, + customNodeDefinitions: [dateNodeDefinition], data: { name: 'Luke Skywalker', height: 172, @@ -1845,6 +1868,7 @@ const data = { data: [ { name: 'Steve Rogers', + dateOfBirth: '1920-07-04T12:00:00-05:00', aliases: ['Captain America', 'The First Avenger'], logo: 'https://logos-world.net/wp-content/uploads/2023/05/Captain-America-Logo.png', actor: 'Chris Evans', @@ -1852,6 +1876,7 @@ const data = { }, { name: 'Clark Kent', + dateOfBirth: '1977-04-14T12:00:00-06:00', aliases: ['Superman', 'Man of Steel', 'Son of Krypton'], logo: 'https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Superman_shield.svg/2560px-Superman_shield.svg.png', actor: 'Henry Cavill', @@ -1872,7 +1897,7 @@ const data = {
-

{truncate(data)}

{' '} +

{truncate(data as string)}

{' '}
) @@ -1893,12 +1918,18 @@ const data = { fontFamily: 'sans-serif', }} > - Presented by: {data} + Presented by: {String(data)}

) }, hideKey: true, }, + { + ...dateNodeDefinition, + showOnView: true, + showInTypesSelector: true, + customNodeProps: { showTimeSelect: false, dateFormat: 'MMM d, yyyy' }, + }, ], }, // Enable to test more complex features of Custom nodes @@ -1979,7 +2010,7 @@ const data = { // ) // }, // hideKey: true, - // editable: false, + // showEditTools: false, // }, // { // condition: ({ key }) => key === 'aliases', @@ -1987,11 +2018,13 @@ const data = { // return ( //
    // {data.map((val) => ( - //
  1. {val}
  2. + //
  3. {val}
  4. // ))} //
// ) // }, + // // showOnEdit: true, + // // showOnView: false, // // hideKey: true, // }, // ], diff --git a/demo/src/version.ts b/demo/src/version.ts index 8bece3ce..697a2ec4 100644 --- a/demo/src/version.ts +++ b/demo/src/version.ts @@ -1 +1 @@ -export const version = '1.2.0' \ No newline at end of file +export const version = '1.2.1' \ No newline at end of file diff --git a/demo/yarn.lock b/demo/yarn.lock index bf02ee5a..02c1181c 100644 --- a/demo/yarn.lock +++ b/demo/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@adobe/css-tools@^4.3.1": - version "4.3.1" - resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.3.1.tgz#abfccb8ca78075a2b6187345c26243c1a0842f28" - integrity sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg== +"@adobe/css-tools@^4.3.2": + version "4.3.3" + resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.3.3.tgz#90749bde8b89cd41764224f5aac29cd4138f75ff" + integrity sha512-rE0Pygv0sEZ4vBWHlAgJLGDU7Pm8xoO6p3wsEceb7GYAjScrOHpEo8KK/eVkAcnSM+slAEtXjA2JpdjLp4fJQQ== "@alloc/quick-lru@^5.2.0": version "5.2.0" @@ -2065,15 +2065,15 @@ resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.1.tgz#c1ddb040429c6d21d38cc945fe75c818cfb68e17" integrity sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA== -"@emotion/react@^11.11.1": - version "11.11.1" - resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.11.1.tgz#b2c36afac95b184f73b08da8c214fdf861fa4157" - integrity sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA== +"@emotion/react@^11.11.3": + version "11.11.3" + resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.11.3.tgz#96b855dc40a2a55f52a72f518a41db4f69c31a25" + integrity sha512-Cnn0kuq4DoONOMcnoVsTOR8E+AdnKFf//6kUWc4LCdnxj31pZWn7rIULd6Y7/Js1PiPHzn7SKCM9vB/jBni8eA== dependencies: "@babel/runtime" "^7.18.3" "@emotion/babel-plugin" "^11.11.0" "@emotion/cache" "^11.11.0" - "@emotion/serialize" "^1.1.2" + "@emotion/serialize" "^1.1.3" "@emotion/use-insertion-effect-with-fallbacks" "^1.0.1" "@emotion/utils" "^1.2.1" "@emotion/weak-memoize" "^0.3.1" @@ -2090,6 +2090,17 @@ "@emotion/utils" "^1.2.1" csstype "^3.0.2" +"@emotion/serialize@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.1.3.tgz#84b77bfcfe3b7bb47d326602f640ccfcacd5ffb0" + integrity sha512-iD4D6QVZFDhcbH0RAG1uVu1CwVLMWUkCvAqqlewO/rxf8+87yIBAlt4+AxMiiKPLs5hFc0owNk/sLLAOROw3cA== + dependencies: + "@emotion/hash" "^0.9.1" + "@emotion/memoize" "^0.8.1" + "@emotion/unitless" "^0.8.1" + "@emotion/utils" "^1.2.1" + csstype "^3.0.2" + "@emotion/sheet@^1.2.2": version "1.2.2" resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.2.2.tgz#d58e788ee27267a14342303e1abb3d508b6d0fec" @@ -2159,6 +2170,11 @@ resolved "https://registry.npmjs.org/@eslint/js/-/js-8.40.0.tgz" integrity sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA== +"@fastify/busboy@^2.0.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.0.tgz#0709e9f4cb252351c609c6e6d8d6779a8d25edff" + integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA== + "@firebase/analytics-compat@0.2.6": version "0.2.6" resolved "https://registry.yarnpkg.com/@firebase/analytics-compat/-/analytics-compat-0.2.6.tgz#50063978c42f13eb800e037e96ac4b17236841f4" @@ -2186,12 +2202,12 @@ "@firebase/util" "1.9.3" tslib "^2.1.0" -"@firebase/app-check-compat@0.3.7": - version "0.3.7" - resolved "https://registry.yarnpkg.com/@firebase/app-check-compat/-/app-check-compat-0.3.7.tgz#e150f61d653a0f2043a34dcb995616a717161839" - integrity sha512-cW682AxsyP1G+Z0/P7pO/WT2CzYlNxoNe5QejVarW2o5ZxeWSSPAiVEwpEpQR/bUlUmdeWThYTMvBWaopdBsqw== +"@firebase/app-check-compat@0.3.8": + version "0.3.8" + resolved "https://registry.yarnpkg.com/@firebase/app-check-compat/-/app-check-compat-0.3.8.tgz#b71d324c27d49f2a9cab7c5aeab84e1350bd87a9" + integrity sha512-EaETtChR4UgMokJFw+r6jfcIyCTUZSe0a6ivF37D9MxlG9G3wzK1COyXgxoX96GzXmDPc2aubX4PxCrdVHhrnA== dependencies: - "@firebase/app-check" "0.8.0" + "@firebase/app-check" "0.8.1" "@firebase/app-check-types" "0.5.0" "@firebase/component" "0.6.4" "@firebase/logger" "0.4.0" @@ -2208,22 +2224,22 @@ resolved "https://registry.yarnpkg.com/@firebase/app-check-types/-/app-check-types-0.5.0.tgz#1b02826213d7ce6a1cf773c329b46ea1c67064f4" integrity sha512-uwSUj32Mlubybw7tedRzR24RP8M8JUVR3NPiMk3/Z4bCmgEKTlQBwMXrehDAZ2wF+TsBq0SN1c6ema71U/JPyQ== -"@firebase/app-check@0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@firebase/app-check/-/app-check-0.8.0.tgz#b531ec40900af9c3cf1ec63de9094a0ddd733d6a" - integrity sha512-dRDnhkcaC2FspMiRK/Vbp+PfsOAEP6ZElGm9iGFJ9fDqHoPs0HOPn7dwpJ51lCFi1+2/7n5pRPGhqF/F03I97g== +"@firebase/app-check@0.8.1": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@firebase/app-check/-/app-check-0.8.1.tgz#df335c896552d76783b06a6be0fc2ff1bc423f03" + integrity sha512-zi3vbM5tb/eGRWyiqf+1DXbxFu9Q07dnm46rweodgUpH9B8svxYkHfNwYWx7F5mjHU70SQDuaojH1We5ws9OKA== dependencies: "@firebase/component" "0.6.4" "@firebase/logger" "0.4.0" "@firebase/util" "1.9.3" tslib "^2.1.0" -"@firebase/app-compat@0.2.11": - version "0.2.11" - resolved "https://registry.yarnpkg.com/@firebase/app-compat/-/app-compat-0.2.11.tgz#6f9864a5663ba6da3042880f91641bc435addbce" - integrity sha512-IzjLh3Z9F4gPo+Ft7lNVxeKlYfKI6fseUmiLaySidcx/Sdro1vOzoBMOr+5OVVpVVMSib9BZ3QtBKZkPZk+Ucw== +"@firebase/app-compat@0.2.26": + version "0.2.26" + resolved "https://registry.yarnpkg.com/@firebase/app-compat/-/app-compat-0.2.26.tgz#9277a7870ea0601910461228a20d32e5994b6543" + integrity sha512-tVNOYvB3lIFkN3RmcTieo5qYRIkYak9iC6E7dZMxax52uMIUJiIKKtPkarbwZh6EnUxru5hJRo8tfUZGuaQDQw== dependencies: - "@firebase/app" "0.9.11" + "@firebase/app" "0.9.26" "@firebase/component" "0.6.4" "@firebase/logger" "0.4.0" "@firebase/util" "1.9.3" @@ -2234,10 +2250,10 @@ resolved "https://registry.yarnpkg.com/@firebase/app-types/-/app-types-0.9.0.tgz#35b5c568341e9e263b29b3d2ba0e9cfc9ec7f01e" integrity sha512-AeweANOIo0Mb8GiYm3xhTEBVCmPwTYAu9Hcd2qSkLuga/6+j9b1Jskl5bpiSQWy9eJ/j5pavxj6eYogmnuzm+Q== -"@firebase/app@0.9.11": - version "0.9.11" - resolved "https://registry.yarnpkg.com/@firebase/app/-/app-0.9.11.tgz#1892645682dd0b1695f4eb79ef21c0ebcc31c6f1" - integrity sha512-b6OVXqn2qHXTASLstlu2aW8loHgB7gWcjVWbNKi6pZYZ9Tu3VE+xJuD8NH1br9gDh4ueVnrMBisfBTeZ0Hvlvg== +"@firebase/app@0.9.26": + version "0.9.26" + resolved "https://registry.yarnpkg.com/@firebase/app/-/app-0.9.26.tgz#d66f700cd3b36ee68ac87783a6e53136dde7150e" + integrity sha512-zCjo6KhNhbuFB+V+Z4H9g4+BZ78E7n3ShxaBtuIcRkpwdm7+1BsafzChOsDYuI86m97HUWsyLPurLBhqcupFFA== dependencies: "@firebase/component" "0.6.4" "@firebase/logger" "0.4.0" @@ -2245,17 +2261,17 @@ idb "7.1.1" tslib "^2.1.0" -"@firebase/auth-compat@0.4.2": - version "0.4.2" - resolved "https://registry.yarnpkg.com/@firebase/auth-compat/-/auth-compat-0.4.2.tgz#cb65edc2fbd5f72fff32310409f2fd702b5145e7" - integrity sha512-Q30e77DWXFmXEt5dg5JbqEDpjw9y3/PcP9LslDPR7fARmAOTIY9MM6HXzm9KC+dlrKH/+p6l8g9ifJiam9mc4A== +"@firebase/auth-compat@0.5.1": + version "0.5.1" + resolved "https://registry.yarnpkg.com/@firebase/auth-compat/-/auth-compat-0.5.1.tgz#2a8a3ce05520bfa1e73f8c2caa1c9eb81d2df25e" + integrity sha512-rgDZnrDoekRvtzXVji8Z61wxxkof6pTkjYEkybILrjM8tGP9tx4xa9qGpF4ax3AzF+rKr7mIa9NnoXEK4UNqmQ== dependencies: - "@firebase/auth" "0.23.2" + "@firebase/auth" "1.5.1" "@firebase/auth-types" "0.12.0" "@firebase/component" "0.6.4" "@firebase/util" "1.9.3" - node-fetch "2.6.7" tslib "^2.1.0" + undici "5.26.5" "@firebase/auth-interop-types@0.2.1": version "0.2.1" @@ -2267,16 +2283,16 @@ resolved "https://registry.yarnpkg.com/@firebase/auth-types/-/auth-types-0.12.0.tgz#f28e1b68ac3b208ad02a15854c585be6da3e8e79" integrity sha512-pPwaZt+SPOshK8xNoiQlK5XIrS97kFYc3Rc7xmy373QsOJ9MmqXxLaYssP5Kcds4wd2qK//amx/c+A8O2fVeZA== -"@firebase/auth@0.23.2": - version "0.23.2" - resolved "https://registry.yarnpkg.com/@firebase/auth/-/auth-0.23.2.tgz#9e6d8dd550a28053c1825fb98c7dc9b37119254d" - integrity sha512-dM9iJ0R6tI1JczuGSxXmQbXAgtYie0K4WvKcuyuSTCu9V8eEDiz4tfa1sO3txsfvwg7nOY3AjoCyMYEdqZ8hdg== +"@firebase/auth@1.5.1": + version "1.5.1" + resolved "https://registry.yarnpkg.com/@firebase/auth/-/auth-1.5.1.tgz#214718a45cbdf6bdbe5086e92a70d1a0fea61962" + integrity sha512-sVi7rq2YneLGJFqHa5S6nDfCHix9yuVV3RLhj/pWPlB4a36ofXal4E6PJwpeMc8uLjWEr1aovYN1jkXWNB6Avw== dependencies: "@firebase/component" "0.6.4" "@firebase/logger" "0.4.0" "@firebase/util" "1.9.3" - node-fetch "2.6.7" tslib "^2.1.0" + undici "5.26.5" "@firebase/component@0.6.4": version "0.6.4" @@ -2286,31 +2302,32 @@ "@firebase/util" "1.9.3" tslib "^2.1.0" -"@firebase/database-compat@0.3.4": - version "0.3.4" - resolved "https://registry.yarnpkg.com/@firebase/database-compat/-/database-compat-0.3.4.tgz#4e57932f7a5ba761cd5ac946ab6b6ab3f660522c" - integrity sha512-kuAW+l+sLMUKBThnvxvUZ+Q1ZrF/vFJ58iUY9kAcbX48U03nVzIF6Tmkf0p3WVQwMqiXguSgtOPIB6ZCeF+5Gg== +"@firebase/database-compat@1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@firebase/database-compat/-/database-compat-1.0.2.tgz#be6e91fcac6cb392fb7f9285e065c115c810ae5f" + integrity sha512-09ryJnXDvuycsxn8aXBzLhBTuCos3HEnCOBWY6hosxfYlNCGnLvG8YMlbSAt5eNhf7/00B095AEfDsdrrLjxqA== dependencies: "@firebase/component" "0.6.4" - "@firebase/database" "0.14.4" - "@firebase/database-types" "0.10.4" + "@firebase/database" "1.0.2" + "@firebase/database-types" "1.0.0" "@firebase/logger" "0.4.0" "@firebase/util" "1.9.3" tslib "^2.1.0" -"@firebase/database-types@0.10.4": - version "0.10.4" - resolved "https://registry.yarnpkg.com/@firebase/database-types/-/database-types-0.10.4.tgz#47ba81113512dab637abace61cfb65f63d645ca7" - integrity sha512-dPySn0vJ/89ZeBac70T+2tWWPiJXWbmRygYv0smT5TfE3hDrQ09eKMF3Y+vMlTdrMWq7mUdYW5REWPSGH4kAZQ== +"@firebase/database-types@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@firebase/database-types/-/database-types-1.0.0.tgz#3f7f71c2c3fd1e29d15fce513f14dae2e7543f2a" + integrity sha512-SjnXStoE0Q56HcFgNQ+9SsmJc0c8TqGARdI/T44KXy+Ets3r6x/ivhQozT66bMnCEjJRywYoxNurRTMlZF8VNg== dependencies: "@firebase/app-types" "0.9.0" "@firebase/util" "1.9.3" -"@firebase/database@0.14.4": - version "0.14.4" - resolved "https://registry.yarnpkg.com/@firebase/database/-/database-0.14.4.tgz#9e7435a16a540ddfdeb5d99d45618e6ede179aa6" - integrity sha512-+Ea/IKGwh42jwdjCyzTmeZeLM3oy1h0mFPsTy6OqCWzcu/KFqRAr5Tt1HRCOBlNOdbh84JPZC47WLU18n2VbxQ== +"@firebase/database@1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@firebase/database/-/database-1.0.2.tgz#2d13768f7920715065cc8c65d96cc38179008c13" + integrity sha512-8X6NBJgUQzDz0xQVaCISoOLINKat594N2eBbMR3Mu/MH/ei4WM+aAMlsNzngF22eljXu1SILP5G3evkyvsG3Ng== dependencies: + "@firebase/app-check-interop-types" "0.3.0" "@firebase/auth-interop-types" "0.2.1" "@firebase/component" "0.6.4" "@firebase/logger" "0.4.0" @@ -2318,43 +2335,43 @@ faye-websocket "0.11.4" tslib "^2.1.0" -"@firebase/firestore-compat@0.3.10": - version "0.3.10" - resolved "https://registry.yarnpkg.com/@firebase/firestore-compat/-/firestore-compat-0.3.10.tgz#a79330d02d863810a196b60bd33d1bfcb7f78c14" - integrity sha512-mPxRwgi8riB0+EXVzwwOBssoBMCR1NtOz8uE0+vPlEzm3qCCDeyWK9Tqu8LBPs2uopWk6GJhy5esDHt0dnUd6A== +"@firebase/firestore-compat@0.3.24": + version "0.3.24" + resolved "https://registry.yarnpkg.com/@firebase/firestore-compat/-/firestore-compat-0.3.24.tgz#64bb4ab26ee05fab2406a79e10f8a60905858006" + integrity sha512-Wj5cgqmQwTnqHS4KabOpXCNIaSTtVDP1NitnhjXff04Q4QK0aeIbeO1TPlSSTmUb6S7KzoKD4XR99hfKZDYbfA== dependencies: "@firebase/component" "0.6.4" - "@firebase/firestore" "3.12.1" - "@firebase/firestore-types" "2.5.1" + "@firebase/firestore" "4.4.1" + "@firebase/firestore-types" "3.0.0" "@firebase/util" "1.9.3" tslib "^2.1.0" -"@firebase/firestore-types@2.5.1": - version "2.5.1" - resolved "https://registry.yarnpkg.com/@firebase/firestore-types/-/firestore-types-2.5.1.tgz#464b2ee057956599ca34de50eae957c30fdbabb7" - integrity sha512-xG0CA6EMfYo8YeUxC8FeDzf6W3FX1cLlcAGBYV6Cku12sZRI81oWcu61RSKM66K6kUENP+78Qm8mvroBcm1whw== +"@firebase/firestore-types@3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@firebase/firestore-types/-/firestore-types-3.0.0.tgz#f3440d5a1cc2a722d361b24cefb62ca8b3577af3" + integrity sha512-Meg4cIezHo9zLamw0ymFYBD4SMjLb+ZXIbuN7T7ddXN6MGoICmOTq3/ltdCGoDCS2u+H1XJs2u/cYp75jsX9Qw== -"@firebase/firestore@3.12.1": - version "3.12.1" - resolved "https://registry.yarnpkg.com/@firebase/firestore/-/firestore-3.12.1.tgz#39eeb357e2d522f4e7f7d837cdaee7cd32cffc68" - integrity sha512-TgJup6AIAT9/u7MxdCeES/I96kJx7DLBTokOlW4FiiSCeOzyss9BYBrh1tkkXNIpFn9mUsvT44foZvFsOKp14Q== +"@firebase/firestore@4.4.1": + version "4.4.1" + resolved "https://registry.yarnpkg.com/@firebase/firestore/-/firestore-4.4.1.tgz#16fd9ea0d34c5a96fb2159c4ea4b30de034a5c40" + integrity sha512-LCWZZ+rgNET1qw3vpugmGCJZVbz7c5NkgKect5pZn36gaBzGVb8+pRQ8WSZ1veYVMOK6SKrBkS1Rw6EqcmPnyw== dependencies: "@firebase/component" "0.6.4" "@firebase/logger" "0.4.0" "@firebase/util" "1.9.3" - "@firebase/webchannel-wrapper" "0.10.1" - "@grpc/grpc-js" "~1.7.0" - "@grpc/proto-loader" "^0.6.13" - node-fetch "2.6.7" + "@firebase/webchannel-wrapper" "0.10.5" + "@grpc/grpc-js" "~1.9.0" + "@grpc/proto-loader" "^0.7.8" tslib "^2.1.0" + undici "5.26.5" -"@firebase/functions-compat@0.3.5": - version "0.3.5" - resolved "https://registry.yarnpkg.com/@firebase/functions-compat/-/functions-compat-0.3.5.tgz#7a532d3a9764c6d5fbc1ec5541a989a704326647" - integrity sha512-uD4jwgwVqdWf6uc3NRKF8cSZ0JwGqSlyhPgackyUPe+GAtnERpS4+Vr66g0b3Gge0ezG4iyHo/EXW/Hjx7QhHw== +"@firebase/functions-compat@0.3.6": + version "0.3.6" + resolved "https://registry.yarnpkg.com/@firebase/functions-compat/-/functions-compat-0.3.6.tgz#7074b88c4a56e6a4adc61bd692e2a872bd62b196" + integrity sha512-RQpO3yuHtnkqLqExuAT2d0u3zh8SDbeBYK5EwSCBKI9mjrFeJRXBnd3pEG+x5SxGJLy56/5pQf73mwt0OuH5yg== dependencies: "@firebase/component" "0.6.4" - "@firebase/functions" "0.10.0" + "@firebase/functions" "0.11.0" "@firebase/functions-types" "0.6.0" "@firebase/util" "1.9.3" tslib "^2.1.0" @@ -2364,18 +2381,18 @@ resolved "https://registry.yarnpkg.com/@firebase/functions-types/-/functions-types-0.6.0.tgz#ccd7000dc6fc668f5acb4e6a6a042a877a555ef2" integrity sha512-hfEw5VJtgWXIRf92ImLkgENqpL6IWpYaXVYiRkFY1jJ9+6tIhWM7IzzwbevwIIud/jaxKVdRzD7QBWfPmkwCYw== -"@firebase/functions@0.10.0": - version "0.10.0" - resolved "https://registry.yarnpkg.com/@firebase/functions/-/functions-0.10.0.tgz#c630ddf12cdf941c25bc8d554e30c3226cd560f6" - integrity sha512-2U+fMNxTYhtwSpkkR6WbBcuNMOVaI7MaH3cZ6UAeNfj7AgEwHwMIFLPpC13YNZhno219F0lfxzTAA0N62ndWzA== +"@firebase/functions@0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@firebase/functions/-/functions-0.11.0.tgz#ce48ba39be7ec4cd20eb449616868e8c2bee4a8a" + integrity sha512-n1PZxKnJ++k73Q8khTPwihlbeKo6emnGzE0hX6QVQJsMq82y/XKmNpw2t/q30VJgwaia3ZXU1fd1C5wHncL+Zg== dependencies: "@firebase/app-check-interop-types" "0.3.0" "@firebase/auth-interop-types" "0.2.1" "@firebase/component" "0.6.4" "@firebase/messaging-interop-types" "0.2.0" "@firebase/util" "1.9.3" - node-fetch "2.6.7" tslib "^2.1.0" + undici "5.26.5" "@firebase/installations-compat@0.2.4": version "0.2.4" @@ -2410,13 +2427,13 @@ dependencies: tslib "^2.1.0" -"@firebase/messaging-compat@0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@firebase/messaging-compat/-/messaging-compat-0.2.4.tgz#323ca48deef77065b4fcda3cfd662c4337dffcfd" - integrity sha512-lyFjeUhIsPRYDPNIkYX1LcZMpoVbBWXX4rPl7c/rqc7G+EUea7IEtSt4MxTvh6fDfPuzLn7+FZADfscC+tNMfg== +"@firebase/messaging-compat@0.2.5": + version "0.2.5" + resolved "https://registry.yarnpkg.com/@firebase/messaging-compat/-/messaging-compat-0.2.5.tgz#9be03c70eac8f6f6c93f3fc804fe345bd05dcf57" + integrity sha512-qHQZxm4hEG8/HFU/ls5/bU+rpnlPDoZoqi3ATMeb6s4hovYV9+PfV5I7ZrKV5eFFv47Hx1PWLe5uPnS4e7gMwQ== dependencies: "@firebase/component" "0.6.4" - "@firebase/messaging" "0.12.4" + "@firebase/messaging" "0.12.5" "@firebase/util" "1.9.3" tslib "^2.1.0" @@ -2425,16 +2442,16 @@ resolved "https://registry.yarnpkg.com/@firebase/messaging-interop-types/-/messaging-interop-types-0.2.0.tgz#6056f8904a696bf0f7fdcf5f2ca8f008e8f6b064" integrity sha512-ujA8dcRuVeBixGR9CtegfpU4YmZf3Lt7QYkcj693FFannwNuZgfAYaTmbJ40dtjB81SAu6tbFPL9YLNT15KmOQ== -"@firebase/messaging@0.12.4": - version "0.12.4" - resolved "https://registry.yarnpkg.com/@firebase/messaging/-/messaging-0.12.4.tgz#ccb49df5ab97d5650c9cf5b8c77ddc34daafcfe0" - integrity sha512-6JLZct6zUaex4g7HI3QbzeUrg9xcnmDAPTWpkoMpd/GoSVWH98zDoWXMGrcvHeCAIsLpFMe4MPoZkJbrPhaASw== +"@firebase/messaging@0.12.5": + version "0.12.5" + resolved "https://registry.yarnpkg.com/@firebase/messaging/-/messaging-0.12.5.tgz#59c84353974f851887b8a4b0e43e26560213d0e7" + integrity sha512-i/rrEI2k9ueFhdIr8KQsptWGskrsnkC5TkohCTrJKz9P0C/PbNv14IAMkwhMJTqIur5VwuOnrUkc9Kdz7awekw== dependencies: "@firebase/component" "0.6.4" "@firebase/installations" "0.6.4" "@firebase/messaging-interop-types" "0.2.0" "@firebase/util" "1.9.3" - idb "7.0.1" + idb "7.1.1" tslib "^2.1.0" "@firebase/performance-compat@0.2.4": @@ -2493,13 +2510,13 @@ "@firebase/util" "1.9.3" tslib "^2.1.0" -"@firebase/storage-compat@0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@firebase/storage-compat/-/storage-compat-0.3.2.tgz#51a97170fd652a516f729f82b97af369e5a2f8d7" - integrity sha512-wvsXlLa9DVOMQJckbDNhXKKxRNNewyUhhbXev3t8kSgoCotd1v3MmqhKKz93ePhDnhHnDs7bYHy+Qa8dRY6BXw== +"@firebase/storage-compat@0.3.3": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@firebase/storage-compat/-/storage-compat-0.3.3.tgz#9c670cd7bf37733bd5f4235e97a5f5dc2c3d9c7e" + integrity sha512-WNtjYPhpOA1nKcRu5lIodX0wZtP8pI0VxDJnk6lr+av7QZNS1s6zvr+ERDTve+Qu4Hq/ZnNaf3kBEQR2ccXn6A== dependencies: "@firebase/component" "0.6.4" - "@firebase/storage" "0.11.2" + "@firebase/storage" "0.12.0" "@firebase/storage-types" "0.8.0" "@firebase/util" "1.9.3" tslib "^2.1.0" @@ -2509,15 +2526,15 @@ resolved "https://registry.yarnpkg.com/@firebase/storage-types/-/storage-types-0.8.0.tgz#f1e40a5361d59240b6e84fac7fbbbb622bfaf707" integrity sha512-isRHcGrTs9kITJC0AVehHfpraWFui39MPaU7Eo8QfWlqW7YPymBmRgjDrlOgFdURh6Cdeg07zmkLP5tzTKRSpg== -"@firebase/storage@0.11.2": - version "0.11.2" - resolved "https://registry.yarnpkg.com/@firebase/storage/-/storage-0.11.2.tgz#c5e0316543fe1c4026b8e3910f85ad73f5b77571" - integrity sha512-CtvoFaBI4hGXlXbaCHf8humajkbXhs39Nbh6MbNxtwJiCqxPy9iH3D3CCfXAvP0QvAAwmJUTK3+z9a++Kc4nkA== +"@firebase/storage@0.12.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/@firebase/storage/-/storage-0.12.0.tgz#de23aca9a6504b3b08281c93111e655f15b7f566" + integrity sha512-SGs02Y/mmWBRsqZiYLpv4Sf7uZYZzMWVNN+aKiDqPsFBCzD6hLvGkXz+u98KAl8FqcjgB8BtSu01wm4pm76KHA== dependencies: "@firebase/component" "0.6.4" "@firebase/util" "1.9.3" - node-fetch "2.6.7" tslib "^2.1.0" + undici "5.26.5" "@firebase/util@1.9.3": version "1.9.3" @@ -2526,39 +2543,63 @@ dependencies: tslib "^2.1.0" -"@firebase/webchannel-wrapper@0.10.1": - version "0.10.1" - resolved "https://registry.yarnpkg.com/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.10.1.tgz#60bb2aaf129f9e00621f8d698722ddba6ee1f8ac" - integrity sha512-Dq5rYfEpdeel0bLVN+nfD1VWmzCkK+pJbSjIawGE+RY4+NIJqhbUDDQjvV0NUK84fMfwxvtFoCtEe70HfZjFcw== +"@firebase/webchannel-wrapper@0.10.5": + version "0.10.5" + resolved "https://registry.yarnpkg.com/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.10.5.tgz#cd9897680d0a2f1bce8d8c23a590e5874f4617c5" + integrity sha512-eSkJsnhBWv5kCTSU1tSUVl9mpFu+5NXXunZc83le8GMjMlsWwQArSc7cJJ4yl+aDFY0NGLi0AjZWMn1axOrkRg== -"@grpc/grpc-js@~1.7.0": - version "1.7.3" - resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.7.3.tgz#f2ea79f65e31622d7f86d4b4c9ae38f13ccab99a" - integrity sha512-H9l79u4kJ2PVSxUNA08HMYAnUBLj9v6KjYQ7SQ71hOZcEXhShE/y5iQCesP8+6/Ik/7i2O0a10bPquIcYfufog== +"@floating-ui/core@^1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.6.0.tgz#fa41b87812a16bf123122bf945946bae3fdf7fc1" + integrity sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g== dependencies: - "@grpc/proto-loader" "^0.7.0" - "@types/node" ">=12.12.47" + "@floating-ui/utils" "^0.2.1" -"@grpc/proto-loader@^0.6.13": - version "0.6.13" - resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.6.13.tgz#008f989b72a40c60c96cd4088522f09b05ac66bc" - integrity sha512-FjxPYDRTn6Ec3V0arm1FtSpmP6V50wuph2yILpyvTKzjc76oDdoihXqM1DzOW5ubvCC8GivfCnNtfaRE8myJ7g== +"@floating-ui/dom@^1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.0.tgz#282f31c5c7d2aaef3999e09f2c06280a020364d1" + integrity sha512-SZ0BEXzsaaS6THZfZJUcAobbZTD+MvfGM42bxgeg0Tnkp4/an/avqwAXiVLsFtIBZtfsx3Ymvwx0+KnnhdA/9g== dependencies: - "@types/long" "^4.0.1" - lodash.camelcase "^4.3.0" - long "^4.0.0" - protobufjs "^6.11.3" - yargs "^16.2.0" + "@floating-ui/core" "^1.6.0" + "@floating-ui/utils" "^0.2.1" + +"@floating-ui/react-dom@^2.0.7": + version "2.0.7" + resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.0.7.tgz#873e0a55a25d8ddbbccd159d6ab4a4b98eb05494" + integrity sha512-B5GJxKUyPcGsvE1vua+Abvw0t6zVMyTbtG+Jk7BoI4hfc5Ahv50dstRIAn0nS0274kR9gnKwxIXyGA8EzBZJrA== + dependencies: + "@floating-ui/dom" "^1.6.0" -"@grpc/proto-loader@^0.7.0": - version "0.7.7" - resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.7.7.tgz#d33677a77eea8407f7c66e2abd97589b60eb4b21" - integrity sha512-1TIeXOi8TuSCQprPItwoMymZXxWT0CPxUhkrkeCUH+D8U7QDwQ6b7SUz2MaLuWM2llT+J/TVFLmQI5KtML3BhQ== +"@floating-ui/react@^0.26.2": + version "0.26.7" + resolved "https://registry.yarnpkg.com/@floating-ui/react/-/react-0.26.7.tgz#0565521962402e4fb87a6f47bdd724ea5d74b207" + integrity sha512-0uMI9IBJBPPt8N+8uRg4gazJvQReWTu/fVUHHLfAOuy1WB6f242jtjWm52hLJG8nzuZVuU+2crW4lJbJQoqeIA== + dependencies: + "@floating-ui/react-dom" "^2.0.7" + "@floating-ui/utils" "^0.2.1" + tabbable "^6.0.1" + +"@floating-ui/utils@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.1.tgz#16308cea045f0fc777b6ff20a9f25474dd8293d2" + integrity sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q== + +"@grpc/grpc-js@~1.9.0": + version "1.9.14" + resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.9.14.tgz#236378822876cbf7903f9d61a0330410e8dcc5a1" + integrity sha512-nOpuzZ2G3IuMFN+UPPpKrC6NsLmWsTqSsm66IRfnBt1D4pwTqE27lmbpcPM+l2Ua4gE7PfjRHI6uedAy7hoXUw== + dependencies: + "@grpc/proto-loader" "^0.7.8" + "@types/node" ">=12.12.47" + +"@grpc/proto-loader@^0.7.8": + version "0.7.10" + resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.7.10.tgz#6bf26742b1b54d0a473067743da5d3189d06d720" + integrity sha512-CAqDfoaQ8ykFd9zqBDn4k6iWT9loLAlc2ETmDFS9JCD70gDcnA4L3AFEo2iV7KyAtAAHFW9ftq1Fz+Vsgq80RQ== dependencies: - "@types/long" "^4.0.1" lodash.camelcase "^4.3.0" - long "^4.0.0" - protobufjs "^7.0.0" + long "^5.0.0" + protobufjs "^7.2.4" yargs "^17.7.2" "@humanwhocodes/config-array@^0.11.8": @@ -3176,33 +3217,33 @@ lz-string "^1.5.0" pretty-format "^27.0.2" -"@testing-library/jest-dom@^6.1.4": - version "6.1.4" - resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-6.1.4.tgz#cf0835c33bc5ef00befb9e672b1e3e6a710e30e3" - integrity sha512-wpoYrCYwSZ5/AxcrjLxJmCU6I5QAJXslEeSiMQqaWmP2Kzpd1LvF/qxmAIW2qposULGWq2gw30GgVNFLSc2Jnw== +"@testing-library/jest-dom@^6.3.0": + version "6.3.0" + resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-6.3.0.tgz#e8d308e0c0e91d882340cbbfdea0e4daa7987d36" + integrity sha512-hJVIrkFizEQxoWsGBlycTcQhrpoCH4DhXfrnHFFXgkx3Xdm15zycsq5Ep+vpw4W8S0NJa8cxDHcuJib+1tEbhg== dependencies: - "@adobe/css-tools" "^4.3.1" + "@adobe/css-tools" "^4.3.2" "@babel/runtime" "^7.9.2" aria-query "^5.0.0" chalk "^3.0.0" css.escape "^1.5.1" - dom-accessibility-api "^0.5.6" + dom-accessibility-api "^0.6.3" lodash "^4.17.15" redent "^3.0.0" -"@testing-library/react@^14.1.0": - version "14.1.0" - resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-14.1.0.tgz#01d64915111db99b50f8361d51d7217606805989" - integrity sha512-hcvfZEEyO0xQoZeHmUbuMs7APJCGELpilL7bY+BaJaMP57aWc6q1etFwScnoZDheYjk4ESdlzPdQ33IbsKAK/A== +"@testing-library/react@^14.1.2": + version "14.1.2" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-14.1.2.tgz#a2b9e9ee87721ec9ed2d7cfc51cc04e474537c32" + integrity sha512-z4p7DVBTPjKM5qDZ0t5ZjzkpSNb+fZy1u6bzO7kk8oeGagpPCAtgh4cx1syrfp7a+QWkM021jGqjJaxJJnXAZg== dependencies: "@babel/runtime" "^7.12.5" "@testing-library/dom" "^9.0.0" "@types/react-dom" "^18.0.0" -"@testing-library/user-event@^14.5.1": - version "14.5.1" - resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.5.1.tgz#27337d72046d5236b32fd977edee3f74c71d332f" - integrity sha512-UCcUKrUYGj7ClomOo2SpNVvx4/fkd/2BbIHDCle8A0ax+P3bU7yJwDBDrS6ZwdTMARWTGODX1hEsCcO+7beJjg== +"@testing-library/user-event@^14.5.2": + version "14.5.2" + resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.5.2.tgz#db7257d727c891905947bd1c1a99da20e03c2ebd" + integrity sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ== "@tootallnate/once@1": version "1.1.2" @@ -3366,10 +3407,10 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^29.5.8": - version "29.5.8" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.8.tgz#ed5c256fe2bc7c38b1915ee5ef1ff24a3427e120" - integrity sha512-fXEFTxMV2Co8ZF5aYFJv+YeA08RTYJfhtN5c9JSv/mFEMe+xxjufCb+PHL+bJcMs/ebPUsBu+UNTEz+ydXrR6g== +"@types/jest@^29.5.11": + version "29.5.11" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.11.tgz#0c13aa0da7d0929f078ab080ae5d4ced80fa2f2c" + integrity sha512-S2mHmYIVe13vrm6q4kN6fLYYAka15ALQki/vgDC3mIukEOx8WJlv0kQPM+d4w8Gp6u0uSdKND04IlTXBv0rwnQ== dependencies: expect "^29.0.0" pretty-format "^29.0.0" @@ -3396,11 +3437,6 @@ resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.194.tgz#b71eb6f7a0ff11bff59fc987134a093029258a76" integrity sha512-r22s9tAS7imvBt2lyHC9B8AGwWnXaYb1tY09oyLkXDs4vArpYJzw09nj8MLx5VfciBPGIb+ZwG0ssYnEPJxn/g== -"@types/long@^4.0.1": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" - integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== - "@types/mime@*": version "3.0.1" resolved "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz" @@ -3421,10 +3457,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.2.4.tgz#e6c3345f7ed9c6df41fdc288a94e2633167bc15d" integrity sha512-ni5f8Xlf4PwnT/Z3f0HURc3ZSw8UyrqMqmM3L5ysa7VjHu8c3FOmIo1nKCcLrV/OAmtf3N4kFna/aJqxsfEtnA== -"@types/node@^20.9.0": - version "20.9.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.9.0.tgz#bfcdc230583aeb891cf51e73cfdaacdd8deae298" - integrity sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw== +"@types/node@^20.11.6": + version "20.11.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.6.tgz#6adf4241460e28be53836529c033a41985f85b6e" + integrity sha512-+EOokTnksGVgip2PbYbr3xnR7kZigh4LbybAfBAw5BpnQ+FqBYUsvCEjYd70IXKlbohQ64mzEYmMtlWUY8q//Q== dependencies: undici-types "~5.26.4" @@ -3465,10 +3501,10 @@ dependencies: "@types/react" "*" -"@types/react-dom@^18.2.15": - version "18.2.15" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.15.tgz#921af67f9ee023ac37ea84b1bc0cc40b898ea522" - integrity sha512-HWMdW+7r7MR5+PZqJF6YFNSCtjz1T0dsvo/f1BV6HkV+6erD/nA7wd9NM00KVG83zf2nJ7uATPO9ttdIPvi3gg== +"@types/react-dom@^18.2.18": + version "18.2.18" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.18.tgz#16946e6cd43971256d874bc3d0a72074bb8571dd" + integrity sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw== dependencies: "@types/react" "*" @@ -3481,10 +3517,10 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/react@^18.2.37": - version "18.2.37" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.37.tgz#0f03af69e463c0f19a356c2660dbca5d19c44cae" - integrity sha512-RGAYMi2bhRgEXT3f4B92WTohopH6bIXw05FuGlmJEnv/omEn190+QYEIYxIAuIBdKgboYYdVved2p1AxZVQnaw== +"@types/react@^18.2.48": + version "18.2.48" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.48.tgz#11df5664642d0bd879c1f58bc1d37205b064e8f1" + integrity sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -4548,6 +4584,11 @@ cjs-module-lexer@^1.0.0: resolved "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz" integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== +classnames@^2.2.6: + version "2.5.1" + resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.5.1.tgz#ba774c614be0f016da105c858e7159eae8e7687b" + integrity sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow== + clean-css@^5.2.2: version "5.3.2" resolved "https://registry.npmjs.org/clean-css/-/clean-css-5.3.2.tgz" @@ -5060,7 +5101,7 @@ debug@2.6.9, debug@^2.6.0: dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: +debug@4, debug@^4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -5234,11 +5275,16 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -dom-accessibility-api@^0.5.6, dom-accessibility-api@^0.5.9: +dom-accessibility-api@^0.5.9: version "0.5.16" resolved "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz" integrity sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg== +dom-accessibility-api@^0.6.3: + version "0.6.3" + resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.6.3.tgz#993e925cc1d73f2c662e7d75dd5a5445259a8fd8" + integrity sha512-7ZgogeTnjuHbo+ct10G9Ffp0mif17idi0IyWNVA/wcwcm7NPOD/WEHVP3n7n3MhXqxoIYm8d6MuZohYWIZ4T3w== + dom-converter@^0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz" @@ -6037,36 +6083,36 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -firebase@^9.22.1: - version "9.22.1" - resolved "https://registry.yarnpkg.com/firebase/-/firebase-9.22.1.tgz#9bf49d8cb87eefae6500cc2bd2ec1fddbc1c1ebb" - integrity sha512-8x55ZZJwPlctKIhlfXL+KTOpdabp6dDpDwTEmuW1QNbfCkE1ZEuXHgjiQMfTkoeyQO9luV6YwVdgbgCt7yfYCg== +firebase@^10.7.2: + version "10.7.2" + resolved "https://registry.yarnpkg.com/firebase/-/firebase-10.7.2.tgz#6c777dccca70d715f58bb6ba0a50fbdc3e762674" + integrity sha512-zED3kAJyf+Xx5tXpC3vjmlWTm/SIVoJJ6MOLuXYJkqKAUJLG7Q1Jxy6l1DxCzGgBqZHxc0Jh6q+qG++9kimHsw== dependencies: "@firebase/analytics" "0.10.0" "@firebase/analytics-compat" "0.2.6" - "@firebase/app" "0.9.11" - "@firebase/app-check" "0.8.0" - "@firebase/app-check-compat" "0.3.7" - "@firebase/app-compat" "0.2.11" + "@firebase/app" "0.9.26" + "@firebase/app-check" "0.8.1" + "@firebase/app-check-compat" "0.3.8" + "@firebase/app-compat" "0.2.26" "@firebase/app-types" "0.9.0" - "@firebase/auth" "0.23.2" - "@firebase/auth-compat" "0.4.2" - "@firebase/database" "0.14.4" - "@firebase/database-compat" "0.3.4" - "@firebase/firestore" "3.12.1" - "@firebase/firestore-compat" "0.3.10" - "@firebase/functions" "0.10.0" - "@firebase/functions-compat" "0.3.5" + "@firebase/auth" "1.5.1" + "@firebase/auth-compat" "0.5.1" + "@firebase/database" "1.0.2" + "@firebase/database-compat" "1.0.2" + "@firebase/firestore" "4.4.1" + "@firebase/firestore-compat" "0.3.24" + "@firebase/functions" "0.11.0" + "@firebase/functions-compat" "0.3.6" "@firebase/installations" "0.6.4" "@firebase/installations-compat" "0.2.4" - "@firebase/messaging" "0.12.4" - "@firebase/messaging-compat" "0.2.4" + "@firebase/messaging" "0.12.5" + "@firebase/messaging-compat" "0.2.5" "@firebase/performance" "0.6.4" "@firebase/performance-compat" "0.2.4" "@firebase/remote-config" "0.4.4" "@firebase/remote-config-compat" "0.2.4" - "@firebase/storage" "0.11.2" - "@firebase/storage-compat" "0.3.2" + "@firebase/storage" "0.12.0" + "@firebase/storage-compat" "0.3.3" "@firebase/util" "1.9.3" flat-cache@^3.0.4: @@ -6146,10 +6192,10 @@ fraction.js@^4.2.0: resolved "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz" integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA== -framer-motion@^10.16.5: - version "10.16.5" - resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-10.16.5.tgz#f1ad625adf213a8906f1ea52a31a4ef222f056d5" - integrity sha512-GEzVjOYP2MIpV9bT/GbhcsBNoImG3/2X3O/xVNWmktkv9MdJ7P/44zELm/7Fjb+O3v39SmKFnoDQB32giThzpg== +framer-motion@^11.0.3: + version "11.0.3" + resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-11.0.3.tgz#b2a87e7ae166a9e27da33da9cfb50a0db5f94fa7" + integrity sha512-6x2poQpIWBdbZwLd73w6cKZ1I9IEPIU94C6/Swp1Zt3LJ+sB5bPe1E2wC6EH5hSISXNkMJ4afH7AdwS7MrtkWw== dependencies: tslib "^2.4.0" optionalDependencies: @@ -6278,10 +6324,10 @@ get-symbol-description@^1.0.0: call-bind "^1.0.2" get-intrinsic "^1.1.1" -gh-pages@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-6.0.0.tgz#3bb46ea13dc7cee306662db0d3f02bf05635cdc1" - integrity sha512-FXZWJRsvP/fK2HJGY+Di6FRNHvqFF6gOIELaopDjXXgjeOYSNURcuYwEO/6bwuq6koP5Lnkvnr5GViXzuOB89g== +gh-pages@^6.1.1: + version "6.1.1" + resolved "https://registry.yarnpkg.com/gh-pages/-/gh-pages-6.1.1.tgz#e80af927a081cb480657fde5a0b87ea2e77d6c74" + integrity sha512-upnohfjBwN5hBP9w2dPE7HO5JJTHzSGMV1JrLrHvNuqmjoYHg6TBrCcnEoorjG/e0ejbuvnwyKMdTyM40PEByw== dependencies: async "^3.2.4" commander "^11.0.0" @@ -7652,10 +7698,10 @@ jsesc@~0.5.0: resolved "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz" integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== -json-edit-react@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/json-edit-react/-/json-edit-react-1.2.0.tgz#47b729d8cae1280d36ce948e85761f6f594b66a9" - integrity sha512-fgYYwmTNl6Zo+qPRP1Qrqng2jVaEeBWbLocP2L7vMpXbnlk/6KMNxmE7nTZEZlAUN04KPnOh4Ui8xzILYssbXQ== +json-edit-react@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/json-edit-react/-/json-edit-react-1.2.1.tgz#39a8ccf821de688aa5a9598c7fd34537d2a9e1e5" + integrity sha512-uYALhjoW0ggVjS3d72dwPb2rb69xQNaKK5PQPbXZ0DA07Az7vfprpL++DlejgLmD8MmsvdGo1FcrZIiLxOcMEQ== dependencies: just-clone "^6.2.0" object-property-assigner "^1.0.1" @@ -7878,11 +7924,6 @@ lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0: resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -long@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" - integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== - long@^5.0.0: version "5.2.3" resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" @@ -8127,13 +8168,6 @@ node-domexception@^1.0.0: resolved "https://registry.yarnpkg.com/node-domexception/-/node-domexception-1.0.0.tgz#6888db46a1f71c0b76b3f7555016b63fe64766e5" integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== -node-fetch@2.6.7: - version "2.6.7" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" - integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== - dependencies: - whatwg-url "^5.0.0" - node-fetch@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-3.3.2.tgz#d1e889bacdf733b4ff3b2b243eb7a12866a0b78b" @@ -8158,13 +8192,13 @@ node-releases@^2.0.8: resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz" integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== -nodemon@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.0.1.tgz#affe822a2c5f21354466b2fc8ae83277d27dadc7" - integrity sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw== +nodemon@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.0.3.tgz#244a62d1c690eece3f6165c6cdb0db03ebd80b76" + integrity sha512-7jH/NXbFPxVaMwmBCC2B9F/V6X1VkEdNgx3iu9jji8WxWcvhMWkmhNWhI5077zknOnZnBzba9hZP6bCPJLSReQ== dependencies: chokidar "^3.5.2" - debug "^3.2.7" + debug "^4" ignore-by-default "^1.0.1" minimatch "^3.1.2" pstree.remy "^1.1.8" @@ -9185,7 +9219,7 @@ prompts@^2.0.1, prompts@^2.4.2: kleur "^3.0.3" sisteransi "^1.0.5" -prop-types@^15.6.2, prop-types@^15.8.1: +prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -9194,29 +9228,10 @@ prop-types@^15.6.2, prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" -protobufjs@^6.11.3: - version "6.11.3" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.3.tgz#637a527205a35caa4f3e2a9a4a13ddffe0e7af74" - integrity sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg== - dependencies: - "@protobufjs/aspromise" "^1.1.2" - "@protobufjs/base64" "^1.1.2" - "@protobufjs/codegen" "^2.0.4" - "@protobufjs/eventemitter" "^1.1.0" - "@protobufjs/fetch" "^1.1.0" - "@protobufjs/float" "^1.0.2" - "@protobufjs/inquire" "^1.1.0" - "@protobufjs/path" "^1.1.2" - "@protobufjs/pool" "^1.1.0" - "@protobufjs/utf8" "^1.1.0" - "@types/long" "^4.0.1" - "@types/node" ">=13.7.0" - long "^4.0.0" - -protobufjs@^7.0.0: - version "7.2.3" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.3.tgz#01af019e40d9c6133c49acbb3ff9e30f4f0f70b2" - integrity sha512-TtpvOqwB5Gdz/PQmOjgsrGH1nHjAQVCN7JG4A6r1sXRWESL5rNMAiRcBQlCAdKxZcAbstExQePYG8xof/JVRgg== +protobufjs@^7.2.4: + version "7.2.6" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.6.tgz#4a0ccd79eb292717aacf07530a07e0ed20278215" + integrity sha512-dgJaEDDL6x8ASUZ1YqWciTRrdOuYNzoOf27oHNfdyvKqHr5i0FV7FSLU+aIeFjyFgVxrpTOtQUi0BLLBymZaBw== dependencies: "@protobufjs/aspromise" "^1.1.2" "@protobufjs/base64" "^1.1.2" @@ -9324,6 +9339,17 @@ react-clientside-effect@^1.2.6: dependencies: "@babel/runtime" "^7.12.13" +react-datepicker@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/react-datepicker/-/react-datepicker-5.0.0.tgz#0f8ebe6d2c5994e92af42dc9af1ef0ba57fcec02" + integrity sha512-AYpBCzinlE0fpltMtjjcpkiIyZVI3o9rbrhaMuf7oZcFp4LyRW2veCwORVFdcj4ProqnKTwNJBrTtauyanjMwg== + dependencies: + "@floating-ui/react" "^0.26.2" + classnames "^2.2.6" + date-fns "^2.30.0" + prop-types "^15.7.2" + react-onclickoutside "^6.13.0" + react-dev-utils@^12.0.1: version "12.0.1" resolved "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.1.tgz" @@ -9394,6 +9420,11 @@ react-icons@^4.12.0: resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.12.0.tgz#54806159a966961bfd5cdb26e492f4dafd6a8d78" integrity sha512-IBaDuHiShdZqmfc/TwHu6+d6k2ltNCf3AszxNmjJc1KUfXdEeRJOKyNvLmAHaarhzGmTSVygNdyu8/opXv2gaw== +react-icons@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-5.0.1.tgz#1694e11bfa2a2888cab47dcc30154ce90485feee" + integrity sha512-WqLZJ4bLzlhmsvme6iFdgO8gfZP17rfjYEJ2m9RsZjZ+cc4k1hTzknEz63YS1MeT50kVzoa1Nz36f4BEx+Wigw== + react-is@^16.13.1, react-is@^16.7.0: version "16.13.1" resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" @@ -9409,6 +9440,11 @@ react-is@^18.0.0: resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== +react-onclickoutside@^6.13.0: + version "6.13.0" + resolved "https://registry.yarnpkg.com/react-onclickoutside/-/react-onclickoutside-6.13.0.tgz#e165ea4e5157f3da94f4376a3ab3e22a565f4ffc" + integrity sha512-ty8So6tcUpIb+ZE+1HAhbLROvAIJYyJe/1vRrrcmW+jLsaM+/powDRqxzo6hSh9CuRZGSL1Q8mvcF5WRD93a0A== + react-refresh@^0.11.0: version "0.11.0" resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz" @@ -10379,6 +10415,11 @@ symbol-tree@^3.2.4: resolved "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +tabbable@^6.0.1: + version "6.2.0" + resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-6.2.0.tgz#732fb62bc0175cfcec257330be187dcfba1f3b97" + integrity sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew== + tailwindcss@^3.0.2: version "3.3.2" resolved "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.2.tgz" @@ -10563,11 +10604,6 @@ tr46@^2.1.0: dependencies: punycode "^2.1.1" -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - tree-kill@^1.2.2: version "1.2.2" resolved "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz" @@ -10685,10 +10721,10 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" - integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== +typescript@^5.3.3: + version "5.3.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" + integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== unbox-primitive@^1.0.2: version "1.0.2" @@ -10710,6 +10746,13 @@ undici-types@~5.26.4: resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== +undici@5.26.5: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.26.5.tgz#f6dc8c565e3cad8c4475b187f51a13e505092838" + integrity sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw== + dependencies: + "@fastify/busboy" "^2.0.0" + unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz" @@ -10893,15 +10936,10 @@ web-streams-polyfill@^3.0.3: resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6" integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q== -web-vitals@^3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-3.5.0.tgz#3a5571f00743ecd059394b61e0adceec7fac2634" - integrity sha512-f5YnCHVG9Y6uLCePD4tY8bO/Ge15NPEQWtvm3tPzDKygloiqtb4SVqRHBcrIAqo2ztqX5XueqDn97zHF0LdT6w== - -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== +web-vitals@^3.5.2: + version "3.5.2" + resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-3.5.2.tgz#5bb58461bbc173c3f00c2ddff8bfe6e680999ca9" + integrity sha512-c0rhqNcHXRkY/ogGDJQxZ9Im9D19hDihbzSQJrsioex+KnFgmMzBiy57Z1EjkhX/+OjyBpclDCzz2ITtjokFmg== webidl-conversions@^4.0.2: version "4.0.2" @@ -11055,14 +11093,6 @@ whatwg-mimetype@^2.3.0: resolved "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz" integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - whatwg-url@^7.0.0: version "7.1.0" resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz" diff --git a/src/CollectionNode.tsx b/src/CollectionNode.tsx index 7d191e3e..fbf09e5c 100644 --- a/src/CollectionNode.tsx +++ b/src/CollectionNode.tsx @@ -180,7 +180,9 @@ export const CollectionNode: React.FC = ({ CustomNode, customNodeProps, hideKey, - customEditable = true, + showEditTools = true, + showOnEdit, + showOnView, } = getCustomNode(customNodeDefinitions, { key: name, path, @@ -189,6 +191,68 @@ export const CollectionNode: React.FC = ({ size: Object.keys(data).length, }) + const CollectionComponent = + CustomNode && ((isEditing && showOnEdit) || (!isEditing && showOnView)) ? ( + onEdit(value, path)} + handleEdit={handleEdit} + handleCancel={handleCancel} + handleKeyPress={handleKeyPress} + isEditing={isEditing} + setIsEditing={setIsEditing} + styles={styles} + /> + ) : isEditing ? ( +
+
+ +
+ +
+
+
+ ) : !hasBeenOpened.current ? null : ( + keyValueArray.map(([key, value]) => ( +
+ {isCollection(value) ? ( + + ) : ( + + )} +
+ )) + ) + return (
= ({ > {brackets.close}
- {!isEditing && customEditable && ( + {!isEditing && showEditTools && ( = ({ transition: `max-height ${transitionTime}`, }} > - {isEditing ? ( -
-
- -
- -
-
-
- ) : ( - <> - {CustomNode && !isEditing ? ( - - ) : !hasBeenOpened.current ? null : ( - keyValueArray.map(([key, value]) => ( -
- {isCollection(value) ? ( - - ) : ( - - )} -
- )) - )} - - )} - + {CollectionComponent}
{error && ( diff --git a/src/ValueNodeWrapper.tsx b/src/ValueNodeWrapper.tsx index 56eab479..2ce5c803 100644 --- a/src/ValueNodeWrapper.tsx +++ b/src/ValueNodeWrapper.tsx @@ -21,7 +21,7 @@ import { } from './types' import { useTheme } from './theme' import './style.css' -import { getCustomNode } from './helpers' +import { CustomNodeData, getCustomNode } from './helpers' export const ValueNodeWrapper: React.FC = (props) => { const { @@ -49,19 +49,36 @@ export const ValueNodeWrapper: React.FC = (props) => { typeof data === 'function' ? INVALID_FUNCTION_STRING : data ) const [error, setError] = useState(null) - const [dataType, setDataType] = useState(getDataType(data)) + + const customNodeData = getCustomNode(customNodeDefinitions, { + key: name, + path, + level: path.length, + value: data, + size: 0, + }) + const [dataType, setDataType] = useState(getDataType(data, customNodeData)) useEffect(() => { setValue(typeof data === 'function' ? INVALID_FUNCTION_STRING : data) - setDataType(getDataType(data)) + setDataType(getDataType(data, customNodeData)) }, [data, error]) const handleChangeDataType = (type: DataType) => { const customNode = customNodeDefinitions.find((customNode) => customNode.name === type) if (customNode) { onEdit(customNode.defaultValue, path) + setDataType(type) } else { - setValue(convertValue(value, type)) + const newValue = convertValue( + value, + type, + // If coming *FROM* a custom type, need to change value to something + // that won't match the custom node condition any more + customNodeData?.CustomNode ? translate('DEFAULT_STRING') : undefined + ) + setValue(newValue) + onEdit(newValue, path) setDataType(type) } } @@ -117,7 +134,7 @@ export const ValueNodeWrapper: React.FC = (props) => { setIsEditing(false) setIsEditingKey(false) setValue(data) - setDataType(getDataType(data)) + setDataType(getDataType(data, customNodeData)) } const handleDelete = () => { @@ -151,21 +168,17 @@ export const ValueNodeWrapper: React.FC = (props) => { CustomNode, customNodeProps, hideKey, - customEditable = true, - } = getCustomNode(customNodeDefinitions, { - key: name, - path, - level: path.length, - value: data, - size: 0, - }) + showEditTools = true, + showOnEdit, + showOnView, + } = customNodeData // Include custom node options in dataType list const allDataTypes = [ + ...DataTypes, ...customNodeDefinitions - .filter(({ showInTypesSelector = false }) => showInTypesSelector) + .filter(({ showInTypesSelector = false, name }) => showInTypesSelector && !!name) .map(({ name }) => name), - ...DataTypes, ] const allowedDataTypes = useMemo(() => { @@ -180,6 +193,29 @@ export const ValueNodeWrapper: React.FC = (props) => { return result }, [filterProps, restrictTypeSelection]) + const ValueComponent = + CustomNode && ((isEditing && showOnEdit) || (!isEditing && showOnView)) ? ( + { + if (e.key === 'Enter') handleEdit() + else if (e.key === 'Escape') handleCancel() + }} + isEditing={isEditing} + setIsEditing={setIsEditing} + styles={styles} + /> + ) : ( + // Need to re-fetch data type to make sure it's one of the "core" ones + // when fetching a non-custom component + getInputComponent(getDataType(data) as DataType, inputProps) + ) + return (
= (props) => { /> )}
- {CustomNode && !isEditing ? ( - - ) : ( -
{getInputComponent(dataType, inputProps)}
- )} +
{ValueComponent}
{isEditing ? ( ) : ( dataType !== 'invalid' && !error && - customEditable && ( + showEditTools && ( setIsEditing(true) : undefined} handleDelete={canDelete ? handleDelete : undefined} @@ -265,7 +297,9 @@ export const ValueNodeWrapper: React.FC = (props) => { ) } -const getDataType = (value: unknown) => { +const getDataType = (value: unknown, customNodeData?: CustomNodeData) => { + if (customNodeData?.CustomNode && customNodeData?.name && customNodeData.showInTypesSelector) + return customNodeData.name if (typeof value === 'string') return 'string' if (typeof value === 'number') return 'number' if (typeof value === 'boolean') return 'boolean' @@ -293,10 +327,10 @@ const getInputComponent = (dataType: DataType, inputProps: InputProps) => { } } -const convertValue = (value: unknown, type: DataType) => { +const convertValue = (value: unknown, type: DataType, defaultString?: string) => { switch (type) { case 'string': - return String(value) + return defaultString ?? String(value) case 'number': const n = Number(value) return isNaN(n) ? 0 : n diff --git a/src/helpers.ts b/src/helpers.ts index e368ae77..08529c2c 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,18 +1,46 @@ -import { CustomNodeDefinition, FilterProps } from './types' +import { CustomNodeDefinition, CustomNodeProps, FilterProps } from './types' + +export interface CustomNodeData { + CustomNode?: React.FC + name?: string + customNodeProps?: Record + hideKey?: boolean + defaultValue?: unknown + showInTypesSelector?: boolean + showOnEdit?: boolean + showOnView?: boolean + showEditTools?: boolean +} // Fetches matching custom nodes (based on condition filter) from custom node // definitions and return the component and its props export const getCustomNode = ( customNodeDefinitions: CustomNodeDefinition[] = [], filterProps: FilterProps -) => { +): CustomNodeData => { const matchingDefinitions = customNodeDefinitions.filter(({ condition }) => condition(filterProps) ) if (matchingDefinitions.length === 0) return {} // Only take the first one that matches - const { element, props, hideKey = false, editable } = matchingDefinitions[0] + const { + element, + customNodeProps, + hideKey = false, + showEditTools = true, + showOnEdit = false, + showOnView = true, + ...rest + } = matchingDefinitions[0] - return { CustomNode: element, customNodeProps: props, hideKey, customEditable: editable } + return { + CustomNode: element, + customNodeProps, + hideKey, + showEditTools, + showOnEdit, + showOnView, + ...rest, + } } diff --git a/src/index.ts b/src/index.ts index cad4a288..5d7fd232 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,6 +6,10 @@ import { FilterFunction, CompareFunction, IconReplacements, + CollectionNodeProps, + ValueNodeProps, + CustomNodeProps, + CustomNodeDefinition, } from './types' import { LocalisedStrings, TranslateFunction } from './localisation' import { themes, ThemeName, Theme, ThemeInput } from './theme' @@ -24,4 +28,8 @@ export { type IconReplacements, type LocalisedStrings, type TranslateFunction, + type CollectionNodeProps, + type ValueNodeProps, + type CustomNodeProps, + type CustomNodeDefinition, } diff --git a/src/theme/index.ts b/src/theme/index.ts index 86fa66d5..6f519616 100644 --- a/src/theme/index.ts +++ b/src/theme/index.ts @@ -1,4 +1,12 @@ -import { ThemeInput, ThemeName, Theme, themes } from './themes' +import { ThemeInput, ThemeName, Theme, themes, CompiledStyles } from './themes' import { ThemeProvider, useTheme } from './ThemeProvider' -export { type ThemeInput, ThemeProvider, useTheme, themes, type Theme, type ThemeName } +export { + type ThemeInput, + ThemeProvider, + useTheme, + themes, + type Theme, + type ThemeName, + type CompiledStyles, +} diff --git a/src/types.ts b/src/types.ts index 5a824f64..6b33cea0 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,4 +1,4 @@ -import { ThemeInput } from './theme' +import { ThemeInput, CompiledStyles } from './theme' import { LocalisedStrings, TranslateFunction } from './localisation' import React from 'react' @@ -126,37 +126,41 @@ export interface CollectionNodeProps extends BaseNodeProps { defaultValue: unknown } +type ValueData = string | number | boolean | null export interface ValueNodeProps extends BaseNodeProps { - data: string | number | boolean | null + data: ValueData showLabel: boolean } export interface CustomNodeProps extends BaseNodeProps { + value: ValueData | CollectionData customProps?: Record parentData: CollectionData | null -} - -export interface CustomNodeWrapperProps { - name: CollectionKey - hideKey: boolean - children: JSX.Element - indent?: number + setValue: React.Dispatch> + handleEdit: () => void + handleCancel: () => void + handleKeyPress: (e: React.KeyboardEvent) => void + isEditing: boolean + setIsEditing: React.Dispatch> + styles: CompiledStyles } export interface CustomNodeDefinition { condition: FilterFunction element: React.FC - name: string // appears in "Type" selector - props?: Record + name?: string // appears in "Type" selector + customNodeProps?: Record hideKey?: boolean - defaultValue: unknown - showInTypesSelector?: boolean - editable?: boolean + defaultValue?: unknown + showInTypesSelector?: boolean // default false + showOnEdit?: boolean // default false + showOnView?: boolean // default true + showEditTools?: boolean // default true } export interface InputProps { value: unknown - setValue: React.Dispatch> + setValue: React.Dispatch> isEditing: boolean setIsEditing: React.Dispatch> handleEdit: () => void