Merge branch 'main' of https://github.com/ToolJet/ToolJet into appbuilder-1.6

This commit is contained in:
Kavin Venkatachalam 2024-03-11 14:22:11 +05:30
commit 8e6161ac90
86 changed files with 60 additions and 59 deletions

View file

@ -1 +1 @@
2.32.2
2.32.3

View file

@ -76,14 +76,8 @@ module.exports = defineConfig({
experimentalRunAllSpecs: true,
baseUrl: "http://localhost:8082",
specPattern: [
"cypress/e2e/editor/widget/*.cy.js",
"cypress/e2e/editor/multipage/*.cy.js",
"cypress/e2e/editor/globalSetingsHappyPath.cy.js",
"cypress/e2e/editor/inspectorHappypath.cy.js",
"cypress/e2e/editor/queries/runpyHappyPath.cy.js",
"cypress/e2e/editor/queries/runjsHappyPath.cy.js",
"cypress/e2e/editor/multipage/multipageHappypath.cy.js",
"cypress/e2e/editor/queries/chainingOfQueries.cy.js",
"cypress/e2e/happypath/appbuilder/commonTestcases/**/*.cy.js",
"cypress/e2e/happypath/appbuilder/ceTestcases/**/*.cy.js"
],
numTestsKeptInMemory: 1,
redirectionLimit: 7,

View file

@ -76,10 +76,8 @@ module.exports = defineConfig({
experimentalRunAllSpecs: true,
baseUrl: "http://localhost:8082",
specPattern: [
"cypress/e2e/exportImport/export.cy.js",
"cypress/e2e/exportImport/import.cy.js",
"cypress/e2e/database/database.cy.js",
"cypress/e2e/editor/data-source/*.cy.js",
"cypress/e2e/happypath/marketplace/commonTestcases/**/*.cy.js",
"cypress/e2e/happypath/marketplace/ceTestcases/**/*.cy.js"
],
numTestsKeptInMemory: 1,
redirectionLimit: 7,

View file

@ -75,19 +75,8 @@ module.exports = defineConfig({
experimentalModfyObstructiveThirdPartyCode: true,
experimentalRunAllSpecs: true,
baseUrl: "http://localhost:8082",
specPattern: [
// "cypress/e2e/selfHost/*.cy.js",
// "cypress/e2e/authentication/*.cy.js",
// "cypress/e2e/workspace/*.cy.js",
// "cypress/e2e/editor/data-source/*.cy.js",
"cypress/e2e/editor/app-version/version.cy.js",
"cypress/e2e/exportImport/export.cy.js",
"cypress/e2e/exportImport/import.cy.js",
"cypress/e2e/database/database.cy.js",
"cypress/e2e/editor/widget/*.cy.js",
"cypress/e2e/editor/multipage/*.cy.js",
],
numTestsKeptInMemory: 1,
specPattern: "cypress/e2e/**/*.cy.js",
numTestsKeptInMemory: 0,
redirectionLimit: 7,
experimentalRunAllSpecs: true,
experimentalMemoryManagement: true,

View file

@ -76,11 +76,8 @@ module.exports = defineConfig({
experimentalRunAllSpecs: true,
baseUrl: "http://localhost:8082",
specPattern: [
"cypress/e2e/ce/**/*.cy.js",
"cypress/e2e/editor/app-version/version.cy.js",
"cypress/e2e/workspace/*.cy.js",
"cypress/e2e/authentication/*.cy.js",
"cypress/e2e/selfHost/*.cy.js",
"cypress/e2e/happypath/platform/commonTestcases/**/*.cy.js",
"cypress/e2e/happypath/platform/ceTestcases/**/*.cy.js"
],
numTestsKeptInMemory: 1,
redirectionLimit: 15,

View file

@ -30,7 +30,7 @@ services:
postgrest:
container_name: postgrest
image: postgrest/postgrest:v10.1.1.20221215
image: postgrest/postgrest:v12.0.2
restart: always
depends_on:
- postgres

View file

@ -16,7 +16,7 @@ services:
command: npm run start:prod
# Uncomment if ENABLE_TOOLJET_DB=true
postgrest:
image: postgrest/postgrest:v10.1.1.20221215
image: postgrest/postgrest:v12.0.2
restart: always
env_file: .env
environment:

View file

@ -19,7 +19,7 @@ spec:
spec:
containers:
- name: postgrest
image: postgrest/postgrest:v10.1.1.20221215
image: postgrest/postgrest:v12.0.2
ports:
- containerPort: 3000
env:

View file

@ -19,7 +19,7 @@ spec:
spec:
containers:
- name: postgrest
image: postgrest/postgrest:v10.1.1.20221215
image: postgrest/postgrest:v12.0.2
ports:
- containerPort: 3000
env:

View file

@ -19,7 +19,7 @@ spec:
spec:
containers:
- name: postgrest
image: postgrest/postgrest:v10.1.1.20221215
image: postgrest/postgrest:v12.0.2
ports:
- containerPort: 3000
env:

View file

@ -52,7 +52,7 @@ services:
command: npm run --prefix server start:dev
postgrest:
image: postgrest/postgrest:v10.1.1.20221215
image: postgrest/postgrest:v12.0.2
ports:
- "3001:3000"
env_file:

View file

@ -34,7 +34,7 @@ RUN npm --prefix server run build
FROM node:18.18.2-buster
# copy postgrest executable
COPY --from=postgrest/postgrest /bin/postgrest /bin
COPY --from=postgrest/postgrest:v12.0.2 /bin/postgrest /bin
ENV NODE_ENV=production
ENV NODE_OPTIONS="--max-old-space-size=4096"

View file

@ -1 +1 @@
2.32.2
2.32.3

View file

@ -159,6 +159,7 @@ export const Box = memo(
const currentState = useCurrentState();
const moduleName = useModuleName();
const { events } = useAppInfo();
const shouldAddBoxShadowAndVisibility = ['TextInput', 'PasswordInput', 'NumberInput', 'Text'];
const componentMeta = useMemo(() => {
return componentTypes.find((comp) => component.component === comp.component);
@ -174,14 +175,18 @@ export const Box = memo(
mode === 'edit' && component.validate
? validateProperties(resolvedProperties, componentMeta.properties)
: [resolvedProperties, []];
if (shouldAddBoxShadowAndVisibility.includes(component.component)) {
validatedProperties.visibility = validatedProperties.visibility !== false ? true : false;
}
const resolvedStyles = resolveStyles(component, currentState, null, customResolvables);
const [validatedStyles, styleErrors] =
mode === 'edit' && component.validate
? validateProperties(resolvedStyles, componentMeta.styles)
: [resolvedStyles, []];
if (!shouldAddBoxShadowAndVisibility.includes(component.component)) {
validatedStyles.visibility = validatedStyles.visibility !== false ? true : false;
}
const resolvedGeneralProperties = resolveGeneralProperties(component, currentState, null, customResolvables);
const [validatedGeneralProperties, generalPropertiesErrors] =
mode === 'edit' && component.validate
@ -189,7 +194,7 @@ export const Box = memo(
: [resolvedGeneralProperties, []];
const resolvedGeneralStyles = resolveGeneralStyles(component, currentState, null, customResolvables);
resolvedStyles.visibility = resolvedStyles.visibility !== false ? true : false;
const [validatedGeneralStyles, generalStylesErrors] =
mode === 'edit' && component.validate
? validateProperties(resolvedGeneralStyles, componentMeta.generalStyles)
@ -279,13 +284,12 @@ export const Box = memo(
...{ validationObject: component.definition.validation, currentState },
customResolveObjects: customResolvables,
});
const shouldAddBoxShadow = ['TextInput', 'PasswordInput', 'NumberInput', 'Text'];
return (
<OverlayTrigger
placement={inCanvas ? 'auto' : 'top'}
delay={{ show: 500, hide: 0 }}
trigger={
inCanvas && shouldAddBoxShadow.includes(component.component)
inCanvas && shouldAddBoxShadowAndVisibility.includes(component.component)
? !validatedProperties.tooltip?.toString().trim()
? null
: ['hover', 'focus']
@ -298,7 +302,7 @@ export const Box = memo(
props,
text: inCanvas
? `${
shouldAddBoxShadow.includes(component.component)
shouldAddBoxShadowAndVisibility.includes(component.component)
? validatedProperties.tooltip
: validatedGeneralProperties.tooltip
}`
@ -335,7 +339,7 @@ export const Box = memo(
exposedVariables={exposedVariables}
styles={{
...validatedStyles,
...(!shouldAddBoxShadow.includes(component.component)
...(!shouldAddBoxShadowAndVisibility.includes(component.component)
? { boxShadow: validatedGeneralStyles?.boxShadow }
: {}),
}}

View file

@ -135,7 +135,7 @@ export function GithubSSOModal({ settings, onClose, onUpdateSSOSettings, isInsta
>
<div>
<label className="switch">
<input type="checkbox" checked={enabled} onChange={onToggleChange} />
<input type="checkbox" checked={enabled} onChange={onToggleChange} data-cy="github-toggle-input" />
<span className="slider round"></span>
</label>
<span className="sso-type-header" data-cy="card-title" style={{ marginBottom: '0px', fontWeight: '500' }}>

View file

@ -105,7 +105,7 @@ export function GoogleSSOModal({ settings, onClose, onUpdateSSOSettings, isInsta
>
<div>
<label className="switch">
<input type="checkbox" checked={enabled} onChange={onToggleChange} />
<input type="checkbox" checked={enabled} onChange={onToggleChange} data-cy="google-enable-toggle" />
<span className="slider round"></span>
</label>
<span className="sso-type-header" data-cy="card-title" style={{ marginBottom: '0px', fontWeight: '500' }}>

View file

@ -241,24 +241,35 @@ class SSOConfiguration extends React.Component {
const isEnabled = this.state[isEnabledKey];
return (
<div className="sso-option" key={key} onClick={() => this.openModal(key)}>
<div className="sso-option" key={key} onClick={() => this.openModal(key)} data-cy="sso-card">
<div className="sso-option-label">
{
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
<div
style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}
data-cy={`${name.toLowerCase().replace(/\s+/g, '-')}-icon`}
>
{this.getSSOIcon(key)}
<span style={{ marginLeft: 8 }}>{name}</span>
<span style={{ marginLeft: 8 }} data-cy={`${name.toLowerCase().replace(/\s+/g, '-')}-label`}>
{name}
</span>
{
<img
src="/assets/images/EditIcon.png"
className="option-icon"
style={{ width: '14px', height: '14px', marginLeft: '8px' }}
data-cy={`${name.toLowerCase().replace(/\s+/g, '-')}-edit-icon`}
/>
}
</div>
}
</div>
<label className="switch" onClick={(e) => e.stopPropagation()}>
<input type="checkbox" checked={isEnabled} onChange={() => this.toggleSSOOption(key)} />
<input
type="checkbox"
checked={isEnabled}
onChange={() => this.toggleSSOOption(key)}
data-cy={`${name.toLowerCase().replace(/\s+/g, '-')}-toggle`}
/>
<span className="slider round"></span>
</label>
</div>
@ -270,7 +281,9 @@ class SSOConfiguration extends React.Component {
return (
<div className="sso-configuration">
<h4 style={{ fontSize: '12px' }}>SSO</h4>
<h4 style={{ fontSize: '12px' }} data-cy="sso-header">
SSO
</h4>
<div
className={`sso-option ${showDropdown ? 'clicked' : ''}`}
style={{ paddingLeft: '0px', marginBottom: '1px' }}
@ -290,6 +303,7 @@ class SSOConfiguration extends React.Component {
justifyContent: 'flex-start',
}}
bsPrefix="no-caret-dropdown-toggle"
data-testid="instance-sso-toggle"
>
<div
className="sso-option-label"
@ -301,6 +315,7 @@ class SSOConfiguration extends React.Component {
paddingBottom: '6px',
height: '34px',
}}
data-cy="instance-sso-card"
>
Default SSO {defaultSSO ? `(${this.state.inheritedInstanceSSO})` : ''}
<SolidIcon className="option-icon" name={showDropdown ? 'cheveronup' : 'cheverondown'} fill={'grey'} />
@ -311,6 +326,7 @@ class SSOConfiguration extends React.Component {
<Dropdown.Item
eventKey="Google"
disabled={!defaultSSO || this.isOptionEnabled('google') || !this.isInstanceOptionEnabled('google')} // Disable the item if defaultSSO is false
data-cy="dropdown-options-google"
>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
{this.getSSOIcon('google')}
@ -320,6 +336,7 @@ class SSOConfiguration extends React.Component {
<Dropdown.Item
eventKey="GitHub"
disabled={!defaultSSO || this.isOptionEnabled('git') || !this.isInstanceOptionEnabled('git')} // Disable the item if defaultSSO is false
data-cy="dropdown-options-git"
>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}>
{this.getSSOIcon('git')}
@ -334,7 +351,9 @@ class SSOConfiguration extends React.Component {
<span className="slider round"></span>
</label>
</div>
<p className="sso-note">Display default SSO for workspace URL login</p>
<p className="sso-note" data-cy="instance-sso-helper-text">
Display default SSO for workspace URL login
</p>
{this.renderSSOOption('google', 'Google')}
{this.renderSSOOption('git', 'GitHub')}
{showModal && currentSSO === 'google' && (

View file

@ -15,12 +15,12 @@ function WorkspaceSSOEnableModal({ show, ssoKey, saveSettings, setShowModal, res
const modalContent = (
<div>
<p>
<p data-cy="modal-message">
Enabling <strong>{ssoKey.charAt(0).toUpperCase() + ssoKey.slice(1)}</strong> at the workspace level will
override any <strong>{ssoKey.charAt(0).toUpperCase() + ssoKey.slice(1)}</strong> configurations set at the
instance level.
</p>
<p>Are you sure you want to continue?</p>
<p data-cy="confirmation-text">Are you sure you want to continue?</p>
</div>
);
@ -29,14 +29,14 @@ function WorkspaceSSOEnableModal({ show, ssoKey, saveSettings, setShowModal, res
<ButtonSolid variant="tertiary" onClick={handleClose} data-cy="cancel-button">
Cancel
</ButtonSolid>
<ButtonSolid variant="primary" onClick={handleEnable}>
<ButtonSolid variant="primary" onClick={handleEnable} data-cy="enable-button">
Enable
</ButtonSolid>
</>
);
const ModalTitle = () => (
<strong style={{ fontWeight: 500, fontSize: 'medium' }}>
<strong style={{ fontWeight: 500, fontSize: 'medium' }} data-cy="modal-title">
Enable {ssoKey.charAt(0).toUpperCase() + ssoKey.slice(1)}
</strong>
);

View file

@ -1 +1 @@
2.32.2
2.32.3