Sha256: 31400dd18c9889de7a4841c1a4b6a9d477d49d361ad08002827061c5760b5edf

Contents?: true

Size: 1.07 KB

Versions: 2

Compression:

Stored size: 1.07 KB

Contents

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

export interface 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 interface Record extends Drag.DraggableRecord {
  id?: number;
  image: Resource;
  primary?: boolean;
  src?: string;
  file?: File;
}

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

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pages_core-3.15.2 app/javascript/types/Images.ts
pages_core-3.15.1 app/javascript/types/Images.ts