Files
GNX-mailEnterprise/frontend/node_modules/.cache/babel-loader/9c26c7343a9cf7cc3dff56f8a5bbe9b02e5e5dacb3bdde4a296cc760564d8aad.json
Iliyan Angelov 9454b6ae19 update
2025-09-22 20:29:41 +03:00

1 line
13 KiB
JSON

{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { getDefaultState } from './mutation';\nimport { notifyManager } from './notifyManager';\nimport { Subscribable } from './subscribable';\n// CLASS\nexport var MutationObserver = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(MutationObserver, _Subscribable);\n function MutationObserver(client, options) {\n var _this;\n _this = _Subscribable.call(this) || this;\n _this.client = client;\n _this.setOptions(options);\n _this.bindMethods();\n _this.updateResult();\n return _this;\n }\n var _proto = MutationObserver.prototype;\n _proto.bindMethods = function bindMethods() {\n this.mutate = this.mutate.bind(this);\n this.reset = this.reset.bind(this);\n };\n _proto.setOptions = function setOptions(options) {\n this.options = this.client.defaultMutationOptions(options);\n };\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.listeners.length) {\n var _this$currentMutation;\n (_this$currentMutation = this.currentMutation) == null ? void 0 : _this$currentMutation.removeObserver(this);\n }\n };\n _proto.onMutationUpdate = function onMutationUpdate(action) {\n this.updateResult(); // Determine which callbacks to trigger\n\n var notifyOptions = {\n listeners: true\n };\n if (action.type === 'success') {\n notifyOptions.onSuccess = true;\n } else if (action.type === 'error') {\n notifyOptions.onError = true;\n }\n this.notify(notifyOptions);\n };\n _proto.getCurrentResult = function getCurrentResult() {\n return this.currentResult;\n };\n _proto.reset = function reset() {\n this.currentMutation = undefined;\n this.updateResult();\n this.notify({\n listeners: true\n });\n };\n _proto.mutate = function mutate(variables, options) {\n this.mutateOptions = options;\n if (this.currentMutation) {\n this.currentMutation.removeObserver(this);\n }\n this.currentMutation = this.client.getMutationCache().build(this.client, _extends({}, this.options, {\n variables: typeof variables !== 'undefined' ? variables : this.options.variables\n }));\n this.currentMutation.addObserver(this);\n return this.currentMutation.execute();\n };\n _proto.updateResult = function updateResult() {\n var state = this.currentMutation ? this.currentMutation.state : getDefaultState();\n var result = _extends({}, state, {\n isLoading: state.status === 'loading',\n isSuccess: state.status === 'success',\n isError: state.status === 'error',\n isIdle: state.status === 'idle',\n mutate: this.mutate,\n reset: this.reset\n });\n this.currentResult = result;\n };\n _proto.notify = function notify(options) {\n var _this2 = this;\n notifyManager.batch(function () {\n // First trigger the mutate callbacks\n if (_this2.mutateOptions) {\n if (options.onSuccess) {\n _this2.mutateOptions.onSuccess == null ? void 0 : _this2.mutateOptions.onSuccess(_this2.currentResult.data, _this2.currentResult.variables, _this2.currentResult.context);\n _this2.mutateOptions.onSettled == null ? void 0 : _this2.mutateOptions.onSettled(_this2.currentResult.data, null, _this2.currentResult.variables, _this2.currentResult.context);\n } else if (options.onError) {\n _this2.mutateOptions.onError == null ? void 0 : _this2.mutateOptions.onError(_this2.currentResult.error, _this2.currentResult.variables, _this2.currentResult.context);\n _this2.mutateOptions.onSettled == null ? void 0 : _this2.mutateOptions.onSettled(undefined, _this2.currentResult.error, _this2.currentResult.variables, _this2.currentResult.context);\n }\n } // Then trigger the listeners\n\n if (options.listeners) {\n _this2.listeners.forEach(function (listener) {\n listener(_this2.currentResult);\n });\n }\n });\n };\n return MutationObserver;\n}(Subscribable);","map":{"version":3,"names":["_extends","_inheritsLoose","getDefaultState","notifyManager","Subscribable","MutationObserver","_Subscribable","client","options","_this","call","setOptions","bindMethods","updateResult","_proto","prototype","mutate","bind","reset","defaultMutationOptions","onUnsubscribe","listeners","length","_this$currentMutation","currentMutation","removeObserver","onMutationUpdate","action","notifyOptions","type","onSuccess","onError","notify","getCurrentResult","currentResult","undefined","variables","mutateOptions","getMutationCache","build","addObserver","execute","state","result","isLoading","status","isSuccess","isError","isIdle","_this2","batch","data","context","onSettled","error","forEach","listener"],"sources":["/home/gnx/Desktop/GNX-mailEnterprise/frontend/node_modules/react-query/es/core/mutationObserver.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { getDefaultState } from './mutation';\nimport { notifyManager } from './notifyManager';\nimport { Subscribable } from './subscribable';\n// CLASS\nexport var MutationObserver = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(MutationObserver, _Subscribable);\n\n function MutationObserver(client, options) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.client = client;\n\n _this.setOptions(options);\n\n _this.bindMethods();\n\n _this.updateResult();\n\n return _this;\n }\n\n var _proto = MutationObserver.prototype;\n\n _proto.bindMethods = function bindMethods() {\n this.mutate = this.mutate.bind(this);\n this.reset = this.reset.bind(this);\n };\n\n _proto.setOptions = function setOptions(options) {\n this.options = this.client.defaultMutationOptions(options);\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.listeners.length) {\n var _this$currentMutation;\n\n (_this$currentMutation = this.currentMutation) == null ? void 0 : _this$currentMutation.removeObserver(this);\n }\n };\n\n _proto.onMutationUpdate = function onMutationUpdate(action) {\n this.updateResult(); // Determine which callbacks to trigger\n\n var notifyOptions = {\n listeners: true\n };\n\n if (action.type === 'success') {\n notifyOptions.onSuccess = true;\n } else if (action.type === 'error') {\n notifyOptions.onError = true;\n }\n\n this.notify(notifyOptions);\n };\n\n _proto.getCurrentResult = function getCurrentResult() {\n return this.currentResult;\n };\n\n _proto.reset = function reset() {\n this.currentMutation = undefined;\n this.updateResult();\n this.notify({\n listeners: true\n });\n };\n\n _proto.mutate = function mutate(variables, options) {\n this.mutateOptions = options;\n\n if (this.currentMutation) {\n this.currentMutation.removeObserver(this);\n }\n\n this.currentMutation = this.client.getMutationCache().build(this.client, _extends({}, this.options, {\n variables: typeof variables !== 'undefined' ? variables : this.options.variables\n }));\n this.currentMutation.addObserver(this);\n return this.currentMutation.execute();\n };\n\n _proto.updateResult = function updateResult() {\n var state = this.currentMutation ? this.currentMutation.state : getDefaultState();\n\n var result = _extends({}, state, {\n isLoading: state.status === 'loading',\n isSuccess: state.status === 'success',\n isError: state.status === 'error',\n isIdle: state.status === 'idle',\n mutate: this.mutate,\n reset: this.reset\n });\n\n this.currentResult = result;\n };\n\n _proto.notify = function notify(options) {\n var _this2 = this;\n\n notifyManager.batch(function () {\n // First trigger the mutate callbacks\n if (_this2.mutateOptions) {\n if (options.onSuccess) {\n _this2.mutateOptions.onSuccess == null ? void 0 : _this2.mutateOptions.onSuccess(_this2.currentResult.data, _this2.currentResult.variables, _this2.currentResult.context);\n _this2.mutateOptions.onSettled == null ? void 0 : _this2.mutateOptions.onSettled(_this2.currentResult.data, null, _this2.currentResult.variables, _this2.currentResult.context);\n } else if (options.onError) {\n _this2.mutateOptions.onError == null ? void 0 : _this2.mutateOptions.onError(_this2.currentResult.error, _this2.currentResult.variables, _this2.currentResult.context);\n _this2.mutateOptions.onSettled == null ? void 0 : _this2.mutateOptions.onSettled(undefined, _this2.currentResult.error, _this2.currentResult.variables, _this2.currentResult.context);\n }\n } // Then trigger the listeners\n\n\n if (options.listeners) {\n _this2.listeners.forEach(function (listener) {\n listener(_this2.currentResult);\n });\n }\n });\n };\n\n return MutationObserver;\n}(Subscribable);"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,cAAc,MAAM,0CAA0C;AACrE,SAASC,eAAe,QAAQ,YAAY;AAC5C,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,YAAY,QAAQ,gBAAgB;AAC7C;AACA,OAAO,IAAIC,gBAAgB,GAAG,aAAa,UAAUC,aAAa,EAAE;EAClEL,cAAc,CAACI,gBAAgB,EAAEC,aAAa,CAAC;EAE/C,SAASD,gBAAgBA,CAACE,MAAM,EAAEC,OAAO,EAAE;IACzC,IAAIC,KAAK;IAETA,KAAK,GAAGH,aAAa,CAACI,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI;IACxCD,KAAK,CAACF,MAAM,GAAGA,MAAM;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