1 line
4.0 KiB
JSON
1 line
4.0 KiB
JSON
{"ast":null,"code":"// If no effect ran after this amount of time, we assume that the render was not committed by React\nconst CLEANUP_TIMER_LOOP_MILLIS = 1000;\nexport class TimerBasedCleanupTracking {\n constructor(timeout = CLEANUP_TIMER_LOOP_MILLIS) {\n this.timeouts = new Map();\n this.cleanupTimeout = CLEANUP_TIMER_LOOP_MILLIS;\n this.cleanupTimeout = timeout;\n }\n register(object, unsubscribe, unregisterToken) {\n if (!this.timeouts) {\n this.timeouts = new Map();\n }\n const timeout = setTimeout(() => {\n if (typeof unsubscribe === 'function') {\n unsubscribe();\n }\n this.timeouts.delete(unregisterToken.cleanupToken);\n }, this.cleanupTimeout);\n this.timeouts.set(unregisterToken.cleanupToken, timeout);\n }\n unregister(unregisterToken) {\n const timeout = this.timeouts.get(unregisterToken.cleanupToken);\n if (timeout) {\n this.timeouts.delete(unregisterToken.cleanupToken);\n clearTimeout(timeout);\n }\n }\n reset() {\n if (this.timeouts) {\n this.timeouts.forEach((value, key) => {\n this.unregister({\n cleanupToken: key\n });\n });\n this.timeouts = undefined;\n }\n }\n}","map":{"version":3,"names":["CLEANUP_TIMER_LOOP_MILLIS","TimerBasedCleanupTracking","constructor","timeout","timeouts","Map","cleanupTimeout","register","object","unsubscribe","unregisterToken","setTimeout","delete","cleanupToken","set","unregister","get","clearTimeout","reset","forEach","value","key","undefined"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/@mui/x-data-grid/utils/cleanupTracking/TimerBasedCleanupTracking.js"],"sourcesContent":["// If no effect ran after this amount of time, we assume that the render was not committed by React\nconst CLEANUP_TIMER_LOOP_MILLIS = 1000;\nexport class TimerBasedCleanupTracking {\n constructor(timeout = CLEANUP_TIMER_LOOP_MILLIS) {\n this.timeouts = new Map();\n this.cleanupTimeout = CLEANUP_TIMER_LOOP_MILLIS;\n this.cleanupTimeout = timeout;\n }\n\n register(object, unsubscribe, unregisterToken) {\n if (!this.timeouts) {\n this.timeouts = new Map();\n }\n\n const timeout = setTimeout(() => {\n if (typeof unsubscribe === 'function') {\n unsubscribe();\n }\n\n this.timeouts.delete(unregisterToken.cleanupToken);\n }, this.cleanupTimeout);\n this.timeouts.set(unregisterToken.cleanupToken, timeout);\n }\n\n unregister(unregisterToken) {\n const timeout = this.timeouts.get(unregisterToken.cleanupToken);\n\n if (timeout) {\n this.timeouts.delete(unregisterToken.cleanupToken);\n clearTimeout(timeout);\n }\n }\n\n reset() {\n if (this.timeouts) {\n this.timeouts.forEach((value, key) => {\n this.unregister({\n cleanupToken: key\n });\n });\n this.timeouts = undefined;\n }\n }\n\n}"],"mappings":"AAAA;AACA,MAAMA,yBAAyB,GAAG,IAAI;AACtC,OAAO,MAAMC,yBAAyB,CAAC;EACrCC,WAAWA,CAACC,OAAO,GAAGH,yBAAyB,EAAE;IAC/C,IAAI,CAACI,QAAQ,GAAG,IAAIC,GAAG,CAAC,CAAC;IACzB,IAAI,CAACC,cAAc,GAAGN,yBAAyB;IAC/C,IAAI,CAACM,cAAc,GAAGH,OAAO;EAC/B;EAEAI,QAAQA,CAACC,MAAM,EAAEC,WAAW,EAAEC,eAAe,EAAE;IAC7C,IAAI,CAAC,IAAI,CAACN,QAAQ,EAAE;MAClB,IAAI,CAACA,QAAQ,GAAG,IAAIC,GAAG,CAAC,CAAC;IAC3B;IAEA,MAAMF,OAAO,GAAGQ,UAAU,CAAC,MAAM;MAC/B,IAAI,OAAOF,WAAW,KAAK,UAAU,EAAE;QACrCA,WAAW,CAAC,CAAC;MACf;MAEA,IAAI,CAACL,QAAQ,CAACQ,MAAM,CAACF,eAAe,CAACG,YAAY,CAAC;IACpD,CAAC,EAAE,IAAI,CAACP,cAAc,CAAC;IACvB,IAAI,CAACF,QAAQ,CAACU,GAAG,CAACJ,eAAe,CAACG,YAAY,EAAEV,OAAO,CAAC;EAC1D;EAEAY,UAAUA,CAACL,eAAe,EAAE;IAC1B,MAAMP,OAAO,GAAG,IAAI,CAACC,QAAQ,CAACY,GAAG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