@economic/taco 2.71.0-table3-changes.0 → 2.71.0
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.
- package/dist/taco.cjs +2 -13
 - package/dist/taco.cjs.map +1 -1
 - package/dist/taco.d.ts +0 -4
 - package/dist/taco.js +2 -13
 - package/dist/taco.js.map +1 -1
 - package/package.json +2 -2
 
    
        package/dist/taco.d.ts
    CHANGED
    
    | 
         @@ -3040,7 +3040,6 @@ export declare interface Table3CommonProps<TType = unknown> extends Table3Featur 
     | 
|
| 
       3040 
3040 
     | 
    
         
             
                onEditingChange?: Table3EditingChangeHandler<TType>;
         
     | 
| 
       3041 
3041 
     | 
    
         
             
                onEditingCreate?: Table3EditingCreateHandler<TType>;
         
     | 
| 
       3042 
3042 
     | 
    
         
             
                onEditingDiscard?: Table3EditingDiscardHandler;
         
     | 
| 
       3043 
     | 
    
         
            -
                onHasChanges?: Table3HasChangesHandler;
         
     | 
| 
       3044 
3043 
     | 
    
         
             
                validator?: Table3EditingValidatorFn<TType>;
         
     | 
| 
       3045 
3044 
     | 
    
         
             
                showEditingActions?: boolean;
         
     | 
| 
       3046 
3045 
     | 
    
         
             
            }
         
     | 
| 
         @@ -3063,8 +3062,6 @@ export declare interface Table3FeatureProps<TType = unknown> extends TableFeatur 
     | 
|
| 
       3063 
3062 
     | 
    
         | 
| 
       3064 
3063 
     | 
    
         
             
            export declare type Table3GroupProps = TableGroupProps;
         
     | 
| 
       3065 
3064 
     | 
    
         | 
| 
       3066 
     | 
    
         
            -
            declare type Table3HasChangesHandler = (hasChanges: boolean) => void;
         
     | 
| 
       3067 
     | 
    
         
            -
             
     | 
| 
       3068 
3065 
     | 
    
         
             
            export declare type Table3Props<TType = unknown> = Table3WithoutEditingWithClientProps<TType> | Table3WithoutEditingWithServerProps<TType> | Table3WithEditingWithClientProps<TType> | Table3WithEditingWithServerProps<TType>;
         
     | 
| 
       3069 
3066 
     | 
    
         | 
| 
       3070 
3067 
     | 
    
         
             
            export declare type Table3Ref = TableRef & {
         
     | 
| 
         @@ -3075,7 +3072,6 @@ export declare type Table3Ref = TableRef & { 
     | 
|
| 
       3075 
3072 
     | 
    
         
             
                        save: (rowId?: string) => Promise<boolean>;
         
     | 
| 
       3076 
3073 
     | 
    
         
             
                        removeRowChanges: (rowId: string) => Promise<void>;
         
     | 
| 
       3077 
3074 
     | 
    
         
             
                        forceValidate?: () => Promise<string[]>;
         
     | 
| 
       3078 
     | 
    
         
            -
                        hasChanges: () => boolean;
         
     | 
| 
       3079 
3075 
     | 
    
         
             
                    };
         
     | 
| 
       3080 
3076 
     | 
    
         
             
                };
         
     | 
| 
       3081 
