Sha256: a92ded38b54762448342c5817ef96143bbe743293d62a27bc26e15cebb53acc8

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 KB

Contents

import * as Drag from "./Drag";
import { Locale, LocalizedValue } from "../types";

export type Resource = {
  id: number | null;
  alternative: LocalizedValue;
  caption: LocalizedValue;
  content_type: string;
  filename: string;
  crop_start_x: number | null;
  crop_start_y: number | null;
  crop_width: number | null;
  crop_height: number | null;
  crop_gravity_x: number;
  crop_gravity_y: number;
  real_width: number;
  real_height: number;
  original_url: string;
  thumbnail_url: string;
  uncropped_url: string;
};

export type Record = {
  id?: number;
  image: Resource;
  primary?: boolean;
  src?: string;
  file?: File;
};

export type Response = Resource | { status: "error"; error: string };

export type GridOptions = {
  attribute: string;
  enablePrimary: boolean;
  locale: string;
  locales: { [index: string]: Locale };
  primaryAttribute: string;
  showEmbed: boolean;
};

export type GridState = {
  primary: Drag.Collection<Record>;
  images: Drag.Collection<Record>;
  deleted: Record[];
  setDeleted: (records: Record[]) => void;
  update: (records: Record[]) => void;
};

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pages_core-3.15.5 app/javascript/types/Images.ts