@vuu-ui/vuu-data-types 0.9.1 → 0.9.2

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.
Files changed (2) hide show
  1. package/index.d.ts +13 -7
  2. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -61,6 +61,7 @@ export declare type DataValueValidationResult =
61
61
 
62
62
  export declare type DataValueValidationChecker = (
63
63
  value?: VuuRowDataItemType,
64
+ phase: EditPhase | "*",
64
65
  ) => DataValueValidationResult;
65
66
 
66
67
  export declare type EditRuleValidationSuccessResult = {
@@ -90,6 +91,8 @@ export declare type EditRuleValidator = (
90
91
  value?: VuuRowDataItemType,
91
92
  ) => EditRuleValidationResult;
92
93
 
94
+ export declare type EditPhase = "commit" | "change";
95
+
93
96
  /**
94
97
  * Edit validation functions (EditRuleValidator) must be registered with the component registry.
95
98
  * They can then be referenced by name from EditValidationRule(s)
@@ -97,10 +100,10 @@ export declare type EditRuleValidator = (
97
100
  export interface EditValidationRule {
98
101
  /**
99
102
  * when is the rule applied
100
- * - 'commit' - when suer commits change, e.g. by pressent ENTER (on an input), or TAB
103
+ * - 'commit' - when user commits change, e.g. by pressent ENTER (on an input), or TAB
101
104
  * - 'change' - for a text input, on every keystroke
102
105
  * */
103
- apply?: "commit" | "change";
106
+ phase?: EditPhase;
104
107
  name: string;
105
108
  message?: string;
106
109
  value?: string;
@@ -466,12 +469,15 @@ export declare type RowSelectionEventHandler = (
466
469
  selectedRowCount: number,
467
470
  ) => void;
468
471
 
472
+ export type DataSourceConfigChangeHandler = (
473
+ config: WithBaseFilter<WithFullConfig>,
474
+ range: VuuRange,
475
+ confirmed?: boolean,
476
+ configChanges?: DataSourceConfigChanges,
477
+ ) => void;
478
+
469
479
  export declare type DataSourceEvents = {
470
- config: (
471
- config: WithBaseFilter<WithFullConfig>,
472
- confirmed?: boolean,
473
- configChanges?: DataSourceConfigChanges,
474
- ) => void;
480
+ config: DataSourceConfigChangeHandler;
475
481
  optimize: (optimize: OptimizeStrategy) => void;
476
482
  "page-count": (pageCount: number) => void;
477
483
  range: (range: VuuRange) => void;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@vuu-ui/vuu-data-types",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "devDependencies": {
7
- "@vuu-ui/vuu-filter-types": "0.9.1",
8
- "@vuu-ui/vuu-protocol-types": "0.9.1"
7
+ "@vuu-ui/vuu-filter-types": "0.9.2",
8
+ "@vuu-ui/vuu-protocol-types": "0.9.2"
9
9
  },
10
10
  "dependencies": {},
11
11
  "peerDependencies": {},