msw-dev-tool 1.1.2 → 1.1.4

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 (27) hide show
  1. package/dist/cjs/hook/useFlattenHandlersTable.js +22 -3
  2. package/dist/cjs/hook/useFlattenHandlersTable.js.map +1 -1
  3. package/dist/cjs/lib/handlerStore.js +1 -1
  4. package/dist/cjs/node_modules/{@tanstack → .pnpm/@tanstack_react-table@8.20.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@tanstack}/react-table/build/lib/index.js +1 -1
  5. package/dist/cjs/node_modules/.pnpm/@tanstack_react-table@8.20.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@tanstack/react-table/build/lib/index.js.map +1 -0
  6. package/dist/cjs/node_modules/.pnpm/@tanstack_table-core@8.20.5/node_modules/@tanstack/table-core/build/lib/index.js.map +1 -0
  7. package/dist/cjs/node_modules/{lodash → .pnpm/lodash@4.17.21/node_modules/lodash}/lodash.js +2 -2
  8. package/dist/cjs/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js.map +1 -0
  9. package/dist/cjs/ui/DevToolContent/HttpControl.js +1 -1
  10. package/dist/esm/hook/useFlattenHandlersTable.js +22 -3
  11. package/dist/esm/hook/useFlattenHandlersTable.js.map +1 -1
  12. package/dist/esm/lib/handlerStore.js +1 -1
  13. package/dist/esm/node_modules/{@tanstack → .pnpm/@tanstack_react-table@8.20.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@tanstack}/react-table/build/lib/index.js +2 -2
  14. package/dist/esm/node_modules/.pnpm/@tanstack_react-table@8.20.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@tanstack/react-table/build/lib/index.js.map +1 -0
  15. package/dist/esm/node_modules/.pnpm/@tanstack_table-core@8.20.5/node_modules/@tanstack/table-core/build/lib/index.js.map +1 -0
  16. package/dist/esm/node_modules/{lodash → .pnpm/lodash@4.17.21/node_modules/lodash}/lodash.js +2 -2
  17. package/dist/esm/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js.map +1 -0
  18. package/dist/esm/ui/DevToolContent/HttpControl.js +1 -1
  19. package/package.json +2 -3
  20. package/dist/cjs/node_modules/@tanstack/react-table/build/lib/index.js.map +0 -1
  21. package/dist/cjs/node_modules/@tanstack/table-core/build/lib/index.js.map +0 -1
  22. package/dist/cjs/node_modules/lodash/lodash.js.map +0 -1
  23. package/dist/esm/node_modules/@tanstack/react-table/build/lib/index.js.map +0 -1
  24. package/dist/esm/node_modules/@tanstack/table-core/build/lib/index.js.map +0 -1
  25. package/dist/esm/node_modules/lodash/lodash.js.map +0 -1
  26. /package/dist/cjs/node_modules/{@tanstack → .pnpm/@tanstack_table-core@8.20.5/node_modules/@tanstack}/table-core/build/lib/index.js +0 -0
  27. /package/dist/esm/node_modules/{@tanstack → .pnpm/@tanstack_table-core@8.20.5/node_modules/@tanstack}/table-core/build/lib/index.js +0 -0
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var index$1 = require('../node_modules/@tanstack/react-table/build/lib/index.js');
3
+ var index$1 = require('../node_modules/.pnpm/@tanstack_react-table@8.20.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@tanstack/react-table/build/lib/index.js');
4
4
  var handlerStore = require('../lib/handlerStore.js');
5
5
  var React = require('react');
6
6
  var index = require('../ui/Table/PreviewHandler/index.js');
7
- var index$2 = require('../node_modules/@tanstack/table-core/build/lib/index.js');
7
+ var index$2 = require('../node_modules/.pnpm/@tanstack_table-core@8.20.5/node_modules/@tanstack/table-core/build/lib/index.js');
8
8
 
9
9
  const useFlattenHandlersTable = () => {
10
10
  const { flattenHandlers, handlerRowSelection, handleHandlerRowSelectionChange, } = handlerStore.useHandlerStore();
@@ -16,7 +16,26 @@ const useFlattenHandlersTable = () => {
16
16
  cell: ({ row }) => (React.createElement("input", { type: "checkbox", checked: row.getIsSelected(), onChange: (e) => row.toggleSelected(e.target.checked) })),
17
17
  }),
