Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into issue/6039-Submenu-…
Browse files Browse the repository at this point in the history
…items-are-trimmed-Safary-only
  • Loading branch information
novikov82 committed Nov 6, 2024
2 parents e8e7a1a + 81aea05 commit 54734de
Show file tree
Hide file tree
Showing 511 changed files with 1,624 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
<span *ngIf="adorner.isDraggable && adorner.canRenderControls"
class="svc-context-button svc-image-item-value-controls__drag-area-indicator"
(pointerdown)="adorner.onPointerDown($event)" [attr.title]="undefined" [attr.aria-label]="undefined">
<svg [iconName]="'icon-drag-area-indicator'" [size]="24" sv-ng-svg-icon></svg>
<svg [iconName]="'icon-drag-24x24'" [size]="24" sv-ng-svg-icon></svg>
</span>
<div *ngIf="adorner.canRenderControls" class="svc-context-container svc-image-item-value-controls">
<ng-container *ngIf="adorner.allowRemove && !adorner.isUploading">
<span class="svc-context-button" (click)="adorner.chooseFile(adorner)" [key2click] [attr.title]="undefined"
[attr.aria-label]="undefined">
<svg role="button" [iconName]="'icon-file'" [size]="24" [title]="adorner.selectFileTitle" sv-ng-svg-icon></svg>
<svg role="button" [iconName]="'icon-choosefile'" [size]="24" [title]="adorner.selectFileTitle" sv-ng-svg-icon></svg>
</span>
<span class="svc-context-button svc-context-button--danger" (click)="adorner.remove(adorner)" [key2click]
[attr.title]="undefined" [attr.aria-label]="undefined">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="svc-item-value__ghost"></div>
<div class="svc-item-value-controls">
<span *ngIf="adorner.isDraggable" class="svc-item-value-controls__button svc-item-value-controls__drag">
<svg class="svc-item-value-controls__drag-icon" [iconName]="'icon-drag-area-indicator'" [size]="24"
<svg class="svc-item-value-controls__drag-icon" [iconName]="'icon-drag-24x24'" [size]="24"
[attr.title]="adorner.dragTooltip" sv-ng-svg-icon></svg>
</span>
<span *ngIf="adorner.allowAdd" class="svc-item-value-controls__button svc-item-value-controls__add" [key2click]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<input type="file" aria-hidden="true" tabindex="-1" [accept]="adorner.acceptedTypes"
class="svc-choose-file-input" />
<span class="svc-context-button" [key2click] [attr.title]="undefined" [attr.aria-label]="undefined">
<svg [iconName]="'icon-file'" [size]="24" (click)="adorner.chooseFile(adorner)" sv-ng-svg-icon></svg>
<svg [iconName]="'icon-choosefile'" [size]="24" (click)="adorner.chooseFile(adorner)" sv-ng-svg-icon></svg>
</span>
</ng-container>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ng-container *ngIf="model.allowEdit && !model.isUploading">
<div class="svc-logo-image-placeholder" (click)="model.chooseFile(model)" [key2click]>
<svg>
<use xlink:href="#icon-logo"></use>
<use xlink:href="#icon-image-48x48"></use>
</svg>
</div>
</ng-container>
Expand All @@ -15,7 +15,7 @@
<div class="svc-context-container svc-logo-image-controls">
<span class="svc-context-button" (click)="model.chooseFile(model)" [key2click] [attr.title]="undefined"
[attr.aria-label]="undefined">
<svg [iconName]="'icon-file'" [size]="24" sv-ng-svg-icon></svg>
<svg [iconName]="'icon-choosefile'" [size]="24" sv-ng-svg-icon></svg>
</span>
<span class="svc-context-button svc-context-button--danger" (click)="model.remove(model)" [key2click]
[attr.title]="undefined" [attr.aria-label]="undefined">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ export class SurveyElementAdornerBase<T extends SurveyElement = SurveyElement> e
this.updateActionsProperties();
}
protected getExpandCollapseAction(): IAction {
const collapseIcon = "icon-collapse-detail-light_16x16";
const expandIcon = "icon-restore_16x16";
const collapseIcon = "icon-collapsepanel-16x16";
const expandIcon = "icon-expandpanel-16x16";
return {
id: "collapse",
css: "sv-action-bar-item--secondary sv-action-bar-item--collapse",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
}

svg {
width: calcSize(4);
height: calcSize(4);
width: calcSize(6);
height: calcSize(6);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ svc-tab-json-editor-textarea {
fill: $foreground-dim-light;
width: calcSize(3);
height: calcSize(3);
opacity: 0.75;
}
}

Expand Down
4 changes: 1 addition & 3 deletions packages/survey-creator-core/src/components/tabs/logic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@
.sl-table .sl-table__detail-button.sl-table__detail-button {
width: calcSize(6);
height: calcSize(6);

box-sizing: border-box;
border-radius: var(--ctr-collapse-button-corner-radius, calcSize(12.5));

padding: 0;
padding: calcSize(1.5);
transition: background-color $creator-transition-duration;

&:hover:enabled,
Expand Down
19 changes: 18 additions & 1 deletion packages/survey-creator-core/src/creator-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {
EventBase, hasLicense, slk, settings as SurveySettings, Event, Helpers as SurveyHelpers, MatrixDropdownColumn, JsonObject,
dxSurveyService, ISurveyElement, PanelModelBase, surveyLocalization, QuestionMatrixDropdownModelBase, ITheme, Helpers,
chooseFiles, createDropdownActionModel,
CssClassBuilder
CssClassBuilder,
SvgRegistry
} from "survey-core";
import { ICreatorPlugin, ISurveyCreatorOptions, settings, ICollectionItemAllowOperations } from "./creator-settings";
import { editorLocalization } from "./editorLocalization";
Expand Down Expand Up @@ -57,6 +58,7 @@ import designTabSurveyThemeJSON from "./designTabSurveyThemeJSON";
import { ICreatorTheme } from "./creator-theme/creator-themes";
import { SurveyElementAdornerBase } from "./components/action-container-view-model";
import { TabbedMenuContainer, TabbedMenuItem } from "./tabbed-menu";
import { svgBundle } from "./svgbundle";

require("./components/creator.scss");
require("./components/string-editor.scss");
Expand Down Expand Up @@ -1244,6 +1246,7 @@ export class SurveyCreatorModel extends Base
this.tabbedMenu.locOwner = this;
this.selectionHistoryControllerValue = new SelectionHistory(this);
this.sidebar = new SidebarModel(this);
this.registerIcons();
this.setOptions(this.options);
this.patchMetadata();
this.initSurveyWithJSON(undefined, false);
Expand Down Expand Up @@ -1561,6 +1564,20 @@ export class SurveyCreatorModel extends Base
public getOptions(): ICreatorOptions {
return this.options || {};
}
protected registerIcons() {
let path;
if (settings.useLegacyIcons) {
SurveySettings.useLegacyIcons = true;
path = svgBundle.V1;
} else {
SurveySettings.useLegacyIcons = false;
path = svgBundle.V2;
}

if (!path) return;

SvgRegistry.registerIconsFromFolder(path);
}
protected setOptions(options: ICreatorOptions): void {
if (!options) options = {};
const obsoleteOptions = {};
Expand Down
3 changes: 2 additions & 1 deletion packages/survey-creator-core/src/creator-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ export var settings = {
jsonEditor: {
indentation: 2,
exportFileName: "survey.json"
}
},
useLegacyIcons: true
};
export interface ICollectionItemAllowOperations {
allowDelete: boolean;
Expand Down
10 changes: 10 additions & 0 deletions packages/survey-creator-core/src/images-v1/add-16x16.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/add-24x24.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/apply-24x24.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/arrowup-24x24.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/camera-24x24.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/camera-32x32.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/cancel-24x24.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/check-16x16.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/check-24x24.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/clear-16x16.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/clear-24x24.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/close-16x16.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/close-24x24.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/collapse-16x16.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions packages/survey-creator-core/src/images-v1/collapse-24x24.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions packages/survey-creator-core/src/images-v1/copy-16x16.svg
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/copy-24x24.svg
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/cross-24x24.svg
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/delete-16x16.svg
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/delete-24x24.svg
3 changes: 3 additions & 0 deletions packages/survey-creator-core/src/images-v1/desktop-24x24.svg
Loading

0 comments on commit 54734de

Please sign in to comment.