@wordpress/block-library
Version:
Block library for the WordPress editor.
1 lines • 2.36 kB
Source Map (JSON)
{"version":3,"file":"variations.mjs","names":[],"sources":["../../src/terms-query/variations.jsx"],"sourcesContent":["import { __ } from '@wordpress/i18n';\nimport { Path, SVG } from '@wordpress/components';\n\nexport const titleDate = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\">\n\t\t<Path d=\"M 41,9 H 7 v 3 h 34 z m 0,9 H 7 v 3 h 34 z m 0,18 H 7 v 3 h 34 z m 0,-9 H 7 v 3 h 34 z\" />\n\t</SVG>\n);\n\nexport const titleExcerpt = (\n\t<SVG xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\">\n\t\t<Path d=\"m 36,36 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 h -5 z m 0,-9 h 5 v 3 H 36 Z M 31,9 H 7 v 3 h 24 z m 0,9 H 7 v 3 h 24 z m 0,18 H 7 v 3 h 24 z m 0,-9 H 7 v 3 h 24 z\" />\n\t</SVG>\n);\n\nconst termName = [\n\t'core/term-name',\n\t{\n\t\tisLink: true,\n\t},\n];\n\nconst variations = [\n\t{\n\t\tname: 'name',\n\t\ttitle: __( 'Name' ),\n\t\tdescription: __( \"Display the terms' names.\" ),\n\t\tattributes: {},\n\t\ticon: titleDate,\n\t\tscope: [ 'block' ],\n\t\tinnerBlocks: [ [ 'core/term-template', {}, [ termName ] ] ],\n\t},\n\t{\n\t\tname: 'name-count',\n\t\ttitle: __( 'Name & Count' ),\n\t\tdescription: __(\n\t\t\t\"Display the terms' names and number of posts assigned to each term.\"\n\t\t),\n\t\tattributes: {},\n\t\ticon: titleExcerpt,\n\t\tscope: [ 'block' ],\n\t\tinnerBlocks: [\n\t\t\t[\n\t\t\t\t'core/term-template',\n\t\t\t\t{},\n\t\t\t\t[\n\t\t\t\t\t[\n\t\t\t\t\t\t'core/group',\n\t\t\t\t\t\t{ layout: { type: 'flex', flexWrap: 'nowrap' } },\n\t\t\t\t\t\t[ termName, [ 'core/term-count' ] ],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t],\n\t},\n];\n\nexport default variations;\n"],"mappings":";;;;AAGA,MAAa,YACZ,oBAAC,KAAD;CAAK,OAAM;CAA6B,SAAQ;CAC/C,UAAA,oBAAC,MAAD,EAAM,GAAE,yFAA0F,CAAA;AAC9F,CAAA;AAGN,MAAa,eACZ,oBAAC,KAAD;CAAK,OAAM;CAA6B,SAAQ;CAC/C,UAAA,oBAAC,MAAD,EAAM,GAAE,kLAAmL,CAAA;AACvL,CAAA;AAGN,MAAM,WAAW,CAChB,kBACA,EACC,QAAQ,KACT,CACD;AAEA,MAAM,aAAa,CAClB;CACC,MAAM;CACN,OAAO,GAAI,MAAO;CAClB,aAAa,GAAI,2BAA4B;CAC7C,YAAY,CAAC;CACb,MAAM;CACN,OAAO,CAAE,OAAQ;CACjB,aAAa,CAAE;EAAE;EAAsB,CAAC;EAAG,CAAE,QAAS;CAAE,CAAE;AAC3D,GACA;CACC,MAAM;CACN,OAAO,GAAI,cAAe;CAC1B,aAAa,GACZ,qEACD;CACA,YAAY,CAAC;CACb,MAAM;CACN,OAAO,CAAE,OAAQ;CACjB,aAAa,CACZ;EACC;EACA,CAAC;EACD,CACC;GACC;GACA,EAAE,QAAQ;IAAE,MAAM;IAAQ,UAAU;GAAS,EAAE;GAC/C,CAAE,UAAU,CAAE,iBAAkB,CAAE;EACnC,CACD;CACD,CACD;AACD,CACD"}