taggedjs 2.3.27 → 2.3.28
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/index.js +1 -1
- package/js/CustomError.d.ts +7 -0
- package/js/CustomError.js +9 -0
- package/js/CustomError.js.map +1 -0
- package/js/Errors.d.ts +14 -0
- package/js/Errors.js +21 -0
- package/js/Errors.js.map +1 -0
- package/js/Errors2.d.ts +14 -0
- package/js/Errors2.js +21 -0
- package/js/Errors2.js.map +1 -0
- package/js/Subject.d.ts +1 -1
- package/js/Tag.class.d.ts +5 -4
- package/js/Tag.class.js +8 -9
- package/js/Tag.class.js.map +1 -1
- package/js/Tag.utils.d.ts +2 -2
- package/js/Tag.utils.js +2 -14
- package/js/Tag.utils.js.map +1 -1
- package/js/TagSupport.class.d.ts +27 -0
- package/js/TagSupport.class.js +157 -0
- package/js/TagSupport.class.js.map +1 -0
- package/js/ValueSubject.d.ts +2 -2
- package/js/ValueSubject.js.map +1 -1
- package/js/bindSubjectCallback.function.d.ts +5 -3
- package/js/bindSubjectCallback.function.js +19 -12
- package/js/bindSubjectCallback.function.js.map +1 -1
- package/js/gateway/tagGateway.utils.js +14 -4
- package/js/gateway/tagGateway.utils.js.map +1 -1
- package/js/getTagSupport.d.ts +1 -2
- package/js/getTagSupport.js +7 -11
- package/js/getTagSupport.js.map +1 -1
- package/js/index.d.ts +13 -5
- package/js/index.js +12 -6
- package/js/index.js.map +1 -1
- package/js/isInstance.d.ts +3 -2
- package/js/isInstance.js +3 -0
- package/js/isInstance.js.map +1 -1
- package/js/processSubjectComponent.function.js +5 -5
- package/js/processSubjectComponent.function.js.map +1 -1
- package/js/processSubjectValue.function.d.ts +0 -1
- package/js/processSubjectValue.function.js +5 -6
- package/js/processSubjectValue.function.js.map +1 -1
- package/js/processTagArray.js +15 -9
- package/js/processTagArray.js.map +1 -1
- package/js/redrawTag.function.js +3 -2
- package/js/redrawTag.function.js.map +1 -1
- package/js/setUse.function.d.ts +1 -1
- package/js/state.d.ts +1 -0
- package/js/state.js +21 -3
- package/js/state.js.map +1 -1
- package/js/tag.d.ts +5 -4
- package/js/tag.js +48 -9
- package/js/tag.js.map +1 -1
- package/js/tagElement.d.ts +1 -1
- package/js/tagElement.js +6 -15
- package/js/tagElement.js.map +1 -1
- package/js/tagRunner.d.ts +1 -1
- package/js/templater.utils.d.ts +6 -4
- package/js/templater.utils.js +6 -6
- package/js/templater.utils.js.map +1 -1
- package/js/updateExistingTag.function.d.ts +4 -0
- package/js/updateExistingTag.function.js +21 -0
- package/js/updateExistingTag.function.js.map +1 -0
- package/js/updateExistingTagComponent.function.d.ts +4 -0
- package/js/updateExistingTagComponent.function.js +57 -0
- package/js/updateExistingTagComponent.function.js.map +1 -0
- package/js/updateExistingValue.function.d.ts +8 -0
- package/js/updateExistingValue.function.js +83 -0
- package/js/updateExistingValue.function.js.map +1 -0
- package/js/updateTag.utils.d.ts +1 -0
- package/js/updateTag.utils.js +5 -79
- package/js/updateTag.utils.js.map +1 -1
- package/package.json +1 -1
package/js/tag.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Tag } from "./Tag.class.js";
|
|
2
2
|
import { TagComponent } from "./templater.utils.js";
|
|
3
|
+
import { ValueSubject } from "./ValueSubject.js";
|
|
4
|
+
export type TagChildren = ValueSubject<Tag[]>;
|
|
5
|
+
export type TagChildrenInput = Tag[] | Tag | TagChildren;
|
|
3
6
|
export declare const tags: TagComponent[];
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
export declare function tag<T>(tagComponent: T | TagComponent): T;
|
|
7
|
+
/** Wraps a tag component in a state manager and always push children to last argument as any array */
|
|
8
|
+
export declare function tag<T>(tagComponent: (((props: T, children: TagChildren) => Tag) | ((props: T) => Tag) | (() => Tag))): ((props?: T, children?: TagChildrenInput) => Tag);
|
package/js/tag.js
CHANGED
|
@@ -1,23 +1,47 @@
|
|
|
1
|
-
import { isTagInstance } from "./isInstance.js";
|
|
1
|
+
import { isSubjectInstance, isTagArray, isTagInstance } from "./isInstance.js";
|
|
2
2
|
import { setUse } from "./setUse.function.js";
|
|
3
|
-
import { TemplaterResult,
|
|
3
|
+
import { TemplaterResult, alterProps } from "./templater.utils.js";
|
|
4
|
+
import { ValueSubject } from "./ValueSubject.js";
|
|
5
|
+
import { runTagCallback } from "./bindSubjectCallback.function.js";
|
|
4
6
|
export const tags = [];
|
|
5
7
|
let tagCount = 0;
|
|
8
|
+
/** Wraps a tag component in a state manager and always push children to last argument as any array */
|
|
6
9
|
export function tag(tagComponent) {
|
|
7
10
|
const result = (function tagWrapper(props, children) {
|
|
8
|
-
const isPropTag = isTagInstance(props);
|
|
9
|
-
const templater = new TemplaterResult(props);
|
|
10
|
-
const newProps = getNewProps(props, templater);
|
|
11
|
-
let argProps = newProps;
|
|
11
|
+
const isPropTag = isTagInstance(props) || isTagArray(props);
|
|
12
12
|
if (isPropTag) {
|
|
13
13
|
children = props;
|
|
14
|
-
|
|
14
|
+
props = undefined;
|
|
15
|
+
}
|
|
16
|
+
const { childSubject, madeSubject } = kidsToTagArraySubject(children);
|
|
17
|
+
const templater = new TemplaterResult(props, childSubject);
|
|
18
|
+
if (!isPropTag) {
|
|
19
|
+
// wrap props that are functions
|
|
20
|
+
alterProps(props, templater);
|
|
15
21
|
}
|
|
16
22
|
function innerTagWrap() {
|
|
17
23
|
const originalFunction = innerTagWrap.original;
|
|
18
|
-
const props = templater.tagSupport.props;
|
|
19
|
-
const tag = originalFunction(props,
|
|
24
|
+
const props = templater.tagSupport.props;
|
|
25
|
+
const tag = originalFunction(props, childSubject);
|
|
20
26
|
tag.setSupport(templater.tagSupport);
|
|
27
|
+
if (madeSubject) {
|
|
28
|
+
childSubject.value.forEach(kid => {
|
|
29
|
+
kid.values.forEach((value, index) => {
|
|
30
|
+
if (!(value instanceof Function)) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
if (kid.values[index].isChildOverride) {
|
|
34
|
+
return; // already overwritten
|
|
35
|
+
}
|
|
36
|
+
// all functions need to report to me
|
|
37
|
+
kid.values[index] = function (...args) {
|
|
38
|
+
runTagCallback(value, tag.ownerTag, this, args);
|
|
39
|
+
// runTagCallback(value, tag, this, args)
|
|
40
|
+
};
|
|
41
|
+
kid.values[index].isChildOverride = true;
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
}
|
|
21
45
|
return tag;
|
|
22
46
|
}
|
|
23
47
|
innerTagWrap.original = tagComponent;
|
|
@@ -31,6 +55,21 @@ export function tag(tagComponent) {
|
|
|
31
55
|
tags.push(tagComponent);
|
|
32
56
|
return result;
|
|
33
57
|
}
|
|
58
|
+
function kidsToTagArraySubject(children) {
|
|
59
|
+
if (isSubjectInstance(children)) {
|
|
60
|
+
return { childSubject: children, madeSubject: false };
|
|
61
|
+
}
|
|
62
|
+
const kidArray = children;
|
|
63
|
+
if (isTagArray(kidArray)) {
|
|
64
|
+
return { childSubject: new ValueSubject(children), madeSubject: true };
|
|
65
|
+
}
|
|
66
|
+
const kid = children;
|
|
67
|
+
if (kid) {
|
|
68
|
+
kid.arrayValue = 0;
|
|
69
|
+
return { childSubject: new ValueSubject([kid]), madeSubject: true };
|
|
70
|
+
}
|
|
71
|
+
return { childSubject: new ValueSubject([]), madeSubject: true };
|
|
72
|
+
}
|
|
34
73
|
function updateResult(result, tagComponent) {
|
|
35
74
|
result.isTag = true;
|
|
36
75
|
result.original = tagComponent;
|
package/js/tag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.js","sourceRoot":"","sources":["../ts/tag.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"tag.js","sourceRoot":"","sources":["../ts/tag.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EAAE,MAAM,E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,IAAG,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxB,OAAO,EAAC,YAAY,EAAE,IAAI,YAAY,CAAC,QAAiB,CAAC,EAAE,WAAW,EAAE,IAAI,EAAC,CAAA;IAC/E,CAAC;IAED,MAAM,GAAG,GAAG,QAAe,CAAA;IAC3B,IAAG,GAAG,EAAE,CAAC;QACP,GAAG,CAAC,UAAU,GAAG,CAAC,CAAA;QAClB,OAAO,EAAC,YAAY,EAAE,IAAI,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,EAAC,CAAA;IACnE,CAAC;IAED,OAAO,EAAC,YAAY,EAAE,IAAI,YAAY,CAAC,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,EAAC,CAAA;AAChE,CAAC;AAED,SAAS,YAAY,CACnB,MAAW,EACX,YAA0B;IAE1B,MAAM,CAAC,KAAK,GAAG,IAAI,CAAA;IACnB,MAAM,CAAC,QAAQ,GAAG,YAAY,CAAA;AAChC,CAAC;AAED,SAAS,eAAe,CACtB,YAAiB;IAEjB,YAAY,CAAC,IAAI,GAAG,IAAI,CAAA;IACxB,YAAY,CAAC,MAAM,GAAG,MAAM,CAAA;IAC5B,YAAY,CAAC,QAAQ,GAAG,EAAE,QAAQ,CAAA;AACpC,CAAC;AACD,MAAM,YAAY;CAAG;AACrB,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAA"}
|
package/js/tagElement.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TagSupport } from "./
|
|
1
|
+
import { TagSupport } from "./TagSupport.class.js";
|
|
2
2
|
import { TagComponent, TemplaterResult } from "./templater.utils.js";
|
|
3
3
|
import { Tag } from "./Tag.class.js";
|
|
4
4
|
export declare function tagElement(app: TagComponent, // (...args: unknown[]) => TemplaterResult,
|
package/js/tagElement.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { runBeforeRender } from "./tagRunner.js";
|
|
1
|
+
import { runAfterRender, runBeforeRedraw, runBeforeRender } from "./tagRunner.js";
|
|
2
2
|
const appElements = [];
|
|
3
3
|
export function tagElement(app, // (...args: unknown[]) => TemplaterResult,
|
|
4
4
|
element, props) {
|
|
@@ -16,7 +16,6 @@ element, props) {
|
|
|
16
16
|
const { tag, tagSupport } = result;
|
|
17
17
|
tag.appElement = element;
|
|
18
18
|
addAppTagRender(tagSupport, tag);
|
|
19
|
-
// const context = tag.updateValues(tag.values)
|
|
20
19
|
const templateElm = document.createElement('template');
|
|
21
20
|
templateElm.setAttribute('tag-detail', 'app-template-placeholder');
|
|
22
21
|
element.appendChild(templateElm);
|
|
@@ -26,34 +25,26 @@ element, props) {
|
|
|
26
25
|
return { tag, tags: app.original.tags };
|
|
27
26
|
}
|
|
28
27
|
export function applyTagUpdater(wrapper) {
|
|
29
|
-
const tagSupport = wrapper.tagSupport;
|
|
28
|
+
const tagSupport = wrapper.tagSupport;
|
|
30
29
|
runBeforeRender(tagSupport, undefined);
|
|
31
30
|
// Call the apps function for our tag templater
|
|
32
|
-
|
|
33
|
-
const tag = wrapper.wrapper(); // templater.wrapper()
|
|
31
|
+
const tag = wrapper.wrapper();
|
|
34
32
|
tag.tagSupport = tagSupport;
|
|
35
|
-
tag.
|
|
33
|
+
runAfterRender(tag.tagSupport, tag);
|
|
36
34
|
return { tag, tagSupport };
|
|
37
35
|
}
|
|
38
36
|
/** Overwrites arguments.tagSupport.mutatingRender */
|
|
39
37
|
export function addAppTagRender(tagSupport, tag) {
|
|
40
38
|
let lastTag;
|
|
41
39
|
tagSupport.mutatingRender = () => {
|
|
42
|
-
tag.
|
|
40
|
+
runBeforeRedraw(tag.tagSupport, tag);
|
|
43
41
|
const templater = tagSupport.templater; // wrapper
|
|
44
42
|
const fromTag = lastTag = templater.wrapper();
|
|
45
|
-
// tagSupport.props = fromTag.tagSupport.props
|
|
46
43
|
tagSupport.latestProps = fromTag.tagSupport.props;
|
|
47
44
|
tagSupport.latestClonedProps = fromTag.tagSupport.clonedProps;
|
|
48
|
-
// tagSupport.latestClonedProps = fromTag.tagSupport.latestClonedProps
|
|
49
45
|
fromTag.setSupport(tagSupport);
|
|
50
|
-
tag.
|
|
46
|
+
runAfterRender(tag.tagSupport, tag);
|
|
51
47
|
tag.updateByTag(fromTag);
|
|
52
|
-
/*
|
|
53
|
-
if(lastTag) {
|
|
54
|
-
lastTag.destroy({stagger: 0})
|
|
55
|
-
}
|
|
56
|
-
*/
|
|
57
48
|
tagSupport.newest = fromTag;
|
|
58
49
|
return lastTag;
|
|
59
50
|
};
|
package/js/tagElement.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tagElement.js","sourceRoot":"","sources":["../ts/tagElement.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"tagElement.js","sourceRoot":"","sources":["../ts/tagElement.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAIjF,MAAM,WAAW,GAAmC,EAAE,CAAA;AAEtD,MAAM,UAAU,UAAU,CACxB,GAAiB,EAAE,2CAA2C;AAC9D,OAA8B,EAC9B,KAAc;IAEd,MAAM,WAAW,GAAG,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,KAAK,OAAO,CAAC,CAAA;IAC/E,IAAG,WAAW,IAAI,CAAC,EAAE,CAAC;QACpB,WAAW,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAA;QACtC,WAAW,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAA;QAClC,sCAAsC;QACtC,OAAO,CAAC,IAAI,CAAC,6DAA6D,EAAE,EAAC,OAAO,EAAC,CAAC,CAAA;IACxF,CAAC;IAED,2DAA2D;IAC3D,MAAM,OAAO,GAAG,GAAG,CAAC,KAAK,CAA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,UAAU,EAAE,GAAG,CAAC,CAAA;QAEpC,MAAM,SAAS,GAAG,UAAU,CAAC,SAA4B,CAAA,CAAC,UAAU;QACpE,MAAM,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC,OAAO,EAAE,CAAA;QAE7C,UAAU,CAAC,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,KAAK,CAAA;QACjD,UAAU,CAAC,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAA;QAE7D,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;QAC9B,cAAc,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,CAAA;QACnC,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;QAExB,UAAU,CAAC,MAAM,GAAG,OAAO,CAAA;QAE3B,OAAO,OAAO,CAAA;IAChB,CAAC,CAAA;AACH,CAAC"}
|
package/js/tagRunner.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Tag } from "./Tag.class.js";
|
|
2
|
-
import { TagSupport } from "./
|
|
2
|
+
import { TagSupport } from "./TagSupport.class.js";
|
|
3
3
|
export declare function runBeforeRender(tagSupport: TagSupport, tagOwner: Tag): void;
|
|
4
4
|
export declare function runAfterRender(tagSupport: TagSupport, tag: Tag): void;
|
|
5
5
|
export declare function runBeforeRedraw(tagSupport: TagSupport, tag: Tag): void;
|
package/js/templater.utils.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Tag } from "./Tag.class.js";
|
|
2
|
-
import { TagSupport } from "./
|
|
2
|
+
import { TagSupport } from "./TagSupport.class.js";
|
|
3
3
|
import { Props } from "./Props.js";
|
|
4
|
+
import { ValueSubject } from "./ValueSubject.js";
|
|
5
|
+
import { TagChildren } from "./tag.js";
|
|
4
6
|
export type Wrapper = (() => Tag) & {
|
|
5
7
|
original: () => Tag;
|
|
6
8
|
};
|
|
@@ -10,7 +12,7 @@ export declare class TemplaterResult {
|
|
|
10
12
|
newest?: Tag;
|
|
11
13
|
oldest?: Tag;
|
|
12
14
|
tagSupport: TagSupport;
|
|
13
|
-
constructor(props: Props);
|
|
15
|
+
constructor(props: Props, children: TagChildren);
|
|
14
16
|
redraw?: (force?: boolean) => Tag | undefined;
|
|
15
17
|
isTemplater: boolean;
|
|
16
18
|
forceRenderTemplate(tagSupport: TagSupport, ownerTag: Tag): Tag;
|
|
@@ -23,5 +25,5 @@ export interface TemplateRedraw extends TemplaterResult {
|
|
|
23
25
|
redraw: () => Tag | undefined;
|
|
24
26
|
}
|
|
25
27
|
export type TagComponent = (props: Props, // props or children
|
|
26
|
-
children?: Tag) => Tag;
|
|
27
|
-
export declare function
|
|
28
|
+
children?: ValueSubject<Tag[]>) => Tag;
|
|
29
|
+
export declare function alterProps(props: Props, templater: TemplaterResult): any;
|
package/js/templater.utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TagSupport } from "./TagSupport.class.js";
|
|
2
2
|
import { isTagInstance } from "./isInstance.js";
|
|
3
3
|
import { runAfterRender, runBeforeRedraw, runBeforeRender } from "./tagRunner.js";
|
|
4
4
|
import { setUse } from "./setUse.function.js";
|
|
@@ -8,15 +8,15 @@ export class TemplaterResult {
|
|
|
8
8
|
newest;
|
|
9
9
|
oldest;
|
|
10
10
|
tagSupport;
|
|
11
|
-
constructor(props) {
|
|
12
|
-
this.tagSupport =
|
|
11
|
+
constructor(props, children) {
|
|
12
|
+
this.tagSupport = new TagSupport(this, children, props);
|
|
13
13
|
}
|
|
14
14
|
redraw;
|
|
15
15
|
isTemplater = true;
|
|
16
16
|
forceRenderTemplate(tagSupport, ownerTag) {
|
|
17
17
|
const tag = this.wrapper();
|
|
18
18
|
tag.setSupport(tagSupport);
|
|
19
|
-
tag.
|
|
19
|
+
runAfterRender(tag.tagSupport, tag);
|
|
20
20
|
this.oldest = tag;
|
|
21
21
|
tagSupport.oldest = tag;
|
|
22
22
|
this.oldest = tag;
|
|
@@ -69,8 +69,8 @@ export class TemplaterResult {
|
|
|
69
69
|
return { remit: true, retag };
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
/*
|
|
73
|
-
export function
|
|
72
|
+
/* Used to rewrite props that are functions. When they are called it should cause parent rendering */
|
|
73
|
+
export function alterProps(props, templater) {
|
|
74
74
|
function callback(toCall, callWith) {
|
|
75
75
|
const callbackResult = toCall(...callWith);
|
|
76
76
|
templater.newest?.ownerTag?.tagSupport.render();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templater.utils.js","sourceRoot":"","sources":["../ts/templater.utils.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"templater.utils.js","sourceRoot":"","sources":["../ts/templater.utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACjF,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAS7C,MAAM,OAAO,eAAe;IAC1B,MAAM,CAAU;IAChB,OAAO,CAAU;IAEjB,MAAM,CAAM;IACZ,MAAM,CAAM;IAEZ,UAAU,CAAY;IAEtB,YACE,KAAY,EACZ,QAAqB;QAErB,IAAI,CAAC,UAAU,GAAG,IAAI,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;IACzD,CAAC;IAED,MAAM,CAEc;IACpB,WAAW,GAAG,IAAI,CAAA;IAElB,mBAAmB,CACjB,UAAsB,EACtB,QAAa;QAEb,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,EAAE,CAAA;QAE1B,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,CAAA;QAC1B,cAAc,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,CAAA;QAEn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CAAC,CAAA;IAEzD,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,SAAS,kBAAkB,CACzB,KAAU,EACV,QAAiD;IAEjD,IAAG,OAAM,CAAC,KAAK,CAAC,KAAG,QAAQ,EAAE,CAAC;QAC5B,OAAO,KAAK,CAAA;IACd,CAAC;IAED,MAAM,QAAQ,GAAG,EAAC,GAAG,KAAK,EAAC,CAAA;IAE3B,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE;QACjD,IAAG,KAAK,YAAY,QAAQ,EAAE,CAAC;YAC7B,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAW,EAAE,EAAE;gBAClC,OAAO,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;YAC9B,CAAC,CAAA;YACD,OAAM;QACR,CAAC;QAED,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,CAAA;IACxB,CAAC,CAAC,CAAA;IAEF,OAAO,QAAQ,CAAA;AACjB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { runAfterRender, runBeforeRedraw } from "./tagRunner.js";
|
|
2
|
+
export function updateExistingTag(templater, ogTag, existingSubject) {
|
|
3
|
+
const tagSupport = ogTag.tagSupport;
|
|
4
|
+
const oldest = tagSupport.oldest;
|
|
5
|
+
runBeforeRedraw(oldest.tagSupport, oldest);
|
|
6
|
+
const retag = templater.wrapper();
|
|
7
|
+
// move my props onto tagSupport
|
|
8
|
+
tagSupport.latestProps = retag.tagSupport.props;
|
|
9
|
+
tagSupport.latestClonedProps = retag.tagSupport.clonedProps;
|
|
10
|
+
// tagSupport.latestClonedProps = retag.tagSupport.latestClonedProps
|
|
11
|
+
tagSupport.memory = retag.tagSupport.memory;
|
|
12
|
+
// retag.tagSupport = tagSupport
|
|
13
|
+
retag.setSupport(tagSupport);
|
|
14
|
+
templater.newest = retag;
|
|
15
|
+
tagSupport.newest = retag;
|
|
16
|
+
runAfterRender(oldest.tagSupport, oldest);
|
|
17
|
+
ogTag.updateByTag(retag);
|
|
18
|
+
existingSubject.set(templater);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=updateExistingTag.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateExistingTag.function.js","sourceRoot":"","sources":["../ts/updateExistingTag.function.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAGhE,MAAM,UAAU,iBAAiB,CAC/B,SAA0B,EAC1B,KAAU,EACV,eAA2B;IAE3B,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAA;IACnC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAa,CAAA;IACvC,eAAe,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;IAE1C,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,EAAE,CAAA;IAEjC,gCAAgC;IAChC,UAAU,CAAC,WAAW,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAA;IAC/C,UAAU,CAAC,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAA;IAC3D,oEAAoE;IACpE,UAAU,CAAC,MAAM,GAAI,KAAK,CAAC,UAAU,CAAC,MAAM,CAAA;IAE5C,gCAAgC;IAChC,KAAK,CAAC,UAAU,CAAE,UAAU,CAAE,CAAA;IAE9B,SAAS,CAAC,MAAM,GAAG,KAAK,CAAA;IACxB,UAAU,CAAC,MAAM,GAAG,KAAK,CAAA;IACzB,cAAc,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;IACzC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;IACxB,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;IAE9B,OAAM;AACR,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TagSubject } from "./Tag.utils.js";
|
|
2
|
+
import { TemplateRedraw } from "./templater.utils.js";
|
|
3
|
+
import { Tag } from "./Tag.class.js";
|
|
4
|
+
export declare function updateExistingTagComponent(tag: Tag, tempResult: TemplateRedraw, existingSubject: TagSubject, subjectValue: any): void;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { setValueRedraw } from "./Tag.utils.js";
|
|
2
|
+
import { deepClone } from "./deepFunctions.js";
|
|
3
|
+
import { isTagInstance } from "./isInstance.js";
|
|
4
|
+
import { destroyTagMemory } from "./updateExistingValue.function.js";
|
|
5
|
+
import { hasTagSupportChanged } from "./TagSupport.class.js";
|
|
6
|
+
export function updateExistingTagComponent(tag, tempResult, existingSubject, subjectValue) {
|
|
7
|
+
let existingTag = existingSubject.tag;
|
|
8
|
+
// previously was something else, now a tag component
|
|
9
|
+
if (!existingTag) {
|
|
10
|
+
setValueRedraw(tempResult, existingSubject, tag);
|
|
11
|
+
tempResult.redraw();
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
// tag existingTag
|
|
15
|
+
const oldWrapper = existingTag.tagSupport.templater.wrapper;
|
|
16
|
+
const newWrapper = tempResult.wrapper;
|
|
17
|
+
let isSameTag = false;
|
|
18
|
+
if (oldWrapper && newWrapper) {
|
|
19
|
+
const oldFunction = oldWrapper.original;
|
|
20
|
+
const newFunction = newWrapper.original;
|
|
21
|
+
isSameTag = oldFunction === newFunction;
|
|
22
|
+
}
|
|
23
|
+
const latestProps = tempResult.tagSupport.props;
|
|
24
|
+
const oldTagSetup = existingTag.tagSupport;
|
|
25
|
+
oldTagSetup.latestProps = latestProps;
|
|
26
|
+
if (!isSameTag) {
|
|
27
|
+
// TODO: this may not be in use
|
|
28
|
+
destroyTagMemory(existingTag, existingSubject, subjectValue);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
const subjectTagSupport = subjectValue?.tagSupport;
|
|
32
|
+
// old props may have changed, reclone first
|
|
33
|
+
let oldCloneProps = subjectTagSupport.props;
|
|
34
|
+
// if the new props are NOT HTML children, then clone the props for later render cycle comparing
|
|
35
|
+
if (!isTagInstance(subjectTagSupport.props)) {
|
|
36
|
+
oldCloneProps = deepClone(subjectTagSupport.props);
|
|
37
|
+
}
|
|
38
|
+
if (existingTag) {
|
|
39
|
+
const hasChanged = hasTagSupportChanged(oldTagSetup, tempResult.tagSupport);
|
|
40
|
+
if (!hasChanged) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
setValueRedraw(tempResult, existingSubject, tag);
|
|
46
|
+
oldTagSetup.templater = tempResult;
|
|
47
|
+
const redraw = tempResult.redraw();
|
|
48
|
+
existingSubject.value.tag = oldTagSetup.newest = redraw;
|
|
49
|
+
oldTagSetup.latestClonedProps = tempResult.tagSupport.clonedProps;
|
|
50
|
+
// oldTagSetup.latestClonedProps = tempResult.tagSupport.latestClonedProps
|
|
51
|
+
if (!isSameTag) {
|
|
52
|
+
existingSubject.tag = redraw;
|
|
53
|
+
subjectValue.tagSupport = tempResult.tagSupport;
|
|
54
|
+
}
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=updateExistingTagComponent.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateExistingTagComponent.function.js","sourceRoot":"","sources":["../ts/updateExistingTagComponent.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAE5D,MAAM,UAAU,0BAA0B,CACxC,GAAQ,EACR,UAA0B,EAC1B,eAA2B,EAC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AAW,EAAE,UAAU,CAAC,UAAU,CAAC,CAAA;YAC3E,IAAG,CAAC,UAAU,EAAE,CAAC;gBACf,OAAM;YACR,CAAC;QACH,CAAC;IACH,CAAC;IAED,cAAc,CAAC,UAAU,EAAE,eAAe,EAAE,GAAG,CAAC,CAAA;IAEhD,WAAW,CAAC,SAAS,GAAG,UAAU,CAAA;IAElC,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,EAAS,CAAA;IAEzC,eAAe,CAAC,KAAK,CAAC,GAAG,GAAG,WAAW,CAAC,MAAM,GAAG,MAAM,CAAA;IACvD,WAAW,CAAC,iBAAiB,GAAG,UAAU,CAAC,UAAU,CAAC,WAAW,CAAA;IACjE,0EAA0E;IAG1E,IAAG,CAAC,SAAS,EAAE,CAAC;QACd,eAAe,CAAC,GAAG,GAAG,MAAM,CAAA;QAC5B,YAAY,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAA;IACjD,CAAC;IAED,OAAM;AACR,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TagSubject } from "./Tag.utils.js";
|
|
2
|
+
import { TagSupport } from "./TagSupport.class.js";
|
|
3
|
+
import { Subject } from "./Subject.js";
|
|
4
|
+
import { TemplaterResult } from "./templater.utils.js";
|
|
5
|
+
import { Tag } from "./Tag.class.js";
|
|
6
|
+
import { TagArraySubject } from "./processTagArray.js";
|
|
7
|
+
export declare function updateExistingValue(existing: Subject<Tag> | TemplaterResult | TagSubject | TagArraySubject, value: TemplaterResult | TagSupport | Function | Subject<any>, tag: Tag): void;
|
|
8
|
+
export declare function destroyTagMemory(existingTag: Tag, existingSubject: TagSubject, subjectValue: any): void;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { isSubjectInstance, isTagArray, isTagComponent } from "./isInstance.js";
|
|
2
|
+
import { bindSubjectCallback } from "./bindSubjectCallback.function.js";
|
|
3
|
+
import { processTag } from "./processSubjectValue.function.js";
|
|
4
|
+
import { processTagArray } from "./processTagArray.js";
|
|
5
|
+
import { updateExistingTagComponent } from "./updateExistingTagComponent.function.js";
|
|
6
|
+
import { updateExistingTag } from "./updateExistingTag.function.js";
|
|
7
|
+
export function updateExistingValue(existing, value, tag) {
|
|
8
|
+
const subjectValue = existing.value;
|
|
9
|
+
const ogTag = subjectValue?.tag;
|
|
10
|
+
const tempResult = value;
|
|
11
|
+
const existingSubArray = existing;
|
|
12
|
+
const existingSubTag = existing;
|
|
13
|
+
// was array
|
|
14
|
+
if (existing.lastArray) {
|
|
15
|
+
// its another tag array
|
|
16
|
+
if (isTagArray(value)) {
|
|
17
|
+
processTagArray(existing, value, existingSubArray.template, tag, { counts: {
|
|
18
|
+
added: 0,
|
|
19
|
+
removed: 0,
|
|
20
|
+
} });
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
// was tag array and now something else
|
|
24
|
+
;
|
|
25
|
+
existing.lastArray.forEach(({ tag }) => tag.destroy());
|
|
26
|
+
delete existing.lastArray;
|
|
27
|
+
}
|
|
28
|
+
// handle already seen tag components
|
|
29
|
+
if (isTagComponent(tempResult)) {
|
|
30
|
+
return updateExistingTagComponent(tag, tempResult, existingSubTag, subjectValue);
|
|
31
|
+
}
|
|
32
|
+
// was component but no longer
|
|
33
|
+
const existingTag = existingSubTag.tag;
|
|
34
|
+
if (existingTag) {
|
|
35
|
+
// its now an array
|
|
36
|
+
if (isTagArray(value)) {
|
|
37
|
+
destroyTagMemory(existingTag, existingSubTag, subjectValue);
|
|
38
|
+
delete existingSubTag.tag;
|
|
39
|
+
}
|
|
40
|
+
const oldWrapper = existingTag.tagSupport.templater.wrapper;
|
|
41
|
+
const newWrapper = value?.wrapper;
|
|
42
|
+
const wrapMatch = oldWrapper && newWrapper && oldWrapper?.original === newWrapper?.original;
|
|
43
|
+
// TODO: We shouldn't need both of these
|
|
44
|
+
const isSameTag = value && existingTag.lastTemplateString === value.lastTemplateString;
|
|
45
|
+
const isSameTag2 = value && value.getTemplate && existingTag.isLikeTag(value);
|
|
46
|
+
if (isSameTag || isSameTag2) {
|
|
47
|
+
processTag(value, existing, existing.template, existingTag, // tag,
|
|
48
|
+
{
|
|
49
|
+
counts: {
|
|
50
|
+
added: 0,
|
|
51
|
+
removed: 0,
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (wrapMatch) {
|
|
57
|
+
return updateExistingTag(value, existingTag, existingSubTag);
|
|
58
|
+
}
|
|
59
|
+
if (ogTag) {
|
|
60
|
+
destroyTagMemory(existingTag, existingSubTag, subjectValue);
|
|
61
|
+
delete existingSubTag.tag;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
// now its a function
|
|
65
|
+
if (value instanceof Function) {
|
|
66
|
+
existingSubTag.set(bindSubjectCallback(value, tag));
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
// we have been given a subject
|
|
70
|
+
if (isSubjectInstance(value)) {
|
|
71
|
+
existingSubTag.set(value.value); // let ValueSubject now of newest value
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
existingSubTag.set(value); // let ValueSubject now of newest value
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
export function destroyTagMemory(existingTag, existingSubject, subjectValue) {
|
|
78
|
+
delete existingSubject.tag;
|
|
79
|
+
delete existingSubject.tagSupport;
|
|
80
|
+
delete subjectValue.tagSupport;
|
|
81
|
+
existingTag.destroy();
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=updateExistingValue.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateExistingValue.function.js","sourceRoot":"","sources":["../ts/updateExistingValue.function.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAEvE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAA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CAAC;IAED,+BAA+B;IAC/B,IAAG,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,cAAc,CAAC,GAAG,CAAG,KAAsB,CAAC,KAAK,CAAE,CAAA,CAAC,uCAAuC;QAC3F,OAAM;IACR,CAAC;IAED,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA,CAAC,uCAAuC;IAEjE,OAAM;AACR,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,WAAgB,EAChB,eAA2B,EAC3B,YAAiB;IAEjB,OAAO,eAAe,CAAC,GAAG,CAAA;IAC1B,OAAO,eAAe,CAAC,UAAU,CAAA;IACjC,OAAO,YAAY,CAAC,UAAU,CAAA;IAC9B,WAAW,CAAC,OAAO,EAAE,CAAA;AACvB,CAAC"}
|
package/js/updateTag.utils.d.ts
CHANGED
|
@@ -5,3 +5,4 @@ import { TemplaterResult } from "./templater.utils.js";
|
|
|
5
5
|
import { Tag } from "./Tag.class.js";
|
|
6
6
|
import { TagArraySubject } from "./processTagArray.js";
|
|
7
7
|
export declare function updateExistingValue(existing: Subject<Tag> | TemplaterResult | TagSubject | TagArraySubject, value: TemplaterResult | TagSupport | Function | Subject<any>, tag: Tag): void;
|
|
8
|
+
export declare function destroyTagMemory(existingTag: Tag, existingSubject: TagSubject, subjectValue: any): void;
|
package/js/updateTag.utils.js
CHANGED
|
@@ -1,83 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { deepClone } from "./deepFunctions.js";
|
|
3
|
-
import { isSubjectInstance, isTagComponent, isTagInstance } from "./isInstance.js";
|
|
1
|
+
import { isSubjectInstance, isTagArray, isTagComponent } from "./isInstance.js";
|
|
4
2
|
import { bindSubjectCallback } from "./bindSubjectCallback.function.js";
|
|
5
|
-
import {
|
|
3
|
+
import { processTag } from "./processSubjectValue.function.js";
|
|
6
4
|
import { processTagArray } from "./processTagArray.js";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
let existingTag = existingSubject.tag;
|
|
10
|
-
// previously was something else, now a tag component
|
|
11
|
-
if (!existingTag) {
|
|
12
|
-
setValueRedraw(tempResult, existingSubject, tag);
|
|
13
|
-
tempResult.redraw();
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
// tag existingTag
|
|
17
|
-
const oldWrapper = existingTag.tagSupport.templater.wrapper;
|
|
18
|
-
const newWrapper = tempResult.wrapper;
|
|
19
|
-
let isSameTag = false;
|
|
20
|
-
if (oldWrapper && newWrapper) {
|
|
21
|
-
const oldFunction = oldWrapper.original;
|
|
22
|
-
const newFunction = newWrapper.original;
|
|
23
|
-
isSameTag = oldFunction === newFunction;
|
|
24
|
-
}
|
|
25
|
-
const oldTagSetup = existingTag.tagSupport;
|
|
26
|
-
const oldProps = oldTagSetup.props;
|
|
27
|
-
oldTagSetup.latestProps = latestProps;
|
|
28
|
-
const oldClonedProps = oldTagSetup.latestClonedProps;
|
|
29
|
-
oldTagSetup.latestClonedProps = tempResult.tagSupport.clonedProps;
|
|
30
|
-
// oldTagSetup.latestClonedProps = tempResult.tagSupport.latestClonedProps
|
|
31
|
-
if (!isSameTag) {
|
|
32
|
-
// TODO: this may not be in use
|
|
33
|
-
destroyTagMemory(existingTag, existingSubject, subjectValue);
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
const subjectTagSupport = subjectValue?.tagSupport;
|
|
37
|
-
// old props may have changed, reclone first
|
|
38
|
-
let oldCloneProps = subjectTagSupport.props;
|
|
39
|
-
// if the new props are NOT HTML children, then clone the props for later render cycle comparing
|
|
40
|
-
if (!isTagInstance(subjectTagSupport.props)) {
|
|
41
|
-
oldCloneProps = deepClone(subjectTagSupport.props);
|
|
42
|
-
}
|
|
43
|
-
// const oldProps = subjectTagSupport?.props // tagSupport.props
|
|
44
|
-
if (existingTag) {
|
|
45
|
-
// const equal = oldTagSetup.hasPropChanges(oldProps, oldCloneProps, latestProps)
|
|
46
|
-
const equal = oldTagSetup.hasPropChanges(latestProps, oldClonedProps, oldProps);
|
|
47
|
-
// no changes detected so no need to continue to render
|
|
48
|
-
if (!equal) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
setValueRedraw(tempResult, existingSubject, tag);
|
|
54
|
-
oldTagSetup.templater = tempResult;
|
|
55
|
-
const redraw = tempResult.redraw();
|
|
56
|
-
existingSubject.value.tag = oldTagSetup.newest = redraw;
|
|
57
|
-
if (!isSameTag) {
|
|
58
|
-
existingSubject.tag = redraw;
|
|
59
|
-
subjectValue.tagSupport = tempResult.tagSupport;
|
|
60
|
-
}
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
function updateExistingTag(templater, ogTag, existingSubject) {
|
|
64
|
-
const tagSupport = ogTag.tagSupport;
|
|
65
|
-
const oldest = tagSupport.oldest;
|
|
66
|
-
oldest.beforeRedraw();
|
|
67
|
-
const retag = templater.wrapper();
|
|
68
|
-
// move my props onto tagSupport
|
|
69
|
-
tagSupport.latestProps = retag.tagSupport.props;
|
|
70
|
-
tagSupport.latestClonedProps = retag.tagSupport.clonedProps;
|
|
71
|
-
// tagSupport.latestClonedProps = retag.tagSupport.latestClonedProps
|
|
72
|
-
tagSupport.memory = retag.tagSupport.memory;
|
|
73
|
-
retag.setSupport(tagSupport);
|
|
74
|
-
templater.newest = retag;
|
|
75
|
-
tagSupport.newest = retag;
|
|
76
|
-
oldest.afterRender();
|
|
77
|
-
ogTag.updateByTag(retag);
|
|
78
|
-
existingSubject.set(templater);
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
5
|
+
import { updateExistingTagComponent } from "./updateExistingTagComponent.function.js";
|
|
6
|
+
import { updateExistingTag } from "./updateExistingTag.function.js";
|
|
81
7
|
export function updateExistingValue(existing, value, tag) {
|
|
82
8
|
const subjectValue = existing.value;
|
|
83
9
|
const ogTag = subjectValue?.tag;
|
|
@@ -148,7 +74,7 @@ export function updateExistingValue(existing, value, tag) {
|
|
|
148
74
|
existingSubTag.set(value); // let ValueSubject now of newest value
|
|
149
75
|
return;
|
|
150
76
|
}
|
|
151
|
-
function destroyTagMemory(existingTag, existingSubject, subjectValue) {
|
|
77
|
+
export function destroyTagMemory(existingTag, existingSubject, subjectValue) {
|
|
152
78
|
delete existingSubject.tag;
|
|
153
79
|
delete existingSubject.tagSupport;
|
|
154
80
|
delete subjectValue.tagSupport;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updateTag.utils.js","sourceRoot":"","sources":["../ts/updateTag.utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"updateTag.utils.js","sourceRoot":"","sources":["../ts/updateTag.utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAEvE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAC9D,OAAO,EAAmB,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAA;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAEnE,MAAM,UAAU,mBAAmB,CACjC,QAAuE,EACvE,KAA6D,EAC7D,GAAQ;IAER,MAAM,YAAY,GAAI,QAAyB,CAAC,KAAK,CAAA;IACrD,MAAM,KAAK,GAAQ,YAAY,EAAE,GAAG,CAAA;IACpC,MAAM,UAAU,GAAG,KAAuB,CAAA;IAC1C,MAAM,gBAAgB,GAAG,QAA2B,CAAA;IACpD,MAAM,cAAc,GAAG,QAAsB,CAAA;IAE7C,YAAY;IACZ,IAAI,QAAgB,CAAC,SAAS,EAAE,CAAC;QAC/B,wBAAwB;QACxB,IAAG,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YACrB,eAAe,CACb,QAA2B,EAC3B,KAAqB,EACrB,gBAAgB,CAAC,QAAQ,EACzB,GAAG,EACH,EAA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