@techdocs/cli 1.8.24-next.2 → 1.8.25-next.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.
- package/CHANGELOG.md +22 -0
- package/dist/embedded-app/.config-schema.json +983 -2315
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/index.html.tmpl +1 -1
- package/dist/embedded-app/static/2177.8343b97e.chunk.js +4 -0
- package/dist/embedded-app/static/2177.8343b97e.chunk.js.map +1 -0
- package/dist/embedded-app/static/3720.646b3e89.chunk.js +11 -0
- package/dist/embedded-app/static/3720.646b3e89.chunk.js.map +1 -0
- package/dist/embedded-app/static/4487.f04b8beb.chunk.js +3 -0
- package/dist/embedded-app/static/4487.f04b8beb.chunk.js.map +1 -0
- package/dist/embedded-app/static/{5788.ae686304.chunk.js → 5788.b8d84f8c.chunk.js} +2 -2
- package/dist/embedded-app/static/5788.b8d84f8c.chunk.js.map +1 -0
- package/dist/embedded-app/static/8803.2d9f247d.chunk.js +11 -0
- package/dist/embedded-app/static/{8803.428ea2da.chunk.js.map → 8803.2d9f247d.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.a90fd85d.js +553 -0
- package/dist/embedded-app/static/main.a90fd85d.js.map +1 -0
- package/dist/embedded-app/static/{runtime.379a4fa3.js → runtime.a90fd85d.js} +2 -2
- package/dist/embedded-app/static/{runtime.379a4fa3.js.map → runtime.a90fd85d.js.map} +1 -1
- package/dist/embedded-app/static/{vendor.379a4fa3.js → vendor.a90fd85d.js} +4 -4
- package/dist/embedded-app/static/vendor.a90fd85d.js.map +1 -0
- package/dist/package.json.cjs.js +1 -1
- package/package.json +6 -6
- package/dist/embedded-app/static/2177.ccfa8e42.chunk.js +0 -4
- package/dist/embedded-app/static/2177.ccfa8e42.chunk.js.map +0 -1
- package/dist/embedded-app/static/3720.68bd02ba.chunk.js +0 -11
- package/dist/embedded-app/static/3720.68bd02ba.chunk.js.map +0 -1
- package/dist/embedded-app/static/4487.bd329be6.chunk.js +0 -3
- package/dist/embedded-app/static/4487.bd329be6.chunk.js.map +0 -1
- package/dist/embedded-app/static/5788.ae686304.chunk.js.map +0 -1
- package/dist/embedded-app/static/8803.428ea2da.chunk.js +0 -11
- package/dist/embedded-app/static/main.379a4fa3.js +0 -553
- package/dist/embedded-app/static/main.379a4fa3.js.map +0 -1
- package/dist/embedded-app/static/vendor.379a4fa3.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/3720.68bd02ba.chunk.js","mappings":"oJAEIA,GAAyB,EAAQ,IAA8C,EAE/EC,EAA0B,EAAQ,KAA+C,EAErF,EAA6C,CAC3C,MAAO,EACT,EACAC,EAAQ,EAAU,OAElB,IAAIC,EAAQF,EAAwB,EAAQ,KAAO,CAAC,EAEhDG,EAAiBJ,GAAuB,EAAQ,KAAuB,CAAC,EAExEK,KAAeD,EAAe,SAAuBD,EAAM,cAAc,OAAQ,CACnF,EAAG,gKACL,CAAC,EAAG,kBAAkB,EAEtBD,EAAQ,EAAUG,C,mBCnBlB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASa,IAAIC,EAAE,EAAQ,KAAO,EAAE,SAASC,GAAEC,EAAEC,EAAE,CAAC,OAAOD,IAAIC,IAAQD,IAAJ,GAAO,EAAEA,IAAI,EAAEC,IAAID,IAAIA,GAAGC,IAAIA,CAAC,CAAC,IAAIC,EAAe,OAAO,OAAO,IAA3B,WAA8B,OAAO,GAAGH,GAAEI,EAAEL,EAAE,SAASM,EAAEN,EAAE,UAAUO,EAAEP,EAAE,gBAAgBQ,EAAER,EAAE,cAAc,SAASS,EAAEP,EAAEC,EAAE,CAAC,IAAIO,EAAEP,EAAE,EAAEQ,EAAEN,EAAE,CAAC,KAAK,CAAC,MAAMK,EAAE,YAAYP,CAAC,CAAC,CAAC,EAAES,EAAED,EAAE,CAAC,EAAE,KAAKE,EAAEF,EAAE,CAAC,EAAE,OAAAJ,EAAE,UAAU,CAAC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,EAAY+E,EAAI,GAAKtD,EAAK,CAItC,GAAI,CAACiB,IAAmBC,GACpB,MAAM,IAAI,MAAM,uDAAuD,EAG3E6H,EAAW,QAAUlC,EACrBmC,EAAU,QAAUhE,EACpB6D,EAAa,QAAU,GACvB,MAAM9B,EAAM5D,GAAQnD,CAAG,EACvB,GAAI,CAACzB,EAAYwI,CAAG,EAAG,CACnB,MAAMkB,EAAU4D,GAAY9E,CAAG,EAC/B,GAAIkB,CAAO,CACf,CACA,GAAI1J,EAAYgE,EAAK,EAAG,CACpB,MAAM0F,EAAUhD,GAAWiD,EAAW,EACjC3J,EAAYoL,EAAY,IACzB1B,EAAQ,OAAS,YACjBA,EAAQ,MAAQ,IAEpB,GAAIA,CAAO,CACf,KACI,OAAM1F,EAEd,CACA,MAAO,CACH,OAAQsJ,GACR,IAAI,MAAQ,CACR,OAAAtC,EAAkB,KAAO,GAClBI,EACX,EACA,IAAI,OAAS,CACT,OAAAJ,EAAkB,MAAQ,GACnBhH,EACX,EACA,IAAI,cAAgB,CAChB,OAAAgH,EAAkB,aAAe,GAC1BqB,EACX,EACA,IAAI,WAAa,CACb,OAAArB,EAAkB,UAAY,GACvBsB,EACX,CACJ,CACJ,EACM,GAAYvM,EAAO,eAAewH,GAAa,eAAgB,CACjE,MAAOP,EACX,CAAC,EAeSuC,GAASV,GAASe,EAAa,C","sources":["webpack://techdocs-cli-embedded-app/../../node_modules/@material-ui/icons/AddCircleOutline.js","webpack://techdocs-cli-embedded-app/../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","webpack://techdocs-cli-embedded-app/../../node_modules/use-sync-external-store/shim/index.js","webpack://techdocs-cli-embedded-app/../../node_modules/swr/dist/_internal/index.mjs","webpack://techdocs-cli-embedded-app/../../node_modules/swr/dist/core/index.mjs"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z\"\n}), 'AddCircleOutline');\n\nexports.default = _default;","/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","import React, { useEffect, useLayoutEffect, createContext, useContext, useMemo, useRef, createElement } from 'react';\n\n// Shared state between server components and client components\nconst noop = ()=>{};\n// Using noop() as the undefined value as undefined can be replaced\n// by something else. Prettier ignore and extra parentheses are necessary here\n// to ensure that tsc doesn't remove the __NOINLINE__ comment.\n// prettier-ignore\nconst UNDEFINED = /*#__NOINLINE__*/ noop();\nconst OBJECT = Object;\nconst isUndefined = (v)=>v === UNDEFINED;\nconst isFunction = (v)=>typeof v == 'function';\nconst mergeObjects = (a, b)=>({\n ...a,\n ...b\n });\nconst isPromiseLike = (x)=>isFunction(x.then);\n\n// use WeakMap to store the object->key mapping\n// so the objects can be garbage collected.\n// WeakMap uses a hashtable under the hood, so the lookup\n// complexity is almost O(1).\nconst table = new WeakMap();\n// counter of the key\nlet counter = 0;\n// A stable hash implementation that supports:\n// - Fast and ensures unique hash properties\n// - Handles unserializable values\n// - Handles object key ordering\n// - Generates short results\n//\n// This is not a serialization function, and the result is not guaranteed to be\n// parsable.\nconst stableHash = (arg)=>{\n const type = typeof arg;\n const constructor = arg && arg.constructor;\n const isDate = constructor == Date;\n let result;\n let index;\n if (OBJECT(arg) === arg && !isDate && constructor != RegExp) {\n // Object/function, not null/date/regexp. Use WeakMap to store the id first.\n // If it's already hashed, directly return the result.\n result = table.get(arg);\n if (result) return result;\n // Store the hash first for circular reference detection before entering the\n // recursive `stableHash` calls.\n // For other objects like set and map, we use this id directly as the hash.\n result = ++counter + '~';\n table.set(arg, result);\n if (constructor == Array) {\n // Array.\n result = '@';\n for(index = 0; index < arg.length; index++){\n result += stableHash(arg[index]) + ',';\n }\n table.set(arg, result);\n }\n if (constructor == OBJECT) {\n // Object, sort keys.\n result = '#';\n const keys = OBJECT.keys(arg).sort();\n while(!isUndefined(index = keys.pop())){\n if (!isUndefined(arg[index])) {\n result += index + ':' + stableHash(arg[index]) + ',';\n }\n }\n table.set(arg, result);\n }\n } else {\n result = isDate ? arg.toJSON() : type == 'symbol' ? arg.toString() : type == 'string' ? JSON.stringify(arg) : '' + arg;\n }\n return result;\n};\n\n// Global state used to deduplicate requests and store listeners\nconst SWRGlobalState = new WeakMap();\n\nconst EMPTY_CACHE = {};\nconst INITIAL_CACHE = {};\nconst STR_UNDEFINED = 'undefined';\n// NOTE: Use the function to guarantee it's re-evaluated between jsdom and node runtime for tests.\nconst isWindowDefined = typeof window != STR_UNDEFINED;\nconst isDocumentDefined = typeof document != STR_UNDEFINED;\nconst hasRequestAnimationFrame = ()=>isWindowDefined && typeof window['requestAnimationFrame'] != STR_UNDEFINED;\nconst createCacheHelper = (cache, key)=>{\n const state = SWRGlobalState.get(cache);\n return [\n // Getter\n ()=>!isUndefined(key) && cache.get(key) || EMPTY_CACHE,\n // Setter\n (info)=>{\n if (!isUndefined(key)) {\n const prev = cache.get(key);\n // Before writing to the store, we keep the value in the initial cache\n // if it's not there yet.\n if (!(key in INITIAL_CACHE)) {\n INITIAL_CACHE[key] = prev;\n }\n state[5](key, mergeObjects(prev, info), prev || EMPTY_CACHE);\n }\n },\n // Subscriber\n state[6],\n // Get server cache snapshot\n ()=>{\n if (!isUndefined(key)) {\n // If the cache was updated on the client, we return the stored initial value.\n if (key in INITIAL_CACHE) return INITIAL_CACHE[key];\n }\n // If we haven't done any client-side updates, we return the current value.\n return !isUndefined(key) && cache.get(key) || EMPTY_CACHE;\n }\n ];\n} // export { UNDEFINED, OBJECT, isUndefined, isFunction, mergeObjects, isPromiseLike }\n;\n\n/**\n * Due to the bug https://bugs.chromium.org/p/chromium/issues/detail?id=678075,\n * it's not reliable to detect if the browser is currently online or offline\n * based on `navigator.onLine`.\n * As a workaround, we always assume it's online on the first load, and change\n * the status upon `online` or `offline` events.\n */ let online = true;\nconst isOnline = ()=>online;\n// For node and React Native, `add/removeEventListener` doesn't exist on window.\nconst [onWindowEvent, offWindowEvent] = isWindowDefined && window.addEventListener ? [\n window.addEventListener.bind(window),\n window.removeEventListener.bind(window)\n] : [\n noop,\n noop\n];\nconst isVisible = ()=>{\n const visibilityState = isDocumentDefined && document.visibilityState;\n return isUndefined(visibilityState) || visibilityState !== 'hidden';\n};\nconst initFocus = (callback)=>{\n // focus revalidate\n if (isDocumentDefined) {\n document.addEventListener('visibilitychange', callback);\n }\n onWindowEvent('focus', callback);\n return ()=>{\n if (isDocumentDefined) {\n document.removeEventListener('visibilitychange', callback);\n }\n offWindowEvent('focus', callback);\n };\n};\nconst initReconnect = (callback)=>{\n // revalidate on reconnected\n const onOnline = ()=>{\n online = true;\n callback();\n };\n // nothing to revalidate, just update the status\n const onOffline = ()=>{\n online = false;\n };\n onWindowEvent('online', onOnline);\n onWindowEvent('offline', onOffline);\n return ()=>{\n offWindowEvent('online', onOnline);\n offWindowEvent('offline', onOffline);\n };\n};\nconst preset = {\n isOnline,\n isVisible\n};\nconst defaultConfigOptions = {\n initFocus,\n initReconnect\n};\n\nconst IS_REACT_LEGACY = !React.useId;\nconst IS_SERVER = !isWindowDefined || 'Deno' in window;\n// Polyfill requestAnimationFrame\nconst rAF = (f)=>hasRequestAnimationFrame() ? window['requestAnimationFrame'](f) : setTimeout(f, 1);\n// React currently throws a warning when using useLayoutEffect on the server.\n// To get around it, we can conditionally useEffect on the server (no-op) and\n// useLayoutEffect in the browser.\nconst useIsomorphicLayoutEffect = IS_SERVER ? useEffect : useLayoutEffect;\n// This assignment is to extend the Navigator type to use effectiveType.\nconst navigatorConnection = typeof navigator !== 'undefined' && navigator.connection;\n// Adjust the config based on slow connection status (<= 70Kbps).\nconst slowConnection = !IS_SERVER && navigatorConnection && ([\n 'slow-2g',\n '2g'\n].includes(navigatorConnection.effectiveType) || navigatorConnection.saveData);\n\nconst serialize = (key)=>{\n if (isFunction(key)) {\n try {\n key = key();\n } catch (err) {\n // dependencies not ready\n key = '';\n }\n }\n // Use the original key as the argument of fetcher. This can be a string or an\n // array of values.\n const args = key;\n // If key is not falsy, or not an empty array, hash it.\n key = typeof key == 'string' ? key : (Array.isArray(key) ? key.length : key) ? stableHash(key) : '';\n return [\n key,\n args\n ];\n};\n\n// Global timestamp.\nlet __timestamp = 0;\nconst getTimestamp = ()=>++__timestamp;\n\nconst FOCUS_EVENT = 0;\nconst RECONNECT_EVENT = 1;\nconst MUTATE_EVENT = 2;\nconst ERROR_REVALIDATE_EVENT = 3;\n\nvar events = {\n __proto__: null,\n ERROR_REVALIDATE_EVENT: ERROR_REVALIDATE_EVENT,\n FOCUS_EVENT: FOCUS_EVENT,\n MUTATE_EVENT: MUTATE_EVENT,\n RECONNECT_EVENT: RECONNECT_EVENT\n};\n\nasync function internalMutate(...args) {\n const [cache, _key, _data, _opts] = args;\n // When passing as a boolean, it's explicitly used to disable/enable\n // revalidation.\n const options = mergeObjects({\n populateCache: true,\n throwOnError: true\n }, typeof _opts === 'boolean' ? {\n revalidate: _opts\n } : _opts || {});\n let populateCache = options.populateCache;\n const rollbackOnErrorOption = options.rollbackOnError;\n let optimisticData = options.optimisticData;\n const rollbackOnError = (error)=>{\n return typeof rollbackOnErrorOption === 'function' ? rollbackOnErrorOption(error) : rollbackOnErrorOption !== false;\n };\n const throwOnError = options.throwOnError;\n // If the second argument is a key filter, return the mutation results for all\n // filtered keys.\n if (isFunction(_key)) {\n const keyFilter = _key;\n const matchedKeys = [];\n const it = cache.keys();\n for (const key of it){\n if (// Skip the special useSWRInfinite and useSWRSubscription keys.\n !/^\\$(inf|sub)\\$/.test(key) && keyFilter(cache.get(key)._k)) {\n matchedKeys.push(key);\n }\n }\n return Promise.all(matchedKeys.map(mutateByKey));\n }\n return mutateByKey(_key);\n async function mutateByKey(_k) {\n // Serialize key\n const [key] = serialize(_k);\n if (!key) return;\n const [get, set] = createCacheHelper(cache, key);\n const [EVENT_REVALIDATORS, MUTATION, FETCH, PRELOAD] = SWRGlobalState.get(cache);\n const startRevalidate = ()=>{\n const revalidators = EVENT_REVALIDATORS[key];\n const revalidate = isFunction(options.revalidate) ? options.revalidate(get().data, _k) : options.revalidate !== false;\n if (revalidate) {\n // Invalidate the key by deleting the concurrent request markers so new\n // requests will not be deduped.\n delete FETCH[key];\n delete PRELOAD[key];\n if (revalidators && revalidators[0]) {\n return revalidators[0](MUTATE_EVENT).then(()=>get().data);\n }\n }\n return get().data;\n };\n // If there is no new data provided, revalidate the key with current state.\n if (args.length < 3) {\n // Revalidate and broadcast state.\n return startRevalidate();\n }\n let data = _data;\n let error;\n // Update global timestamps.\n const beforeMutationTs = getTimestamp();\n MUTATION[key] = [\n beforeMutationTs,\n 0\n ];\n const hasOptimisticData = !isUndefined(optimisticData);\n const state = get();\n // `displayedData` is the current value on screen. It could be the optimistic value\n // that is going to be overridden by a `committedData`, or get reverted back.\n // `committedData` is the validated value that comes from a fetch or mutation.\n const displayedData = state.data;\n const currentData = state._c;\n const committedData = isUndefined(currentData) ? displayedData : currentData;\n // Do optimistic data update.\n if (hasOptimisticData) {\n optimisticData = isFunction(optimisticData) ? optimisticData(committedData, displayedData) : optimisticData;\n // When we set optimistic data, backup the current committedData data in `_c`.\n set({\n data: optimisticData,\n _c: committedData\n });\n }\n if (isFunction(data)) {\n // `data` is a function, call it passing current cache value.\n try {\n data = data(committedData);\n } catch (err) {\n // If it throws an error synchronously, we shouldn't update the cache.\n error = err;\n }\n }\n // `data` is a promise/thenable, resolve the final data first.\n if (data && isPromiseLike(data)) {\n // This means that the mutation is async, we need to check timestamps to\n // avoid race conditions.\n data = await data.catch((err)=>{\n error = err;\n });\n // Check if other mutations have occurred since we've started this mutation.\n // If there's a race we don't update cache or broadcast the change,\n // just return the data.\n if (beforeMutationTs !== MUTATION[key][0]) {\n if (error) throw error;\n return data;\n } else if (error && hasOptimisticData && rollbackOnError(error)) {\n // Rollback. Always populate the cache in this case but without\n // transforming the data.\n populateCache = true;\n // Reset data to be the latest committed data, and clear the `_c` value.\n set({\n data: committedData,\n _c: UNDEFINED\n });\n }\n }\n // If we should write back the cache after request.\n if (populateCache) {\n if (!error) {\n // Transform the result into data.\n if (isFunction(populateCache)) {\n const populateCachedData = populateCache(data, committedData);\n set({\n data: populateCachedData,\n error: UNDEFINED,\n _c: UNDEFINED\n });\n } else {\n // Only update cached data and reset the error if there's no error. Data can be `undefined` here.\n set({\n data,\n error: UNDEFINED,\n _c: UNDEFINED\n });\n }\n }\n }\n // Reset the timestamp to mark the mutation has ended.\n MUTATION[key][1] = getTimestamp();\n // Update existing SWR Hooks' internal states:\n Promise.resolve(startRevalidate()).then(()=>{\n // The mutation and revalidation are ended, we can clear it since the data is\n // not an optimistic value anymore.\n set({\n _c: UNDEFINED\n });\n });\n // Throw error or return data\n if (error) {\n if (throwOnError) throw error;\n return;\n }\n return data;\n }\n}\n\nconst revalidateAllKeys = (revalidators, type)=>{\n for(const key in revalidators){\n if (revalidators[key][0]) revalidators[key][0](type);\n }\n};\nconst initCache = (provider, options)=>{\n // The global state for a specific provider will be used to deduplicate\n // requests and store listeners. As well as a mutate function that is bound to\n // the cache.\n // The provider's global state might be already initialized. Let's try to get the\n // global state associated with the provider first.\n if (!SWRGlobalState.has(provider)) {\n const opts = mergeObjects(defaultConfigOptions, options);\n // If there's no global state bound to the provider, create a new one with the\n // new mutate function.\n const EVENT_REVALIDATORS = {};\n const mutate = internalMutate.bind(UNDEFINED, provider);\n let unmount = noop;\n const subscriptions = {};\n const subscribe = (key, callback)=>{\n const subs = subscriptions[key] || [];\n subscriptions[key] = subs;\n subs.push(callback);\n return ()=>subs.splice(subs.indexOf(callback), 1);\n };\n const setter = (key, value, prev)=>{\n provider.set(key, value);\n const subs = subscriptions[key];\n if (subs) {\n for (const fn of subs){\n fn(value, prev);\n }\n }\n };\n const initProvider = ()=>{\n if (!SWRGlobalState.has(provider)) {\n // Update the state if it's new, or if the provider has been extended.\n SWRGlobalState.set(provider, [\n EVENT_REVALIDATORS,\n {},\n {},\n {},\n mutate,\n setter,\n subscribe\n ]);\n if (!IS_SERVER) {\n // When listening to the native events for auto revalidations,\n // we intentionally put a delay (setTimeout) here to make sure they are\n // fired after immediate JavaScript executions, which can be\n // React's state updates.\n // This avoids some unnecessary revalidations such as\n // https://github.com/vercel/swr/issues/1680.\n const releaseFocus = opts.initFocus(setTimeout.bind(UNDEFINED, revalidateAllKeys.bind(UNDEFINED, EVENT_REVALIDATORS, FOCUS_EVENT)));\n const releaseReconnect = opts.initReconnect(setTimeout.bind(UNDEFINED, revalidateAllKeys.bind(UNDEFINED, EVENT_REVALIDATORS, RECONNECT_EVENT)));\n unmount = ()=>{\n releaseFocus && releaseFocus();\n releaseReconnect && releaseReconnect();\n // When un-mounting, we need to remove the cache provider from the state\n // storage too because it's a side-effect. Otherwise, when re-mounting we\n // will not re-register those event listeners.\n SWRGlobalState.delete(provider);\n };\n }\n }\n };\n initProvider();\n // This is a new provider, we need to initialize it and setup DOM events\n // listeners for `focus` and `reconnect` actions.\n // We might want to inject an extra layer on top of `provider` in the future,\n // such as key serialization, auto GC, etc.\n // For now, it's just a `Map` interface without any modifications.\n return [\n provider,\n mutate,\n initProvider,\n unmount\n ];\n }\n return [\n provider,\n SWRGlobalState.get(provider)[4]\n ];\n};\n\n// error retry\nconst onErrorRetry = (_, __, config, revalidate, opts)=>{\n const maxRetryCount = config.errorRetryCount;\n const currentRetryCount = opts.retryCount;\n // Exponential backoff\n const timeout = ~~((Math.random() + 0.5) * (1 << (currentRetryCount < 8 ? currentRetryCount : 8))) * config.errorRetryInterval;\n if (!isUndefined(maxRetryCount) && currentRetryCount > maxRetryCount) {\n return;\n }\n setTimeout(revalidate, timeout, opts);\n};\nconst compare = (currentData, newData)=>stableHash(currentData) == stableHash(newData);\n// Default cache provider\nconst [cache, mutate] = initCache(new Map());\n// Default config\nconst defaultConfig = mergeObjects({\n // events\n onLoadingSlow: noop,\n onSuccess: noop,\n onError: noop,\n onErrorRetry,\n onDiscarded: noop,\n // switches\n revalidateOnFocus: true,\n revalidateOnReconnect: true,\n revalidateIfStale: true,\n shouldRetryOnError: true,\n // timeouts\n errorRetryInterval: slowConnection ? 10000 : 5000,\n focusThrottleInterval: 5 * 1000,\n dedupingInterval: 2 * 1000,\n loadingTimeout: slowConnection ? 5000 : 3000,\n // providers\n compare,\n isPaused: ()=>false,\n cache,\n mutate,\n fallback: {}\n}, // use web preset by default\npreset);\n\nconst mergeConfigs = (a, b)=>{\n // Need to create a new object to avoid mutating the original here.\n const v = mergeObjects(a, b);\n // If two configs are provided, merge their `use` and `fallback` options.\n if (b) {\n const { use: u1, fallback: f1 } = a;\n const { use: u2, fallback: f2 } = b;\n if (u1 && u2) {\n v.use = u1.concat(u2);\n }\n if (f1 && f2) {\n v.fallback = mergeObjects(f1, f2);\n }\n }\n return v;\n};\n\nconst SWRConfigContext = createContext({});\nconst SWRConfig = (props)=>{\n const { value } = props;\n const parentConfig = useContext(SWRConfigContext);\n const isFunctionalConfig = isFunction(value);\n const config = useMemo(()=>isFunctionalConfig ? value(parentConfig) : value, [\n isFunctionalConfig,\n parentConfig,\n value\n ]);\n // Extend parent context values and middleware.\n const extendedConfig = useMemo(()=>isFunctionalConfig ? config : mergeConfigs(parentConfig, config), [\n isFunctionalConfig,\n parentConfig,\n config\n ]);\n // Should not use the inherited provider.\n const provider = config && config.provider;\n // initialize the cache only on first access.\n const cacheContextRef = useRef(UNDEFINED);\n if (provider && !cacheContextRef.current) {\n cacheContextRef.current = initCache(provider(extendedConfig.cache || cache), config);\n }\n const cacheContext = cacheContextRef.current;\n // Override the cache if a new provider is given.\n if (cacheContext) {\n extendedConfig.cache = cacheContext[0];\n extendedConfig.mutate = cacheContext[1];\n }\n // Unsubscribe events.\n useIsomorphicLayoutEffect(()=>{\n if (cacheContext) {\n cacheContext[2] && cacheContext[2]();\n return cacheContext[3];\n }\n }, []);\n return createElement(SWRConfigContext.Provider, mergeObjects(props, {\n value: extendedConfig\n }));\n};\n\nconst INFINITE_PREFIX = '$inf$';\n\n// @ts-expect-error\nconst enableDevtools = isWindowDefined && window.__SWR_DEVTOOLS_USE__;\nconst use = enableDevtools ? window.__SWR_DEVTOOLS_USE__ : [];\nconst setupDevTools = ()=>{\n if (enableDevtools) {\n // @ts-expect-error\n window.__SWR_DEVTOOLS_REACT__ = React;\n }\n};\n\nconst normalize = (args)=>{\n return isFunction(args[1]) ? [\n args[0],\n args[1],\n args[2] || {}\n ] : [\n args[0],\n null,\n (args[1] === null ? args[2] : args[1]) || {}\n ];\n};\n\nconst useSWRConfig = ()=>{\n return mergeObjects(defaultConfig, useContext(SWRConfigContext));\n};\n\nconst preload = (key_, fetcher)=>{\n const [key, fnArg] = serialize(key_);\n const [, , , PRELOAD] = SWRGlobalState.get(cache);\n // Prevent preload to be called multiple times before used.\n if (PRELOAD[key]) return PRELOAD[key];\n const req = fetcher(fnArg);\n PRELOAD[key] = req;\n return req;\n};\nconst middleware = (useSWRNext)=>(key_, fetcher_, config)=>{\n // fetcher might be a sync function, so this should not be an async function\n const fetcher = fetcher_ && ((...args)=>{\n const [key] = serialize(key_);\n const [, , , PRELOAD] = SWRGlobalState.get(cache);\n if (key.startsWith(INFINITE_PREFIX)) {\n // we want the infinite fetcher to be called.\n // handling of the PRELOAD cache happens there.\n return fetcher_(...args);\n }\n const req = PRELOAD[key];\n if (isUndefined(req)) return fetcher_(...args);\n delete PRELOAD[key];\n return req;\n });\n return useSWRNext(key_, fetcher, config);\n };\n\nconst BUILT_IN_MIDDLEWARE = use.concat(middleware);\n\n// It's tricky to pass generic types as parameters, so we just directly override\n// the types here.\nconst withArgs = (hook)=>{\n return function useSWRArgs(...args) {\n // Get the default and inherited configuration.\n const fallbackConfig = useSWRConfig();\n // Normalize arguments.\n const [key, fn, _config] = normalize(args);\n // Merge configurations.\n const config = mergeConfigs(fallbackConfig, _config);\n // Apply middleware\n let next = hook;\n const { use } = config;\n const middleware = (use || []).concat(BUILT_IN_MIDDLEWARE);\n for(let i = middleware.length; i--;){\n next = middleware[i](next);\n }\n return next(key, fn || config.fetcher || null, config);\n };\n};\n\n// Add a callback function to a list of keyed callback functions and return\n// the unsubscribe function.\nconst subscribeCallback = (key, callbacks, callback)=>{\n const keyedRevalidators = callbacks[key] || (callbacks[key] = []);\n keyedRevalidators.push(callback);\n return ()=>{\n const index = keyedRevalidators.indexOf(callback);\n if (index >= 0) {\n // O(1): faster than splice\n keyedRevalidators[index] = keyedRevalidators[keyedRevalidators.length - 1];\n keyedRevalidators.pop();\n }\n };\n};\n\n// Create a custom hook with a middleware\nconst withMiddleware = (useSWR, middleware)=>{\n return (...args)=>{\n const [key, fn, config] = normalize(args);\n const uses = (config.use || []).concat(middleware);\n return useSWR(key, fn, {\n ...config,\n use: uses\n });\n };\n};\n\nsetupDevTools();\n\nexport { INFINITE_PREFIX, IS_REACT_LEGACY, IS_SERVER, OBJECT, SWRConfig, SWRGlobalState, UNDEFINED, cache, compare, createCacheHelper, defaultConfig, defaultConfigOptions, getTimestamp, hasRequestAnimationFrame, initCache, internalMutate, isDocumentDefined, isFunction, isPromiseLike, isUndefined, isWindowDefined, mergeConfigs, mergeObjects, mutate, noop, normalize, preload, preset, rAF, events as revalidateEvents, serialize, slowConnection, stableHash, subscribeCallback, useIsomorphicLayoutEffect, useSWRConfig, withArgs, withMiddleware };\n","import 'client-only';\nimport ReactExports, { useRef, useMemo, useCallback, useDebugValue } from 'react';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim/index.js';\nimport { serialize, OBJECT, SWRConfig as SWRConfig$1, defaultConfig, withArgs, SWRGlobalState, createCacheHelper, isUndefined, getTimestamp, UNDEFINED, isFunction, revalidateEvents, internalMutate, useIsomorphicLayoutEffect, subscribeCallback, IS_SERVER, rAF, IS_REACT_LEGACY, mergeObjects } from 'swr/_internal';\nexport { mutate, preload, useSWRConfig } from 'swr/_internal';\n\nconst unstable_serialize = (key)=>serialize(key)[0];\n\n/// <reference types=\"react/experimental\" />\nconst use = ReactExports.use || ((promise)=>{\n if (promise.status === 'pending') {\n throw promise;\n } else if (promise.status === 'fulfilled') {\n return promise.value;\n } else if (promise.status === 'rejected') {\n throw promise.reason;\n } else {\n promise.status = 'pending';\n promise.then((v)=>{\n promise.status = 'fulfilled';\n promise.value = v;\n }, (e)=>{\n promise.status = 'rejected';\n promise.reason = e;\n });\n throw promise;\n }\n});\nconst WITH_DEDUPE = {\n dedupe: true\n};\nconst useSWRHandler = (_key, fetcher, config)=>{\n const { cache, compare, suspense, fallbackData, revalidateOnMount, revalidateIfStale, refreshInterval, refreshWhenHidden, refreshWhenOffline, keepPreviousData } = config;\n const [EVENT_REVALIDATORS, MUTATION, FETCH, PRELOAD] = SWRGlobalState.get(cache);\n // `key` is the identifier of the SWR internal state,\n // `fnArg` is the argument/arguments parsed from the key, which will be passed\n // to the fetcher.\n // All of them are derived from `_key`.\n const [key, fnArg] = serialize(_key);\n // If it's the initial render of this hook.\n const initialMountedRef = useRef(false);\n // If the hook is unmounted already. This will be used to prevent some effects\n // to be called after unmounting.\n const unmountedRef = useRef(false);\n // Refs to keep the key and config.\n const keyRef = useRef(key);\n const fetcherRef = useRef(fetcher);\n const configRef = useRef(config);\n const getConfig = ()=>configRef.current;\n const isActive = ()=>getConfig().isVisible() && getConfig().isOnline();\n const [getCache, setCache, subscribeCache, getInitialCache] = createCacheHelper(cache, key);\n const stateDependencies = useRef({}).current;\n const fallback = isUndefined(fallbackData) ? config.fallback[key] : fallbackData;\n const isEqual = (prev, current)=>{\n for(const _ in stateDependencies){\n const t = _;\n if (t === 'data') {\n if (!compare(prev[t], current[t])) {\n if (!isUndefined(prev[t])) {\n return false;\n }\n if (!compare(returnedData, current[t])) {\n return false;\n }\n }\n } else {\n if (current[t] !== prev[t]) {\n return false;\n }\n }\n }\n return true;\n };\n const getSnapshot = useMemo(()=>{\n const shouldStartRequest = (()=>{\n if (!key) return false;\n if (!fetcher) return false;\n // If `revalidateOnMount` is set, we take the value directly.\n if (!isUndefined(revalidateOnMount)) return revalidateOnMount;\n // If it's paused, we skip revalidation.\n if (getConfig().isPaused()) return false;\n if (suspense) return false;\n if (!isUndefined(revalidateIfStale)) return revalidateIfStale;\n return true;\n })();\n // Get the cache and merge it with expected states.\n const getSelectedCache = (state)=>{\n // We only select the needed fields from the state.\n const snapshot = mergeObjects(state);\n delete snapshot._k;\n if (!shouldStartRequest) {\n return snapshot;\n }\n return {\n isValidating: true,\n isLoading: true,\n ...snapshot\n };\n };\n const cachedData = getCache();\n const initialData = getInitialCache();\n const clientSnapshot = getSelectedCache(cachedData);\n const serverSnapshot = cachedData === initialData ? clientSnapshot : getSelectedCache(initialData);\n // To make sure that we are returning the same object reference to avoid\n // unnecessary re-renders, we keep the previous snapshot and use deep\n // comparison to check if we need to return a new one.\n let memorizedSnapshot = clientSnapshot;\n return [\n ()=>{\n const newSnapshot = getSelectedCache(getCache());\n const compareResult = isEqual(newSnapshot, memorizedSnapshot);\n if (compareResult) {\n // Mentally, we should always return the `memorizedSnapshot` here\n // as there's no change between the new and old snapshots.\n // However, since the `isEqual` function only compares selected fields,\n // the values of the unselected fields might be changed. That's\n // simply because we didn't track them.\n // To support the case in https://github.com/vercel/swr/pull/2576,\n // we need to update these fields in the `memorizedSnapshot` too\n // with direct mutations to ensure the snapshot is always up-to-date\n // even for the unselected fields, but only trigger re-renders when\n // the selected fields are changed.\n memorizedSnapshot.data = newSnapshot.data;\n memorizedSnapshot.isLoading = newSnapshot.isLoading;\n memorizedSnapshot.isValidating = newSnapshot.isValidating;\n memorizedSnapshot.error = newSnapshot.error;\n return memorizedSnapshot;\n } else {\n memorizedSnapshot = newSnapshot;\n return newSnapshot;\n }\n },\n ()=>serverSnapshot\n ];\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n cache,\n key\n ]);\n // Get the current state that SWR should return.\n const cached = useSyncExternalStore(useCallback((callback)=>subscribeCache(key, (current, prev)=>{\n if (!isEqual(prev, current)) callback();\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n cache,\n key\n ]), getSnapshot[0], getSnapshot[1]);\n const isInitialMount = !initialMountedRef.current;\n const hasRevalidator = EVENT_REVALIDATORS[key] && EVENT_REVALIDATORS[key].length > 0;\n const cachedData = cached.data;\n const data = isUndefined(cachedData) ? fallback : cachedData;\n const error = cached.error;\n // Use a ref to store previously returned data. Use the initial data as its initial value.\n const laggyDataRef = useRef(data);\n const returnedData = keepPreviousData ? isUndefined(cachedData) ? laggyDataRef.current : cachedData : data;\n // - Suspense mode and there's stale data for the initial render.\n // - Not suspense mode and there is no fallback data and `revalidateIfStale` is enabled.\n // - `revalidateIfStale` is enabled but `data` is not defined.\n const shouldDoInitialRevalidation = (()=>{\n // if a key already has revalidators and also has error, we should not trigger revalidation\n if (hasRevalidator && !isUndefined(error)) return false;\n // If `revalidateOnMount` is set, we take the value directly.\n if (isInitialMount && !isUndefined(revalidateOnMount)) return revalidateOnMount;\n // If it's paused, we skip revalidation.\n if (getConfig().isPaused()) return false;\n // Under suspense mode, it will always fetch on render if there is no\n // stale data so no need to revalidate immediately mount it again.\n // If data exists, only revalidate if `revalidateIfStale` is true.\n if (suspense) return isUndefined(data) ? false : revalidateIfStale;\n // If there is no stale data, we need to revalidate when mount;\n // If `revalidateIfStale` is set to true, we will always revalidate.\n return isUndefined(data) || revalidateIfStale;\n })();\n // Resolve the default validating state:\n // If it's able to validate, and it should revalidate when mount, this will be true.\n const defaultValidatingState = !!(key && fetcher && isInitialMount && shouldDoInitialRevalidation);\n const isValidating = isUndefined(cached.isValidating) ? defaultValidatingState : cached.isValidating;\n const isLoading = isUndefined(cached.isLoading) ? defaultValidatingState : cached.isLoading;\n // The revalidation function is a carefully crafted wrapper of the original\n // `fetcher`, to correctly handle the many edge cases.\n const revalidate = useCallback(async (revalidateOpts)=>{\n const currentFetcher = fetcherRef.current;\n if (!key || !currentFetcher || unmountedRef.current || getConfig().isPaused()) {\n return false;\n }\n let newData;\n let startAt;\n let loading = true;\n const opts = revalidateOpts || {};\n // If there is no ongoing concurrent request, or `dedupe` is not set, a\n // new request should be initiated.\n const shouldStartNewRequest = !FETCH[key] || !opts.dedupe;\n /*\n For React 17\n Do unmount check for calls:\n If key has changed during the revalidation, or the component has been\n unmounted, old dispatch and old event callbacks should not take any\n effect\n\n For React 18\n only check if key has changed\n https://github.com/reactwg/react-18/discussions/82\n */ const callbackSafeguard = ()=>{\n if (IS_REACT_LEGACY) {\n return !unmountedRef.current && key === keyRef.current && initialMountedRef.current;\n }\n return key === keyRef.current;\n };\n // The final state object when the request finishes.\n const finalState = {\n isValidating: false,\n isLoading: false\n };\n const finishRequestAndUpdateState = ()=>{\n setCache(finalState);\n };\n const cleanupState = ()=>{\n // Check if it's still the same request before deleting it.\n const requestInfo = FETCH[key];\n if (requestInfo && requestInfo[1] === startAt) {\n delete FETCH[key];\n }\n };\n // Start fetching. Change the `isValidating` state, update the cache.\n const initialState = {\n isValidating: true\n };\n // It is in the `isLoading` state, if and only if there is no cached data.\n // This bypasses fallback data and laggy data.\n if (isUndefined(getCache().data)) {\n initialState.isLoading = true;\n }\n try {\n if (shouldStartNewRequest) {\n setCache(initialState);\n // If no cache is being rendered currently (it shows a blank page),\n // we trigger the loading slow event.\n if (config.loadingTimeout && isUndefined(getCache().data)) {\n setTimeout(()=>{\n if (loading && callbackSafeguard()) {\n getConfig().onLoadingSlow(key, config);\n }\n }, config.loadingTimeout);\n }\n // Start the request and save the timestamp.\n // Key must be truthy if entering here.\n FETCH[key] = [\n currentFetcher(fnArg),\n getTimestamp()\n ];\n }\n [newData, startAt] = FETCH[key];\n newData = await newData;\n if (shouldStartNewRequest) {\n // If the request isn't interrupted, clean it up after the\n // deduplication interval.\n setTimeout(cleanupState, config.dedupingInterval);\n }\n // If there're other ongoing request(s), started after the current one,\n // we need to ignore the current one to avoid possible race conditions:\n // req1------------------>res1 (current one)\n // req2---------------->res2\n // the request that fired later will always be kept.\n // The timestamp maybe be `undefined` or a number\n if (!FETCH[key] || FETCH[key][1] !== startAt) {\n if (shouldStartNewRequest) {\n if (callbackSafeguard()) {\n getConfig().onDiscarded(key);\n }\n }\n return false;\n }\n // Clear error.\n finalState.error = UNDEFINED;\n // If there're other mutations(s), that overlapped with the current revalidation:\n // case 1:\n // req------------------>res\n // mutate------>end\n // case 2:\n // req------------>res\n // mutate------>end\n // case 3:\n // req------------------>res\n // mutate-------...---------->\n // we have to ignore the revalidation result (res) because it's no longer fresh.\n // meanwhile, a new revalidation should be triggered when the mutation ends.\n const mutationInfo = MUTATION[key];\n if (!isUndefined(mutationInfo) && // case 1\n (startAt <= mutationInfo[0] || // case 2\n startAt <= mutationInfo[1] || // case 3\n mutationInfo[1] === 0)) {\n finishRequestAndUpdateState();\n if (shouldStartNewRequest) {\n if (callbackSafeguard()) {\n getConfig().onDiscarded(key);\n }\n }\n return false;\n }\n // Deep compare with the latest state to avoid extra re-renders.\n // For local state, compare and assign.\n const cacheData = getCache().data;\n // Since the compare fn could be custom fn\n // cacheData might be different from newData even when compare fn returns True\n finalState.data = compare(cacheData, newData) ? cacheData : newData;\n // Trigger the successful callback if it's the original request.\n if (shouldStartNewRequest) {\n if (callbackSafeguard()) {\n getConfig().onSuccess(newData, key, config);\n }\n }\n } catch (err) {\n cleanupState();\n const currentConfig = getConfig();\n const { shouldRetryOnError } = currentConfig;\n // Not paused, we continue handling the error. Otherwise, discard it.\n if (!currentConfig.isPaused()) {\n // Get a new error, don't use deep comparison for errors.\n finalState.error = err;\n // Error event and retry logic. Only for the actual request, not\n // deduped ones.\n if (shouldStartNewRequest && callbackSafeguard()) {\n currentConfig.onError(err, key, currentConfig);\n if (shouldRetryOnError === true || isFunction(shouldRetryOnError) && shouldRetryOnError(err)) {\n if (!getConfig().revalidateOnFocus || !getConfig().revalidateOnReconnect || isActive()) {\n // If it's inactive, stop. It will auto-revalidate when\n // refocusing or reconnecting.\n // When retrying, deduplication is always enabled.\n currentConfig.onErrorRetry(err, key, currentConfig, (_opts)=>{\n const revalidators = EVENT_REVALIDATORS[key];\n if (revalidators && revalidators[0]) {\n revalidators[0](revalidateEvents.ERROR_REVALIDATE_EVENT, _opts);\n }\n }, {\n retryCount: (opts.retryCount || 0) + 1,\n dedupe: true\n });\n }\n }\n }\n }\n }\n // Mark loading as stopped.\n loading = false;\n // Update the current hook's state.\n finishRequestAndUpdateState();\n return true;\n }, // `setState` is immutable, and `eventsCallback`, `fnArg`, and\n // `keyValidating` are depending on `key`, so we can exclude them from\n // the deps array.\n //\n // FIXME:\n // `fn` and `config` might be changed during the lifecycle,\n // but they might be changed every render like this.\n // `useSWR('key', () => fetch('/api/'), { suspense: true })`\n // So we omit the values from the deps array\n // even though it might cause unexpected behaviors.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n key,\n cache\n ]);\n // Similar to the global mutate but bound to the current cache and key.\n // `cache` isn't allowed to change during the lifecycle.\n const boundMutate = useCallback(// Use callback to make sure `keyRef.current` returns latest result every time\n (...args)=>{\n return internalMutate(cache, keyRef.current, ...args);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n // The logic for updating refs.\n useIsomorphicLayoutEffect(()=>{\n fetcherRef.current = fetcher;\n configRef.current = config;\n // Handle laggy data updates. If there's cached data of the current key,\n // it'll be the correct reference.\n if (!isUndefined(cachedData)) {\n laggyDataRef.current = cachedData;\n }\n });\n // After mounted or key changed.\n useIsomorphicLayoutEffect(()=>{\n if (!key) return;\n const softRevalidate = revalidate.bind(UNDEFINED, WITH_DEDUPE);\n // Expose revalidators to global event listeners. So we can trigger\n // revalidation from the outside.\n let nextFocusRevalidatedAt = 0;\n const onRevalidate = (type, opts = {})=>{\n if (type == revalidateEvents.FOCUS_EVENT) {\n const now = Date.now();\n if (getConfig().revalidateOnFocus && now > nextFocusRevalidatedAt && isActive()) {\n nextFocusRevalidatedAt = now + getConfig().focusThrottleInterval;\n softRevalidate();\n }\n } else if (type == revalidateEvents.RECONNECT_EVENT) {\n if (getConfig().revalidateOnReconnect && isActive()) {\n softRevalidate();\n }\n } else if (type == revalidateEvents.MUTATE_EVENT) {\n return revalidate();\n } else if (type == revalidateEvents.ERROR_REVALIDATE_EVENT) {\n return revalidate(opts);\n }\n return;\n };\n const unsubEvents = subscribeCallback(key, EVENT_REVALIDATORS, onRevalidate);\n // Mark the component as mounted and update corresponding refs.\n unmountedRef.current = false;\n keyRef.current = key;\n initialMountedRef.current = true;\n // Keep the original key in the cache.\n setCache({\n _k: fnArg\n });\n // Trigger a revalidation\n if (shouldDoInitialRevalidation) {\n if (isUndefined(data) || IS_SERVER) {\n // Revalidate immediately.\n softRevalidate();\n } else {\n // Delay the revalidate if we have data to return so we won't block\n // rendering.\n rAF(softRevalidate);\n }\n }\n return ()=>{\n // Mark it as unmounted.\n unmountedRef.current = true;\n unsubEvents();\n };\n }, [\n key\n ]);\n // Polling\n useIsomorphicLayoutEffect(()=>{\n let timer;\n function next() {\n // Use the passed interval\n // ...or invoke the function with the updated data to get the interval\n const interval = isFunction(refreshInterval) ? refreshInterval(getCache().data) : refreshInterval;\n // We only start the next interval if `refreshInterval` is not 0, and:\n // - `force` is true, which is the start of polling\n // - or `timer` is not 0, which means the effect wasn't canceled\n if (interval && timer !== -1) {\n timer = setTimeout(execute, interval);\n }\n }\n function execute() {\n // Check if it's OK to execute:\n // Only revalidate when the page is visible, online, and not errored.\n if (!getCache().error && (refreshWhenHidden || getConfig().isVisible()) && (refreshWhenOffline || getConfig().isOnline())) {\n revalidate(WITH_DEDUPE).then(next);\n } else {\n // Schedule the next interval to check again.\n next();\n }\n }\n next();\n return ()=>{\n if (timer) {\n clearTimeout(timer);\n timer = -1;\n }\n };\n }, [\n refreshInterval,\n refreshWhenHidden,\n refreshWhenOffline,\n key\n ]);\n // Display debug info in React DevTools.\n useDebugValue(returnedData);\n // In Suspense mode, we can't return the empty `data` state.\n // If there is an `error`, the `error` needs to be thrown to the error boundary.\n // If there is no `error`, the `revalidation` promise needs to be thrown to\n // the suspense boundary.\n if (suspense && isUndefined(data) && key) {\n // SWR should throw when trying to use Suspense on the server with React 18,\n // without providing any initial data. See:\n // https://github.com/vercel/swr/issues/1832\n if (!IS_REACT_LEGACY && IS_SERVER) {\n throw new Error('Fallback data is required when using suspense in SSR.');\n }\n // Always update fetcher and config refs even with the Suspense mode.\n fetcherRef.current = fetcher;\n configRef.current = config;\n unmountedRef.current = false;\n const req = PRELOAD[key];\n if (!isUndefined(req)) {\n const promise = boundMutate(req);\n use(promise);\n }\n if (isUndefined(error)) {\n const promise = revalidate(WITH_DEDUPE);\n if (!isUndefined(returnedData)) {\n promise.status = 'fulfilled';\n promise.value = true;\n }\n use(promise);\n } else {\n throw error;\n }\n }\n return {\n mutate: boundMutate,\n get data () {\n stateDependencies.data = true;\n return returnedData;\n },\n get error () {\n stateDependencies.error = true;\n return error;\n },\n get isValidating () {\n stateDependencies.isValidating = true;\n return isValidating;\n },\n get isLoading () {\n stateDependencies.isLoading = true;\n return isLoading;\n }\n };\n};\nconst SWRConfig = OBJECT.defineProperty(SWRConfig$1, 'defaultValue', {\n value: defaultConfig\n});\n/**\n * A hook to fetch data.\n *\n * @link https://swr.vercel.app\n * @example\n * ```jsx\n * import useSWR from 'swr'\n * function Profile() {\n * const { data, error, isLoading } = useSWR('/api/user', fetcher)\n * if (error) return <div>failed to load</div>\n * if (isLoading) return <div>loading...</div>\n * return <div>hello {data.name}!</div>\n * }\n * ```\n */ const useSWR = withArgs(useSWRHandler);\n\nexport { SWRConfig, useSWR as default, unstable_serialize };\n"],"names":["_interopRequireDefault","_interopRequireWildcard","exports","React","_createSvgIcon","_default","e","h","a","b","k","l","m","n","p","q","d","f","c","g","r","t","u","module","noop","UNDEFINED","OBJECT","isUndefined","v","isFunction","mergeObjects","isPromiseLike","x","table","counter","stableHash","arg","type","constructor","isDate","result","index","keys","SWRGlobalState","EMPTY_CACHE","INITIAL_CACHE","STR_UNDEFINED","isWindowDefined","isDocumentDefined","hasRequestAnimationFrame","createCacheHelper","cache","key","state","info","prev","online","isOnline","onWindowEvent","offWindowEvent","isVisible","visibilityState","initFocus","callback","initReconnect","onOnline","onOffline","preset","defaultConfigOptions","IS_REACT_LEGACY","IS_SERVER","rAF","useIsomorphicLayoutEffect","navigatorConnection","slowConnection","args","__timestamp","getTimestamp","FOCUS_EVENT","RECONNECT_EVENT","MUTATE_EVENT","events","internalMutate","_key","_data","_opts","options","populateCache","rollbackOnErrorOption","optimisticData","rollbackOnError","error","throwOnError","keyFilter","matchedKeys","it","mutateByKey","_k","get","set","EVENT_REVALIDATORS","MUTATION","FETCH","PRELOAD","startRevalidate","revalidators","data","beforeMutationTs","hasOptimisticData","displayedData","currentData","committedData","err","populateCachedData","revalidateAllKeys","initCache","provider","opts","mutate","unmount","subscriptions","subscribe","subs","setter","value","fn","initProvider","releaseFocus","releaseReconnect","onErrorRetry","_","__","config","revalidate","maxRetryCount","currentRetryCount","timeout","compare","newData","defaultConfig","mergeConfigs","u1","f1","u2","f2","SWRConfigContext","SWRConfig","props","parentConfig","isFunctionalConfig","extendedConfig","cacheContextRef","cacheContext","INFINITE_PREFIX","enableDevtools","use","setupDevTools","normalize","useSWRConfig","preload","key_","fetcher","fnArg","req","middleware","useSWRNext","fetcher_","BUILT_IN_MIDDLEWARE","withArgs","hook","fallbackConfig","_config","next","i","subscribeCallback","callbacks","keyedRevalidators","withMiddleware","useSWR","uses","unstable_serialize","promise","WITH_DEDUPE","useSWRHandler","suspense","fallbackData","revalidateOnMount","revalidateIfStale","refreshInterval","refreshWhenHidden","refreshWhenOffline","keepPreviousData","initialMountedRef","unmountedRef","keyRef","fetcherRef","configRef","getConfig","isActive","getCache","setCache","subscribeCache","getInitialCache","stateDependencies","fallback","isEqual","current","returnedData","getSnapshot","shouldStartRequest","getSelectedCache","snapshot","cachedData","initialData","clientSnapshot","serverSnapshot","memorizedSnapshot","newSnapshot","cached","isInitialMount","hasRevalidator","laggyDataRef","shouldDoInitialRevalidation","defaultValidatingState","isValidating","isLoading","revalidateOpts","currentFetcher","startAt","loading","shouldStartNewRequest","callbackSafeguard","finalState","finishRequestAndUpdateState","cleanupState","requestInfo","initialState","mutationInfo","cacheData","currentConfig","shouldRetryOnError","boundMutate","softRevalidate","nextFocusRevalidatedAt","unsubEvents","now","timer","interval","execute"],"sourceRoot":""}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[4487],{94487:(rt,y,e)=>{e.r(y),e.d(y,{TechDocsCustomHome:()=>ot});var a=e(31085),u=e(14041),j=e(73466),h=e(58837),I=e(51372),P=e(6820),p=e(72427),B=e(16009),R=e(67871);function H(){const t=(0,p.gf)(B.K),{loading:r,value:s}=(0,j.A)(async()=>{const{ownershipEntityRefs:o}=await t.getBackstageIdentity();return o},[]),n=(0,u.useMemo)(()=>{const o=new Set(s??[]);return l=>{const i=(0,R.t)(l,I.vv).map(P.U2);for(const c of i)if(o.has(c))return!0;return!1}},[s]);return{loading:r,isOwnedEntity:n}}var D=e(7341),b=e(86519),E=e(27125),O=e(82779),f=e(95768),W=e(9222),U=e(65461),v=e(10394),A=e(12398);const G=t=>(0,A.A)({root:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(22em, 1fr))",gridAutoRows:"1fr",gridGap:t.spacing(2)}}),N=(0,h.A)(G,{name:"BackstageItemCardGrid"});function V(t){const{children:r,...s}=t,n=N(s);return(0,a.jsx)(v.A,{className:n.root,...s,children:r})}var S=e(72501);const z=t=>(0,A.A)({root:{color:t.palette.common.white,padding:t.spacing(2,2,3),backgroundImage:t.getPageTheme({themeId:"card"}).backgroundImage,backgroundPosition:0,backgroundSize:"inherit"}}),F=(0,h.A)(z,{name:"BackstageItemCardHeader"});function L(t){const{title:r,subtitle:s,children:n}=t,o=F(t);return(0,a.jsxs)(v.A,{className:o.root,children:[s&&(0,a.jsx)(S.A,{variant:"subtitle2",component:"h3",children:s}),r&&(0,a.jsx)(S.A,{variant:"h6",component:"h4",children:r}),n]})}var M=e(73896),$=e(40703),K=e(59469),Y=e(48653),J=e(57369);const Q=t=>{const{entities:r}=t,s=(0,W.S)(O.Oc),n=(0,p.gf)(U.U);return r?(0,a.jsx)(V,{"data-testid":"docs-explore",children:r?.length?r.map((o,l)=>(0,a.jsxs)($.A,{children:[(0,a.jsx)(J.A,{children:(0,a.jsx)(L,{title:o.metadata.title??o.metadata.name})}),(0,a.jsx)(Y.A,{children:o.metadata.description}),(0,a.jsx)(K.A,{children:(0,a.jsx)(M.z,{to:s({namespace:(0,f.V)(o.metadata.namespace??"default",n),kind:(0,f.V)(o.kind,n),name:(0,f.V)(o.metadata.name,n)}),color:"primary","data-testid":"read_docs",children:"Read Docs"})})]},l)):null}):null};var x=e(81859),X=e(59428),Z=e(27586),C=e(26280),k=e(68146),w=e(88640),q=e(77310),_=e(38605),tt=e(31653);const et=(0,h.A)(t=>({tabsWrapper:{gridArea:"pageSubheader",backgroundColor:t.palette.background.paper,paddingLeft:t.spacing(3),minWidth:0},defaultTab:{...t.typography.caption,padding:t.spacing(3,3),textTransform:"uppercase",fontWeight:t.typography.fontWeightBold,color:t.palette.text.secondary},selected:{color:t.palette.text.primary},tabRoot:{"&:hover":{backgroundColor:t.palette.background.default,color:t.palette.text.primary}}}),{name:"BackstageHeaderTabs"});function at(t){const{tabs:r,onChange:s,selectedIndex:n}=t,[o,l]=(0,u.useState)(n??0),i=et(),c=(0,u.useCallback)((m,d)=>{n===void 0&&l(d),s&&s(d)},[n,s]);return(0,u.useEffect)(()=>{n!==void 0&&l(n)},[n]),(0,a.jsx)(v.A,{className:i.tabsWrapper,children:(0,a.jsx)(tt.A,{indicatorColor:"primary",textColor:"inherit",variant:"scrollable",scrollButtons:"auto","aria-label":"tabs",onChange:c,value:o,children:r.map((m,d)=>(0,a.jsx)(_.A,{"data-testid":`header-tab-${d}`,label:m.label,value:d,className:i.defaultTab,classes:{selected:i.selected,root:i.tabRoot},...m.tabProps},m.id))})})}var T=e(86202);const st={DocsTable:E.o,DocsCardGrid:Q},nt=({config:t,entities:r,index:s})=>{const o=(0,h.A)({panelContainer:{marginBottom:"2rem",...t.panelCSS?t.panelCSS:{}}})(),{loading:l,isOwnedEntity:i}=H(),c=st[t.panelType],m=r.filter(d=>t.filterPredicate==="ownedByUser"?l?!1:i(d):typeof t.filterPredicate=="function"&&t.filterPredicate(d));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(X.d,{title:t.title,description:t.description,children:s===0?(0,a.jsx)(Z.Y,{children:"Discover documentation in your ecosystem."}):null}),(0,a.jsx)("div",{className:o.panelContainer,children:(0,a.jsx)(c,{"data-testid":"techdocs-custom-panel",entities:m})})]})},ot=t=>{const{tabsConfig:r}=t,[s,n]=(0,u.useState)(0),o=(0,p.gf)(D.v),{value:l,loading:i,error:c}=(0,j.A)(async()=>(await o.getEntities({filter:{[`metadata.annotations.${T.A}`]:b.c},fields:["apiVersion","kind","metadata","relations","spec.owner","spec.type"]})).items.filter(g=>!!g.metadata.annotations?.[T.A])),m=r[s];return i?(0,a.jsx)(x.S,{children:(0,a.jsx)(C.U,{children:(0,a.jsx)(k.k,{})})}):c?(0,a.jsx)(x.S,{children:(0,a.jsx)(C.U,{children:(0,a.jsx)(w.B,{severity:"error",title:"Could not load available documentation.",children:(0,a.jsx)(q.z,{language:"text",text:c.toString()})})})}):(0,a.jsxs)(x.S,{children:[(0,a.jsx)(at,{selectedIndex:s,onChange:d=>n(d),tabs:r.map(({label:d},g)=>({id:g.toString(),label:d}))}),(0,a.jsx)(C.U,{"data-testid":"techdocs-content",children:m.panels.map((d,g)=>(0,a.jsx)(nt,{config:d,entities:l||[],index:g},g))})]})}}}]);})();
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=4487.bd329be6.chunk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/4487.bd329be6.chunk.js","mappings":"8RAoCO,SAASA,GAAAA,CAId,MAAMC,KAAcC,EAAAA,IAAOC,EAAAA,CAAcA,EAGnC,CAAEC,QAAAA,EAASC,MAAOC,CAAK,KAAIC,EAAAA,GAC/B,UACE,KAAM,CAAEC,oBAAAA,CAAoB,EAAI,MAAMP,EAAYQ,qBAAqB,EACvE,OAAOD,CACT,EAEA,CAAC,CAAC,EAGEE,KAAgBC,EAAAA,SAAQ,KAC5B,MAAMC,EAAc,IAAIC,IAAIP,GAAQ,CAAC,CAAC,EAEtC,OAAQQ,GAAAA,CACN,MAAMC,KAAkBC,EAAAA,GAAmBF,EAAQG,EAAAA,EAAiBA,EA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,OAACC,EAAAA,EAAQA,CAAAA,CAAAA,C,KAMbV,KAEA,OAACQ,EAAAA,EAAmBA,C,YAClB,OAACC,EAAAA,EAAOA,C,YACN,OAACE,EAAAA,EAAYA,CACXC,SAAS,QACTlG,MAAM,0C,YAEN,OAACmG,EAAAA,EAAWA,CAACC,SAAS,OAAO7D,KAAM+C,EAAMe,SAAS,C,YAQ1D,QAACP,EAAAA,EAAmBA,C,aAClB,OAACjD,GAAUA,CACTG,cAAeC,EACfF,SAAUjC,GAASoC,EAAepC,CAAK,EACvCgC,KAAMqC,EAAWrH,IAAI,CAAC,CAAEkG,MAAAA,CAAM,EAAGlD,KAAW,CAC1CoD,GAAIpD,EAAMuF,SAAS,EACnBrC,MAAAA,CACF,EAAE,C,MAEJ,OAAC+B,EAAAA,EAAOA,CAACnF,cAAY,mB,SAClBiF,EAAiB1B,OAAOrG,IAAI,CAAC4C,EAAQI,OACpC,OAACuD,GAAAA,CAEC3D,OAAQA,EACRJ,SAAYA,GAAsB,CAAC,EACnCQ,MAAOA,C,EAHFA,CAAK,CAALA,C,KASjB,C","sources":["webpack://techdocs-cli-embedded-app/../../plugins/catalog-react/src/hooks/useEntityOwnership.ts","webpack://techdocs-cli-embedded-app/../core-components/src/layout/ItemCard/ItemCardGrid.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/ItemCard/ItemCardHeader.tsx","webpack://techdocs-cli-embedded-app/../../plugins/techdocs/src/home/components/Grids/DocsCardGrid.tsx","webpack://techdocs-cli-embedded-app/../core-components/src/layout/HeaderTabs/HeaderTabs.tsx","webpack://techdocs-cli-embedded-app/../../plugins/techdocs/src/home/components/TechDocsCustomHome.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Entity,\n RELATION_OWNED_BY,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\nimport { identityApiRef, useApi } from '@backstage/core-plugin-api';\nimport { useMemo } from 'react';\nimport useAsync from 'react-use/esm/useAsync';\nimport { getEntityRelations } from '../utils/getEntityRelations';\n\n/**\n * Returns a function that checks whether the currently signed-in user is an\n * owner of a given entity. When the hook is initially mounted, the loading\n * flag will be true and the results returned from the function will always be\n * false.\n *\n * @public\n *\n * @returns a function that checks if the signed in user owns an entity\n */\nexport function useEntityOwnership(): {\n loading: boolean;\n isOwnedEntity: (entity: Entity) => boolean;\n} {\n const identityApi = useApi(identityApiRef);\n\n // Trigger load only on mount\n const { loading, value: refs } = useAsync(\n async () => {\n const { ownershipEntityRefs } = await identityApi.getBackstageIdentity();\n return ownershipEntityRefs;\n },\n // load only on mount\n [],\n );\n\n const isOwnedEntity = useMemo(() => {\n const myOwnerRefs = new Set(refs ?? []);\n\n return (entity: Entity) => {\n const entityOwnerRefs = getEntityRelations(entity, RELATION_OWNED_BY).map(\n stringifyEntityRef,\n );\n for (const ref of entityOwnerRefs) {\n if (myOwnerRefs.has(ref)) {\n return true;\n }\n }\n return false;\n };\n }, [refs]);\n\n return { loading, isOwnedEntity };\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Box from '@material-ui/core/Box';\nimport {\n createStyles,\n makeStyles,\n Theme,\n WithStyles,\n} from '@material-ui/core/styles';\nimport React from 'react';\n\n/** @public */\nexport type ItemCardGridClassKey = 'root';\n\nconst styles = (theme: Theme) =>\n createStyles({\n root: {\n display: 'grid',\n gridTemplateColumns: 'repeat(auto-fill, minmax(22em, 1fr))',\n gridAutoRows: '1fr',\n gridGap: theme.spacing(2),\n },\n });\n\nconst useStyles = makeStyles(styles, { name: 'BackstageItemCardGrid' });\n\n/** @public */\nexport type ItemCardGridProps = Partial<WithStyles<typeof styles>> & {\n /**\n * The Card items of the grid.\n */\n children?: React.ReactNode;\n};\n\n/**\n * A default grid to use when arranging \"item cards\" - cards that let users\n * select among several options.\n *\n * @remarks\n * The immediate children are expected to be Material UI Card components.\n *\n * Styles for the grid can be overridden using the `classes` prop, e.g.:\n *\n * `<ItemCardGrid title=\"Hello\" classes={{ root: myClassName }} />`\n *\n * This can be useful for e.g. overriding gridTemplateColumns to adapt the\n * minimum size of the cells to fit the content better.\n *\n * @public\n */\nexport function ItemCardGrid(props: ItemCardGridProps) {\n const { children, ...otherProps } = props;\n const classes = useStyles(otherProps);\n return (\n <Box className={classes.root} {...otherProps}>\n {children}\n </Box>\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport {\n createStyles,\n makeStyles,\n Theme,\n WithStyles,\n} from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport React from 'react';\n\n/** @public */\nexport type ItemCardHeaderClassKey = 'root';\n\nconst styles = (theme: Theme) =>\n createStyles({\n root: {\n color: theme.palette.common.white,\n padding: theme.spacing(2, 2, 3),\n backgroundImage: theme.getPageTheme({ themeId: 'card' }).backgroundImage,\n backgroundPosition: 0,\n backgroundSize: 'inherit',\n },\n });\n\nconst useStyles = makeStyles(styles, { name: 'BackstageItemCardHeader' });\n\n/** @public */\nexport type ItemCardHeaderProps = Partial<WithStyles<typeof styles>> & {\n /**\n * A large title to show in the header, providing the main heading.\n *\n * Use this if you want to have the default styling and placement of a title.\n */\n title?: React.ReactNode;\n /**\n * A slightly smaller title to show in the header, providing additional\n * details.\n *\n * Use this if you want to have the default styling and placement of a\n * subtitle.\n */\n subtitle?: React.ReactNode;\n /**\n * Custom children to draw in the header.\n *\n * If the title and/or subtitle were specified, the children are drawn below\n * those.\n */\n children?: React.ReactNode;\n};\n\n/**\n * A simple card header, rendering a default look for \"item cards\" - cards that\n * are arranged in a grid for users to select among several options.\n *\n * @remarks\n * This component expects to be placed within a Material UI `<CardMedia>`.\n *\n * Styles for the header can be overridden using the `classes` prop, e.g.:\n *\n * `<ItemCardHeader title=\"Hello\" classes={{ root: myClassName }} />`\n *\n * @public\n */\nexport function ItemCardHeader(props: ItemCardHeaderProps) {\n const { title, subtitle, children } = props;\n const classes = useStyles(props);\n return (\n <Box className={classes.root}>\n {subtitle && (\n <Typography variant=\"subtitle2\" component=\"h3\">\n {subtitle}\n </Typography>\n )}\n {title && (\n <Typography variant=\"h6\" component=\"h4\">\n {title}\n </Typography>\n )}\n {children}\n </Box>\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { rootDocsRouteRef } from '../../../routes';\nimport { toLowerMaybe } from '../../../helpers';\nimport { Entity } from '@backstage/catalog-model';\nimport { useApi, useRouteRef, configApiRef } from '@backstage/core-plugin-api';\nimport {\n LinkButton,\n ItemCardGrid,\n ItemCardHeader,\n} from '@backstage/core-components';\nimport Card from '@material-ui/core/Card';\nimport CardActions from '@material-ui/core/CardActions';\nimport CardContent from '@material-ui/core/CardContent';\nimport CardMedia from '@material-ui/core/CardMedia';\nimport React from 'react';\n\n/**\n * Props for {@link DocsCardGrid}\n *\n * @public\n */\nexport type DocsCardGridProps = {\n entities: Entity[] | undefined;\n};\n\n/**\n * Component which accepts a list of entities and renders a item card for each entity\n *\n * @public\n */\nexport const DocsCardGrid = (props: DocsCardGridProps) => {\n const { entities } = props;\n const getRouteToReaderPageFor = useRouteRef(rootDocsRouteRef);\n const config = useApi(configApiRef);\n if (!entities) return null;\n return (\n <ItemCardGrid data-testid=\"docs-explore\">\n {!entities?.length\n ? null\n : entities.map((entity, index: number) => (\n <Card key={index}>\n <CardMedia>\n <ItemCardHeader\n title={entity.metadata.title ?? entity.metadata.name}\n />\n </CardMedia>\n <CardContent>{entity.metadata.description}</CardContent>\n <CardActions>\n <LinkButton\n to={getRouteToReaderPageFor({\n namespace: toLowerMaybe(\n entity.metadata.namespace ?? 'default',\n config,\n ),\n kind: toLowerMaybe(entity.kind, config),\n name: toLowerMaybe(entity.metadata.name, config),\n })}\n color=\"primary\"\n data-testid=\"read_docs\"\n >\n Read Docs\n </LinkButton>\n </CardActions>\n </Card>\n ))}\n </ItemCardGrid>\n );\n};\n","/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport Box from '@material-ui/core/Box';\nimport { makeStyles } from '@material-ui/core/styles';\nimport TabUI, { TabProps } from '@material-ui/core/Tab';\nimport Tabs from '@material-ui/core/Tabs';\nimport React, { useCallback, useEffect, useState } from 'react';\n\n// TODO(blam): Remove this implementation when the Tabs are ready\n// This is just a temporary solution to implementing tabs for now\n\n/** @public */\nexport type HeaderTabsClassKey =\n | 'tabsWrapper'\n | 'defaultTab'\n | 'selected'\n | 'tabRoot';\n\nconst useStyles = makeStyles(\n theme => ({\n tabsWrapper: {\n gridArea: 'pageSubheader',\n backgroundColor: theme.palette.background.paper,\n paddingLeft: theme.spacing(3),\n minWidth: 0,\n },\n defaultTab: {\n ...theme.typography.caption,\n padding: theme.spacing(3, 3),\n textTransform: 'uppercase',\n fontWeight: theme.typography.fontWeightBold,\n color: theme.palette.text.secondary,\n },\n selected: {\n color: theme.palette.text.primary,\n },\n tabRoot: {\n '&:hover': {\n backgroundColor: theme.palette.background.default,\n color: theme.palette.text.primary,\n },\n },\n }),\n { name: 'BackstageHeaderTabs' },\n);\n\nexport type Tab = {\n id: string;\n label: string;\n tabProps?: TabProps<React.ElementType, { component?: React.ElementType }>;\n};\n\ntype HeaderTabsProps = {\n tabs: Tab[];\n onChange?: (index: number) => void;\n selectedIndex?: number;\n};\n\n/**\n * Horizontal Tabs component\n *\n * @public\n *\n */\nexport function HeaderTabs(props: HeaderTabsProps) {\n const { tabs, onChange, selectedIndex } = props;\n const [selectedTab, setSelectedTab] = useState<number>(selectedIndex ?? 0);\n const styles = useStyles();\n\n const handleChange = useCallback(\n (_: React.ChangeEvent<{}>, index: number) => {\n if (selectedIndex === undefined) {\n setSelectedTab(index);\n }\n if (onChange) onChange(index);\n },\n [selectedIndex, onChange],\n );\n\n useEffect(() => {\n if (selectedIndex !== undefined) {\n setSelectedTab(selectedIndex);\n }\n }, [selectedIndex]);\n\n return (\n <Box className={styles.tabsWrapper}>\n <Tabs\n indicatorColor=\"primary\"\n textColor=\"inherit\"\n variant=\"scrollable\"\n scrollButtons=\"auto\"\n aria-label=\"tabs\"\n onChange={handleChange}\n value={selectedTab}\n >\n {tabs.map((tab, index) => (\n <TabUI\n data-testid={`header-tab-${index}`}\n label={tab.label}\n key={tab.id}\n value={index}\n className={styles.defaultTab}\n classes={{ selected: styles.selected, root: styles.tabRoot }}\n {...tab.tabProps}\n />\n ))}\n </Tabs>\n </Box>\n );\n}\n","/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useState } from 'react';\nimport useAsync from 'react-use/esm/useAsync';\nimport { makeStyles } from '@material-ui/core/styles';\nimport { CSSProperties } from '@material-ui/styles/withStyles';\nimport {\n CATALOG_FILTER_EXISTS,\n catalogApiRef,\n CatalogApi,\n useEntityOwnership,\n} from '@backstage/plugin-catalog-react';\nimport { Entity } from '@backstage/catalog-model';\nimport { DocsTable } from './Tables';\nimport { DocsCardGrid } from './Grids';\nimport { TechDocsPageWrapper } from './TechDocsPageWrapper';\n\nimport {\n CodeSnippet,\n Content,\n HeaderTabs,\n Progress,\n WarningPanel,\n SupportButton,\n ContentHeader,\n} from '@backstage/core-components';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { TECHDOCS_ANNOTATION } from '@backstage/plugin-techdocs-common';\n\nconst panels = {\n DocsTable: DocsTable,\n DocsCardGrid: DocsCardGrid,\n};\n\n/**\n * Available panel types\n *\n * @public\n */\nexport type PanelType = 'DocsCardGrid' | 'DocsTable';\n\n/**\n * Type representing a TechDocsCustomHome panel.\n *\n * @public\n */\nexport interface PanelConfig {\n title: string;\n description: string;\n panelType: PanelType;\n panelCSS?: CSSProperties;\n filterPredicate: ((entity: Entity) => boolean) | string;\n}\n\n/**\n * Type representing a TechDocsCustomHome tab.\n *\n * @public\n */\nexport interface TabConfig {\n label: string;\n panels: PanelConfig[];\n}\n\n/**\n * Type representing a list of TechDocsCustomHome tabs.\n *\n * @public\n */\nexport type TabsConfig = TabConfig[];\n\nconst CustomPanel = ({\n config,\n entities,\n index,\n}: {\n config: PanelConfig;\n entities: Entity[];\n index: number;\n}) => {\n const useStyles = makeStyles({\n panelContainer: {\n marginBottom: '2rem',\n ...(config.panelCSS ? config.panelCSS : {}),\n },\n });\n const classes = useStyles();\n const { loading: loadingOwnership, isOwnedEntity } = useEntityOwnership();\n\n const Panel = panels[config.panelType];\n\n const shownEntities = entities.filter(entity => {\n if (config.filterPredicate === 'ownedByUser') {\n if (loadingOwnership) {\n return false;\n }\n return isOwnedEntity(entity);\n }\n\n return (\n typeof config.filterPredicate === 'function' &&\n config.filterPredicate(entity)\n );\n });\n\n return (\n <>\n <ContentHeader title={config.title} description={config.description}>\n {index === 0 ? (\n <SupportButton>\n Discover documentation in your ecosystem.\n </SupportButton>\n ) : null}\n </ContentHeader>\n <div className={classes.panelContainer}>\n <Panel data-testid=\"techdocs-custom-panel\" entities={shownEntities} />\n </div>\n </>\n );\n};\n\n/**\n * Props for {@link TechDocsCustomHome}\n *\n * @public\n */\nexport type TechDocsCustomHomeProps = {\n tabsConfig: TabsConfig;\n};\n\nexport const TechDocsCustomHome = (props: TechDocsCustomHomeProps) => {\n const { tabsConfig } = props;\n const [selectedTab, setSelectedTab] = useState<number>(0);\n const catalogApi: CatalogApi = useApi(catalogApiRef);\n\n const {\n value: entities,\n loading,\n error,\n } = useAsync(async () => {\n const response = await catalogApi.getEntities({\n filter: {\n [`metadata.annotations.${TECHDOCS_ANNOTATION}`]: CATALOG_FILTER_EXISTS,\n },\n fields: [\n 'apiVersion',\n 'kind',\n 'metadata',\n 'relations',\n 'spec.owner',\n 'spec.type',\n ],\n });\n return response.items.filter((entity: Entity) => {\n return !!entity.metadata.annotations?.[TECHDOCS_ANNOTATION];\n });\n });\n\n const currentTabConfig = tabsConfig[selectedTab];\n\n if (loading) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <Progress />\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n if (error) {\n return (\n <TechDocsPageWrapper>\n <Content>\n <WarningPanel\n severity=\"error\"\n title=\"Could not load available documentation.\"\n >\n <CodeSnippet language=\"text\" text={error.toString()} />\n </WarningPanel>\n </Content>\n </TechDocsPageWrapper>\n );\n }\n\n return (\n <TechDocsPageWrapper>\n <HeaderTabs\n selectedIndex={selectedTab}\n onChange={index => setSelectedTab(index)}\n tabs={tabsConfig.map(({ label }, index) => ({\n id: index.toString(),\n label,\n }))}\n />\n <Content data-testid=\"techdocs-content\">\n {currentTabConfig.panels.map((config, index) => (\n <CustomPanel\n key={index}\n config={config}\n entities={!!entities ? entities : []}\n index={index}\n />\n ))}\n </Content>\n </TechDocsPageWrapper>\n );\n};\n"],"names":["useEntityOwnership","identityApi","useApi","identityApiRef","loading","value","refs","useAsync","ownershipEntityRefs","getBackstageIdentity","isOwnedEntity","useMemo","myOwnerRefs","Set","entity","entityOwnerRefs","getEntityRelations","RELATION_OWNED_BY","map","stringifyEntityRef","ref","has","styles","theme","createStyles","root","display","gridTemplateColumns","gridAutoRows","gridGap","spacing","useStyles","makeStyles","name","ItemCardGrid","props","children","otherProps","classes","Box","className","color","palette","common","white","padding","backgroundImage","getPageTheme","themeId","backgroundPosition","backgroundSize","ItemCardHeader","title","subtitle","Typography","variant","component","DocsCardGrid","entities","getRouteToReaderPageFor","useRouteRef","rootDocsRouteRef","config","configApiRef","data-testid","length","index","Card","CardMedia","metadata","CardContent","description","CardActions","LinkButton","to","namespace","toLowerMaybe","kind","tabsWrapper","gridArea","backgroundColor","background","paper","paddingLeft","minWidth","defaultTab","typography","caption","textTransform","fontWeight","fontWeightBold","text","secondary","selected","primary","tabRoot","default","HeaderTabs","tabs","onChange","selectedIndex","selectedTab","setSelectedTab","useState","handleChange","useCallback","_","undefined","useEffect","Tabs","indicatorColor","textColor","scrollButtons","aria-label","tab","TabUI","label","tabProps","id","panels","DocsTable","CustomPanel","panelContainer","marginBottom","panelCSS","loadingOwnership","Panel","panelType","shownEntities","filter","filterPredicate","ContentHeader","SupportButton","div","TechDocsCustomHome","tabsConfig","catalogApi","catalogApiRef","error","getEntities","TECHDOCS_ANNOTATION","CATALOG_FILTER_EXISTS","fields","items","annotations","currentTabConfig","TechDocsPageWrapper","Content","Progress","WarningPanel","severity","CodeSnippet","language","toString"],"sourceRoot":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/5788.ae686304.chunk.js","mappings":"qOAsCO,MAAMA,EAAqBC,MACjBC,EAAAA,IAAU,MAER,OAACC,EAAAA,EAAmBA,CAAE,GAAGF,C","sources":["webpack://techdocs-cli-embedded-app/../../plugins/techdocs/src/home/components/TechDocsIndexPage.tsx"],"sourcesContent":["/*\n * Copyright 2021 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from 'react';\nimport { useOutlet } from 'react-router-dom';\nimport { TableColumn, TableProps } from '@backstage/core-components';\nimport {\n EntityOwnerPickerProps,\n UserListFilterKind,\n} from '@backstage/plugin-catalog-react';\nimport { DefaultTechDocsHome } from './DefaultTechDocsHome';\nimport { DocsTableRow } from './Tables';\n\n/**\n * Props for {@link TechDocsIndexPage}\n *\n * @public\n */\nexport type TechDocsIndexPageProps = {\n initialFilter?: UserListFilterKind;\n columns?: TableColumn<DocsTableRow>[];\n actions?: TableProps<DocsTableRow>['actions'];\n ownerPickerMode?: EntityOwnerPickerProps['mode'];\n};\n\nexport const TechDocsIndexPage = (props: TechDocsIndexPageProps) => {\n const outlet = useOutlet();\n\n return outlet || <DefaultTechDocsHome {...props} />;\n};\n"],"names":["TechDocsIndexPage","props","useOutlet","DefaultTechDocsHome"],"sourceRoot":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[5788,8803],{70048:($,f,t)=>{t.d(f,{K:()=>l});var e=t(18690);function l(x){return(0,e.g)()}},99538:($,f,t)=>{t.d(f,{T7:()=>j,TY:()=>I,tN:()=>p});var e=t(31085),l=t(6820),x=t(25862),y=t(43836),g=t(10602),O=t(14041);const T=(0,y.tK)("entity-context"),j=u=>{const{children:v,entity:R,loading:P,error:C,refresh:A}=u,L={entity:R,loading:P,error:C,refresh:A};return(0,e.jsx)(T.Provider,{value:(0,g.B)({1:L}),children:(0,e.jsx)(x.Ig,{attributes:{...R?{entityRef:(0,l.U2)(R)}:void 0},children:v})})},S=u=>_jsx(j,{entity:u.entity,loading:!u.entity,error:void 0,refresh:void 0,children:u.children});function p(){const u=(0,y.qO)("entity-context");if(!u)throw new Error("Entity context is not available");const v=u.atVersion(1);if(!v)throw new Error("EntityContext v1 not available");if(!v.entity)throw new Error("useEntity hook is being called outside of an EntityLayout where the entity has not been loaded. If this is intentional, please use useAsyncEntity instead.");return{entity:v.entity}}function I(){const u=(0,y.qO)("entity-context");if(!u)throw new Error("Entity context is not available");const v=u.atVersion(1);if(!v)throw new Error("EntityContext v1 not available");const{entity:R,loading:P,error:C,refresh:A}=v;return{entity:R,loading:P,error:C,refresh:A}}},38803:($,f,t)=>{t.r(f),t.d(f,{EmbeddedDocsRouter:()=>z,LegacyEmbeddedDocsRouter:()=>D,Router:()=>G,isTechDocsAvailable:()=>V});var e=t(31085),l=t(14041),x=t(18690),y=t(6820),g=t(86202),O=t(39278),T=t(67289),j=t(39299),S=t(9222),p=t(82779);const I=n=>n.replace(/^\/+/,""),u=n=>n.replace(/\/+$/,"");function v(n){const{kind:r,name:a,namespace:o}=n,s=(0,S.S)(p.Oc),h=(0,S.S)(p.Ri);return(0,l.useMemo)(()=>{const i=u(s({kind:r,namespace:o,name:a})),c=u(h());return d=>{if(d.toLocaleLowerCase("en-US").startsWith(i.toLocaleLowerCase("en-US"))){const m=I(d.slice(i.length));return m.length===0||m.startsWith("#")?`${c}${m}`:`${c}/${m}`}return d}},[s,h,r,a,o])}const R=({entity:n,withSearch:r=!0})=>{let a=(0,y.sM)(n);const o=v(a);if(n.metadata.annotations?.[g.G])try{a=(0,y.KU)(n.metadata.annotations?.[g.G])}catch{}return(0,e.jsxs)(O.Wj,{entityRef:a,children:[(0,e.jsx)(j.Z,{}),(0,e.jsx)(T.p,{withSearch:r,searchResultUrlMapper:o})]})};var P=t(85788),C=t(93160),A=t(99538),L=t(10394),N=t(64947),F=t(58837),H=t(72501),Y=t(44186),U=t(77310),K=t(72072);const B=(0,F.A)(n=>({code:{borderRadius:6,margin:n.spacing(2,0),background:n.palette.type==="dark"?"#444":n.palette.common.white}}),{name:"BackstageMissingAnnotationEmptyState"});function W(n,r){const a=r?.kind||"Component",o=r?.metadata.name||"example",s=r?.spec?.type||"website",h=r?.spec?.owner||"user:default/guest",E=`apiVersion: backstage.io/v1alpha1
|
|
2
|
-
kind: ${a}
|
|
3
|
-
metadata:
|
|
4
|
-
name: ${o}
|
|
5
|
-
annotations:${n.map(d=>`
|
|
6
|
-
${d}: value`).join("")}
|
|
7
|
-
spec:
|
|
8
|
-
type: ${s}
|
|
9
|
-
owner: ${h}`;let i=6;const c=[];return n.forEach(()=>{c.push(i),i++}),{yamlText:E,lineNumbers:c}}function Z(n,r="Component"){const a=n.length<=1;return(0,e.jsxs)(e.Fragment,{children:["The ",a?"annotation":"annotations"," ",n.map(o=>(0,e.jsx)("code",{children:o})).reduce((o,s)=>(0,e.jsxs)(e.Fragment,{children:[o,", ",s]}))," ",a?"is":"are"," missing. You need to add the"," ",a?"annotation":"annotations"," to your ",r," if you want to enable this tool."]})}function J(n){let r;try{r=(0,A.tN)().entity}catch{}const{annotation:a,readMoreUrl:o}=n,s=Array.isArray(a)?a:[a],h=o||"https://backstage.io/docs/features/software-catalog/well-known-annotations",E=B(),i=r?.kind||"Component",{yamlText:c,lineNumbers:d}=W(s,r);return(0,e.jsx)(Y.p,{missing:"field",title:"Missing Annotation",description:Z(s,i),action:(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(H.A,{variant:"body1",children:["Add the annotation to your ",i," YAML as shown in the highlighted example below:"]}),(0,e.jsx)(L.A,{className:E.code,children:(0,e.jsx)(U.z,{text:c,language:"yaml",showLineNumbers:!0,highlightedNumbers:d,customStyle:{background:"inherit",fontSize:"115%"}})}),(0,e.jsx)(N.A,{color:"primary",component:K.N_,to:h,children:"Read more"})]})})}const V=n=>!!n?.metadata?.annotations?.[g.A]||!!n?.metadata?.annotations?.[g.G],G=()=>(0,e.jsxs)(x.BV,{children:[(0,e.jsx)(x.qh,{path:"/",element:(0,e.jsx)(P.TechDocsIndexPage,{})}),(0,e.jsx)(x.qh,{path:"/:namespace/:kind/:name/*",element:(0,e.jsx)(C.W,{})})]}),z=n=>{const{children:r,emptyState:a}=n,{entity:o}=(0,A.tN)(),s=(0,x.Ye)([{path:"/*",element:(0,e.jsx)(R,{entity:o}),children:[{path:"*",element:r}]}]);return o.metadata.annotations?.[g.A]||o.metadata.annotations?.[g.G]?s:a??(0,e.jsx)(J,{annotation:[g.A]})},D=n=>(0,e.jsx)(z,{children:n.children})},85788:($,f,t)=>{t.r(f),t.d(f,{TechDocsIndexPage:()=>g});var e=t(31085),l=t(14041),x=t(18690),y=t(85920);const g=O=>(0,x.P1)()||(0,e.jsx)(y.K,{...O})},93160:($,f,t)=>{t.d(f,{b:()=>G,W:()=>z});var e=t(31085),l=t(14041),x=t(18690),y=t(24504),g=t(72020),O=t(86892),T=t(67289),j=t(45061),S=t(39299),p=t(82779),I=t(70048),u=t(19402),v=t(22020),R=t(82266),P=t(64947),C=t(72427),A=t(70795),L=t(57405),N=t(16261);function F(D,n){const[r,a]=(0,l.useState)({status:"not-executed",error:void 0,result:n}),o=(0,l.useRef)(),s=(0,l.useRef)(),h=(0,N.J)({execute(...E){s.current=E;const i=D(...E);return o.current=i,a(c=>({...c,status:"loading"})),i.then(c=>{i===o.current&&a(d=>({...d,status:"success",error:void 0,result:c}))},c=>{i===o.current&&a(d=>({...d,status:"error",error:c}))}),i},reset(){a({status:"not-executed",error:void 0,result:n}),o.current=void 0,s.current=void 0}});return[r,(0,l.useMemo)(()=>({reset(){h.current.reset()},execute:(...E)=>h.current.execute(...E)}),[]),{promise:o.current,lastArgs:s.current}]}var H=t(76842),Y=t(70835);const U="/.backstage/auth/v1/cookie",K=365*24*36e5;function B(D){const{pluginId:n}=D??{},r=(0,C.gf)(A.a),a=(0,C.gf)(L.I),o=(0,l.useMemo)(()=>"BroadcastChannel"in window?new BroadcastChannel(`${n}-auth-cookie-expires-at`):null,[n]),[s,h]=F(async()=>{const d=`${await a.getBaseUrl(n)}${U}`,m=await r.fetch(`${d}`,{credentials:"include"});if(!m.ok){if(m.status===404)return{expiresAt:new Date(Date.now()+K)};throw await Y.o.fromResponse(m)}const M=await m.json();if(!M.expiresAt)throw new Error("No expiration date found in response");return M});(0,H.u)(h.execute);const E=(0,l.useCallback)(()=>{h.execute()},[h]),i=(0,l.useCallback)(c=>{const d=(1+3*Math.random())*6e4,m=Date.parse(c.expiresAt)-Date.now()-d,M=setTimeout(E,m);return()=>clearTimeout(M)},[E]);return(0,l.useEffect)(()=>{if(s.status!=="success"||!s.result)return()=>{};o?.postMessage({action:"COOKIE_REFRESH_SUCCESS",payload:s.result});let c=i(s.result);const d=m=>{const{action:M,payload:Q}=m.data;M==="COOKIE_REFRESH_SUCCESS"&&(c(),c=i(Q))};return o?.addEventListener("message",d),()=>{c(),o?.removeEventListener("message",d)}},[s,i,o]),s.status==="not-executed"?{status:"loading"}:s.status==="loading"&&!s.result?{status:"loading"}:s.status==="loading"&&s.error?{status:"loading"}:s.status==="error"&&s.error?{status:"error",error:s.error,retry:E}:{status:"success",data:s.result}}function W(D){const{children:n,...r}=D,a=(0,R.n)(),{Progress:o}=a.getComponents(),s=B(r);return s.status==="loading"?(0,e.jsx)(o,{}):s.status==="error"?(0,e.jsx)(v.b,{error:s.error,children:(0,e.jsx)(P.A,{variant:"outlined",onClick:s.retry,children:"Retry"})}):(0,e.jsx)(e.Fragment,{children:n})}var Z=t(54917),J=t(98392),V=t(50868);const G=D=>{const{withSearch:n,withHeader:r=!0}=D;return(0,e.jsxs)(y.Y,{themeId:"documentation",children:[r&&(0,e.jsx)(j.T,{}),(0,e.jsx)(S.Z,{}),(0,e.jsx)(T.p,{withSearch:n})]})},z=D=>{const n=(0,Z.A)(),r=(0,J.A)({...n,...D.overrideThemeOptions||{}}),{kind:a,name:o,namespace:s}=(0,I.K)(p.Oc),{children:h,entityRef:E={kind:a,name:o,namespace:s}}=D,i=(0,x.P1)();if(!h){const m=(i?l.Children.toArray(i.props.children):[]).flatMap(M=>M?.props?.children??[]).find(M=>!(0,u.E)(M,g.AF)&&!(0,u.E)(M,g.Wm));return(0,e.jsx)(V.A,{theme:r,children:(0,e.jsx)(W,{pluginId:"techdocs",children:(0,e.jsx)(O.R,{entityRef:E,children:m||(0,e.jsx)(G,{})})})})}return(0,e.jsx)(V.A,{theme:r,children:(0,e.jsx)(W,{pluginId:"techdocs",children:(0,e.jsx)(O.R,{entityRef:E,children:({metadata:c,entityMetadata:d,onReady:m})=>(0,e.jsx)("div",{className:"techdocs-reader-page",children:(0,e.jsx)(y.Y,{themeId:"documentation",children:h instanceof Function?h({entityRef:E,techdocsMetadataValue:c.value,entityMetadataValue:d.value,onReady:m}):h})})})})})}},39299:($,f,t)=>{t.d(f,{Z:()=>R});var e=t(31085),l=t(14041),x=t(58837),y=t(29365),g=t(75173),O=t(71677),T=t(37757),j=t(10394),S=t(9684),p=t(86892),I=t(72020),u=t(99730);const v=(0,x.A)(P=>({root:{gridArea:"pageSubheader",flexDirection:"column",minHeight:"auto",padding:P.spacing(3,3,0),"@media print":{display:"none"}}})),R=P=>{const C=v(),[A,L]=(0,l.useState)(null),N=(0,l.useCallback)(W=>{L(W.currentTarget)},[]),F=(0,l.useCallback)(()=>{L(null)},[]),{entityMetadata:{value:H,loading:Y}}=(0,p.V)(),U=(0,I.YR)(),K=U.renderComponentsByLocation(u.e.Subheader),B=U.renderComponentsByLocation(u.e.Settings);return!K&&!B||Y===!1&&!H?null:(0,e.jsx)(g.A,{classes:C,...P.toolbarProps,children:(0,e.jsxs)(j.A,{display:"flex",justifyContent:"flex-end",width:"100%",flexWrap:"wrap",children:[K,B?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(O.Ay,{title:"Settings",children:(0,e.jsx)(y.A,{"aria-controls":"tech-docs-reader-page-settings","aria-haspopup":"true",onClick:N,children:(0,e.jsx)(S.A,{})})}),(0,e.jsx)(T.A,{id:"tech-docs-reader-page-settings",getContentAnchorEl:null,anchorEl:A,anchorOrigin:{vertical:"bottom",horizontal:"right"},open:!!A,onClose:F,keepMounted:!0,children:(0,e.jsx)("div",{children:B})})]}):null]})})}}}]);})();
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=8803.428ea2da.chunk.js.map
|