{
  "version": 3,
  "sources": ["../../src/queried-data/actions.js"],
  "sourcesContent": ["/**\n * Returns an action object used in signalling that items have been received.\n *\n * @param {Array}   items Items received.\n * @param {?Object} edits Optional edits to reset.\n * @param {?Object} meta  Meta information about pagination.\n *\n * @return {Object} Action object.\n */\nexport function receiveItems( items, edits, meta ) {\n\treturn {\n\t\ttype: 'RECEIVE_ITEMS',\n\t\titems,\n\t\tpersistedEdits: edits,\n\t\tmeta,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that entity records have been\n * deleted and they need to be removed from entities state.\n *\n * @param {string}              kind            Kind of the removed entities.\n * @param {string}              name            Name of the removed entities.\n * @param {Array|number|string} records         Record IDs of the removed entities.\n * @param {boolean}             invalidateCache Controls whether we want to invalidate the cache.\n * @return {Object} Action object.\n */\nexport function removeItems( kind, name, records, invalidateCache = false ) {\n\treturn {\n\t\ttype: 'REMOVE_ITEMS',\n\t\titemIds: Array.isArray( records ) ? records : [ records ],\n\t\tkind,\n\t\tname,\n\t\tinvalidateCache,\n\t};\n}\n\n/**\n * Returns an action object used in signalling that queried data has been\n * received.\n *\n * @param {Array}   items Queried items received.\n * @param {?Object} query Optional query object.\n * @param {?Object} edits Optional edits to reset.\n * @param {?Object} meta  Meta information about pagination.\n *\n * @return {Object} Action object.\n */\nexport function receiveQueriedItems( items, query = {}, edits, meta ) {\n\treturn {\n\t\t...receiveItems( items, edits, meta ),\n\t\tquery,\n\t};\n}\n"],
  "mappings": ";AASO,SAAS,aAAc,OAAO,OAAO,MAAO;AAClD,SAAO;AAAA,IACN,MAAM;AAAA,IACN;AAAA,IACA,gBAAgB;AAAA,IAChB;AAAA,EACD;AACD;AAYO,SAAS,YAAa,MAAM,MAAM,SAAS,kBAAkB,OAAQ;AAC3E,SAAO;AAAA,IACN,MAAM;AAAA,IACN,SAAS,MAAM,QAAS,OAAQ,IAAI,UAAU,CAAE,OAAQ;AAAA,IACxD;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;AAaO,SAAS,oBAAqB,OAAO,QAAQ,CAAC,GAAG,OAAO,MAAO;AACrE,SAAO;AAAA,IACN,GAAG,aAAc,OAAO,OAAO,IAAK;AAAA,IACpC;AAAA,EACD;AACD;",
  "names": []
}
