Skip to content

Commit

Permalink
Merge branch 'master' into issue/6799-Change-design-for-questions-in-…
Browse files Browse the repository at this point in the history
…one-row-3
  • Loading branch information
novikov82 committed Aug 31, 2023
2 parents 2e77759 + f344b75 commit d2f177a
Show file tree
Hide file tree
Showing 150 changed files with 6,737 additions and 469 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.

## [1.9.105](https://github.com/surveyjs/survey-library/compare/v1.9.104...v1.9.105) (2023-08-30)

## [1.9.104](https://github.com/surveyjs/survey-library/compare/v1.9.103...v1.9.104) (2023-08-22)

## [1.9.103](https://github.com/surveyjs/survey-library/compare/v1.9.102...v1.9.103) (2023-08-15)
Expand Down
29 changes: 29 additions & 0 deletions devops-visual-regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ jobs:
steps:
- checkout: self

- task: PowerShell@2
displayName: 'update Google Chrome to latest'
inputs:
targetType: 'inline'
script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer'
- task: NodeTool@0
inputs:
versionSpec: '14.x'
Expand Down Expand Up @@ -76,6 +81,12 @@ jobs:
steps:
- checkout: self

- task: PowerShell@2
displayName: 'update Google Chrome to latest'
inputs:
targetType: 'inline'
script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer'

- task: NodeTool@0
inputs:
versionSpec: '14.x'
Expand Down Expand Up @@ -132,6 +143,12 @@ jobs:
steps:
- checkout: self

- task: PowerShell@2
displayName: 'update Google Chrome to latest'
inputs:
targetType: 'inline'
script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer'

- task: NodeTool@0
inputs:
versionSpec: '14.x'
Expand Down Expand Up @@ -189,6 +206,12 @@ jobs:
persistCredentials: true
clean: true

- task: PowerShell@2
displayName: 'update Google Chrome to latest'
inputs:
targetType: 'inline'
script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer'

- task: NodeTool@0
inputs:
versionSpec: "14.x"
Expand Down Expand Up @@ -269,6 +292,12 @@ jobs:
persistCredentials: true
clean: true

- task: PowerShell@2
displayName: 'update Google Chrome to latest'
inputs:
targetType: 'inline'
script: '$Path = $env:TEMP; $Installer = ''chrome_installer.exe''; Invoke-WebRequest -Uri ''http://dl.google.com/chrome/install/375.126/chrome_installer.exe'' -OutFile $Path\$Installer; Start-Process -FilePath $Path\$Installer -Args ''/silent /install'' -Verb RunAs -Wait; Remove-Item -Path $Path\$Installer'

- task: NodeTool@0
inputs:
versionSpec: "16.x"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"testcafe:ci:angular": "testcafe -c 4 -q attemptLimit=5,successThreshold=1 chrome:headless testCafe/ --app \"http-server ./packages/survey-angular-ui/example/dist --proxy http://localhost:8080? -p 8080\" --selector-timeout 1500 --reporter minimal --env=angular",
"prepare": "husky install"
},
"version": "1.9.104",
"version": "1.9.105",
"name": "survey-library",
"private": true,
"devDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/survey-angular-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.

## [1.9.105](https://github.com/surveyjs/surveyjs/compare/v1.9.104...v1.9.105) (2023-08-30)

## [1.9.104](https://github.com/surveyjs/surveyjs/compare/v1.9.103...v1.9.104) (2023-08-22)

