v10: npm updates for april (#12288)
* Upgraded MailKit * Upgraded Microsoft.* packages * Upgrades various nuget packages to latest version * Upgrades various nuget packages related to test * update package-lock.json to new npm format * bump all angular dependencies to latest 1.8.3 * bump jquery to 3.6.0 * remove dubious 'npm' dependency and set engines versions to avoid warnings * bump signalr dependency from v3 to v6 * bump 'underscore' from 1.12.1 to 1.13.1 * bump 'diff' from 3.5.0 to 5.0.0 * bump 'clipboard' from 2.0.4 to 2.0.10 * bump 'flatpickr' from 4.6.9 to 4.6.13 * bump 'moment' from 2.22.2 to 2.29.3 * bump 'spectrum-colorpicker2' from 2.0.8 to 2.0.9 * bump 'underscore' from 1.13.1 to 1.13.2 * update 'less' 'autoprefixer' 'cssnano' and accompanying gulp tasks to latest * bump all gulp dependencies except gulp-imagemin since we do not yet support esmodules in the backoffice client * remove 'fs' since the package is marked as malicious and do not seem to be used * update AcceptanceTests lockfile to latest npm + dependency updates * bump '@babel/core' from 7.17.5 to 7.17.9 * bump karma dependencies to latest * bump 'animejs' from 2.2.0 to 3.2.1 * bump 'jasmine-core' from 3.5.0 to 4.1.0 * remove deduped 'caniuse-lite' * bump wicg-inert from ^3.0.2 to 3.1.1 * bump 'nouislider' from 15.5.0 to 15.5.1 * add slight delay for confirmation overlay * ignore postinstall task for acceptance tests since env file is generated manually * upgrade cypress to 9.5.4 * add wait step to content.ts tests * Revert "ignore postinstall task for acceptance tests since env file is generated manually" This reverts commit 61acebfda2502499480f31d8450c889d4c5c6f11. * increate wait amount of content rollback tests * Revert "upgrade cypress to 9.5.4" This reverts commit 2febf139a41938ae005754abd958fdec1f598991. * Revert "update AcceptanceTests lockfile to latest npm + dependency updates" This reverts commit b45d20b3cdcae6b17d4024c7085c5e6a3e3e2a83. * update lockfile version * update umbraco-cypress-testhelpers to latest Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
22568
src/Umbraco.Web.UI.Client/package-lock.json
generated
22568
src/Umbraco.Web.UI.Client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -13,81 +13,80 @@
|
||||
"watch": "gulp watch"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.00.0"
|
||||
"node": ">=14.0.0 <17",
|
||||
"npm": ">=8.0.0 < 9"
|
||||
},
|
||||
"dependencies": {
|
||||
"@microsoft/signalr": "^3.1.8",
|
||||
"@microsoft/signalr": "6.0.4",
|
||||
"ace-builds": "1.4.2",
|
||||
"angular": "1.8.0",
|
||||
"angular-animate": "1.7.5",
|
||||
"angular-aria": "1.7.9",
|
||||
"angular-chart.js": "^1.1.1",
|
||||
"angular-cookies": "1.7.5",
|
||||
"angular-dynamic-locale": "0.1.37",
|
||||
"angular-i18n": "1.7.5",
|
||||
"angular": "1.8.3",
|
||||
"angular-animate": "1.8.3",
|
||||
"angular-aria": "1.8.3",
|
||||
"angular-chart.js": "1.1.1",
|
||||
"angular-cookies": "1.8.3",
|
||||
"angular-dynamic-locale": "0.1.38",
|
||||
"angular-i18n": "1.8.3",
|
||||
"angular-local-storage": "0.7.1",
|
||||
"angular-messages": "1.7.5",
|
||||
"angular-mocks": "1.7.5",
|
||||
"angular-route": "1.7.5",
|
||||
"angular-sanitize": "1.7.5",
|
||||
"angular-touch": "1.7.5",
|
||||
"angular-messages": "1.8.3",
|
||||
"angular-mocks": "1.8.3",
|
||||
"angular-route": "1.8.3",
|
||||
"angular-sanitize": "1.8.3",
|
||||
"angular-touch": "1.8.3",
|
||||
"angular-ui-sortable": "0.19.0",
|
||||
"animejs": "2.2.0",
|
||||
"animejs": "3.2.1",
|
||||
"bootstrap-social": "5.1.1",
|
||||
"chart.js": "^2.9.3",
|
||||
"clipboard": "2.0.4",
|
||||
"diff": "3.5.0",
|
||||
"flatpickr": "4.6.9",
|
||||
"clipboard": "2.0.10",
|
||||
"diff": "5.0.0",
|
||||
"flatpickr": "4.6.13",
|
||||
"font-awesome": "4.7.0",
|
||||
"jquery": "^3.5.1",
|
||||
"jquery-ui-dist": "1.12.1",
|
||||
"jquery": "3.6.0",
|
||||
"jquery-ui-dist": "1.13.1",
|
||||
"jquery-ui-touch-punch": "0.2.3",
|
||||
"lazyload-js": "1.0.0",
|
||||
"moment": "2.22.2",
|
||||
"moment": "2.29.3",
|
||||
"ng-file-upload": "12.2.13",
|
||||
"nouislider": "15.5.0",
|
||||
"npm": "^6.14.7",
|
||||
"spectrum-colorpicker2": "2.0.8",
|
||||
"nouislider": "15.5.1",
|
||||
"spectrum-colorpicker2": "2.0.9",
|
||||
"tinymce": "4.9.11",
|
||||
"typeahead.js": "0.11.1",
|
||||
"underscore": "1.12.1",
|
||||
"wicg-inert": "^3.0.2"
|
||||
"underscore": "1.13.2",
|
||||
"wicg-inert": "3.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.17.5",
|
||||
"@babel/core": "7.17.9",
|
||||
"@babel/preset-env": "7.16.11",
|
||||
"autoprefixer": "9.6.5",
|
||||
"caniuse-lite": "^1.0.30001312",
|
||||
"cssnano": "4.1.10",
|
||||
"fs": "0.0.2",
|
||||
"autoprefixer": "10.4.4",
|
||||
"cssnano": "5.1.7",
|
||||
"gulp": "4.0.2",
|
||||
"gulp-angular-embed-templates": "^2.3.0",
|
||||
"gulp-angular-embed-templates": "2.3.0",
|
||||
"gulp-babel": "8.0.0",
|
||||
"gulp-clean-css": "4.2.0",
|
||||
"gulp-cli": "^2.3.0",
|
||||
"gulp-clean-css": "4.3.0",
|
||||
"gulp-cli": "2.3.0",
|
||||
"gulp-concat": "2.6.1",
|
||||
"gulp-eslint": "6.0.0",
|
||||
"gulp-imagemin": "7.1.0",
|
||||
"gulp-less": "4.0.1",
|
||||
"gulp-less": "5.0.0",
|
||||
"gulp-minify": "3.1.0",
|
||||
"gulp-notify": "^3.0.0",
|
||||
"gulp-postcss": "8.0.0",
|
||||
"gulp-rename": "1.4.0",
|
||||
"gulp-notify": "4.0.0",
|
||||
"gulp-postcss": "9.0.1",
|
||||
"gulp-rename": "2.0.0",
|
||||
"gulp-sort": "2.0.0",
|
||||
"gulp-sourcemaps": "^2.6.5",
|
||||
"gulp-sourcemaps": "3.0.0",
|
||||
"gulp-watch": "5.0.1",
|
||||
"gulp-wrap": "0.15.0",
|
||||
"gulp-wrap-js": "0.4.1",
|
||||
"jasmine-core": "3.5.0",
|
||||
"jsdom": "16.4.0",
|
||||
"karma": "6.3.16",
|
||||
"karma-jasmine": "2.0.1",
|
||||
"karma-jsdom-launcher": "^8.0.2",
|
||||
"jasmine-core": "4.1.0",
|
||||
"jsdom": "19.0.0",
|
||||
"karma": "6.3.19",
|
||||
"karma-jasmine": "5.0.0",
|
||||
"karma-jsdom-launcher": "12.0.0",
|
||||
"karma-junit-reporter": "2.0.1",
|
||||
"karma-spec-reporter": "0.0.32",
|
||||
"less": "3.10.3",
|
||||
"karma-spec-reporter": "0.0.34",
|
||||
"less": "4.1.2",
|
||||
"lodash": "4.17.21",
|
||||
"merge-stream": "2.0.0",
|
||||
"postcss": "8.4.12",
|
||||
"run-sequence": "2.2.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,333 +9,333 @@
|
||||
|
||||
// Grays
|
||||
// -------------------------
|
||||
@black: #000;
|
||||
@blackLight: #1D1D1D;
|
||||
@grayDarker: #222;
|
||||
@grayDark: #343434;
|
||||
@gray: #555;
|
||||
@grayMed: #7F7F7F;
|
||||
@blueGrey: #607D8B;
|
||||
@grayLight: #D9D9D9;
|
||||
@grayLighter: #F8F8F8;
|
||||
@white: #FFF;
|
||||
@grayIcon: #9E9E9E;
|
||||
@black: #000;
|
||||
@blackLight: #1D1D1D;
|
||||
@grayDarker: #222;
|
||||
@grayDark: #343434;
|
||||
@gray: #555;
|
||||
@grayMed: #7F7F7F;
|
||||
@blueGrey: #607D8B;
|
||||
@grayLight: #D9D9D9;
|
||||
@grayLighter: #F8F8F8;
|
||||
@white: #FFF;
|
||||
@grayIcon: #9E9E9E;
|
||||
|
||||
|
||||
// Colors
|
||||
// -------------------------
|
||||
|
||||
@turquoise-d1: #00AEA2;
|
||||
@turquoise: #03BFB3;
|
||||
@turquoise-l1: #42CFC5;
|
||||
@turquoise-l2: #81DED8;
|
||||
@turquoise-l3: #C0F0ED;
|
||||
@turquoise-washed: #F3FDFC;
|
||||
@turquoise-d1: #00AEA2;
|
||||
@turquoise: #03BFB3;
|
||||
@turquoise-l1: #42CFC5;
|
||||
@turquoise-l2: #81DED8;
|
||||
@turquoise-l3: #C0F0ED;
|
||||
@turquoise-washed: #F3FDFC;
|
||||
|
||||
@purple-d2: #1D1333;
|
||||
@purple-d1: #2E2246;
|
||||
@purple: #413659;
|
||||
@purple-l1: #675E7A;
|
||||
@purple-l2: #8D869B;
|
||||
@purple-l3: #B3AFBD;
|
||||
@purple-washed: #F6F3FD;
|
||||
@purple-d2: #1D1333;
|
||||
@purple-d1: #2E2246;
|
||||
@purple: #413659;
|
||||
@purple-l1: #675E7A;
|
||||
@purple-l2: #8D869B;
|
||||
@purple-l3: #B3AFBD;
|
||||
@purple-washed: #F6F3FD;
|
||||
|
||||
// UI Colors
|
||||
@red-d1: #F02E28;
|
||||
@red: #D42054;// updated 2019
|
||||
@red-l1: #e22c60;// updated 2019
|
||||
@red-l2: #FE8B88;
|
||||
@red-l3: #FFB2B0;
|
||||
@red-washed: #FFECEB;
|
||||
@red-d1: #F02E28;
|
||||
@red: #D42054; // updated 2019
|
||||
@red-l1: #e22c60; // updated 2019
|
||||
@red-l2: #FE8B88;
|
||||
@red-l3: #FFB2B0;
|
||||
@red-washed: #FFECEB;
|
||||
|
||||
@yellow-d2: #F0AC00;
|
||||
@yellow-d1: #FFC011;
|
||||
@yellow: #fad634;// updated 2019
|
||||
@yellow-l1: #FFD861;
|
||||
@yellow-l2: #FFE28A;
|
||||
@yellow-l3: #FFECB0;
|
||||
@yellow-washed: #FFFAEB;
|
||||
@yellow-d2: #F0AC00;
|
||||
@yellow-d1: #FFC011;
|
||||
@yellow: #fad634; // updated 2019
|
||||
@yellow-l1: #FFD861;
|
||||
@yellow-l2: #FFE28A;
|
||||
@yellow-l3: #FFECB0;
|
||||
@yellow-washed: #FFFAEB;
|
||||
|
||||
@green-d1: #1FB572;
|
||||
@green: #2bc37c;// updated 2019
|
||||
@green-l1: #4ECF95;
|
||||
@green-l2: #79E1B2;
|
||||
@green-l3: #A6F0CF;
|
||||
@green-washed: #EBFFF6;
|
||||
@green-d1: #1FB572;
|
||||
@green: #2bc37c; // updated 2019
|
||||
@green-l1: #4ECF95;
|
||||
@green-l2: #79E1B2;
|
||||
@green-l3: #A6F0CF;
|
||||
@green-washed: #EBFFF6;
|
||||
|
||||
// Grayscale
|
||||
@gray-1: #1E1C1C;
|
||||
@gray-2: #303033;
|
||||
@gray-3: #515054;
|
||||
@gray-4: #68676B;
|
||||
@gray-5: #817F85;
|
||||
@gray-6: #A2A1A6;
|
||||
@gray-7: #BBBABF;
|
||||
@gray-8: #D8D7D9;
|
||||
@gray-9: #E9E9EB;
|
||||
@gray-10: #F3F3F5;
|
||||
@gray-11: #F6F6F7;
|
||||
@gray-12: #F9F9FA;
|
||||
@gray-13: #FBFBFD;
|
||||
@gray-1: #1E1C1C;
|
||||
@gray-2: #303033;
|
||||
@gray-3: #515054;
|
||||
@gray-4: #68676B;
|
||||
@gray-5: #817F85;
|
||||
@gray-6: #A2A1A6;
|
||||
@gray-7: #BBBABF;
|
||||
@gray-8: #D8D7D9;
|
||||
@gray-9: #E9E9EB;
|
||||
@gray-10: #F3F3F5;
|
||||
@gray-11: #F6F6F7;
|
||||
@gray-12: #F9F9FA;
|
||||
@gray-13: #FBFBFD;
|
||||
|
||||
@sand-1: #DED4CF;// added 2019
|
||||
@sand-2: #EBDED6;// added 2019
|
||||
@sand-5: #F3ECE8;// added 2019
|
||||
@sand-6: #F6F1EF;// added 2019
|
||||
@sand-7: #F9F7F5;// added 2019
|
||||
@sand-8: #fbfaf9;// added 2019
|
||||
@sand-9: #fdfcfc;// added 2019
|
||||
@sand-1: #DED4CF; // added 2019
|
||||
@sand-2: #EBDED6; // added 2019
|
||||
@sand-5: #F3ECE8; // added 2019
|
||||
@sand-6: #F6F1EF; // added 2019
|
||||
@sand-7: #F9F7F5; // added 2019
|
||||
@sand-8: #fbfaf9; // added 2019
|
||||
@sand-9: #fdfcfc; // added 2019
|
||||
|
||||
|
||||
// Additional Icon Colours
|
||||
@brownIcon: #795548;
|
||||
@blueIcon: #2196F3;
|
||||
@lightBlueIcon: #03A9F4;
|
||||
@cyanIcon: #00BCD4;
|
||||
@greenIcon: #4CAF50;
|
||||
@lightGreenIcon: #8BC34A;
|
||||
@limeIcon: #CDDC39;
|
||||
@yellowIcon: #FFEB3B;
|
||||
@amberIcon: #FFC107;
|
||||
@orangeIcon: #FF9800;
|
||||
@deepOrangeIcon: #FF5722;
|
||||
@redIcon: #F44336;
|
||||
@pinkIcon: #E91E63;
|
||||
@purpleIcon: #9C27B0;
|
||||
@deepPurpleIcon: #673AB7;
|
||||
@indigoIcon: #3F51B5;
|
||||
@brownIcon: #795548;
|
||||
@blueIcon: #2196F3;
|
||||
@lightBlueIcon: #03A9F4;
|
||||
@cyanIcon: #00BCD4;
|
||||
@greenIcon: #4CAF50;
|
||||
@lightGreenIcon: #8BC34A;
|
||||
@limeIcon: #CDDC39;
|
||||
@yellowIcon: #FFEB3B;
|
||||
@amberIcon: #FFC107;
|
||||
@orangeIcon: #FF9800;
|
||||
@deepOrangeIcon: #FF5722;
|
||||
@redIcon: #F44336;
|
||||
@pinkIcon: #E91E63;
|
||||
@purpleIcon: #9C27B0;
|
||||
@deepPurpleIcon: #673AB7;
|
||||
@indigoIcon: #3F51B5;
|
||||
|
||||
|
||||
// Brand colors
|
||||
// -------------------------
|
||||
|
||||
//@blueLight: #4f89de;
|
||||
@blue: #2E8AEA;
|
||||
@blueMid: #2152A3;// updated 2019
|
||||
@blueMidLight: #6ab4f0;
|
||||
@blueDark: #3544b1;// updated 2019
|
||||
@blueExtraDark: #1b264f;// added 2019
|
||||
@blueLight: #ADD8E6;
|
||||
@blueNight: #162335;// added 2019
|
||||
@blue: #2E8AEA;
|
||||
@blueMid: #2152A3; // updated 2019
|
||||
@blueMidLight: #6ab4f0;
|
||||
@blueDark: #3544b1; // updated 2019
|
||||
@blueExtraDark: #1b264f; // added 2019
|
||||
@blueLight: #ADD8E6;
|
||||
@blueNight: #162335; // added 2019
|
||||
//@orange: #f79c37;// updated 2019
|
||||
@pink: #D93F4C;// #C3325F;// update 2019
|
||||
@pinkLight: #f5c1bc;// added 2019
|
||||
@pinkExtraLight: #fee4e1;// added 2020
|
||||
@pinkRedLight: #ff8a89;// added 2019
|
||||
@brown: #9d8057;// added 2019
|
||||
@brownLight: #e4e0dd;// added 2019
|
||||
@brownGrayLight: #f6f4f4;// added 2019
|
||||
@brownGrayExtraLight: #faf9f9;// added 2019
|
||||
@orange: #ff9412;// added 2019
|
||||
@pink: #D93F4C; // #C3325F;// update 2019
|
||||
@pinkLight: #f5c1bc; // added 2019
|
||||
@pinkExtraLight: #fee4e1; // added 2020
|
||||
@pinkRedLight: #ff8a89; // added 2019
|
||||
@brown: #9d8057; // added 2019
|
||||
@brownLight: #e4e0dd; // added 2019
|
||||
@brownGrayLight: #f6f4f4; // added 2019
|
||||
@brownGrayExtraLight: #faf9f9; // added 2019
|
||||
@orange: #ff9412; // added 2019
|
||||
|
||||
//@u-greyLight: #f2ebe6;// added 2019
|
||||
@u-white: #f9f7f4;// added 2019
|
||||
@u-black: @black;// added 2019
|
||||
@u-white: #f9f7f4; // added 2019
|
||||
@u-black: @black; // added 2019
|
||||
|
||||
|
||||
// UI colors
|
||||
// -------------------------
|
||||
|
||||
@ui-option-type: @blueExtraDark;
|
||||
@ui-option-type-hover: @blueMid;
|
||||
@ui-option: @white;
|
||||
@ui-option-hover: @gray-12;
|
||||
@ui-option-type: @blueExtraDark;
|
||||
@ui-option-type-hover: @blueMid;
|
||||
@ui-option: @white;
|
||||
@ui-option-hover: @gray-12;
|
||||
|
||||
@ui-option-disabled-type: @gray-6;
|
||||
@ui-option-disabled-type-hover: @gray-5;
|
||||
@ui-option-disabled-hover: @gray-12;
|
||||
@ui-option-disabled-type: @gray-6;
|
||||
@ui-option-disabled-type-hover: @gray-5;
|
||||
@ui-option-disabled-hover: @gray-12;
|
||||
|
||||
@ui-disabled-type: @gray-6;
|
||||
@ui-disabled-border: @gray-6;
|
||||
@ui-disabled-type: @gray-6;
|
||||
@ui-disabled-border: @gray-6;
|
||||
|
||||
//@ui-active: #346ab3;
|
||||
@ui-active: @pinkExtraLight;
|
||||
@ui-active-border: @pinkLight;
|
||||
@ui-active-blur: @brownLight;
|
||||
@ui-active-type: @blueExtraDark;
|
||||
@ui-active-type-hover: @blueMid;
|
||||
@ui-active: @pinkExtraLight;
|
||||
@ui-active-border: @pinkLight;
|
||||
@ui-active-blur: @brownLight;
|
||||
@ui-active-type: @blueExtraDark;
|
||||
@ui-active-type-hover: @blueMid;
|
||||
|
||||
@ui-selected: @sand-5;
|
||||
@ui-selected-hover: ligthen(@sand-5, 10%);
|
||||
@ui-selected-type: @blueExtraDark;
|
||||
@ui-selected-type-hover: @blueMid;
|
||||
@ui-selected-border: @blueDark;
|
||||
@ui-selected-border-hover: darken(@blueDark, 10%);
|
||||
@ui-selected: @sand-5;
|
||||
@ui-selected-hover: ligthen(@sand-5, 10%);
|
||||
@ui-selected-type: @blueExtraDark;
|
||||
@ui-selected-type-hover: @blueMid;
|
||||
@ui-selected-border: @blueDark;
|
||||
@ui-selected-border-hover: darken(@blueDark, 10%);
|
||||
|
||||
@ui-light-border: @pinkLight;
|
||||
@ui-light-type: @gray-3;
|
||||
@ui-light-type-hover: @blueMid;
|
||||
@ui-light-border: @pinkLight;
|
||||
@ui-light-type: @gray-3;
|
||||
@ui-light-type-hover: @blueMid;
|
||||
|
||||
@ui-light-active-border: @pinkLight;
|
||||
@ui-light-active-type: @blueMid;
|
||||
@ui-light-active-type-hover: @blueMidLight;
|
||||
@ui-light-active-border: @pinkLight;
|
||||
@ui-light-active-type: @blueMid;
|
||||
@ui-light-active-type-hover: @blueMidLight;
|
||||
|
||||
|
||||
@ui-action: @white;
|
||||
@ui-action-hover: @gray-12;
|
||||
@ui-action-type: @blueExtraDark;
|
||||
@ui-action-type-hover: @blueMid;
|
||||
@ui-action-border: @blueExtraDark;
|
||||
@ui-action-border-hover: @blueMid;
|
||||
@ui-action: @white;
|
||||
@ui-action-hover: @gray-12;
|
||||
@ui-action-type: @blueExtraDark;
|
||||
@ui-action-type-hover: @blueMid;
|
||||
@ui-action-border: @blueExtraDark;
|
||||
@ui-action-border-hover: @blueMid;
|
||||
|
||||
@ui-action-discreet: @white;
|
||||
@ui-action-discreet-hover: @gray-12;
|
||||
@ui-action-discreet-type: @blueExtraDark;
|
||||
@ui-action-discreet-type-hover: @blueMid;
|
||||
@ui-action-discreet-border: @gray-7;
|
||||
@ui-action-discreet-border-hover: @blueMid;
|
||||
@ui-action-discreet: @white;
|
||||
@ui-action-discreet-hover: @gray-12;
|
||||
@ui-action-discreet-type: @blueExtraDark;
|
||||
@ui-action-discreet-type-hover: @blueMid;
|
||||
@ui-action-discreet-border: @gray-7;
|
||||
@ui-action-discreet-border-hover: @blueMid;
|
||||
|
||||
@ui-outline: @blueMidLight;
|
||||
@ui-outline: @blueMidLight;
|
||||
|
||||
@type-white: @white;
|
||||
@type-black: @blueNight;
|
||||
@type-white: @white;
|
||||
@type-black: @blueNight;
|
||||
|
||||
@ui-btn: @blueExtraDark;
|
||||
@ui-btn-hover: @blueMid;
|
||||
@ui-btn-type: @white;
|
||||
@ui-btn: @blueExtraDark;
|
||||
@ui-btn-hover: @blueMid;
|
||||
@ui-btn-type: @white;
|
||||
|
||||
@ui-btn-positive: @green;
|
||||
@ui-btn-positive-hover: lighten(@green, 6%);
|
||||
@ui-btn-positive-type: @white;
|
||||
@ui-btn-positive: @green;
|
||||
@ui-btn-positive-hover: lighten(@green, 6%);
|
||||
@ui-btn-positive-type: @white;
|
||||
|
||||
@ui-btn-negative: @red;
|
||||
@ui-btn-negative-type: @white;
|
||||
@ui-btn-negative-hover: @red;
|
||||
@ui-btn-negative: @red;
|
||||
@ui-btn-negative-type: @white;
|
||||
@ui-btn-negative-hover: @red;
|
||||
|
||||
@ui-icon: @blueNight;
|
||||
@ui-icon-hover: @blueMid;
|
||||
@ui-icon: @blueNight;
|
||||
@ui-icon-hover: @blueMid;
|
||||
|
||||
@ui-drop-area-color: @blueMidLight;
|
||||
|
||||
|
||||
// Scaffolding
|
||||
// -------------------------
|
||||
@appHeaderHeight: 55px;
|
||||
@bodyBackground: @gray-10;
|
||||
@textColor: @black;
|
||||
@appHeaderHeight: 55px;
|
||||
@bodyBackground: @gray-10;
|
||||
@textColor: @black;
|
||||
|
||||
@editorHeaderHeight: 70px;
|
||||
@editorFooterHeight: 50px;
|
||||
@editorHeaderHeight: 70px;
|
||||
@editorFooterHeight: 50px;
|
||||
|
||||
|
||||
// Links
|
||||
// -------------------------
|
||||
@linkColor: @black;
|
||||
@linkColorHover: darken(@linkColor, 15%);
|
||||
@linkColor: @black;
|
||||
@linkColorHover: darken(@linkColor, 15%);
|
||||
|
||||
// Typography
|
||||
// -------------------------
|
||||
@sansFontFamily: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
@serifFontFamily: Georgia, "Times New Roman", Times, serif;
|
||||
@monoFontFamily: Monaco, Menlo, Consolas, "Courier New", monospace;
|
||||
@sansFontFamily: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
@serifFontFamily: Georgia, "Times New Roman", Times, serif;
|
||||
@monoFontFamily: Monaco, Menlo, Consolas, "Courier New", monospace;
|
||||
|
||||
@baseFontSize: 15px;
|
||||
@baseFontFamily: @sansFontFamily;
|
||||
@baseLineHeight: 20px;
|
||||
@altFontFamily: @serifFontFamily;
|
||||
@baseFontSize: 15px;
|
||||
@baseFontFamily: @sansFontFamily;
|
||||
@baseLineHeight: 20px;
|
||||
@altFontFamily: @serifFontFamily;
|
||||
|
||||
@headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily
|
||||
@headingsFontWeight: 500; // instead of browser default, bold
|
||||
@headingsColor: inherit; // empty to use BS default, @textColor
|
||||
@headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily
|
||||
@headingsFontWeight: 500; // instead of browser default, bold
|
||||
@headingsColor: inherit; // empty to use BS default, @textColor
|
||||
|
||||
|
||||
// Component sizing
|
||||
// -------------------------
|
||||
// Based on 14px font-size and 20px line-height
|
||||
|
||||
@fontSizeLarge: @baseFontSize * 1.25; // ~18px
|
||||
@fontSizeMedium: @baseFontSize * 1.15; // ~14px
|
||||
@fontSizeSmall: @baseFontSize * 0.85; // ~12px
|
||||
@fontSizeMini: @baseFontSize * 0.75; // ~11px
|
||||
@fontSizeLarge: @baseFontSize * 1.25; // ~18px
|
||||
@fontSizeMedium: @baseFontSize * 1.15; // ~14px
|
||||
@fontSizeSmall: @baseFontSize * 0.85; // ~12px
|
||||
@fontSizeMini: @baseFontSize * 0.75; // ~11px
|
||||
|
||||
@paddingLarge: 11px 19px; // 44px
|
||||
@paddingSmall: 2px 10px; // 26px
|
||||
@paddingMini: 0 6px; // 22px
|
||||
@paddingLarge: 11px 19px; // 44px
|
||||
@paddingSmall: 2px 10px; // 26px
|
||||
@paddingMini: 0 6px; // 22px
|
||||
|
||||
@propertyEditorLimitedWidth: 800px;
|
||||
|
||||
// Disabled this to keep consistency throughout the backoffice UI. Untill a better solution is thought up, this will do.
|
||||
@baseBorderRadius: 3px; // 2px;
|
||||
@doubleBorderRadius: 6px;
|
||||
@borderRadiusLarge: 3px; // 6px;
|
||||
@borderRadiusSmall: 3px; // 3px;
|
||||
@baseBorderRadius: 3px; // 2px;
|
||||
@doubleBorderRadius: 6px;
|
||||
@borderRadiusLarge: 3px; // 6px;
|
||||
@borderRadiusSmall: 3px; // 3px;
|
||||
|
||||
|
||||
// Tables
|
||||
// -------------------------
|
||||
@tableBackground: @white; // overall background-color
|
||||
@tableBackgroundAccent: @gray-10; // for striping
|
||||
@tableBackgroundHover: @gray-10; // for hover
|
||||
@tableBorder: @gray-9; // table and cell border
|
||||
@tableBackground: @white; // overall background-color
|
||||
@tableBackgroundAccent: @gray-10; // for striping
|
||||
@tableBackgroundHover: @gray-10; // for hover
|
||||
@tableBorder: @gray-9; // table and cell border
|
||||
|
||||
// Buttons
|
||||
// -------------------------
|
||||
@btnBackground: @gray-9;
|
||||
@btnBackgroundHighlight: @gray-10;
|
||||
@btnBorder: @gray-9;
|
||||
@btnBackground: @gray-9;
|
||||
@btnBackgroundHighlight: @gray-10;
|
||||
@btnBorder: @gray-9;
|
||||
|
||||
@btnPrimaryBackground: @ui-btn;
|
||||
@btnPrimaryBackgroundHighlight: @ui-btn-hover;
|
||||
@btnPrimaryBackground: @ui-btn;
|
||||
@btnPrimaryBackgroundHighlight: @ui-btn-hover;
|
||||
|
||||
@btnInfoType: @ui-btn-type;// updated 2019
|
||||
@btnInfoTypeHover: @ui-btn-type;// updated 2019
|
||||
@btnInfoBackground: @ui-btn;// updated 2019
|
||||
@btnInfoBackgroundHighlight: @ui-btn-hover;// updated 2019
|
||||
@btnInfoType: @ui-btn-type; // updated 2019
|
||||
@btnInfoTypeHover: @ui-btn-type; // updated 2019
|
||||
@btnInfoBackground: @ui-btn; // updated 2019
|
||||
@btnInfoBackgroundHighlight: @ui-btn-hover; // updated 2019
|
||||
|
||||
@btnWhiteType: @blueExtraDark;// updated 2019
|
||||
@btnWhiteTypeHover: @ui-action-type-hover;// updated 2019
|
||||
@btnWhiteBackground: @white;// updated 2019
|
||||
@btnWhiteBackgroundHighlight: @white;// updated 2019
|
||||
@btnWhiteType: @blueExtraDark; // updated 2019
|
||||
@btnWhiteTypeHover: @ui-action-type-hover; // updated 2019
|
||||
@btnWhiteBackground: @white; // updated 2019
|
||||
@btnWhiteBackgroundHighlight: @white; // updated 2019
|
||||
|
||||
@btnSuccessType: @ui-btn-positive-type;// updated 2019
|
||||
@btnSuccessBackground: @ui-btn-positive;// updated 2019
|
||||
@btnSuccessBackgroundHighlight: @ui-btn-positive-hover;// updated 2019
|
||||
@btnSuccessType: @ui-btn-positive-type; // updated 2019
|
||||
@btnSuccessBackground: @ui-btn-positive; // updated 2019
|
||||
@btnSuccessBackgroundHighlight: @ui-btn-positive-hover; // updated 2019
|
||||
|
||||
@btnWarningBackground: @yellow-d2;
|
||||
@btnWarningBackgroundHighlight: lighten(@yellow-d2, 10%);
|
||||
@btnWarningBackground: @yellow-d2;
|
||||
@btnWarningBackgroundHighlight: lighten(@yellow-d2, 10%);
|
||||
|
||||
@btnDangerBackground: @red;
|
||||
@btnDangerBackgroundHighlight: @red-l1;
|
||||
@btnDangerBackground: @red;
|
||||
@btnDangerBackgroundHighlight: @red-l1;
|
||||
|
||||
@btnInverseBackground: @gray-2;
|
||||
@btnInverseBackgroundHighlight: @gray-2;
|
||||
@btnInverseBackground: @gray-2;
|
||||
@btnInverseBackgroundHighlight: @gray-2;
|
||||
|
||||
@btnNeutralBackground: @gray-9;
|
||||
@btnNeutralBackgroundHighlight: @gray-9;
|
||||
@btnNeutralBackground: @gray-9;
|
||||
@btnNeutralBackgroundHighlight: @gray-9;
|
||||
|
||||
|
||||
// Forms
|
||||
// -------------------------
|
||||
@inputBackground: @white;
|
||||
@inputBorder: @gray-8;
|
||||
@inputBorderFocus: @gray-7;
|
||||
@inputBorderTabFocus: @ui-outline;
|
||||
@inputBorderRadius: 0;
|
||||
@inputDisabledBackground: @gray-10;
|
||||
@formActionsBackground: @gray-9;
|
||||
@inputHeight: @baseLineHeight + 12px; // base line-height + 8px vertical padding + 2px top/bottom border
|
||||
@controlRequiredColor: @red;
|
||||
@inputBackground: @white;
|
||||
@inputBorder: @gray-8;
|
||||
@inputBorderFocus: @gray-7;
|
||||
@inputBorderTabFocus: @ui-outline;
|
||||
@inputBorderRadius: 0;
|
||||
@inputDisabledBackground: @gray-10;
|
||||
@formActionsBackground: @gray-9;
|
||||
@inputHeight: @baseLineHeight + 12px; // base line-height + 8px vertical padding + 2px top/bottom border
|
||||
@controlRequiredColor: @red;
|
||||
|
||||
|
||||
// Tabs
|
||||
// -------------------------
|
||||
|
||||
@tabsBorderRadius: @baseBorderRadius;
|
||||
@tabsBorderRadius: @baseBorderRadius;
|
||||
|
||||
// Dropdowns
|
||||
// -------------------------
|
||||
@dropdownBackground: @white;
|
||||
@dropdownBorder: none;
|
||||
@dropdownBorderRadius: @baseBorderRadius;
|
||||
@dropdownDividerTop: @gray-8;
|
||||
@dropdownDividerBottom: @white;
|
||||
@dropdownBackground: @white;
|
||||
@dropdownBorder: none;
|
||||
@dropdownBorderRadius: @baseBorderRadius;
|
||||
@dropdownDividerTop: @gray-8;
|
||||
@dropdownDividerBottom: @white;
|
||||
|
||||
@dropdownLinkColor: @gray-2;
|
||||
@dropdownLinkColorHover: @white;
|
||||
@dropdownLinkColorActive: @white;
|
||||
@dropdownLinkColor: @gray-2;
|
||||
@dropdownLinkColorHover: @white;
|
||||
@dropdownLinkColorActive: @white;
|
||||
|
||||
@dropdownLinkBackgroundActive: @linkColor;
|
||||
@dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive;
|
||||
@dropdownLinkBackgroundActive: @linkColor;
|
||||
@dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive;
|
||||
|
||||
|
||||
|
||||
@@ -343,133 +343,133 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
// Drawer
|
||||
@drawerWidth: 400px;
|
||||
@drawerWidth: 400px;
|
||||
|
||||
|
||||
// Z-index master list
|
||||
// -------------------------
|
||||
// Used for a bird's eye view of components dependent on the z-axis
|
||||
// Try to avoid customizing these :)
|
||||
@zIndexEditor: 100;
|
||||
@zIndexTree: 100;
|
||||
@zindexDropdown: 1000;
|
||||
@zindexPopover: 1010;
|
||||
@zindexTooltip: 1030;
|
||||
@zindexFixedNavbar: 1030;
|
||||
@zindexModalBackdrop: 1040;
|
||||
@zindexModal: 1050;
|
||||
@zindexSearchBox: 8000;
|
||||
@zindexUmbOverlay: 7500;
|
||||
@zindexOverlayBackdrop: 2000;
|
||||
@zIndexEditor: 100;
|
||||
@zIndexTree: 100;
|
||||
@zindexDropdown: 1000;
|
||||
@zindexPopover: 1010;
|
||||
@zindexTooltip: 1030;
|
||||
@zindexFixedNavbar: 1030;
|
||||
@zindexModalBackdrop: 1040;
|
||||
@zindexModal: 1050;
|
||||
@zindexSearchBox: 8000;
|
||||
@zindexUmbOverlay: 7500;
|
||||
@zindexOverlayBackdrop: 2000;
|
||||
|
||||
@zindexNotification: 8000;
|
||||
@zindexNotification: 8000;
|
||||
|
||||
// these are used for the tour which should be on top of everything else
|
||||
@zindexTourBackdrop: 9999;
|
||||
@zindexTourModal: 10000;
|
||||
@zindexTourBackdrop: 9999;
|
||||
@zindexTourModal: 10000;
|
||||
|
||||
// Sticky bar has a z-index of "500", which is set from javascript in directive
|
||||
// so set z-index of cropper should be lower to be behind sticky bar.
|
||||
@zindexCropperOverlay: 499;
|
||||
@zindexCropperOverlay: 499;
|
||||
|
||||
// Sprite icons path
|
||||
// -------------------------
|
||||
@iconSpritePath: "../img/glyphicons-halflings.png";
|
||||
@iconWhiteSpritePath: "../img/glyphicons-halflings-white.png";
|
||||
@iconSpritePath: "../img/glyphicons-halflings.png";
|
||||
@iconWhiteSpritePath: "../img/glyphicons-halflings-white.png";
|
||||
|
||||
|
||||
// Input placeholder text color
|
||||
// -------------------------
|
||||
@placeholderText: @gray-8;
|
||||
@placeholderText: @gray-8;
|
||||
|
||||
|
||||
// Hr border color
|
||||
// -------------------------
|
||||
@hrBorder: @gray-10;
|
||||
@hrBorder: @gray-10;
|
||||
|
||||
|
||||
// Horizontal forms & lists
|
||||
// -------------------------
|
||||
@horizontalComponentOffset: 180px;
|
||||
@horizontalComponentOffset: 180px;
|
||||
|
||||
|
||||
// Wells
|
||||
// -------------------------
|
||||
@wellBackground: @gray-10;
|
||||
@wellBackground: @gray-10;
|
||||
|
||||
|
||||
// Navbar
|
||||
// -------------------------
|
||||
@navbarCollapseWidth: 979px;
|
||||
@navbarCollapseDesktopWidth: @navbarCollapseWidth + 1;
|
||||
@navbarCollapseWidth: 979px;
|
||||
@navbarCollapseDesktopWidth: @navbarCollapseWidth + 1;
|
||||
|
||||
@navbarHeight: 40px;
|
||||
@navbarBackgroundHighlight: @white;
|
||||
@navbarBackground: darken(@navbarBackgroundHighlight, 5%);
|
||||
@navbarBorder: darken(@navbarBackground, 12%);
|
||||
@navbarHeight: 40px;
|
||||
@navbarBackgroundHighlight: @white;
|
||||
@navbarBackground: darken(@navbarBackgroundHighlight, 5%);
|
||||
@navbarBorder: darken(@navbarBackground, 12%);
|
||||
|
||||
@navbarText: @gray-4;
|
||||
@navbarLinkColor: @gray-4;
|
||||
@navbarLinkColorHover: @gray-2;
|
||||
@navbarLinkColorActive: @gray-3;
|
||||
@navbarLinkBackgroundHover: transparent;
|
||||
@navbarLinkBackgroundActive: darken(@navbarBackground, 5%);
|
||||
@navbarText: @gray-4;
|
||||
@navbarLinkColor: @gray-4;
|
||||
@navbarLinkColorHover: @gray-2;
|
||||
@navbarLinkColorActive: @gray-3;
|
||||
@navbarLinkBackgroundHover: transparent;
|
||||
@navbarLinkBackgroundActive: darken(@navbarBackground, 5%);
|
||||
|
||||
@navbarBrandColor: @navbarLinkColor;
|
||||
@navbarBrandColor: @navbarLinkColor;
|
||||
|
||||
// Inverted navbar
|
||||
@navbarInverseBackground: @gray-1;
|
||||
@navbarInverseBackgroundHighlight: @gray-2;
|
||||
@navbarInverseBorder: @gray-2;
|
||||
@navbarInverseBackground: @gray-1;
|
||||
@navbarInverseBackgroundHighlight: @gray-2;
|
||||
@navbarInverseBorder: @gray-2;
|
||||
|
||||
@navbarInverseText: @gray-8;
|
||||
@navbarInverseLinkColor: @gray-8;
|
||||
@navbarInverseLinkColorHover: @white;
|
||||
@navbarInverseLinkColorActive: @navbarInverseLinkColorHover;
|
||||
@navbarInverseLinkBackgroundHover: transparent;
|
||||
@navbarInverseLinkBackgroundActive: @navbarInverseBackground;
|
||||
@navbarInverseText: @gray-8;
|
||||
@navbarInverseLinkColor: @gray-8;
|
||||
@navbarInverseLinkColorHover: @white;
|
||||
@navbarInverseLinkColorActive: @navbarInverseLinkColorHover;
|
||||
@navbarInverseLinkBackgroundHover: transparent;
|
||||
@navbarInverseLinkBackgroundActive: @navbarInverseBackground;
|
||||
|
||||
@navbarInverseSearchBackground: lighten(@navbarInverseBackground, 25%);
|
||||
@navbarInverseSearchBackgroundFocus: @white;
|
||||
@navbarInverseSearchBorder: @navbarInverseBackground;
|
||||
@navbarInverseSearchPlaceholderColor: @gray-7;
|
||||
@navbarInverseSearchBackground: lighten(@navbarInverseBackground, 25%);
|
||||
@navbarInverseSearchBackgroundFocus: @white;
|
||||
@navbarInverseSearchBorder: @navbarInverseBackground;
|
||||
@navbarInverseSearchPlaceholderColor: @gray-7;
|
||||
|
||||
@navbarInverseBrandColor: @navbarInverseLinkColor;
|
||||
@navbarInverseBrandColor: @navbarInverseLinkColor;
|
||||
|
||||
|
||||
// Pagination
|
||||
// -------------------------
|
||||
@paginationBackground: @white;
|
||||
@paginationBorder: @gray-8;
|
||||
@paginationActiveBackground: @gray-10;
|
||||
@paginationBackground: @white;
|
||||
@paginationBorder: @gray-8;
|
||||
@paginationActiveBackground: @gray-10;
|
||||
|
||||
|
||||
// Hero unit
|
||||
// -------------------------
|
||||
@heroUnitBackground: @gray-10;
|
||||
@heroUnitHeadingColor: inherit;
|
||||
@heroUnitLeadColor: inherit;
|
||||
@heroUnitBackground: @gray-10;
|
||||
@heroUnitHeadingColor: inherit;
|
||||
@heroUnitLeadColor: inherit;
|
||||
|
||||
|
||||
// Alerts
|
||||
// -------------------------
|
||||
@warningText: @white;
|
||||
@warningBackground: @yellow-d2;
|
||||
@warningBorder: transparent;
|
||||
@warningText: @white;
|
||||
@warningBackground: @yellow-d2;
|
||||
@warningBorder: transparent;
|
||||
|
||||
@errorText: @white;
|
||||
@errorBackground: @red;
|
||||
@errorBorder: transparent;
|
||||
@errorText: @white;
|
||||
@errorBackground: @red;
|
||||
@errorBorder: transparent;
|
||||
|
||||
@successText: @white;
|
||||
@successBackground: @green-d1;
|
||||
@successBorder: transparent;
|
||||
@successText: @white;
|
||||
@successBackground: @green-d1;
|
||||
@successBorder: transparent;
|
||||
|
||||
@infoText: @white;
|
||||
@infoBackground: @blueDark;
|
||||
@infoBorder: transparent;
|
||||
@infoText: @white;
|
||||
@infoBackground: @blueDark;
|
||||
@infoBorder: transparent;
|
||||
|
||||
@alertBorderRadius: 0;
|
||||
@alertBorderRadius: 0;
|
||||
|
||||
// SD: Had to duplicate the above but prefix with 'form' inversed colors
|
||||
// because we cannot share the above alert colors with forms otherwise we end up with white
|
||||
@@ -477,38 +477,38 @@
|
||||
|
||||
// Form states
|
||||
// -------------------------
|
||||
@formWarningText: @warningBackground;
|
||||
@formWarningBackground: lighten(@warningBackground, 38%);
|
||||
@formWarningBorder: darken(spin(@warningBackground, -10), 3%);
|
||||
@formWarningText: @warningBackground;
|
||||
@formWarningBackground: lighten(@warningBackground, 38%);
|
||||
@formWarningBorder: darken(spin(@warningBackground, -10), 3%);
|
||||
|
||||
@formErrorText: @errorBackground;
|
||||
@formErrorBackground: @errorBackground;
|
||||
@formErrorBorder: @red;
|
||||
@formErrorText: @errorBackground;
|
||||
@formErrorBackground: @errorBackground;
|
||||
@formErrorBorder: @red;
|
||||
|
||||
@formSuccessText: @successBackground;
|
||||
@formSuccessBackground: lighten(@successBackground, 48%);
|
||||
@formSuccessBorder: darken(spin(@successBackground, -10), 5%);
|
||||
@formSuccessText: @successBackground;
|
||||
@formSuccessBackground: lighten(@successBackground, 48%);
|
||||
@formSuccessBorder: darken(spin(@successBackground, -10), 5%);
|
||||
|
||||
@formInfoText: @infoBackground;
|
||||
@formInfoBackground: lighten(@infoBackground, 41%);
|
||||
@formInfoBorder: darken(spin(@infoBackground, -10), 7%);
|
||||
@formInfoText: @infoBackground;
|
||||
@formInfoBackground: lighten(@infoBackground, 41%);
|
||||
@formInfoBorder: darken(spin(@infoBackground, -10), 7%);
|
||||
|
||||
|
||||
// Tooltips and popovers
|
||||
// -------------------------
|
||||
@tooltipColor: @white;
|
||||
@tooltipBackground: @black;
|
||||
@tooltipArrowWidth: 5px;
|
||||
@tooltipArrowColor: @tooltipBackground;
|
||||
@tooltipColor: @white;
|
||||
@tooltipBackground: @black;
|
||||
@tooltipArrowWidth: 5px;
|
||||
@tooltipArrowColor: @tooltipBackground;
|
||||
|
||||
@popoverBackground: @white;
|
||||
@popoverArrowWidth: 10px;
|
||||
@popoverArrowColor: @white;
|
||||
@popoverTitleBackground: darken(@popoverBackground, 3%);
|
||||
@popoverBackground: @white;
|
||||
@popoverArrowWidth: 10px;
|
||||
@popoverArrowColor: @white;
|
||||
@popoverTitleBackground: darken(@popoverBackground, 3%);
|
||||
|
||||
// Special enhancement for popovers
|
||||
@popoverArrowOuterWidth: @popoverArrowWidth + 1;
|
||||
@popoverArrowOuterColor: @gray-7;
|
||||
@popoverArrowOuterWidth: @popoverArrowWidth + 1;
|
||||
@popoverArrowOuterColor: @gray-7;
|
||||
|
||||
|
||||
|
||||
@@ -518,34 +518,34 @@
|
||||
|
||||
// Default 940px grid
|
||||
// -------------------------
|
||||
@gridColumns: 12;
|
||||
@gridColumnWidth: 60px;
|
||||
@gridGutterWidth: 0;
|
||||
@gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
|
||||
@gridColumns: 12;
|
||||
@gridColumnWidth: 60px;
|
||||
@gridGutterWidth: 0;
|
||||
@gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
|
||||
|
||||
// 1200px min
|
||||
@gridColumnWidth1200: 70px;
|
||||
@gridGutterWidth1200: 30px;
|
||||
@gridRowWidth1200: (@gridColumns * @gridColumnWidth1200) + (@gridGutterWidth1200 * (@gridColumns - 1));
|
||||
@gridColumnWidth1200: 70px;
|
||||
@gridGutterWidth1200: 30px;
|
||||
@gridRowWidth1200: (@gridColumns * @gridColumnWidth1200) + (@gridGutterWidth1200 * (@gridColumns - 1));
|
||||
|
||||
// 768px-979px
|
||||
@gridColumnWidth768: 42px;
|
||||
@gridGutterWidth768: 20px;
|
||||
@gridRowWidth768: (@gridColumns * @gridColumnWidth768) + (@gridGutterWidth768 * (@gridColumns - 1));
|
||||
@gridColumnWidth768: 42px;
|
||||
@gridGutterWidth768: 20px;
|
||||
@gridRowWidth768: (@gridColumns * @gridColumnWidth768) + (@gridGutterWidth768 * (@gridColumns - 1));
|
||||
|
||||
|
||||
// Fluid grid
|
||||
// -------------------------
|
||||
@fluidGridColumnWidth: percentage(@gridColumnWidth/@gridRowWidth);
|
||||
@fluidGridGutterWidth: percentage(@gridGutterWidth/@gridRowWidth);
|
||||
@fluidGridColumnWidth: percentage((@gridColumnWidth / @gridRowWidth));
|
||||
@fluidGridGutterWidth: percentage((@gridGutterWidth / @gridRowWidth));
|
||||
|
||||
// 1200px min
|
||||
@fluidGridColumnWidth1200: percentage(@gridColumnWidth1200/@gridRowWidth1200);
|
||||
@fluidGridGutterWidth1200: percentage(@gridGutterWidth1200/@gridRowWidth1200);
|
||||
@fluidGridColumnWidth1200: percentage((@gridColumnWidth1200 / @gridRowWidth1200));
|
||||
@fluidGridGutterWidth1200: percentage((@gridGutterWidth1200 / @gridRowWidth1200));
|
||||
|
||||
// 768px-979px
|
||||
@fluidGridColumnWidth768: percentage(@gridColumnWidth768/@gridRowWidth768);
|
||||
@fluidGridGutterWidth768: percentage(@gridGutterWidth768/@gridRowWidth768);
|
||||
@fluidGridColumnWidth768: percentage((@gridColumnWidth768 / @gridRowWidth768));
|
||||
@fluidGridGutterWidth768: percentage((@gridGutterWidth768 / @gridRowWidth768));
|
||||
|
||||
// SORTABLE
|
||||
// --------------------------------------------------
|
||||
|
||||
@@ -5,257 +5,264 @@
|
||||
|
||||
var app = angular.module("umbraco.preview", ['umbraco.resources', 'umbraco.services'])
|
||||
|
||||
.controller("previewController", function ($scope, $window, $location, $http) {
|
||||
.controller("previewController", function ($scope, $window, $location, $http) {
|
||||
|
||||
$scope.currentCulture = { iso: '', title: '...', icon: 'icon-loading' }
|
||||
var cultures = [];
|
||||
$scope.currentCulture = { iso: '', title: '...', icon: 'icon-loading' }
|
||||
var cultures = [];
|
||||
|
||||
$scope.tabbingActive = false;
|
||||
// There are a number of ways to detect when a focus state should be shown when using the tab key and this seems to be the simplest solution.
|
||||
// For more information about this approach, see https://hackernoon.com/removing-that-ugly-focus-ring-and-keeping-it-too-6c8727fefcd2
|
||||
function handleFirstTab(evt) {
|
||||
if (evt.keyCode === 9) {
|
||||
$scope.tabbingActive = true;
|
||||
$scope.$digest();
|
||||
window.removeEventListener('keydown', handleFirstTab);
|
||||
window.addEventListener('mousedown', disableTabbingActive);
|
||||
}
|
||||
$scope.tabbingActive = false;
|
||||
// There are a number of ways to detect when a focus state should be shown when using the tab key and this seems to be the simplest solution.
|
||||
// For more information about this approach, see https://hackernoon.com/removing-that-ugly-focus-ring-and-keeping-it-too-6c8727fefcd2
|
||||
function handleFirstTab(evt) {
|
||||
if (evt.keyCode === 9) {
|
||||
$scope.tabbingActive = true;
|
||||
$scope.$digest();
|
||||
window.removeEventListener('keydown', handleFirstTab);
|
||||
window.addEventListener('mousedown', disableTabbingActive);
|
||||
}
|
||||
}
|
||||
|
||||
function disableTabbingActive(evt) {
|
||||
$scope.tabbingActive = false;
|
||||
$scope.$digest();
|
||||
window.removeEventListener('mousedown', disableTabbingActive);
|
||||
window.addEventListener("keydown", handleFirstTab);
|
||||
}
|
||||
|
||||
var iframeWrapper = angular.element("#demo-iframe-wrapper");
|
||||
var canvasDesignerPanel = angular.element("#canvasdesignerPanel");
|
||||
|
||||
window.addEventListener("keydown", handleFirstTab);
|
||||
window.addEventListener("resize", scaleIframeWrapper);
|
||||
iframeWrapper.on("transitionend", scaleIframeWrapper);
|
||||
|
||||
function scaleIframeWrapper() {
|
||||
if ($scope.previewDevice.name == "fullsize") { // dont scale fullsize preview
|
||||
iframeWrapper.css({ "transform": "" });
|
||||
}
|
||||
else {
|
||||
var wrapWidth = canvasDesignerPanel.width(); // width of the wrapper
|
||||
var wrapHeight = canvasDesignerPanel.height();
|
||||
var childWidth = iframeWrapper.width() + 30; // width of child iframe plus some space
|
||||
var childHeight = iframeWrapper.height() + 30; // child height plus some space
|
||||
var wScale = wrapWidth / childWidth;
|
||||
var hScale = wrapHeight / childHeight;
|
||||
var scale = Math.min(wScale, hScale, 1); // get the lowest ratio, but not higher than 1
|
||||
iframeWrapper.css({ "transform": "scale(" + scale + ")" }); // set scale
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//gets a real query string value
|
||||
function getParameterByName(name, url) {
|
||||
if (!url) url = $window.location.href;
|
||||
name = name.replace(/[\[\]]/g, '\\$&');
|
||||
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
|
||||
results = regex.exec(url);
|
||||
if (!results) return null;
|
||||
if (!results[2]) return '';
|
||||
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
||||
}
|
||||
|
||||
function configureSignalR(iframe) {
|
||||
|
||||
const reloadIframe = () => {
|
||||
console.log("Reloading.");
|
||||
var iframeDoc = (iframe.contentWindow || iframe.contentDocument);
|
||||
if (iframeDoc) {
|
||||
iframeDoc.location.reload();
|
||||
} else {
|
||||
console.error('could not reload iframe');
|
||||
}
|
||||
}
|
||||
|
||||
function disableTabbingActive(evt) {
|
||||
$scope.tabbingActive = false;
|
||||
$scope.$digest();
|
||||
window.removeEventListener('mousedown', disableTabbingActive);
|
||||
window.addEventListener("keydown", handleFirstTab);
|
||||
// visibility tracking
|
||||
var dirtyContent = false;
|
||||
var visibleContent = true;
|
||||
|
||||
document.addEventListener('visibilitychange', function () {
|
||||
visibleContent = !document.hidden;
|
||||
if (visibleContent && dirtyContent) {
|
||||
dirtyContent = false;
|
||||
reloadIframe();
|
||||
}
|
||||
});
|
||||
|
||||
var iframeWrapper = angular.element("#demo-iframe-wrapper");
|
||||
var canvasDesignerPanel = angular.element("#canvasdesignerPanel");
|
||||
|
||||
window.addEventListener("keydown", handleFirstTab);
|
||||
window.addEventListener("resize", scaleIframeWrapper);
|
||||
iframeWrapper.on("transitionend", scaleIframeWrapper);
|
||||
// signalr hub
|
||||
// If connection already exists and is connected just return
|
||||
// otherwise we'll have multiple connections
|
||||
if ($.connection && $.connection.connectionState === signalR.HubConnectionState.Connected) return;
|
||||
|
||||
function scaleIframeWrapper() {
|
||||
if ($scope.previewDevice.name == "fullsize") { // dont scale fullsize preview
|
||||
iframeWrapper.css({"transform": ""});
|
||||
}
|
||||
else {
|
||||
var wrapWidth = canvasDesignerPanel.width(); // width of the wrapper
|
||||
var wrapHeight = canvasDesignerPanel.height();
|
||||
var childWidth = iframeWrapper.width() + 30; // width of child iframe plus some space
|
||||
var childHeight = iframeWrapper.height() + 30; // child height plus some space
|
||||
var wScale = wrapWidth / childWidth;
|
||||
var hScale = wrapHeight / childHeight;
|
||||
var scale = Math.min(wScale,hScale,1); // get the lowest ratio, but not higher than 1
|
||||
iframeWrapper.css({"transform": "scale("+scale+")" }); // set scale
|
||||
}
|
||||
$.connection = new signalR.HubConnectionBuilder()
|
||||
.withUrl(Umbraco.Sys.ServerVariables.umbracoUrls.previewHubUrl)
|
||||
.withAutomaticReconnect()
|
||||
.configureLogging(signalR.LogLevel.Warning)
|
||||
.build();
|
||||
|
||||
$.connection.on("refreshed", function (message) {
|
||||
console.log("Notified by SignalR preview hub (" + message + ").");
|
||||
if ($scope.pageId != message) {
|
||||
console.log("Not a notification for us (" + $scope.pageId + ").");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//gets a real query string value
|
||||
function getParameterByName(name, url) {
|
||||
if (!url) url = $window.location.href;
|
||||
name = name.replace(/[\[\]]/g, '\\$&');
|
||||
var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
|
||||
results = regex.exec(url);
|
||||
if (!results) return null;
|
||||
if (!results[2]) return '';
|
||||
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
||||
if (!visibleContent) {
|
||||
console.log("Not visible, will reload.");
|
||||
dirtyContent = true;
|
||||
return;
|
||||
}
|
||||
reloadIframe();
|
||||
})
|
||||
|
||||
function configureSignalR(iframe) {
|
||||
// visibility tracking
|
||||
var dirtyContent = false;
|
||||
var visibleContent = true;
|
||||
|
||||
document.addEventListener('visibilitychange', function () {
|
||||
visibleContent = !document.hidden;
|
||||
if (visibleContent && dirtyContent) {
|
||||
dirtyContent = false;
|
||||
console.log("Visible, reloading.")
|
||||
var iframeDoc = (iframe.contentWindow || iframe.contentDocument);
|
||||
iframeDoc.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
// signalr hub
|
||||
// If connection already exists and is connected just return
|
||||
// otherwise we'll have multiple connections
|
||||
if( $.connection && $.connection.connectionState === signalR.HubConnectionState.Connected) return;
|
||||
|
||||
$.connection = new signalR.HubConnectionBuilder()
|
||||
.withUrl(Umbraco.Sys.ServerVariables.umbracoUrls.previewHubUrl)
|
||||
.withAutomaticReconnect()
|
||||
.configureLogging(signalR.LogLevel.Warning)
|
||||
.build();
|
||||
|
||||
$.connection.on("refreshed", function (message) {
|
||||
console.log("Notified by SignalR preview hub (" + message + ").");
|
||||
if ($scope.pageId != message) {
|
||||
console.log("Not a notification for us (" + $scope.pageId + ").");
|
||||
return;
|
||||
}
|
||||
if (!visibleContent) {
|
||||
console.log("Not visible, will reload.");
|
||||
dirtyContent = true;
|
||||
return;
|
||||
}
|
||||
console.log("Reloading.");
|
||||
var iframeDoc = iframe.contentWindow || iframe.contentDocument;
|
||||
iframeDoc.location.reload();
|
||||
})
|
||||
|
||||
try {
|
||||
$.connection.start().then(function () {
|
||||
console.log("Connected to SignalR preview hub (ID=" + $.connection.connectionId + ")");
|
||||
}).catch(function () {
|
||||
console.log("Could not connect to SignalR preview hub.");
|
||||
});
|
||||
} catch (e) {
|
||||
console.error("Could not establish signalr connection. Error: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
function fixExternalLinks(iframe) {
|
||||
// Make sure external links don't open inside the iframe
|
||||
Array.from(iframe.contentDocument.getElementsByTagName("a"))
|
||||
.filter(a => a.hostname !== location.hostname && !a.target)
|
||||
.forEach(a => a.target = "_top");
|
||||
}
|
||||
|
||||
var isInit = getParameterByName("init");
|
||||
if (isInit === "true") {
|
||||
//do not continue, this is the first load of this new window, if this is passed in it means it's been
|
||||
//initialized by the content editor and then the content editor will actually re-load this window without
|
||||
//this flag. This is a required trick to get around chrome popup mgr.
|
||||
return;
|
||||
}
|
||||
|
||||
setPageUrl();
|
||||
|
||||
$scope.isOpen = false;
|
||||
$scope.frameLoaded = false;
|
||||
|
||||
$scope.valueAreLoaded = false;
|
||||
$scope.devices = [
|
||||
{ name: "fullsize", css: "fullsize", icon: "icon-application-window-alt", title: "Fit browser" },
|
||||
{ name: "desktop", css: "desktop shadow", icon: "icon-display", title: "Desktop" },
|
||||
{ name: "laptop - 1366px", css: "laptop shadow", icon: "icon-laptop", title: "Laptop" },
|
||||
{ name: "iPad portrait - 768px", css: "iPad-portrait shadow", icon: "icon-ipad", title: "Tablet portrait" },
|
||||
{ name: "iPad landscape - 1024px", css: "iPad-landscape shadow", icon: "icon-ipad flip", title: "Tablet landscape" },
|
||||
{ name: "smartphone portrait - 480px", css: "smartphone-portrait shadow", icon: "icon-iphone", title: "Smartphone portrait" },
|
||||
{ name: "smartphone landscape - 320px", css: "smartphone-landscape shadow", icon: "icon-iphone flip", title: "Smartphone landscape" }
|
||||
];
|
||||
$scope.previewDevice = $scope.devices[0];
|
||||
|
||||
$scope.sizeOpen = false;
|
||||
$scope.cultureOpen = false;
|
||||
|
||||
$scope.toggleSizeOpen = function () {
|
||||
$scope.sizeOpen = toggleMenu($scope.sizeOpen);
|
||||
}
|
||||
$scope.toggleCultureOpen = function () {
|
||||
$scope.cultureOpen = toggleMenu($scope.cultureOpen);
|
||||
}
|
||||
|
||||
function toggleMenu(isCurrentlyOpen) {
|
||||
if (isCurrentlyOpen === false) {
|
||||
closeOthers();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function closeOthers() {
|
||||
$scope.sizeOpen = false;
|
||||
$scope.cultureOpen = false;
|
||||
}
|
||||
|
||||
$scope.windowClickHandler = function () {
|
||||
closeOthers();
|
||||
}
|
||||
|
||||
function windowBlurHandler() {
|
||||
closeOthers();
|
||||
$scope.$digest();
|
||||
}
|
||||
window.addEventListener("blur", windowBlurHandler);
|
||||
|
||||
function windowVisibilityHandler(e) {
|
||||
|
||||
var amountOfPreviewSessions = localStorage.getItem('UmbPreviewSessionAmount');
|
||||
|
||||
// When tab is visible again:
|
||||
if(document.hidden === false) {
|
||||
checkPreviewState();
|
||||
}
|
||||
}
|
||||
document.addEventListener("visibilitychange", windowVisibilityHandler);
|
||||
|
||||
function beforeUnloadHandler(e) {
|
||||
endPreviewSession();
|
||||
}
|
||||
window.addEventListener("beforeunload", beforeUnloadHandler, false);
|
||||
|
||||
$scope.$on("$destroy", function () {
|
||||
window.removeEventListener("blur", windowBlurHandler);
|
||||
document.removeEventListener("visibilitychange", windowVisibilityHandler);
|
||||
window.removeEventListener("beforeunload", beforeUnloadHandler);
|
||||
try {
|
||||
$.connection.start().then(function () {
|
||||
console.log("Connected to SignalR preview hub (ID=" + $.connection.connectionId + ")");
|
||||
}).catch(function () {
|
||||
console.log("Could not connect to SignalR preview hub.");
|
||||
});
|
||||
} catch (e) {
|
||||
console.error("Could not establish signalr connection. Error: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
function fixExternalLinks(iframe) {
|
||||
// Make sure external links don't open inside the iframe
|
||||
Array.from(iframe.contentDocument.getElementsByTagName("a"))
|
||||
.filter(a => a.hostname !== location.hostname && !a.target)
|
||||
.forEach(a => a.target = "_top");
|
||||
}
|
||||
|
||||
var isInit = getParameterByName("init");
|
||||
if (isInit === "true") {
|
||||
//do not continue, this is the first load of this new window, if this is passed in it means it's been
|
||||
//initialized by the content editor and then the content editor will actually re-load this window without
|
||||
//this flag. This is a required trick to get around chrome popup mgr.
|
||||
return;
|
||||
}
|
||||
|
||||
setPageUrl();
|
||||
|
||||
$scope.isOpen = false;
|
||||
$scope.frameLoaded = false;
|
||||
|
||||
$scope.valueAreLoaded = false;
|
||||
$scope.devices = [
|
||||
{ name: "fullsize", css: "fullsize", icon: "icon-application-window-alt", title: "Fit browser" },
|
||||
{ name: "desktop", css: "desktop shadow", icon: "icon-display", title: "Desktop" },
|
||||
{ name: "laptop - 1366px", css: "laptop shadow", icon: "icon-laptop", title: "Laptop" },
|
||||
{ name: "iPad portrait - 768px", css: "iPad-portrait shadow", icon: "icon-ipad", title: "Tablet portrait" },
|
||||
{ name: "iPad landscape - 1024px", css: "iPad-landscape shadow", icon: "icon-ipad flip", title: "Tablet landscape" },
|
||||
{ name: "smartphone portrait - 480px", css: "smartphone-portrait shadow", icon: "icon-iphone", title: "Smartphone portrait" },
|
||||
{ name: "smartphone landscape - 320px", css: "smartphone-landscape shadow", icon: "icon-iphone flip", title: "Smartphone landscape" }
|
||||
];
|
||||
$scope.previewDevice = $scope.devices[0];
|
||||
|
||||
$scope.sizeOpen = false;
|
||||
$scope.cultureOpen = false;
|
||||
|
||||
$scope.toggleSizeOpen = function () {
|
||||
$scope.sizeOpen = toggleMenu($scope.sizeOpen);
|
||||
}
|
||||
$scope.toggleCultureOpen = function () {
|
||||
$scope.cultureOpen = toggleMenu($scope.cultureOpen);
|
||||
}
|
||||
|
||||
function toggleMenu(isCurrentlyOpen) {
|
||||
if (isCurrentlyOpen === false) {
|
||||
closeOthers();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function closeOthers() {
|
||||
$scope.sizeOpen = false;
|
||||
$scope.cultureOpen = false;
|
||||
}
|
||||
|
||||
$scope.windowClickHandler = function () {
|
||||
closeOthers();
|
||||
}
|
||||
|
||||
function windowBlurHandler() {
|
||||
closeOthers();
|
||||
$scope.$digest();
|
||||
}
|
||||
window.addEventListener("blur", windowBlurHandler);
|
||||
|
||||
function windowVisibilityHandler(e) {
|
||||
|
||||
var amountOfPreviewSessions = localStorage.getItem('UmbPreviewSessionAmount');
|
||||
|
||||
// When tab is visible again:
|
||||
if (document.hidden === false) {
|
||||
checkPreviewState();
|
||||
}
|
||||
}
|
||||
document.addEventListener("visibilitychange", windowVisibilityHandler);
|
||||
|
||||
function beforeUnloadHandler(e) {
|
||||
endPreviewSession();
|
||||
}
|
||||
window.addEventListener("beforeunload", beforeUnloadHandler, false);
|
||||
|
||||
$scope.$on("$destroy", function () {
|
||||
window.removeEventListener("blur", windowBlurHandler);
|
||||
document.removeEventListener("visibilitychange", windowVisibilityHandler);
|
||||
window.removeEventListener("beforeunload", beforeUnloadHandler);
|
||||
});
|
||||
|
||||
|
||||
function setPageUrl() {
|
||||
$scope.pageId = $location.search().id || getParameterByName("id");
|
||||
var culture = $location.search().culture || getParameterByName("culture");
|
||||
function setPageUrl() {
|
||||
$scope.pageId = $location.search().id || getParameterByName("id");
|
||||
var culture = $location.search().culture || getParameterByName("culture");
|
||||
|
||||
if ($scope.pageId) {
|
||||
var query = 'id=' + $scope.pageId;
|
||||
if (culture) {
|
||||
query += "&culture=" + culture;
|
||||
}
|
||||
$scope.pageUrl = "frame?" + query;
|
||||
}
|
||||
if ($scope.pageId) {
|
||||
var query = 'id=' + $scope.pageId;
|
||||
if (culture) {
|
||||
query += "&culture=" + culture;
|
||||
}
|
||||
function getCookie(cname) {
|
||||
var name = cname + "=";
|
||||
var ca = document.cookie.split(";");
|
||||
for(var i = 0; i < ca.length; i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0) == " ") {
|
||||
c = c.substring(1);
|
||||
}
|
||||
if (c.indexOf(name) == 0) {
|
||||
return c.substring(name.length, c.length);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
$scope.pageUrl = "frame?" + query;
|
||||
}
|
||||
}
|
||||
function getCookie(cname) {
|
||||
var name = cname + "=";
|
||||
var ca = document.cookie.split(";");
|
||||
for (var i = 0; i < ca.length; i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0) == " ") {
|
||||
c = c.substring(1);
|
||||
}
|
||||
function setCookie(cname, cvalue, exminutes) {
|
||||
var d = new Date();
|
||||
d.setTime(d.getTime() + (exminutes * 60 * 1000));
|
||||
document.cookie = cname + "=" + cvalue + ";expires="+d.toUTCString() + ";path=/";
|
||||
if (c.indexOf(name) == 0) {
|
||||
return c.substring(name.length, c.length);
|
||||
}
|
||||
var hasPreviewDialog = false;
|
||||
function checkPreviewState() {
|
||||
if (getCookie("UMB_PREVIEW") === null) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function setCookie(cname, cvalue, exminutes) {
|
||||
var d = new Date();
|
||||
d.setTime(d.getTime() + (exminutes * 60 * 1000));
|
||||
document.cookie = cname + "=" + cvalue + ";expires=" + d.toUTCString() + ";path=/";
|
||||
}
|
||||
var hasPreviewDialog = false;
|
||||
function checkPreviewState() {
|
||||
if (getCookie("UMB_PREVIEW") === null) {
|
||||
|
||||
if(hasPreviewDialog === true) return;
|
||||
hasPreviewDialog = true;
|
||||
if (hasPreviewDialog === true) return;
|
||||
hasPreviewDialog = true;
|
||||
|
||||
// Ask to re-enter preview mode?
|
||||
// Ask to re-enter preview mode?
|
||||
|
||||
const localizeVarsFallback = {
|
||||
"returnToPreviewHeadline": "Preview website?",
|
||||
"returnToPreviewDescription":"You have ended preview mode, do you want to enable it again to view the latest saved version of your website?",
|
||||
"returnToPreviewAcceptButton":"Preview latest version",
|
||||
"returnToPreviewDeclineButton":"View published version"
|
||||
};
|
||||
const umbLocalizedVars = Object.assign(localizeVarsFallback, $window.umbLocalizedVars);
|
||||
const localizeVarsFallback = {
|
||||
"returnToPreviewHeadline": "Preview website?",
|
||||
"returnToPreviewDescription": "You have ended preview mode, do you want to enable it again to view the latest saved version of your website?",
|
||||
"returnToPreviewAcceptButton": "Preview latest version",
|
||||
"returnToPreviewDeclineButton": "View published version"
|
||||
};
|
||||
const umbLocalizedVars = Object.assign(localizeVarsFallback, $window.umbLocalizedVars);
|
||||
|
||||
|
||||
// This modal is also used in websitepreview.js
|
||||
var modelStyles = `
|
||||
// This modal is also used in websitepreview.js
|
||||
var modelStyles = `
|
||||
|
||||
/* Webfont: LatoLatin-Bold */
|
||||
@font-face {
|
||||
@@ -333,205 +340,205 @@ var app = angular.module("umbraco.preview", ['umbraco.resources', 'umbraco.servi
|
||||
}
|
||||
`;
|
||||
|
||||
var bodyEl = document.getElementsByTagName("BODY")[0];
|
||||
var bodyEl = document.getElementsByTagName("BODY")[0];
|
||||
|
||||
var fragment = document.createElement("div");
|
||||
var shadowRoot = fragment.attachShadow({ mode: 'open' });
|
||||
var fragment = document.createElement("div");
|
||||
var shadowRoot = fragment.attachShadow({ mode: 'open' });
|
||||
|
||||
var style = document.createElement("style");
|
||||
style.innerHTML = modelStyles;
|
||||
shadowRoot.appendChild(style);
|
||||
var style = document.createElement("style");
|
||||
style.innerHTML = modelStyles;
|
||||
shadowRoot.appendChild(style);
|
||||
|
||||
var con = document.createElement("div");
|
||||
con.className = "umbraco-preview-dialog";
|
||||
shadowRoot.appendChild(con);
|
||||
var con = document.createElement("div");
|
||||
con.className = "umbraco-preview-dialog";
|
||||
shadowRoot.appendChild(con);
|
||||
|
||||
var modal = document.createElement("div");
|
||||
modal.className = "umbraco-preview-dialog__modal";
|
||||
modal.innerHTML = `<div class="umbraco-preview-dialog__headline">${umbLocalizedVars.returnToPreviewHeadline}</div>
|
||||
var modal = document.createElement("div");
|
||||
modal.className = "umbraco-preview-dialog__modal";
|
||||
modal.innerHTML = `<div class="umbraco-preview-dialog__headline">${umbLocalizedVars.returnToPreviewHeadline}</div>
|
||||
<div class="umbraco-preview-dialog__question">${umbLocalizedVars.returnToPreviewDescription}</div>`;
|
||||
con.appendChild(modal);
|
||||
con.appendChild(modal);
|
||||
|
||||
var declineButton = document.createElement("button");
|
||||
declineButton.type = "button";
|
||||
declineButton.innerHTML = umbLocalizedVars.returnToPreviewDeclineButton;
|
||||
declineButton.addEventListener("click", () => {
|
||||
bodyEl.removeChild(fragment);
|
||||
$scope.exitPreview();
|
||||
hasPreviewDialog = false;
|
||||
});
|
||||
modal.appendChild(declineButton);
|
||||
|
||||
var continueButton = document.createElement("button");
|
||||
continueButton.type = "button";
|
||||
continueButton.className = "umbraco-preview-dialog__continue";
|
||||
continueButton.innerHTML = umbLocalizedVars.returnToPreviewAcceptButton;
|
||||
continueButton.addEventListener("click", () => {
|
||||
bodyEl.removeChild(fragment);
|
||||
reenterPreviewMode();
|
||||
hasPreviewDialog = false;
|
||||
});
|
||||
modal.appendChild(continueButton);
|
||||
|
||||
bodyEl.appendChild(fragment);
|
||||
continueButton.focus();
|
||||
|
||||
}
|
||||
}
|
||||
function reenterPreviewMode() {
|
||||
//Re-enter Preview Mode
|
||||
$http({
|
||||
method: 'POST',
|
||||
url: '../preview/enterPreview',
|
||||
params: {
|
||||
id: $scope.pageId
|
||||
}
|
||||
})
|
||||
startPreviewSession();
|
||||
}
|
||||
function getPageURL() {
|
||||
var culture = $location.search().culture || getParameterByName("culture");
|
||||
var relativeUrl = "/" + $scope.pageId;
|
||||
if (culture) {
|
||||
relativeUrl += '?culture=' + culture;
|
||||
}
|
||||
return relativeUrl;
|
||||
}
|
||||
|
||||
function startPreviewSession() {
|
||||
// lets registrer this preview session.
|
||||
var amountOfPreviewSessions = Math.max(localStorage.getItem('UmbPreviewSessionAmount') || 0, 0);
|
||||
amountOfPreviewSessions++;
|
||||
localStorage.setItem('UmbPreviewSessionAmount', amountOfPreviewSessions);
|
||||
}
|
||||
function resetPreviewSessions() {
|
||||
localStorage.setItem('UmbPreviewSessionAmount', 0);
|
||||
}
|
||||
function endPreviewSession() {
|
||||
var amountOfPreviewSessions = localStorage.getItem('UmbPreviewSessionAmount') || 0;
|
||||
amountOfPreviewSessions--;
|
||||
localStorage.setItem('UmbPreviewSessionAmount', amountOfPreviewSessions);
|
||||
|
||||
if(amountOfPreviewSessions <= 0) {
|
||||
// We are good to end preview mode.
|
||||
navigator.sendBeacon("../preview/end");
|
||||
}
|
||||
}
|
||||
startPreviewSession();
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Preview devices */
|
||||
/*****************************************************************************/
|
||||
|
||||
// Set preview device
|
||||
$scope.updatePreviewDevice = function (device) {
|
||||
$scope.previewDevice = device;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Open website in preview mode */
|
||||
/*****************************************************************************/
|
||||
|
||||
$scope.openInBrowser = function () {
|
||||
setCookie("UMB-WEBSITE-PREVIEW-ACCEPT", "true", 5);
|
||||
window.open(getPageURL(), "_blank");
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Exit Preview */
|
||||
/*****************************************************************************/
|
||||
|
||||
$scope.exitPreview = function () {
|
||||
resetPreviewSessions();
|
||||
window.top.location.href = "../preview/end?redir=" + encodeURIComponent(getPageURL());
|
||||
};
|
||||
|
||||
$scope.onFrameLoaded = function (iframe) {
|
||||
|
||||
$scope.frameLoaded = true;
|
||||
configureSignalR(iframe);
|
||||
fixExternalLinks(iframe);
|
||||
|
||||
$scope.currentCultureIso = $location.search().culture || null;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Panel management */
|
||||
/*****************************************************************************/
|
||||
|
||||
$scope.openPreviewDevice = function () {
|
||||
$scope.showDevicesPreview = true;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Change culture */
|
||||
/*****************************************************************************/
|
||||
$scope.changeCulture = function (iso) {
|
||||
if ($location.search().culture !== iso) {
|
||||
$scope.frameLoaded = false;
|
||||
$scope.currentCultureIso = iso;
|
||||
$location.search("culture", iso);
|
||||
setPageUrl();
|
||||
}
|
||||
};
|
||||
$scope.registerCulture = function (iso, title, isDefault) {
|
||||
var cultureObject = { iso: iso, title: title, isDefault: isDefault };
|
||||
cultures.push(cultureObject);
|
||||
}
|
||||
|
||||
$scope.$watch("currentCultureIso", function (oldIso, newIso) {
|
||||
// if no culture is selected, we will pick the default one:
|
||||
if ($scope.currentCultureIso === null) {
|
||||
$scope.currentCulture = cultures.find(function (culture) {
|
||||
return culture.isDefault === true;
|
||||
})
|
||||
return;
|
||||
}
|
||||
$scope.currentCulture = cultures.find(function (culture) {
|
||||
return culture.iso === $scope.currentCultureIso;
|
||||
})
|
||||
var declineButton = document.createElement("button");
|
||||
declineButton.type = "button";
|
||||
declineButton.innerHTML = umbLocalizedVars.returnToPreviewDeclineButton;
|
||||
declineButton.addEventListener("click", () => {
|
||||
bodyEl.removeChild(fragment);
|
||||
$scope.exitPreview();
|
||||
hasPreviewDialog = false;
|
||||
});
|
||||
modal.appendChild(declineButton);
|
||||
|
||||
})
|
||||
var continueButton = document.createElement("button");
|
||||
continueButton.type = "button";
|
||||
continueButton.className = "umbraco-preview-dialog__continue";
|
||||
continueButton.innerHTML = umbLocalizedVars.returnToPreviewAcceptButton;
|
||||
continueButton.addEventListener("click", () => {
|
||||
bodyEl.removeChild(fragment);
|
||||
reenterPreviewMode();
|
||||
hasPreviewDialog = false;
|
||||
});
|
||||
modal.appendChild(continueButton);
|
||||
|
||||
bodyEl.appendChild(fragment);
|
||||
continueButton.focus();
|
||||
|
||||
.component('previewIFrame', {
|
||||
template: "<div style='width:100%;height:100%;margin:0 auto;overflow:hidden;'><iframe id='resultFrame' src='about:blank' ng-src=\"{{vm.src}}\" frameborder='0'></iframe></div>",
|
||||
controller: function ($element, $scope, angularHelper) {
|
||||
|
||||
var vm = this;
|
||||
|
||||
vm.$postLink = function () {
|
||||
var resultFrame = $element.find("#resultFrame").get(0);
|
||||
resultFrame.addEventListener("load", iframeReady);
|
||||
};
|
||||
|
||||
function iframeReady() {
|
||||
var iframe = $element.find("#resultFrame").get(0);
|
||||
hideUmbracoPreviewBadge(iframe);
|
||||
angularHelper.safeApply($scope, function () {
|
||||
vm.onLoaded({ iframe: iframe });
|
||||
$scope.frameLoaded = true;
|
||||
});
|
||||
}
|
||||
|
||||
function hideUmbracoPreviewBadge(iframe) {
|
||||
if (iframe && iframe.contentDocument && iframe.contentDocument.getElementById("umbracoPreviewBadge")) {
|
||||
iframe.contentDocument.getElementById("umbracoPreviewBadge").style.display = "none";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
},
|
||||
controllerAs: "vm",
|
||||
bindings: {
|
||||
src: "<",
|
||||
onLoaded: "&"
|
||||
}
|
||||
}
|
||||
function reenterPreviewMode() {
|
||||
//Re-enter Preview Mode
|
||||
$http({
|
||||
method: 'POST',
|
||||
url: '../preview/enterPreview',
|
||||
params: {
|
||||
id: $scope.pageId
|
||||
}
|
||||
})
|
||||
startPreviewSession();
|
||||
}
|
||||
function getPageURL() {
|
||||
var culture = $location.search().culture || getParameterByName("culture");
|
||||
var relativeUrl = "/" + $scope.pageId;
|
||||
if (culture) {
|
||||
relativeUrl += '?culture=' + culture;
|
||||
}
|
||||
return relativeUrl;
|
||||
}
|
||||
|
||||
})
|
||||
function startPreviewSession() {
|
||||
// lets registrer this preview session.
|
||||
var amountOfPreviewSessions = Math.max(localStorage.getItem('UmbPreviewSessionAmount') || 0, 0);
|
||||
amountOfPreviewSessions++;
|
||||
localStorage.setItem('UmbPreviewSessionAmount', amountOfPreviewSessions);
|
||||
}
|
||||
function resetPreviewSessions() {
|
||||
localStorage.setItem('UmbPreviewSessionAmount', 0);
|
||||
}
|
||||
function endPreviewSession() {
|
||||
var amountOfPreviewSessions = localStorage.getItem('UmbPreviewSessionAmount') || 0;
|
||||
amountOfPreviewSessions--;
|
||||
localStorage.setItem('UmbPreviewSessionAmount', amountOfPreviewSessions);
|
||||
|
||||
.config(function ($locationProvider) {
|
||||
$locationProvider.html5Mode(false); //turn html5 mode off
|
||||
$locationProvider.hashPrefix('');
|
||||
if (amountOfPreviewSessions <= 0) {
|
||||
// We are good to end preview mode.
|
||||
navigator.sendBeacon("../preview/end");
|
||||
}
|
||||
}
|
||||
startPreviewSession();
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Preview devices */
|
||||
/*****************************************************************************/
|
||||
|
||||
// Set preview device
|
||||
$scope.updatePreviewDevice = function (device) {
|
||||
$scope.previewDevice = device;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Open website in preview mode */
|
||||
/*****************************************************************************/
|
||||
|
||||
$scope.openInBrowser = function () {
|
||||
setCookie("UMB-WEBSITE-PREVIEW-ACCEPT", "true", 5);
|
||||
window.open(getPageURL(), "_blank");
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Exit Preview */
|
||||
/*****************************************************************************/
|
||||
|
||||
$scope.exitPreview = function () {
|
||||
resetPreviewSessions();
|
||||
window.top.location.href = "../preview/end?redir=" + encodeURIComponent(getPageURL());
|
||||
};
|
||||
|
||||
$scope.onFrameLoaded = function (iframe) {
|
||||
|
||||
$scope.frameLoaded = true;
|
||||
configureSignalR(iframe);
|
||||
fixExternalLinks(iframe);
|
||||
|
||||
$scope.currentCultureIso = $location.search().culture || null;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Panel management */
|
||||
/*****************************************************************************/
|
||||
|
||||
$scope.openPreviewDevice = function () {
|
||||
$scope.showDevicesPreview = true;
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Change culture */
|
||||
/*****************************************************************************/
|
||||
$scope.changeCulture = function (iso) {
|
||||
if ($location.search().culture !== iso) {
|
||||
$scope.frameLoaded = false;
|
||||
$scope.currentCultureIso = iso;
|
||||
$location.search("culture", iso);
|
||||
setPageUrl();
|
||||
}
|
||||
};
|
||||
$scope.registerCulture = function (iso, title, isDefault) {
|
||||
var cultureObject = { iso: iso, title: title, isDefault: isDefault };
|
||||
cultures.push(cultureObject);
|
||||
}
|
||||
|
||||
$scope.$watch("currentCultureIso", function (oldIso, newIso) {
|
||||
// if no culture is selected, we will pick the default one:
|
||||
if ($scope.currentCultureIso === null) {
|
||||
$scope.currentCulture = cultures.find(function (culture) {
|
||||
return culture.isDefault === true;
|
||||
})
|
||||
return;
|
||||
}
|
||||
$scope.currentCulture = cultures.find(function (culture) {
|
||||
return culture.iso === $scope.currentCultureIso;
|
||||
})
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
||||
.component('previewIFrame', {
|
||||
template: "<div style='width:100%;height:100%;margin:0 auto;overflow:hidden;'><iframe id='resultFrame' src='about:blank' ng-src=\"{{vm.src}}\" frameborder='0'></iframe></div>",
|
||||
controller: function ($element, $scope, angularHelper) {
|
||||
|
||||
var vm = this;
|
||||
|
||||
vm.$postLink = function () {
|
||||
var resultFrame = $element.find("#resultFrame").get(0);
|
||||
resultFrame.addEventListener("load", iframeReady);
|
||||
};
|
||||
|
||||
function iframeReady() {
|
||||
var iframe = $element.find("#resultFrame").get(0);
|
||||
hideUmbracoPreviewBadge(iframe);
|
||||
angularHelper.safeApply($scope, function () {
|
||||
vm.onLoaded({ iframe: iframe });
|
||||
$scope.frameLoaded = true;
|
||||
});
|
||||
}
|
||||
|
||||
function hideUmbracoPreviewBadge(iframe) {
|
||||
if (iframe && iframe.contentDocument && iframe.contentDocument.getElementById("umbracoPreviewBadge")) {
|
||||
iframe.contentDocument.getElementById("umbracoPreviewBadge").style.display = "none";
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
},
|
||||
controllerAs: "vm",
|
||||
bindings: {
|
||||
src: "<",
|
||||
onLoaded: "&"
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
.config(function ($locationProvider) {
|
||||
$locationProvider.html5Mode(false); //turn html5 mode off
|
||||
$locationProvider.hashPrefix('');
|
||||
});
|
||||
|
||||
@@ -1,151 +1,151 @@
|
||||
const jsdom = require("jsdom");
|
||||
module.exports = function (config) {
|
||||
|
||||
config.set({
|
||||
config.set({
|
||||
|
||||
// base path, that will be used to resolve files and exclude
|
||||
basePath: '../..',
|
||||
// base path, that will be used to resolve files and exclude
|
||||
basePath: '../..',
|
||||
|
||||
frameworks: ['jasmine'],
|
||||
frameworks: ['jasmine'],
|
||||
|
||||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
|
||||
// Jasmine plugins
|
||||
|
||||
//libraries
|
||||
'node_modules/jquery/dist/jquery.min.js',
|
||||
'node_modules/angular/angular.min.js',
|
||||
'node_modules/angular-animate/angular-animate.min.js',
|
||||
'node_modules/angular-cookies/angular-cookies.min.js',
|
||||
'node_modules/angular-aria/angular-aria.min.js',
|
||||
'node_modules/angular-local-storage/dist/angular-local-storage.min.js',
|
||||
'node_modules/angular-route/angular-route.min.js',
|
||||
'node_modules/angular-sanitize/angular-sanitize.min.js',
|
||||
'node_modules/angular-mocks/angular-mocks.js',
|
||||
'node_modules/angular-ui-sortable/dist/sortable.min.js',
|
||||
'node_modules/underscore/underscore-min.js',
|
||||
'node_modules/moment/min/moment-with-locales.js',
|
||||
'lib/umbraco/Extensions.js',
|
||||
'node_modules/lazyload-js/LazyLoad.min.js',
|
||||
'node_modules/angular-dynamic-locale/dist/tmhDynamicLocale.min.js',
|
||||
// Jasmine plugins
|
||||
|
||||
//app bootstrap and loader
|
||||
'test/config/app.unit.js',
|
||||
//libraries
|
||||
'node_modules/jquery/dist/jquery.min.js',
|
||||
'node_modules/angular/angular.min.js',
|
||||
'node_modules/angular-animate/angular-animate.min.js',
|
||||
'node_modules/angular-cookies/angular-cookies.min.js',
|
||||
'node_modules/angular-aria/angular-aria.min.js',
|
||||
'node_modules/angular-local-storage/dist/angular-local-storage.min.js',
|
||||
'node_modules/angular-route/angular-route.min.js',
|
||||
'node_modules/angular-sanitize/angular-sanitize.min.js',
|
||||
'node_modules/angular-mocks/angular-mocks.js',
|
||||
'node_modules/angular-ui-sortable/dist/sortable.min.js',
|
||||
'node_modules/underscore/underscore-min.js',
|
||||
'node_modules/moment/min/moment-with-locales.js',
|
||||
'lib/umbraco/Extensions.js',
|
||||
'node_modules/lazyload-js/LazyLoad.min.js',
|
||||
'node_modules/angular-dynamic-locale/dist/tmhDynamicLocale.min.js',
|
||||
|
||||
//application files
|
||||
'../Umbraco.Web.UI/wwwroot/umbraco/js/*.controllers.min.js',
|
||||
'../Umbraco.Web.UI/wwwroot/umbraco/js/*.directives.min.js',
|
||||
'../Umbraco.Web.UI/wwwroot/umbraco/js/*.filters.min.js',
|
||||
'../Umbraco.Web.UI/wwwroot/umbraco/js/*.services.min.js',
|
||||
'../Umbraco.Web.UI/wwwroot/umbraco/js/*.interceptors.min.js',
|
||||
'../Umbraco.Web.UI/wwwroot/umbraco/js/*.resources.min.js',
|
||||
//app bootstrap and loader
|
||||
'test/config/app.unit.js',
|
||||
|
||||
//mocked data and routing
|
||||
'src/common/mocks/umbraco.servervariables.js',
|
||||
'src/common/mocks/**/*.js',
|
||||
//application files
|
||||
'../Umbraco.Web.UI/wwwroot/umbraco/js/*.controllers.min.js',
|
||||
'../Umbraco.Web.UI/wwwroot/umbraco/js/*.directives.min.js',
|
||||
'../Umbraco.Web.UI/wwwroot/umbraco/js/*.filters.min.js',
|
||||
'../Umbraco.Web.UI/wwwroot/umbraco/js/*.services.min.js',
|
||||
'../Umbraco.Web.UI/wwwroot/umbraco/js/*.interceptors.min.js',
|
||||
'../Umbraco.Web.UI/wwwroot/umbraco/js/*.resources.min.js',
|
||||
|
||||
//tests
|
||||
'test/unit/**/*.spec.js'
|
||||
],
|
||||
//mocked data and routing
|
||||
'src/common/mocks/umbraco.servervariables.js',
|
||||
'src/common/mocks/**/*.js',
|
||||
|
||||
// list of files to exclude
|
||||
exclude: [],
|
||||
//tests
|
||||
'test/unit/**/*.spec.js'
|
||||
],
|
||||
|
||||
// use dolts reporter, as travis terminal does not support escaping sequences
|
||||
// possible values: 'dots', 'progress', 'junit', 'spec'
|
||||
// ***
|
||||
// progress: Outputs a simple list like: "Executed 128 of 144 SUCCESS (0 secs / 0.814 secs)"
|
||||
// spec: Outputs a more verbose report which is more useful for debugging if one of the tests fails.
|
||||
// ***
|
||||
// CLI --reporters progress
|
||||
// list of files to exclude
|
||||
exclude: [],
|
||||
|
||||
reporters: ['spec', 'junit'],
|
||||
specReporter: {
|
||||
maxLogLines: 5, // limit number of lines logged per test
|
||||
suppressErrorSummary: true, // do not print error summary
|
||||
suppressFailed: false, // do not print information about failed tests
|
||||
suppressPassed: false, // do not print information about passed tests
|
||||
suppressSkipped: true, // do not print information about skipped tests
|
||||
showSpecTiming: false // print the time elapsed for each spec
|
||||
},
|
||||
// use dolts reporter, as travis terminal does not support escaping sequences
|
||||
// possible values: 'dots', 'progress', 'junit', 'spec'
|
||||
// ***
|
||||
// progress: Outputs a simple list like: "Executed 128 of 144 SUCCESS (0 secs / 0.814 secs)"
|
||||
// spec: Outputs a more verbose report which is more useful for debugging if one of the tests fails.
|
||||
// ***
|
||||
// CLI --reporters progress
|
||||
|
||||
reporters: ['spec', 'junit'],
|
||||
specReporter: {
|
||||
maxLogLines: 5, // limit number of lines logged per test
|
||||
suppressErrorSummary: true, // do not print error summary
|
||||
suppressFailed: false, // do not print information about failed tests
|
||||
suppressPassed: false, // do not print information about passed tests
|
||||
suppressSkipped: true, // do not print information about skipped tests
|
||||
showSpecTiming: false // print the time elapsed for each spec
|
||||
},
|
||||
|
||||
|
||||
// web server port
|
||||
// CLI --port 9876
|
||||
port: 9876,
|
||||
// web server port
|
||||
// CLI --port 9876
|
||||
port: 9876,
|
||||
|
||||
// cli runner port
|
||||
// CLI --runner-port 9100
|
||||
runnerPort: 9100,
|
||||
// cli runner port
|
||||
// CLI --runner-port 9100
|
||||
runnerPort: 9100,
|
||||
|
||||
// enable / disable colors in the output (reporters and logs)
|
||||
// CLI --colors --no-colors
|
||||
colors: true,
|
||||
// enable / disable colors in the output (reporters and logs)
|
||||
// CLI --colors --no-colors
|
||||
colors: true,
|
||||
|
||||
// level of logging
|
||||
// possible values: karma.LOG_DISABLE || karma.LOG_ERROR || karma.LOG_WARN || karma.LOG_INFO || karma.LOG_DEBUG
|
||||
// CLI --log-level debug
|
||||
logLevel: config.LOG_INFO,
|
||||
// level of logging
|
||||
// possible values: karma.LOG_DISABLE || karma.LOG_ERROR || karma.LOG_WARN || karma.LOG_INFO || karma.LOG_DEBUG
|
||||
// CLI --log-level debug
|
||||
logLevel: config.LOG_INFO,
|
||||
|
||||
// enable / disable watching file and executing tests whenever any file changes
|
||||
// CLI --auto-watch --no-auto-watch
|
||||
autoWatch: false,
|
||||
// enable / disable watching file and executing tests whenever any file changes
|
||||
// CLI --auto-watch --no-auto-watch
|
||||
autoWatch: false,
|
||||
|
||||
// Start these browsers, currently available:
|
||||
// - Chrome
|
||||
// - ChromeCanary
|
||||
// - Firefox
|
||||
// - Opera
|
||||
// - Safari (only Mac)
|
||||
// - PhantomJS
|
||||
// - IE (only Windows)
|
||||
// CLI --browsers Chrome,Firefox,Safari
|
||||
browsers: ['jsdom'],
|
||||
|
||||
// Configure a user agent so the log file gets generated properly
|
||||
jsdomLauncher: {
|
||||
jsdom: {
|
||||
resources: new jsdom.ResourceLoader({
|
||||
userAgent: "umbraco-test-suite",
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// allow waiting a bit longer, some machines require this
|
||||
// Start these browsers, currently available:
|
||||
// - Chrome
|
||||
// - ChromeCanary
|
||||
// - Firefox
|
||||
// - Opera
|
||||
// - Safari (only Mac)
|
||||
// - PhantomJS
|
||||
// - IE (only Windows)
|
||||
// CLI --browsers Chrome,Firefox,Safari
|
||||
browsers: ['jsdom'],
|
||||
|
||||
browserNoActivityTimeout: 100000, // default 10,000ms
|
||||
// Configure a user agent so the log file gets generated properly
|
||||
jsdomLauncher: {
|
||||
jsdom: {
|
||||
resources: new jsdom.ResourceLoader({
|
||||
userAgent: "umbraco-test-suite"
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
// Auto run tests on start (when browsers are captured) and exit
|
||||
// CLI --single-run --no-single-run
|
||||
singleRun: true,
|
||||
// allow waiting a bit longer, some machines require this
|
||||
|
||||
// report which specs are slower than 500ms
|
||||
// CLI --report-slower-than 500
|
||||
reportSlowerThan: 500,
|
||||
browserNoActivityTimeout: 100000, // default 10,000ms
|
||||
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-jsdom-launcher'),
|
||||
require('karma-junit-reporter'),
|
||||
require('karma-spec-reporter')
|
||||
],
|
||||
// Auto run tests on start (when browsers are captured) and exit
|
||||
// CLI --single-run --no-single-run
|
||||
singleRun: true,
|
||||
|
||||
// the default configuration
|
||||
junitReporter: {
|
||||
outputDir: '', // results will be saved as $outputDir/$browserName.xml
|
||||
outputFile: undefined, // if included, results will be saved as $outputDir/$browserName/$outputFile
|
||||
suite: '', // suite will become the package name attribute in xml testsuite element
|
||||
useBrowserName: true, // add browser name to report and classes names
|
||||
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
|
||||
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
|
||||
properties: {} // key value pair of properties to add to the <properties> section of the report
|
||||
},
|
||||
// report which specs are slower than 500ms
|
||||
// CLI --report-slower-than 500
|
||||
reportSlowerThan: 500,
|
||||
|
||||
client: {
|
||||
jasmine: {
|
||||
random: false
|
||||
}
|
||||
}
|
||||
});
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-jsdom-launcher'),
|
||||
require('karma-junit-reporter'),
|
||||
require('karma-spec-reporter')
|
||||
],
|
||||
|
||||
// the default configuration
|
||||
junitReporter: {
|
||||
outputDir: '', // results will be saved as $outputDir/$browserName.xml
|
||||
outputFile: undefined, // if included, results will be saved as $outputDir/$browserName/$outputFile
|
||||
suite: '', // suite will become the package name attribute in xml testsuite element
|
||||
useBrowserName: true, // add browser name to report and classes names
|
||||
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
|
||||
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
|
||||
properties: {} // key value pair of properties to add to the <properties> section of the report
|
||||
},
|
||||
|
||||
client: {
|
||||
jasmine: {
|
||||
random: false
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -117,13 +117,14 @@ context('Packages', () => {
|
||||
cy.deleteAllContent();
|
||||
cy.umbracoEnsureDocumentTypeNameNotExists(rootDocTypeName);
|
||||
cy.umbracoEnsurePackageNameNotExists(packageName);
|
||||
|
||||
|
||||
CreateSimplePackage();
|
||||
|
||||
// Navigate to create package section
|
||||
cy.umbracoSection('packages');
|
||||
cy.contains('Created').click();
|
||||
cy.contains('Delete').click();
|
||||
cy.wait(100);
|
||||
cy.contains('Yes, delete').click();
|
||||
|
||||
// Assert
|
||||
|
||||
@@ -1562,9 +1562,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/minimist": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
|
||||
"integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/ms": {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
"del": "^6.0.0",
|
||||
"ncp": "^2.0.0",
|
||||
"prompt": "^1.2.0",
|
||||
"umbraco-cypress-testhelpers": "^1.0.0-beta-65"
|
||||
"umbraco-cypress-testhelpers": "^1.0.0-beta-66"
|
||||
},
|
||||
"dependencies": {
|
||||
"typescript": "^3.9.2"
|
||||
|
||||
Reference in New Issue
Block a user