Best JavaScript code snippet using storybook-root
compactable.js
Source:compactable.js
1// Contains the interpretation of CSS properties, as used by the property optimizer2var breakUp = require('./break-up');3var canOverride = require('./can-override');4var restore = require('./restore');5var override = require('../../utils/override');6// Properties to process7// Extend this object in order to add support for more properties in the optimizer.8//9// Each key in this object represents a CSS property and should be an object.10// Such an object contains properties that describe how the represented CSS property should be handled.11// Possible options:12//13// * components: array (Only specify for shorthand properties.)14// Contains the names of the granular properties this shorthand compacts.15//16// * canOverride: function17// Returns whether two tokens of this property can be merged with each other.18// This property has no meaning for shorthands.19//20// * defaultValue: string21// Specifies the default value of the property according to the CSS standard.22// For shorthand, this is used when every component is set to its default value, therefore it should be the shortest possible default value of all the components.23//24// * shortestValue: string25// Specifies the shortest possible value the property can possibly have.26// (Falls back to defaultValue if unspecified.)27//28// * breakUp: function (Only specify for shorthand properties.)29// Breaks the shorthand up to its components.30//31// * restore: function (Only specify for shorthand properties.)32// Puts the shorthand together from its components.33//34var compactable = {35 'animation': {36 canOverride: canOverride.generic.components([37 canOverride.generic.time,38 canOverride.generic.timingFunction,39 canOverride.generic.time,40 canOverride.property.animationIterationCount,41 canOverride.property.animationDirection,42 canOverride.property.animationFillMode,43 canOverride.property.animationPlayState,44 canOverride.property.animationName45 ]),46 components: [47 'animation-duration',48 'animation-timing-function',49 'animation-delay',50 'animation-iteration-count',51 'animation-direction',52 'animation-fill-mode',53 'animation-play-state',54 'animation-name'55 ],56 breakUp: breakUp.multiplex(breakUp.animation),57 defaultValue: 'none',58 restore: restore.multiplex(restore.withoutDefaults),59 shorthand: true,60 vendorPrefixes: [61 '-moz-',62 '-o-',63 '-webkit-'64 ]65 },66 'animation-delay': {67 canOverride: canOverride.generic.time,68 componentOf: [69 'animation'70 ],71 defaultValue: '0s',72 intoMultiplexMode: 'real',73 vendorPrefixes: [74 '-moz-',75 '-o-',76 '-webkit-'77 ]78 },79 'animation-direction': {80 canOverride: canOverride.property.animationDirection,81 componentOf: [82 'animation'83 ],84 defaultValue: 'normal',85 intoMultiplexMode: 'real',86 vendorPrefixes: [87 '-moz-',88 '-o-',89 '-webkit-'90 ]91 },92 'animation-duration': {93 canOverride: canOverride.generic.time,94 componentOf: [95 'animation'96 ],97 defaultValue: '0s',98 intoMultiplexMode: 'real',99 keepUnlessDefault: 'animation-delay',100 vendorPrefixes: [101 '-moz-',102 '-o-',103 '-webkit-'104 ]105 },106 'animation-fill-mode': {107 canOverride: canOverride.property.animationFillMode,108 componentOf: [109 'animation'110 ],111 defaultValue: 'none',112 intoMultiplexMode: 'real',113 vendorPrefixes: [114 '-moz-',115 '-o-',116 '-webkit-'117 ]118 },119 'animation-iteration-count': {120 canOverride: canOverride.property.animationIterationCount,121 componentOf: [122 'animation'123 ],124 defaultValue: '1',125 intoMultiplexMode: 'real',126 vendorPrefixes: [127 '-moz-',128 '-o-',129 '-webkit-'130 ]131 },132 'animation-name': {133 canOverride: canOverride.property.animationName,134 componentOf: [135 'animation'136 ],137 defaultValue: 'none',138 intoMultiplexMode: 'real',139 vendorPrefixes: [140 '-moz-',141 '-o-',142 '-webkit-'143 ]144 },145 'animation-play-state': {146 canOverride: canOverride.property.animationPlayState,147 componentOf: [148 'animation'149 ],150 defaultValue: 'running',151 intoMultiplexMode: 'real',152 vendorPrefixes: [153 '-moz-',154 '-o-',155 '-webkit-'156 ]157 },158 'animation-timing-function': {159 canOverride: canOverride.generic.timingFunction,160 componentOf: [161 'animation'162 ],163 defaultValue: 'ease',164 intoMultiplexMode: 'real',165 vendorPrefixes: [166 '-moz-',167 '-o-',168 '-webkit-'169 ]170 },171 'background': {172 canOverride: canOverride.generic.components([173 canOverride.generic.image,174 canOverride.property.backgroundPosition,175 canOverride.property.backgroundSize,176 canOverride.property.backgroundRepeat,177 canOverride.property.backgroundAttachment,178 canOverride.property.backgroundOrigin,179 canOverride.property.backgroundClip,180 canOverride.generic.color181 ]),182 components: [183 'background-image',184 'background-position',185 'background-size',186 'background-repeat',187 'background-attachment',188 'background-origin',189 'background-clip',190 'background-color'191 ],192 breakUp: breakUp.multiplex(breakUp.background),193 defaultValue: '0 0',194 restore: restore.multiplex(restore.background),195 shortestValue: '0',196 shorthand: true197 },198 'background-attachment': {199 canOverride: canOverride.property.backgroundAttachment,200 componentOf: [201 'background'202 ],203 defaultValue: 'scroll',204 intoMultiplexMode: 'real'205 },206 'background-clip': {207 canOverride: canOverride.property.backgroundClip,208 componentOf: [209 'background'210 ],211 defaultValue: 'border-box',212 intoMultiplexMode: 'real',213 shortestValue: 'border-box'214 },215 'background-color': {216 canOverride: canOverride.generic.color,217 componentOf: [218 'background'219 ],220 defaultValue: 'transparent',221 intoMultiplexMode: 'real', // otherwise real color will turn into default since color appears in last multiplex only222 multiplexLastOnly: true,223 nonMergeableValue: 'none',224 shortestValue: 'red'225 },226 'background-image': {227 canOverride: canOverride.generic.image,228 componentOf: [229 'background'230 ],231 defaultValue: 'none',232 intoMultiplexMode: 'default'233 },234 'background-origin': {235 canOverride: canOverride.property.backgroundOrigin,236 componentOf: [237 'background'238 ],239 defaultValue: 'padding-box',240 intoMultiplexMode: 'real',241 shortestValue: 'border-box'242 },243 'background-position': {244 canOverride: canOverride.property.backgroundPosition,245 componentOf: [246 'background'247 ],248 defaultValue: ['0', '0'],249 doubleValues: true,250 intoMultiplexMode: 'real',251 shortestValue: '0'252 },253 'background-repeat': {254 canOverride: canOverride.property.backgroundRepeat,255 componentOf: [256 'background'257 ],258 defaultValue: ['repeat'],259 doubleValues: true,260 intoMultiplexMode: 'real'261 },262 'background-size': {263 canOverride: canOverride.property.backgroundSize,264 componentOf: [265 'background'266 ],267 defaultValue: ['auto'],268 doubleValues: true,269 intoMultiplexMode: 'real',270 shortestValue: '0 0'271 },272 'bottom': {273 canOverride: canOverride.property.bottom,274 defaultValue: 'auto'275 },276 'border': {277 breakUp: breakUp.border,278 canOverride: canOverride.generic.components([279 canOverride.generic.unit,280 canOverride.property.borderStyle,281 canOverride.generic.color282 ]),283 components: [284 'border-width',285 'border-style',286 'border-color'287 ],288 defaultValue: 'none',289 overridesShorthands: [290 'border-bottom',291 'border-left',292 'border-right',293 'border-top'294 ],295 restore: restore.withoutDefaults,296 shorthand: true,297 shorthandComponents: true298 },299 'border-bottom': {300 breakUp: breakUp.border,301 canOverride: canOverride.generic.components([302 canOverride.generic.unit,303 canOverride.property.borderStyle,304 canOverride.generic.color305 ]),306 components: [307 'border-bottom-width',308 'border-bottom-style',309 'border-bottom-color'310 ],311 defaultValue: 'none',312 restore: restore.withoutDefaults,313 shorthand: true314 },315 'border-bottom-color': {316 canOverride: canOverride.generic.color,317 componentOf: [318 'border-bottom',319 'border-color'320 ],321 defaultValue: 'none'322 },323 'border-bottom-left-radius': {324 canOverride: canOverride.generic.unit,325 componentOf: [326 'border-radius'327 ],328 defaultValue: '0',329 vendorPrefixes: [330 '-moz-',331 '-o-'332 ]333 },334 'border-bottom-right-radius': {335 canOverride: canOverride.generic.unit,336 componentOf: [337 'border-radius'338 ],339 defaultValue: '0',340 vendorPrefixes: [341 '-moz-',342 '-o-'343 ]344 },345 'border-bottom-style': {346 canOverride: canOverride.property.borderStyle,347 componentOf: [348 'border-bottom',349 'border-style'350 ],351 defaultValue: 'none'352 },353 'border-bottom-width': {354 canOverride: canOverride.generic.unit,355 componentOf: [356 'border-bottom',357 'border-width'358 ],359 defaultValue: 'medium',360 oppositeTo: 'border-top-width',361 shortestValue: '0'362 },363 'border-collapse': {364 canOverride: canOverride.property.borderCollapse,365 defaultValue: 'separate'366 },367 'border-color': {368 breakUp: breakUp.fourValues,369 canOverride: canOverride.generic.components([370 canOverride.generic.color,371 canOverride.generic.color,372 canOverride.generic.color,373 canOverride.generic.color374 ]),375 componentOf: [376 'border'377 ],378 components: [379 'border-top-color',380 'border-right-color',381 'border-bottom-color',382 'border-left-color'383 ],384 defaultValue: 'none',385 restore: restore.fourValues,386 shortestValue: 'red',387 shorthand: true388 },389 'border-left': {390 breakUp: breakUp.border,391 canOverride: canOverride.generic.components([392 canOverride.generic.unit,393 canOverride.property.borderStyle,394 canOverride.generic.color395 ]),396 components: [397 'border-left-width',398 'border-left-style',399 'border-left-color'400 ],401 defaultValue: 'none',402 restore: restore.withoutDefaults,403 shorthand: true404 },405 'border-left-color': {406 canOverride: canOverride.generic.color,407 componentOf: [408 'border-color',409 'border-left'410 ],411 defaultValue: 'none'412 },413 'border-left-style': {414 canOverride: canOverride.property.borderStyle,415 componentOf: [416 'border-left',417 'border-style'418 ],419 defaultValue: 'none'420 },421 'border-left-width': {422 canOverride: canOverride.generic.unit,423 componentOf: [424 'border-left',425 'border-width'426 ],427 defaultValue: 'medium',428 oppositeTo: 'border-right-width',429 shortestValue: '0'430 },431 'border-radius': {432 breakUp: breakUp.borderRadius,433 canOverride: canOverride.generic.components([434 canOverride.generic.unit,435 canOverride.generic.unit,436 canOverride.generic.unit,437 canOverride.generic.unit438 ]),439 components: [440 'border-top-left-radius',441 'border-top-right-radius',442 'border-bottom-right-radius',443 'border-bottom-left-radius'444 ],445 defaultValue: '0',446 restore: restore.borderRadius,447 shorthand: true,448 vendorPrefixes: [449 '-moz-',450 '-o-'451 ]452 },453 'border-right': {454 breakUp: breakUp.border,455 canOverride: canOverride.generic.components([456 canOverride.generic.unit,457 canOverride.property.borderStyle,458 canOverride.generic.color459 ]),460 components: [461 'border-right-width',462 'border-right-style',463 'border-right-color'464 ],465 defaultValue: 'none',466 restore: restore.withoutDefaults,467 shorthand: true468 },469 'border-right-color': {470 canOverride: canOverride.generic.color,471 componentOf: [472 'border-color',473 'border-right'474 ],475 defaultValue: 'none'476 },477 'border-right-style': {478 canOverride: canOverride.property.borderStyle,479 componentOf: [480 'border-right',481 'border-style'482 ],483 defaultValue: 'none'484 },485 'border-right-width': {486 canOverride: canOverride.generic.unit,487 componentOf: [488 'border-right',489 'border-width'490 ],491 defaultValue: 'medium',492 oppositeTo: 'border-left-width',493 shortestValue: '0'494 },495 'border-style': {496 breakUp: breakUp.fourValues,497 canOverride: canOverride.generic.components([498 canOverride.property.borderStyle,499 canOverride.property.borderStyle,500 canOverride.property.borderStyle,501 canOverride.property.borderStyle502 ]),503 componentOf: [504 'border'505 ],506 components: [507 'border-top-style',508 'border-right-style',509 'border-bottom-style',510 'border-left-style'511 ],512 defaultValue: 'none',513 restore: restore.fourValues,514 shorthand: true515 },516 'border-top': {517 breakUp: breakUp.border,518 canOverride: canOverride.generic.components([519 canOverride.generic.unit,520 canOverride.property.borderStyle,521 canOverride.generic.color522 ]),523 components: [524 'border-top-width',525 'border-top-style',526 'border-top-color'527 ],528 defaultValue: 'none',529 restore: restore.withoutDefaults,530 shorthand: true531 },532 'border-top-color': {533 canOverride: canOverride.generic.color,534 componentOf: [535 'border-color',536 'border-top'537 ],538 defaultValue: 'none'539 },540 'border-top-left-radius': {541 canOverride: canOverride.generic.unit,542 componentOf: [543 'border-radius'544 ],545 defaultValue: '0',546 vendorPrefixes: [547 '-moz-',548 '-o-'549 ]550 },551 'border-top-right-radius': {552 canOverride: canOverride.generic.unit,553 componentOf: [554 'border-radius'555 ],556 defaultValue: '0',557 vendorPrefixes: [558 '-moz-',559 '-o-'560 ]561 },562 'border-top-style': {563 canOverride: canOverride.property.borderStyle,564 componentOf: [565 'border-style',566 'border-top'567 ],568 defaultValue: 'none'569 },570 'border-top-width': {571 canOverride: canOverride.generic.unit,572 componentOf: [573 'border-top',574 'border-width'575 ],576 defaultValue: 'medium',577 oppositeTo: 'border-bottom-width',578 shortestValue: '0'579 },580 'border-width': {581 breakUp: breakUp.fourValues,582 canOverride: canOverride.generic.components([583 canOverride.generic.unit,584 canOverride.generic.unit,585 canOverride.generic.unit,586 canOverride.generic.unit587 ]),588 componentOf: [589 'border'590 ],591 components: [592 'border-top-width',593 'border-right-width',594 'border-bottom-width',595 'border-left-width'596 ],597 defaultValue: 'medium',598 restore: restore.fourValues,599 shortestValue: '0',600 shorthand: true601 },602 'clear': {603 canOverride: canOverride.property.clear,604 defaultValue: 'none'605 },606 'color': {607 canOverride: canOverride.generic.color,608 defaultValue: 'transparent',609 shortestValue: 'red'610 },611 'cursor': {612 canOverride: canOverride.property.cursor,613 defaultValue: 'auto'614 },615 'display': {616 canOverride: canOverride.property.display,617 },618 'float': {619 canOverride: canOverride.property.float,620 defaultValue: 'none'621 },622 'font': {623 breakUp: breakUp.font,624 canOverride: canOverride.generic.components([625 canOverride.property.fontStyle,626 canOverride.property.fontVariant,627 canOverride.property.fontWeight,628 canOverride.property.fontStretch,629 canOverride.generic.unit,630 canOverride.generic.unit,631 canOverride.property.fontFamily632 ]),633 components: [634 'font-style',635 'font-variant',636 'font-weight',637 'font-stretch',638 'font-size',639 'line-height',640 'font-family'641 ],642 restore: restore.font,643 shorthand: true644 },645 'font-family': {646 canOverride: canOverride.property.fontFamily,647 defaultValue: 'user|agent|specific'648 },649 'font-size': {650 canOverride: canOverride.generic.unit,651 defaultValue: 'medium',652 shortestValue: '0'653 },654 'font-stretch': {655 canOverride: canOverride.property.fontStretch,656 defaultValue: 'normal'657 },658 'font-style': {659 canOverride: canOverride.property.fontStyle,660 defaultValue: 'normal'661 },662 'font-variant': {663 canOverride: canOverride.property.fontVariant,664 defaultValue: 'normal'665 },666 'font-weight': {667 canOverride: canOverride.property.fontWeight,668 defaultValue: 'normal',669 shortestValue: '400'670 },671 'height': {672 canOverride: canOverride.generic.unit,673 defaultValue: 'auto',674 shortestValue: '0'675 },676 'left': {677 canOverride: canOverride.property.left,678 defaultValue: 'auto'679 },680 'line-height': {681 canOverride: canOverride.generic.unitOrNumber,682 defaultValue: 'normal',683 shortestValue: '0'684 },685 'list-style': {686 canOverride: canOverride.generic.components([687 canOverride.property.listStyleType,688 canOverride.property.listStylePosition,689 canOverride.property.listStyleImage690 ]),691 components: [692 'list-style-type',693 'list-style-position',694 'list-style-image'695 ],696 breakUp: breakUp.listStyle,697 restore: restore.withoutDefaults,698 defaultValue: 'outside', // can't use 'disc' because that'd override default 'decimal' for <ol>699 shortestValue: 'none',700 shorthand: true701 },702 'list-style-image' : {703 canOverride: canOverride.generic.image,704 componentOf: [705 'list-style'706 ],707 defaultValue: 'none'708 },709 'list-style-position' : {710 canOverride: canOverride.property.listStylePosition,711 componentOf: [712 'list-style'713 ],714 defaultValue: 'outside',715 shortestValue: 'inside'716 },717 'list-style-type' : {718 canOverride: canOverride.property.listStyleType,719 componentOf: [720 'list-style'721 ],722 // NOTE: we can't tell the real default value here, it's 'disc' for <ul> and 'decimal' for <ol>723 // this is a hack, but it doesn't matter because this value will be either overridden or724 // it will disappear at the final step anyway725 defaultValue: 'decimal|disc',726 shortestValue: 'none'727 },728 'margin': {729 breakUp: breakUp.fourValues,730 canOverride: canOverride.generic.components([731 canOverride.generic.unit,732 canOverride.generic.unit,733 canOverride.generic.unit,734 canOverride.generic.unit735 ]),736 components: [737 'margin-top',738 'margin-right',739 'margin-bottom',740 'margin-left'741 ],742 defaultValue: '0',743 restore: restore.fourValues,744 shorthand: true745 },746 'margin-bottom': {747 canOverride: canOverride.generic.unit,748 componentOf: [749 'margin'750 ],751 defaultValue: '0',752 oppositeTo: 'margin-top'753 },754 'margin-left': {755 canOverride: canOverride.generic.unit,756 componentOf: [757 'margin'758 ],759 defaultValue: '0',760 oppositeTo: 'margin-right'761 },762 'margin-right': {763 canOverride: canOverride.generic.unit,764 componentOf: [765 'margin'766 ],767 defaultValue: '0',768 oppositeTo: 'margin-left'769 },770 'margin-top': {771 canOverride: canOverride.generic.unit,772 componentOf: [773 'margin'774 ],775 defaultValue: '0',776 oppositeTo: 'margin-bottom'777 },778 'outline': {779 canOverride: canOverride.generic.components([780 canOverride.generic.color,781 canOverride.property.outlineStyle,782 canOverride.generic.unit783 ]),784 components: [785 'outline-color',786 'outline-style',787 'outline-width'788 ],789 breakUp: breakUp.outline,790 restore: restore.withoutDefaults,791 defaultValue: '0',792 shorthand: true793 },794 'outline-color': {795 canOverride: canOverride.generic.color,796 componentOf: [797 'outline'798 ],799 defaultValue: 'invert',800 shortestValue: 'red'801 },802 'outline-style': {803 canOverride: canOverride.property.outlineStyle,804 componentOf: [805 'outline'806 ],807 defaultValue: 'none'808 },809 'outline-width': {810 canOverride: canOverride.generic.unit,811 componentOf: [812 'outline'813 ],814 defaultValue: 'medium',815 shortestValue: '0'816 },817 'overflow': {818 canOverride: canOverride.property.overflow,819 defaultValue: 'visible'820 },821 'overflow-x': {822 canOverride: canOverride.property.overflow,823 defaultValue: 'visible'824 },825 'overflow-y': {826 canOverride: canOverride.property.overflow,827 defaultValue: 'visible'828 },829 'padding': {830 breakUp: breakUp.fourValues,831 canOverride: canOverride.generic.components([832 canOverride.generic.unit,833 canOverride.generic.unit,834 canOverride.generic.unit,835 canOverride.generic.unit836 ]),837 components: [838 'padding-top',839 'padding-right',840 'padding-bottom',841 'padding-left'842 ],843 defaultValue: '0',844 restore: restore.fourValues,845 shorthand: true846 },847 'padding-bottom': {848 canOverride: canOverride.generic.unit,849 componentOf: [850 'padding'851 ],852 defaultValue: '0',853 oppositeTo: 'padding-top'854 },855 'padding-left': {856 canOverride: canOverride.generic.unit,857 componentOf: [858 'padding'859 ],860 defaultValue: '0',861 oppositeTo: 'padding-right'862 },863 'padding-right': {864 canOverride: canOverride.generic.unit,865 componentOf: [866 'padding'867 ],868 defaultValue: '0',869 oppositeTo: 'padding-left'870 },871 'padding-top': {872 canOverride: canOverride.generic.unit,873 componentOf: [874 'padding'875 ],876 defaultValue: '0',877 oppositeTo: 'padding-bottom'878 },879 'position': {880 canOverride: canOverride.property.position,881 defaultValue: 'static'882 },883 'right': {884 canOverride: canOverride.property.right,885 defaultValue: 'auto'886 },887 'text-align': {888 canOverride: canOverride.property.textAlign,889 // NOTE: we can't tell the real default value here, as it depends on default text direction890 // this is a hack, but it doesn't matter because this value will be either overridden or891 // it will disappear anyway892 defaultValue: 'left|right'893 },894 'text-decoration': {895 canOverride: canOverride.property.textDecoration,896 defaultValue: 'none'897 },898 'text-overflow': {899 canOverride: canOverride.property.textOverflow,900 defaultValue: 'none'901 },902 'text-shadow': {903 canOverride: canOverride.property.textShadow,904 defaultValue: 'none'905 },906 'top': {907 canOverride: canOverride.property.top,908 defaultValue: 'auto'909 },910 'transform': {911 canOverride: canOverride.property.transform,912 vendorPrefixes: [913 '-moz-',914 '-ms-',915 '-webkit-'916 ]917 },918 'transition': {919 breakUp: breakUp.multiplex(breakUp.transition),920 canOverride: canOverride.generic.components([921 canOverride.property.transitionProperty,922 canOverride.generic.time,923 canOverride.generic.timingFunction,924 canOverride.generic.time925 ]),926 components: [927 'transition-property',928 'transition-duration',929 'transition-timing-function',930 'transition-delay'931 ],932 defaultValue: 'none',933 restore: restore.multiplex(restore.withoutDefaults),934 shorthand: true,935 vendorPrefixes: [936 '-moz-',937 '-o-',938 '-webkit-'939 ]940 },941 'transition-delay': {942 canOverride: canOverride.generic.time,943 componentOf: [944 'transition'945 ],946 defaultValue: '0s',947 intoMultiplexMode: 'real',948 vendorPrefixes: [949 '-moz-',950 '-o-',951 '-webkit-'952 ]953 },954 'transition-duration': {955 canOverride: canOverride.generic.time,956 componentOf: [957 'transition'958 ],959 defaultValue: '0s',960 intoMultiplexMode: 'real',961 vendorPrefixes: [962 '-moz-',963 '-o-',964 '-webkit-'965 ]966 },967 'transition-property': {968 canOverride: canOverride.generic.propertyName,969 componentOf: [970 'transition'971 ],972 defaultValue: 'all',973 intoMultiplexMode: 'placeholder',974 placeholderValue: '_', // it's a short value that won't match any property and still be a valid `transition-property`975 vendorPrefixes: [976 '-moz-',977 '-o-',978 '-webkit-'979 ]980 },981 'transition-timing-function': {982 canOverride: canOverride.generic.timingFunction,983 componentOf: [984 'transition'985 ],986 defaultValue: 'ease',987 intoMultiplexMode: 'real',988 vendorPrefixes: [989 '-moz-',990 '-o-',991 '-webkit-'992 ]993 },994 'vertical-align': {995 canOverride: canOverride.property.verticalAlign,996 defaultValue: 'baseline'997 },998 'visibility': {999 canOverride: canOverride.property.visibility,1000 defaultValue: 'visible'1001 },1002 'white-space': {1003 canOverride: canOverride.property.whiteSpace,1004 defaultValue: 'normal'1005 },1006 'width': {1007 canOverride: canOverride.generic.unit,1008 defaultValue: 'auto',1009 shortestValue: '0'1010 },1011 'z-index': {1012 canOverride: canOverride.property.zIndex,1013 defaultValue: 'auto'1014 }1015};1016function cloneDescriptor(propertyName, prefix) {1017 var clonedDescriptor = override(compactable[propertyName], {});1018 if ('componentOf' in clonedDescriptor) {1019 clonedDescriptor.componentOf = clonedDescriptor.componentOf.map(function (shorthandName) {1020 return prefix + shorthandName;1021 });1022 }1023 if ('components' in clonedDescriptor) {1024 clonedDescriptor.components = clonedDescriptor.components.map(function (longhandName) {1025 return prefix + longhandName;1026 });1027 }1028 if ('keepUnlessDefault' in clonedDescriptor) {1029 clonedDescriptor.keepUnlessDefault = prefix + clonedDescriptor.keepUnlessDefault;1030 }1031 return clonedDescriptor;1032}1033// generate vendor-prefixed properties1034var vendorPrefixedCompactable = {};1035for (var propertyName in compactable) {1036 var descriptor = compactable[propertyName];1037 if (!('vendorPrefixes' in descriptor)) {1038 continue;1039 }1040 for (var i = 0; i < descriptor.vendorPrefixes.length; i++) {1041 var prefix = descriptor.vendorPrefixes[i];1042 var clonedDescriptor = cloneDescriptor(propertyName, prefix);1043 delete clonedDescriptor.vendorPrefixes;1044 vendorPrefixedCompactable[prefix + propertyName] = clonedDescriptor;1045 }1046 delete descriptor.vendorPrefixes;1047}...
DomEventSimulator.js
Source:DomEventSimulator.js
1import { defaultValue } from "../Source/Cesium.js";2import { FeatureDetection } from "../Source/Cesium.js";3function createMouseEvent(type, options) {4 options = defaultValue(options, defaultValue.EMPTY_OBJECT);5 const canBubble = defaultValue(options.canBubble, true);6 const cancelable = defaultValue(options.cancelable, true);7 const view = defaultValue(options.view, window);8 const detail = defaultValue(options.detail, 0);9 const screenX = defaultValue(options.screenX, 0);10 const screenY = defaultValue(options.screenY, 0);11 const clientX = defaultValue(options.clientX, 0);12 const clientY = defaultValue(options.clientY, 0);13 const ctrlKey = defaultValue(options.ctrlKey, false);14 const altKey = defaultValue(options.altKey, false);15 const shiftKey = defaultValue(options.shiftKey, false);16 const metaKey = defaultValue(options.metaKey, false);17 const button = defaultValue(options.button, 0);18 const relatedTarget = defaultValue(options.relatedTarget, null);19 const event = document.createEvent("MouseEvent");20 event.initMouseEvent(21 type,22 canBubble,23 cancelable,24 view,25 detail,26 screenX,27 screenY,28 clientX,29 clientY,30 ctrlKey,31 altKey,32 shiftKey,33 metaKey,34 button,35 relatedTarget36 );37 return event;38}39function createModifiersList(ctrlKey, altKey, shiftKey, metaKey) {40 const modifiers = [];41 if (ctrlKey) {42 modifiers.push("Control");43 }44 if (altKey) {45 modifiers.push("Alt");46 }47 if (shiftKey) {48 modifiers.push("Shift");49 }50 if (metaKey) {51 modifiers.push("Meta");52 }53 return modifiers.join(" ");54}55// MouseWheelEvent is legacy56function createMouseWheelEvent(type, options) {57 options = defaultValue(options, defaultValue.EMPTY_OBJECT);58 const canBubble = defaultValue(options.canBubble, true);59 const cancelable = defaultValue(options.cancelable, true);60 const view = defaultValue(options.view, window);61 const detail = defaultValue(options.detail, 0);62 const screenX = defaultValue(options.screenX, 0);63 const screenY = defaultValue(options.screenY, 0);64 const clientX = defaultValue(options.clientX, 0);65 const clientY = defaultValue(options.clientY, 0);66 const button = defaultValue(options.button, 0);67 const relatedTarget = defaultValue(options.relatedTarget, null);68 const ctrlKey = defaultValue(options.ctrlKey, false);69 const altKey = defaultValue(options.altKey, false);70 const shiftKey = defaultValue(options.shiftKey, false);71 const metaKey = defaultValue(options.metaKey, false);72 const wheelDelta = defaultValue(options.wheelDelta, 0);73 const event = document.createEvent("MouseWheelEvent");74 const modifiersList = createModifiersList(ctrlKey, altKey, shiftKey, metaKey);75 event.initMouseWheelEvent(76 type,77 canBubble,78 cancelable,79 view,80 detail,81 screenX,82 screenY,83 clientX,84 clientY,85 button,86 relatedTarget,87 modifiersList,88 wheelDelta89 );90 return event;91}92function createWheelEvent(type, options) {93 options = defaultValue(options, defaultValue.EMPTY_OBJECT);94 const canBubble = defaultValue(options.canBubble, true);95 const cancelable = defaultValue(options.cancelable, true);96 const view = defaultValue(options.view, window);97 const detail = defaultValue(options.detail, 0);98 const screenX = defaultValue(options.screenX, 0);99 const screenY = defaultValue(options.screenY, 0);100 const clientX = defaultValue(options.clientX, 0);101 const clientY = defaultValue(options.clientY, 0);102 const button = defaultValue(options.button, 0);103 const relatedTarget = defaultValue(options.relatedTarget, null);104 const ctrlKey = defaultValue(options.ctrlKey, false);105 const altKey = defaultValue(options.altKey, false);106 const shiftKey = defaultValue(options.shiftKey, false);107 const metaKey = defaultValue(options.metaKey, false);108 const deltaX = defaultValue(options.deltaX, 0);109 const deltaY = defaultValue(options.deltaY, 0);110 const deltaZ = defaultValue(options.deltaZ, 0);111 const deltaMode = defaultValue(options.deltaMode, 0);112 try {113 return new WheelEvent(type, {114 view: view,115 detail: detail,116 screenX: screenX,117 screenY: screenY,118 clientX: clientX,119 clientY: clientY,120 button: button,121 relatedTarget: relatedTarget,122 ctrlKey: ctrlKey,123 altKey: altKey,124 shiftKey: shiftKey,125 metaKey: metaKey,126 deltaX: deltaX,127 deltaY: deltaY,128 deltaZ: deltaZ,129 deltaMode: deltaMode,130 });131 } catch (e) {132 const event = document.createEvent("WheelEvent");133 const modifiersList = createModifiersList(134 ctrlKey,135 altKey,136 shiftKey,137 metaKey138 );139 event.initWheelEvent(140 type,141 canBubble,142 cancelable,143 view,144 detail,145 screenX,146 screenY,147 clientX,148 clientY,149 button,150 relatedTarget,151 modifiersList,152 deltaX,153 deltaY,154 deltaZ,155 deltaMode156 );157 return event;158 }159}160function createTouchEvent(type, options) {161 options = defaultValue(options, defaultValue.EMPTY_OBJECT);162 const canBubble = defaultValue(options.canBubble, true);163 const cancelable = defaultValue(options.cancelable, true);164 const view = defaultValue(options.view, window);165 const detail = defaultValue(options.detail, 0);166 const event = document.createEvent("UIEvent");167 event.initUIEvent(type, canBubble, cancelable, view, detail);168 event.touches = defaultValue(options.touches, []);169 event.targetTouches = defaultValue(options.targetTouches, []);170 event.changedTouches = defaultValue(options.changedTouches, []);171 return event;172}173function createPointerEvent(type, options) {174 options = defaultValue(options, defaultValue.EMPTY_OBJECT);175 let event;176 if (FeatureDetection.isInternetExplorer()) {177 const canBubble = defaultValue(options.canBubble, true);178 const cancelable = defaultValue(options.cancelable, true);179 const view = defaultValue(options.view, window);180 const detail = defaultValue(options.detail, 0);181 const screenX = defaultValue(options.screenX, 0);182 const screenY = defaultValue(options.screenY, 0);183 const clientX = defaultValue(options.clientX, 0);184 const clientY = defaultValue(options.clientY, 0);185 const ctrlKey = defaultValue(options.ctrlKey, false);186 const altKey = defaultValue(options.altKey, false);187 const shiftKey = defaultValue(options.shiftKey, false);188 const metaKey = defaultValue(options.metaKey, false);189 const button = defaultValue(options.button, 0);190 const relatedTarget = defaultValue(options.relatedTarget, null);191 const offsetX = defaultValue(options.offsetX, 0);192 const offsetY = defaultValue(options.offsetY, 0);193 const width = defaultValue(options.width, 0);194 const height = defaultValue(options.height, 0);195 const pressure = defaultValue(options.pressure, 0);196 const rotation = defaultValue(options.rotation, 0);197 const tiltX = defaultValue(options.tiltX, 0);198 const tiltY = defaultValue(options.tiltY, 0);199 const pointerId = defaultValue(options.pointerId, 1);200 const pointerType = defaultValue(options.pointerType, 0);201 const hwTimestamp = defaultValue(options.hwTimestamp, 0);202 const isPrimary = defaultValue(options.isPrimary, 0);203 event = document.createEvent("PointerEvent");204 event.initPointerEvent(205 type,206 canBubble,207 cancelable,208 view,209 detail,210 screenX,211 screenY,212 clientX,213 clientY,214 ctrlKey,215 altKey,216 shiftKey,217 metaKey,218 button,219 relatedTarget,220 offsetX,221 offsetY,222 width,223 height,224 pressure,225 rotation,226 tiltX,227 tiltY,228 pointerId,229 pointerType,230 hwTimestamp,231 isPrimary232 );233 } else {234 event = new window.PointerEvent(type, {235 canBubble: defaultValue(options.canBubble, true),236 cancelable: defaultValue(options.cancelable, true),237 view: defaultValue(options.view, window),238 detail: defaultValue(options.detail, 0),239 screenX: defaultValue(options.screenX, 0),240 screenY: defaultValue(options.screenY, 0),241 clientX: defaultValue(options.clientX, 0),242 clientY: defaultValue(options.clientY, 0),243 ctrlKey: defaultValue(options.ctrlKey, false),244 altKey: defaultValue(options.altKey, false),245 shiftKey: defaultValue(options.shiftKey, false),246 metaKey: defaultValue(options.metaKey, false),247 button: defaultValue(options.button, 0),248 relatedTarget: defaultValue(options.relatedTarget, null),249 offsetX: defaultValue(options.offsetX, 0),250 offsetY: defaultValue(options.offsetY, 0),251 width: defaultValue(options.width, 0),252 height: defaultValue(options.height, 0),253 pressure: defaultValue(options.pressure, 0),254 rotation: defaultValue(options.rotation, 0),255 tiltX: defaultValue(options.tiltX, 0),256 tiltY: defaultValue(options.tiltY, 0),257 pointerId: defaultValue(options.pointerId, 1),258 pointerType: defaultValue(options.pointerType, 0),259 hwTimestamp: defaultValue(options.hwTimestamp, 0),260 isPrimary: defaultValue(options.isPrimary, 0),261 });262 }263 return event;264}265function createDeviceOrientationEvent(type, options) {266 options = defaultValue(options, defaultValue.EMPTY_OBJECT);267 const canBubble = defaultValue(options.canBubble, true);268 const cancelable = defaultValue(options.cancelable, true);269 const alpha = defaultValue(options.alpha, 0.0);270 const beta = defaultValue(options.beta, 0.0);271 const gamma = defaultValue(options.gamma, 0.0);272 const absolute = defaultValue(options.absolute, false);273 let event;274 event = document.createEvent("DeviceOrientationEvent");275 if (typeof event.initDeviceOrientationEvent === "function") {276 event.initDeviceOrientationEvent(277 type,278 canBubble,279 cancelable,280 alpha,281 beta,282 gamma,283 absolute284 );285 } else {286 event = new DeviceOrientationEvent("deviceorientation", {...
TR_PEND_PROVEEDOR.js
Source:TR_PEND_PROVEEDOR.js
1/* jshint indent: 2 */2module.exports = function(sequelize, DataTypes) {3 return sequelize.define('TR_PEND_PROVEEDOR', {4 c_codproveed: {5 type: DataTypes.STRING,6 allowNull: false,7 primaryKey: true8 },9 c_descripcio: {10 type: DataTypes.STRING,11 allowNull: false12 },13 c_grupo: {14 type: DataTypes.STRING,15 allowNull: false,16 defaultValue: ' '17 },18 c_rif: {19 type: DataTypes.STRING,20 allowNull: false,21 defaultValue: ' '22 },23 c_representa: {24 type: DataTypes.STRING,25 allowNull: false,26 defaultValue: ' '27 },28 c_cargo: {29 type: DataTypes.STRING,30 allowNull: false,31 defaultValue: ' '32 },33 c_direccion: {34 type: DataTypes.STRING,35 allowNull: false,36 defaultValue: ' '37 },38 c_ciudad: {39 type: DataTypes.STRING,40 allowNull: false,41 defaultValue: ' '42 },43 c_estado: {44 type: DataTypes.STRING,45 allowNull: false,46 defaultValue: ' '47 },48 c_pais: {49 type: DataTypes.STRING,50 allowNull: false,51 defaultValue: ' '52 },53 c_email: {54 type: DataTypes.STRING,55 allowNull: false,56 defaultValue: ' '57 },58 c_telefono: {59 type: DataTypes.STRING,60 allowNull: false,61 defaultValue: ' '62 },63 c_celular: {64 type: DataTypes.STRING,65 allowNull: false,66 defaultValue: ' '67 },68 c_fax: {69 type: DataTypes.STRING,70 allowNull: false,71 defaultValue: ' '72 },73 c_web: {74 type: DataTypes.STRING,75 allowNull: false,76 defaultValue: ' '77 },78 n_limite: {79 type: DataTypes.FLOAT,80 allowNull: false,81 defaultValue: '((0))'82 },83 n_dias: {84 type: DataTypes.INTEGER,85 allowNull: false,86 defaultValue: '((0))'87 },88 n_porcentaje: {89 type: DataTypes.FLOAT,90 allowNull: false,91 defaultValue: '((0))'92 },93 c_observacio: {94 type: DataTypes.TEXT,95 allowNull: false,96 defaultValue: ' '97 },98 c_nit: {99 type: DataTypes.STRING,100 allowNull: false,101 defaultValue: ' '102 },103 n_activo: {104 type: DataTypes.INTEGER,105 allowNull: false,106 defaultValue: '((1))'107 },108 update_date: {109 type: DataTypes.DATE,110 allowNull: false,111 defaultValue: '(((5)/(11))/(70))'112 },113 add_date: {114 type: DataTypes.DATE,115 allowNull: false,116 defaultValue: '(((5)/(11))/(70))'117 },118 c_razon: {119 type: DataTypes.STRING,120 allowNull: false,121 defaultValue: ' '122 },123 c_codreferencial: {124 type: DataTypes.STRING,125 allowNull: false,126 defaultValue: ' '127 },128 c_contacto_adm: {129 type: DataTypes.STRING,130 allowNull: false,131 defaultValue: ' '132 },133 c_contacto_ven: {134 type: DataTypes.STRING,135 allowNull: false,136 defaultValue: ' '137 },138 c_contacto_reg: {139 type: DataTypes.STRING,140 allowNull: false,141 defaultValue: ' '142 },143 c_contacto_vdd: {144 type: DataTypes.STRING,145 allowNull: false,146 defaultValue: ' '147 },148 c_email_adm: {149 type: DataTypes.STRING,150 allowNull: false,151 defaultValue: ' '152 },153 c_email_ven: {154 type: DataTypes.STRING,155 allowNull: false,156 defaultValue: ' '157 },158 c_email_reg: {159 type: DataTypes.STRING,160 allowNull: false,161 defaultValue: ' '162 },163 c_email_vdd: {164 type: DataTypes.STRING,165 allowNull: false,166 defaultValue: ' '167 },168 c_email_fiscal: {169 type: DataTypes.STRING,170 allowNull: false,171 defaultValue: ' '172 },173 c_email_depo: {174 type: DataTypes.STRING,175 allowNull: false,176 defaultValue: ' '177 },178 c_telefono_rep: {179 type: DataTypes.STRING,180 allowNull: false,181 defaultValue: ' '182 },183 c_telefono_adm: {184 type: DataTypes.STRING,185 allowNull: false,186 defaultValue: ' '187 },188 c_telefono_ven: {189 type: DataTypes.STRING,190 allowNull: false,191 defaultValue: ' '192 },193 c_telefono_reg: {194 type: DataTypes.STRING,195 allowNull: false,196 defaultValue: ' '197 },198 c_telefono_vdd: {199 type: DataTypes.STRING,200 allowNull: false,201 defaultValue: ' '202 },203 c_celular_adm: {204 type: DataTypes.STRING,205 allowNull: false,206 defaultValue: ' '207 },208 c_celular_ven: {209 type: DataTypes.STRING,210 allowNull: false,211 defaultValue: ' '212 },213 c_celular_reg: {214 type: DataTypes.STRING,215 allowNull: false,216 defaultValue: ' '217 },218 c_celular_vdd: {219 type: DataTypes.STRING,220 allowNull: false,221 defaultValue: ' '222 },223 c_direccion_dep: {224 type: DataTypes.STRING,225 allowNull: false,226 defaultValue: ' '227 },228 c_ciudad_dep: {229 type: DataTypes.STRING,230 allowNull: false,231 defaultValue: ' '232 },233 c_estado_dep: {234 type: DataTypes.STRING,235 allowNull: false,236 defaultValue: ' '237 },238 c_pais_dep: {239 type: DataTypes.STRING,240 allowNull: false,241 defaultValue: ' '242 },243 c_telefono_dep: {244 type: DataTypes.STRING,245 allowNull: false,246 defaultValue: ' '247 },248 c_fax_dep: {249 type: DataTypes.STRING,250 allowNull: false,251 defaultValue: ' '252 },253 c_email_dep: {254 type: DataTypes.STRING,255 allowNull: false,256 defaultValue: ' '257 },258 c_cod_banco: {259 type: DataTypes.STRING,260 allowNull: false,261 defaultValue: ' '262 },263 c_cuenta_banco: {264 type: DataTypes.STRING,265 allowNull: false,266 defaultValue: ' '267 },268 c_cuentahabiente: {269 type: DataTypes.STRING,270 allowNull: false,271 defaultValue: ' '272 },273 n_dia2: {274 type: DataTypes.INTEGER,275 allowNull: false,276 defaultValue: '((0))'277 },278 n_porcentaje2: {279 type: DataTypes.FLOAT,280 allowNull: false,281 defaultValue: '((0))'282 },283 n_dia3: {284 type: DataTypes.INTEGER,285 allowNull: false,286 defaultValue: '((0))'287 },288 n_porcentaje3: {289 type: DataTypes.FLOAT,290 allowNull: false,291 defaultValue: '((0))'292 },293 c_codlicores: {294 type: DataTypes.STRING,295 allowNull: false,296 defaultValue: ' '297 },298 n_diasdespacho: {299 type: DataTypes.INTEGER,300 allowNull: false,301 defaultValue: '((0))'302 },303 ESTATUS: {304 type: DataTypes.INTEGER,305 allowNull: false,306 defaultValue: '((0))'307 },308 b_preferencial: {309 type: DataTypes.BOOLEAN,310 allowNull: false311 },312 N_RETENCION: {313 type: DataTypes.FLOAT,314 allowNull: false,315 defaultValue: '((0))'316 },317 ID: {318 type: DataTypes.DOUBLE,319 allowNull: false,320 primaryKey: true,321 autoIncrement: true322 },323 CS_COMPRADOR: {324 type: DataTypes.STRING,325 allowNull: false,326 defaultValue: ''327 },328 bu_cualquier_cuenta: {329 type: DataTypes.BOOLEAN,330 allowNull: false,331 defaultValue: '0'332 },333 cs_tipo: {334 type: DataTypes.STRING,335 allowNull: false,336 defaultValue: ''337 },338 c_rim: {339 type: DataTypes.STRING,340 allowNull: false,341 defaultValue: ''342 },343 n_diasreposicion: {344 type: DataTypes.INTEGER,345 allowNull: false,346 defaultValue: '((0))'347 },348 n_diasanalisis: {349 type: DataTypes.INTEGER,350 allowNull: false,351 defaultValue: '((0))'352 },353 n_descaveria: {354 type: DataTypes.INTEGER,355 allowNull: false,356 defaultValue: '((0))'357 },358 b_enviarOdcL: {359 type: DataTypes.BOOLEAN,360 allowNull: false,361 defaultValue: '0'362 },363 b_enviarOdcA: {364 type: DataTypes.BOOLEAN,365 allowNull: false,366 defaultValue: '0'367 },368 b_enviarOdcV: {369 type: DataTypes.BOOLEAN,370 allowNull: false,371 defaultValue: '0'372 },373 b_enviarOdcR: {374 type: DataTypes.BOOLEAN,375 allowNull: false,376 defaultValue: '0'377 },378 b_enviarOdcVen: {379 type: DataTypes.BOOLEAN,380 allowNull: false,381 defaultValue: '0'382 },383 n_porcentaje_seniat: {384 type: DataTypes.FLOAT,385 allowNull: false,386 defaultValue: '((0))'387 },388 c_UsuarioAdd: {389 type: DataTypes.STRING,390 allowNull: false,391 defaultValue: ''392 },393 c_UsuarioUpd: {394 type: DataTypes.STRING,395 allowNull: false,396 defaultValue: ''397 }398 }, {399 tableName: 'TR_PEND_PROVEEDOR'400 });...
TR_PENDIENTE_PROD.js
Source:TR_PENDIENTE_PROD.js
1/* jshint indent: 2 */2module.exports = function(sequelize, DataTypes) {3 return sequelize.define('TR_PENDIENTE_PROD', {4 c_Codigo: {5 type: DataTypes.STRING,6 allowNull: false,7 primaryKey: true8 },9 c_Descri: {10 type: DataTypes.STRING,11 allowNull: false12 },13 c_Departamento: {14 type: DataTypes.STRING,15 allowNull: false,16 defaultValue: ' '17 },18 c_Grupo: {19 type: DataTypes.STRING,20 allowNull: false,21 defaultValue: ' '22 },23 c_Subgrupo: {24 type: DataTypes.STRING,25 allowNull: false,26 defaultValue: ' '27 },28 c_Marca: {29 type: DataTypes.STRING,30 allowNull: false,31 defaultValue: ' '32 },33 c_Modelo: {34 type: DataTypes.STRING,35 allowNull: false,36 defaultValue: ' '37 },38 c_Procede: {39 type: DataTypes.BOOLEAN,40 allowNull: false,41 defaultValue: '0'42 },43 n_CostoAct: {44 type: DataTypes.FLOAT,45 allowNull: false,46 defaultValue: '((0))'47 },48 n_CostoAnt: {49 type: DataTypes.FLOAT,50 allowNull: false,51 defaultValue: '((0))'52 },53 n_CostoPro: {54 type: DataTypes.FLOAT,55 allowNull: false,56 defaultValue: '((0))'57 },58 n_CostoRep: {59 type: DataTypes.FLOAT,60 allowNull: false,61 defaultValue: '((0))'62 },63 n_Precio1: {64 type: DataTypes.FLOAT,65 allowNull: false,66 defaultValue: '((0))'67 },68 n_Precio2: {69 type: DataTypes.FLOAT,70 allowNull: false,71 defaultValue: '((0))'72 },73 n_Precio3: {74 type: DataTypes.FLOAT,75 allowNull: false,76 defaultValue: '((0))'77 },78 c_Seriales: {79 type: DataTypes.INTEGER,80 allowNull: false,81 defaultValue: '((0))'82 },83 c_Compuesto: {84 type: DataTypes.INTEGER,85 allowNull: false,86 defaultValue: '((0))'87 },88 c_Presenta: {89 type: DataTypes.STRING,90 allowNull: false,91 defaultValue: ' '92 },93 n_Peso: {94 type: DataTypes.FLOAT,95 allowNull: false,96 defaultValue: '((0))'97 },98 n_Volumen: {99 type: DataTypes.FLOAT,100 allowNull: false,101 defaultValue: '((0))'102 },103 n_CantiBul: {104 type: DataTypes.FLOAT,105 allowNull: false,106 defaultValue: '((0))'107 },108 n_PesoBul: {109 type: DataTypes.FLOAT,110 allowNull: false,111 defaultValue: '((0))'112 },113 n_VolBul: {114 type: DataTypes.FLOAT,115 allowNull: false,116 defaultValue: '((0))'117 },118 c_FileImagen: {119 type: "IMAGE",120 allowNull: true121 },122 n_Impuesto1: {123 type: DataTypes.FLOAT,124 allowNull: false,125 defaultValue: '((0))'126 },127 n_Impuesto2: {128 type: DataTypes.FLOAT,129 allowNull: false,130 defaultValue: '((0))'131 },132 n_Impuesto3: {133 type: DataTypes.FLOAT,134 allowNull: false,135 defaultValue: '((0))'136 },137 c_Cod_Arancel: {138 type: DataTypes.STRING,139 allowNull: false,140 defaultValue: ' '141 },142 c_Des_Arancel: {143 type: DataTypes.STRING,144 allowNull: false,145 defaultValue: ' '146 },147 n_Por_Arancel: {148 type: DataTypes.FLOAT,149 allowNull: false,150 defaultValue: '((0))'151 },152 n_Costo_Original: {153 type: DataTypes.FLOAT,154 allowNull: false,155 defaultValue: '((0))'156 },157 c_Observacio: {158 type: DataTypes.TEXT,159 allowNull: false,160 defaultValue: ''161 },162 n_Activo: {163 type: DataTypes.INTEGER,164 allowNull: false,165 defaultValue: '((0))'166 },167 n_TipoPeso: {168 type: DataTypes.INTEGER,169 allowNull: false,170 defaultValue: '((0))'171 },172 n_PrecioO: {173 type: DataTypes.FLOAT,174 allowNull: false,175 defaultValue: '((0))'176 },177 f_Inicial: {178 type: DataTypes.DATE,179 allowNull: false,180 defaultValue: '(((5)/(11))/(70))'181 },182 f_Final: {183 type: DataTypes.DATE,184 allowNull: false,185 defaultValue: '(((5)/(11))/(70))'186 },187 h_Inicial: {188 type: DataTypes.DATE,189 allowNull: false,190 defaultValue: '(((5)/(11))/(70))'191 },192 h_Final: {193 type: DataTypes.DATE,194 allowNull: false,195 defaultValue: '(((5)/(11))/(70))'196 },197 Add_Date: {198 type: DataTypes.DATE,199 allowNull: false,200 defaultValue: '(((5)/(11))/(70))'201 },202 Update_Date: {203 type: DataTypes.DATE,204 allowNull: false,205 defaultValue: '(((5)/(11))/(70))'206 },207 c_CodFabricante: {208 type: DataTypes.STRING,209 allowNull: false,210 defaultValue: ' '211 },212 Hablador: {213 type: DataTypes.INTEGER,214 allowNull: false,215 defaultValue: '((0))'216 },217 c_CodMoneda: {218 type: DataTypes.STRING,219 allowNull: false,220 defaultValue: '0000000002'221 },222 Cant_Decimales: {223 type: DataTypes.INTEGER,224 allowNull: false,225 defaultValue: '((0))'226 },227 Moneda_Ant: {228 type: DataTypes.FLOAT,229 allowNull: false,230 defaultValue: '((0))'231 },232 Moneda_Act: {233 type: DataTypes.FLOAT,234 allowNull: false,235 defaultValue: '((0))'236 },237 Moneda_Pro: {238 type: DataTypes.FLOAT,239 allowNull: false,240 defaultValue: '((0))'241 },242 TipoCambio: {243 type: DataTypes.INTEGER,244 allowNull: false,245 defaultValue: '((0))'246 },247 ID: {248 type: DataTypes.DOUBLE,249 allowNull: false,250 primaryKey: true,251 autoIncrement: true252 },253 c_Cod_Plantilla: {254 type: DataTypes.STRING,255 allowNull: false,256 defaultValue: ''257 },258 n_Pro_Ext: {259 type: DataTypes.STRING,260 allowNull: false,261 defaultValue: ''262 },263 c_UsuarioAdd: {264 type: DataTypes.STRING,265 allowNull: false,266 defaultValue: ''267 },268 c_UsuarioUpd: {269 type: DataTypes.STRING,270 allowNull: false,271 defaultValue: ''272 },273 c_Codigo_Base: {274 type: DataTypes.STRING,275 allowNull: false,276 defaultValue: ' '277 },278 c_Descri_Base: {279 type: DataTypes.STRING,280 allowNull: false,281 defaultValue: ' '282 },283 Text1: {284 type: DataTypes.STRING,285 allowNull: false,286 defaultValue: ' '287 },288 Text2: {289 type: DataTypes.STRING,290 allowNull: false,291 defaultValue: ' '292 },293 Text3: {294 type: DataTypes.STRING,295 allowNull: false,296 defaultValue: ' '297 },298 Text4: {299 type: DataTypes.STRING,300 allowNull: false,301 defaultValue: ' '302 },303 Text5: {304 type: DataTypes.STRING,305 allowNull: false,306 defaultValue: ' '307 },308 Text6: {309 type: DataTypes.STRING,310 allowNull: false,311 defaultValue: ' '312 },313 Text7: {314 type: DataTypes.STRING,315 allowNull: false,316 defaultValue: ' '317 },318 Text8: {319 type: DataTypes.STRING,320 allowNull: false,321 defaultValue: ' '322 },323 Date1: {324 type: DataTypes.DATE,325 allowNull: false,326 defaultValue: '(((17)/(4))/(75))'327 },328 Nume1: {329 type: DataTypes.FLOAT,330 allowNull: false,331 defaultValue: '((0))'332 },333 n_Cantidad_Tmp: {334 type: DataTypes.STRING,335 allowNull: false,336 defaultValue: '((0))'337 },338 n_Prod_Ext: {339 type: DataTypes.STRING,340 allowNull: false,341 defaultValue: ''342 },343 nu_Tipo_Producto: {344 type: DataTypes.INTEGER,345 allowNull: false,346 defaultValue: '((1))'347 },348 nu_InsumoInterno: {349 type: DataTypes.INTEGER,350 allowNull: false,351 defaultValue: '((0))'352 },353 nu_PrecioRegulado: {354 type: DataTypes.INTEGER,355 allowNull: false,356 defaultValue: '((0))'357 },358 nu_PocentajeMerma: {359 type: DataTypes.FLOAT,360 allowNull: false,361 defaultValue: '((0))'362 },363 nu_NivelClave: {364 type: DataTypes.INTEGER,365 allowNull: false,366 defaultValue: '((0))'367 },368 cu_Descripcion_Corta: {369 type: DataTypes.STRING,370 allowNull: false,371 defaultValue: ''372 },373 bs_PermiteTeclado: {374 type: DataTypes.BOOLEAN,375 allowNull: false,376 defaultValue: '0'377 },378 bs_PermiteCantidad: {379 type: DataTypes.BOOLEAN,380 allowNull: false,381 defaultValue: '0'382 },383 nu_StockMin: {384 type: DataTypes.FLOAT,385 allowNull: false,386 defaultValue: '((0))'387 },388 nu_StockMax: {389 type: DataTypes.FLOAT,390 allowNull: false,391 defaultValue: '((0))'392 }393 }, {394 tableName: 'TR_PENDIENTE_PROD'395 });...
MA_PROVEEDORES.js
Source:MA_PROVEEDORES.js
1/* jshint indent: 2 */2module.exports = function(sequelize, DataTypes) {3 return sequelize.define('MA_PROVEEDORES', {4 c_codproveed: {5 type: DataTypes.STRING,6 allowNull: false,7 primaryKey: true8 },9 c_descripcio: {10 type: DataTypes.STRING,11 allowNull: false,12 defaultValue: ''13 },14 c_grupo: {15 type: DataTypes.STRING,16 allowNull: false,17 defaultValue: '(NCXP'18 },19 c_rif: {20 type: DataTypes.STRING,21 allowNull: false,22 defaultValue: ''23 },24 c_representa: {25 type: DataTypes.STRING,26 allowNull: false,27 defaultValue: ' '28 },29 c_cargo: {30 type: DataTypes.STRING,31 allowNull: false,32 defaultValue: ' '33 },34 c_direccion: {35 type: DataTypes.STRING,36 allowNull: false,37 defaultValue: ' '38 },39 c_ciudad: {40 type: DataTypes.STRING,41 allowNull: false,42 defaultValue: ' '43 },44 c_estado: {45 type: DataTypes.STRING,46 allowNull: false,47 defaultValue: ' '48 },49 c_pais: {50 type: DataTypes.STRING,51 allowNull: false,52 defaultValue: ' '53 },54 c_email: {55 type: DataTypes.STRING,56 allowNull: false,57 defaultValue: ' '58 },59 c_telefono: {60 type: DataTypes.STRING,61 allowNull: false,62 defaultValue: ' '63 },64 c_celular: {65 type: DataTypes.STRING,66 allowNull: false,67 defaultValue: ' '68 },69 c_fax: {70 type: DataTypes.STRING,71 allowNull: false,72 defaultValue: ' '73 },74 c_web: {75 type: DataTypes.STRING,76 allowNull: false,77 defaultValue: ' '78 },79 n_limite: {80 type: DataTypes.FLOAT,81 allowNull: false,82 defaultValue: '((0))'83 },84 n_dias: {85 type: DataTypes.INTEGER,86 allowNull: false,87 defaultValue: '((15))'88 },89 n_porcentaje: {90 type: DataTypes.FLOAT,91 allowNull: false,92 defaultValue: '((0))'93 },94 c_observacio: {95 type: DataTypes.TEXT,96 allowNull: false,97 defaultValue: ' '98 },99 c_nit: {100 type: DataTypes.STRING,101 allowNull: false,102 defaultValue: ''103 },104 n_activo: {105 type: DataTypes.INTEGER,106 allowNull: false,107 defaultValue: '((1))'108 },109 update_date: {110 type: DataTypes.DATE,111 allowNull: false,112 defaultValue: '((1))'113 },114 add_date: {115 type: DataTypes.DATE,116 allowNull: false,117 defaultValue: '(((5)/(11))/(70))'118 },119 c_razon: {120 type: DataTypes.STRING,121 allowNull: false,122 defaultValue: '(((5)/(11))/(70))'123 },124 c_codreferencial: {125 type: DataTypes.STRING,126 allowNull: false,127 defaultValue: ' '128 },129 c_contacto_adm: {130 type: DataTypes.STRING,131 allowNull: false,132 defaultValue: ' '133 },134 c_contacto_ven: {135 type: DataTypes.STRING,136 allowNull: false,137 defaultValue: ' '138 },139 c_contacto_reg: {140 type: DataTypes.STRING,141 allowNull: false,142 defaultValue: ' '143 },144 c_contacto_vdd: {145 type: DataTypes.STRING,146 allowNull: false,147 defaultValue: ' '148 },149 c_email_adm: {150 type: DataTypes.STRING,151 allowNull: false,152 defaultValue: ' '153 },154 c_email_ven: {155 type: DataTypes.STRING,156 allowNull: false,157 defaultValue: ' '158 },159 c_email_reg: {160 type: DataTypes.STRING,161 allowNull: false,162 defaultValue: ' '163 },164 c_email_vdd: {165 type: DataTypes.STRING,166 allowNull: false,167 defaultValue: ' '168 },169 c_email_fiscal: {170 type: DataTypes.STRING,171 allowNull: false,172 defaultValue: ' '173 },174 c_email_depo: {175 type: DataTypes.STRING,176 allowNull: false,177 defaultValue: ' '178 },179 c_telefono_rep: {180 type: DataTypes.STRING,181 allowNull: false,182 defaultValue: ' '183 },184 c_telefono_adm: {185 type: DataTypes.STRING,186 allowNull: false,187 defaultValue: ' '188 },189 c_telefono_ven: {190 type: DataTypes.STRING,191 allowNull: false,192 defaultValue: ' '193 },194 c_telefono_reg: {195 type: DataTypes.STRING,196 allowNull: false,197 defaultValue: ' '198 },199 c_telefono_vdd: {200 type: DataTypes.STRING,201 allowNull: false,202 defaultValue: ' '203 },204 c_celular_adm: {205 type: DataTypes.STRING,206 allowNull: false,207 defaultValue: ' '208 },209 c_celular_ven: {210 type: DataTypes.STRING,211 allowNull: false,212 defaultValue: ' '213 },214 c_celular_reg: {215 type: DataTypes.STRING,216 allowNull: false,217 defaultValue: ' '218 },219 c_celular_vdd: {220 type: DataTypes.STRING,221 allowNull: false,222 defaultValue: ' '223 },224 c_direccion_dep: {225 type: DataTypes.STRING,226 allowNull: false,227 defaultValue: ' '228 },229 c_ciudad_dep: {230 type: DataTypes.STRING,231 allowNull: false,232 defaultValue: ' '233 },234 c_estado_dep: {235 type: DataTypes.STRING,236 allowNull: false,237 defaultValue: ' '238 },239 c_pais_dep: {240 type: DataTypes.STRING,241 allowNull: false,242 defaultValue: ' '243 },244 c_telefono_dep: {245 type: DataTypes.STRING,246 allowNull: false,247 defaultValue: ' '248 },249 c_fax_dep: {250 type: DataTypes.STRING,251 allowNull: false,252 defaultValue: ' '253 },254 c_email_dep: {255 type: DataTypes.STRING,256 allowNull: false,257 defaultValue: ' '258 },259 c_cod_banco: {260 type: DataTypes.STRING,261 allowNull: false,262 defaultValue: ' '263 },264 c_cuenta_banco: {265 type: DataTypes.STRING,266 allowNull: false,267 defaultValue: ' '268 },269 c_cuentahabiente: {270 type: DataTypes.STRING,271 allowNull: false,272 defaultValue: ' '273 },274 n_dia2: {275 type: DataTypes.INTEGER,276 allowNull: false,277 defaultValue: '((0))'278 },279 n_porcentaje2: {280 type: DataTypes.FLOAT,281 allowNull: false,282 defaultValue: '((0))'283 },284 n_dia3: {285 type: DataTypes.INTEGER,286 allowNull: false,287 defaultValue: '((0))'288 },289 n_porcentaje3: {290 type: DataTypes.FLOAT,291 allowNull: false,292 defaultValue: '((0))'293 },294 c_codlicores: {295 type: DataTypes.STRING,296 allowNull: false,297 defaultValue: '((0))'298 },299 n_diasdespacho: {300 type: DataTypes.INTEGER,301 allowNull: false,302 defaultValue: '((0))'303 },304 B_PREFERENCIAL: {305 type: DataTypes.INTEGER,306 allowNull: false,307 defaultValue: '((0))'308 },309 N_RETENCION: {310 type: DataTypes.FLOAT,311 allowNull: false,312 defaultValue: '((0))'313 },314 CS_COMPRADOR: {315 type: DataTypes.STRING,316 allowNull: false,317 defaultValue: ''318 },319 bu_cualquier_cuenta: {320 type: DataTypes.BOOLEAN,321 allowNull: false,322 defaultValue: '0'323 },324 cs_tipo: {325 type: DataTypes.STRING,326 allowNull: false,327 defaultValue: ''328 },329 id: {330 type: DataTypes.DOUBLE,331 allowNull: false332 },333 c_rim: {334 type: DataTypes.STRING,335 allowNull: false,336 defaultValue: ''337 },338 n_diasreposicion: {339 type: DataTypes.INTEGER,340 allowNull: false,341 defaultValue: '((0))'342 },343 n_diasanalisis: {344 type: DataTypes.INTEGER,345 allowNull: false,346 defaultValue: '((0))'347 },348 n_descaveria: {349 type: DataTypes.INTEGER,350 allowNull: false,351 defaultValue: '((0))'352 },353 b_enviarOdcL: {354 type: DataTypes.BOOLEAN,355 allowNull: false,356 defaultValue: '0'357 },358 b_enviarOdcA: {359 type: DataTypes.BOOLEAN,360 allowNull: false,361 defaultValue: '0'362 },363 b_enviarOdcV: {364 type: DataTypes.BOOLEAN,365 allowNull: false,366 defaultValue: '0'367 },368 b_enviarOdcR: {369 type: DataTypes.BOOLEAN,370 allowNull: false,371 defaultValue: '0'372 },373 b_enviarOdcVen: {374 type: DataTypes.BOOLEAN,375 allowNull: false,376 defaultValue: '0'377 },378 n_porcentaje_seniat: {379 type: DataTypes.FLOAT,380 allowNull: false,381 defaultValue: '((0))'382 },383 c_UsuarioAdd: {384 type: DataTypes.STRING,385 allowNull: false,386 defaultValue: ''387 },388 c_UsuarioUpd: {389 type: DataTypes.STRING,390 allowNull: false,391 defaultValue: ''392 }393 }, {394 tableName: 'MA_PROVEEDORES'395 });...
MA_PRODUCTOS.js
Source:MA_PRODUCTOS.js
1/* jshint indent: 2 */2module.exports = function (sequelize, DataTypes) {3 return sequelize.define('MA_PRODUCTOS', {4 c_Codigo: {5 type: DataTypes.STRING,6 allowNull: false,7 primaryKey: true8 },9 c_Descri: {10 type: DataTypes.STRING,11 allowNull: false,12 defaultValue: ''13 },14 c_Departamento: {15 type: DataTypes.STRING,16 allowNull: false,17 defaultValue: '001'18 },19 c_Grupo: {20 type: DataTypes.STRING,21 allowNull: false,22 defaultValue: ''23 },24 c_Subgrupo: {25 type: DataTypes.STRING,26 allowNull: false,27 defaultValue: ''28 },29 c_Marca: {30 type: DataTypes.STRING,31 allowNull: false,32 defaultValue: ''33 },34 c_Modelo: {35 type: DataTypes.STRING,36 allowNull: false,37 defaultValue: ''38 },39 c_Procede: {40 type: DataTypes.BOOLEAN,41 allowNull: false,42 defaultValue: '0'43 },44 n_CostoAct: {45 type: DataTypes.FLOAT,46 allowNull: false,47 defaultValue: '((0))'48 },49 n_CostoAnt: {50 type: DataTypes.FLOAT,51 allowNull: false,52 defaultValue: '((0))'53 },54 n_CostoPro: {55 type: DataTypes.FLOAT,56 allowNull: false,57 defaultValue: '((0))'58 },59 n_CostoRep: {60 type: DataTypes.FLOAT,61 allowNull: false,62 defaultValue: '((0))'63 },64 n_Precio1: {65 type: DataTypes.FLOAT,66 allowNull: false,67 defaultValue: '((0))'68 },69 n_Precio2: {70 type: DataTypes.FLOAT,71 allowNull: false,72 defaultValue: '((0))'73 },74 n_Precio3: {75 type: DataTypes.FLOAT,76 allowNull: false,77 defaultValue: '((0))'78 },79 c_Seriales: {80 type: DataTypes.STRING,81 allowNull: false,82 defaultValue: '((0))'83 },84 c_Compuesto: {85 type: DataTypes.INTEGER,86 allowNull: false,87 defaultValue: '((0))'88 },89 c_Presenta: {90 type: DataTypes.STRING,91 allowNull: false,92 defaultValue: ''93 },94 n_Peso: {95 type: DataTypes.FLOAT,96 allowNull: false,97 defaultValue: '((0))'98 },99 n_Volumen: {100 type: DataTypes.FLOAT,101 allowNull: false,102 defaultValue: '((0))'103 },104 n_CantiBul: {105 type: DataTypes.FLOAT,106 allowNull: false,107 defaultValue: '((1))'108 },109 n_PesoBul: {110 type: DataTypes.FLOAT,111 allowNull: false,112 defaultValue: '((0))'113 },114 n_VolBul: {115 type: DataTypes.FLOAT,116 allowNull: false,117 defaultValue: '((0))'118 },119 c_FileImagen: {120 type: "IMAGE",121 allowNull: true122 },123 n_Impuesto1: {124 type: DataTypes.FLOAT,125 allowNull: false,126 defaultValue: '((12))'127 },128 n_Impuesto2: {129 type: DataTypes.FLOAT,130 allowNull: false,131 defaultValue: '((0))'132 },133 n_Impuesto3: {134 type: DataTypes.FLOAT,135 allowNull: false,136 defaultValue: '((0))'137 },138 c_Cod_Arancel: {139 type: DataTypes.STRING,140 allowNull: false,141 defaultValue: ' '142 },143 c_Des_Arancel: {144 type: DataTypes.STRING,145 allowNull: false,146 defaultValue: ' '147 },148 n_Por_Arancel: {149 type: DataTypes.FLOAT,150 allowNull: false,151 defaultValue: '((0))'152 },153 n_Costo_Original: {154 type: DataTypes.FLOAT,155 allowNull: false,156 defaultValue: '((0))'157 },158 c_Observacio: {159 type: DataTypes.TEXT,160 allowNull: false,161 defaultValue: ''162 },163 n_Activo: {164 type: DataTypes.INTEGER,165 allowNull: false,166 defaultValue: '((1))'167 },168 n_TipoPeso: {169 type: DataTypes.INTEGER,170 allowNull: false,171 defaultValue: '((0))'172 },173 n_PrecioO: {174 type: DataTypes.FLOAT,175 allowNull: false,176 defaultValue: '((0))'177 },178 f_Inicial: {179 type: DataTypes.DATE,180 allowNull: false,181 defaultValue: '(((5)/(11))/(70))'182 },183 f_Final: {184 type: DataTypes.DATE,185 allowNull: false,186 defaultValue: '(((5)/(11))/(40))'187 },188 h_Inicial: {189 type: DataTypes.DATE,190 allowNull: false,191 defaultValue: '00:00:00'192 },193 h_Final: {194 type: DataTypes.DATE,195 allowNull: false,196 defaultValue: '00:00:00'197 },198 Add_Date: {199 type: DataTypes.DATE,200 allowNull: false,201 defaultValue: '(getdate())'202 },203 Update_Date: {204 type: DataTypes.DATE,205 allowNull: false,206 defaultValue: '(((5)/(11))/(70))'207 },208 c_CodFabricante: {209 type: DataTypes.STRING,210 allowNull: false,211 defaultValue: ' '212 },213 Hablador: {214 type: DataTypes.INTEGER,215 allowNull: false,216 defaultValue: '((1))'217 },218 c_CodMoneda: {219 type: DataTypes.STRING,220 allowNull: false,221 defaultValue: '0000000001'222 },223 Cant_Decimales: {224 type: DataTypes.INTEGER,225 allowNull: false,226 defaultValue: '((0))'227 },228 Moneda_Ant: {229 type: DataTypes.FLOAT,230 allowNull: false,231 defaultValue: '((1))'232 },233 Moneda_Act: {234 type: DataTypes.FLOAT,235 allowNull: false,236 defaultValue: '((1))'237 },238 Moneda_Pro: {239 type: DataTypes.FLOAT,240 allowNull: false,241 defaultValue: '((1))'242 },243 c_Codigo_Base: {244 type: DataTypes.STRING,245 allowNull: false,246 defaultValue: ' '247 },248 c_Descri_Base: {249 type: DataTypes.STRING,250 allowNull: false,251 defaultValue: ' '252 },253 Text1: {254 type: DataTypes.STRING,255 allowNull: false,256 defaultValue: ' '257 },258 Text2: {259 type: DataTypes.STRING,260 allowNull: false,261 defaultValue: ' '262 },263 Text3: {264 type: DataTypes.STRING,265 allowNull: false,266 defaultValue: ' '267 },268 Text4: {269 type: DataTypes.STRING,270 allowNull: false,271 defaultValue: ' '272 },273 Text5: {274 type: DataTypes.STRING,275 allowNull: false,276 defaultValue: ' '277 },278 Text6: {279 type: DataTypes.STRING,280 allowNull: false,281 defaultValue: ' '282 },283 Text7: {284 type: DataTypes.STRING,285 allowNull: false,286 defaultValue: ' '287 },288 Text8: {289 type: DataTypes.STRING,290 allowNull: false,291 defaultValue: ' '292 },293 Date1: {294 type: DataTypes.DATE,295 allowNull: false,296 defaultValue: '(((17)/(4))/(75))'297 },298 Nume1: {299 type: DataTypes.FLOAT,300 allowNull: false,301 defaultValue: '((0))'302 },303 n_Cantidad_Tmp: {304 type: DataTypes.STRING,305 allowNull: false,306 defaultValue: '((0))'307 },308 c_Cod_Plantilla: {309 type: DataTypes.STRING,310 allowNull: false,311 defaultValue: ' '312 },313 c_UsuarioAdd: {314 type: DataTypes.STRING,315 allowNull: false,316 defaultValue: ''317 },318 c_UsuarioUpd: {319 type: DataTypes.STRING,320 allowNull: false,321 defaultValue: ''322 },323 n_Prod_Ext: {324 type: DataTypes.STRING,325 allowNull: false,326 defaultValue: ''327 },328 n_Pro_Ext: {329 type: DataTypes.STRING,330 allowNull: false,331 defaultValue: ''332 },333 nu_Tipo_Producto: {334 type: DataTypes.INTEGER,335 allowNull: false,336 defaultValue: '((1))'337 },338 nu_InsumoInterno: {339 type: DataTypes.INTEGER,340 allowNull: false,341 defaultValue: '((0))'342 },343 nu_PrecioRegulado: {344 type: DataTypes.INTEGER,345 allowNull: false,346 defaultValue: '((0))'347 },348 nu_PocentajeMerma: {349 type: DataTypes.FLOAT,350 allowNull: false,351 defaultValue: '((0))'352 },353 nu_NivelClave: {354 type: DataTypes.INTEGER,355 allowNull: false,356 defaultValue: '((0))'357 },358 cu_Descripcion_Corta: {359 type: DataTypes.STRING,360 allowNull: false,361 defaultValue: ''362 },363 bs_PermiteTeclado: {364 type: DataTypes.BOOLEAN,365 allowNull: false,366 defaultValue: '0'367 },368 bs_PermiteCantidad: {369 type: DataTypes.BOOLEAN,370 allowNull: false,371 defaultValue: '0'372 },373 nu_StockMin: {374 type: DataTypes.FLOAT,375 allowNull: false,376 defaultValue: '((0))'377 },378 nu_StockMax: {379 type: DataTypes.FLOAT,380 allowNull: false,381 defaultValue: '((0))'382 },383 ID: {384 type: DataTypes.DOUBLE,385 allowNull: false386 }387 }, {388 tableName: 'MA_PRODUCTOS'389 });...
TR_PEND_PRODUCTOS.js
Source:TR_PEND_PRODUCTOS.js
1/* jshint indent: 2 */2module.exports = function(sequelize, DataTypes) {3 return sequelize.define('TR_PEND_PRODUCTOS', {4 C_CODIGO: {5 type: DataTypes.STRING,6 allowNull: false,7 primaryKey: true8 },9 C_DESCRI: {10 type: DataTypes.STRING,11 allowNull: false12 },13 c_departamento: {14 type: DataTypes.STRING,15 allowNull: false,16 defaultValue: ' '17 },18 c_grupo: {19 type: DataTypes.STRING,20 allowNull: false,21 defaultValue: ' '22 },23 c_subgrupo: {24 type: DataTypes.STRING,25 allowNull: false,26 defaultValue: ' '27 },28 c_marca: {29 type: DataTypes.STRING,30 allowNull: false,31 defaultValue: ' '32 },33 c_modelo: {34 type: DataTypes.STRING,35 allowNull: false,36 defaultValue: ' '37 },38 c_procede: {39 type: DataTypes.BOOLEAN,40 allowNull: false,41 defaultValue: '0'42 },43 n_costoact: {44 type: DataTypes.FLOAT,45 allowNull: false,46 defaultValue: '((0))'47 },48 n_costoant: {49 type: DataTypes.FLOAT,50 allowNull: false,51 defaultValue: '((0))'52 },53 n_costopro: {54 type: DataTypes.FLOAT,55 allowNull: false,56 defaultValue: '((0))'57 },58 n_costorep: {59 type: DataTypes.FLOAT,60 allowNull: false,61 defaultValue: '((0))'62 },63 n_precio1: {64 type: DataTypes.FLOAT,65 allowNull: false,66 defaultValue: '((0))'67 },68 n_precio2: {69 type: DataTypes.FLOAT,70 allowNull: false,71 defaultValue: '((0))'72 },73 n_precio3: {74 type: DataTypes.FLOAT,75 allowNull: false,76 defaultValue: '((0))'77 },78 c_seriales: {79 type: DataTypes.STRING,80 allowNull: false,81 defaultValue: '((0))'82 },83 c_compuesto: {84 type: DataTypes.STRING,85 allowNull: false,86 defaultValue: '((0))'87 },88 c_presenta: {89 type: DataTypes.STRING,90 allowNull: false,91 defaultValue: ' '92 },93 n_peso: {94 type: DataTypes.FLOAT,95 allowNull: false,96 defaultValue: ' '97 },98 n_volumen: {99 type: DataTypes.FLOAT,100 allowNull: false,101 defaultValue: ' '102 },103 n_cantibul: {104 type: DataTypes.FLOAT,105 allowNull: false,106 defaultValue: ' '107 },108 n_pesobul: {109 type: DataTypes.FLOAT,110 allowNull: false,111 defaultValue: ' '112 },113 n_volbul: {114 type: DataTypes.FLOAT,115 allowNull: false,116 defaultValue: ' '117 },118 c_fileimagen: {119 type: "IMAGE",120 allowNull: true121 },122 n_impuesto1: {123 type: DataTypes.FLOAT,124 allowNull: false,125 defaultValue: '((0))'126 },127 n_impuesto2: {128 type: DataTypes.FLOAT,129 allowNull: false,130 defaultValue: '((0))'131 },132 n_impuesto3: {133 type: DataTypes.FLOAT,134 allowNull: false,135 defaultValue: '((0))'136 },137 c_cod_arancel: {138 type: DataTypes.STRING,139 allowNull: false,140 defaultValue: ' '141 },142 c_des_arancel: {143 type: DataTypes.STRING,144 allowNull: false,145 defaultValue: ' '146 },147 n_por_arancel: {148 type: DataTypes.FLOAT,149 allowNull: false,150 defaultValue: '((0))'151 },152 n_costo_original: {153 type: DataTypes.FLOAT,154 allowNull: false,155 defaultValue: '((0))'156 },157 c_observacio: {158 type: DataTypes.TEXT,159 allowNull: true160 },161 n_activo: {162 type: DataTypes.INTEGER,163 allowNull: false,164 defaultValue: '((1))'165 },166 n_tipopeso: {167 type: DataTypes.INTEGER,168 allowNull: false,169 defaultValue: '((0))'170 },171 n_precioO: {172 type: DataTypes.FLOAT,173 allowNull: false,174 defaultValue: '((0))'175 },176 f_inicial: {177 type: DataTypes.DATE,178 allowNull: false,179 defaultValue: '(((5)/(11))/(70))'180 },181 f_final: {182 type: DataTypes.DATE,183 allowNull: false,184 defaultValue: '(((5)/(11))/(70))'185 },186 h_inicial: {187 type: DataTypes.DATE,188 allowNull: true,189 defaultValue: '(((5)/(11))/(70))'190 },191 h_final: {192 type: DataTypes.DATE,193 allowNull: true,194 defaultValue: '(((5)/(11))/(70))'195 },196 add_date: {197 type: DataTypes.DATE,198 allowNull: false,199 defaultValue: '(((5)/(11))/(70))'200 },201 update_date: {202 type: DataTypes.DATE,203 allowNull: false,204 defaultValue: '(((5)/(11))/(70))'205 },206 c_codfabricante: {207 type: DataTypes.STRING,208 allowNull: false,209 defaultValue: ' '210 },211 HABLADOR: {212 type: DataTypes.INTEGER,213 allowNull: false,214 defaultValue: '((1))'215 },216 C_CODMONEDA: {217 type: DataTypes.STRING,218 allowNull: false,219 defaultValue: '0000000002'220 },221 CANT_DECIMALES: {222 type: DataTypes.INTEGER,223 allowNull: false,224 defaultValue: '((0))'225 },226 MONEDA_ANT: {227 type: DataTypes.FLOAT,228 allowNull: false,229 defaultValue: '((1))'230 },231 MONEDA_ACT: {232 type: DataTypes.FLOAT,233 allowNull: false,234 defaultValue: '((1))'235 },236 MONEDA_PRO: {237 type: DataTypes.FLOAT,238 allowNull: false,239 defaultValue: '((1))'240 },241 N_PROD_EXT: {242 type: DataTypes.STRING,243 allowNull: false,244 defaultValue: ''245 },246 c_usuarioAdd: {247 type: DataTypes.STRING,248 allowNull: false,249 defaultValue: ''250 },251 c_usuarioupd: {252 type: DataTypes.STRING,253 allowNull: false,254 defaultValue: ''255 },256 ID: {257 type: DataTypes.DOUBLE,258 allowNull: false,259 primaryKey: true,260 autoIncrement: true261 },262 C_CODIGO_BASE: {263 type: DataTypes.STRING,264 allowNull: false,265 defaultValue: ' '266 },267 C_DESCRI_BASE: {268 type: DataTypes.STRING,269 allowNull: false,270 defaultValue: ' '271 },272 TEXT1: {273 type: DataTypes.STRING,274 allowNull: false,275 defaultValue: ' '276 },277 TEXT2: {278 type: DataTypes.STRING,279 allowNull: false,280 defaultValue: ' '281 },282 TEXT3: {283 type: DataTypes.STRING,284 allowNull: false,285 defaultValue: ' '286 },287 TEXT4: {288 type: DataTypes.STRING,289 allowNull: false,290 defaultValue: ' '291 },292 TEXT5: {293 type: DataTypes.STRING,294 allowNull: false,295 defaultValue: ' '296 },297 TEXT6: {298 type: DataTypes.STRING,299 allowNull: false,300 defaultValue: ' '301 },302 TEXT7: {303 type: DataTypes.STRING,304 allowNull: false,305 defaultValue: ' '306 },307 TEXT8: {308 type: DataTypes.STRING,309 allowNull: false,310 defaultValue: ' '311 },312 DATE1: {313 type: DataTypes.DATE,314 allowNull: false,315 defaultValue: '(((17)/(4))/(75))'316 },317 NUME1: {318 type: DataTypes.FLOAT,319 allowNull: false,320 defaultValue: '((0))'321 },322 N_CANTIDAD_TMP: {323 type: DataTypes.STRING,324 allowNull: false,325 defaultValue: '((0))'326 },327 C_COD_PLANTILLA: {328 type: DataTypes.STRING,329 allowNull: false,330 defaultValue: ' '331 },332 NU_TIPO_PRODUCTO: {333 type: DataTypes.INTEGER,334 allowNull: false,335 defaultValue: '((1))'336 },337 nu_insumointerno: {338 type: DataTypes.INTEGER,339 allowNull: false,340 defaultValue: '((0))'341 },342 nu_precioregulado: {343 type: DataTypes.INTEGER,344 allowNull: false,345 defaultValue: '((0))'346 },347 nu_pocentajemerma: {348 type: DataTypes.FLOAT,349 allowNull: false,350 defaultValue: '((0))'351 },352 nu_nivelClave: {353 type: DataTypes.INTEGER,354 allowNull: false,355 defaultValue: '((0))'356 },357 CU_DESCRIPCION_CORTA: {358 type: DataTypes.STRING,359 allowNull: false,360 defaultValue: ''361 },362 bs_permiteteclado: {363 type: DataTypes.BOOLEAN,364 allowNull: false,365 defaultValue: '0'366 },367 bs_permitecantidad: {368 type: DataTypes.BOOLEAN,369 allowNull: false,370 defaultValue: '0'371 },372 nu_stockmin: {373 type: DataTypes.FLOAT,374 allowNull: false,375 defaultValue: '((0))'376 },377 nu_stockmax: {378 type: DataTypes.FLOAT,379 allowNull: false,380 defaultValue: '((0))'381 }382 }, {383 tableName: 'TR_PEND_PRODUCTOS'384 });...
teacher_info.js
Source:teacher_info.js
1'use strict';2module.exports = (sequelize, DataTypes) => {3 const teacher_info = sequelize.define('teacher_info', {4 position: {5 type: DataTypes.STRING,6 defaultValue: ''7 },8 resume: {9 type: DataTypes.STRING,10 defaultValue: ''11 },12 interview_date: {13 type: DataTypes.STRING,14 defaultValue: ''15 },16 ref_1_email: {17 type: DataTypes.STRING,18 defaultValue: ''19 },20 ref_2_email: {21 type: DataTypes.STRING,22 defaultValue: ''23 },24 ref_1_phone: {25 type: DataTypes.STRING,26 defaultValue: ''27 },28 ref_2_phone: {29 type: DataTypes.STRING,30 defaultValue: ''31 },32 reference1: {33 type: DataTypes.STRING,34 defaultValue: ''35 },36 reference2: {37 type: DataTypes.STRING,38 defaultValue: ''39 },40 date_of_birth: {41 type: DataTypes.STRING,42 defaultValue: ''43 },44 date_of_hire: {45 type: DataTypes.STRING,46 defaultValue: ''47 },48 eec_cert_number: {49 type: DataTypes.STRING,50 defaultValue: ''51 },52 eec_pq_reg: {53 type: DataTypes.STRING,54 defaultValue: ''55 },56 eec_pq_reg_date: {57 type: DataTypes.STRING,58 defaultValue: ''59 },60 cori: {61 type: DataTypes.STRING,62 defaultValue: ''63 },64 cori_date: {65 type: DataTypes.STRING,66 defaultValue: ''67 },68 dcf: {69 type: DataTypes.STRING,70 defaultValue: ''71 },72 dcf_date: {73 type: DataTypes.STRING,74 defaultValue: ''75 },76 physical: {77 type: DataTypes.STRING,78 defaultValue: ''79 },80 physical_date: {81 type: DataTypes.STRING,82 defaultValue: ''83 },84 mmr1: {85 type: DataTypes.STRING,86 defaultValue: ''87 },88 mmr2: {89 type: DataTypes.STRING,90 defaultValue: ''91 },92 first_add: {93 type: DataTypes.STRING,94 defaultValue: ''95 },96 first_add_date: {97 type: DataTypes.STRING,98 defaultValue: ''99 },100 eecorient: {101 type: DataTypes.STRING,102 defaultValue: ''103 },104 medical_training: {105 type: DataTypes.STRING,106 defaultValue: ''107 },108 look_before_lock: {109 type: DataTypes.STRING,110 defaultValue: ''111 },112 sids: {113 type: DataTypes.STRING,114 defaultValue: ''115 },116 usda: {117 type: DataTypes.STRING,118 defaultValue: ''119 },120 prog_orientation: {121 type: DataTypes.STRING,122 defaultValue: ''123 },124 prog_orientation_date: {125 type: DataTypes.STRING,126 defaultValue: ''127 },128 staff_observe: {129 type: DataTypes.STRING,130 defaultValue: ''131 },132 staff_evaluation: {133 type: DataTypes.STRING,134 defaultValue: ''135 },136 staff_evaluation_date: {137 type: DataTypes.STRING,138 defaultValue: ''139 },140 dbus_lic: {141 type: DataTypes.STRING,142 defaultValue: ''143 },144 dbus_lic_date: {145 type: DataTypes.STRING,146 defaultValue: ''147 },148 program_name: {149 type: DataTypes.STRING,150 defaultValue: ''151 },152 completed_by: {153 type: DataTypes.STRING,154 defaultValue: ''155 },156 completed_date: DataTypes.STRING157 }, { underscored: true, timestamps: true });158 teacher_info.associate = function (models) {159 // associations can be defined here160 teacher_info.belongsTo(models.users, {161 hooks: true,162 foreignKey: {163 name: 'user_id',164 allowNull: false165 }166 })167 // teacher_info.hasOne(models.teacher_training_detail, { foreignKey: 'user_id' })168 };169 return teacher_info;...
Using AI Code Generation
1import { withKnobs, select } from '@storybook/addon-knobs';2import { withA11y } from '@storybook/addon-a11y';3export default {4};5export const Test = () => {6 const options = {7 };8 const defaultValue = 'three';9 const groupId = 'GROUP-ID1';10 const label = 'Options';11 const value = select(label, options, defaultValue, groupId);12 return `<div>${value}</div>`;13};14Test.story = {15};16import { withKnobs, select } from '@storybook/addon-knobs';17import { withA11y } from '@storybook/addon-a11y';18export default {19};20export const Test = () => {21 const options = {22 };23 const defaultValue = 'three';24 const groupId = 'GROUP-ID1';25 const label = 'Options';26 const value = select(label, options, defaultValue, groupId);27 return `<div>${value}</div>`;28};29Test.story = {30};31import { withKnobs, select } from '@storybook/addon-knobs';32import { withA11y } from '@storybook/addon-a11y';33export default {34};35export const Test = () => {36 const options = {37 };38 const defaultValue = 'three';39 const groupId = 'GROUP-ID1';40 const label = 'Options';41 const value = select(label, options, defaultValue, groupId);42 return `<div>${value}</div>`;43};44Test.story = {45};46import { withKnobs,
Using AI Code Generation
1import { addDecorator } from '@storybook/react';2import { withRootDecorator } from 'storybook-root-decorator';3addDecorator(withRootDecorator());4import { withRootDecorator } from 'storybook-root-decorator';5import { withRootDecorator } from 'storybook-root-decorator';6export const decorators = [withRootDecorator()];7import { withRootDecorator } from 'storybook-root-decorator';8import { withRootDecorator } from 'storybook-root-decorator';9export const decorators = [withRootDecorator()];10import { withRootDecorator } from 'storybook-root-decorator';11import { withRootDecorator } from 'storybook-root-decorator';12export const decorators = [withRootDecorator()];13import { withRootDecorator } from 'storybook-root-decorator';14import { withRootDecorator } from 'storybook-root-decorator';15export const decorators = [withRootDecorator()];16import { withRootDecorator } from 'storybook-root-decorator';17import { withRootDecorator } from 'storybook-root-decorator';18export const decorators = [withRootDecorator()];19import { withRootDecorator } from 'storybook-root-decorator';20import { withRootDecorator } from 'storybook-root-decorator';21export const decorators = [withRootDecorator()];22import { withRootDecorator } from 'storybook-root-decorator';23import { withRootDecorator } from 'storybook-root-decorator';24export const decorators = [withRootDecorator()];25import { withRootDecorator } from 'storybook-root-decorator';26import { withRootDecorator } from 'storybook-root-decorator';27export const decorators = [withRootDecorator()];28import { withRootDecorator } from 'storybook-root-decorator';29import { withRoot
Using AI Code Generation
1import { defaultValue } from 'storybook-root'2import { defaultValue } from 'storybook-root'3import { defaultValue } from 'storybook-root'4import { defaultValue } from 'storybook-root'5import { defaultValue } from 'storybook-root'6import { defaultValue } from 'storybook-root'7import { defaultValue } from 'storybook-root'8import { defaultValue } from 'storybook-root'9import { defaultValue } from 'storybook-root'10import { defaultValue } from 'storybook-root'11import { defaultValue } from 'storybook-root'12import { defaultValue } from 'storybook-root'13import { defaultValue } from 'storybook-root'14import { defaultValue } from 'storybook-root'15import { defaultValue } from 'storybook-root'16import { defaultValue } from 'storybook-root'17import { defaultValue } from 'storybook-root'18import { defaultValue } from 'storybook-root'19import { defaultValue } from 'storybook-root'20import { defaultValue } from 'storybook-root'21import { defaultValue } from 'storybook-root'22import { defaultValue } from 'storybook-root'
Using AI Code Generation
1const { withRoot } = require('storybook-root-addon');2const { withKnobs } = require('@storybook/addon-knobs');3module.exports = {4};5const { withRoot } = require('storybook-root-addon');6module.exports = {7};8const { addons } = require('@storybook/addons');9addons.setConfig({10});11const { configure } = require('@storybook/react');12const req = require.context('../src', true, /.stories.js$/);13function loadStories() {14 req.keys().forEach(filename => req(filename));15}16configure(loadStories, module);17const { setAddon, addDecorator } = require('@storybook/react');18const { withRoot } = require('storybook-root-addon');19const { withKnobs } = require('@storybook/addon-knobs');20addDecorator(withRoot);21addDecorator(withKnobs);22setAddon({23 defaultValue: (defaultValue, label) => {24 const value = withKnobs.select(label, defaultValue, defaultValue);25 return value;26 },27});28import React from 'react';29import { storiesOf } from '@storybook/react';30import Button from './button';31storiesOf('Button', module)32 .add('with text', () => (33 <Button>{defaultValue('Hello Button', 'Hello Button')}</Button>34 .add('with some emoji', () => (35 <Button>{defaultValue('๐ ๐ ๐ ๐ฏ', '๐ ๐ ๐ ๐ฏ')}</Button>36 ));
Using AI Code Generation
1import { addDecorator } from '@storybook/react';2import { withRootDecorator } from 'storybook-root-decorator';3addDecorator(withRootDecorator());4import React from 'react';5import { storiesOf } from '@storybook/react';6import Test from './test';7storiesOf('Test', module).add('Default', () => <Test />);
Using AI Code Generation
1import { defaultValue } from "storybook-addon-root";2import { storiesOf } from "@storybook/react";3import MyComponent from "./MyComponent";4storiesOf("MyComponent", module).add("default", () => (5 <MyComponent data={defaultValue} />6));7import React from "react";8import PropTypes from "prop-types";9const MyComponent = ({ data }) => (10 <h1>{data.title}</h1>11 <p>{data.description}</p>12);13MyComponent.propTypes = {14 data: PropTypes.shape({15 }),16};17export default MyComponent;18import React from "react";19import { storiesOf } from "@storybook/react";20import MyComponent from "./MyComponent";21storiesOf("MyComponent", module).add("default", () => (22 data={{23 }}24));25import React from "react";26import { storiesOf } from "@storybook/react";27import MyComponent from "./MyComponent";28storiesOf("MyComponent", module).add("default", () => (29 data={{30 }}31));32import React from "react";33import { storiesOf } from "@storybook/react";34import MyComponent from "./MyComponent";35storiesOf("MyComponent", module).add("default", () => (36 data={{37 }}38));39import React from "react";40import { storiesOf } from "@storybook/react";41import MyComponent from "./MyComponent";42storiesOf("MyComponent", module).add("default", () => (43 data={{44 }}45));46import React from "react";47import { storiesOf } from "@storybook/react";48import MyComponent from "./MyComponent";49storiesOf("MyComponent", module).add("default", () => (
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!