@smallwebco/tinypivot-vue 1.0.23 → 1.0.25

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.
@@ -0,0 +1,28 @@
1
+ import { CalculatedField } from '@smallwebco/tinypivot-core';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
+ show: boolean;
5
+ availableFields: string[];
6
+ existingField?: CalculatedField | null | undefined;
7
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
+ close: () => void;
9
+ save: (field: CalculatedField) => void;
10
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
11
+ show: boolean;
12
+ availableFields: string[];
13
+ existingField?: CalculatedField | null | undefined;
14
+ }>>> & Readonly<{
15
+ onClose?: (() => any) | undefined;
16
+ onSave?: ((field: CalculatedField) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
18
+ export default _default;
19
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
20
+ type __VLS_TypePropsToRuntimeProps<T> = {
21
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
22
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
23
+ } : {
24
+ type: import('vue').PropType<T[K]>;
25
+ required: true;
26
+ };
27
+ };
28
+ //# sourceMappingURL=CalculatedFieldModal.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CalculatedFieldModal.vue.d.ts","sourceRoot":"","sources":["../../src/components/CalculatedFieldModal.vue"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;;UA6tBzD,OAAO;qBACI,MAAM,EAAE;;;;;;UADnB,OAAO;qBACI,MAAM,EAAE;;;;;;AAP3B,wBAWG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
@@ -8,8 +8,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
8
8
  sortDirection: 'asc' | 'desc' | null;
9
9
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
10
  close: () => void;
11
+ sort: (direction: "desc" | "asc" | null) => void;
11
12
  filter: (values: string[]) => void;
12
- sort: (direction: "asc" | "desc" | null) => void;
13
13
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
14
14
  columnId: string;
15
15
  columnName: string;
@@ -18,8 +18,8 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
18
18
  sortDirection: 'asc' | 'desc' | null;
19
19
  }>>> & Readonly<{
20
20
  onClose?: (() => any) | undefined;
21
+ onSort?: ((direction: "desc" | "asc" | null) => any) | undefined;
21
22
  onFilter?: ((values: string[]) => any) | undefined;
22
- onSort?: ((direction: "asc" | "desc" | null) => any) | undefined;
23
23
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
24
24
  export default _default;
25
25
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1 +1 @@
1
- {"version":3,"file":"DataGrid.vue.d.ts","sourceR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AAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { AggregationFunction, PivotValueField } from '@smallwebco/tinypivot-core';
1
+ import { AggregationFunction, PivotValueField, CalculatedField } from '@smallwebco/tinypivot-core';
2
2
 
3
3
  interface FieldStats {
4
4
  field: string;
@@ -13,11 +13,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
13
13
  valueFields: PivotValueField[];
14
14
  showRowTotals: boolean;
15
15
  showColumnTotals: boolean;
16
+ calculatedFields?: CalculatedField[] | undefined;
16
17
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
18
  "update:showRowTotals": (value: boolean) => void;
18
19
  "update:showColumnTotals": (value: boolean) => void;
19
20
  clearConfig: () => void;
20
- autoSuggest: () => void;
21
21
  dragStart: (field: string, event: DragEvent) => void;
22
22
  dragEnd: () => void;
23
23
  updateAggregation: (field: string, oldAgg: AggregationFunction, newAgg: AggregationFunction) => void;
@@ -27,6 +27,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
27
27
  removeColumnField: (field: string) => void;
28
28
  addValueField: (field: string, aggregation: AggregationFunction) => void;
29
29
  removeValueField: (field: string, aggregation: AggregationFunction) => void;
30
+ addCalculatedField: (field: CalculatedField) => void;
31
+ removeCalculatedField: (id: string) => void;
32
+ updateCalculatedField: (field: CalculatedField) => void;
30
33
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
31
34
  availableFields: FieldStats[];
32
35
  rowFields: string[];
@@ -34,11 +37,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
34
37
  valueFields: PivotValueField[];
35
38
  showRowTotals: boolean;
36
39
  showColumnTotals: boolean;
40
+ calculatedFields?: CalculatedField[] | undefined;
37
41
  }>>> & Readonly<{
38
42
  "onUpdate:showRowTotals"?: ((value: boolean) => any) | undefined;
39
43
  "onUpdate:showColumnTotals"?: ((value: boolean) => any) | undefined;
40
44
  onClearConfig?: (() => any) | undefined;
41
- onAutoSuggest?: (() => any) | undefined;
42
45
  onDragStart?: ((field: string, event: DragEvent) => any) | undefined;
43
46
  onDragEnd?: (() => any) | undefined;
44
47
  onUpdateAggregation?: ((field: string, oldAgg: AggregationFunction, newAgg: AggregationFunction) => any) | undefined;
@@ -48,6 +51,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
48
51
  onRemoveColumnField?: ((field: string) => any) | undefined;
49
52
  onAddValueField?: ((field: string, aggregation: AggregationFunction) => any) | undefined;
50
53
  onRemoveValueField?: ((field: string, aggregation: AggregationFunction) => any) | undefined;
54
+ onAddCalculatedField?: ((field: CalculatedField) => any) | undefined;
55
+ onRemoveCalculatedField?: ((id: string) => any) | undefined;
56
+ onUpdateCalculatedField?: ((field: CalculatedField) => any) | undefined;
51
57
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
52
58
  export default _default;
53
59
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1 +1 @@
1
- {"version":3,"file":"PivotConfig.vue.d.ts","sourceRoot":"","sources":["../../src/components/PivotConfig.vue"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBA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AAM,GAAG,SAAS,GAAG,OAAO,CAAA;IACxD,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,OAAO,CAAA;CACnB;;qBA4+BkB,UAAU,EAAE;eAClB,MAAM,EAAE;kBACL,MAAM,EAAE;iBACT,eAAe,EAAE;mBACf,OAAO;sBACJ,OAAO;;;;;;;;;;;;;;;;;;;qBALR,UAAU,EAAE;eAClB,MAAM,EAAE;kBACL,MAAM,EAAE;iBACT,eAAe,EAAE;mBACf,OAAO;sBACJ,OAAO;;;;;;;;;;;;;;;;;;;AAX3B,wBAeG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { AggregationFunction, PivotResult, PivotValueField } from '@smallwebco/tinypivot-core';
1
+ import { AggregationFunction, PivotResult, PivotValueField, CalculatedField } from '@smallwebco/tinypivot-core';
2
2
 
3
3
  interface ActiveFilter {
4
4
  column: string;
@@ -9,6 +9,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
9
9
  rowFields: string[];
10
10
  columnFields: string[];
11
11
  valueFields: PivotValueField[];
12
+ calculatedFields?: CalculatedField[] | undefined;
12
13
  isConfigured: boolean;
13
14
  draggingField: string | null;
14
15
  pivotResult: PivotResult | null;
@@ -30,6 +31,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
30
31
  rowFields: string[];
31
32
  columnFields: string[];
32
33
  valueFields: PivotValueField[];
34
+ calculatedFields?: CalculatedField[] | undefined;
33
35
  isConfigured: boolean;
34
36
  draggingField: string | null;
35
37
  pivotResult: PivotResult | null;
@@ -1 +1 @@
1
- {"version":3,"file":"PivotSkeleton.vue.d.ts","sourceRoot":"","sources":["../../src/components/PivotSkeleton.vue"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAKnG,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB;;eA86DY,MAAM,EAAE;kBACL,MAAM,EAAE;iBACT,eAAe,EAAE;kBAChB,OAAO;mBACN,MAAM,GAAG,IAAI;iBACf,WAAW,GAAG,IAAI;;;;;;;;;;;;;;;;eALpB,MAAM,EAAE;kBACL,MAAM,EAAE;iBACT,eAAe,EAAE;kBAChB,OAAO;mBACN,MAAM,GAAG,IAAI;iBACf,WAAW,GAAG,IAAI;;;;;;;;;;;;;;;;AAXjC,wBAkBG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
1
+ {"version":3,"file":"PivotSkeleton.vue.d.ts","sourceRoot":"","sources":["../../src/components/PivotSkeleton.vue"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAMpH,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,EAAE,CAAA;CACjB;;eAo7DY,MAAM,EAAE;kBACL,MAAM,EAAE;iBACT,eAAe,EAAE;;kBAEhB,OAAO;mBACN,MAAM,GAAG,IAAI;iBACf,WAAW,GAAG,IAAI;;;;;;;;;;;;;;;;eANpB,MAAM,EAAE;kBACL,MAAM,EAAE;iBACT,eAAe,EAAE;;kBAEhB,OAAO;mBACN,MAAM,GAAG,IAAI;iBACf,WAAW,GAAG,IAAI;;;;;;;;;;;;;;;;AAZjC,wBAmBG;AACH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
@@ -2,4 +2,5 @@ export { default as DataGrid } from './DataGrid.vue';
2
2
  export { default as ColumnFilter } from './ColumnFilter.vue';
3
3
  export { default as PivotConfig } from './PivotConfig.vue';
4
4
  export { default as PivotSkeleton } from './PivotSkeleton.vue';
5
+ export { default as CalculatedFieldModal } from './CalculatedFieldModal.vue';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC5D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { Ref } from 'vue';
2
- import { AggregationFunction, FieldStats, PivotValueField, getAggregationLabel } from '@smallwebco/tinypivot-core';
2
+ import { AggregationFunction, CalculatedField, FieldStats, PivotValueField, getAggregationLabel } from '@smallwebco/tinypivot-core';
3
3
 
4
4
  export { getAggregationLabel };
5
5
  /**
@@ -10,15 +10,34 @@ export declare function usePivotTable(data: Ref<Record<string, unknown>[]>): {
10
10
  columnFields: Ref<string[], string[]>;
11
11
  valueFields: Ref<{
12
12
  aggregation: AggregationFunction;
13
+ customFn?: import('@smallwebco/tinypivot-core').CustomAggregationFn | undefined;
14
+ customLabel?: string | undefined;
15
+ customSymbol?: string | undefined;
13
16
  field: string;
14
17
  label?: string | undefined;
15
18
  }[], PivotValueField[] | {
16
19
  aggregation: AggregationFunction;
20
+ customFn?: import('@smallwebco/tinypivot-core').CustomAggregationFn | undefined;
21
+ customLabel?: string | undefined;
22
+ customSymbol?: string | undefined;
17
23
  field: string;
18
24
  label?: string | undefined;
19
25
  }[]>;
20
26
  showRowTotals: Ref<boolean, boolean>;
21
27
  showColumnTotals: Ref<boolean, boolean>;
28
+ calculatedFields: Ref<{
29
+ id: string;
30
+ name: string;
31
+ formula: string;
32
+ formatAs?: "number" | "percent" | "currency" | undefined;
33
+ decimals?: number | undefined;
34
+ }[], CalculatedField[] | {
35
+ id: string;
36
+ name: string;
37
+ formula: string;
38
+ formatAs?: "number" | "percent" | "currency" | undefined;
39
+ decimals?: number | undefined;
40
+ }[]>;
22
41
  availableFields: import('vue').ComputedRef<FieldStats[]>;
23
42
  unassignedFields: import('vue').ComputedRef<FieldStats[]>;
24
43
  isConfigured: import('vue').ComputedRef<boolean>;
@@ -39,5 +58,7 @@ export declare function usePivotTable(data: Ref<Record<string, unknown>[]>): {
39
58
  index: number;
40
59
  }) => void;
41
60
  autoSuggestConfig: () => void;
61
+ addCalculatedField: (field: CalculatedField) => void;
62
+ removeCalculatedField: (id: string) => void;
42
63
  };
43
64
  //# sourceMappingURL=usePivotTable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePivotTable.d.ts","sourceRoot":"","sources":["../../src/composables/usePivotTable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,KAAK,GAAG,EAAwB,MAAM,KAAK,CAAA;AACpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAe,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAC/G,OAAO,EASL,mBAAmB,EACpB,MAAM,4BAA4B,CAAA;AAInC,OAAO,EAAE,mBAAmB,EAAE,CAAA;AAE9B;;GAEG;AACH,wBAAg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