uicore-ts 1.0.527 → 1.0.532

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.
@@ -1,5 +1,5 @@
1
1
  import { UIObject } from "./UIObject";
2
- export interface UIKeyValueStringSorterSortingInstruction {
2
+ export interface UIKeyValueSorterSortingInstruction {
3
3
  keyPath: string;
4
4
  dataType: string;
5
5
  direction: string;
@@ -32,8 +32,8 @@ export declare class UIKeyValueSorter extends UIObject {
32
32
  descending: string;
33
33
  ascending: string;
34
34
  };
35
- sortData<T>(data: T[], sortingInstructions: UIKeyValueStringSorterSortingInstruction[], identifier: any, completion: (sortedData: T[], sortedIndexes: number[], identifier: any) => void): void;
36
- sortedData<T>(data: T[], sortingInstructions: UIKeyValueStringSorterSortingInstruction[], identifier?: any): Promise<{
35
+ sortData<T>(data: T[], sortingInstructions: UIKeyValueSorterSortingInstruction[], identifier: any, completion: (sortedData: T[], sortedIndexes: number[], identifier: any) => void): void;
36
+ sortedData<T>(data: T[], sortingInstructions: UIKeyValueSorterSortingInstruction[], identifier?: any): Promise<{
37
37
  sortedData: T[];
38
38
  sortedIndexes: number[];
39
39
  identifier: any;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../scripts/UIKeyValueSorter.ts"],
4
- "sourcesContent": ["// @ts-ignore\nimport UIKeyValueSorterWebWorker from \"./UIKeyValueSorterWebWorker.worker\"\nimport { IS, IS_NOT, MAKE_ID, NO, UIObject, YES } from \"./UIObject\"\n\n\nexport interface UIKeyValueStringSorterSortingInstruction {\n \n keyPath: string;\n \n dataType: string;\n \n direction: string;\n \n \n}\n\n\nexport class UIKeyValueSorter extends UIObject {\n \n static _sharedWebWorkerHolder = {\n UICore_completionFunctions: {},\n UICore_isWorking: false,\n UICore_messagesToPost: undefined,\n webWorker: new UIKeyValueSorterWebWorker()\n }\n \n static _instanceNumber = -1\n \n _instanceNumber: number\n _isThreadClosed = NO\n \n private readonly _webWorkerHolder: {\n webWorker: any;\n UICore_isWorking: boolean\n UICore_messagesToPost: any\n UICore_completionFunctions: Record<string, (\n filteredData: string[],\n filteredIndexes: number[],\n identifier: any\n ) => void>\n } = UIKeyValueSorter._sharedWebWorkerHolder\n \n \n constructor(useSeparateWebWorkerHolder = NO) {\n \n super()\n \n if (useSeparateWebWorkerHolder) {\n \n this._webWorkerHolder = {\n webWorker: new UIKeyValueSorterWebWorker(),\n UICore_isWorking: false,\n UICore_messagesToPost: undefined,\n UICore_completionFunctions: {}\n }\n \n }\n \n UIKeyValueSorter._instanceNumber = UIKeyValueSorter._instanceNumber + 1\n this._instanceNumber = UIKeyValueSorter._instanceNumber\n \n if (IS_NOT(this._webWorkerHolder.webWorker.onmessage)) {\n \n this._webWorkerHolder.webWorker.onmessage = (message: { data: { identifier: string; instanceIdentifier: string; sortedData: any[]; sortedIndexes: number[]; }; }) => {\n \n this.isWorkerBusy = NO\n this.postNextMessageIfNeeded()\n \n const key = \"\" + message.data.identifier + message.data.instanceIdentifier\n \n const completionFunction = this.completionFunctions[key]\n \n if (IS(completionFunction)) {\n \n //console.log(\"Filtering took \" + (Date.now() - startTime) + \" ms\");\n \n completionFunction(message.data.sortedData, message.data.sortedIndexes, message.data.identifier)\n \n }\n \n delete this.completionFunctions[key]\n \n var asd = 1\n \n }\n \n }\n \n \n }\n \n \n get instanceIdentifier() {\n \n return this._instanceNumber\n \n }\n \n \n get completionFunctions() {\n \n const key = \"UICore_completionFunctions\"\n var result: {\n \n [x: string]: (sortedData: any[], sortedIndexes: number[], identifier: any) => void\n \n } = this._webWorkerHolder[key]\n \n if (IS_NOT(result)) {\n \n result = {}\n this._webWorkerHolder[key] = result\n \n }\n \n return result\n \n }\n \n get messagesToPost() {\n \n const key = \"UICore_messagesToPost\"\n var result: any[] = this._webWorkerHolder[key]\n \n if (IS_NOT(result)) {\n \n result = []\n this._webWorkerHolder[key] = result\n \n }\n \n return result\n \n }\n \n \n set isWorkerBusy(isWorkerBusy: boolean) {\n \n this._webWorkerHolder[\"UICore_isWorking\"] = isWorkerBusy\n \n }\n \n get isWorkerBusy() {\n \n return IS(this._webWorkerHolder[\"UICore_isWorking\"])\n \n }\n \n \n postNextMessageIfNeeded() {\n \n if (this.messagesToPost.length && IS_NOT(this.isWorkerBusy)) {\n \n this._webWorkerHolder.webWorker.postMessage(this.messagesToPost.firstElement)\n this.messagesToPost.removeElementAtIndex(0)\n \n this.isWorkerBusy = YES\n \n }\n \n }\n \n \n static dataType = {\n \n \"string\": \"string\",\n \"number\": \"number\"\n \n }\n \n \n static direction = {\n \n \"descending\": \"descending\",\n \"ascending\": \"ascending\"\n \n }\n \n \n sortData<T>(\n data: T[],\n sortingInstructions: UIKeyValueStringSorterSortingInstruction[],\n identifier: any,\n completion: (sortedData: T[], sortedIndexes: number[], identifier: any) => void\n ) {\n \n \n if (this._isThreadClosed) {\n \n return\n \n }\n \n \n const instanceIdentifier = this.instanceIdentifier\n \n const key = \"\" + identifier + instanceIdentifier\n \n this.completionFunctions[key] = completion\n \n \n try {\n \n this.messagesToPost.push({\n \n \"data\": data,\n \"sortingInstructions\": sortingInstructions,\n \"identifier\": identifier,\n \"instanceIdentifier\": instanceIdentifier\n \n })\n \n this.postNextMessageIfNeeded()\n \n } catch (exception) {\n \n completion([], [], identifier)\n \n }\n \n \n }\n \n \n sortedData<T>(\n data: T[],\n sortingInstructions: UIKeyValueStringSorterSortingInstruction[],\n identifier: any = MAKE_ID()\n ) {\n \n const result: Promise<{\n \n sortedData: T[],\n sortedIndexes: number[],\n identifier: any\n \n }> = new Promise((resolve, reject) => {\n \n this.sortData(data, sortingInstructions, identifier, (sortedData, sortedIndexes, sortedIdentifier) => {\n \n if (sortedIdentifier == identifier) {\n \n resolve({\n \n sortedData: sortedData,\n sortedIndexes: sortedIndexes,\n identifier: sortedIdentifier\n \n })\n \n }\n \n \n })\n \n \n })\n \n return result\n \n }\n \n \n closeThread() {\n \n this._isThreadClosed = YES\n \n if (this._webWorkerHolder != UIKeyValueSorter._sharedWebWorkerHolder) {\n \n this._webWorkerHolder.webWorker.terminate()\n \n }\n \n \n }\n \n \n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],
4
+ "sourcesContent": ["// @ts-ignore\nimport UIKeyValueSorterWebWorker from \"./UIKeyValueSorterWebWorker.worker\"\nimport { IS, IS_NOT, MAKE_ID, NO, UIObject, YES } from \"./UIObject\"\n\n\nexport interface UIKeyValueSorterSortingInstruction {\n \n keyPath: string;\n \n dataType: string;\n \n direction: string;\n \n \n}\n\n\nexport class UIKeyValueSorter extends UIObject {\n \n static _sharedWebWorkerHolder = {\n UICore_completionFunctions: {},\n UICore_isWorking: false,\n UICore_messagesToPost: undefined,\n webWorker: new UIKeyValueSorterWebWorker()\n }\n \n static _instanceNumber = -1\n \n _instanceNumber: number\n _isThreadClosed = NO\n \n private readonly _webWorkerHolder: {\n webWorker: any;\n UICore_isWorking: boolean\n UICore_messagesToPost: any\n UICore_completionFunctions: Record<string, (\n filteredData: string[],\n filteredIndexes: number[],\n identifier: any\n ) => void>\n } = UIKeyValueSorter._sharedWebWorkerHolder\n \n \n constructor(useSeparateWebWorkerHolder = NO) {\n \n super()\n \n if (useSeparateWebWorkerHolder) {\n \n this._webWorkerHolder = {\n webWorker: new UIKeyValueSorterWebWorker(),\n UICore_isWorking: false,\n UICore_messagesToPost: undefined,\n UICore_completionFunctions: {}\n }\n \n }\n \n UIKeyValueSorter._instanceNumber = UIKeyValueSorter._instanceNumber + 1\n this._instanceNumber = UIKeyValueSorter._instanceNumber\n \n if (IS_NOT(this._webWorkerHolder.webWorker.onmessage)) {\n \n this._webWorkerHolder.webWorker.onmessage = (message: { data: { identifier: string; instanceIdentifier: string; sortedData: any[]; sortedIndexes: number[]; }; }) => {\n \n this.isWorkerBusy = NO\n this.postNextMessageIfNeeded()\n \n const key = \"\" + message.data.identifier + message.data.instanceIdentifier\n \n const completionFunction = this.completionFunctions[key]\n \n if (IS(completionFunction)) {\n \n //console.log(\"Filtering took \" + (Date.now() - startTime) + \" ms\");\n \n completionFunction(message.data.sortedData, message.data.sortedIndexes, message.data.identifier)\n \n }\n \n delete this.completionFunctions[key]\n \n var asd = 1\n \n }\n \n }\n \n \n }\n \n \n get instanceIdentifier() {\n \n return this._instanceNumber\n \n }\n \n \n get completionFunctions() {\n \n const key = \"UICore_completionFunctions\"\n var result: {\n \n [x: string]: (sortedData: any[], sortedIndexes: number[], identifier: any) => void\n \n } = this._webWorkerHolder[key]\n \n if (IS_NOT(result)) {\n \n result = {}\n this._webWorkerHolder[key] = result\n \n }\n \n return result\n \n }\n \n get messagesToPost() {\n \n const key = \"UICore_messagesToPost\"\n var result: any[] = this._webWorkerHolder[key]\n \n if (IS_NOT(result)) {\n \n result = []\n this._webWorkerHolder[key] = result\n \n }\n \n return result\n \n }\n \n \n set isWorkerBusy(isWorkerBusy: boolean) {\n \n this._webWorkerHolder[\"UICore_isWorking\"] = isWorkerBusy\n \n }\n \n get isWorkerBusy() {\n \n return IS(this._webWorkerHolder[\"UICore_isWorking\"])\n \n }\n \n \n postNextMessageIfNeeded() {\n \n if (this.messagesToPost.length && IS_NOT(this.isWorkerBusy)) {\n \n this._webWorkerHolder.webWorker.postMessage(this.messagesToPost.firstElement)\n this.messagesToPost.removeElementAtIndex(0)\n \n this.isWorkerBusy = YES\n \n }\n \n }\n \n \n static dataType = {\n \n \"string\": \"string\",\n \"number\": \"number\"\n \n }\n \n \n static direction = {\n \n \"descending\": \"descending\",\n \"ascending\": \"ascending\"\n \n }\n \n \n sortData<T>(\n data: T[],\n sortingInstructions: UIKeyValueSorterSortingInstruction[],\n identifier: any,\n completion: (sortedData: T[], sortedIndexes: number[], identifier: any) => void\n ) {\n \n \n if (this._isThreadClosed) {\n \n return\n \n }\n \n \n const instanceIdentifier = this.instanceIdentifier\n \n const key = \"\" + identifier + instanceIdentifier\n \n this.completionFunctions[key] = completion\n \n \n try {\n \n this.messagesToPost.push({\n \n \"data\": data,\n \"sortingInstructions\": sortingInstructions,\n \"identifier\": identifier,\n \"instanceIdentifier\": instanceIdentifier\n \n })\n \n this.postNextMessageIfNeeded()\n \n } catch (exception) {\n \n completion([], [], identifier)\n \n }\n \n \n }\n \n \n sortedData<T>(\n data: T[],\n sortingInstructions: UIKeyValueSorterSortingInstruction[],\n identifier: any = MAKE_ID()\n ) {\n \n const result: Promise<{\n \n sortedData: T[],\n sortedIndexes: number[],\n identifier: any\n \n }> = new Promise((resolve, reject) => {\n \n this.sortData(data, sortingInstructions, identifier, (sortedData, sortedIndexes, sortedIdentifier) => {\n \n if (sortedIdentifier == identifier) {\n \n resolve({\n \n sortedData: sortedData,\n sortedIndexes: sortedIndexes,\n identifier: sortedIdentifier\n \n })\n \n }\n \n \n })\n \n \n })\n \n return result\n \n }\n \n \n closeThread() {\n \n this._isThreadClosed = YES\n \n if (this._webWorkerHolder != UIKeyValueSorter._sharedWebWorkerHolder) {\n \n this._webWorkerHolder.webWorker.terminate()\n \n }\n \n \n }\n \n \n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uCAAsC;AACtC,sBAAuD;AAehD,MAAM,oBAAN,cAA+B,yBAAS;AAAA,EA0B3C,YAAY,6BAA6B,oBAAI;AAEzC,UAAM;AAhBV,2BAAkB;AAElB,SAAiB,mBASb,kBAAiB;AAOjB,QAAI,4BAA4B;AAE5B,WAAK,mBAAmB;AAAA,QACpB,WAAW,IAAI,iCAAAA,QAA0B;AAAA,QACzC,kBAAkB;AAAA,QAClB,uBAAuB;AAAA,QACvB,4BAA4B,CAAC;AAAA,MACjC;AAAA,IAEJ;AAEA,sBAAiB,kBAAkB,kBAAiB,kBAAkB;AACtE,SAAK,kBAAkB,kBAAiB;AAExC,YAA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ValueSorterWebWorker"]
7
7
  }
@@ -1,3 +1,4 @@
1
+ import { ValueOf } from "./UIObject";
1
2
  import { UIViewController } from "./UIViewController";
2
3
  export type PropType<TObj, TProp extends keyof TObj> = TObj[TProp];
3
4
  export type UIRouteParameters<T = any> = {
@@ -23,7 +24,7 @@ export declare class UIRoute extends Array<UIRouteComponent> {
23
24
  routeWithComponent(name: string, parameters: UIRouteParameters, extendParameters?: boolean): UIRoute;
24
25
  navigateBySettingComponent(name: string, parameters: UIRouteParameters, extendParameters?: boolean): void;
25
26
  componentWithViewController<T extends typeof UIViewController>(viewController: T): UIRouteComponent<{
26
- [P in keyof T["ParameterIdentifierName"]]: string;
27
+ [P in ValueOf<T["ParameterIdentifierName"]>]: string;
27
28
  }> | undefined;
28
29
  componentWithName(name: string): UIRouteComponent | undefined;
29
30
  get linkRepresentation(): string;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../scripts/UIRoute.ts"],
4
- "sourcesContent": ["import { IS_NIL, IS_NOT, NO } from \"./UIObject\"\nimport { UIViewController } from \"./UIViewController\"\n\n\nexport type PropType<TObj, TProp extends keyof TObj> = TObj[TProp];\n\nexport type UIRouteParameters<T = any> = {\n \n [key: string]: string;\n \n} | T;\n\n\nexport interface UIRouteComponent<T = any> {\n \n name: string;\n parameters: UIRouteParameters<T>;\n \n}\n\n\nexport class UIRoute extends Array<UIRouteComponent> {\n \n constructor(hash?: string) {\n \n super()\n \n if (!hash || !hash.startsWith) {\n \n return\n \n }\n \n if (hash.startsWith(\"#\")) {\n hash = hash.slice(1)\n }\n \n hash = decodeURIComponent(hash)\n \n const components = hash.split(\"]\")\n components.forEach(component => {\n \n const componentName = component.split(\"[\")[0]\n const parameters: Record<string, string> = {}\n \n if (!componentName) {\n return\n }\n \n const parametersString = component.split(\"[\")[1] || \"\"\n const parameterPairStrings = parametersString.split(\",\") || []\n \n parameterPairStrings.forEach(pairString => {\n \n const keyAndValueArray = pairString.split(\":\")\n const key = decodeURIComponent(keyAndValueArray[0])\n const value = decodeURIComponent(keyAndValueArray[1])\n \n if (key) {\n parameters[key] = value\n }\n \n })\n \n \n this.push({\n name: componentName,\n parameters: parameters\n })\n \n })\n \n \n }\n \n \n static get currentRoute() {\n \n return new UIRoute(window.location.hash)\n \n }\n \n \n \n \n \n apply() {\n \n window.location.hash = this.stringRepresentation\n \n }\n \n \n applyByReplacingCurrentRouteInHistory() {\n \n window.location.replace(this.linkRepresentation)\n \n }\n \n \n \n override copy() {\n var result = new UIRoute()\n result = Object.assign(result, this)\n return result\n }\n \n \n routeByRemovingComponentsOtherThanOnesNamed(componentNames: string[]) {\n const result = this.copy()\n const indexesToRemove: number[] = []\n result.forEach(function (component, index, array) {\n if (!componentNames.contains(component.name)) {\n indexesToRemove.push(index)\n }\n })\n indexesToRemove.forEach(function (indexToRemove, index, array) {\n result.removeElementAtIndex(indexToRemove)\n })\n return result\n }\n \n \n routeByRemovingComponentNamed(componentName: string) {\n const result = this.copy()\n const componentIndex = result.findIndex(function (component, index) {\n return (component.name == componentName)\n })\n if (componentIndex != -1) {\n result.splice(componentIndex, 1)\n }\n return result\n }\n \n \n routeByRemovingParameterInComponent(componentName: string, parameterName: string, removeComponentIfEmpty = NO) {\n let result = this.copy()\n let parameters = result.componentWithName(componentName)?.parameters ?? {}\n delete parameters[parameterName]\n result = result.routeWithComponent(componentName, parameters)\n if (removeComponentIfEmpty && Object.keys(parameters).length == 0) {\n result = result.routeByRemovingComponentNamed(componentName)\n }\n return result\n }\n \n routeBySettingParameterInComponent(componentName: string, parameterName: string, valueToSet: string) {\n let result = this.copy()\n if (IS_NIL(valueToSet) || IS_NIL(parameterName)) {\n return result\n }\n let parameters = result.componentWithName(componentName)?.parameters\n if (IS_NOT(parameters)) {\n parameters = {}\n }\n parameters[parameterName] = valueToSet\n result = result.routeWithComponent(componentName, parameters)\n return result\n }\n \n \n routeWithViewControllerComponent<T extends typeof UIViewController>(\n viewController: T,\n parameters: UIRouteParameters<{ [P in keyof T[\"ParameterIdentifierName\"]]: string }>,\n extendParameters: boolean = NO\n ) {\n \n return this.routeWithComponent(viewController.routeComponentName, parameters, extendParameters)\n \n }\n \n routeWithComponent(name: string, parameters: UIRouteParameters, extendParameters: boolean = NO) {\n \n const result = this.copy()\n let component = result.componentWithName(name)\n if (IS_NOT(component)) {\n component = {\n name: name,\n parameters: {}\n }\n result.push(component)\n }\n \n if (IS_NOT(parameters)) {\n \n parameters = {}\n \n }\n \n if (extendParameters) {\n component.parameters = Object.assign(component.parameters, parameters)\n }\n else {\n component.parameters = parameters\n }\n \n return result\n \n }\n \n navigateBySettingComponent(name: string, parameters: UIRouteParameters, extendParameters: boolean = NO) {\n \n this.routeWithComponent(name, parameters, extendParameters).apply()\n \n }\n \n \n componentWithViewController<T extends typeof UIViewController>(viewController: T): UIRouteComponent<{ [P in keyof T[\"ParameterIdentifierName\"]]: string }> | undefined {\n \n return this.componentWithName(viewController.routeComponentName)\n \n }\n \n componentWithName(name: string): UIRouteComponent | undefined {\n let result\n this.forEach(function (component, index, self) {\n if (component.name == name) {\n result = component\n }\n })\n return result\n }\n \n \n get linkRepresentation() {\n return \"#\" + this.stringRepresentation\n }\n \n \n get stringRepresentation() {\n \n let result = \"\"\n this.forEach(function (component, index, self) {\n result = result + component.name\n const parameters = component.parameters\n result = result + \"[\"\n Object.keys(parameters).forEach(function (key, index, keys) {\n if (index) {\n result = result + \",\"\n }\n result = result + encodeURIComponent(key) + \":\" + encodeURIComponent(parameters[key])\n })\n result = result + \"]\"\n })\n \n return result\n \n }\n \n \n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAmC;AAqB5B,MAAM,gBAAgB,MAAwB;AAAA,EAEjD,YAAY,MAAe;AAEvB,UAA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mBAAmB,GAAG,IAAI,MAAM,mBAAmB,WAAW,IAAI;AAAA,MACxF,CAAC;AACD,eAAS,SAAS;AAAA,IACtB,CAAC;AAED,WAAO;AAAA,EAEX;AAGJ;",
4
+ "sourcesContent": ["import { IS_NIL, IS_NOT, NO, ValueOf } from \"./UIObject\"\nimport { UIViewController } from \"./UIViewController\"\n\n\nexport type PropType<TObj, TProp extends keyof TObj> = TObj[TProp];\n\nexport type UIRouteParameters<T = any> = {\n \n [key: string]: string;\n \n} | T;\n\n\nexport interface UIRouteComponent<T = any> {\n \n name: string;\n parameters: UIRouteParameters<T>;\n \n}\n\n\nexport class UIRoute extends Array<UIRouteComponent> {\n \n constructor(hash?: string) {\n \n super()\n \n if (!hash || !hash.startsWith) {\n \n return\n \n }\n \n if (hash.startsWith(\"#\")) {\n hash = hash.slice(1)\n }\n \n hash = decodeURIComponent(hash)\n \n const components = hash.split(\"]\")\n components.forEach(component => {\n \n const componentName = component.split(\"[\")[0]\n const parameters: Record<string, string> = {}\n \n if (!componentName) {\n return\n }\n \n const parametersString = component.split(\"[\")[1] || \"\"\n const parameterPairStrings = parametersString.split(\",\") || []\n \n parameterPairStrings.forEach(pairString => {\n \n const keyAndValueArray = pairString.split(\":\")\n const key = decodeURIComponent(keyAndValueArray[0])\n const value = decodeURIComponent(keyAndValueArray[1])\n \n if (key) {\n parameters[key] = value\n }\n \n })\n \n \n this.push({\n name: componentName,\n parameters: parameters\n })\n \n })\n \n \n }\n \n \n static get currentRoute() {\n \n return new UIRoute(window.location.hash)\n \n }\n \n \n \n \n \n apply() {\n \n window.location.hash = this.stringRepresentation\n \n }\n \n \n applyByReplacingCurrentRouteInHistory() {\n \n window.location.replace(this.linkRepresentation)\n \n }\n \n \n \n override copy() {\n var result = new UIRoute()\n result = Object.assign(result, this)\n return result\n }\n \n \n routeByRemovingComponentsOtherThanOnesNamed(componentNames: string[]) {\n const result = this.copy()\n const indexesToRemove: number[] = []\n result.forEach(function (component, index, array) {\n if (!componentNames.contains(component.name)) {\n indexesToRemove.push(index)\n }\n })\n indexesToRemove.forEach(function (indexToRemove, index, array) {\n result.removeElementAtIndex(indexToRemove)\n })\n return result\n }\n \n \n routeByRemovingComponentNamed(componentName: string) {\n const result = this.copy()\n const componentIndex = result.findIndex(function (component, index) {\n return (component.name == componentName)\n })\n if (componentIndex != -1) {\n result.splice(componentIndex, 1)\n }\n return result\n }\n \n \n routeByRemovingParameterInComponent(componentName: string, parameterName: string, removeComponentIfEmpty = NO) {\n let result = this.copy()\n let parameters = result.componentWithName(componentName)?.parameters ?? {}\n delete parameters[parameterName]\n result = result.routeWithComponent(componentName, parameters)\n if (removeComponentIfEmpty && Object.keys(parameters).length == 0) {\n result = result.routeByRemovingComponentNamed(componentName)\n }\n return result\n }\n \n routeBySettingParameterInComponent(componentName: string, parameterName: string, valueToSet: string) {\n let result = this.copy()\n if (IS_NIL(valueToSet) || IS_NIL(parameterName)) {\n return result\n }\n let parameters = result.componentWithName(componentName)?.parameters\n if (IS_NOT(parameters)) {\n parameters = {}\n }\n parameters[parameterName] = valueToSet\n result = result.routeWithComponent(componentName, parameters)\n return result\n }\n \n \n routeWithViewControllerComponent<T extends typeof UIViewController>(\n viewController: T,\n parameters: UIRouteParameters<{ [P in keyof T[\"ParameterIdentifierName\"]]: string }>,\n extendParameters: boolean = NO\n ) {\n \n return this.routeWithComponent(viewController.routeComponentName, parameters, extendParameters)\n \n }\n \n routeWithComponent(name: string, parameters: UIRouteParameters, extendParameters: boolean = NO) {\n \n const result = this.copy()\n let component = result.componentWithName(name)\n if (IS_NOT(component)) {\n component = {\n name: name,\n parameters: {}\n }\n result.push(component)\n }\n \n if (IS_NOT(parameters)) {\n \n parameters = {}\n \n }\n \n if (extendParameters) {\n component.parameters = Object.assign(component.parameters, parameters)\n }\n else {\n component.parameters = parameters\n }\n \n return result\n \n }\n \n navigateBySettingComponent(name: string, parameters: UIRouteParameters, extendParameters: boolean = NO) {\n \n this.routeWithComponent(name, parameters, extendParameters).apply()\n \n }\n \n \n componentWithViewController<T extends typeof UIViewController>(viewController: T): UIRouteComponent<{ [P in ValueOf<T[\"ParameterIdentifierName\"]>]: string }> | undefined {\n \n return this.componentWithName(viewController.routeComponentName)\n \n }\n \n componentWithName(name: string): UIRouteComponent | undefined {\n let result\n this.forEach(function (component, index, self) {\n if (component.name == name) {\n result = component\n }\n })\n return result\n }\n \n \n get linkRepresentation() {\n return \"#\" + this.stringRepresentation\n }\n \n \n get stringRepresentation() {\n \n let result = \"\"\n this.forEach(function (component, index, self) {\n result = result + component.name\n const parameters = component.parameters\n result = result + \"[\"\n Object.keys(parameters).forEach(function (key, index, keys) {\n if (index) {\n result = result + \",\"\n }\n result = result + encodeURIComponent(key) + \":\" + encodeURIComponent(parameters[key])\n })\n result = result + \"]\"\n })\n \n return result\n \n }\n \n \n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA4C;AAqBrC,MAAM,gBAAgB,MAAwB;AAAA,EAEjD,YAAY,MAAe;AAEvB,UAAM;AAEN,QAAI,CAAC,QAAQ,CAAC,KAAK,YAAY;AAE3B;AAAA,IAEJ;AAEA,QAAI,KAAK,WAAW,GAAG,GAAG;AACtB,aAAO,KAAK,MAAM,CAAC;AAAA,IACvB;AAEA,WAAO,mBAAmB,IAAI;AAE9B,UAAM,aAAa,KAAK,MAAM,GAAG;AACjC,eAAW,QAAQ,eAAa;AAE5B,YAAM,gBAAgB,UAAU,MAAM,GAAG,EAAE;AAC3C,YAAM,aAAqC,CAAC;AAE5C,UAAI,CAAC,eAAe;AAChB;AAAA,MACJ;AAEA,YAAM,mBAAmB,UAAU,MAAM,GAAG,EAAE,MAAM;AACpD,YAAM,uBAAuB,iBAAiB,MAAM,GAAG,KAAK,CAAC;AAE7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aAAa;AAAA,IAC3B;AAEA,WAAO;AAAA,EAEX;AAAA,EAEA,2BAA2B,MAAc,YAA+B,mBAA4B,oBAAI;AAEpG,SAAK,mBAAmB,MAAM,YAAY,gBAAgB,EAAE,MAAM;AAAA,EAEtE;AAAA,EAGA,4BAA+D,gBAA2G;AAEtK,WAAO,KAAK,kBAAkB,eAAe,kBAAkB;AAAA,EAEnE;AAAA,EAEA,kBAAkB,MAA4C;AAC1D,QAAI;AACJ,SAAK,QAAQ,SAAU,WAAW,OAAO,MAAM;AAC3C,UAAI,UAAU,QAAQ,MAAM;AACxB,iBAAS;AAAA,MACb;AAAA,IACJ,CAAC;AACD,WAAO;AAAA,EACX;AAAA,EAGA,IAAI,qBAAqB;AACrB,WAAO,MAAM,KAAK;AAAA,EACtB;AAAA,EAGA,IAAI,uBAAuB;AAEvB,QAAI,SAAS;AACb,SAAK,QAAQ,SAAU,WAAW,OAAO,MAAM;AAC3C,eAAS,SAAS,UAAU;AAC5B,YAAM,aAAa,UAAU;AAC7B,eAAS,SAAS;AAClB,aAAO,KAAK,UAAU,EAAE,QAAQ,SAAU,KAAKA,QAAO,MAAM;AACxD,YAAIA,QAAO;AACP,mBAAS,SAAS;AAAA,QACtB;AACA,iBAAS,SAAS,mBAAmB,GAAG,IAAI,MAAM,mBAAmB,WAAW,IAAI;AAAA,MACxF,CAAC;AACD,eAAS,SAAS;AAAA,IACtB,CAAC;AAED,WAAO;AAAA,EAEX;AAGJ;",
6
6
  "names": ["index"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uicore-ts",
3
- "version": "1.0.527",
3
+ "version": "1.0.532",
4
4
  "description": "UICore is a library to build native-like user interfaces using pure Typescript. No HTML is needed at all. Components are described as TS classes and all user interactions are handled explicitly. This library is strongly inspired by the UIKit framework that is used in IOS. In addition, UICore has tools to handle URL based routing, array sorting and filtering and adds a number of other utilities for convenience.",
5
5
  "main": "compiledScripts/index.js",
6
6
  "types": "compiledScripts/index.d.ts",
@@ -3,7 +3,7 @@ import UIKeyValueSorterWebWorker from "./UIKeyValueSorterWebWorker.worker"
3
3
  import { IS, IS_NOT, MAKE_ID, NO, UIObject, YES } from "./UIObject"
4
4
 
5
5
 
6
- export interface UIKeyValueStringSorterSortingInstruction {
6
+ export interface UIKeyValueSorterSortingInstruction {
7
7
 
8
8
  keyPath: string;
9
9
 
@@ -179,7 +179,7 @@ export class UIKeyValueSorter extends UIObject {
179
179
 
180
180
  sortData<T>(
181
181
  data: T[],
182
- sortingInstructions: UIKeyValueStringSorterSortingInstruction[],
182
+ sortingInstructions: UIKeyValueSorterSortingInstruction[],
183
183
  identifier: any,
184
184
  completion: (sortedData: T[], sortedIndexes: number[], identifier: any) => void
185
185
  ) {
@@ -224,7 +224,7 @@ export class UIKeyValueSorter extends UIObject {
224
224
 
225
225
  sortedData<T>(
226
226
  data: T[],
227
- sortingInstructions: UIKeyValueStringSorterSortingInstruction[],
227
+ sortingInstructions: UIKeyValueSorterSortingInstruction[],
228
228
  identifier: any = MAKE_ID()
229
229
  ) {
230
230
 
@@ -1,4 +1,4 @@
1
- import { IS_NIL, IS_NOT, NO } from "./UIObject"
1
+ import { IS_NIL, IS_NOT, NO, ValueOf } from "./UIObject"
2
2
  import { UIViewController } from "./UIViewController"
3
3
 
4
4
 
@@ -205,7 +205,7 @@ export class UIRoute extends Array<UIRouteComponent> {
205
205
  }
206
206
 
207
207
 
208
- componentWithViewController<T extends typeof UIViewController>(viewController: T): UIRouteComponent<{ [P in keyof T["ParameterIdentifierName"]]: string }> | undefined {
208
+ componentWithViewController<T extends typeof UIViewController>(viewController: T): UIRouteComponent<{ [P in ValueOf<T["ParameterIdentifierName"]>]: string }> | undefined {
209
209
 
210
210
  return this.componentWithName(viewController.routeComponentName)
211
211