Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/export metric parser interface #20

Merged
merged 15 commits into from Apr 6, 2018
108 changes: 81 additions & 27 deletions dist/formulize.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/formulize.umd.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/types/formulize.interface.d.ts
@@ -1,4 +1,6 @@
import { OptionText, PipeParse, PipeInsert } from './option.interface';
export * from 'metric-parser/dist/types/ast.d';
export * from 'metric-parser/dist/types/tree/simple.tree/type.d';
export interface FormulizeOptions {
id?: string;
text?: OptionText;
Expand Down
1 change: 1 addition & 0 deletions dist/types/ui/ui.dom.d.ts
Expand Up @@ -18,4 +18,5 @@ export declare abstract class UIDom {
protected mergeUnit(baseElem: HTMLElement): void;
protected removeCursor(): void;
protected removeUnit(): void;
protected updateStatus(valid?: boolean): void;
}
2 changes: 1 addition & 1 deletion dist/types/ui/ui.element.helper.d.ts
Expand Up @@ -2,10 +2,10 @@ export declare class UIElementHelper {
static getDragElement(id: string): HTMLElement;
static getCursorElement(id: string): HTMLElement;
static getUnitElement(id: string, value: string): HTMLElement;
static setUnitValue(id: string, elem: HTMLElement, value: string): void;
static getUnitDecimalElement(id: string, side: 'prefix' | 'suffix', value: string): HTMLElement;
static getOperatorElement(id: string, value: string): HTMLElement;
static getTextBoxElement(id: string): HTMLElement;
static setUnitValue(id: string, elem: HTMLElement, value: string): void;
static isElementType(id: string, type: string, elem: HTMLElement): boolean;
static isDrag(id: string, elem: HTMLElement): boolean;
static isCursor(id: string, elem: HTMLElement): boolean;
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/js/search.js

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions docs/classes/formulizekeyhelper.html
Expand Up @@ -1092,7 +1092,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> do<wbr>Action</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/key.helper.ts#L49">key.helper.ts:49</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/key.helper.ts#L49">key.helper.ts:49</a></li>
</ul>
</aside>
<h4 class="tsd-type-parameters-title">Type parameters</h4>
Expand Down Expand Up @@ -1145,7 +1145,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> do<wbr>Reload</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/key.helper.ts#L45">key.helper.ts:45</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/key.helper.ts#L45">key.helper.ts:45</a></li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
Expand All @@ -1162,7 +1162,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> get<wbr>Value</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/key.helper.ts#L53">key.helper.ts:53</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/key.helper.ts#L53">key.helper.ts:53</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1188,7 +1188,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> is<wbr>Backspace</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/key.helper.ts#L13">key.helper.ts:13</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/key.helper.ts#L13">key.helper.ts:13</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1211,7 +1211,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> is<wbr>Delete</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/key.helper.ts#L17">key.helper.ts:17</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/key.helper.ts#L17">key.helper.ts:17</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1234,7 +1234,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> is<wbr>Down</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/key.helper.ts#L33">key.helper.ts:33</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/key.helper.ts#L33">key.helper.ts:33</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1257,7 +1257,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> is<wbr>End</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/key.helper.ts#L41">key.helper.ts:41</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/key.helper.ts#L41">key.helper.ts:41</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1280,7 +1280,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> is<wbr>Home</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/key.helper.ts#L37">key.helper.ts:37</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/key.helper.ts#L37">key.helper.ts:37</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1303,7 +1303,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> is<wbr>Left</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/key.helper.ts#L21">key.helper.ts:21</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/key.helper.ts#L21">key.helper.ts:21</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1326,7 +1326,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> is<wbr>Reload</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/key.helper.ts#L5">key.helper.ts:5</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/key.helper.ts#L5">key.helper.ts:5</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1352,7 +1352,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> is<wbr>Right</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/key.helper.ts#L29">key.helper.ts:29</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/key.helper.ts#L29">key.helper.ts:29</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1375,7 +1375,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> is<wbr>Select<wbr>All</h3
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/key.helper.ts#L9">key.helper.ts:9</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/key.helper.ts#L9">key.helper.ts:9</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1401,7 +1401,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> is<wbr>Up</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/key.helper.ts#L25">key.helper.ts:25</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/key.helper.ts#L25">key.helper.ts:25</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down
12 changes: 6 additions & 6 deletions docs/classes/formulizetokenhelper.html
Expand Up @@ -1064,7 +1064,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> is<wbr>Bracket</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/token.helper.ts#L20">token.helper.ts:20</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/token.helper.ts#L20">token.helper.ts:20</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1087,7 +1087,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> is<wbr>Comma</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/token.helper.ts#L24">token.helper.ts:24</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/token.helper.ts#L24">token.helper.ts:24</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1110,7 +1110,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> is<wbr>Numeric</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/token.helper.ts#L16">token.helper.ts:16</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/token.helper.ts#L16">token.helper.ts:16</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1133,7 +1133,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> is<wbr>Valid</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/token.helper.ts#L12">token.helper.ts:12</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/token.helper.ts#L12">token.helper.ts:12</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1156,7 +1156,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> support<wbr>Value</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/token.helper.ts#L28">token.helper.ts:28</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/token.helper.ts#L28">token.helper.ts:28</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand All @@ -1179,7 +1179,7 @@ <h3><span class="tsd-flag ts-flagStatic">Static</span> to<wbr>Decimal</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/7fd0208/src/token.helper.ts#L5">token.helper.ts:5</a></li>
<li>Defined in <a href="https://github.com/KennethanCeyer/formula/blob/771dbc1/src/token.helper.ts#L5">token.helper.ts:5</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
Expand Down