Title

Global

Members

# constant CustomParser

It wasn't possible to pass raw filters to adapters with AdminJS This solution allows you to pass custom filters to typeorm adapter modyfing list handler

In your custom list handler modify creating filters in this way:

// That makes `Filter` class to create proper filter object.
filters[propertyToFilterBy] = 1;
const filter = await new Filter(filters, resource).populate();
// This parser recognizes `custom` field and passes the value directly to typeorm
filter.filters[propertyToFilterBy].custom = In([1,2,3]);

View Source adminjs-typeorm/src/utils/filter/custom-filter.parser.ts, line 16

# constant validatePropertiesGlobally

Checks if all properties have uniq names

View Source adminjs-upload/src/features/upload-file/utils/validate-properties.ts, line 33

Methods

# buildFeature(options) → {FeatureType}

Higher Order Function which creates a feature

Parameters:
Name Type Description
options ResourceOptions

View Source adminjs/src/backend/utils/build-feature/build-feature.ts, line 90

FeatureType
Example
const { buildFeature } = require('adminjs')

const feature = buildFeature({
  // resource options goes here.
})

# mergeResourceOptions(oldOptions, newOptions) → {ResourceOptions}

Merges 2 ResourceOptions together. Used by features

  • 'id', 'href', 'parent', 'sort' from newOptions override oldOptions
  • 'listProperties', 'showProperties', 'editProperties', 'filterProperties' are joined and made unique
  • all 'properties' from newOptions override properties from oldOptions
  • all 'actions' with their parameters from newOptions override oldOptions except hooks and handler - which are chained.
Parameters:
Name Type Description
oldOptions ResourceOptions
newOptions ResourceOptions

View Source adminjs/src/backend/utils/build-feature/build-feature.ts, line 35

# populator(records)

Parameters:
Name Type Description
records Array.<BaseRecord>

View Source adminjs/src/backend/utils/populator/populator.ts, line 8

Type Definitions

object

# NonNullishPartialRecord

NonNullishPartialRecord

Properties:
Name Type Description
{...} V

View Source adminjs-design-system/src/utils/non-nullish-partial-record.type.ts, line 3

object

# PropertyCustom

Custom (PropertyOptions#custom) properties passed down to the component.

Properties:
Name Type Attributes Description
filePathProperty string
fileProperty string
filesToDeleteProperty string
keyProperty string
fileNameProperty string <optional>
mimeTypeProperty string <optional>
bucketProperty string <optional>
defaultBucket string
mimeTypes Array.<(MimeType|string)> <optional>
maxSize number <optional>
provider string
multiple boolean

View Source adminjs-upload/src/features/upload-file/types/property-custom.type.ts, line 4