18
18
  columnHelper.accessor("path", {
19
- header: "End point",
19
+ header: "Protocol",
20
+ cell: ({ row }) => {
21
+ console.log(row.original.path);
22
+ const protocol = new URL(row.original.path, location.href).protocol;
23
+ return React.createElement("div", { className: "msw-dev-tool-center" }, protocol);
24
+ },
25
+ }),
26
+ columnHelper.accessor("path", {
27
+ header: "Host",
28
+ cell: ({ row }) => {
29
+ const host = new URL(row.original.path, location.href).host;
30
+ return React.createElement("div", { className: "msw-dev-tool-center" }, host);
31
+ },
32
+ }),
33
+ columnHelper.accessor("path", {
34
+ header: "Path",
35
+ cell: ({ row }) => {
36
+ const path = new URL(row.original.path, location.href).pathname;
37
+ return React.createElement("div", { className: "msw-dev-tool-center" }, path);
38
+ },
20
39
  }),
21
40
  columnHelper.accessor("method", {
22
41
  header: "Method",
@@ -1 +1 @@
1
- {"version":3,"file":"useFlattenHandlersTable.js","sources":["../../../src/hook/useFlattenHandlersTable.tsx"],"sourcesContent":["import {\n ColumnDef,\n createColumnHelper,\n getCoreRowModel,\n useReactTable,\n} from \"@tanstack/react-table\";\nimport { useHandlerStore } from \"../lib/handlerStore\";\nimport { FlattenHandler } from \"../lib\";\nimport React, { useMemo, useState } from \"react\";\nimport { PreviewHandler } from \"../ui/Table/PreviewHandler\";\n\nexport const useFlattenHandlersTable = () => {\n const {\n flattenHandlers,\n handlerRowSelection,\n handleHandlerRowSelectionChange,\n } = useHandlerStore();\n\n const columnHelper = createColumnHelper<FlattenHandler>();\n const columns: ColumnDef<FlattenHandler, any>[] = useMemo(() => {\n return [\n columnHelper.accessor(\"enabled\", {\n header: ({ table }) => (\n <input\n type=\"checkbox\"\n checked={table.getIsAllRowsSelected()}\n onChange={(e) => table.toggleAllRowsSelected(e.target.checked)}\n />\n ),\n cell: ({ row }) => (\n <input\n type=\"checkbox\"\n checked={row.getIsSelected()}\n onChange={(e) => row.toggleSelected(e.target.checked)}\n />\n ),\n }),\n columnHelper.accessor(\"path\", {\n header: \"End point\",\n }),\n columnHelper.accessor(\"method\", {\n header: \"Method\",\n cell: ({ row }) => (\n <div className=\"msw-dev-tool-center\">{row.original.method}</div>\n ),\n }),\n columnHelper.accessor(\"handler\", {\n header: \"Preview\",\n cell: ({ row }) => {\n const handler = row.original.handler;\n const [isOpen, setIsOpen] = useState(false);\n return (\n <>\n <button onClick={() => setIsOpen(true)}>Preview</button>\n {isOpen && (\n <PreviewHandler\n handler={handler}\n onClose={() => setIsOpen(false)}\n />\n )}\n </>\n );\n },\n }),\n ];\n }, []);\n\n const table = useReactTable({\n columns,\n data: flattenHandlers,\n getCoreRowModel: getCoreRowModel(),\n state: {\n rowSelection: handlerRowSelection,\n },\n onRowSelectionChange: handleHandlerRowSelectionChange,\n getRowId: (row) => row.id,\n enableRowSelection: true,\n });\n\n return table;\n};\n"],"names":["useHandlerStore","createColumnHelper","useMemo","useState","PreviewHandler","useReactTable","getCoreRowModel"],"mappings":";;;;;;;;AAWO,MAAM,uBAAuB,GAAG,MAAK;IAC1C,MAAM,EACJ,eAAe,EACf,mBAAmB,EACnB,+BAA+B,GAChC,GAAGA,4BAAe,EAAE,CAAC;AAEtB,IAAA,MAAM,YAAY,GAAGC,0BAAkB,EAAkB,CAAC;AAC1D,IAAA,MAAM,OAAO,GAAqCC,aAAO,CAAC,MAAK;QAC7D,OAAO;AACL,YAAA,YAAY,CAAC,QAAQ,CAAC,SAAS,EAAE;AAC/B,gBAAA,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAChB,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EACE,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,KAAK,CAAC,oBAAoB,EAAE,EACrC,QAAQ,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAC9D,CACH;AACD,gBAAA,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,MACZ,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EACE,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C,qBAAa,CAAC;QAC1B,OAAO;AACP,QAAA,IAAI,EAAE,eAAe;QACrB,eAAe,EAAEC,uBAAe,EAAE;AAClC,QAAA,KAAK,EAAE;AACL,YAAA,YAAY,EAAE,mBAAmB;AAClC,SAAA;AACD,QAAA,oBAAoB,EAAE,+BAA+B;QACrD,QAAQ,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE;AACzB,QAAA,kBAAkB,EAAE,IAAI;AACzB,KAAA,CAAC,CAAC;AAEH,IAAA,OAAO,KAAK,CAAC;AACf;;;;"}
1
+ {"version":3,"file":"useFlattenHandlersTable.js","sources":["../../../src/hook/useFlattenHandlersTable.tsx"],"sourcesContent":["import {\n ColumnDef,\n createColumnHelper,\n getCoreRowModel,\n useReactTable,\n} from \"@tanstack/react-table\";\nimport { useHandlerStore } from \"../lib/handlerStore\";\nimport { FlattenHandler } from \"../lib\";\nimport React, { useMemo, useState } from \"react\";\nimport { PreviewHandler } from \"../ui/Table/PreviewHandler\";\n\nexport const useFlattenHandlersTable = () => {\n const {\n flattenHandlers,\n handlerRowSelection,\n handleHandlerRowSelectionChange,\n } = useHandlerStore();\n\n const columnHelper = createColumnHelper<FlattenHandler>();\n const columns: ColumnDef<FlattenHandler, any>[] = useMemo(() => {\n return [\n columnHelper.accessor(\"enabled\", {\n header: ({ table }) => (\n <input\n type=\"checkbox\"\n checked={table.getIsAllRowsSelected()}\n onChange={(e) => table.toggleAllRowsSelected(e.target.checked)}\n />\n ),\n cell: ({ row }) => (\n <input\n type=\"checkbox\"\n checked={row.getIsSelected()}\n onChange={(e) => row.toggleSelected(e.target.checked)}\n />\n ),\n }),\n columnHelper.accessor(\"path\", {\n header: \"Protocol\",\n cell: ({ row }) => {\n console.log(row.original.path);\n const protocol = new URL(row.original.path, location.href).protocol;\n return <div className=\"msw-dev-tool-center\">{protocol}</div>;\n },\n }),\n columnHelper.accessor(\"path\", {\n header: \"Host\",\n cell: ({ row }) => {\n const host = new URL(row.original.path,location.href).host;\n return <div className=\"msw-dev-tool-center\">{host}</div>;\n },\n }),\n columnHelper.accessor(\"path\", {\n header: \"Path\",\n cell: ({ row }) => {\n const path = new URL(row.original.path, location.href).pathname;\n return <div className=\"msw-dev-tool-center\">{path}</div>;\n },\n }),\n columnHelper.accessor(\"method\", {\n header: \"Method\",\n cell: ({ row }) => (\n <div className=\"msw-dev-tool-center\">{row.original.method}</div>\n ),\n }),\n columnHelper.accessor(\"handler\", {\n header: \"Preview\",\n cell: ({ row }) => {\n const handler = row.original.handler;\n const [isOpen, setIsOpen] = useState(false);\n return (\n <>\n <button onClick={() => setIsOpen(true)}>Preview</button>\n {isOpen && (\n <PreviewHandler\n handler={handler}\n onClose={() => setIsOpen(false)}\n />\n )}\n </>\n );\n },\n }),\n ];\n }, []);\n\n const table = useReactTable({\n columns,\n data: flattenHandlers,\n getCoreRowModel: getCoreRowModel(),\n state: {\n rowSelection: handlerRowSelection,\n },\n onRowSelectionChange: handleHandlerRowSelectionChange,\n getRowId: (row) => row.id,\n enableRowSelection: true,\n });\n\n return table;\n};\n"],"names":["useHandlerStore","createColumnHelper","useMemo","useState","PreviewHandler","useReactTable","getCoreRowModel"],"mappings":";;;;;;;;AAWO,MAAM,uBAAuB,GAAG,MAAK;IAC1C,MAAM,EACJ,eAAe,EACf,mBAAmB,EACnB,+BAA+B,GAChC,GAAGA,4BAAe,EAAE,CAAC;AAEtB,IAAA,MAAM,YAAY,GAAGC,0BAAkB,EAAkB,CAAC;AAC1D,IAAA,MAAM,OAAO,GAAqCC,aAAO,CAAC,MAAK;QAC7D,OAAO;AACL,YAAA,YAAY,CAAC,QAAQ,CAAC,SAAS,EAAE;AAC/B,gBAAA,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,MAChB,KAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EACE,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,KAAK,CAAC,oBAAoB,EAAE,EACrC,QAAQ,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,qBA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AAa,CAAC;QAC1B,OAAO;AACP,QAAA,IAAI,EAAE,eAAe;QACrB,eAAe,EAAEC,uBAAe,EAAE;AAClC,QAAA,KAAK,EAAE;AACL,YAAA,YAAY,EAAE,mBAAmB;AAClC,SAAA;AACD,QAAA,oBAAoB,EAAE,+BAA+B;QACrD,QAAQ,EAAE,CAAC,GAAG,KAAK,GAAG,CAAC,EAAE;AACzB,QAAA,kBAAkB,EAAE,IAAI;AACzB,KAAA,CAAC,CAAC;AAEH,IAAA,OAAO,KAAK,CAAC;AACf;;;;"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  var zustand = require('zustand');
4
4
  var util = require('./util.js');
5
- var lodash = require('../node_modules/lodash/lodash.js');
5
+ var lodash = require('../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js');
6
6
 
7
7
  const useHandlerStore = zustand.create((set, get) => ({
8
8
  flattenHandlers: [],
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- var index = require('../../../table-core/build/lib/index.js');
4
+ var index = require('../../../../../../@tanstack_table-core@8.20.5/node_modules/@tanstack/table-core/build/lib/index.js');
5
5
 
6
6
  function _interopNamespaceDefault(e) {
7
7
  var n = Object.create(null);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../../../../../../../../node_modules/.pnpm/@tanstack+react-table@8.20.6_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@tanstack/react-table/build/lib/index.mjs"],"sourcesContent":["/**\n * react-table\n *\n * Copyright (c) TanStack\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport * as React from 'react';\nimport { createTable } from '@tanstack/table-core';\nexport * from '@tanstack/table-core';\n\n//\n\n/**\n * If rendering headers, cells, or footers with custom markup, use flexRender instead of `cell.getValue()` or `cell.renderValue()`.\n */\nfunction flexRender(Comp, props) {\n return !Comp ? null : isReactComponent(Comp) ? /*#__PURE__*/React.createElement(Comp, props) : Comp;\n}\nfunction isReactComponent(component) {\n return isClassComponent(component) || typeof component === 'function' || isExoticComponent(component);\n}\nfunction isClassComponent(component) {\n return typeof component === 'function' && (() => {\n const proto = Object.getPrototypeOf(component);\n return proto.prototype && proto.prototype.isReactComponent;\n })();\n}\nfunction isExoticComponent(component) {\n return typeof component === 'object' && typeof component.$$typeof === 'symbol' && ['react.memo', 'react.forward_ref'].includes(component.$$typeof.description);\n}\nfunction useReactTable(options) {\n // Compose in the generic options to the user options\n const resolvedOptions = {\n state: {},\n // Dummy state\n onStateChange: () => {},\n // noop\n renderFallbackValue: null,\n ...options\n };\n\n // Create a new table and store it in state\n const [tableRef] = React.useState(() => ({\n current: createTable(resolvedOptions)\n }));\n\n // By default, manage table state here using the table's initial state\n const [state, setState] = React.useState(() => tableRef.current.initialState);\n\n // Compose the default state above with any user state. This will allow the user\n // to only control a subset of the state if desired.\n tableRef.current.setOptions(prev => ({\n ...prev,\n ...options,\n state: {\n ...state,\n ...options.state\n },\n // Similarly, we'll maintain both our internal state and any user-provided\n // state.\n onStateChange: updater => {\n setState(updater);\n options.onStateChange == null || options.onStateChange(updater);\n }\n }));\n return tableRef.current;\n}\n\nexport { flexRender, useReactTable };\n//# sourceMappingURL=index.mjs.map\n"],"names":["React","createTable"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE;AACjC,EAAE,OAAO,CAAC,IAAI,GAAG,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,gBAAgBA,gBAAK,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,IAAI,CAAC;AACtG,CAAC;AACD,SAAS,gBAAgB,CAAC,SAAS,EAAE;AACrC,EAAE,OAAO,gBAAgB,CAAC,SAAS,CAAC,IAAI,OAAO,SAAS,KAAK,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