jpf 4.0.1 → 4.0.3
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/View.d.ts +5 -2
- package/dist/View.js +5 -0
- package/dist/View.js.map +1 -1
- package/dist/ViewModel.d.ts +6 -12
- package/dist/ViewModel.js +47 -64
- package/dist/ViewModel.js.map +1 -1
- package/dist/attributes.d.ts +8 -0
- package/dist/controls/JsonFormatter/Json.d.ts +27 -0
- package/dist/controls/JsonFormatter/Json.js +72 -0
- package/dist/controls/JsonFormatter/Json.js.map +1 -0
- package/dist/controls/codeMirror/HtmlEditor.d.ts +15 -0
- package/dist/controls/codeMirror/HtmlEditor.js +127 -0
- package/dist/controls/codeMirror/HtmlEditor.js.map +1 -0
- package/dist/controls/codeMirror/JsonEditor.d.ts +15 -0
- package/dist/controls/codeMirror/JsonEditor.js +111 -0
- package/dist/controls/codeMirror/JsonEditor.js.map +1 -0
- package/dist/controls/html/Button.d.ts +15 -0
- package/dist/controls/html/Button.js +48 -0
- package/dist/controls/html/Button.js.map +1 -0
- package/dist/controls/html/Div.d.ts +10 -0
- package/dist/controls/html/Div.js +17 -0
- package/dist/controls/html/Div.js.map +1 -0
- package/dist/controls/html/Image.d.ts +7 -0
- package/dist/controls/html/Image.js +16 -0
- package/dist/controls/html/Image.js.map +1 -0
- package/dist/controls/html/Input.d.ts +43 -0
- package/dist/controls/html/Input.js +179 -0
- package/dist/controls/html/Input.js.map +1 -0
- package/dist/controls/html/Select.d.ts +27 -0
- package/dist/controls/html/Select.js +116 -0
- package/dist/controls/html/Select.js.map +1 -0
- package/dist/controls/html/Span.d.ts +7 -0
- package/dist/controls/html/Span.js +16 -0
- package/dist/controls/html/Span.js.map +1 -0
- package/dist/controls/kendo/Culture.d.ts +1 -0
- package/dist/controls/kendo/Culture.js +26 -0
- package/dist/controls/kendo/Culture.js.map +1 -0
- package/dist/controls/kendo/DataSource.d.ts +4 -0
- package/dist/controls/kendo/DataSource.js +2 -0
- package/dist/controls/kendo/DataSource.js.map +1 -0
- package/dist/controls/kendo/Editor.d.ts +18 -0
- package/dist/controls/kendo/Editor.js +113 -0
- package/dist/controls/kendo/Editor.js.map +1 -0
- package/dist/controls/kendo/Grid.d.ts +50 -0
- package/dist/controls/kendo/Grid.js +214 -0
- package/dist/controls/kendo/Grid.js.map +1 -0
- package/dist/controls/kendo/Menu.d.ts +14 -0
- package/dist/controls/kendo/Menu.js +86 -0
- package/dist/controls/kendo/Menu.js.map +1 -0
- package/dist/controls/kendo/Tree.d.ts +16 -0
- package/dist/controls/kendo/Tree.js +104 -0
- package/dist/controls/kendo/Tree.js.map +1 -0
- package/dist/controls/user/Content.d.ts +16 -0
- package/dist/controls/user/Content.js +45 -0
- package/dist/controls/user/Content.js.map +1 -0
- package/dist/controls/user/FileSelector.d.ts +17 -0
- package/dist/controls/user/FileSelector.js +54 -0
- package/dist/controls/user/FileSelector.js.map +1 -0
- package/dist/controls/user/LabeledControl.d.ts +14 -0
- package/dist/controls/user/LabeledControl.js +32 -0
- package/dist/controls/user/LabeledControl.js.map +1 -0
- package/dist/controls/user/ListItem.d.ts +30 -0
- package/dist/controls/user/ListItem.js +61 -0
- package/dist/controls/user/ListItem.js.map +1 -0
- package/dist/event.d.ts +17 -3
- package/dist/event.js +1 -0
- package/dist/event.js.map +1 -1
- package/dist/{src → framework}/View.d.ts +5 -2
- package/dist/{src → framework}/View.js +24 -22
- package/dist/framework/View.js.map +1 -0
- package/dist/{src → framework}/ViewModel.d.ts +5 -12
- package/dist/{src → framework}/ViewModel.js +75 -115
- package/dist/framework/ViewModel.js.map +1 -0
- package/dist/{src → framework}/attributes.d.ts +8 -0
- package/dist/framework/attributes.js +2 -0
- package/dist/{src → framework}/attributes.js.map +1 -1
- package/dist/{src → framework}/event.d.ts +19 -5
- package/dist/framework/event.js +26 -0
- package/dist/framework/event.js.map +1 -0
- package/dist/framework/observable.d.ts +12 -0
- package/dist/framework/observable.js +59 -0
- package/dist/framework/observable.js.map +1 -0
- package/dist/{src → framework}/style.d.ts +0 -0
- package/dist/{src → framework}/style.js +3 -7
- package/dist/framework/style.js.map +1 -0
- package/dist/framework/types.d.ts +85 -0
- package/dist/framework/types.js +2 -0
- package/dist/{src → framework}/types.js.map +1 -1
- package/dist/{src → framework}/userAgent.d.ts +0 -0
- package/dist/{src → framework}/userAgent.js +3 -6
- package/dist/framework/userAgent.js.map +1 -0
- package/dist/index.d.ts +9 -6
- package/dist/index.js +9 -21
- package/dist/index.js.map +1 -1
- package/dist/observable.d.ts +12 -0
- package/dist/observable.js +65 -0
- package/dist/observable.js.map +1 -0
- package/dist/style.js +2 -2
- package/dist/style.js.map +1 -1
- package/dist/userAgent.js.map +1 -1
- package/dist/utilities/blob.d.ts +2 -0
- package/dist/utilities/blob.js +19 -0
- package/dist/utilities/blob.js.map +1 -0
- package/dist/utilities/common.d.ts +17 -0
- package/dist/utilities/common.js +193 -0
- package/dist/utilities/common.js.map +1 -0
- package/dist/utilities/fetch.d.ts +5 -0
- package/dist/utilities/fetch.js +110 -0
- package/dist/utilities/fetch.js.map +1 -0
- package/dist/utilities/notification.d.ts +5 -0
- package/dist/utilities/notification.js +67 -0
- package/dist/utilities/notification.js.map +1 -0
- package/dist/utilities/router.d.ts +20 -0
- package/dist/utilities/router.js +63 -0
- package/dist/utilities/router.js.map +1 -0
- package/dist/utilities/webSocket.d.ts +1 -0
- package/dist/utilities/webSocket.js +53 -0
- package/dist/utilities/webSocket.js.map +1 -0
- package/package.json +13 -6
- package/dist/examples/example-01.d.ts +0 -1
- package/dist/examples/example-01.js +0 -43
- package/dist/examples/example-01.js.map +0 -1
- package/dist/src/View.js.map +0 -1
- package/dist/src/ViewModel.js.map +0 -1
- package/dist/src/attributes.js +0 -3
- package/dist/src/event.js +0 -29
- package/dist/src/event.js.map +0 -1
- package/dist/src/index.d.ts +0 -7
- package/dist/src/index.js +0 -22
- package/dist/src/index.js.map +0 -1
- package/dist/src/style.js.map +0 -1
- package/dist/src/types.d.ts +0 -85
- package/dist/src/types.js +0 -3
- package/dist/src/userAgent.js.map +0 -1
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export type DropEffect = "none" | "copy" | "link" | "move";
|
|
2
|
+
export type EffectAllowed = "none" | "copy" | "copyLink" | "copyMove" | "link" | "linkMove" | "move" | "all" | "uninitialized";
|
|
3
|
+
type CssPropertyA = "alignContent" | "alignItems" | "alignSelf" | "alignmentAdjust" | "alignmentBaseline" | "animation" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimingFunction" | "appearance" | "backfaceVisibility" | "background" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundComposite" | "backgroundImage" | "backgroundOrigin" | "backgroundPosition" | "backgroundRepeat" | "backgroundSize" | "baselineShift" | "behavior" | "border" | "borderBottom" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderColor" | "borderCornerShape" | "borderImageSource" | "borderImageWidth" | "borderLeft" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRadius" | "borderRight" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStyle" | "borderTop" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "borderWidth" | "bottom" | "boxAlign" | "boxDecorationBreak" | "boxDirection" | "boxLineProgression" | "boxLines" | "boxOrdinalGroup" | "boxFlex" | "boxSizing" | "boxShadow" | "boxFlexGroup" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "clear" | "clip" | "clipRule" | "color" | "columnCount" | "columnFill" | "columnGap" | "columnRule" | "columnRuleColor" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "columns" | "content" | "counterIncrement" | "counterReset" | "cue" | "cueAfter" | "cursor" | "direction" | "display" | "dominantBaseline" | "emptyCells" | "fill" | "fillOpacity" | "fillRule" | "filter" | "flex" | "flexAlign" | "flexBasis" | "flexDirection" | "flexFlow" | "flexGrow" | "flexItemAlign" | "flexLinePack" | "flexPositive" | "flexNegative" | "flexOrder" | "flexShrink" | "flexWrap" | "float" | "flowFrom" | "font" | "fontFamily" | "fontKerning" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontSynthesis" | "fontVariant" | "fontVariantAlternates" | "fontWeight" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnGap" | "gridColumnEnd" | "gridColumnStart" | "gridGap" | "gridRow" | "gridRowEnd" | "gridRowGap" | "gridRowStart" | "gridRowPosition" | "gridRowSpan" | "gridTemplate" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "hyphenateLimitChars" | "hyphenateLimitLines" | "hyphenateLimitZone" | "hyphens" | "imeMode" | "justifyContent" | "justifyItems" | "justifySelf";
|
|
4
|
+
type CssPropertyL = "layoutGrid" | "layoutGridChar" | "layoutGridLine" | "layoutGridMode" | "layoutGridType" | "left" | "letterSpacing" | "lineBreak" | "lineClamp" | "lineHeight" | "listStyle" | "listStyleImage" | "listStylePosition" | "listStyleType" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "marqueeDirection" | "marqueeStyle" | "mask" | "maskBorder" | "maskBorderRepeat" | "maskBorderSlice" | "maskBorderSource" | "maskBorderWidth" | "maskClip" | "maskOrigin" | "maxFontSize" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "mixBlendMode" | "objectFit" | "objectPosition" | "opacity" | "order" | "orphans" | "outline" | "outlineColor" | "outlineStyle" | "outlineOffset" | "outlineWidth" | "overflow" | "overflowStyle" | "overflowWrap" | "overflowX" | "overflowY" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "pause" | "pauseAfter" | "pauseBefore" | "perspective" | "perspectiveOrigin" | "pointerEvents" | "position" | "punctuationTrim" | "quotes" | "regionFragment" | "resize" | "restAfter" | "restBefore" | "right" | "rubyAlign" | "rubyPosition" | "rx" | "ry" | "shapeImageThreshold" | "shapeInside" | "shapeMargin" | "shapeOutside" | "speak" | "speakAs" | "src" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeOpacity" | "strokeWidth" | "tabSize" | "tableLayout" | "textAnchor" | "textAlign" | "textAlignLast" | "textDecoration" | "textDecorationColor" | "textDecorationLine" | "textDecorationLineThrough" | "textDecorationNone" | "textDecorationOverline" | "textDecorationSkip" | "textDecorationStyle" | "textDecorationUnderline" | "textEmphasis" | "textEmphasisColor" | "textEmphasisStyle" | "textHeight" | "textIndent" | "textJustifyTrim" | "textKashidaSpace" | "textLineThrough" | "textLineThroughColor" | "textLineThroughMode" | "textLineThroughStyle" | "textLineThroughWidth" | "textOverflow" | "textOverline" | "textOverlineColor" | "textOverlineMode" | "textOverlineStyle" | "textOverlineWidth" | "textRendering" | "textScript" | "textShadow" | "textTransform" | "textUnderlinePosition" | "textUnderlineStyle" | "top" | "touchAction" | "transform" | "transformOrigin" | "transformOriginZ" | "transformStyle" | "transition" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "unicodeBidi" | "unicodeRange" | "userFocus" | "userInput" | "userSelect" | "verticalAlign" | "visibility" | "voiceBalance" | "voiceDuration" | "voiceFamily" | "voicePitch" | "voiceRange" | "voiceRate" | "voiceStress" | "voiceVolume" | "whiteSpace" | "whiteSpaceTreatment" | "widows" | "width" | "willChange" | "wordBreak" | "wordSpacing" | "wordWrap" | "wrapFlow" | "wrapMargin" | "wrapOption" | "writingMode" | "zIndex" | "zoom";
|
|
5
|
+
export type CssProperty = CssPropertyA | CssPropertyL;
|
|
6
|
+
export type CssValue<T> = T | T[];
|
|
7
|
+
export type CssValueGeneral = CssValue<number | string>;
|
|
8
|
+
export type CssValueString = CssValue<string>;
|
|
9
|
+
export type CssGlobalValues = "initial" | "inherit" | "unset" | "revert";
|
|
10
|
+
export interface IFontFace {
|
|
11
|
+
fontFamily?: string;
|
|
12
|
+
src?: CssValueString;
|
|
13
|
+
unicodeRange?: any;
|
|
14
|
+
fontVariant?: "common-ligatures" | "small-caps" | CssGlobalValues;
|
|
15
|
+
fontFeatureSettings?: string;
|
|
16
|
+
fontWeight?: CssFontWeight;
|
|
17
|
+
fontStyle?: "normal" | "italic" | "oblique" | CssGlobalValues;
|
|
18
|
+
}
|
|
19
|
+
export type CssAbsoluteSize = "xx-small" | "x-small" | "small" | "medium" | "large" | "x-large" | "xx-large";
|
|
20
|
+
export type CssAngle = CssGlobalValues | string | 0;
|
|
21
|
+
export type CssAnimationPlayState = CssGlobalValues | string | "paused" | "running";
|
|
22
|
+
export type CssBlendMode = "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity";
|
|
23
|
+
export type CssBorderShorthand = CssGlobalValues | CssColor | CssLength | CssLineStyleSet | string;
|
|
24
|
+
export type CssBox = CssGlobalValues | string | "border-box" | "padding-box" | "content-box";
|
|
25
|
+
export type CssColor = CssNamedColor | CssGlobalValues | "currentColor" | string;
|
|
26
|
+
export type CssNamedColor = "aliceblue" | "antiquewhite" | "aqua" | "aquamarine" | "azure" | "beige" | "bisque" | "black" | "blanchedalmond" | "blue" | "blueviolet" | "brown" | "burlywood" | "cadetblue" | "chartreuse" | "chocolate" | "coral" | "cornflowerblue" | "cornsilk" | "crimson" | "cyan" | "darkblue" | "darkcyan" | "darkgoldenrod" | "darkgray" | "darkgreen" | "darkgrey" | "darkkhaki" | "darkmagenta" | "darkolivegreen" | "darkorange" | "darkorchid" | "darkred" | "darksalmon" | "darkseagreen" | "darkslateblue" | "darkslategray" | "darkslategrey" | "darkturquoise" | "darkviolet" | "deeppink" | "deepskyblue" | "dimgray" | "dimgrey" | "dodgerblue" | "firebrick" | "floralwhite" | "forestgreen" | "fuchsia" | "gainsboro" | "ghostwhite" | "gold" | "goldenrod" | "gray" | "green" | "greenyellow" | "grey" | "honeydew" | "hotpink" | "indianred" | "indigo" | "ivory" | "khaki" | "lavender" | "lavenderblush" | "lawngreen" | "lemonchiffon" | "lightblue" | "lightcoral" | "lightcyan" | "lightgoldenrodyellow" | "lightgray" | "lightgreen" | "lightgrey" | "lightpink" | "lightsalmon" | "lightseagreen" | "lightskyblue" | "lightslategray" | "lightslategrey" | "lightsteelblue" | "lightyellow" | "lime" | "limegreen" | "linen" | "maroon" | "mediumaquamarine" | "mediumblue" | "mediumorchid" | "mediumpurple" | "mediumseagreen" | "mediumslateblue" | "mediumspringgreen" | "mediumturquoise" | "mediumvioletred" | "midnightblue" | "mintcream" | "mistyrose" | "moccasin" | "navajowhite" | "navy" | "oldlace" | "olive" | "olivedrab" | "orange" | "purple" | "rebeccapurple" | "red" | "silver" | "teal" | "transparent" | "white" | "yellow";
|
|
27
|
+
export type CssColorSet = string | CssColor;
|
|
28
|
+
export type CssDisplay = "" | "inherit" | "initial" | "block" | "inline" | "run-in" | "flow" | "flow-root" | "table" | "flex" | "grid" | "ruby" | "subgrid" | "block flow" | "inline table" | "flex run-in" | "list-item" | "list-item block" | "list-item inline" | "list-item flow" | "list-item flow-root" | "list-item block flow" | "list-item block flow-root" | "flow list-item block" | "table-row-group" | "table-header-group" | "table-footer-group" | "table-row" | "table-cell" | "table-column-group" | "table-column" | "table-caption" | "ruby-base" | "ruby-text" | "ruby-base-container" | "ruby-text-container" | "contents" | "none" | "inline-block" | "inline-list-item" | "inline-table" | "inline-flex" | "inline-grid";
|
|
29
|
+
export type CssBoxAlignmentBaselinePosition = "baseline" | "first baseline" | "last baseline";
|
|
30
|
+
export type CssBoxAlignmentContentDistribution = "space-between" | "space-around" | "space-evenly" | "stretch";
|
|
31
|
+
export type CssBoxAlignmentContentPositionWithOverflow = "center" | "start" | "end" | "flex-start" | "flex-end" | "unsafe center" | "unsafe start" | "unsafe end" | "unsafe flex-start" | "unsafe flex-end" | "safe center" | "safe start" | "safe end" | "safe flex-start" | "safe flex-end";
|
|
32
|
+
export type CssBoxAlignmentSelfPositionWithOverflow = "center" | "start" | "end" | "self-start" | "self-end" | "flex-start" | "flex-end" | "unsafe center" | "unsafe start" | "unsafe end" | "unsafe self-start" | "unsafe self-end" | "unsafe flex-start" | "unsafe flex-end" | "safe center" | "safe start" | "safe end" | "safe self-start" | "safe self-end" | "safe flex-start" | "safe flex-end";
|
|
33
|
+
export type CssBoxAlignmentLeftRightWithOverflow = "left" | "right" | "unsafe left" | "unsafe right" | "safe left" | "safe right";
|
|
34
|
+
export type JustifyContent = "normal" | CssBoxAlignmentContentDistribution | CssBoxAlignmentContentPositionWithOverflow | "left" | "right";
|
|
35
|
+
export type AlignContent = "normal" | CssBoxAlignmentBaselinePosition | CssBoxAlignmentContentDistribution | CssBoxAlignmentContentPositionWithOverflow;
|
|
36
|
+
export type JustifyItems = "normal" | "stretch" | CssBoxAlignmentBaselinePosition | CssBoxAlignmentSelfPositionWithOverflow | "left" | "right" | "center" | "legacy left" | "legacy right" | "legacy center";
|
|
37
|
+
export type AlignItems = "normal" | "stretch" | CssBoxAlignmentBaselinePosition | CssBoxAlignmentSelfPositionWithOverflow;
|
|
38
|
+
export type JustifySelf = "auto" | "normal" | "stretch" | CssBoxAlignmentBaselinePosition | CssBoxAlignmentSelfPositionWithOverflow | CssBoxAlignmentLeftRightWithOverflow;
|
|
39
|
+
export type AlignSelf = "auto" | "normal" | "stretch" | CssBoxAlignmentBaselinePosition | CssBoxAlignmentSelfPositionWithOverflow;
|
|
40
|
+
export type CssGradient = CssGlobalValues | string;
|
|
41
|
+
export type CssFontSize = CssGlobalValues | CssLength | CssPercentage | CssAbsoluteSize | CssRelativeSize;
|
|
42
|
+
export type CssImage = CssGlobalValues | string | CssGradient | CssUrl;
|
|
43
|
+
export type CssLength = CssGlobalValues | string | number;
|
|
44
|
+
export type CssLineStyle = string | "none" | "hidden" | "dotted" | "dashed" | "solid" | "double" | "groove" | "ridge" | "inset" | "outset";
|
|
45
|
+
export type CssLineStyleSet = string | CssLineStyle;
|
|
46
|
+
export type CssObjectFit = "fill" | "contain" | "cover" | "none" | "scale-down" | CssGlobalValues;
|
|
47
|
+
export type CssOverflow = "visible" | "hidden" | "scroll" | "clip" | "auto";
|
|
48
|
+
export type CssPercentage = CssGlobalValues | string | 0;
|
|
49
|
+
export type CssPosition = CssAngle | string;
|
|
50
|
+
export type CssRelativeSize = "larger" | "smaller";
|
|
51
|
+
export type CssRepeatStyle = "repeat-x" | "repeat-y" | "repeat" | "space" | "round" | "no-repeat" | "repeat repeat" | "repeat space" | "repeat round" | "repeat no-repeat" | "space repeat" | "space space" | "space round" | "space no-repeat" | "round repeat" | "round space" | "round round" | "round no-repeat" | "no-repeat repeat" | "no-repeat space" | "no-repeat round" | "no-repeat no-repeat";
|
|
52
|
+
export type CssTransformFunction = string | "none";
|
|
53
|
+
export type CssSideOrCorner = CssAngle | "left" | "right" | "top" | "bottom" | "to left" | "to right" | "to top" | "to bottom" | "left top" | "right top" | "left bottom" | "right bottom" | "top left" | "top right" | "bottom left" | "bottom right" | "to left top" | "to right top" | "to left bottom" | "to right bottom" | "to top left" | "to top right" | "to bottom left" | "to bottom right";
|
|
54
|
+
export type CssRadialGradientEndingShape = "circle" | "ellipse";
|
|
55
|
+
export type CssRadialGradientSize = CssLength | Array<CssLength> | "closest-side" | "farthest-side" | "closest-corner" | "closest-side";
|
|
56
|
+
export type CssTimingFunction = string | CssGlobalValues | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "linear" | "step-start" | "step-end";
|
|
57
|
+
export type CssUrl = string;
|
|
58
|
+
export type CssFontWeight = "normal" | "bold" | "bolder" | "lighter" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | number | CssGlobalValues;
|
|
59
|
+
export type AlignmentBaseline = "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "inherit";
|
|
60
|
+
export type AnimationDirection = "normal" | "alternate" | "reverse" | "alternate-reverse";
|
|
61
|
+
export type AnimationFillMode = "none" | "forwards" | "backwards" | "both";
|
|
62
|
+
export type BackgroundAttachment = "scroll" | "fixed" | "local";
|
|
63
|
+
export type BackgroundSize = "auto" | "cover" | "contain";
|
|
64
|
+
export type BreakAfter = "auto" | "avoid" | "avoid-page" | "page" | "left" | "right" | "recto" | "verso" | "avoid-column" | "column" | "avoid-region" | "region";
|
|
65
|
+
export type BreakBefore = "auto" | "avoid" | "avoid-page" | "page" | "left" | "right" | "recto" | "verso" | "avoid-column" | "column" | "avoid-region" | "region";
|
|
66
|
+
export type BreakInside = "auto" | "avoid" | "avoid-page" | "avoid-column" | "avoid-region";
|
|
67
|
+
export type CaptionSide = CssGlobalValues | "top" | "bottom" | "block-start" | "block-end" | "inline-start" | "inline-end";
|
|
68
|
+
export type Cursor = CssValue<CssGlobalValues | string | "auto" | "default" | "none" | "context-menu" | "help" | "pointer" | "progress" | "wait" | "cell" | "crosshair" | "text" | "vertical-text" | "alias" | "copy" | "move" | "no-drop" | "not-allowed" | "e-resize" | "n-resize" | "ne-resize" | "nw-resize" | "s-resize" | "se-resize" | "sw-resize" | "w-resize" | "ew-resize" | "ns-resize" | "nesw-resize" | "nwse-resize" | "col-resize" | "row-resize" | "all-scroll" | "zoom-in" | "zoom-out" | "grab" | "grabbing">;
|
|
69
|
+
export type DominantBaseline = "auto" | "use-script" | "no-change" | "reset-size" | "ideographic" | "alphabetic" | "hanging" | "mathematical" | "central" | "middle" | "text-after-edge" | "text-before-edge" | "inherit";
|
|
70
|
+
export type FlexDirection = "row" | "row-reverse" | "column" | "column-reverse";
|
|
71
|
+
export type FlexWrap = CssGlobalValues | "nowrap" | "wrap" | "wrap-reverse";
|
|
72
|
+
export type FontStretch = CssGlobalValues | "normal" | "ultra-condensed" | "extra-condensed" | "condensed" | "semi-condensed" | "semi-expanded" | "expanded" | "extra-expanded" | "ultra-expanded";
|
|
73
|
+
export type OutlineStyle = CssGlobalValues | "auto" | "none" | "dotted" | "dashed" | "solid" | "double" | "groove" | "ridge" | "inset" | "outset";
|
|
74
|
+
export type PageBreakAfter = CssGlobalValues | "auto" | "always" | "avoid" | "left" | "right" | "recto" | "verso";
|
|
75
|
+
export type PageBreakBefore = CssGlobalValues | "auto" | "always" | "avoid" | "left" | "right" | "recto" | "verso";
|
|
76
|
+
export type PointerEvents = CssGlobalValues | "auto" | "none" | "visiblePainted" | "visibleFill" | "visibleStroke" | "visible" | "painted" | "fill" | "stroke" | "all";
|
|
77
|
+
export type PositionX = CssValue<CssGlobalValues | "static" | "relative" | "absolute" | "sticky" | "-webkit-sticky" | "fixed">;
|
|
78
|
+
export type TextAlign = CssGlobalValues | "start" | "end" | "left" | "right" | "center" | "justify" | "justify-all" | "match-parent";
|
|
79
|
+
export type TextAlignLast = CssGlobalValues | "auto" | "start" | "end" | "left" | "right" | "center" | "justify";
|
|
80
|
+
export type TextTransform = CssGlobalValues | "none" | "capitalize" | "uppercase" | "lowercase" | "full-width";
|
|
81
|
+
export type TouchAction = CssGlobalValues | "auto" | "none" | "pan-x" | "pan-left" | "pan-right" | "pan-y" | "pan-up" | "pan-down" | "manipulation";
|
|
82
|
+
export type VerticalAlign = CssGlobalValues | "baseline" | "sub" | "super" | "text-top" | "text-bottom" | "middle" | "top" | "bottom" | CssLength | CssPercentage;
|
|
83
|
+
export type WritingMode = CssGlobalValues | "horizontal-tb" | "vertical-rl" | "vertical-lr" | "sideways-rl" | "sideways-lr";
|
|
84
|
+
export type CssStyleName = "alignContent" | "alignItems";
|
|
85
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/framework/types.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.userAgent = void 0;
|
|
4
|
-
const ua_parser_js_1 = require("ua-parser-js");
|
|
5
|
-
const parser = new ua_parser_js_1.UAParser();
|
|
1
|
+
import { UAParser } from "ua-parser-js";
|
|
2
|
+
const parser = new UAParser();
|
|
6
3
|
const result = parser.getResult();
|
|
7
4
|
function supportsTouchEvents() {
|
|
8
5
|
if (("ontouchstart" in window)) {
|
|
@@ -16,7 +13,7 @@ function supportsTouchEvents() {
|
|
|
16
13
|
function supportsMouseEvents() {
|
|
17
14
|
return matchMedia('(pointer:fine)').matches || !!window.MouseEvent;
|
|
18
15
|
}
|
|
19
|
-
|
|
16
|
+
export const userAgent = {
|
|
20
17
|
browser: {
|
|
21
18
|
isEdgeHtml: result.browser.name === "Edge",
|
|
22
19
|
isEdgeChromium: result.browser.name === "Edg",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userAgent.js","sourceRoot":"","sources":["../../src/framework/userAgent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,MAAM,MAAM,GAAG,IAAI,QAAQ,EAAE,CAAC;AAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;AAElC,SAAS,mBAAmB;IACxB,IAAI,CAAC,cAAc,IAAI,MAAM,CAAC,EAAE;QAC5B,OAAO,IAAI,CAAC;KACf;IAED,MAAM,QAAQ,GAAG,2BAA2B,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxD,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;IACvD,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC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BAAmB,EAAE,mBAAmB,EAAE;QAC1C,mBAAmB,EAAE,mBAAmB,EAAE;KAC7C;IACD,MAAM,EAAE;QACJ,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ;QACzC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO;QACvC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO;QACvC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;KAC9C;CACJ,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export
|
|
1
|
+
/// <reference types="@progress/kendo-ui" />
|
|
2
|
+
import * as Types from "./framework/types";
|
|
3
|
+
export * from "./framework/attributes";
|
|
4
|
+
export * from "./framework/event";
|
|
5
|
+
export * from "./framework/observable";
|
|
6
|
+
export * from "./framework/style";
|
|
7
7
|
export { Types };
|
|
8
|
+
export { userAgent } from "./framework/userAgent";
|
|
9
|
+
export * from "./framework/View";
|
|
10
|
+
export * from "./framework/ViewModel";
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.Types = exports.userAgent = void 0;
|
|
14
|
-
const Types = require("./types");
|
|
15
|
-
exports.Types = Types;
|
|
16
|
-
__exportStar(require("./attributes"), exports);
|
|
17
|
-
__exportStar(require("./event"), exports);
|
|
18
|
-
__exportStar(require("./View"), exports);
|
|
19
|
-
__exportStar(require("./style"), exports);
|
|
20
|
-
var userAgent_1 = require("./userAgent");
|
|
21
|
-
Object.defineProperty(exports, "userAgent", { enumerable: true, get: function () { return userAgent_1.userAgent; } });
|
|
1
|
+
import * as Types from "./framework/types";
|
|
2
|
+
export * from "./framework/attributes";
|
|
3
|
+
export * from "./framework/event";
|
|
4
|
+
export * from "./framework/observable";
|
|
5
|
+
export * from "./framework/style";
|
|
6
|
+
export { Types };
|
|
7
|
+
export { userAgent } from "./framework/userAgent";
|
|
8
|
+
export * from "./framework/View";
|
|
9
|
+
export * from "./framework/ViewModel";
|
|
22
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAA;AAE1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Subscribable, ObservableArray, Observable } from "knockout";
|
|
2
|
+
export interface ObservableProperty<TValue = any, TSetter = TValue> extends Subscribable<TValue> {
|
|
3
|
+
(): TValue;
|
|
4
|
+
set: (value: TSetter, triggerSetter?: boolean) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function isObservableProperty<T = any>(instance: any): instance is ObservableProperty<T>;
|
|
7
|
+
export declare function observableProperty<TValue, TSetter = TValue>(value?: TValue | Observable<TValue>, setter?: (value: TSetter, internalProperty: Observable<TValue>) => void, notifyAlways?: boolean): ObservableProperty<TValue, TSetter>;
|
|
8
|
+
export interface ObservableArrayProperty<TItem = any, TSetter = Array<TItem>> extends ObservableArray<TItem> {
|
|
9
|
+
set: (items: TSetter, triggerSetter?: boolean) => void;
|
|
10
|
+
map<TResult>(callbackfn: (value: TItem, index: number, array: TItem[]) => TResult, thisArg?: any): TResult[];
|
|
11
|
+
}
|
|
12
|
+
export declare function observableArrayProperty<TItem, TSetter = Array<TItem>>(items?: Array<TItem> | ObservableArray<TItem>, setter?: (items: TSetter, internalProperty: ObservableArray<TItem>) => void): ObservableArrayProperty<TItem, TSetter>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.observableArrayProperty = exports.observableProperty = exports.isObservableProperty = void 0;
|
|
4
|
+
const knockout_1 = require("knockout");
|
|
5
|
+
function isObservableProperty(instance) {
|
|
6
|
+
return instance && !!instance.set;
|
|
7
|
+
}
|
|
8
|
+
exports.isObservableProperty = isObservableProperty;
|
|
9
|
+
function observableProperty(value, setter, notifyAlways = false) {
|
|
10
|
+
let internalProperty;
|
|
11
|
+
if (value === undefined) {
|
|
12
|
+
value = null;
|
|
13
|
+
}
|
|
14
|
+
if ((0, knockout_1.isObservable)(value)) {
|
|
15
|
+
internalProperty = value;
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
internalProperty = (0, knockout_1.observable)(value);
|
|
19
|
+
}
|
|
20
|
+
if (notifyAlways) {
|
|
21
|
+
internalProperty.extend({ notify: "always" });
|
|
22
|
+
}
|
|
23
|
+
const computed = (0, knockout_1.pureComputed)({ read: internalProperty }).extend({ notify: "always" });
|
|
24
|
+
computed.set = (newValue, triggerSetter = true) => {
|
|
25
|
+
if (setter && triggerSetter) {
|
|
26
|
+
setter(newValue, internalProperty);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
internalProperty(newValue);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
return computed;
|
|
33
|
+
}
|
|
34
|
+
exports.observableProperty = observableProperty;
|
|
35
|
+
function observableArrayProperty(items, setter) {
|
|
36
|
+
let internalProperty;
|
|
37
|
+
if (!items) {
|
|
38
|
+
items = [];
|
|
39
|
+
}
|
|
40
|
+
if ((0, knockout_1.isObservable)(items)) {
|
|
41
|
+
internalProperty = items;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
internalProperty = (0, knockout_1.observableArray)(items);
|
|
45
|
+
}
|
|
46
|
+
const computed = (0, knockout_1.pureComputed)({ read: internalProperty }).extend({ notify: "always" });
|
|
47
|
+
computed.set = (value, triggerSetter = true) => {
|
|
48
|
+
if (setter && triggerSetter) {
|
|
49
|
+
setter(value, internalProperty);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
internalProperty(value);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
computed.push = (...itemsToPush) => {
|
|
56
|
+
internalProperty.push(...itemsToPush);
|
|
57
|
+
return itemsToPush.length;
|
|
58
|
+
};
|
|
59
|
+
computed.map = (callBack, thisArg) => {
|
|
60
|
+
return internalProperty().map(callBack, thisArg);
|
|
61
|
+
};
|
|
62
|
+
return computed;
|
|
63
|
+
}
|
|
64
|
+
exports.observableArrayProperty = observableArrayProperty;
|
|
65
|
+
//# sourceMappingURL=observable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"observable.js","sourceRoot":"","sources":["../src/observable.ts"],"names":[],"mappings":";;;AAAA,uCAA8H;AAO9H,SAAgB,oBAAoB,CAAU,QAAa;IACvD,OAAO,QAAQ,IAAI,CAAC,CAAE,QAAkC,CAAC,GAAG,CAAC;AACjE,CAAC;AAFD,oDAEC;AAED,SAAgB,kBAAkB,CAA2B,KAAmC,EAAE,MAAuE,EAAE,eAAwB,KAAK;IACpM,IAAI,gBAAoC,CAAC;IACzC,IAAI,KAAK,KAAK,SAAS,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AE,gBAAyB,IAAI,EAAE,EAAE;QACzD,IAAI,MAAM,IAAI,aAAa,EAAE;YACzB,MAAM,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;SACnC;aAAM;YACH,gBAAgB,CAAC,KAAK,CAAC,CAAC;SAC3B;IACL,CAAC,CAAC;IAEF,QAAQ,CAAC,IAAI,GAAG,CAAC,GAAG,WAAW,EAAE,EAAE;QAC/B,gBAAgB,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC;QACtC,OAAO,WAAW,CAAC,MAAM,CAAC;IAC9B,CAAC,CAAA;IAED,QAAQ,CAAC,GAAG,GAAG,CAAC,QAA8D,EAAE,OAAa,EAAE,EAAE;QAE7F,OAAO,gBAAgB,EAAE,CAAC,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC,CAAA;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC;AAlCD,0DAkCC"}
|
package/dist/style.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultStyle = exports.extendStyle = void 0;
|
|
4
|
-
const
|
|
4
|
+
const ViewModel_1 = require("./ViewModel");
|
|
5
5
|
function extendStyle(target, source) {
|
|
6
6
|
if (source) {
|
|
7
|
-
return extend(true, target, source);
|
|
7
|
+
return (0, ViewModel_1.extend)(true, target, source);
|
|
8
8
|
}
|
|
9
9
|
return target;
|
|
10
10
|
}
|
package/dist/style.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":";;;AACA,2CAAqC;AAGrC,SAAgB,WAAW,CAAC,MAAa,EAAE,MAAa;IAEpD,IAAI,MAAM,EAAE;QACR,OAAO,IAAA,kBAAM,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CACjB,CAAA"}
|
package/dist/userAgent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userAgent.js","sourceRoot":"","sources":["../src/userAgent.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,MAAM,MAAM,GAAG,IAAI,uBAAQ,EAAE,CAAC;AAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;AAElC,SAAS,mBAAmB;IACxB,IAAI,CAAC,cAAc,IAAI,MAAM,CAAC,EAAE;QAC5B,OAAO,IAAI,CAAC;KACf;IAED,MAAM,QAAQ,GAAG,2BAA2B,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxD,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;IACvD,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACrF,OAAO,EAAE,CAAC,WAAW,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,mBAAmB;IACxB,OAAO,UAAU,CAAC,gBAAgB,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC;AACvE,CAAC;AAEY,QAAA,SAAS,GAAG;IACrB,OAAO,EAAE;QACL,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM;QAC1C,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"userAgent.js","sourceRoot":"","sources":["../src/userAgent.ts"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,MAAM,MAAM,GAAG,IAAI,uBAAQ,EAAE,CAAC;AAC9B,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,CAAC;AAElC,SAAS,mBAAmB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EAAE,CAAC,OAAO;QAC1B,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;KAC1D;IACD,MAAM,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI;QACxB,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ;QACzC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ;QACzC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;QAC3C,mBAAmB,EAAE,mBAAmB,EAAE;QAC1C,mBAAmB,EAAE,mBAAmB,EAAE;KAC7C;IACD,MAAM,EAAE;QACJ,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ;QACzC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO;QACvC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO;QACvC,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;KAC9C;CACJ,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const blobDictionary = {};
|
|
2
|
+
async function blobToBase64(blob) {
|
|
3
|
+
return new Promise((resolve) => {
|
|
4
|
+
const reader = new FileReader();
|
|
5
|
+
reader.onloadend = () => resolve(reader.result);
|
|
6
|
+
reader.readAsDataURL(blob);
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
export async function getBlobUrl(blob) {
|
|
10
|
+
const base64 = await blobToBase64(blob);
|
|
11
|
+
let url = blobDictionary[base64];
|
|
12
|
+
if (!url) {
|
|
13
|
+
url = URL.createObjectURL(blob);
|
|
14
|
+
blobDictionary[base64] = url;
|
|
15
|
+
}
|
|
16
|
+
return url;
|
|
17
|
+
}
|
|
18
|
+
export const blankGif = "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";
|
|
19
|
+
//# sourceMappingURL=blob.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blob.js","sourceRoot":"","sources":["../../src/utilities/blob.ts"],"names":[],"mappings":"AAAA,MAAM,cAAc,GAA8B,EAAE,CAAC;AAGrD,KAAK,UAAU,YAAY,CAAC,IAAI;IAC5B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAChC,MAAM,CAAC,SAAS,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,MAAgB,CAAC,CAAC;QAC1D,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;AACP,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAU;IACvC,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,CAAC;IACxC,IAAI,GAAG,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,GAAG,EAAE;QACN,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAChC,cAAc,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC;KAChC;IACD,OAAO,GAAG,CAAC;AACf,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,4DAA4D,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare function setCookie(name: string, value: string, days: number): void;
|
|
2
|
+
export declare function getCookie(name: string): string;
|
|
3
|
+
export declare function eraseCookie(name: string): void;
|
|
4
|
+
export declare function getNavigatorLanguage(): any;
|
|
5
|
+
export declare function queryStringParameterExists(name: string): boolean;
|
|
6
|
+
export declare function getQueryStringParameter(name: string): string;
|
|
7
|
+
export declare function stateToQueryString(state: object): string;
|
|
8
|
+
export declare function getStateFromQueryString(): object;
|
|
9
|
+
export declare function getGuid(): string;
|
|
10
|
+
export declare function getKeys<TObject>(): (key: keyof TObject) => string;
|
|
11
|
+
export declare function getKey<TObject>(name: keyof TObject): keyof TObject;
|
|
12
|
+
export declare function convertToInt(text: any): number;
|
|
13
|
+
export declare function isInteger(text: string): boolean;
|
|
14
|
+
export declare function isIntegerOrNull(text: string): boolean;
|
|
15
|
+
export declare function isFloat(text: string): RegExpMatchArray;
|
|
16
|
+
export declare function getFormDataFromFileList(fileList: FileList): FormData;
|
|
17
|
+
export declare function prettifyHtml(html: string): string;
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { v4 } from "uuid";
|
|
2
|
+
import prettify from "html-prettify";
|
|
3
|
+
export function setCookie(name, value, days) {
|
|
4
|
+
let expires = "";
|
|
5
|
+
if (days) {
|
|
6
|
+
const date = new Date();
|
|
7
|
+
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
|
8
|
+
expires = "; expires=" + date.toUTCString();
|
|
9
|
+
}
|
|
10
|
+
document.cookie = name + "=" + (value || "") + expires + "; path=/";
|
|
11
|
+
}
|
|
12
|
+
export function getCookie(name) {
|
|
13
|
+
const nameEq = name + "=";
|
|
14
|
+
const ca = document.cookie.split(";");
|
|
15
|
+
for (let i = 0; i < ca.length; i++) {
|
|
16
|
+
let c = ca[i];
|
|
17
|
+
while (c.charAt(0) === " ") {
|
|
18
|
+
c = c.substring(1, c.length);
|
|
19
|
+
}
|
|
20
|
+
if (c.indexOf(nameEq) === 0) {
|
|
21
|
+
return c.substring(nameEq.length, c.length);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
export function eraseCookie(name) {
|
|
27
|
+
document.cookie = name + "=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;";
|
|
28
|
+
}
|
|
29
|
+
export function getNavigatorLanguage() {
|
|
30
|
+
if (window.navigator.languages) {
|
|
31
|
+
return window.navigator.languages[0];
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
return window.navigator["userLanguage"] || window.navigator.language;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export function queryStringParameterExists(name) {
|
|
38
|
+
return window.location.search.indexOf(name) >= 0;
|
|
39
|
+
}
|
|
40
|
+
export function getQueryStringParameter(name) {
|
|
41
|
+
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
|
|
42
|
+
const regex = new RegExp("[\\?&]" + name + "=([^&#]*)", "i");
|
|
43
|
+
const results = regex.exec(location.search);
|
|
44
|
+
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
|
|
45
|
+
}
|
|
46
|
+
;
|
|
47
|
+
export function stateToQueryString(state) {
|
|
48
|
+
const parametersArray = new Array();
|
|
49
|
+
if (state) {
|
|
50
|
+
Object.keys(state).forEach((key) => {
|
|
51
|
+
const value = state[key];
|
|
52
|
+
parametersArray.push(encodeURIComponent(key) + "=" + encodeURIComponent(value));
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
if (parametersArray.length === 0) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
return "?" + parametersArray.join("&");
|
|
59
|
+
}
|
|
60
|
+
export function getStateFromQueryString() {
|
|
61
|
+
const result = {};
|
|
62
|
+
const search = window.location.search;
|
|
63
|
+
if (search && search.length > 2) {
|
|
64
|
+
const parameters = window.location.search.split("&");
|
|
65
|
+
if (parameters) {
|
|
66
|
+
parameters.forEach((parameter) => {
|
|
67
|
+
const nameValuePair = parameter.split("=");
|
|
68
|
+
result[decodeURIComponent(nameValuePair[0])] = JSON.parse(decodeURIComponent(nameValuePair[1]));
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
const dynamicKey = "dynamic";
|
|
75
|
+
const groupKey = "group";
|
|
76
|
+
let styleSheet;
|
|
77
|
+
function getStyleSheet() {
|
|
78
|
+
if (!styleSheet) {
|
|
79
|
+
if (document.styleSheets.length > 0) {
|
|
80
|
+
styleSheet = document.styleSheets.item(0);
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
throw "No stylesheets loaded";
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return styleSheet;
|
|
87
|
+
}
|
|
88
|
+
function insertRule(selector, style, markAsDynamic, index, group) {
|
|
89
|
+
const styleSheet = getStyleSheet();
|
|
90
|
+
if (typeof styleSheet.insertRule === "function") {
|
|
91
|
+
const ruleExpression = selector + " {" + style + "}";
|
|
92
|
+
if (!index) {
|
|
93
|
+
index = styleSheet.cssRules.length;
|
|
94
|
+
}
|
|
95
|
+
const ruleIndex = styleSheet.insertRule(ruleExpression, index);
|
|
96
|
+
if (markAsDynamic) {
|
|
97
|
+
const rule = styleSheet.cssRules.item(ruleIndex);
|
|
98
|
+
rule[dynamicKey] = true;
|
|
99
|
+
if (group) {
|
|
100
|
+
rule[groupKey] = group;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function removeDynamicRules(group) {
|
|
106
|
+
const styleSheet = getStyleSheet();
|
|
107
|
+
for (let ruleIndex = styleSheet.cssRules.length - 1; ruleIndex >= 0; ruleIndex--) {
|
|
108
|
+
const rule = styleSheet.cssRules[ruleIndex];
|
|
109
|
+
if (rule[dynamicKey]) {
|
|
110
|
+
if (group) {
|
|
111
|
+
if (rule[groupKey] === group) {
|
|
112
|
+
styleSheet.deleteRule(ruleIndex);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
styleSheet.deleteRule(ruleIndex);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
export function getGuid() {
|
|
122
|
+
return v4();
|
|
123
|
+
}
|
|
124
|
+
export function getKeys() {
|
|
125
|
+
return (key) => key.toString();
|
|
126
|
+
}
|
|
127
|
+
export function getKey(name) {
|
|
128
|
+
return name;
|
|
129
|
+
}
|
|
130
|
+
function setScale(htmlElement, scale) {
|
|
131
|
+
htmlElement.style.transformOrigin = "center";
|
|
132
|
+
const scaleValue = " scale(" + scale + ")";
|
|
133
|
+
const transform = htmlElement.style.transform;
|
|
134
|
+
if (transform) {
|
|
135
|
+
if (transform.indexOf("scale") > -1) {
|
|
136
|
+
htmlElement.style.transform = transform.replace(/scale\(.*\)/, scaleValue);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
htmlElement.style.transform += scaleValue;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
htmlElement.style.transform = scaleValue;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
export function convertToInt(text) {
|
|
147
|
+
if (typeof text === "string") {
|
|
148
|
+
if (isInteger(text)) {
|
|
149
|
+
const intValue = Number.parseInt(text);
|
|
150
|
+
if (Number.isNaN(intValue)) {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
return intValue;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (typeof text === "number") {
|
|
157
|
+
return Math.trunc(text);
|
|
158
|
+
}
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
export function isInteger(text) {
|
|
162
|
+
if (!text) {
|
|
163
|
+
throw "parameter text not provided";
|
|
164
|
+
}
|
|
165
|
+
return text.match(/\D/) === null;
|
|
166
|
+
}
|
|
167
|
+
export function isIntegerOrNull(text) {
|
|
168
|
+
if (text) {
|
|
169
|
+
return isInteger(text);
|
|
170
|
+
}
|
|
171
|
+
return true;
|
|
172
|
+
}
|
|
173
|
+
export function isFloat(text) {
|
|
174
|
+
return text.match(/^[+-]?\d+(\.\d+)?$/);
|
|
175
|
+
}
|
|
176
|
+
export function getFormDataFromFileList(fileList) {
|
|
177
|
+
if (fileList && fileList.length > 0) {
|
|
178
|
+
const formData = new FormData();
|
|
179
|
+
for (let index = 0; index < fileList.length; index++) {
|
|
180
|
+
const file = fileList[index];
|
|
181
|
+
formData.append(file.name, file);
|
|
182
|
+
}
|
|
183
|
+
return formData;
|
|
184
|
+
}
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
export function prettifyHtml(html) {
|
|
188
|
+
if (html) {
|
|
189
|
+
return prettify(html);
|
|
190
|
+
}
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/utilities/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,QAAQ,MAAM,eAAe,CAAC;AAIrC,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,KAAa,EAAE,IAAY;IAC/D,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,IAAI,IAAI,EAAE;QACN,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;QACxB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;QAC5D,OAAO,GAAG,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;KAC/C;IACD,QAAQ,CAAC,MAAM,GAAG,IAAI,GAAG,GAAG,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,OAAO,GAAG,UAAU,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAY;IAClC,MAAM,MAAM,GAAG,IAAI,GAAG,GAAG,CAAC;IAC1B,MAAM,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAChC,IAAI,CAAC,GAAG,EAAE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AAQ,CAAC,KAAK,CAAC,CAAC;YAC7B,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SACpC;QACD,OAAO,QAAQ,CAAC;KACnB;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAID,MAAM,UAAU,YAAY,CAAC,IAAY;IACrC,IAAI,IAAI,EAAE;QACN,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;KACzB;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
type ResponseType = "void" | "json" | "blob" | "arrayBuffer";
|
|
2
|
+
export declare function init(authorizationTokenProvider: () => string): void;
|
|
3
|
+
export declare function get(input: RequestInfo, authorized: boolean, responseType: ResponseType, init?: RequestInit): Promise<any>;
|
|
4
|
+
export declare function post(input: RequestInfo, data: any, authorized: boolean, responseType: ResponseType, init: RequestInit): Promise<any>;
|
|
5
|
+
export {};
|