table/utils/table-properties
module
Interfaces
-
module:table/utils/table-properties~NormalizedDefaultProperties
Type Definitions
-
module:table/utils/table-properties~NormalizeTableDefaultPropertiesOptions
Functions
-
addDefaultUnitToNumericValue( value, defaultUnit ) → undefined | string | numberinternalmodule:table/utils/table-properties~addDefaultUnitToNumericValueAdds a unit to a value if the value is a number or a string representing a number.
Note: It does nothing to non-numeric values.
getSingleValue( 25, 'px' ); // '25px' getSingleValue( 25, 'em' ); // '25em' getSingleValue( '25em', 'px' ); // '25em' getSingleValue( 'foo', 'px' ); // 'foo'Copy codeParameters
value : undefined | string | numberdefaultUnit : stringA default unit added to a numeric value.
Returns
undefined | string | number
-
getNormalizedDefaultCellProperties( [ config ], [ options ] ) → NormalizedDefaultPropertiesinternalmodule:table/utils/table-properties~getNormalizedDefaultCellPropertiesReturns the normalized default cell properties.
Parameters
[ config ] : Partial<NormalizedDefaultProperties>The configuration to normalize.
[ options ] : NormalizeTableDefaultPropertiesOptionsOptions used to determine which properties should be added.
Returns
-
getNormalizedDefaultProperties( [ config ], options ) → NormalizedDefaultPropertiesinternalmodule:table/utils/table-properties~getNormalizedDefaultPropertiesReturns the normalized configuration.
Parameters
[ config ] : Partial<NormalizedDefaultProperties>The configuration to normalize.
options : NormalizeTableDefaultPropertiesOptionsOptions used to determine which properties should be added.
Defaults to
{}
Returns
-
getNormalizedDefaultTableProperties( [ config ], [ options ] ) → NormalizedDefaultPropertiesinternalmodule:table/utils/table-properties~getNormalizedDefaultTablePropertiesReturns the normalized default table properties.
Parameters
[ config ] : Partial<NormalizedDefaultProperties>The configuration to normalize.
[ options ] : NormalizeTableDefaultPropertiesOptionsOptions used to determine which properties should be added.
Returns
-
getSingleValue( objectOrString ) → undefined | stringinternalmodule:table/utils/table-properties~getSingleValueReturns a string if all four values of box sides are equal.
If a string is passed, it is treated as a single value (pass-through).
// Returns 'foo': getSingleValue( { top: 'foo', right: 'foo', bottom: 'foo', left: 'foo' } ); getSingleValue( 'foo' ); // Returns undefined: getSingleValue( { top: 'foo', right: 'foo', bottom: 'bar', left: 'foo' } ); getSingleValue( { top: 'foo', right: 'foo' } );Copy codeParameters
objectOrString : undefined | string | BoxStyleSides
Returns
undefined | string