3077 
     | 
    
         
             
            };
         
     | 
    
        package/dist/taco.js
    CHANGED
    
    | 
         @@ -51746,6 +51746,7 @@ const Select22 = React__default.forwardRef(function Select222(props, ref) { 
     | 
|
| 
       51746 
51746 
     | 
    
         
             
                }
         
     | 
| 
       51747 
51747 
     | 
    
         
             
                if (!hasSearch && event.key === "Escape") {
         
     | 
| 
       51748 
51748 
     | 
    
         
             
                  event.preventDefault();
         
     | 
| 
      
 51749 
     | 
    
         
            +
                  event.stopPropagation();
         
     | 
| 
       51749 
51750 
     | 
    
         
             
                  setOpen(false);
         
     | 
| 
       51750 
51751 
     | 
    
         
             
                  return;
         
     | 
| 
       51751 
51752 
     | 
    
         
             
                }
         
     | 
| 
         @@ -63299,8 +63300,7 @@ function useTable3(props, ref) { 
     | 
|
| 
       63299 
63300 
     | 
    
         
             
                    instance.editing = {
         
     | 
| 
       63300 
63301 
     | 
    
         
             
                      toggleEditing,
         
     | 
| 
       63301 
63302 
     | 
    
         
             
                      removeRowChanges: (rowId) => table.meta.editing.discardChanges(rowId, table.instance),
         
     | 
| 
       63302 
     | 
    
         
            -
                      save: (rowId) => table.meta.editing.saveChanges(table.instance, rowId) 
     | 
| 
       63303 
     | 
    
         
            -
                      hasChanges: () => table.meta.editing.hasChanges() || table.meta.editing.temporaryRows.length > 0
         
     | 
| 
      
 63303 
     | 
    
         
            +
                      save: (rowId) => table.meta.editing.saveChanges(table.instance, rowId)
         
     | 
| 
       63304 
63304 
     | 
    
         
             
                    };
         
     | 
| 
       63305 
63305 
     | 
    
         
             
                    if (props.onEditingCreate && instance.editing) {
         
     | 
| 
       63306 
63306 
     | 
    
         
             
                      instance.editing.createRow = (row) => table.meta.editing.createRow(table.instance, row);
         
     | 
| 
         @@ -63316,16 +63316,6 @@ function useTable3(props, ref) { 
     | 
|
| 
       63316 
63316 
     | 
    
         
             
                  }
         
     | 
| 
       63317 
63317 
     | 
    
         
             
                }
         
     | 
| 
       63318 
63318 
     | 
    
         
             
              }, [table.meta.editing.forceValidate]);
         
     | 
| 
       63319 
     | 
    
         
            -
              const hasChanges = editing.isEnabled && (editing.hasChanges() || editing.temporaryRows.length > 0);
         
     | 
| 
       63320 
     | 
    
         
            -
              React__default.useEffect(() => {
         
     | 
| 
       63321 
     | 
    
         
            -
                const instance = table.ref.current.instance;
         
     | 
| 
       63322 
     | 
    
         
            -
                if (instance.editing) {
         
     | 
| 
       63323 
     | 
    
         
            -
                  instance.editing.hasChanges = () => hasChanges;
         
     | 
| 
       63324 
     | 
    
         
            -
                }
         
     | 
| 
       63325 
     | 
    
         
            -
                if (props.onHasChanges) {
         
     | 
| 
       63326 
     | 
    
         
            -
                  props.onHasChanges(hasChanges);
         
     | 
| 
       63327 
     | 
    
         
            -
                }
         
     | 
| 
       63328 
     | 
    
         
            -
              }, [hasChanges, props.onHasChanges]);
         
     | 
| 
       63329 
63319 
     | 
    
         
             
              return table;
         
     | 
| 
       63330 
63320 
     | 
    
         
             
            }
         
     | 
| 
       63331 
63321 
     | 
    
         
             
            function Alert(props) {
         
     | 
| 
         @@ -63548,7 +63538,6 @@ const BaseTable3 = fixedForwardRef(function BaseTable32(props, ref) { 
     | 
|
| 
       63548 
63538 
     | 
    
         
             
              const table3 = useTable3(props, ref);
         
     | 
| 
       63549 
63539 
     | 
    
         
             
              const gridAttributes = {
         
     | 
| 
       63550 
63540 
     | 
    
         
             
                "data-table-editing-mode": ((_a = table3.meta.editing) == null ? void 0 : _a.isEditing) ? ((_b = table3.meta.editing) == null ? void 0 : _b.isDetailedMode) ? "detailed" : "normal" : void 0,
         
     | 
| 
       63551 
     | 
    
         
            -
                "data-has-changes": table3.meta.editing.isEnabled && (table3.meta.editing.hasChanges() || table3.meta.editing.temporaryRows.length > 0) ? "true" : void 0,
         
     | 
| 
       63552 
63541 
     | 
    
         
             
                enableHorizontalArrowKeyNavigation: table3.meta.editing.isEditing
         
     | 
| 
       63553 
63542 
     | 
    
         
             
              };
         
     | 
| 
       63554 
63543 
     | 
    
         
             
              const rowsById = table3.instance.getCoreRowModel().rowsById;
         
     |