mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +00:00
* init * fixes: config-handler clickEvents * fixes: position attributes for open state modal config handler * modal body scrollable * adds loadingState * adds onOpen and onClose events for modal * adds visibility property * open general and layout Options by default * adds styling options for modal header and body * adds style options for show button and conditional rendering of button styles * refactor conditional rendering styles * clean up * fixes typos * remove footer * modal size * handles dark theme * update naming convention for modal: trigger button * modal size:updates * updates modal close icon * adds comments for conditionally rendering style options * only vertical scrolling inside modals * clean up * custom UI for widget config handle for modal * backfil * resolves: event should not fire on mount * modal improvements doc * hide modal on clicking outside for viewer mode * Remove unnecessary modification of modal property schema Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Sherfin Shamsudeen <sherfin94@gmail.com>
40 lines
1.3 KiB
TypeScript
40 lines
1.3 KiB
TypeScript
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
import { AppVersion } from '../src/entities/app_version.entity';
|
|
|
|
export class ModalWidgetSize1663581777527 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
const entityManager = queryRunner.manager;
|
|
const appVersions = await entityManager.find(AppVersion);
|
|
for (const version of appVersions) {
|
|
const definition = version['definition'];
|
|
|
|
if (definition) {
|
|
const components = definition['components'];
|
|
|
|
for (const componentId of Object.keys(components)) {
|
|
const component = components[componentId];
|
|
|
|
if (component.component.component === 'Modal') {
|
|
component.component.definition.properties.size = { value: 'lg' };
|
|
components[componentId] = {
|
|
...component,
|
|
component: {
|
|
...component.component,
|
|
definition: {
|
|
...component.component.definition,
|
|
},
|
|
},
|
|
};
|
|
}
|
|
}
|
|
|
|
definition['components'] = components;
|
|
version.definition = definition;
|
|
|
|
await entityManager.update(AppVersion, { id: version.id }, { definition });
|
|
}
|
|
}
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {}
|
|
}
|