2023-09-06 12:15:04 +00:00
|
|
|
/*
|
|
|
|
|
* TODO: (Balaji) Move all the types to different file
|
|
|
|
|
*/
|
2022-08-12 09:05:37 +00:00
|
|
|
import { IconNames } from "@blueprintjs/icons";
|
2024-03-22 13:53:29 +00:00
|
|
|
import type { SpacingDimension } from "@design-system/widgets";
|
2024-01-24 08:02:42 +00:00
|
|
|
import type { Responsive, SizingDimension } from "@design-system/widgets";
|
chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
## Description
This PR upgrades Prettier to v2 + enforces TypeScript’s [`import
type`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export)
syntax where applicable. It’s submitted as a separate PR so we can merge
it easily.
As a part of this PR, we reformat the codebase heavily:
- add `import type` everywhere where it’s required, and
- re-format the code to account for Prettier 2’s breaking changes:
https://prettier.io/blog/2020/03/21/2.0.0.html#breaking-changes
This PR is submitted against `release` to make sure all new code by team
members will adhere to new formatting standards, and we’ll have fewer
conflicts when merging `bundle-optimizations` into `release`. (I’ll
merge `release` back into `bundle-optimizations` once this PR is
merged.)
### Why is this needed?
This PR is needed because, for the Lodash optimization from
https://github.com/appsmithorg/appsmith/commit/7cbb12af886621256224be0c93e6a465dd710ad3,
we need to use `import type`. Otherwise, `babel-plugin-lodash` complains
that `LoDashStatic` is not a lodash function.
However, just using `import type` in the current codebase will give you
this:
<img width="962" alt="Screenshot 2023-03-08 at 17 45 59"
src="https://user-images.githubusercontent.com/2953267/223775744-407afa0c-e8b9-44a1-90f9-b879348da57f.png">
That’s because Prettier 1 can’t parse `import type` at all. To parse it,
we need to upgrade to Prettier 2.
### Why enforce `import type`?
Apart from just enabling `import type` support, this PR enforces
specifying `import type` everywhere it’s needed. (Developers will get
immediate TypeScript and ESLint errors when they forget to do so.)
I’m doing this because I believe `import type` improves DX and makes
refactorings easier.
Let’s say you had a few imports like below. Can you tell which of these
imports will increase the bundle size? (Tip: it’s not all of them!)
```ts
// app/client/src/workers/Linting/utils.ts
import { Position } from "codemirror";
import { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
It’s pretty hard, right?
What about now?
```ts
// app/client/src/workers/Linting/utils.ts
import type { Position } from "codemirror";
import type { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
Now, it’s clear that only `lodash` will be bundled.
This helps developers to see which imports are problematic, but it
_also_ helps with refactorings. Now, if you want to see where
`codemirror` is bundled, you can just grep for `import \{.*\} from
"codemirror"` – and you won’t get any type-only imports.
This also helps (some) bundlers. Upon transpiling, TypeScript erases
type-only imports completely. In some environment (not ours), this makes
the bundle smaller, as the bundler doesn’t need to bundle type-only
imports anymore.
## Type of change
- Chore (housekeeping or task changes that don't impact user perception)
## How Has This Been Tested?
This was tested to not break the build.
### Test Plan
> Add Testsmith test cases links that relate to this PR
### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
---------
Co-authored-by: Satish Gandham <hello@satishgandham.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
2023-03-16 11:41:47 +00:00
|
|
|
import type { Theme } from "constants/DefaultTheme";
|
|
|
|
|
import type { PropertyPaneConfig } from "constants/PropertyControlConstants";
|
2023-07-22 05:57:18 +00:00
|
|
|
import type { WidgetTags } from "constants/WidgetConstants";
|
2022-08-19 10:10:36 +00:00
|
|
|
import { WIDGET_STATIC_PROPS } from "constants/WidgetConstants";
|
chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
## Description
This PR upgrades Prettier to v2 + enforces TypeScript’s [`import
type`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export)
syntax where applicable. It’s submitted as a separate PR so we can merge
it easily.
As a part of this PR, we reformat the codebase heavily:
- add `import type` everywhere where it’s required, and
- re-format the code to account for Prettier 2’s breaking changes:
https://prettier.io/blog/2020/03/21/2.0.0.html#breaking-changes
This PR is submitted against `release` to make sure all new code by team
members will adhere to new formatting standards, and we’ll have fewer
conflicts when merging `bundle-optimizations` into `release`. (I’ll
merge `release` back into `bundle-optimizations` once this PR is
merged.)
### Why is this needed?
This PR is needed because, for the Lodash optimization from
https://github.com/appsmithorg/appsmith/commit/7cbb12af886621256224be0c93e6a465dd710ad3,
we need to use `import type`. Otherwise, `babel-plugin-lodash` complains
that `LoDashStatic` is not a lodash function.
However, just using `import type` in the current codebase will give you
this:
<img width="962" alt="Screenshot 2023-03-08 at 17 45 59"
src="https://user-images.githubusercontent.com/2953267/223775744-407afa0c-e8b9-44a1-90f9-b879348da57f.png">
That’s because Prettier 1 can’t parse `import type` at all. To parse it,
we need to upgrade to Prettier 2.
### Why enforce `import type`?
Apart from just enabling `import type` support, this PR enforces
specifying `import type` everywhere it’s needed. (Developers will get
immediate TypeScript and ESLint errors when they forget to do so.)
I’m doing this because I believe `import type` improves DX and makes
refactorings easier.
Let’s say you had a few imports like below. Can you tell which of these
imports will increase the bundle size? (Tip: it’s not all of them!)
```ts
// app/client/src/workers/Linting/utils.ts
import { Position } from "codemirror";
import { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
It’s pretty hard, right?
What about now?
```ts
// app/client/src/workers/Linting/utils.ts
import type { Position } from "codemirror";
import type { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
Now, it’s clear that only `lodash` will be bundled.
This helps developers to see which imports are problematic, but it
_also_ helps with refactorings. Now, if you want to see where
`codemirror` is bundled, you can just grep for `import \{.*\} from
"codemirror"` – and you won’t get any type-only imports.
This also helps (some) bundlers. Upon transpiling, TypeScript erases
type-only imports completely. In some environment (not ours), this makes
the bundle smaller, as the bundler doesn’t need to bundle type-only
imports anymore.
## Type of change
- Chore (housekeeping or task changes that don't impact user perception)
## How Has This Been Tested?
This was tested to not break the build.
### Test Plan
> Add Testsmith test cases links that relate to this PR
### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
---------
Co-authored-by: Satish Gandham <hello@satishgandham.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
2023-03-16 11:41:47 +00:00
|
|
|
import type { Stylesheet } from "entities/AppTheming";
|
2022-08-19 10:10:36 +00:00
|
|
|
import { omit } from "lodash";
|
2023-03-04 07:25:54 +00:00
|
|
|
import moment from "moment";
|
2023-09-06 12:15:04 +00:00
|
|
|
import type { DerivedPropertiesMap } from "WidgetProvider/factory";
|
chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
## Description
This PR upgrades Prettier to v2 + enforces TypeScript’s [`import
type`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export)
syntax where applicable. It’s submitted as a separate PR so we can merge
it easily.
As a part of this PR, we reformat the codebase heavily:
- add `import type` everywhere where it’s required, and
- re-format the code to account for Prettier 2’s breaking changes:
https://prettier.io/blog/2020/03/21/2.0.0.html#breaking-changes
This PR is submitted against `release` to make sure all new code by team
members will adhere to new formatting standards, and we’ll have fewer
conflicts when merging `bundle-optimizations` into `release`. (I’ll
merge `release` back into `bundle-optimizations` once this PR is
merged.)
### Why is this needed?
This PR is needed because, for the Lodash optimization from
https://github.com/appsmithorg/appsmith/commit/7cbb12af886621256224be0c93e6a465dd710ad3,
we need to use `import type`. Otherwise, `babel-plugin-lodash` complains
that `LoDashStatic` is not a lodash function.
However, just using `import type` in the current codebase will give you
this:
<img width="962" alt="Screenshot 2023-03-08 at 17 45 59"
src="https://user-images.githubusercontent.com/2953267/223775744-407afa0c-e8b9-44a1-90f9-b879348da57f.png">
That’s because Prettier 1 can’t parse `import type` at all. To parse it,
we need to upgrade to Prettier 2.
### Why enforce `import type`?
Apart from just enabling `import type` support, this PR enforces
specifying `import type` everywhere it’s needed. (Developers will get
immediate TypeScript and ESLint errors when they forget to do so.)
I’m doing this because I believe `import type` improves DX and makes
refactorings easier.
Let’s say you had a few imports like below. Can you tell which of these
imports will increase the bundle size? (Tip: it’s not all of them!)
```ts
// app/client/src/workers/Linting/utils.ts
import { Position } from "codemirror";
import { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
It’s pretty hard, right?
What about now?
```ts
// app/client/src/workers/Linting/utils.ts
import type { Position } from "codemirror";
import type { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
Now, it’s clear that only `lodash` will be bundled.
This helps developers to see which imports are problematic, but it
_also_ helps with refactorings. Now, if you want to see where
`codemirror` is bundled, you can just grep for `import \{.*\} from
"codemirror"` – and you won’t get any type-only imports.
This also helps (some) bundlers. Upon transpiling, TypeScript erases
type-only imports completely. In some environment (not ours), this makes
the bundle smaller, as the bundler doesn’t need to bundle type-only
imports anymore.
## Type of change
- Chore (housekeeping or task changes that don't impact user perception)
## How Has This Been Tested?
This was tested to not break the build.
### Test Plan
> Add Testsmith test cases links that relate to this PR
### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
---------
Co-authored-by: Satish Gandham <hello@satishgandham.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
2023-03-16 11:41:47 +00:00
|
|
|
import type { WidgetFeatures } from "utils/WidgetFeatures";
|
2023-09-06 12:15:04 +00:00
|
|
|
import type { WidgetProps } from "../widgets/BaseWidget";
|
2023-10-20 11:32:24 +00:00
|
|
|
import type { ExtraDef } from "utils/autocomplete/defCreatorUtils";
|
2024-08-06 14:52:22 +00:00
|
|
|
import type { WidgetEntityConfig } from "ee/entities/DataTree/types";
|
2023-06-01 17:26:05 +00:00
|
|
|
import type {
|
|
|
|
|
WidgetQueryConfig,
|
|
|
|
|
WidgetQueryGenerationConfig,
|
|
|
|
|
WidgetQueryGenerationFormConfig,
|
|
|
|
|
} from "WidgetQueryGenerators/types";
|
2023-10-02 19:41:05 +00:00
|
|
|
import type {
|
|
|
|
|
LayoutDirection,
|
|
|
|
|
Positioning,
|
|
|
|
|
ResponsiveBehavior,
|
|
|
|
|
} from "layoutSystems/common/utils/constants";
|
2021-09-09 15:10:22 +00:00
|
|
|
|
2023-10-11 07:35:24 +00:00
|
|
|
export interface WidgetSizeConfig {
|
2023-04-07 13:51:35 +00:00
|
|
|
viewportMinWidth: number;
|
2024-07-31 15:41:28 +00:00
|
|
|
// TODO: Fix this the next time the file is edited
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2023-04-07 13:51:35 +00:00
|
|
|
configuration: (props: any) => Record<string, string | number>;
|
2023-10-11 07:35:24 +00:00
|
|
|
}
|
2023-04-07 13:51:35 +00:00
|
|
|
|
2023-10-11 07:35:24 +00:00
|
|
|
interface ResizableValues {
|
|
|
|
|
vertical?: boolean;
|
|
|
|
|
horizontal?: boolean;
|
|
|
|
|
}
|
2024-07-31 15:41:28 +00:00
|
|
|
// TODO: Fix this the next time the file is edited
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2023-04-07 13:51:35 +00:00
|
|
|
type ResizableOptions = ResizableValues | ((props: any) => ResizableValues);
|
2023-10-11 07:35:24 +00:00
|
|
|
export interface AutoDimensionValues {
|
|
|
|
|
width?: boolean;
|
|
|
|
|
height?: boolean;
|
|
|
|
|
}
|
2023-10-02 19:41:05 +00:00
|
|
|
export type AutoDimensionOptions =
|
2024-07-31 15:41:28 +00:00
|
|
|
| AutoDimensionValues // TODO: Fix this the next time the file is edited
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2023-04-07 13:51:35 +00:00
|
|
|
| ((props: any) => AutoDimensionValues);
|
|
|
|
|
|
2023-10-11 07:35:24 +00:00
|
|
|
export interface AutoLayoutConfig {
|
2023-04-07 13:51:35 +00:00
|
|
|
// Indicates if a widgets dimensions should be auto adjusted according to content inside it
|
|
|
|
|
autoDimension?: AutoDimensionOptions;
|
|
|
|
|
// min/max sizes for the widget
|
|
|
|
|
widgetSize?: Array<WidgetSizeConfig>;
|
|
|
|
|
// Indicates if the widgets resize handles should be disabled
|
|
|
|
|
disableResizeHandles?: ResizableOptions;
|
2023-06-09 08:52:27 +00:00
|
|
|
// default values for the widget specifi to auto-layout
|
2023-04-07 13:51:35 +00:00
|
|
|
defaults?: Partial<WidgetConfigProps>;
|
2023-06-09 08:52:27 +00:00
|
|
|
// default values for the properties that are hidden/disabled in auto-layout
|
2023-04-07 13:51:35 +00:00
|
|
|
disabledPropsDefaults?: Partial<WidgetProps>;
|
2023-10-11 07:35:24 +00:00
|
|
|
}
|
2023-10-19 20:27:40 +00:00
|
|
|
export interface SizeConfig {
|
2024-01-24 08:02:42 +00:00
|
|
|
maxHeight?: Responsive<SizingDimension>;
|
|
|
|
|
maxWidth?: Responsive<SizingDimension>;
|
|
|
|
|
minHeight?: Responsive<SizingDimension>;
|
|
|
|
|
minWidth?: Responsive<SizingDimension>;
|
2024-03-22 13:53:29 +00:00
|
|
|
paddingTop?: Responsive<SpacingDimension>;
|
|
|
|
|
paddingBottom?: Responsive<SpacingDimension>;
|
2023-10-19 20:27:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface AnvilConfig {
|
2023-11-14 05:25:48 +00:00
|
|
|
isLargeWidget: boolean;
|
2023-10-19 20:27:40 +00:00
|
|
|
// min/max sizes for the widget
|
2023-12-27 10:35:41 +00:00
|
|
|
widgetSize?:
|
2024-07-31 15:41:28 +00:00
|
|
|
| SizeConfig // TODO: Fix this the next time the file is edited
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2023-12-27 10:35:41 +00:00
|
|
|
| ((props: any, isPreviewMode: boolean) => SizeConfig);
|
2023-10-19 20:27:40 +00:00
|
|
|
}
|
2023-04-07 13:51:35 +00:00
|
|
|
|
2023-09-06 12:15:04 +00:00
|
|
|
export interface WidgetBaseConfiguration {
|
2022-04-22 09:44:22 +00:00
|
|
|
name: string;
|
|
|
|
|
iconSVG?: string;
|
2024-02-16 12:48:32 +00:00
|
|
|
thumbnailSVG?: string;
|
2022-04-22 09:44:22 +00:00
|
|
|
hideCard?: boolean;
|
2023-02-08 11:23:39 +00:00
|
|
|
eagerRender?: boolean;
|
2022-05-25 09:38:32 +00:00
|
|
|
isDeprecated?: boolean;
|
2022-06-23 15:09:00 +00:00
|
|
|
replacement?: string;
|
2022-04-22 09:44:22 +00:00
|
|
|
isCanvas?: boolean;
|
|
|
|
|
needsMeta?: boolean;
|
2022-06-17 03:12:47 +00:00
|
|
|
searchTags?: string[];
|
2023-07-22 05:57:18 +00:00
|
|
|
tags?: WidgetTags[];
|
feat: Non auto height invisible widgets (#20118)
## Description
This PR adds another feature update we had planned for Auto Height
- [ ] For new applications, in View and Preview mode, any widget which
is invisible will let go of its space and collapse if it's either on the
main Canvas or a container-like widget which has Auto-height enabled.
- [ ] Widgets within a container-like Widget, say Tabs, that doesn't
have Auto-height enabled, will now let go of their space if they're
invisible.
- [ ] The experience in Edit mode has not changed.
TL;DR: In new applications, in the Preview and Published _AKA_ View
modes, if a widget is invisible and within an Auto-height-enabled
container like a Tab, a Modal, a Form, or the main Canvas, it will fully
collapse, allowing widgets below it to move up and take its space. This
changes the behavior today prior to the release of this PR for
Auto-height-enabled widgets.
Fixes #19983
Fixes #18681
2023-02-14 13:36:19 +00:00
|
|
|
needsHeightForContent?: boolean;
|
2023-12-28 06:46:28 +00:00
|
|
|
|
|
|
|
|
// Flag to tell platform to disaplay this widget when search key
|
|
|
|
|
// is not matching any widget.
|
|
|
|
|
isSearchWildcard?: boolean;
|
2024-03-21 09:46:00 +00:00
|
|
|
|
|
|
|
|
// Flag to tell withWidgetProps HOC to inject evaluation errors into the widget
|
|
|
|
|
needsErrorInfo?: boolean;
|
2024-05-01 08:27:52 +00:00
|
|
|
|
|
|
|
|
onCanvasUI?: {
|
|
|
|
|
selectionBGCSSVar: string;
|
|
|
|
|
focusBGCSSVar: string;
|
|
|
|
|
selectionColorCSSVar: string;
|
|
|
|
|
focusColorCSSVar: string;
|
|
|
|
|
disableParentSelection: boolean;
|
|
|
|
|
};
|
2023-09-06 12:15:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type WidgetDefaultProps = Partial<WidgetProps> & WidgetConfigProps;
|
|
|
|
|
|
|
|
|
|
export interface WidgetConfiguration extends WidgetBaseConfiguration {
|
|
|
|
|
autoLayout?: AutoLayoutConfig;
|
|
|
|
|
defaults: WidgetDefaultProps;
|
|
|
|
|
features?: WidgetFeatures;
|
2022-04-22 09:44:22 +00:00
|
|
|
properties: {
|
2022-11-23 09:48:23 +00:00
|
|
|
config?: PropertyPaneConfig[];
|
2022-08-04 05:31:05 +00:00
|
|
|
contentConfig?: PropertyPaneConfig[];
|
|
|
|
|
styleConfig?: PropertyPaneConfig[];
|
2022-04-22 09:44:22 +00:00
|
|
|
default: Record<string, string>;
|
2024-07-31 15:41:28 +00:00
|
|
|
// TODO: Fix this the next time the file is edited
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2022-04-22 09:44:22 +00:00
|
|
|
meta: Record<string, any>;
|
|
|
|
|
derived: DerivedPropertiesMap;
|
2022-09-13 05:40:08 +00:00
|
|
|
loadingProperties?: Array<RegExp>;
|
2022-11-28 04:44:31 +00:00
|
|
|
stylesheetConfig?: Stylesheet;
|
2023-04-14 06:27:49 +00:00
|
|
|
autocompleteDefinitions?: AutocompletionDefinitions;
|
2024-07-31 15:41:28 +00:00
|
|
|
// TODO: Fix this the next time the file is edited
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2023-07-08 14:07:26 +00:00
|
|
|
setterConfig?: Record<string, any>;
|
2022-04-22 09:44:22 +00:00
|
|
|
};
|
2023-06-01 17:26:05 +00:00
|
|
|
methods?: Record<string, WidgetMethods>;
|
2022-04-22 09:44:22 +00:00
|
|
|
}
|
|
|
|
|
|
2023-10-11 07:35:24 +00:00
|
|
|
export interface PropertyUpdates {
|
2023-07-26 05:38:11 +00:00
|
|
|
propertyPath: string;
|
|
|
|
|
propertyValue?: unknown;
|
|
|
|
|
isDynamicPropertyPath?: boolean; // Toggles the property mode to JS
|
|
|
|
|
shouldDeleteProperty?: boolean; // Deletes the property, propertyValue is ignored
|
2023-10-11 07:35:24 +00:00
|
|
|
}
|
2023-07-26 05:38:11 +00:00
|
|
|
|
2023-10-11 07:35:24 +00:00
|
|
|
export interface WidgetMethods {
|
2023-09-06 12:15:04 +00:00
|
|
|
getQueryGenerationConfig?: GetQueryGenerationConfig;
|
|
|
|
|
getPropertyUpdatesForQueryBinding?: GetPropertyUpdatesForQueryBinding;
|
|
|
|
|
getSnipingModeUpdates?: GetSnipingModeUpdates;
|
|
|
|
|
getCanvasHeightOffset?: GetCanvasHeightOffset;
|
|
|
|
|
getEditorCallouts?: GetEditorCallouts;
|
2023-10-03 08:10:51 +00:00
|
|
|
getOneClickBindingConnectableWidgetConfig?: GetOneClickBindingConnectableWidgetConfig;
|
2024-04-26 12:37:09 +00:00
|
|
|
IconCmp?: () => JSX.Element;
|
|
|
|
|
ThumbnailCmp?: () => JSX.Element;
|
2023-10-11 07:35:24 +00:00
|
|
|
}
|
2023-08-30 08:58:26 +00:00
|
|
|
|
2023-09-06 12:15:04 +00:00
|
|
|
type GetEditorCallouts = (props: WidgetProps) => WidgetCallout[];
|
2023-08-30 08:58:26 +00:00
|
|
|
|
2023-10-11 07:35:24 +00:00
|
|
|
export interface WidgetCallout {
|
2023-08-30 08:58:26 +00:00
|
|
|
message: string;
|
2024-03-08 08:08:55 +00:00
|
|
|
links?: [
|
2023-08-30 08:58:26 +00:00
|
|
|
{
|
|
|
|
|
text: string;
|
|
|
|
|
url: string;
|
|
|
|
|
},
|
|
|
|
|
];
|
2023-10-11 07:35:24 +00:00
|
|
|
}
|
2023-06-01 17:26:05 +00:00
|
|
|
|
2023-09-06 12:15:04 +00:00
|
|
|
export type GetQueryGenerationConfig = (
|
2023-06-01 17:26:05 +00:00
|
|
|
widgetProps: WidgetProps,
|
2023-10-03 08:10:51 +00:00
|
|
|
formConfig?: WidgetQueryGenerationFormConfig,
|
2023-06-01 17:26:05 +00:00
|
|
|
) => WidgetQueryGenerationConfig;
|
|
|
|
|
|
2023-09-06 12:15:04 +00:00
|
|
|
export type GetPropertyUpdatesForQueryBinding = (
|
2023-06-01 17:26:05 +00:00
|
|
|
queryConfig: WidgetQueryConfig,
|
|
|
|
|
widget: WidgetProps,
|
|
|
|
|
formConfig: WidgetQueryGenerationFormConfig,
|
|
|
|
|
) => Record<string, unknown>;
|
|
|
|
|
|
2023-09-08 07:42:48 +00:00
|
|
|
type SnipingModeSupportedKeys = "data" | "run" | "isDynamicPropertyPath";
|
|
|
|
|
|
2023-10-11 07:35:24 +00:00
|
|
|
interface OneClickBindingConnectableWidgetConfig {
|
2023-10-03 08:10:51 +00:00
|
|
|
widgetBindPath: string;
|
|
|
|
|
message: string;
|
2023-10-11 07:35:24 +00:00
|
|
|
}
|
2023-10-03 08:10:51 +00:00
|
|
|
|
|
|
|
|
export type GetOneClickBindingConnectableWidgetConfig = (
|
|
|
|
|
widgetProps: WidgetProps,
|
|
|
|
|
) => OneClickBindingConnectableWidgetConfig;
|
|
|
|
|
|
2023-09-06 12:15:04 +00:00
|
|
|
export type GetSnipingModeUpdates = (
|
2023-09-08 07:42:48 +00:00
|
|
|
propValueMap: Record<SnipingModeSupportedKeys, string | boolean>,
|
2023-07-26 05:38:11 +00:00
|
|
|
) => Array<PropertyUpdates>;
|
|
|
|
|
|
2023-09-06 12:15:04 +00:00
|
|
|
export type GetCanvasHeightOffset = (widgetProps: WidgetProps) => number;
|
|
|
|
|
|
2021-09-09 15:10:22 +00:00
|
|
|
export const GRID_DENSITY_MIGRATION_V1 = 4;
|
|
|
|
|
|
2023-09-13 13:57:42 +00:00
|
|
|
export const COMPACT_MODE_MIN_ROWS = 4;
|
|
|
|
|
|
2021-09-09 15:10:22 +00:00
|
|
|
export enum BlueprintOperationTypes {
|
|
|
|
|
MODIFY_PROPS = "MODIFY_PROPS",
|
|
|
|
|
ADD_ACTION = "ADD_ACTION",
|
|
|
|
|
CHILD_OPERATIONS = "CHILD_OPERATIONS",
|
2023-02-21 04:13:25 +00:00
|
|
|
BEFORE_DROP = "BEFORE_DROP",
|
|
|
|
|
BEFORE_PASTE = "BEFORE_PASTE",
|
|
|
|
|
BEFORE_ADD = "BEFORE_ADD",
|
2023-04-07 13:51:35 +00:00
|
|
|
UPDATE_CREATE_PARAMS_BEFORE_ADD = "UPDATE_CREATE_PARAMS_BEFORE_ADD",
|
2021-09-09 15:10:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type FlattenedWidgetProps = WidgetProps & {
|
|
|
|
|
children?: string[];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export interface DSLWidget extends WidgetProps {
|
|
|
|
|
children?: DSLWidget[];
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-04 07:25:54 +00:00
|
|
|
interface LayoutProps {
|
|
|
|
|
positioning?: Positioning;
|
|
|
|
|
useAutoLayout?: boolean;
|
|
|
|
|
direction?: LayoutDirection;
|
|
|
|
|
isFlexChild?: boolean;
|
|
|
|
|
responsiveBehavior?: ResponsiveBehavior;
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-14 06:27:49 +00:00
|
|
|
export type AutocompleteDefinitionFunction = (
|
|
|
|
|
widgetProps: WidgetProps,
|
|
|
|
|
extraDefsToDefine?: ExtraDef,
|
2023-07-08 14:07:26 +00:00
|
|
|
configTree?: WidgetEntityConfig,
|
2024-07-31 15:41:28 +00:00
|
|
|
// TODO: Fix this the next time the file is edited
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2023-04-14 06:27:49 +00:00
|
|
|
) => Record<string, any>;
|
|
|
|
|
|
|
|
|
|
export type AutocompletionDefinitions =
|
2024-07-31 15:41:28 +00:00
|
|
|
// TODO: Fix this the next time the file is edited
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
|
|
|
Record<string, any> | AutocompleteDefinitionFunction;
|
2023-04-14 06:27:49 +00:00
|
|
|
|
feat: Non auto height invisible widgets (#20118)
## Description
This PR adds another feature update we had planned for Auto Height
- [ ] For new applications, in View and Preview mode, any widget which
is invisible will let go of its space and collapse if it's either on the
main Canvas or a container-like widget which has Auto-height enabled.
- [ ] Widgets within a container-like Widget, say Tabs, that doesn't
have Auto-height enabled, will now let go of their space if they're
invisible.
- [ ] The experience in Edit mode has not changed.
TL;DR: In new applications, in the Preview and Published _AKA_ View
modes, if a widget is invisible and within an Auto-height-enabled
container like a Tab, a Modal, a Form, or the main Canvas, it will fully
collapse, allowing widgets below it to move up and take its space. This
changes the behavior today prior to the release of this PR for
Auto-height-enabled widgets.
Fixes #19983
Fixes #18681
2023-02-14 13:36:19 +00:00
|
|
|
const staticProps = omit(
|
|
|
|
|
WIDGET_STATIC_PROPS,
|
|
|
|
|
"children",
|
|
|
|
|
"topRowBeforeCollapse",
|
|
|
|
|
"bottomRowBeforeCollapse",
|
|
|
|
|
);
|
2022-08-19 10:10:36 +00:00
|
|
|
export type CanvasWidgetStructure = Pick<
|
|
|
|
|
WidgetProps,
|
|
|
|
|
keyof typeof staticProps
|
2023-03-04 07:25:54 +00:00
|
|
|
> &
|
|
|
|
|
LayoutProps & {
|
|
|
|
|
children?: CanvasWidgetStructure[];
|
|
|
|
|
selected?: boolean;
|
|
|
|
|
onClickCapture?: (event: React.MouseEvent<HTMLElement>) => void;
|
2023-05-29 04:36:19 +00:00
|
|
|
isListWidgetCanvas?: boolean;
|
2023-03-04 07:25:54 +00:00
|
|
|
};
|
2022-08-19 10:10:36 +00:00
|
|
|
|
2021-09-09 15:10:22 +00:00
|
|
|
export enum FileDataTypes {
|
|
|
|
|
Base64 = "Base64",
|
|
|
|
|
Text = "Text",
|
|
|
|
|
Binary = "Binary",
|
2022-09-21 12:59:17 +00:00
|
|
|
Array = "Array",
|
2021-09-09 15:10:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export type AlignWidget = "LEFT" | "RIGHT";
|
2023-10-03 08:10:51 +00:00
|
|
|
|
2022-05-25 11:33:33 +00:00
|
|
|
export enum AlignWidgetTypes {
|
|
|
|
|
LEFT = "LEFT",
|
|
|
|
|
RIGHT = "RIGHT",
|
|
|
|
|
}
|
2021-11-30 10:38:46 +00:00
|
|
|
|
2023-09-13 13:57:42 +00:00
|
|
|
// Minimum width for Widget Popups
|
|
|
|
|
export const MinimumPopupWidthInPercentage = 18.75;
|
2022-05-04 09:45:57 +00:00
|
|
|
|
|
|
|
|
// Default boxShadowColor used in theming migration
|
|
|
|
|
export const rgbaMigrationConstantV56 = "rgba(0, 0, 0, 0.25)";
|
|
|
|
|
|
|
|
|
|
export const BUTTON_GROUP_CHILD_STYLESHEET = {
|
|
|
|
|
button: {
|
|
|
|
|
buttonColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const TABLE_WIDGET_CHILD_STYLESHEET = {
|
|
|
|
|
button: {
|
|
|
|
|
buttonColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
menuButton: {
|
|
|
|
|
menuColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
iconButton: {
|
|
|
|
|
menuColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const JSON_FORM_WIDGET_CHILD_STYLESHEET = {
|
|
|
|
|
ARRAY: {
|
|
|
|
|
accentColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
cellBorderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
cellBoxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
OBJECT: {
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
cellBorderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
cellBoxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
CHECKBOX: {
|
|
|
|
|
accentColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
},
|
|
|
|
|
CURRENCY_INPUT: {
|
|
|
|
|
accentColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
DATEPICKER: {
|
|
|
|
|
accentColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
EMAIL_INPUT: {
|
|
|
|
|
accentColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
MULTISELECT: {
|
|
|
|
|
accentColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
MULTILINE_TEXT_INPUT: {
|
|
|
|
|
accentColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
NUMBER_INPUT: {
|
|
|
|
|
accentColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
PASSWORD_INPUT: {
|
|
|
|
|
accentColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
PHONE_NUMBER_INPUT: {
|
|
|
|
|
accentColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
RADIO_GROUP: {
|
|
|
|
|
accentColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
SELECT: {
|
|
|
|
|
accentColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
SWITCH: {
|
|
|
|
|
accentColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
TEXT_INPUT: {
|
|
|
|
|
accentColor: "{{appsmith.theme.colors.primaryColor}}",
|
|
|
|
|
borderRadius: "{{appsmith.theme.borderRadius.appBorderRadius}}",
|
|
|
|
|
boxShadow: "none",
|
|
|
|
|
},
|
|
|
|
|
};
|
2022-07-14 07:02:35 +00:00
|
|
|
|
chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
## Description
This PR upgrades Prettier to v2 + enforces TypeScript’s [`import
type`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export)
syntax where applicable. It’s submitted as a separate PR so we can merge
it easily.
As a part of this PR, we reformat the codebase heavily:
- add `import type` everywhere where it’s required, and
- re-format the code to account for Prettier 2’s breaking changes:
https://prettier.io/blog/2020/03/21/2.0.0.html#breaking-changes
This PR is submitted against `release` to make sure all new code by team
members will adhere to new formatting standards, and we’ll have fewer
conflicts when merging `bundle-optimizations` into `release`. (I’ll
merge `release` back into `bundle-optimizations` once this PR is
merged.)
### Why is this needed?
This PR is needed because, for the Lodash optimization from
https://github.com/appsmithorg/appsmith/commit/7cbb12af886621256224be0c93e6a465dd710ad3,
we need to use `import type`. Otherwise, `babel-plugin-lodash` complains
that `LoDashStatic` is not a lodash function.
However, just using `import type` in the current codebase will give you
this:
<img width="962" alt="Screenshot 2023-03-08 at 17 45 59"
src="https://user-images.githubusercontent.com/2953267/223775744-407afa0c-e8b9-44a1-90f9-b879348da57f.png">
That’s because Prettier 1 can’t parse `import type` at all. To parse it,
we need to upgrade to Prettier 2.
### Why enforce `import type`?
Apart from just enabling `import type` support, this PR enforces
specifying `import type` everywhere it’s needed. (Developers will get
immediate TypeScript and ESLint errors when they forget to do so.)
I’m doing this because I believe `import type` improves DX and makes
refactorings easier.
Let’s say you had a few imports like below. Can you tell which of these
imports will increase the bundle size? (Tip: it’s not all of them!)
```ts
// app/client/src/workers/Linting/utils.ts
import { Position } from "codemirror";
import { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
It’s pretty hard, right?
What about now?
```ts
// app/client/src/workers/Linting/utils.ts
import type { Position } from "codemirror";
import type { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```
Now, it’s clear that only `lodash` will be bundled.
This helps developers to see which imports are problematic, but it
_also_ helps with refactorings. Now, if you want to see where
`codemirror` is bundled, you can just grep for `import \{.*\} from
"codemirror"` – and you won’t get any type-only imports.
This also helps (some) bundlers. Upon transpiling, TypeScript erases
type-only imports completely. In some environment (not ours), this makes
the bundle smaller, as the bundler doesn’t need to bundle type-only
imports anymore.
## Type of change
- Chore (housekeeping or task changes that don't impact user perception)
## How Has This Been Tested?
This was tested to not break the build.
### Test Plan
> Add Testsmith test cases links that relate to this PR
### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)
## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag
### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test
---------
Co-authored-by: Satish Gandham <hello@satishgandham.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
2023-03-16 11:41:47 +00:00
|
|
|
export const YOUTUBE_URL_REGEX =
|
|
|
|
|
/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=|\?v=)([^#&?]*).*/;
|
2022-08-12 09:05:37 +00:00
|
|
|
|
|
|
|
|
export const ICON_NAMES = Object.keys(IconNames).map(
|
|
|
|
|
(name: string) => IconNames[name as keyof typeof IconNames],
|
|
|
|
|
);
|
2022-09-29 05:26:08 +00:00
|
|
|
|
|
|
|
|
export const dateFormatOptions = [
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("YYYY-MM-DDTHH:mm:ss.sssZ"),
|
|
|
|
|
subText: "ISO 8601",
|
|
|
|
|
value: "YYYY-MM-DDTHH:mm:ss.sssZ",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("LLL"),
|
|
|
|
|
subText: "LLL",
|
|
|
|
|
value: "LLL",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("LL"),
|
|
|
|
|
subText: "LL",
|
|
|
|
|
value: "LL",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("YYYY-MM-DD HH:mm"),
|
|
|
|
|
subText: "YYYY-MM-DD HH:mm",
|
|
|
|
|
value: "YYYY-MM-DD HH:mm",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("YYYY-MM-DDTHH:mm:ss"),
|
|
|
|
|
subText: "YYYY-MM-DDTHH:mm:ss",
|
|
|
|
|
value: "YYYY-MM-DDTHH:mm:ss",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("YYYY-MM-DD hh:mm:ss A"),
|
|
|
|
|
subText: "YYYY-MM-DD hh:mm:ss A",
|
|
|
|
|
value: "YYYY-MM-DD hh:mm:ss A",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("DD/MM/YYYY HH:mm"),
|
|
|
|
|
subText: "DD/MM/YYYY HH:mm",
|
|
|
|
|
value: "DD/MM/YYYY HH:mm",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("D MMMM, YYYY"),
|
|
|
|
|
subText: "D MMMM, YYYY",
|
|
|
|
|
value: "D MMMM, YYYY",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("H:mm A D MMMM, YYYY"),
|
|
|
|
|
subText: "H:mm A D MMMM, YYYY",
|
|
|
|
|
value: "H:mm A D MMMM, YYYY",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("YYYY-MM-DD"),
|
|
|
|
|
subText: "YYYY-MM-DD",
|
|
|
|
|
value: "YYYY-MM-DD",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("MM-DD-YYYY"),
|
|
|
|
|
subText: "MM-DD-YYYY",
|
|
|
|
|
value: "MM-DD-YYYY",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("DD-MM-YYYY"),
|
|
|
|
|
subText: "DD-MM-YYYY",
|
|
|
|
|
value: "DD-MM-YYYY",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("MM/DD/YYYY"),
|
|
|
|
|
subText: "MM/DD/YYYY",
|
|
|
|
|
value: "MM/DD/YYYY",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("DD/MM/YYYY"),
|
|
|
|
|
subText: "DD/MM/YYYY",
|
|
|
|
|
value: "DD/MM/YYYY",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("DD/MM/YY"),
|
|
|
|
|
subText: "DD/MM/YY",
|
|
|
|
|
value: "DD/MM/YY",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: moment().format("MM/DD/YY"),
|
|
|
|
|
subText: "MM/DD/YY",
|
|
|
|
|
value: "MM/DD/YY",
|
|
|
|
|
},
|
|
|
|
|
];
|
chore: import common variables from design system (#17600)
* Delete CommonComponentProps, Classes, import them from design-system
* Delete Icon.test.tsx
* Remove color utils, add import from design-system
* Remove Variant, add import from design-system
* Remove unused toast parameters from common
* use design-system version 28-alpha-7
* Move ThemeProp from ads/common to widgets/constants
* fix import
* Delete index.ts
* feat: migrated form group from ads folder to design system repository (#17400)
* feat: migrated form group from ads folder to design system repo
* fix: formGroup label color fix
* DS version updated
* Updated Label Config
* chore: Flapdoodle version upgrade to 3.5.0 (#17609)
* chore: code split tenant API CE (#17596)
## Description
We shouldn't expose tenant config on CE , so on CE, we should only return the necessary user permissions hard coded on the saga.
## Type of change
- New feature (non-breaking change which adds functionality)
## How Has This Been Tested?
- Manual
## Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
* chore: BaseAppsmithRepo code split (#17614)
* chore: Updating the tenant API to return the complete object instead of just the configuration (#17615)
* Fix sandbox iframe default setting (#17618)
* feat: upgrade hooks | audit logs (#17525)
* feat: Text Widget Reskinning (#17298)
* feat: Use truncate button color from theme
* fix: Update Truncate Button Color validation regex
* feat: Maintain Focus and Context Phase 1 (#16317)
* fix: update regex and test case for organisation website (#17612)
* chore: Add properties to analytics event (#17621)
* feat: enabled setTimeout/clearTimeout APIs (#17445)
* Update top contributors
* fix: ms sql default port updated to 1433 (#17342)
* fix: removed global style from design system dropdown component (#17392)
* bug: removed global style from design system dropdown component
* changed design system package version
* fix: Dropdown background fix - design system
* design-system - dropdown background color fix
* DS version updated
* chore: Fixing broken client build (#17634)
## Description
EE client build is broken due to not following proper code splitting strategy; one file in particularly didn't get split earlier and changes to that file broke the client build on EE.
This PR fixes the issues.
* Fix/16994 refactor common datatype handling (#17429)
* fix:Add array datatype to execute request
* feat: Consume and store type of array elements in Param class (#16994)
* Append param instead of clientDataType in varargs (#16994)
* Refactor common data type handling w.r.t newer structure (#16994)
This commit takes care of the following items:
- It minimizes the number of usage to the older stringToKnownDataTypeConverter method
- Modifies the existing test cases to conform to the newer structure
- Marks stringToKnownDataTypeConverter method as deprecated to discourage further use
* Remove comma delimited numbers from valid test cases (#16994)
* Fix extracting clientDataType from varargs in MySQL (#16994)
* Pass param as a dedicated parameter in json smart replacement (#16994)
* Remove varargs from json smart replacement method (#16994)
* Move BsonType to mongoplugin module (#16994)
* Introduce NullArrayType and refactor BsonType test cases (#16994)
* Add new test cases on numeric string with leading zero (#16994)
* Refactor test case name (#16994)
* Add comment on the ordering of Json and Bson types (#16994)
* Add comment on the ordering of Json and Bson types (#16994)
* Add NullArrayType in Postgres and introduce postgres-specific types (#16994)
* Add data type test cases for Postgres and change as per review comments (#16994)
Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
* feat: Update invite modal submit when we have tabs in modal (#17608)
## Description
> Update invite modal submit when we have tabs in modal.
Fixes [#16741](https://github.com/appsmithorg/appsmith/issues/16741)
## Type of change
- New feature (non-breaking change which adds functionality)
## How Has This Been Tested?
> Tested it locally.
## Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
* feat: AST based entity refactor (#17434)
* task: AST based entity refactor
* implemented refactor logic
* jest cases with string manipulation using AST logic
* comments and indentation
* added evalVersion to request
* chore: Added feature flag for datasource environments (#17657)
chore: Added Feature flag for datasource environments
* chore: Corrected analytics event for instance setting events (#17622)
* Update top contributors
* Fix typo in cloud-hosting check and NPE from Segment (#17692)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
* fix: remove file references on click of cancel button (#17664)
* fix: table does not show data issue fixed (#17459)
* chore: Add recommended indexes (#17704)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
* chore: Added workspace details to user invite analytic event (#17644)
## Description
This PR adds the workspace details to user invite analytics event
## Type of change
- New feature (non-breaking change which adds functionality)
## How Has This Been Tested?
- Manually on local
## Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
* chore: Correct the toast font on windows (#17671)
* fix: JS option missing for Label Font Style in Input widget (#17631)
* fix: replace time based action to event based (#17586)
* fix: replace time based action to event based
- The delete datasource button was getting reset to it's original state after a static time of 2200ms
- Replaced this to reset on completion of deletion instead
* fix: removed unused functions
* fix: updated the condition to show confirm delete icon
* Updated Label Config
* test: Add cypress tests for template phase 2 (#17036)
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
* Change Segment CDN to our proxy (#17714)
* chore: Fixing prettier formatting for AnalyticsUtil.tsx
* chore: Adding base repository function to add user permissions to generic domain object (#17733)
## Description
Adding base function to set the user permissions for a user in any domain object.
As part of this, we also add default permission group to the `SeedMongoData`. Without this fix, the JUnit tests go into an infinite loop. Also fixing the `ExampleWorkspaceClonerTest` file.
## Type of change
- Bug fix (non-breaking change which fixes an issue)
## How Has This Been Tested?
- JUnit
## Checklist:
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
* Update top contributors
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com>
Co-authored-by: Nidhi <nidhi@appsmith.com>
Co-authored-by: Sangeeth Sivan <74818788+berzerkeer@users.noreply.github.com>
Co-authored-by: Trisha Anand <trisha@appsmith.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: f0c1s <anubhav@appsmith.com>
Co-authored-by: Dhruvik Neharia <dhruvik@appsmith.com>
Co-authored-by: Hetu Nandu <hetu@appsmith.com>
Co-authored-by: Nilesh Sarupriya <nilesh@appsmith.com>
Co-authored-by: Anagh Hegde <anagh@appsmith.com>
Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com>
Co-authored-by: Appsmith Bot <74705725+appsmith-bot@users.noreply.github.com>
Co-authored-by: Vaibhav Tanwar <40293928+vaibh1297@users.noreply.github.com>
Co-authored-by: subratadeypappu <subrata@appsmith.com>
Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
Co-authored-by: Ankita Kinger <ankita@appsmith.com>
Co-authored-by: ChandanBalajiBP <104058110+ChandanBalajiBP@users.noreply.github.com>
Co-authored-by: Vishnu Gp <vishnu@appsmith.com>
Co-authored-by: Keyur Paralkar <keyur@appsmith.com>
Co-authored-by: sneha122 <sneha@appsmith.com>
Co-authored-by: Tanvi Bhakta <tanvibhakta@gmail.com>
Co-authored-by: sanjus-robotic-studio <58104863+sanjus-robotic-studio@users.noreply.github.com>
Co-authored-by: Ayush Pahwa <ayush@appsmith.com>
Co-authored-by: Parthvi <80334441+Parthvi12@users.noreply.github.com>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
Co-authored-by: Arpit Mohan <arpit@appsmith.com>
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com>
Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com>
Co-authored-by: Nidhi <nidhi@appsmith.com>
Co-authored-by: Sangeeth Sivan <74818788+berzerkeer@users.noreply.github.com>
Co-authored-by: Trisha Anand <trisha@appsmith.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: f0c1s <anubhav@appsmith.com>
Co-authored-by: Dhruvik Neharia <dhruvik@appsmith.com>
Co-authored-by: Hetu Nandu <hetu@appsmith.com>
Co-authored-by: Nilesh Sarupriya <nilesh@appsmith.com>
Co-authored-by: Anagh Hegde <anagh@appsmith.com>
Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com>
Co-authored-by: Appsmith Bot <74705725+appsmith-bot@users.noreply.github.com>
Co-authored-by: Vaibhav Tanwar <40293928+vaibh1297@users.noreply.github.com>
Co-authored-by: subratadeypappu <subrata@appsmith.com>
Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
Co-authored-by: Ankita Kinger <ankita@appsmith.com>
Co-authored-by: ChandanBalajiBP <104058110+ChandanBalajiBP@users.noreply.github.com>
Co-authored-by: Vishnu Gp <vishnu@appsmith.com>
Co-authored-by: Keyur Paralkar <keyur@appsmith.com>
Co-authored-by: sneha122 <sneha@appsmith.com>
Co-authored-by: sanjus-robotic-studio <58104863+sanjus-robotic-studio@users.noreply.github.com>
Co-authored-by: Ayush Pahwa <ayush@appsmith.com>
Co-authored-by: Parthvi <80334441+Parthvi12@users.noreply.github.com>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
Co-authored-by: Arpit Mohan <arpit@appsmith.com>
2022-10-31 01:24:47 +00:00
|
|
|
|
2023-10-11 07:35:24 +00:00
|
|
|
export interface ThemeProp {
|
chore: import common variables from design system (#17600)
* Delete CommonComponentProps, Classes, import them from design-system
* Delete Icon.test.tsx
* Remove color utils, add import from design-system
* Remove Variant, add import from design-system
* Remove unused toast parameters from common
* use design-system version 28-alpha-7
* Move ThemeProp from ads/common to widgets/constants
* fix import
* Delete index.ts
* feat: migrated form group from ads folder to design system repository (#17400)
* feat: migrated form group from ads folder to design system repo
* fix: formGroup label color fix
* DS version updated
* Updated Label Config
* chore: Flapdoodle version upgrade to 3.5.0 (#17609)
* chore: code split tenant API CE (#17596)
## Description
We shouldn't expose tenant config on CE , so on CE, we should only return the necessary user permissions hard coded on the saga.
## Type of change
- New feature (non-breaking change which adds functionality)
## How Has This Been Tested?
- Manual
## Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
* chore: BaseAppsmithRepo code split (#17614)
* chore: Updating the tenant API to return the complete object instead of just the configuration (#17615)
* Fix sandbox iframe default setting (#17618)
* feat: upgrade hooks | audit logs (#17525)
* feat: Text Widget Reskinning (#17298)
* feat: Use truncate button color from theme
* fix: Update Truncate Button Color validation regex
* feat: Maintain Focus and Context Phase 1 (#16317)
* fix: update regex and test case for organisation website (#17612)
* chore: Add properties to analytics event (#17621)
* feat: enabled setTimeout/clearTimeout APIs (#17445)
* Update top contributors
* fix: ms sql default port updated to 1433 (#17342)
* fix: removed global style from design system dropdown component (#17392)
* bug: removed global style from design system dropdown component
* changed design system package version
* fix: Dropdown background fix - design system
* design-system - dropdown background color fix
* DS version updated
* chore: Fixing broken client build (#17634)
## Description
EE client build is broken due to not following proper code splitting strategy; one file in particularly didn't get split earlier and changes to that file broke the client build on EE.
This PR fixes the issues.
* Fix/16994 refactor common datatype handling (#17429)
* fix:Add array datatype to execute request
* feat: Consume and store type of array elements in Param class (#16994)
* Append param instead of clientDataType in varargs (#16994)
* Refactor common data type handling w.r.t newer structure (#16994)
This commit takes care of the following items:
- It minimizes the number of usage to the older stringToKnownDataTypeConverter method
- Modifies the existing test cases to conform to the newer structure
- Marks stringToKnownDataTypeConverter method as deprecated to discourage further use
* Remove comma delimited numbers from valid test cases (#16994)
* Fix extracting clientDataType from varargs in MySQL (#16994)
* Pass param as a dedicated parameter in json smart replacement (#16994)
* Remove varargs from json smart replacement method (#16994)
* Move BsonType to mongoplugin module (#16994)
* Introduce NullArrayType and refactor BsonType test cases (#16994)
* Add new test cases on numeric string with leading zero (#16994)
* Refactor test case name (#16994)
* Add comment on the ordering of Json and Bson types (#16994)
* Add comment on the ordering of Json and Bson types (#16994)
* Add NullArrayType in Postgres and introduce postgres-specific types (#16994)
* Add data type test cases for Postgres and change as per review comments (#16994)
Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
* feat: Update invite modal submit when we have tabs in modal (#17608)
## Description
> Update invite modal submit when we have tabs in modal.
Fixes [#16741](https://github.com/appsmithorg/appsmith/issues/16741)
## Type of change
- New feature (non-breaking change which adds functionality)
## How Has This Been Tested?
> Tested it locally.
## Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
* feat: AST based entity refactor (#17434)
* task: AST based entity refactor
* implemented refactor logic
* jest cases with string manipulation using AST logic
* comments and indentation
* added evalVersion to request
* chore: Added feature flag for datasource environments (#17657)
chore: Added Feature flag for datasource environments
* chore: Corrected analytics event for instance setting events (#17622)
* Update top contributors
* Fix typo in cloud-hosting check and NPE from Segment (#17692)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
* fix: remove file references on click of cancel button (#17664)
* fix: table does not show data issue fixed (#17459)
* chore: Add recommended indexes (#17704)
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
* chore: Added workspace details to user invite analytic event (#17644)
## Description
This PR adds the workspace details to user invite analytics event
## Type of change
- New feature (non-breaking change which adds functionality)
## How Has This Been Tested?
- Manually on local
## Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
* chore: Correct the toast font on windows (#17671)
* fix: JS option missing for Label Font Style in Input widget (#17631)
* fix: replace time based action to event based (#17586)
* fix: replace time based action to event based
- The delete datasource button was getting reset to it's original state after a static time of 2200ms
- Replaced this to reset on completion of deletion instead
* fix: removed unused functions
* fix: updated the condition to show confirm delete icon
* Updated Label Config
* test: Add cypress tests for template phase 2 (#17036)
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
* Change Segment CDN to our proxy (#17714)
* chore: Fixing prettier formatting for AnalyticsUtil.tsx
* chore: Adding base repository function to add user permissions to generic domain object (#17733)
## Description
Adding base function to set the user permissions for a user in any domain object.
As part of this, we also add default permission group to the `SeedMongoData`. Without this fix, the JUnit tests go into an infinite loop. Also fixing the `ExampleWorkspaceClonerTest` file.
## Type of change
- Bug fix (non-breaking change which fixes an issue)
## How Has This Been Tested?
- JUnit
## Checklist:
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
* Update top contributors
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com>
Co-authored-by: Nidhi <nidhi@appsmith.com>
Co-authored-by: Sangeeth Sivan <74818788+berzerkeer@users.noreply.github.com>
Co-authored-by: Trisha Anand <trisha@appsmith.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: f0c1s <anubhav@appsmith.com>
Co-authored-by: Dhruvik Neharia <dhruvik@appsmith.com>
Co-authored-by: Hetu Nandu <hetu@appsmith.com>
Co-authored-by: Nilesh Sarupriya <nilesh@appsmith.com>
Co-authored-by: Anagh Hegde <anagh@appsmith.com>
Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com>
Co-authored-by: Appsmith Bot <74705725+appsmith-bot@users.noreply.github.com>
Co-authored-by: Vaibhav Tanwar <40293928+vaibh1297@users.noreply.github.com>
Co-authored-by: subratadeypappu <subrata@appsmith.com>
Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
Co-authored-by: Ankita Kinger <ankita@appsmith.com>
Co-authored-by: ChandanBalajiBP <104058110+ChandanBalajiBP@users.noreply.github.com>
Co-authored-by: Vishnu Gp <vishnu@appsmith.com>
Co-authored-by: Keyur Paralkar <keyur@appsmith.com>
Co-authored-by: sneha122 <sneha@appsmith.com>
Co-authored-by: Tanvi Bhakta <tanvibhakta@gmail.com>
Co-authored-by: sanjus-robotic-studio <58104863+sanjus-robotic-studio@users.noreply.github.com>
Co-authored-by: Ayush Pahwa <ayush@appsmith.com>
Co-authored-by: Parthvi <80334441+Parthvi12@users.noreply.github.com>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
Co-authored-by: Arpit Mohan <arpit@appsmith.com>
Signed-off-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com>
Co-authored-by: Nikhil Nandagopal <nikhil.nandagopal@gmail.com>
Co-authored-by: Nidhi <nidhi@appsmith.com>
Co-authored-by: Sangeeth Sivan <74818788+berzerkeer@users.noreply.github.com>
Co-authored-by: Trisha Anand <trisha@appsmith.com>
Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: f0c1s <anubhav@appsmith.com>
Co-authored-by: Dhruvik Neharia <dhruvik@appsmith.com>
Co-authored-by: Hetu Nandu <hetu@appsmith.com>
Co-authored-by: Nilesh Sarupriya <nilesh@appsmith.com>
Co-authored-by: Anagh Hegde <anagh@appsmith.com>
Co-authored-by: arunvjn <32433245+arunvjn@users.noreply.github.com>
Co-authored-by: Appsmith Bot <74705725+appsmith-bot@users.noreply.github.com>
Co-authored-by: Vaibhav Tanwar <40293928+vaibh1297@users.noreply.github.com>
Co-authored-by: subratadeypappu <subrata@appsmith.com>
Co-authored-by: ChandanBalajiBP <chandan@appsmith.com>
Co-authored-by: Ankita Kinger <ankita@appsmith.com>
Co-authored-by: ChandanBalajiBP <104058110+ChandanBalajiBP@users.noreply.github.com>
Co-authored-by: Vishnu Gp <vishnu@appsmith.com>
Co-authored-by: Keyur Paralkar <keyur@appsmith.com>
Co-authored-by: sneha122 <sneha@appsmith.com>
Co-authored-by: sanjus-robotic-studio <58104863+sanjus-robotic-studio@users.noreply.github.com>
Co-authored-by: Ayush Pahwa <ayush@appsmith.com>
Co-authored-by: Parthvi <80334441+Parthvi12@users.noreply.github.com>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
Co-authored-by: Arpit Mohan <arpit@appsmith.com>
2022-10-31 01:24:47 +00:00
|
|
|
theme: Theme;
|
2023-10-11 07:35:24 +00:00
|
|
|
}
|
2023-07-26 05:38:11 +00:00
|
|
|
|
2023-09-08 07:42:48 +00:00
|
|
|
export type SnipingModeProperty = Record<
|
|
|
|
|
SnipingModeSupportedKeys,
|
|
|
|
|
string | boolean
|
|
|
|
|
>;
|
2023-08-10 06:48:51 +00:00
|
|
|
|
|
|
|
|
export enum DefaultMobileCameraTypes {
|
|
|
|
|
FRONT = "user",
|
|
|
|
|
BACK = "environment",
|
|
|
|
|
}
|
2023-09-06 12:15:04 +00:00
|
|
|
|
2023-10-11 07:35:24 +00:00
|
|
|
export interface WidgetBlueprint {
|
2023-09-06 12:15:04 +00:00
|
|
|
view?: Array<{
|
|
|
|
|
type: string;
|
|
|
|
|
size?: { rows: number; cols: number };
|
|
|
|
|
position: { top?: number; left?: number };
|
2024-07-31 15:41:28 +00:00
|
|
|
// TODO: Fix this the next time the file is edited
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2023-09-06 12:15:04 +00:00
|
|
|
props: Record<string, any>;
|
|
|
|
|
}>;
|
2024-07-31 15:41:28 +00:00
|
|
|
// TODO: Fix this the next time the file is edited
|
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
2023-09-06 12:15:04 +00:00
|
|
|
operations?: any;
|
2023-10-11 07:35:24 +00:00
|
|
|
}
|
2023-09-06 12:15:04 +00:00
|
|
|
|
|
|
|
|
export interface WidgetConfigProps {
|
|
|
|
|
rows: number;
|
|
|
|
|
columns: number;
|
|
|
|
|
blueprint?: WidgetBlueprint;
|
|
|
|
|
widgetName: string;
|
|
|
|
|
enhancements?: Record<string, unknown>; // TODO(abhinav): SPECIFY TYPES
|
|
|
|
|
}
|