@visactor/vseed 0.4.20 → 0.4.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ const pivotColumns = (spec, context)=>{
13
13
  title: item.alias || item.id,
14
14
  width: 'auto',
15
15
  headerStyle: {
16
- textAlign: 'right'
16
+ textAlign: 'center'
17
17
  },
18
18
  headerFormat: (value)=>formatter(value)
19
19
  };
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline/spec/table/pipes/columns/pivotColumns.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/columns/pivotColumns.ts"],"sourcesContent":["import type { PivotTableConstructorOptions } from '@visactor/vtable'\nimport type { Dimensions, PivotTableSpecPipe } from 'src/types'\nimport { createFormatterByDimension } from 'src/pipeline/utils'\n\nexport const pivotColumns: PivotTableSpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { encoding } = advancedVSeed\n const dimensions = advancedVSeed.dimensionTree as Dimensions\n const columns = dimensions.filter((item) => encoding.column?.includes(item.id))\n\n return {\n ...spec,\n columns: columns.map((item) => {\n const formatter = createFormatterByDimension(item, advancedVSeed.locale)\n return {\n dimensionKey: item.id,\n title: item.alias || item.id,\n width: 'auto',\n headerStyle: {\n textAlign: 'right',\n },\n headerFormat: (value: string | number) => formatter(value),\n }\n }),\n } as PivotTableConstructorOptions\n}\n"],"names":["pivotColumns","spec","context","advancedVSeed","encoding","dimensions","columns","item","formatter","createFormatterByDimension","value"],"mappings":";AAIO,MAAMA,eAAmC,CAACC,MAAMC;IACrD,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,QAAQ,EAAE,GAAGD;IACrB,MAAME,aAAaF,cAAc,aAAa;IAC9C,MAAMG,UAAUD,WAAW,MAAM,CAAC,CAACE,OAASH,SAAS,MAAM,EAAE,SAASG,KAAK,EAAE;IAE7E,OAAO;QACL,GAAGN,IAAI;QACP,SAASK,QAAQ,GAAG,CAAC,CAACC;YACpB,MAAMC,YAAYC,2BAA2BF,MAAMJ,cAAc,MAAM;YACvE,OAAO;gBACL,cAAcI,KAAK,EAAE;gBACrB,OAAOA,KAAK,KAAK,IAAIA,KAAK,EAAE;gBAC5B,OAAO;gBACP,aAAa;oBACX,WAAW;gBACb;gBACA,cAAc,CAACG,QAA2BF,UAAUE;YACtD;QACF;IACF;AACF"}
1
+ {"version":3,"file":"pipeline/spec/table/pipes/columns/pivotColumns.js","sources":["webpack://@visactor/vseed/./src/pipeline/spec/table/pipes/columns/pivotColumns.ts"],"sourcesContent":["import type { PivotTableConstructorOptions } from '@visactor/vtable'\nimport type { Dimensions, PivotTableSpecPipe } from 'src/types'\nimport { createFormatterByDimension } from 'src/pipeline/utils'\n\nexport const pivotColumns: PivotTableSpecPipe = (spec, context) => {\n const { advancedVSeed } = context\n const { encoding } = advancedVSeed\n const dimensions = advancedVSeed.dimensionTree as Dimensions\n const columns = dimensions.filter((item) => encoding.column?.includes(item.id))\n\n return {\n ...spec,\n columns: columns.map((item) => {\n const formatter = createFormatterByDimension(item, advancedVSeed.locale)\n return {\n dimensionKey: item.id,\n title: item.alias || item.id,\n width: 'auto',\n headerStyle: {\n textAlign: 'center',\n },\n headerFormat: (value: string | number) => formatter(value),\n }\n }),\n } as PivotTableConstructorOptions\n}\n"],"names":["pivotColumns","spec","context","advancedVSeed","encoding","dimensions","columns","item","formatter","createFormatterByDimension","value"],"mappings":";AAIO,MAAMA,eAAmC,CAACC,MAAMC;IACrD,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAC1B,MAAM,EAAEE,QAAQ,EAAE,GAAGD;IACrB,MAAME,aAAaF,cAAc,aAAa;IAC9C,MAAMG,UAAUD,WAAW,MAAM,CAAC,CAACE,OAASH,SAAS,MAAM,EAAE,SAASG,KAAK,EAAE;IAE7E,OAAO;QACL,GAAGN,IAAI;QACP,SAASK,QAAQ,GAAG,CAAC,CAACC;YACpB,MAAMC,YAAYC,2BAA2BF,MAAMJ,cAAc,MAAM;YACvE,OAAO;gBACL,cAAcI,KAAK,EAAE;gBACrB,OAAOA,KAAK,KAAK,IAAIA,KAAK,EAAE;gBAC5B,OAAO;gBACP,aAAa;oBACX,WAAW;gBACb;gBACA,cAAc,CAACG,QAA2BF,UAAUE;YACtD;QACF;IACF;AACF"}
package/dist/umd/index.js CHANGED
@@ -4689,7 +4689,7 @@ self.R = R;
4689
4689
  title: item.alias || item.id,
4690
4690
  width: 'auto',
4691
4691
  headerStyle: {
4692
- textAlign: 'right'
4692
+ textAlign: 'center'
4693
4693
  },
4694
4694
  headerFormat: (value)=>formatter(value)
4695
4695
  };