@oat-sa/tao-core-ui 1.62.0 → 1.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actionbar.js +3 -3
- package/dist/animable/absorbable/css/absorb.css.map +1 -1
- package/dist/animable/pulsable/css/pulse.css.map +1 -1
- package/dist/autocomplete/css/autocomplete.css.map +1 -1
- package/dist/autocomplete.js +8 -10
- package/dist/badge/css/badge.css.map +1 -1
- package/dist/breadcrumbs/css/breadcrumbs.css.map +1 -1
- package/dist/breadcrumbs.js +17 -17
- package/dist/btngrouper.js +3 -3
- package/dist/bulkActionPopup/css/bulkActionPopup.css.map +1 -1
- package/dist/calculator/css/calculator.css.map +1 -1
- package/dist/calculator.js +1 -1
- package/dist/cascadingComboBox.js +5 -5
- package/dist/ckeditor/ckConfigurator.js +9 -1
- package/dist/ckeditor/dtdHandler.js +4 -4
- package/dist/class/css/selector.css.map +1 -1
- package/dist/component/css/components.css.map +1 -1
- package/dist/component/css/windowComponent.css.map +1 -1
- package/dist/contextualPopup/css/contextualPopup.css.map +1 -1
- package/dist/contextualPopup.js +7 -7
- package/dist/dashboard/css/dashboard.css.map +1 -1
- package/dist/dashboard.js +3 -2
- package/dist/datalist/css/datalist.css.map +1 -1
- package/dist/datatable/css/datatable.css.map +1 -1
- package/dist/datatable/filterStrategy/single.js +2 -2
- package/dist/datatable.js +4 -4
- package/dist/dateRange/css/dateRange.css.map +1 -1
- package/dist/datetime/css/picker.css.map +1 -1
- package/dist/deleter.js +9 -9
- package/dist/destination/css/selector.css.map +1 -1
- package/dist/dialog.js +3 -5
- package/dist/documentViewer/css/documentViewer.css.map +1 -1
- package/dist/dropdown/css/dropdown.css.map +1 -1
- package/dist/durationer.js +6 -8
- package/dist/dynamicComponent/css/dynamicComponent.css.map +1 -1
- package/dist/dynamicComponent.js +2 -3
- package/dist/filesender.js +6 -8
- package/dist/filter.js +6 -10
- package/dist/form/css/dropdownForm.css.map +1 -1
- package/dist/form/css/form.css.map +1 -1
- package/dist/form/validator/css/validator.css.map +1 -1
- package/dist/form/widget/css/widget.css.map +1 -1
- package/dist/form.js +3 -3
- package/dist/formValidator/highlighters/highlighter.js +5 -4
- package/dist/formValidator/highlighters/message.js +1 -3
- package/dist/generis/form/css/form.css.map +1 -1
- package/dist/generis/validator/css/validator.css.map +1 -1
- package/dist/generis/widget/comboBox/comboBox.js +2 -2
- package/dist/generis/widget/css/widget.css.map +1 -1
- package/dist/generis/widget/hiddenBox/hiddenBox.js +2 -2
- package/dist/generis/widget/textBox/textBox.js +2 -2
- package/dist/groupedComboBox.js +3 -3
- package/dist/highlighter.js +49 -47
- package/dist/incrementer.js +17 -16
- package/dist/inplacer.js +4 -4
- package/dist/itemButtonList/css/item-button-list.css.map +1 -1
- package/dist/listbox/css/listbox.css.map +1 -1
- package/dist/listbox.js +1 -0
- package/dist/liststyler.js +1 -1
- package/dist/loadingButton/css/button.css.map +1 -1
- package/dist/lock.js +4 -4
- package/dist/login/login.js +4 -4
- package/dist/maths/calculator/css/calculator.css.map +1 -1
- package/dist/maths/calculator/plugins/screen/simpleScreen/simpleScreen.js +2 -2
- package/dist/mediaEditor/plugins/mediaDimension/helper.js +4 -4
- package/dist/mediaplayer/css/player.css.map +1 -1
- package/dist/mediaplayer/players/youtube.js +1 -1
- package/dist/mediaplayer/youtubeManager.js +1 -1
- package/dist/mediaplayer.js +3 -3
- package/dist/modal.js +1 -1
- package/dist/pageSizeSelector.js +3 -3
- package/dist/pagination/css/pagination.css.map +1 -1
- package/dist/pagination.js +5 -5
- package/dist/propertySelector/css/propertySelector.css.map +1 -1
- package/dist/propertySelector/propertySelector.js +3 -3
- package/dist/resource/css/selector.css.map +1 -1
- package/dist/resourcemgr/css/resourcemgr.css.map +1 -1
- package/dist/resourcemgr/fileSelector.js +6 -4
- package/dist/searchModal/css/advancedSearch.css.map +1 -1
- package/dist/searchModal/css/searchModal.css.map +1 -1
- package/dist/searchModal.js +16 -17
- package/dist/switch/css/switch.css.map +1 -1
- package/dist/tabs/css/tabs.css.map +1 -1
- package/dist/taskQueue/css/taskQueue.css.map +1 -1
- package/dist/taskQueue/status.js +4 -4
- package/dist/taskQueue/table.js +1 -1
- package/dist/taskQueue.js +7 -7
- package/dist/taskQueueButton/css/taskable.css.map +1 -1
- package/dist/taskQueueButton/css/treeButton.css.map +1 -1
- package/dist/taskQueueButton/treeButton.js +2 -2
- package/dist/toggler.js +4 -4
- package/dist/transformer.js +2 -2
- package/dist/tristateCheckboxGroup/css/tristateCheckboxGroup.css.map +1 -1
- package/dist/validator/Validator.js +4 -4
- package/dist/validator/validators.js +3 -5
- package/dist/validator.js +54 -54
- package/dist/waitingDialog/css/waitingDialog.css.map +1 -1
- package/package.json +3 -2
- package/scss/.DS_Store +0 -0
- package/scss/ckeditor/.DS_Store +0 -0
- package/scss/ckeditor/skins/.DS_Store +0 -0
- package/scss/ckeditor/skins/tao/.DS_Store +0 -0
- package/scss/ckeditor/skins/tao/scss/.DS_Store +0 -0
- package/scss/ckeditor/skins/tao/scss/inc/_ck-icons.scss +1 -0
- package/scss/font/.DS_Store +0 -0
- package/scss/font/tao/tao.svg +1 -0
- package/scss/font/tao/tao.ttf +0 -0
- package/scss/font/tao/tao.woff +0 -0
- package/scss/inc/.DS_Store +0 -0
- package/scss/inc/fonts/_tao-icon-classes.scss +2 -1
- package/scss/inc/fonts/_tao-icon-def.scss +3 -3
- package/scss/inc/fonts/_tao-icon-vars.scss +2 -1
- package/src/actionbar.js +7 -7
- package/src/animable/absorbable/css/absorb.css.map +1 -1
- package/src/animable/pulsable/css/pulse.css.map +1 -1
- package/src/autocomplete/css/autocomplete.css.map +1 -1
- package/src/autocomplete.js +74 -76
- package/src/badge/css/badge.css.map +1 -1
- package/src/breadcrumbs/css/breadcrumbs.css.map +1 -1
- package/src/breadcrumbs.js +17 -17
- package/src/btngrouper.js +14 -14
- package/src/bulkActionPopup/css/bulkActionPopup.css.map +1 -1
- package/src/calculator/css/calculator.css.map +1 -1
- package/src/calculator.js +11 -11
- package/src/cascadingComboBox.js +9 -9
- package/src/ckeditor/ckConfigurator.js +6 -0
- package/src/ckeditor/dtdHandler.js +15 -15
- package/src/class/css/selector.css.map +1 -1
- package/src/component/css/components.css.map +1 -1
- package/src/component/css/windowComponent.css.map +1 -1
- package/src/contextualPopup/css/contextualPopup.css.map +1 -1
- package/src/contextualPopup.js +11 -14
- package/src/css/basic.css +19 -5
- package/src/css/basic.css.map +1 -1
- package/src/dashboard/css/dashboard.css.map +1 -1
- package/src/dashboard.js +9 -14
- package/src/datalist/css/datalist.css.map +1 -1
- package/src/datatable/css/datatable.css.map +1 -1
- package/src/datatable/filterStrategy/single.js +7 -7
- package/src/datatable.js +6 -6
- package/src/dateRange/css/dateRange.css.map +1 -1
- package/src/datetime/css/picker.css.map +1 -1
- package/src/deleter.js +21 -21
- package/src/destination/css/selector.css.map +1 -1
- package/src/dialog.js +25 -25
- package/src/documentViewer/css/documentViewer.css.map +1 -1
- package/src/dropdown/css/dropdown.css.map +1 -1
- package/src/durationer.js +18 -20
- package/src/dynamicComponent/css/dynamicComponent.css.map +1 -1
- package/src/dynamicComponent.js +22 -23
- package/src/filesender.js +9 -11
- package/src/filter.js +8 -14
- package/src/form/css/dropdownForm.css.map +1 -1
- package/src/form/css/form.css.map +1 -1
- package/src/form/validator/css/validator.css.map +1 -1
- package/src/form/widget/css/widget.css.map +1 -1
- package/src/form.js +5 -11
- package/src/formValidator/highlighters/highlighter.js +6 -5
- package/src/formValidator/highlighters/message.js +1 -3
- package/src/generis/form/css/form.css.map +1 -1
- package/src/generis/validator/css/validator.css.map +1 -1
- package/src/generis/widget/comboBox/comboBox.js +0 -1
- package/src/generis/widget/css/widget.css.map +1 -1
- package/src/generis/widget/hiddenBox/hiddenBox.js +2 -3
- package/src/generis/widget/textBox/textBox.js +0 -1
- package/src/groupedComboBox.js +5 -5
- package/src/highlighter.js +99 -73
- package/src/incrementer.js +41 -52
- package/src/inplacer.js +21 -22
- package/src/itemButtonList/css/item-button-list.css.map +1 -1
- package/src/keyNavigation/navigableDomElement.js +22 -19
- package/src/keyNavigation/navigator.js +18 -26
- package/src/listbox/css/listbox.css.map +1 -1
- package/src/listbox.js +3 -2
- package/src/liststyler.js +7 -7
- package/src/loadingButton/css/button.css.map +1 -1
- package/src/lock.js +17 -19
- package/src/login/login.js +14 -19
- package/src/maths/calculator/css/calculator.css.map +1 -1
- package/src/maths/calculator/plugins/screen/simpleScreen/simpleScreen.js +7 -8
- package/src/mediaEditor/plugins/mediaDimension/helper.js +5 -4
- package/src/mediaplayer/css/player.css.map +1 -1
- package/src/mediaplayer/players/youtube.js +1 -1
- package/src/mediaplayer/youtubeManager.js +1 -1
- package/src/mediaplayer.js +3 -3
- package/src/modal.js +18 -18
- package/src/pageSizeSelector.js +7 -8
- package/src/pagination/css/pagination.css.map +1 -1
- package/src/pagination.js +14 -14
- package/src/propertySelector/css/propertySelector.css.map +1 -1
- package/src/propertySelector/propertySelector.js +3 -3
- package/src/resource/css/selector.css.map +1 -1
- package/src/resource/list.js +11 -11
- package/src/resource/tree.js +15 -17
- package/src/resourcemgr/css/resourcemgr.css.map +1 -1
- package/src/resourcemgr/fileSelector.js +46 -72
- package/src/searchModal/css/advancedSearch.css.map +1 -1
- package/src/searchModal/css/searchModal.css.map +1 -1
- package/src/searchModal.js +24 -25
- package/src/switch/css/switch.css.map +1 -1
- package/src/tabs/css/tabs.css.map +1 -1
- package/src/taskQueue/css/taskQueue.css.map +1 -1
- package/src/taskQueue/status.js +12 -12
- package/src/taskQueue/table.js +15 -15
- package/src/taskQueue.js +13 -15
- package/src/taskQueueButton/css/taskable.css.map +1 -1
- package/src/taskQueueButton/css/treeButton.css.map +1 -1
- package/src/taskQueueButton/treeButton.js +2 -3
- package/src/toggler.js +13 -13
- package/src/transformer.js +6 -6
- package/src/tristateCheckboxGroup/css/tristateCheckboxGroup.css.map +1 -1
- package/src/validator/Validator.js +15 -15
- package/src/validator/validators.js +10 -13
- package/src/validator.js +70 -72
- package/src/waitingDialog/css/waitingDialog.css.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../scss/inc/_functions.scss","../scss/tristateCheckboxGroup.scss","../../../scss/inc/fonts/_tao-icon-vars.scss","../../../scss/inc/_colors.scss"],"names":[],"mappings":"AAaA;;;;;;CCPC;AD2QD,oEAAA;AEjRA,gBAAA;ADEA;ICuMqC,gBAAgB;AD9LrD;;AATA;IAQoB,cELI;AFUxB","file":"tristateCheckboxGroup.css","sourcesContent":["@mixin iterate-sprite($iconList, $x, $y, $direction, $prefix:'') {\n @each $icon in $iconList {\n #{$prefix}#{$icon} {\n background-position: $x * 1px $y * 1px;\n }\n @if $direction == 'x' {\n $x: $x - 16;\n } @else {\n $y: $y - 16;\n }\n }\n}\n\n/*\nUsage:\n- linear-gradient((color1, color2, color3)) - returns linear-gradient with evenly distributed colors,\n if 3 colors used then the position of each will be 33,33%\n- linear-gradient((color1 0%, color2 30%, color3 80%)) - returns linear-gradient with manually distributed colors,\n first param - color, second - position. Also you can use px or other valid units for set position.\n*/\n@mixin linear-gradient($colorList, $direction: 'to right') {\n $percentage: 0;\n $units: '%';\n $count: length($colorList);\n $increment: 100 / ($count - 1);\n $css: #{$direction + ', '};\n $sep: ', ';\n @each $colorItem in $colorList {\n $color: $colorItem;\n @if (length($colorItem) > 1) {\n $color: nth($colorItem, 1);\n $percentage: nth($colorItem, 2);\n $units: '';\n }\n @if ($percentage >= 100 or index($colorList, $colorItem) == $count) {\n $sep: '';\n }\n $css: #{$css + $color + ' ' + $percentage + $units + $sep};\n $percentage: $percentage + $increment;\n }\n background: linear-gradient( #{$css} );\n}\n\n@mixin grid-unit($span, $numCols: 12, $gutter: 0) {\n $gridPx: 840;\n $rawSpanPx: (($gridPx - ($numCols * $gutter)) / $numCols);\n $spanPx: $rawSpanPx * $span + (($span - 1) * $gutter);\n $spanPercent: widthPerc($spanPx, $gridPx);\n $marginPercent: widthPerc($gutter, $gridPx);\n margin-left: $marginPercent;\n width: $spanPercent;\n}\n\n\n@mixin vendor-prefix($property, $value, $whatToPrefix: property, $prefixes: (-webkit-, -moz-, -ms-, -o-, '')) {\n @if $whatToPrefix == 'property' {\n @each $prefix in $prefixes {\n #{$prefix + $property}: #{$value};\n }\n }\n @else if $whatToPrefix == 'value' {\n @each $prefix in $prefixes {\n #{$property}: #{$prefix + $value};\n }\n }\n}\n@mixin flex-container($wrapBehavior: nowrap, $direction : row) {\n @include vendor-prefix(display, flex, value, (-ms-, -webkit-, ''));\n\n @include vendor-prefix(flex-direction, $direction, property, (-ms-, -webkit-, ''));\n @include vendor-prefix(flex-wrap, $wrapBehavior, property, (-ms-, -webkit-, ''));\n\n @include vendor-prefix(justify-content, flex-start, property, (-webkit-, ''));\n\n @include vendor-prefix(align-content, flex-start, property, (-webkit-, ''));\n\n @include vendor-prefix(align-items, stretch, property, (-webkit-, ''));\n}\n\n@mixin simple-flex-box($width: auto, $minWidth: 1) {\n\n @include vendor-prefix(order, 0, property, (-ms-, -webkit-, ''));\n flex-item-align: stretch;\n -ms-flex-item-align: stretch;\n @include vendor-prefix(align-self, stretch, property, (-webkit-, ''));\n\n // if both, min width and width are set, width will win this conflict\n @if ($width == auto) {\n @if ($minWidth != 1) {\n @include vendor-prefix(flex, 1 1 $minWidth, property, (-ms-, -webkit-, ''));\n }\n @else {\n @include vendor-prefix(flex, 1 1 auto, property, (-ms-, -webkit-, ''));\n // @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis#Values\n // for a discussion auto vs. main-size\n @include vendor-prefix(flex, 1 1, property, (-ms-, -webkit-, ''));\n }\n }\n @else {\n @include vendor-prefix(flex, 0 0 $width, property, (-ms-, -webkit-, ''));\n }\n}\n\n\n@mixin box-shadow($horiz: 1px, $vert: 1px, $blur: 2px, $spread: 0, $color: rgba(0, 0, 0, .2)) {\n @include vendor-prefix(box-shadow, $horiz $vert $blur $spread $color, property);\n}\n\n@mixin simple-border($color: #ddd) {\n border: 1px solid $color;\n border-radius: 2px;\n -webkit-border-radius: 2px;\n}\n\n@mixin border-radius($radius: 2) {\n -moz-border-radius: $radius * 1px;\n -webkit-border-radius: $radius * 1px;\n border-radius: $radius * 1px;\n}\n\n@mixin border-radius-top($radius: 2) {\n -webkit-border-top-left-radius: $radius * 1px;\n -webkit-border-top-right-radius: $radius * 1px;\n -moz-border-radius-topleft: $radius * 1px;\n -moz-border-radius-topright: $radius * 1px;\n border-top-left-radius: $radius * 1px;\n border-top-right-radius: $radius * 1px;\n}\n\n@mixin border-radius-bottom($radius: 2) {\n -webkit-border-bottom-right-radius: $radius * 1px;\n -webkit-border-bottom-left-radius: $radius * 1px;\n -moz-border-radius-bottomright: $radius * 1px;\n -moz-border-radius-bottomleft: $radius * 1px;\n border-bottom-right-radius: $radius * 1px;\n border-bottom-left-radius: $radius * 1px;\n}\n\n@mixin border-radius-left($radius: 2) {\n -webkit-border-top-left-radius: $radius * 1px;\n -webkit-border-bottom-left-radius: $radius * 1px;\n -moz-border-radius-topleft: $radius * 1px;\n -moz-border-radius-bottomleft: $radius * 1px;\n border-top-left-radius: $radius * 1px;\n border-bottom-left-radius: $radius * 1px;\n}\n\n@mixin border-radius-right($radius: 2) {\n -webkit-border-top-right-radius: $radius * 1px;\n -webkit-border-bottom-right-radius: $radius * 1px;\n -moz-border-radius-topright: $radius * 1px;\n -moz-border-radius-bottomright: $radius * 1px;\n border-top-right-radius: $radius * 1px;\n border-bottom-right-radius: $radius * 1px;\n}\n\n@mixin border-radius-top-left($radius: 2) {\n -webkit-border-top-left-radius: $radius * 1px;\n -moz-border-radius-topleft: $radius * 1px;\n border-top-left-radius: $radius * 1px;\n}\n\n@mixin border-radius-top-right($radius: 2) {\n -webkit-border-top-right-radius: $radius * 1px;\n -moz-border-radius-topright: $radius * 1px;\n border-top-right-radius: $radius * 1px;\n}\n\n@mixin border-radius-bottom-right($radius: 2) {\n -webkit-border-bottom-right-radius: $radius * 1px;\n -moz-border-radius-bottomright: $radius * 1px;\n border-bottom-right-radius: $radius * 1px;\n}\n\n@mixin border-radius-bottom-left($radius: 2) {\n -webkit-border-bottom-left-radius: $radius * 1px;\n -moz-border-radius-bottomleft: $radius * 1px;\n border-bottom-left-radius: $radius * 1px;\n}\n\n@mixin border-box() {\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n@function whiten($color, $white: 0.3) {\n @return mix(#fff, $color, ($white * 100) * 1%);\n}\n\n@function blacken($color, $black: 0.3) {\n @return mix(#000, $color, ($black * 100) * 1%);\n}\n\n@function widthPerc($colWidth, $context) {\n @return ($colWidth * 100 / $context) * 1%\n}\n\n@function remDist($fontSizePx) {\n @return ($fontSizePx / 10) * 1rem\n}\n\n@function black($alpha: 1) {\n @return (rgba(0, 0, 0, $alpha))\n}\n\n@function white($alpha: 1) {\n @return (rgba(255, 255, 255, $alpha))\n}\n\n@mixin font-size($remPx, $important: false) {\n @if $important == true {\n font-size: ($remPx) * 1px !important;\n font-size: ($remPx / 10) * 1rem !important;\n }\n @else {\n font-size: ($remPx) * 1px;\n font-size: ($remPx / 10) * 1rem;\n }\n}\n\n\n@mixin keyframes($name) {\n @-o-keyframes #{$name} { @content };\n @-moz-keyframes #{$name} { @content };\n @-webkit-keyframes #{$name} { @content };\n @keyframes #{$name} { @content };\n}\n\n\n@mixin animation($value, $type:'') {\n $animation: animation;\n @if $type != '' {\n $animation: $animation + '-' + $type;\n }\n @include vendor-prefix($animation, $value, property);\n}\n\n/// CSS transition mixin to the current selection (apply also vendor prefixes).\n/// See <https://developer.mozilla.org/en-US/docs/Web/CSS/transition> for the values\n///\n/// @param {property} [$type = all] the CSS property to apply the transition to\n/// @param {time} [$duration = .5s] the transition property\n/// @param {timing-function} [$effect = ease-out] the transition property\n@mixin transition($type : all, $duration : 0.5s, $effect : ease-out, $delay : 0s){\n @include vendor-prefix(transition, $type + ', ' + $duration + ', ' + $effect + ', ' + $delay, property);\n}\n\n@mixin fade($duration: 1s){\n\n @include keyframes(fade) {\n 0% {opacity:0;}\n 50% {opacity:1;}\n 100% {opacity:0;}\n }\n\n @include vendor-prefix(animation, fade 1s forwards, property);\n}\n\n@mixin repeat(){\n @include animation(infinite, iteration-count);\n}\n\n@mixin largeHeading() {\n @include font-size(20);\n font-family: $headingFont;\n font-style: normal;\n}\n\n@mixin disableSelect() {\n @include vendor-prefix(user-select, none, property);\n}\n\n/* based on \"visually-hidden\" mixin in LDS for accessibility goals */\n@mixin visuallyHidden() {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(1px, 1px, 1px, 1px);\n margin: 0;\n padding: 0;\n}\n","@import 'inc/bootstrap';\n\n.tristate-checkbox-group{\n li{\n label{\n input:indeterminate[type=\"checkbox\"] ~ .icon-checkbox::before{\n @include icon-checkbox-indeterminate;\n }\n .icon{\n &.cross{\n color : $error;\n }\n }\n }\n }\n}\n/*# sourceMappingURL=tristateCheckboxGroup.css.map */","/* Do not edit */@mixin tao-icon-setup {\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: 'tao' !important;\n speak: never;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n@mixin icon-info-bare { content: \"\\e923\"; }\n@mixin icon-bookmark-outline { content: \"\\e922\"; }\n@mixin icon-bookmark { content: \"\\e921\"; }\n@mixin icon-indicator { content: \"\\e920\"; }\n@mixin icon-add-subsection { content: \"\\e918\"; }\n@mixin icon-wrap-inline { content: \"\\e915\"; }\n@mixin icon-wrap-left { content: \"\\e916\"; }\n@mixin icon-wrap-right { content: \"\\e917\"; }\n@mixin icon-offline { content: \"\\e913\"; }\n@mixin icon-online { content: \"\\e914\"; }\n@mixin icon-tab { content: \"\\e90d\"; }\n@mixin icon-untab { content: \"\\e90e\"; }\n@mixin icon-multi-select { content: \"\\e90b\"; }\n@mixin icon-clipboard { content: \"\\e90a\"; }\n@mixin icon-filebox { content: \"\\e909\"; }\n@mixin icon-click-to-speak { content: \"\\e907\"; }\n@mixin icon-speech-bubble { content: \"\\f0e5\"; }\n@mixin icon-microphone { content: \"\\f130\"; }\n@mixin icon-microphone-off { content: \"\\f131\"; }\n@mixin icon-disconnect { content: \"\\e905\"; }\n@mixin icon-connect { content: \"\\e906\"; }\n@mixin icon-eliminate { content: \"\\e904\"; }\n@mixin icon-wheelchair { content: \"\\e903\"; }\n@mixin icon-text-marker { content: \"\\e902\"; }\n@mixin icon-unshield { content: \"\\e32a\"; }\n@mixin icon-shield { content: \"\\e8e8\"; }\n@mixin icon-tree { content: \"\\e6b4\"; }\n@mixin icon-home { content: \"\\e6b3\"; }\n@mixin icon-shared-file { content: \"\\e6b2\"; }\n@mixin icon-end-attempt { content: \"\\e603\"; }\n@mixin icon-icon { content: \"\\f1c5\"; }\n@mixin icon-radio-bg { content: \"\\e600\"; }\n@mixin icon-checkbox-bg { content: \"\\e601\"; }\n@mixin icon-tag { content: \"\\e602\"; }\n@mixin icon-style { content: \"\\e604\"; }\n@mixin icon-ownership-transfer { content: \"\\e605\"; }\n@mixin icon-property-advanced { content: \"\\e606\"; }\n@mixin icon-property-add { content: \"\\e607\"; }\n@mixin icon-repository-add { content: \"\\e608\"; }\n@mixin icon-repository-remove { content: \"\\e609\"; }\n@mixin icon-repository { content: \"\\e60a\"; }\n@mixin icon-result-server { content: \"\\e60b\"; }\n@mixin icon-folder { content: \"\\e60c\"; }\n@mixin icon-folder-open { content: \"\\e60d\"; }\n@mixin icon-left { content: \"\\e60e\"; }\n@mixin icon-right { content: \"\\e60f\"; }\n@mixin icon-up { content: \"\\e610\"; }\n@mixin icon-down { content: \"\\e611\"; }\n@mixin icon-undo { content: \"\\e612\"; }\n@mixin icon-redo { content: \"\\e613\"; }\n@mixin icon-screen { content: \"\\e614\"; }\n@mixin icon-laptop { content: \"\\e615\"; }\n@mixin icon-tablet { content: \"\\e616\"; }\n@mixin icon-phone { content: \"\\e617\"; }\n@mixin icon-move { content: \"\\e618\"; }\n@mixin icon-bin { content: \"\\e619\"; }\n@mixin icon-shuffle { content: \"\\e61a\"; }\n@mixin icon-print { content: \"\\e61b\"; }\n@mixin icon-tools { content: \"\\e61c\"; }\n@mixin icon-settings { content: \"\\e61d\"; }\n@mixin icon-video { content: \"\\e61e\"; }\n@mixin icon-find { content: \"\\e61f\"; }\n@mixin icon-image { content: \"\\e620\"; }\n@mixin icon-edit { content: \"\\e621\"; }\n@mixin icon-document { content: \"\\e622\"; }\n@mixin icon-resize-grid { content: \"\\e623\"; }\n@mixin icon-resize { content: \"\\e624\"; }\n@mixin icon-help { content: \"\\e625\"; }\n@mixin icon-mobile-menu { content: \"\\e626\"; }\n@mixin icon-fix { content: \"\\e627\"; }\n@mixin icon-unlock { content: \"\\e628\"; }\n@mixin icon-lock { content: \"\\e629\"; }\n@mixin icon-ul { content: \"\\e62a\"; }\n@mixin icon-ol { content: \"\\e62b\"; }\n@mixin icon-email { content: \"\\e62c\"; }\n@mixin icon-download { content: \"\\e62d\"; }\n@mixin icon-logout { content: \"\\e62e\"; }\n@mixin icon-login { content: \"\\e62f\"; }\n@mixin icon-spinner { content: \"\\e630\"; }\n@mixin icon-preview { content: \"\\e631\"; }\n@mixin icon-external { content: \"\\e632\"; }\n@mixin icon-time { content: \"\\e633\"; }\n@mixin icon-save { content: \"\\e634\"; }\n@mixin icon-warning { content: \"\\e635\"; }\n@mixin icon-add { content: \"\\e636\"; }\n@mixin icon-error { content: \"\\e900\"; }\n@mixin icon-close { content: \"\\e637\"; }\n@mixin icon-success { content: \"\\e638\"; }\n@mixin icon-remove { content: \"\\e639\"; }\n@mixin icon-info { content: \"\\e63a\"; }\n@mixin icon-danger { content: \"\\e63b\"; }\n@mixin icon-users { content: \"\\e63c\"; }\n@mixin icon-user { content: \"\\e63d\"; }\n@mixin icon-test-taker { content: \"\\e63e\"; }\n@mixin icon-test-takers { content: \"\\e63f\"; }\n@mixin icon-item { content: \"\\e640\"; }\n@mixin icon-test { content: \"\\e641\"; }\n@mixin icon-delivery { content: \"\\e642\"; }\n@mixin icon-eye-slash { content: \"\\e643\"; }\n@mixin icon-result { content: \"\\e644\"; }\n@mixin icon-delivery-small { content: \"\\e645\"; }\n@mixin icon-upload { content: \"\\e646\"; }\n@mixin icon-result-small { content: \"\\e647\"; }\n@mixin icon-mobile-preview { content: \"\\e648\"; }\n@mixin icon-extension { content: \"\\e649\"; }\n@mixin icon-desktop-preview { content: \"\\e64a\"; }\n@mixin icon-tablet-preview { content: \"\\e64b\"; }\n@mixin icon-insert-horizontal-line { content: \"\\e64c\"; }\n@mixin icon-table { content: \"\\e64d\"; }\n@mixin icon-anchor { content: \"\\e64e\"; }\n@mixin icon-unlink { content: \"\\e64f\"; }\n@mixin icon-link { content: \"\\e650\"; }\n@mixin icon-right-left { content: \"\\e651\"; }\n@mixin icon-left-right { content: \"\\e652\"; }\n@mixin icon-special-character { content: \"\\e653\"; }\n@mixin icon-source { content: \"\\e654\"; }\n@mixin icon-new-page { content: \"\\e655\"; }\n@mixin icon-templates { content: \"\\e656\"; }\n@mixin icon-cut { content: \"\\e657\"; }\n@mixin icon-replace { content: \"\\e658\"; }\n@mixin icon-copy { content: \"\\e659\"; }\n@mixin icon-paste { content: \"\\e65a\"; }\n@mixin icon-select-all { content: \"\\e65b\"; }\n@mixin icon-paste-text { content: \"\\e65c\"; }\n@mixin icon-paste-word { content: \"\\e65d\"; }\n@mixin icon-bold { content: \"\\e65e\"; }\n@mixin icon-italic { content: \"\\e65f\"; }\n@mixin icon-underline { content: \"\\e660\"; }\n@mixin icon-subscript { content: \"\\e661\"; }\n@mixin icon-superscript { content: \"\\e662\"; }\n@mixin icon-strike-through { content: \"\\e663\"; }\n@mixin icon-decrease-indent { content: \"\\e664\"; }\n@mixin icon-increase-indent { content: \"\\e665\"; }\n@mixin icon-block-quote { content: \"\\e666\"; }\n@mixin icon-div-container { content: \"\\e667\"; }\n@mixin icon-align-left { content: \"\\e668\"; }\n@mixin icon-center { content: \"\\e669\"; }\n@mixin icon-align-right { content: \"\\e66a\"; }\n@mixin icon-justify { content: \"\\e66b\"; }\n@mixin icon-choice { content: \"\\e66c\"; }\n@mixin icon-inline-choice { content: \"\\e66d\"; }\n@mixin icon-match { content: \"\\e66e\"; }\n@mixin icon-associate { content: \"\\e66f\"; }\n@mixin icon-media { content: \"\\e670\"; }\n@mixin icon-graphic-order { content: \"\\e671\"; }\n@mixin icon-hotspot { content: \"\\e672\"; }\n@mixin icon-graphic-gap { content: \"\\e673\"; }\n@mixin icon-graphic-associate { content: \"\\e674\"; }\n@mixin icon-select-point { content: \"\\e675\"; }\n@mixin icon-pin { content: \"\\e676\"; }\n@mixin icon-import { content: \"\\e677\"; }\n@mixin icon-export { content: \"\\e678\"; }\n@mixin icon-move-item { content: \"\\e679\"; }\n@mixin icon-meta-data { content: \"\\e67a\"; }\n@mixin icon-slider { content: \"\\e67b\"; }\n@mixin icon-summary-report { content: \"\\e67c\"; }\n@mixin icon-text-entry { content: \"\\e67d\"; }\n@mixin icon-extended-text { content: \"\\e67e\"; }\n@mixin icon-eraser { content: \"\\e67f\"; }\n@mixin icon-row { content: \"\\e680\"; }\n@mixin icon-column { content: \"\\e681\"; }\n@mixin icon-text-color { content: \"\\e682\"; }\n@mixin icon-background-color { content: \"\\e683\"; }\n@mixin icon-spell-check { content: \"\\e684\"; }\n@mixin icon-polygon { content: \"\\e685\"; }\n@mixin icon-rectangle { content: \"\\e686\"; }\n@mixin icon-gap-match { content: \"\\e687\"; }\n@mixin icon-order { content: \"\\e688\"; }\n@mixin icon-hottext { content: \"\\e689\"; }\n@mixin icon-free-form { content: \"\\e68a\"; }\n@mixin icon-step-backward { content: \"\\e68b\"; }\n@mixin icon-fast-backward { content: \"\\e68c\"; }\n@mixin icon-backward { content: \"\\e68d\"; }\n@mixin icon-play { content: \"\\e68e\"; }\n@mixin icon-pause { content: \"\\e68f\"; }\n@mixin icon-stop { content: \"\\e690\"; }\n@mixin icon-forward { content: \"\\e691\"; }\n@mixin icon-fast-forward { content: \"\\e692\"; }\n@mixin icon-step-forward { content: \"\\e693\"; }\n@mixin icon-ellipsis { content: \"\\e694\"; }\n@mixin icon-circle { content: \"\\e695\"; }\n@mixin icon-target { content: \"\\e696\"; }\n@mixin icon-guide-arrow { content: \"\\e697\"; }\n@mixin icon-range-slider-right { content: \"\\e698\"; }\n@mixin icon-range-slider-left { content: \"\\e699\"; }\n@mixin icon-radio-checked { content: \"\\e69a\"; }\n@mixin icon-checkbox-indeterminate { content: \"\\e901\"; }\n@mixin icon-checkbox { content: \"\\e69b\"; }\n@mixin icon-checkbox-crossed { content: \"\\e69c\"; }\n@mixin icon-checkbox-checked { content: \"\\e69d\"; }\n@mixin icon-result-nok { content: \"\\e69e\"; }\n@mixin icon-result-ok { content: \"\\e69f\"; }\n@mixin icon-not-evaluated { content: \"\\e6a0\"; }\n@mixin icon-filter { content: \"\\e6a1\"; }\n@mixin icon-translate { content: \"\\e6a2\"; }\n@mixin icon-eject { content: \"\\e6a3\"; }\n@mixin icon-continue { content: \"\\e6a4\"; }\n@mixin icon-radio { content: \"\\e6a5\"; }\n@mixin icon-sphere { content: \"\\e6a6\"; }\n@mixin icon-reset { content: \"\\e6a7\"; }\n@mixin icon-smaller { content: \"\\e6a8\"; }\n@mixin icon-larger { content: \"\\e6a9\"; }\n@mixin icon-clock { content: \"\\e6aa\"; }\n@mixin icon-font { content: \"\\e6ab\"; }\n@mixin icon-maths { content: \"\\e6ac\"; }\n@mixin icon-grip { content: \"\\e6ad\"; }\n@mixin icon-rubric { content: \"\\e6ae\"; }\n@mixin icon-audio { content: \"\\e6af\"; }\n@mixin icon-grip-h { content: \"\\e6b0\"; }\n@mixin icon-magicwand { content: \"\\e6b1\"; }\n@mixin icon-loop { content: \"\\ea2e\"; }\n@mixin icon-calendar { content: \"\\e953\"; }\n@mixin icon-reload { content: \"\\e984\"; }\n@mixin icon-speed { content: \"\\e9a6\"; }\n@mixin icon-volume { content: \"\\ea27\"; }\n@mixin icon-contrast { content: \"\\e9d5\"; }\n@mixin icon-headphones { content: \"\\e910\"; }\n@mixin icon-compress { content: \"\\f066\"; }\n@mixin icon-map-o { content: \"\\f278\"; }\n@mixin icon-variable { content: \"\\e908\"; }\n@mixin icon-tooltip { content: \"\\e90c\"; }\n@mixin icon-globe { content: \"\\e9c9\"; }\n@mixin icon-highlighter { content: \"\\e90f\"; }\n@mixin icon-eliminate-crossed { content: \"\\e911\"; }\n@mixin icon-play-from-here { content: \"\\e912\"; }\n","// buttons and alerts\n$success: rgb(14, 145, 75);\n$info: rgb(14, 93, 145);\n$warning: rgb(216, 174, 91);\n$danger: rgb(201, 96, 67);\n$error: rgb(186, 18, 43);\n$activeInteraction: rgb(195, 90, 19);\n\n// corporate identity\n$logoRed: rgb(186, 18, 43);\n$grey: rgb(173, 161, 148);\n$darkBlueGrey: rgb(164, 187, 197);\n$mediumBlueGrey: rgb(193, 212, 220);\n$lightBlueGrey: rgb(228, 236, 239);\n$brownRedGrey: rgb(154, 137, 123);\n$darkBrown: rgb(111, 99, 89);\n$websiteBorder: rgb(141, 148, 158);\n\n// ui elements, these should only variations of the above\n// naming convention: jQueryUi theme roller -> camelCase\n\n$textColor: #222;\n$textHighlight: white;\n$textSecondary: #737373;\n$shadowColor: rgba(0, 0, 0, 0.25);\n\n$modalBorderColor: #dddfe2;\n$searchInp: #dddfe2;\n\n$uiGeneralContentBg: white();\n$uiGeneralContentBorder: #ddd;\n\n$uiHeaderBg: #d4d5d7;\n\n$uiClickableDefaultBg: #f3f1ef;\n$uiClickableHoverBg: whiten($info, 0.2);\n//$uiClickableActiveBg: $uiHeaderBg;\n$uiClickableActiveBg: whiten($websiteBorder, 0.2);\n//$uiClickableActiveBg: #aaa;\n\n$uiSelectableSelectedBg: whiten($info, 0.2);\n$uiSelectableSelectedHoverBg: whiten($info, 0.1);\n$uiSelectableHoverBg: whiten($info, 0.9);\n\n$uiOverlay: $lightBlueGrey;\n\n// new layout. Implemented now only for review panel\n$uiReviewPanelBg: #f2f2f2;\n$uiReviewPanelTextDisabled: hsl(0, 0%, 45%);\n$uiReviewPanelTextDefault: hsl(0, 0%, 12%);\n$uiReviewPanelBgDefault: $uiGeneralContentBg;\n$uiReviewPanelPrimaryHighlight: hsl(208, 100%, 32%);\n$uiReviewPanelBgInverted: $uiReviewPanelTextDefault;\n$uiReviewPanelTextInverted: $uiGeneralContentBg;\n\n// sidebars etc.\n$canvas: mix(#fff, $grey, 85%);\n\n// colors taken from feedback.scss\n$successBgColor: whiten($success, 0.8);\n$successBorderColor: whiten($success, 0.1);\n\n$infoBgColor: whiten($info, 0.8);\n$infoBorderColor: whiten($info, 0.1);\n\n$warningBgColor: whiten($warning, 0.8);\n$warningBorderColor: whiten($warning, 0.1);\n\n$dangerBgColor: whiten($danger, 0.8);\n$dangerBorderColor: whiten($danger, 0.1);\n\n$errorBgColor: whiten($error, 0.8);\n$errorBorderColor: whiten($error, 0.1);\n\n$darkBar: rgb(51, 51, 51);\n$darkBarTxt: rgb(230, 230, 230);\n$darkBarIcon: rgb(220, 220, 220);\n\n$actionLinkColor: #276d9b;\n$actionLinkHoverColor: #4f83a7;\n\n$colorWheel-01: #c3ba13;\n$colorWheel-02: #84a610;\n$colorWheel-03: #2b8e0e;\n$colorWheel-04: #0f9787;\n$colorWheel-05: #0e5d91;\n$colorWheel-06: #0d2689;\n$colorWheel-07: #400d83;\n$colorWheel-08: #960e7d;\n$colorWheel-09: #ba122b;\n$colorWheel-10: #c34713;\n$colorWheel-11: #c36f13;\n$colorWheel-12: #c39413;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../scss/inc/_functions.scss","../scss/tristateCheckboxGroup.scss","../../../scss/inc/fonts/_tao-icon-vars.scss","../../../scss/inc/_colors.scss"],"names":[],"mappings":"AAaA;;;;;;CCPC;AD2QD,oEAAA;AEjRA,gBAAA;ADEA;ICwMqC,gBAAgB;AD/LrD;;AATA;IAQoB,cELI;AFUxB","file":"tristateCheckboxGroup.css","sourcesContent":["@mixin iterate-sprite($iconList, $x, $y, $direction, $prefix:'') {\n @each $icon in $iconList {\n #{$prefix}#{$icon} {\n background-position: $x * 1px $y * 1px;\n }\n @if $direction == 'x' {\n $x: $x - 16;\n } @else {\n $y: $y - 16;\n }\n }\n}\n\n/*\nUsage:\n- linear-gradient((color1, color2, color3)) - returns linear-gradient with evenly distributed colors,\n if 3 colors used then the position of each will be 33,33%\n- linear-gradient((color1 0%, color2 30%, color3 80%)) - returns linear-gradient with manually distributed colors,\n first param - color, second - position. Also you can use px or other valid units for set position.\n*/\n@mixin linear-gradient($colorList, $direction: 'to right') {\n $percentage: 0;\n $units: '%';\n $count: length($colorList);\n $increment: 100 / ($count - 1);\n $css: #{$direction + ', '};\n $sep: ', ';\n @each $colorItem in $colorList {\n $color: $colorItem;\n @if (length($colorItem) > 1) {\n $color: nth($colorItem, 1);\n $percentage: nth($colorItem, 2);\n $units: '';\n }\n @if ($percentage >= 100 or index($colorList, $colorItem) == $count) {\n $sep: '';\n }\n $css: #{$css + $color + ' ' + $percentage + $units + $sep};\n $percentage: $percentage + $increment;\n }\n background: linear-gradient( #{$css} );\n}\n\n@mixin grid-unit($span, $numCols: 12, $gutter: 0) {\n $gridPx: 840;\n $rawSpanPx: (($gridPx - ($numCols * $gutter)) / $numCols);\n $spanPx: $rawSpanPx * $span + (($span - 1) * $gutter);\n $spanPercent: widthPerc($spanPx, $gridPx);\n $marginPercent: widthPerc($gutter, $gridPx);\n margin-left: $marginPercent;\n width: $spanPercent;\n}\n\n\n@mixin vendor-prefix($property, $value, $whatToPrefix: property, $prefixes: (-webkit-, -moz-, -ms-, -o-, '')) {\n @if $whatToPrefix == 'property' {\n @each $prefix in $prefixes {\n #{$prefix + $property}: #{$value};\n }\n }\n @else if $whatToPrefix == 'value' {\n @each $prefix in $prefixes {\n #{$property}: #{$prefix + $value};\n }\n }\n}\n@mixin flex-container($wrapBehavior: nowrap, $direction : row) {\n @include vendor-prefix(display, flex, value, (-ms-, -webkit-, ''));\n\n @include vendor-prefix(flex-direction, $direction, property, (-ms-, -webkit-, ''));\n @include vendor-prefix(flex-wrap, $wrapBehavior, property, (-ms-, -webkit-, ''));\n\n @include vendor-prefix(justify-content, flex-start, property, (-webkit-, ''));\n\n @include vendor-prefix(align-content, flex-start, property, (-webkit-, ''));\n\n @include vendor-prefix(align-items, stretch, property, (-webkit-, ''));\n}\n\n@mixin simple-flex-box($width: auto, $minWidth: 1) {\n\n @include vendor-prefix(order, 0, property, (-ms-, -webkit-, ''));\n flex-item-align: stretch;\n -ms-flex-item-align: stretch;\n @include vendor-prefix(align-self, stretch, property, (-webkit-, ''));\n\n // if both, min width and width are set, width will win this conflict\n @if ($width == auto) {\n @if ($minWidth != 1) {\n @include vendor-prefix(flex, 1 1 $minWidth, property, (-ms-, -webkit-, ''));\n }\n @else {\n @include vendor-prefix(flex, 1 1 auto, property, (-ms-, -webkit-, ''));\n // @see https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis#Values\n // for a discussion auto vs. main-size\n @include vendor-prefix(flex, 1 1, property, (-ms-, -webkit-, ''));\n }\n }\n @else {\n @include vendor-prefix(flex, 0 0 $width, property, (-ms-, -webkit-, ''));\n }\n}\n\n\n@mixin box-shadow($horiz: 1px, $vert: 1px, $blur: 2px, $spread: 0, $color: rgba(0, 0, 0, .2)) {\n @include vendor-prefix(box-shadow, $horiz $vert $blur $spread $color, property);\n}\n\n@mixin simple-border($color: #ddd) {\n border: 1px solid $color;\n border-radius: 2px;\n -webkit-border-radius: 2px;\n}\n\n@mixin border-radius($radius: 2) {\n -moz-border-radius: $radius * 1px;\n -webkit-border-radius: $radius * 1px;\n border-radius: $radius * 1px;\n}\n\n@mixin border-radius-top($radius: 2) {\n -webkit-border-top-left-radius: $radius * 1px;\n -webkit-border-top-right-radius: $radius * 1px;\n -moz-border-radius-topleft: $radius * 1px;\n -moz-border-radius-topright: $radius * 1px;\n border-top-left-radius: $radius * 1px;\n border-top-right-radius: $radius * 1px;\n}\n\n@mixin border-radius-bottom($radius: 2) {\n -webkit-border-bottom-right-radius: $radius * 1px;\n -webkit-border-bottom-left-radius: $radius * 1px;\n -moz-border-radius-bottomright: $radius * 1px;\n -moz-border-radius-bottomleft: $radius * 1px;\n border-bottom-right-radius: $radius * 1px;\n border-bottom-left-radius: $radius * 1px;\n}\n\n@mixin border-radius-left($radius: 2) {\n -webkit-border-top-left-radius: $radius * 1px;\n -webkit-border-bottom-left-radius: $radius * 1px;\n -moz-border-radius-topleft: $radius * 1px;\n -moz-border-radius-bottomleft: $radius * 1px;\n border-top-left-radius: $radius * 1px;\n border-bottom-left-radius: $radius * 1px;\n}\n\n@mixin border-radius-right($radius: 2) {\n -webkit-border-top-right-radius: $radius * 1px;\n -webkit-border-bottom-right-radius: $radius * 1px;\n -moz-border-radius-topright: $radius * 1px;\n -moz-border-radius-bottomright: $radius * 1px;\n border-top-right-radius: $radius * 1px;\n border-bottom-right-radius: $radius * 1px;\n}\n\n@mixin border-radius-top-left($radius: 2) {\n -webkit-border-top-left-radius: $radius * 1px;\n -moz-border-radius-topleft: $radius * 1px;\n border-top-left-radius: $radius * 1px;\n}\n\n@mixin border-radius-top-right($radius: 2) {\n -webkit-border-top-right-radius: $radius * 1px;\n -moz-border-radius-topright: $radius * 1px;\n border-top-right-radius: $radius * 1px;\n}\n\n@mixin border-radius-bottom-right($radius: 2) {\n -webkit-border-bottom-right-radius: $radius * 1px;\n -moz-border-radius-bottomright: $radius * 1px;\n border-bottom-right-radius: $radius * 1px;\n}\n\n@mixin border-radius-bottom-left($radius: 2) {\n -webkit-border-bottom-left-radius: $radius * 1px;\n -moz-border-radius-bottomleft: $radius * 1px;\n border-bottom-left-radius: $radius * 1px;\n}\n\n@mixin border-box() {\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n@function whiten($color, $white: 0.3) {\n @return mix(#fff, $color, ($white * 100) * 1%);\n}\n\n@function blacken($color, $black: 0.3) {\n @return mix(#000, $color, ($black * 100) * 1%);\n}\n\n@function widthPerc($colWidth, $context) {\n @return ($colWidth * 100 / $context) * 1%\n}\n\n@function remDist($fontSizePx) {\n @return ($fontSizePx / 10) * 1rem\n}\n\n@function black($alpha: 1) {\n @return (rgba(0, 0, 0, $alpha))\n}\n\n@function white($alpha: 1) {\n @return (rgba(255, 255, 255, $alpha))\n}\n\n@mixin font-size($remPx, $important: false) {\n @if $important == true {\n font-size: ($remPx) * 1px !important;\n font-size: ($remPx / 10) * 1rem !important;\n }\n @else {\n font-size: ($remPx) * 1px;\n font-size: ($remPx / 10) * 1rem;\n }\n}\n\n\n@mixin keyframes($name) {\n @-o-keyframes #{$name} { @content };\n @-moz-keyframes #{$name} { @content };\n @-webkit-keyframes #{$name} { @content };\n @keyframes #{$name} { @content };\n}\n\n\n@mixin animation($value, $type:'') {\n $animation: animation;\n @if $type != '' {\n $animation: $animation + '-' + $type;\n }\n @include vendor-prefix($animation, $value, property);\n}\n\n/// CSS transition mixin to the current selection (apply also vendor prefixes).\n/// See <https://developer.mozilla.org/en-US/docs/Web/CSS/transition> for the values\n///\n/// @param {property} [$type = all] the CSS property to apply the transition to\n/// @param {time} [$duration = .5s] the transition property\n/// @param {timing-function} [$effect = ease-out] the transition property\n@mixin transition($type : all, $duration : 0.5s, $effect : ease-out, $delay : 0s){\n @include vendor-prefix(transition, $type + ', ' + $duration + ', ' + $effect + ', ' + $delay, property);\n}\n\n@mixin fade($duration: 1s){\n\n @include keyframes(fade) {\n 0% {opacity:0;}\n 50% {opacity:1;}\n 100% {opacity:0;}\n }\n\n @include vendor-prefix(animation, fade 1s forwards, property);\n}\n\n@mixin repeat(){\n @include animation(infinite, iteration-count);\n}\n\n@mixin largeHeading() {\n @include font-size(20);\n font-family: $headingFont;\n font-style: normal;\n}\n\n@mixin disableSelect() {\n @include vendor-prefix(user-select, none, property);\n}\n\n/* based on \"visually-hidden\" mixin in LDS for accessibility goals */\n@mixin visuallyHidden() {\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip: rect(1px, 1px, 1px, 1px);\n margin: 0;\n padding: 0;\n}\n","@import 'inc/bootstrap';\n\n.tristate-checkbox-group{\n li{\n label{\n input:indeterminate[type=\"checkbox\"] ~ .icon-checkbox::before{\n @include icon-checkbox-indeterminate;\n }\n .icon{\n &.cross{\n color : $error;\n }\n }\n }\n }\n}\n/*# sourceMappingURL=tristateCheckboxGroup.css.map */","/* Do not edit */@mixin tao-icon-setup {\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: 'tao' !important;\n speak: never;\n font-style: normal;\n font-weight: normal;\n font-variant: normal;\n text-transform: none;\n line-height: 1;\n\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n@mixin icon-furigana { content: \"\\e919\"; }\n@mixin icon-add-subsection { content: \"\\e918\"; }\n@mixin icon-info-bare { content: \"\\e923\"; }\n@mixin icon-bookmark-outline { content: \"\\e922\"; }\n@mixin icon-bookmark { content: \"\\e921\"; }\n@mixin icon-indicator { content: \"\\e920\"; }\n@mixin icon-wrap-inline { content: \"\\e915\"; }\n@mixin icon-wrap-left { content: \"\\e916\"; }\n@mixin icon-wrap-right { content: \"\\e917\"; }\n@mixin icon-offline { content: \"\\e913\"; }\n@mixin icon-online { content: \"\\e914\"; }\n@mixin icon-tab { content: \"\\e90d\"; }\n@mixin icon-untab { content: \"\\e90e\"; }\n@mixin icon-multi-select { content: \"\\e90b\"; }\n@mixin icon-clipboard { content: \"\\e90a\"; }\n@mixin icon-filebox { content: \"\\e909\"; }\n@mixin icon-click-to-speak { content: \"\\e907\"; }\n@mixin icon-speech-bubble { content: \"\\f0e5\"; }\n@mixin icon-microphone { content: \"\\f130\"; }\n@mixin icon-microphone-off { content: \"\\f131\"; }\n@mixin icon-disconnect { content: \"\\e905\"; }\n@mixin icon-connect { content: \"\\e906\"; }\n@mixin icon-eliminate { content: \"\\e904\"; }\n@mixin icon-wheelchair { content: \"\\e903\"; }\n@mixin icon-text-marker { content: \"\\e902\"; }\n@mixin icon-unshield { content: \"\\e32a\"; }\n@mixin icon-shield { content: \"\\e8e8\"; }\n@mixin icon-tree { content: \"\\e6b4\"; }\n@mixin icon-home { content: \"\\e6b3\"; }\n@mixin icon-shared-file { content: \"\\e6b2\"; }\n@mixin icon-end-attempt { content: \"\\e603\"; }\n@mixin icon-icon { content: \"\\f1c5\"; }\n@mixin icon-radio-bg { content: \"\\e600\"; }\n@mixin icon-checkbox-bg { content: \"\\e601\"; }\n@mixin icon-tag { content: \"\\e602\"; }\n@mixin icon-style { content: \"\\e604\"; }\n@mixin icon-ownership-transfer { content: \"\\e605\"; }\n@mixin icon-property-advanced { content: \"\\e606\"; }\n@mixin icon-property-add { content: \"\\e607\"; }\n@mixin icon-repository-add { content: \"\\e608\"; }\n@mixin icon-repository-remove { content: \"\\e609\"; }\n@mixin icon-repository { content: \"\\e60a\"; }\n@mixin icon-result-server { content: \"\\e60b\"; }\n@mixin icon-folder { content: \"\\e60c\"; }\n@mixin icon-folder-open { content: \"\\e60d\"; }\n@mixin icon-left { content: \"\\e60e\"; }\n@mixin icon-right { content: \"\\e60f\"; }\n@mixin icon-up { content: \"\\e610\"; }\n@mixin icon-down { content: \"\\e611\"; }\n@mixin icon-undo { content: \"\\e612\"; }\n@mixin icon-redo { content: \"\\e613\"; }\n@mixin icon-screen { content: \"\\e614\"; }\n@mixin icon-laptop { content: \"\\e615\"; }\n@mixin icon-tablet { content: \"\\e616\"; }\n@mixin icon-phone { content: \"\\e617\"; }\n@mixin icon-move { content: \"\\e618\"; }\n@mixin icon-bin { content: \"\\e619\"; }\n@mixin icon-shuffle { content: \"\\e61a\"; }\n@mixin icon-print { content: \"\\e61b\"; }\n@mixin icon-tools { content: \"\\e61c\"; }\n@mixin icon-settings { content: \"\\e61d\"; }\n@mixin icon-video { content: \"\\e61e\"; }\n@mixin icon-find { content: \"\\e61f\"; }\n@mixin icon-image { content: \"\\e620\"; }\n@mixin icon-edit { content: \"\\e621\"; }\n@mixin icon-document { content: \"\\e622\"; }\n@mixin icon-resize-grid { content: \"\\e623\"; }\n@mixin icon-resize { content: \"\\e624\"; }\n@mixin icon-help { content: \"\\e625\"; }\n@mixin icon-mobile-menu { content: \"\\e626\"; }\n@mixin icon-fix { content: \"\\e627\"; }\n@mixin icon-unlock { content: \"\\e628\"; }\n@mixin icon-lock { content: \"\\e629\"; }\n@mixin icon-ul { content: \"\\e62a\"; }\n@mixin icon-ol { content: \"\\e62b\"; }\n@mixin icon-email { content: \"\\e62c\"; }\n@mixin icon-download { content: \"\\e62d\"; }\n@mixin icon-logout { content: \"\\e62e\"; }\n@mixin icon-login { content: \"\\e62f\"; }\n@mixin icon-spinner { content: \"\\e630\"; }\n@mixin icon-preview { content: \"\\e631\"; }\n@mixin icon-external { content: \"\\e632\"; }\n@mixin icon-time { content: \"\\e633\"; }\n@mixin icon-save { content: \"\\e634\"; }\n@mixin icon-warning { content: \"\\e635\"; }\n@mixin icon-add { content: \"\\e636\"; }\n@mixin icon-error { content: \"\\e900\"; }\n@mixin icon-close { content: \"\\e637\"; }\n@mixin icon-success { content: \"\\e638\"; }\n@mixin icon-remove { content: \"\\e639\"; }\n@mixin icon-info { content: \"\\e63a\"; }\n@mixin icon-danger { content: \"\\e63b\"; }\n@mixin icon-users { content: \"\\e63c\"; }\n@mixin icon-user { content: \"\\e63d\"; }\n@mixin icon-test-taker { content: \"\\e63e\"; }\n@mixin icon-test-takers { content: \"\\e63f\"; }\n@mixin icon-item { content: \"\\e640\"; }\n@mixin icon-test { content: \"\\e641\"; }\n@mixin icon-delivery { content: \"\\e642\"; }\n@mixin icon-eye-slash { content: \"\\e643\"; }\n@mixin icon-result { content: \"\\e644\"; }\n@mixin icon-delivery-small { content: \"\\e645\"; }\n@mixin icon-upload { content: \"\\e646\"; }\n@mixin icon-result-small { content: \"\\e647\"; }\n@mixin icon-mobile-preview { content: \"\\e648\"; }\n@mixin icon-extension { content: \"\\e649\"; }\n@mixin icon-desktop-preview { content: \"\\e64a\"; }\n@mixin icon-tablet-preview { content: \"\\e64b\"; }\n@mixin icon-insert-horizontal-line { content: \"\\e64c\"; }\n@mixin icon-table { content: \"\\e64d\"; }\n@mixin icon-anchor { content: \"\\e64e\"; }\n@mixin icon-unlink { content: \"\\e64f\"; }\n@mixin icon-link { content: \"\\e650\"; }\n@mixin icon-right-left { content: \"\\e651\"; }\n@mixin icon-left-right { content: \"\\e652\"; }\n@mixin icon-special-character { content: \"\\e653\"; }\n@mixin icon-source { content: \"\\e654\"; }\n@mixin icon-new-page { content: \"\\e655\"; }\n@mixin icon-templates { content: \"\\e656\"; }\n@mixin icon-cut { content: \"\\e657\"; }\n@mixin icon-replace { content: \"\\e658\"; }\n@mixin icon-copy { content: \"\\e659\"; }\n@mixin icon-paste { content: \"\\e65a\"; }\n@mixin icon-select-all { content: \"\\e65b\"; }\n@mixin icon-paste-text { content: \"\\e65c\"; }\n@mixin icon-paste-word { content: \"\\e65d\"; }\n@mixin icon-bold { content: \"\\e65e\"; }\n@mixin icon-italic { content: \"\\e65f\"; }\n@mixin icon-underline { content: \"\\e660\"; }\n@mixin icon-subscript { content: \"\\e661\"; }\n@mixin icon-superscript { content: \"\\e662\"; }\n@mixin icon-strike-through { content: \"\\e663\"; }\n@mixin icon-decrease-indent { content: \"\\e664\"; }\n@mixin icon-increase-indent { content: \"\\e665\"; }\n@mixin icon-block-quote { content: \"\\e666\"; }\n@mixin icon-div-container { content: \"\\e667\"; }\n@mixin icon-align-left { content: \"\\e668\"; }\n@mixin icon-center { content: \"\\e669\"; }\n@mixin icon-align-right { content: \"\\e66a\"; }\n@mixin icon-justify { content: \"\\e66b\"; }\n@mixin icon-choice { content: \"\\e66c\"; }\n@mixin icon-inline-choice { content: \"\\e66d\"; }\n@mixin icon-match { content: \"\\e66e\"; }\n@mixin icon-associate { content: \"\\e66f\"; }\n@mixin icon-media { content: \"\\e670\"; }\n@mixin icon-graphic-order { content: \"\\e671\"; }\n@mixin icon-hotspot { content: \"\\e672\"; }\n@mixin icon-graphic-gap { content: \"\\e673\"; }\n@mixin icon-graphic-associate { content: \"\\e674\"; }\n@mixin icon-select-point { content: \"\\e675\"; }\n@mixin icon-pin { content: \"\\e676\"; }\n@mixin icon-import { content: \"\\e677\"; }\n@mixin icon-export { content: \"\\e678\"; }\n@mixin icon-move-item { content: \"\\e679\"; }\n@mixin icon-meta-data { content: \"\\e67a\"; }\n@mixin icon-slider { content: \"\\e67b\"; }\n@mixin icon-summary-report { content: \"\\e67c\"; }\n@mixin icon-text-entry { content: \"\\e67d\"; }\n@mixin icon-extended-text { content: \"\\e67e\"; }\n@mixin icon-eraser { content: \"\\e67f\"; }\n@mixin icon-row { content: \"\\e680\"; }\n@mixin icon-column { content: \"\\e681\"; }\n@mixin icon-text-color { content: \"\\e682\"; }\n@mixin icon-background-color { content: \"\\e683\"; }\n@mixin icon-spell-check { content: \"\\e684\"; }\n@mixin icon-polygon { content: \"\\e685\"; }\n@mixin icon-rectangle { content: \"\\e686\"; }\n@mixin icon-gap-match { content: \"\\e687\"; }\n@mixin icon-order { content: \"\\e688\"; }\n@mixin icon-hottext { content: \"\\e689\"; }\n@mixin icon-free-form { content: \"\\e68a\"; }\n@mixin icon-step-backward { content: \"\\e68b\"; }\n@mixin icon-fast-backward { content: \"\\e68c\"; }\n@mixin icon-backward { content: \"\\e68d\"; }\n@mixin icon-play { content: \"\\e68e\"; }\n@mixin icon-pause { content: \"\\e68f\"; }\n@mixin icon-stop { content: \"\\e690\"; }\n@mixin icon-forward { content: \"\\e691\"; }\n@mixin icon-fast-forward { content: \"\\e692\"; }\n@mixin icon-step-forward { content: \"\\e693\"; }\n@mixin icon-ellipsis { content: \"\\e694\"; }\n@mixin icon-circle { content: \"\\e695\"; }\n@mixin icon-target { content: \"\\e696\"; }\n@mixin icon-guide-arrow { content: \"\\e697\"; }\n@mixin icon-range-slider-right { content: \"\\e698\"; }\n@mixin icon-range-slider-left { content: \"\\e699\"; }\n@mixin icon-radio-checked { content: \"\\e69a\"; }\n@mixin icon-checkbox-indeterminate { content: \"\\e901\"; }\n@mixin icon-checkbox { content: \"\\e69b\"; }\n@mixin icon-checkbox-crossed { content: \"\\e69c\"; }\n@mixin icon-checkbox-checked { content: \"\\e69d\"; }\n@mixin icon-result-nok { content: \"\\e69e\"; }\n@mixin icon-result-ok { content: \"\\e69f\"; }\n@mixin icon-not-evaluated { content: \"\\e6a0\"; }\n@mixin icon-filter { content: \"\\e6a1\"; }\n@mixin icon-translate { content: \"\\e6a2\"; }\n@mixin icon-eject { content: \"\\e6a3\"; }\n@mixin icon-continue { content: \"\\e6a4\"; }\n@mixin icon-radio { content: \"\\e6a5\"; }\n@mixin icon-sphere { content: \"\\e6a6\"; }\n@mixin icon-reset { content: \"\\e6a7\"; }\n@mixin icon-smaller { content: \"\\e6a8\"; }\n@mixin icon-larger { content: \"\\e6a9\"; }\n@mixin icon-clock { content: \"\\e6aa\"; }\n@mixin icon-font { content: \"\\e6ab\"; }\n@mixin icon-maths { content: \"\\e6ac\"; }\n@mixin icon-grip { content: \"\\e6ad\"; }\n@mixin icon-rubric { content: \"\\e6ae\"; }\n@mixin icon-audio { content: \"\\e6af\"; }\n@mixin icon-grip-h { content: \"\\e6b0\"; }\n@mixin icon-magicwand { content: \"\\e6b1\"; }\n@mixin icon-loop { content: \"\\ea2e\"; }\n@mixin icon-calendar { content: \"\\e953\"; }\n@mixin icon-reload { content: \"\\e984\"; }\n@mixin icon-speed { content: \"\\e9a6\"; }\n@mixin icon-volume { content: \"\\ea27\"; }\n@mixin icon-contrast { content: \"\\e9d5\"; }\n@mixin icon-headphones { content: \"\\e910\"; }\n@mixin icon-compress { content: \"\\f066\"; }\n@mixin icon-map-o { content: \"\\f278\"; }\n@mixin icon-variable { content: \"\\e908\"; }\n@mixin icon-tooltip { content: \"\\e90c\"; }\n@mixin icon-globe { content: \"\\e9c9\"; }\n@mixin icon-highlighter { content: \"\\e90f\"; }\n@mixin icon-eliminate-crossed { content: \"\\e911\"; }\n@mixin icon-play-from-here { content: \"\\e912\"; }\n","// buttons and alerts\n$success: rgb(14, 145, 75);\n$info: rgb(14, 93, 145);\n$warning: rgb(216, 174, 91);\n$danger: rgb(201, 96, 67);\n$error: rgb(186, 18, 43);\n$activeInteraction: rgb(195, 90, 19);\n\n// corporate identity\n$logoRed: rgb(186, 18, 43);\n$grey: rgb(173, 161, 148);\n$darkBlueGrey: rgb(164, 187, 197);\n$mediumBlueGrey: rgb(193, 212, 220);\n$lightBlueGrey: rgb(228, 236, 239);\n$brownRedGrey: rgb(154, 137, 123);\n$darkBrown: rgb(111, 99, 89);\n$websiteBorder: rgb(141, 148, 158);\n\n// ui elements, these should only variations of the above\n// naming convention: jQueryUi theme roller -> camelCase\n\n$textColor: #222;\n$textHighlight: white;\n$textSecondary: #737373;\n$shadowColor: rgba(0, 0, 0, 0.25);\n\n$modalBorderColor: #dddfe2;\n$searchInp: #dddfe2;\n\n$uiGeneralContentBg: white();\n$uiGeneralContentBorder: #ddd;\n\n$uiHeaderBg: #d4d5d7;\n\n$uiClickableDefaultBg: #f3f1ef;\n$uiClickableHoverBg: whiten($info, 0.2);\n//$uiClickableActiveBg: $uiHeaderBg;\n$uiClickableActiveBg: whiten($websiteBorder, 0.2);\n//$uiClickableActiveBg: #aaa;\n\n$uiSelectableSelectedBg: whiten($info, 0.2);\n$uiSelectableSelectedHoverBg: whiten($info, 0.1);\n$uiSelectableHoverBg: whiten($info, 0.9);\n\n$uiOverlay: $lightBlueGrey;\n\n// new layout. Implemented now only for review panel\n$uiReviewPanelBg: #f2f2f2;\n$uiReviewPanelTextDisabled: hsl(0, 0%, 45%);\n$uiReviewPanelTextDefault: hsl(0, 0%, 12%);\n$uiReviewPanelBgDefault: $uiGeneralContentBg;\n$uiReviewPanelPrimaryHighlight: hsl(208, 100%, 32%);\n$uiReviewPanelBgInverted: $uiReviewPanelTextDefault;\n$uiReviewPanelTextInverted: $uiGeneralContentBg;\n\n// sidebars etc.\n$canvas: mix(#fff, $grey, 85%);\n\n// colors taken from feedback.scss\n$successBgColor: whiten($success, 0.8);\n$successBorderColor: whiten($success, 0.1);\n\n$infoBgColor: whiten($info, 0.8);\n$infoBorderColor: whiten($info, 0.1);\n\n$warningBgColor: whiten($warning, 0.8);\n$warningBorderColor: whiten($warning, 0.1);\n\n$dangerBgColor: whiten($danger, 0.8);\n$dangerBorderColor: whiten($danger, 0.1);\n\n$errorBgColor: whiten($error, 0.8);\n$errorBorderColor: whiten($error, 0.1);\n\n$darkBar: rgb(51, 51, 51);\n$darkBarTxt: rgb(230, 230, 230);\n$darkBarIcon: rgb(220, 220, 220);\n\n$actionLinkColor: #276d9b;\n$actionLinkHoverColor: #4f83a7;\n\n$colorWheel-01: #c3ba13;\n$colorWheel-02: #84a610;\n$colorWheel-03: #2b8e0e;\n$colorWheel-04: #0f9787;\n$colorWheel-05: #0e5d91;\n$colorWheel-06: #0d2689;\n$colorWheel-07: #400d83;\n$colorWheel-08: #960e7d;\n$colorWheel-09: #ba122b;\n$colorWheel-10: #c34713;\n$colorWheel-11: #c36f13;\n$colorWheel-12: #c39413;\n"]}
|
|
@@ -3,7 +3,7 @@ import async from 'async';
|
|
|
3
3
|
import Report from 'ui/validator/Report';
|
|
4
4
|
import validators from 'ui/validator/validators';
|
|
5
5
|
|
|
6
|
-
var _buildRule = function(rule) {
|
|
6
|
+
var _buildRule = function (rule) {
|
|
7
7
|
var ret = null;
|
|
8
8
|
var _rules = validators.validators;
|
|
9
9
|
if (_.isString(rule) && _rules[rule]) {
|
|
@@ -22,22 +22,22 @@ var _defaultOptions = {
|
|
|
22
22
|
lazy: false
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
var _applyRules = function(value, rule, callback, options) {
|
|
25
|
+
var _applyRules = function (value, rule, callback, options) {
|
|
26
26
|
options = _.merge(_.cloneDeep(rule.options), options);
|
|
27
27
|
rule.validate(value, callback, options);
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
var Validator = function(rules, options) {
|
|
30
|
+
var Validator = function (rules, options) {
|
|
31
31
|
this.options = _.merge(_.cloneDeep(_defaultOptions), options);
|
|
32
32
|
this.rules = [];
|
|
33
33
|
this.addRules(rules);
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
Validator.getDefaultOptions = function() {
|
|
36
|
+
Validator.getDefaultOptions = function () {
|
|
37
37
|
return _.clone(_defaultOptions);
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
Validator.prototype.validate = function(value, arg1, arg2) {
|
|
40
|
+
Validator.prototype.validate = function (value, arg1, arg2) {
|
|
41
41
|
var callstack = [],
|
|
42
42
|
callback,
|
|
43
43
|
options = _.cloneDeep(this.options);
|
|
@@ -51,21 +51,21 @@ Validator.prototype.validate = function(value, arg1, arg2) {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
_.each(this.rules, function(rule) {
|
|
54
|
+
_.each(this.rules, function (rule) {
|
|
55
55
|
//note: individual validating option reserved for a later usage:
|
|
56
56
|
var validatorOptions = {},
|
|
57
57
|
message;
|
|
58
58
|
|
|
59
|
-
callstack.push(function(cb) {
|
|
59
|
+
callstack.push(function (cb) {
|
|
60
60
|
_applyRules(
|
|
61
61
|
value,
|
|
62
62
|
rule,
|
|
63
|
-
function(success) {
|
|
63
|
+
function (success) {
|
|
64
64
|
if (success) {
|
|
65
65
|
cb(null, new Report('success', { validator: rule.name }));
|
|
66
66
|
} else {
|
|
67
67
|
message = rule.options.message || rule.message;
|
|
68
|
-
|
|
68
|
+
const report = new Report('failure', { validator: rule.name, message: message });
|
|
69
69
|
if (options.lazy) {
|
|
70
70
|
cb(new Error('lazy mode'), report); //stop execution now
|
|
71
71
|
} else {
|
|
@@ -78,7 +78,7 @@ Validator.prototype.validate = function(value, arg1, arg2) {
|
|
|
78
78
|
});
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
async.series(callstack, function(err, results) {
|
|
81
|
+
async.series(callstack, function (err, results) {
|
|
82
82
|
if (_.isFunction(callback)) {
|
|
83
83
|
callback(results);
|
|
84
84
|
}
|
|
@@ -87,7 +87,7 @@ Validator.prototype.validate = function(value, arg1, arg2) {
|
|
|
87
87
|
return this;
|
|
88
88
|
};
|
|
89
89
|
|
|
90
|
-
Validator.prototype.addRule = function(rule) {
|
|
90
|
+
Validator.prototype.addRule = function (rule) {
|
|
91
91
|
var _rules = validators.validators;
|
|
92
92
|
if (_.isString(rule) && _rules[rule]) {
|
|
93
93
|
this.rules.push(_rules[rule]);
|
|
@@ -97,10 +97,10 @@ Validator.prototype.addRule = function(rule) {
|
|
|
97
97
|
return this;
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
-
Validator.prototype.addRules = function(rules) {
|
|
101
|
-
var
|
|
102
|
-
_.each(rules,
|
|
103
|
-
|
|
100
|
+
Validator.prototype.addRules = function (rules) {
|
|
101
|
+
var self = this;
|
|
102
|
+
_.each(rules, (rule) => {
|
|
103
|
+
self.addRule(rule);
|
|
104
104
|
});
|
|
105
105
|
return this;
|
|
106
106
|
};
|
|
@@ -71,7 +71,7 @@ var validators = {
|
|
|
71
71
|
name: 'numeric',
|
|
72
72
|
message: __('The value of this field must be numeric'),
|
|
73
73
|
options: {},
|
|
74
|
-
validate: function(value, callback) {
|
|
74
|
+
validate: function (value, callback) {
|
|
75
75
|
var parsedValue = parseFloat(value),
|
|
76
76
|
r = parsedValue.toString() === value.toString() && _.isNumber(parsedValue) && !_.isNaN(parsedValue);
|
|
77
77
|
|
|
@@ -84,7 +84,7 @@ var validators = {
|
|
|
84
84
|
name: 'notEmpty',
|
|
85
85
|
message: __('this is required'),
|
|
86
86
|
options: {},
|
|
87
|
-
validate: function(value, callback) {
|
|
87
|
+
validate: function (value, callback) {
|
|
88
88
|
var r;
|
|
89
89
|
if (_.isNumber(value)) {
|
|
90
90
|
r = true;
|
|
@@ -106,7 +106,7 @@ var validators = {
|
|
|
106
106
|
name: 'length',
|
|
107
107
|
message: __('required length'),
|
|
108
108
|
options: { min: 0, max: 0 },
|
|
109
|
-
validate: function(value, callback, options) {
|
|
109
|
+
validate: function (value, callback, options) {
|
|
110
110
|
var r = false;
|
|
111
111
|
if (value.length >= options.min) {
|
|
112
112
|
if (options.max) {
|
|
@@ -124,8 +124,8 @@ var validators = {
|
|
|
124
124
|
name: 'fileExists',
|
|
125
125
|
message: __('no file not found in this location'),
|
|
126
126
|
options: { baseUrl: '' },
|
|
127
|
-
validate: (function() {
|
|
128
|
-
return function(value, callback, options) {
|
|
127
|
+
validate: (function () {
|
|
128
|
+
return function (value, callback, options) {
|
|
129
129
|
if (!value) {
|
|
130
130
|
callback(false);
|
|
131
131
|
return;
|
|
@@ -142,12 +142,10 @@ var validators = {
|
|
|
142
142
|
//FIXME change this to use an URL without transfomations. the validator should be called with the right URL,
|
|
143
143
|
//here it works only for the getFile service...
|
|
144
144
|
url: options.baseUrl + encodeURIComponent(value),
|
|
145
|
-
success: function() {
|
|
145
|
+
success: function () {
|
|
146
146
|
callback(true);
|
|
147
147
|
},
|
|
148
|
-
error:
|
|
149
|
-
callback(false);
|
|
150
|
-
}
|
|
148
|
+
error: () => callback(false)
|
|
151
149
|
});
|
|
152
150
|
} else {
|
|
153
151
|
callback(true);
|
|
@@ -159,9 +157,9 @@ var validators = {
|
|
|
159
157
|
name: 'validRegex',
|
|
160
158
|
message: __('invalid regular expression'),
|
|
161
159
|
options: {},
|
|
162
|
-
validate: function(value, callback) {
|
|
160
|
+
validate: function (value, callback) {
|
|
163
161
|
if (typeof callback === 'function') {
|
|
164
|
-
|
|
162
|
+
let valid = false;
|
|
165
163
|
if (value !== '') {
|
|
166
164
|
try {
|
|
167
165
|
new RegExp('^' + value + '$');
|
|
@@ -199,8 +197,7 @@ var register = function registerValidator(name, validator, force) {
|
|
|
199
197
|
|
|
200
198
|
if (!_.isObject(validator) || !_.isString(validator.message) || !_.isFunction(validator.validate)) {
|
|
201
199
|
throw new Error(
|
|
202
|
-
|
|
203
|
-
JSON.stringify(validator)
|
|
200
|
+
`A validator must be an object with a message and a validate method, but given : ${JSON.stringify(validator)}`
|
|
204
201
|
);
|
|
205
202
|
}
|
|
206
203
|
|
package/src/validator.js
CHANGED
|
@@ -3,6 +3,32 @@ import _ from 'lodash';
|
|
|
3
3
|
import Report from 'ui/validator/Report';
|
|
4
4
|
import Validator from 'ui/validator/Validator';
|
|
5
5
|
|
|
6
|
+
const methods = {
|
|
7
|
+
destroy: function () {
|
|
8
|
+
destroy($(this));
|
|
9
|
+
},
|
|
10
|
+
validate: function (arg1, arg2) {
|
|
11
|
+
var callback,
|
|
12
|
+
options = {};
|
|
13
|
+
|
|
14
|
+
//prepare args:
|
|
15
|
+
if (_.isFunction(arg1)) {
|
|
16
|
+
callback = arg1;
|
|
17
|
+
} else if (_.isObject(arg1)) {
|
|
18
|
+
_.merge(options, arg1); //treat it like the options array:
|
|
19
|
+
if (_.isFunction(arg2)) {
|
|
20
|
+
callback = arg2;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
//event the callback is optional, since we may set an event listener instead
|
|
25
|
+
validate($(this), callback, options);
|
|
26
|
+
},
|
|
27
|
+
getValidator: function () {
|
|
28
|
+
return $(this).data('validator-instance');
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
6
32
|
/**
|
|
7
33
|
* Validate the set of matched elements (inputs).
|
|
8
34
|
*
|
|
@@ -15,12 +41,11 @@ import Validator from 'ui/validator/Validator';
|
|
|
15
41
|
* @param {object} [options.validator]
|
|
16
42
|
* @param {boolean} [options.validator.lazy]
|
|
17
43
|
* @param {string|Array} [options.events] - event that triggers the validation
|
|
18
|
-
* @param {object} arg1 - the validator options
|
|
19
44
|
* @fires validated.group
|
|
20
45
|
* @returns {jQueryElement} for chaining
|
|
21
46
|
*/
|
|
22
47
|
|
|
23
|
-
$.fn.validator = function(options
|
|
48
|
+
$.fn.validator = function (options) {
|
|
24
49
|
var opts = {},
|
|
25
50
|
method = '',
|
|
26
51
|
args = [],
|
|
@@ -28,7 +53,7 @@ $.fn.validator = function(options, arg1, arg2) {
|
|
|
28
53
|
|
|
29
54
|
if (typeof options === 'object') {
|
|
30
55
|
opts = $.extend({}, $.fn.validator.defaults, options);
|
|
31
|
-
} else if (options === undefined) {
|
|
56
|
+
} else if (typeof options === 'undefined') {
|
|
32
57
|
opts = $.extend({}, $.fn.validator.defaults); //use default
|
|
33
58
|
} else if (typeof options === 'string') {
|
|
34
59
|
if (typeof methods[options] === 'function') {
|
|
@@ -37,7 +62,7 @@ $.fn.validator = function(options, arg1, arg2) {
|
|
|
37
62
|
}
|
|
38
63
|
}
|
|
39
64
|
|
|
40
|
-
this.each(function() {
|
|
65
|
+
this.each(function () {
|
|
41
66
|
var $this = $(this);
|
|
42
67
|
|
|
43
68
|
if (!isCreated($this)) {
|
|
@@ -52,7 +77,7 @@ $.fn.validator = function(options, arg1, arg2) {
|
|
|
52
77
|
}
|
|
53
78
|
});
|
|
54
79
|
|
|
55
|
-
return ret === undefined ? this : ret;
|
|
80
|
+
return typeof ret === 'undefined' ? this : ret;
|
|
56
81
|
};
|
|
57
82
|
|
|
58
83
|
$.fn.validator.defaults = {
|
|
@@ -66,32 +91,6 @@ function isCreated($elt) {
|
|
|
66
91
|
return typeof $elt.data('validator-config') === 'object';
|
|
67
92
|
}
|
|
68
93
|
|
|
69
|
-
var methods = {
|
|
70
|
-
destroy: function() {
|
|
71
|
-
destroy($(this));
|
|
72
|
-
},
|
|
73
|
-
validate: function(arg1, arg2) {
|
|
74
|
-
var callback,
|
|
75
|
-
options = {};
|
|
76
|
-
|
|
77
|
-
//prepare args:
|
|
78
|
-
if (_.isFunction(arg1)) {
|
|
79
|
-
callback = arg1;
|
|
80
|
-
} else if (_.isObject(arg1)) {
|
|
81
|
-
_.merge(options, arg1); //treat it like the options array:
|
|
82
|
-
if (_.isFunction(arg2)) {
|
|
83
|
-
callback = arg2;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
//event the callback is optional, since we may set an event listener instead
|
|
88
|
-
validate($(this), callback, options);
|
|
89
|
-
},
|
|
90
|
-
getValidator: function() {
|
|
91
|
-
return $(this).data('validator-instance');
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
|
|
95
94
|
/**
|
|
96
95
|
* rule must have been set in the following string format:
|
|
97
96
|
* $validatorName1; $validatorName2(optionName1=optionValue1, optionName2=optionValue2)
|
|
@@ -102,42 +101,41 @@ var methods = {
|
|
|
102
101
|
* @param {type} $elt
|
|
103
102
|
* @returns {object}
|
|
104
103
|
*/
|
|
105
|
-
|
|
104
|
+
function buildRules($elt) {
|
|
106
105
|
var rulesStr = $elt.data('validate'),
|
|
107
106
|
rules = rulesStr ? tokenize(rulesStr) : {};
|
|
108
107
|
return rules;
|
|
109
|
-
}
|
|
108
|
+
}
|
|
110
109
|
|
|
111
|
-
|
|
110
|
+
function tokenize(inputStr) {
|
|
112
111
|
var ret = []; //return object
|
|
113
112
|
|
|
114
113
|
var tokens = inputStr.split(/;/);
|
|
115
114
|
|
|
116
115
|
//get name (and options) for every rules strings:
|
|
117
|
-
_.each(tokens, function(token) {
|
|
116
|
+
_.each(tokens, function (token) {
|
|
118
117
|
token = $.trim(token);
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
118
|
+
let key;
|
|
119
|
+
const options = {};
|
|
120
|
+
const rightStr = token.replace(/\$(\w*)/, function ($0, k) {
|
|
121
|
+
key = k;
|
|
122
|
+
return '';
|
|
123
|
+
});
|
|
125
124
|
if (key) {
|
|
126
125
|
//remove brackets
|
|
127
|
-
|
|
126
|
+
let optionsStr = rightStr.replace(/^\((.*)\)$/, '$1');
|
|
128
127
|
//get string options
|
|
129
|
-
optionsStr = optionsStr.replace(
|
|
130
|
-
|
|
131
|
-
optionName,
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
});
|
|
128
|
+
optionsStr = optionsStr.replace(
|
|
129
|
+
/(\w+)=(("(\\.|[^"])*")|('(\\.|[^'])*')),?/g,
|
|
130
|
+
function ($0, optionName, optionValue) {
|
|
131
|
+
//replace quotes
|
|
132
|
+
optionValue = optionValue.replace(/^["'](.*)["']$/g, '$1');
|
|
133
|
+
options[optionName] = optionValue;
|
|
134
|
+
return '';
|
|
135
|
+
}
|
|
136
|
+
);
|
|
139
137
|
|
|
140
|
-
optionsStr.replace(/(\w*)=([^\s]*)(,)?/g, function($0, optionName, optionValue) {
|
|
138
|
+
optionsStr.replace(/(\w*)=([^\s]*)(,)?/g, function ($0, optionName, optionValue) {
|
|
141
139
|
if (optionValue.charAt(optionValue.length - 1) === ',') {
|
|
142
140
|
optionValue = optionValue.substring(0, optionValue.length - 1);
|
|
143
141
|
}
|
|
@@ -152,16 +150,16 @@ var tokenize = function(inputStr) {
|
|
|
152
150
|
});
|
|
153
151
|
|
|
154
152
|
return ret;
|
|
155
|
-
}
|
|
153
|
+
}
|
|
156
154
|
|
|
157
|
-
|
|
155
|
+
function buildOptions($elt) {
|
|
158
156
|
var optionsStr = $elt.data('validate-option'),
|
|
159
157
|
optionsArray = optionsStr ? tokenize(optionsStr) : {},
|
|
160
158
|
availableCoreValidatorOptions = _.keys(Validator.getDefaultOptions()),
|
|
161
159
|
options = _.clone($.fn.validator.defaults);
|
|
162
160
|
|
|
163
161
|
//separate core.validator options from jquery.validator options
|
|
164
|
-
_.each(optionsArray, function(optionArray) {
|
|
162
|
+
_.each(optionsArray, function (optionArray) {
|
|
165
163
|
if (_.indexOf(availableCoreValidatorOptions, optionArray.name) >= 0) {
|
|
166
164
|
options.validator[optionArray.name] = optionArray.options;
|
|
167
165
|
} else {
|
|
@@ -170,13 +168,13 @@ var buildOptions = function($elt) {
|
|
|
170
168
|
});
|
|
171
169
|
|
|
172
170
|
return options;
|
|
173
|
-
}
|
|
171
|
+
}
|
|
174
172
|
|
|
175
|
-
|
|
173
|
+
function create($elt, options) {
|
|
176
174
|
if (isCreated($elt)) {
|
|
177
175
|
return;
|
|
178
176
|
}
|
|
179
|
-
|
|
177
|
+
let rules = buildRules($elt);
|
|
180
178
|
if (options.rules) {
|
|
181
179
|
rules = _.merge(rules, options.rules);
|
|
182
180
|
delete options.rules;
|
|
@@ -187,24 +185,24 @@ var create = function($elt, options) {
|
|
|
187
185
|
$elt.data('validator-config', _.clone(options));
|
|
188
186
|
|
|
189
187
|
createValidator($elt, rules, options);
|
|
190
|
-
}
|
|
188
|
+
}
|
|
191
189
|
|
|
192
|
-
|
|
190
|
+
function destroy($elts) {
|
|
193
191
|
$elts.removeData('validator-instance validator-config');
|
|
194
192
|
$elts.off('.validator');
|
|
195
|
-
}
|
|
193
|
+
}
|
|
196
194
|
|
|
197
|
-
|
|
195
|
+
function createValidator($elt, rules, options) {
|
|
198
196
|
$elt.data('validator-instance', new Validator(rules, options.validator || {}));
|
|
199
197
|
if (options.event) {
|
|
200
198
|
bindEvents($elt, options);
|
|
201
199
|
}
|
|
202
|
-
}
|
|
200
|
+
}
|
|
203
201
|
|
|
204
|
-
|
|
202
|
+
function bindEvents($elt, options) {
|
|
205
203
|
var events = _.isArray(options.event) ? options.event : [options.event];
|
|
206
204
|
if (events.length > 0 && _.isFunction(options.validated)) {
|
|
207
|
-
_.forEach(events, function(event) {
|
|
205
|
+
_.forEach(events, function (event) {
|
|
208
206
|
if (_.isString(event)) {
|
|
209
207
|
event = {
|
|
210
208
|
type: event
|
|
@@ -214,7 +212,7 @@ var bindEvents = function($elt, options) {
|
|
|
214
212
|
switch (event.type) {
|
|
215
213
|
case 'keyup':
|
|
216
214
|
case 'keydown':
|
|
217
|
-
$elt.on(event.type, function() {
|
|
215
|
+
$elt.on(event.type, function () {
|
|
218
216
|
var v = $elt.val();
|
|
219
217
|
if (event.length) {
|
|
220
218
|
if (v && v.length > event.length) {
|
|
@@ -228,7 +226,7 @@ var bindEvents = function($elt, options) {
|
|
|
228
226
|
|
|
229
227
|
case 'change':
|
|
230
228
|
case 'blur':
|
|
231
|
-
$elt.on(event.type, function() {
|
|
229
|
+
$elt.on(event.type, function () {
|
|
232
230
|
validate($elt, options.validated, {});
|
|
233
231
|
});
|
|
234
232
|
break;
|
|
@@ -238,12 +236,12 @@ var bindEvents = function($elt, options) {
|
|
|
238
236
|
}
|
|
239
237
|
});
|
|
240
238
|
}
|
|
241
|
-
}
|
|
239
|
+
}
|
|
242
240
|
|
|
243
|
-
|
|
241
|
+
function validate($elt, callback, options) {
|
|
244
242
|
var value = $elt.val(),
|
|
245
243
|
defaults = $elt.data('validator-config'),
|
|
246
|
-
execCallback = function(results) {
|
|
244
|
+
execCallback = function (results) {
|
|
247
245
|
var valid;
|
|
248
246
|
|
|
249
247
|
//always trigger an event "validated" with associated results:
|
|
@@ -261,4 +259,4 @@ var validate = function($elt, callback, options) {
|
|
|
261
259
|
} else {
|
|
262
260
|
$elt.data('validator-instance').validate(value, options || {}, execCallback);
|
|
263
261
|
}
|
|
264
|
-
}
|
|
262
|
+
}
|