## [1.9.103](https://github.com/surveyjs/surveyjs/compare/v1.9.102...v1.9.103) (2023-08-15)
Expand Down
2 changes: 1 addition & 1 deletion packages/survey-angular-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "survey-angular-ui",
"version": "1.9.104",
"version": "1.9.105",
"description": "survey.js is a JavaScript Survey Library. It is a modern way to add a survey to your website. It uses JSON for survey metadata and results.",
"keywords": [
"Survey",
Expand Down
2 changes: 1 addition & 1 deletion packages/survey-angular-ui/src/comment.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<textarea *ngIf="!question.isReadOnlyRenderDiv()" [id]="question.commentId" [attr.maxlength]="question.getOthersMaxLength()" [attr.aria-required]="question.ariaRequired" [attr.aria-label]="question.ariaLabel" [attr.placeholder]="question.commentPlaceholder"
<textarea *ngIf="!question.isReadOnlyRenderDiv()" [id]="question.commentId" [attr.maxlength]="question.getOthersMaxLength()" [attr.aria-required]="question.ariaRequired" [attr.aria-label]="question.ariaLabel" [attr.placeholder]="question.renderedCommentPlaceholder"
[value]="comment"
[style.resize]="question.resizeStyle"
[disabled]="question.isInputReadOnly"
Expand Down
2 changes: 2 additions & 0 deletions packages/survey-vue3-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.

## [1.9.105](https://github.com/surveyjs/survey-library/compare/v1.9.104...v1.9.105) (2023-08-30)

## [1.9.104](https://github.com/surveyjs/survey-library/compare/v1.9.103...v1.9.104) (2023-08-22)

## [1.9.103](https://github.com/surveyjs/survey-library/compare/v1.9.102...v1.9.103) (2023-08-15)
Expand Down
2 changes: 1 addition & 1 deletion packages/survey-vue3-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "survey-vue3-ui",
"version": "1.9.104",
"version": "1.9.105",
"scripts": {
"dev": "vite",
"preview": "vite preview",
Expand Down
2 changes: 1 addition & 1 deletion packages/survey-vue3-ui/src/QuestionComment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:class="question.cssClasses.other || commentClass"
:value="question.comment"
:maxlength="question.getOthersMaxLength()"
:placeholder="question.commentPlaceholder"
:placeholder="question.renderedCommentPlaceholder"
:aria-label="question.ariaLabel"
:aria-required="question.ariaRequired"
v-bind:style="{ resize: question.resizeStyle }"
Expand Down
23 changes: 17 additions & 6 deletions src/actions/adaptive-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,30 @@ export class AdaptiveActionContainer<T extends Action = Action> extends ActionCo
public isResponsivenessDisabled = false;

private hideItemsGreaterN(visibleItemsCount: number) {
const actionsToHide = this.visibleActions.filter(action => !action.disableHide);
const actionsToHide = this.getActionsToHide();
visibleItemsCount = Math.max(visibleItemsCount, this.minVisibleItemsCount - (this.visibleActions.length - actionsToHide.length));
const hiddenItems: IAction[] = [];
actionsToHide.forEach((item) => {
if (visibleItemsCount <= 0) {
item.mode = "popup";
hiddenItems.push(item.innerItem);
if(item.removePriority) {
item.mode = "removed";
} else {
item.mode = "popup";
hiddenItems.push(item.innerItem);
}
}
visibleItemsCount--;
});
this.hiddenItemsListModel.setItems(hiddenItems);
}

private getActionsToHide() {
return this.visibleActions.filter(action => !action.disableHide).sort((a, b) => a.removePriority || 0 - b.removePriority || 0);
}

private getVisibleItemsCount(availableSize: number): number {
this.visibleActions.filter((action) => action.disableHide).forEach(action => availableSize -= action.minDimension);
const itemsSizes: number[] = this.visibleActions.filter(action => !action.disableHide).map((item) => item.minDimension);
const itemsSizes: number[] = this.getActionsToHide().map((item) => item.minDimension);
let currSize: number = 0;
for (var i = 0; i < itemsSizes.length; i++) {
currSize += itemsSizes[i];
Expand Down Expand Up @@ -127,7 +135,7 @@ export class AdaptiveActionContainer<T extends Action = Action> extends ActionCo
} else if (dimension < minSize) {
this.setActionsMode("small");
this.hideItemsGreaterN(this.getVisibleItemsCount(dimension - dotsItemSize));
this.dotsItem.visible = true;
this.dotsItem.visible = !!this.hiddenItemsListModel.actions.length;
} else {
this.updateItemMode(dimension, maxSize);
}
Expand All @@ -145,7 +153,10 @@ export class AdaptiveActionContainer<T extends Action = Action> extends ActionCo
}
}
public setActionsMode(mode: actionModeType) {
this.actions.forEach((action) => (action.mode = mode));
this.actions.forEach((action) => {
if(mode == "small" && action.disableShrink) return;
action.mode = mode;
});
}
public dispose(): void {
super.dispose();
Expand Down
1 change: 1 addition & 0 deletions src/actions/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export let defaultActionBarCss = {
defaultSizeMode: "sv-action-bar--default-size-mode",
smallSizeMode: "sv-action-bar--small-size-mode",
item: "sv-action-bar-item",
itemAsIcon: "sv-action-bar-item--icon",
itemActive: "sv-action-bar-item--active",
itemPressed: "sv-action-bar-item--pressed",
itemIcon: "sv-action-bar-item__icon",
Expand Down
10 changes: 9 additions & 1 deletion src/base-interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export interface ISurveyElement extends IShortcutText {
getType(): string;
setVisibleIndex(value: number): number;
locStrsChanged(): any;
delete(): any;
delete(doDispose?: boolean): void;
toggleState(): void;
stateChangedCallback(): void;
getTitleToolbar(): AdaptiveActionContainer;
Expand Down Expand Up @@ -369,3 +369,11 @@ export interface ISurveyLayoutElement {
template?: string;
data?: any;
}
export interface IPlainDataOptions {
includeEmpty?: boolean;
includeQuestionTypes?: boolean;
includeValues?: boolean;
calculations?: Array<{
propertyName: string,
}>;
}
2 changes: 1 addition & 1 deletion src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ export class Base {
if (this.isPropertyEmpty(res)) {
const locStr = this.localizableStrings ? this.localizableStrings[name] : undefined;
if(locStr) return locStr.text;
if (defaultValue != null) return defaultValue;
if (defaultValue !== null && defaultValue !== undefined) return defaultValue;
const propDefaultValue = this.getDefaultPropertyValue(name);
if(propDefaultValue !== undefined) return propDefaultValue;
}
Expand Down
3 changes: 2 additions & 1 deletion src/choicesRestful.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ export class ChoicesRestful extends Base {
*/

public get path(): string {
return this.getPropertyValue("path", "");
const res = this.getPropertyValue("path");
return !!res ? res : "";
}
public set path(val: string) {
this.setPropertyValue("path", val);
Expand Down
21 changes: 16 additions & 5 deletions src/common-styles/sv-ranking.scss
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@
.sv-ranking__container--empty {
padding-top: calcSize(1);
padding-bottom: calcSize(1);
display: flex;
justify-content: center;
align-items: center;
}
}

Expand All @@ -243,15 +246,23 @@

.sv-ranking__container--empty {
&.sv-ranking__container--to {
padding-right: calcSize(3);
//padding-right: calcSize(3);

.sv-ranking-item {
left: initial;
}

.sv-ranking__container-placeholder {
padding-left: calcSize(5);
}
}

&.sv-ranking__container--from {
padding-left: calcSize(3);
//padding-left: calcSize(3);

.sv-ranking__container-placeholder {
padding-right: calcSize(5);
}
}
}
}
Expand All @@ -263,17 +274,17 @@
display: flex;
justify-content: center;
align-items: center;
width: 100%;
//width: 100%;
height: 100%;
}

.sv-ranking__container {
flex: 1;
max-width: 100%;
//max-width: 100%;
}

.sv-ranking__container--empty {
padding: calcSize(8);
//padding: calcSize(8);
box-sizing: border-box;
text-align: center;
}
Expand Down
1 change: 1 addition & 0 deletions src/defaultCss/defaultV2Css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export var defaultV2Css = {
rootMobile: "sd-root-modern--mobile",
rootReadOnly: "sd-root--readonly",
rootCompact: "sd-root--compact",
rootFitToContainer: "sd-root-modern--full-container",
rootBackgroundImage: "sd-root_background-image",
container: "sd-container-modern",
header: "sd-title sd-container-modern__title",
Expand Down
68 changes: 67 additions & 1 deletion src/defaultV2-theme/blocks/sd-completedpage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,74 @@
text-align: center;
height: auto;

// h3 {
// font-size: calcFontSize(1.5);
// }

h1 {
@include articleXXLargeFont;
}

h2 {
@include articleXLargeFont;
}

h3 {
font-size: calcFontSize(1.5);
@include articleLargeFont;
}

h4 {
@include articleMediumFont;
}

h5,
h6 {
color: $foreground;
}

span,
div,
p {
@include articleDefaultFont;
}

a {
color: $primary;
}

button {
display: flex;
align-items: center;
padding: calcSize(1.5) calcSize(4);
vertical-align: baseline;
text-align: center;
background-color: $background;
box-shadow: $shadow-small;
border: none;
border-radius: calcSize(0.5);
cursor: pointer;
user-select: none;
outline: solid calcSize(0.25) transparent;

&:hover {
background-color: $background-dark;
}
&:focus {
box-shadow: 0 0 0 2px $primary;
}

span {
display: flex;
align-items: center;
flex-grow: 1;
justify-content: center;
color: $primary;
font-weight: 600;
font-style: normal;
font-family: var(--font-family, $font-family);
font-size: $font-questiontitle-size;
line-height: multiply(1.5, $font-questiontitle-size);
}
}
}

Expand Down
Loading

0 comments on commit d2f177a

Please sign in to comment.