@wordpress/block-library
Version:
Block library for the WordPress editor.
8 lines (7 loc) • 2.36 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../src/post-date/variations.js"],
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\nconst variations = [\n\t{\n\t\tname: 'post-date',\n\t\ttitle: __( 'Post Date' ),\n\t\tdescription: __( \"Display a post's publish date.\" ),\n\t\tattributes: {\n\t\t\tmetadata: {\n\t\t\t\tbindings: {\n\t\t\t\t\tdatetime: {\n\t\t\t\t\t\tsource: 'core/post-data',\n\t\t\t\t\t\targs: { field: 'date' },\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\tscope: [ 'inserter', 'transform' ],\n\t\tisActive: ( blockAttributes ) =>\n\t\t\tblockAttributes?.metadata?.bindings?.datetime?.source ===\n\t\t\t\t'core/post-data' &&\n\t\t\tblockAttributes?.metadata?.bindings?.datetime?.args?.field ===\n\t\t\t\t'date',\n\t},\n\t{\n\t\tname: 'post-date-modified',\n\t\ttitle: __( 'Modified Date' ),\n\t\tdescription: __( \"Display a post's last updated date.\" ),\n\t\tattributes: {\n\t\t\tmetadata: {\n\t\t\t\tbindings: {\n\t\t\t\t\tdatetime: {\n\t\t\t\t\t\tsource: 'core/post-data',\n\t\t\t\t\t\targs: { field: 'modified' },\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tclassName: 'wp-block-post-date__modified-date',\n\t\t},\n\t\tscope: [ 'inserter', 'transform' ],\n\t\tisActive: ( blockAttributes ) =>\n\t\t\tblockAttributes?.metadata?.bindings?.datetime?.source ===\n\t\t\t\t'core/post-data' &&\n\t\t\tblockAttributes?.metadata?.bindings?.datetime?.args?.field ===\n\t\t\t\t'modified',\n\t},\n];\n\nexport default variations;\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAmB;AAEnB,IAAM,aAAa;AAAA,EAClB;AAAA,IACC,MAAM;AAAA,IACN,WAAO,gBAAI,WAAY;AAAA,IACvB,iBAAa,gBAAI,gCAAiC;AAAA,IAClD,YAAY;AAAA,MACX,UAAU;AAAA,QACT,UAAU;AAAA,UACT,UAAU;AAAA,YACT,QAAQ;AAAA,YACR,MAAM,EAAE,OAAO,OAAO;AAAA,UACvB;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA,IACA,OAAO,CAAE,YAAY,WAAY;AAAA,IACjC,UAAU,CAAE,oBACX,iBAAiB,UAAU,UAAU,UAAU,WAC9C,oBACD,iBAAiB,UAAU,UAAU,UAAU,MAAM,UACpD;AAAA,EACH;AAAA,EACA;AAAA,IACC,MAAM;AAAA,IACN,WAAO,gBAAI,eAAgB;AAAA,IAC3B,iBAAa,gBAAI,qCAAsC;AAAA,IACvD,YAAY;AAAA,MACX,UAAU;AAAA,QACT,UAAU;AAAA,UACT,UAAU;AAAA,YACT,QAAQ;AAAA,YACR,MAAM,EAAE,OAAO,WAAW;AAAA,UAC3B;AAAA,QACD;AAAA,MACD;AAAA,MACA,WAAW;AAAA,IACZ;AAAA,IACA,OAAO,CAAE,YAAY,WAAY;AAAA,IACjC,UAAU,CAAE,oBACX,iBAAiB,UAAU,UAAU,UAAU,WAC9C,oBACD,iBAAiB,UAAU,UAAU,UAAU,MAAM,UACpD;AAAA,EACH;AACD;AAEA,IAAO,qBAAQ;",
"names": []
}