@typescript-package/descriptor-chain
Version:
A lightweight TypeScript library for property descriptor chain.
1 lines • 22.1 kB
Source Map (JSON)
{"version":3,"file":"typescript-package-descriptor-chain.mjs","sources":["../../../package/descriptor-chain/src/lib/descriptor-chain-core.abstract.ts","../../../package/descriptor-chain/src/lib/descriptor-chain-base.abstract.ts","../../../package/descriptor-chain/src/lib/descriptor-chain.class.ts","../../../package/descriptor-chain/src/public-api.ts","../../../package/descriptor-chain/src/typescript-package-descriptor-chain.ts"],"sourcesContent":["// Type.\nimport { PropertyDescriptorChain, WrappedPropertyDescriptor } from \"@typedly/descriptor\";\n/**\n * @description The core abstract class for descriptor chains to store related property descriptors.\n * @export\n * @abstract\n * @class DescriptorChainCore\n * @template [O=any] The type of the object that the property descriptors are associated with.\n * @template {keyof O} [K=keyof O] The type of the property name in the object.\n * @template {K extends keyof O ? O[K] : any} [V=K extends keyof O ? O[K] : any] The value type of the property in the object.\n * @template {boolean} [A=boolean] The type of the active state of the descriptor.\n * @template {boolean} [N=boolean] The enabled state of the descriptor.\n * @template {boolean} [C=boolean] The configurable state of the descriptor. \n * @template {boolean} [E=boolean] The enumerable state of the descriptor.\n * @template {WrappedPropertyDescriptor<O, K, V, A, N, C, E, D>} [D=WrappedPropertyDescriptor<O, K, V, A, N, C, E, any>] The wrapped property descriptor type.\n * @implements {PropertyDescriptorChain<O, K, V, A, N, C, E, D>}\n */\nexport abstract class DescriptorChainCore<\n // Object.\n O = any,\n // Key.\n K extends keyof O = keyof O,\n // Value.\n V extends K extends keyof O ? O[K] : any = K extends keyof O ? O[K] : any,\n // Active.\n A extends boolean = boolean,\n // Enabled.\n N extends boolean = boolean,\n // Configurable.\n C extends boolean = boolean,\n // Enumerable.\n E extends boolean = boolean,\n // Descriptor\n D extends WrappedPropertyDescriptor<O, K, V, A, N, C, E, D> = WrappedPropertyDescriptor<O, K, V, A, N, C, E, any>,\n> implements PropertyDescriptorChain<O, K, V, A, N, C, E, D> {\n //#region Getter\n /**\n * @description The active state of the descriptor chain.\n * @abstract\n * @readonly\n * @type {A}\n */\n abstract get active(): A;\n\n /**\n * @description The current descriptor that is being used by the property.\n * @abstract\n * @readonly\n * @type {D}\n */\n abstract get current(): D;\n\n /**\n * @description\n * @protected\n * @abstract\n * @readonly\n * @type {new (object: O, key: K, attributes: WrappedPropertyDescriptor<O, K, V, A, N, C, E, D>) => D}\n */\n protected abstract get descriptor(): new (object: O, key: K, attributes: WrappedPropertyDescriptor<O, K, V, A, N, C, E, D>) => D;\n\n /**\n * @description The current index of the descriptor chain to use by the property.\n * @readonly\n * @type {number}\n */\n abstract get currentIndex(): number;\n\n /**\n * @description\n * @protected\n * @abstract\n\n * @readonly\n * @type {D[]}\n */\n protected abstract get data(): D[];\n\n /**\n * @description The enabled state of the descriptor chain.\n * @abstract\n * @readonly\n * @type {N}\n */\n abstract get enabled(): N;\n\n /**\n * @description The key of the descriptor chain.\n * @abstract\n * @readonly\n * @type {K}\n */\n abstract get key(): K;\n\n /**\n * @description The last index of the descriptor chain.\n * @abstract\n * @readonly\n * @type {number}\n */\n abstract get lastIndex(): number;\n\n /**\n * @description The next descriptor in the chain.\n * @abstract\n * @readonly\n * @type {(D | undefined)}\n */\n abstract get next(): D | undefined;\n\n /**\n * @description The index of the next descriptor.\n * @abstract\n * @readonly\n * @type {(number | undefined)}\n */\n abstract get nextIndex(): number | undefined; \n\n /**\n * @description The object of the descriptor chain.\n * @abstract\n * @readonly\n * @type {O}\n */\n abstract get object(): O;\n\n /**\n * @description The previous descriptor in the chain.\n * @abstract\n * @readonly\n * @type {(D | undefined)}\n */\n abstract get previous(): D | undefined;\n\n /**\n * @description The index of the previous descriptor.\n * @abstract\n * @readonly\n * @type {(number | undefined)}\n */\n abstract get previousIndex(): number | undefined;\n\n /**\n * @description The size of the descriptor chain.\n * @abstract\n * @readonly\n * @type {number}\n */\n abstract get size(): number;\n //#endregion Getter\n\n //#region Method\n /**\n * @description Activates the descriptor chain.\n * @public\n * @returns {this} The instance of the descriptor chain.\n */\n abstract activate(): this;\n\n /**\n * @description Adds a new descriptor to the chain.\n * @abstract\n * @param {Partial<WrappedPropertyDescriptor<O, K, V, A, N, C, E, D>>} descriptor The descriptor to add.\n * @returns {this} The instance of the descriptor chain for method chaining.\n */\n abstract add(descriptor: Partial<WrappedPropertyDescriptor<O, K, V, A, N, C, E, D>>): this;\n\n /**\n * @description Clear the descriptor chain.\n * @abstract\n * @returns {this} The instance of the descriptor chain for method chaining.\n */\n abstract clear(): this;\n\n /**\n * @description Deactivates the descriptor chain.\n * @public\n * @returns {this} The instance of the descriptor chain.\n */\n abstract deactivate(): this;\n\n /**\n * @description Deletes a descriptor from the chain at the specified index.\n * @abstract\n * @param {number} index The index of the descriptor to delete.\n * @returns {this} The instance of the descriptor chain for method chaining.\n */\n abstract delete(index: number): this;\n\n /**\n * @description Disables the chain.\n * @abstract\n * @returns {this} The instance of the descriptor chain for method chaining.\n */\n abstract disable(): this;\n\n /**\n * @description Enables the chain.\n * @abstract\n * @returns {this} The instance of the descriptor chain for method chaining.\n */\n abstract enable(): this;\n\n /**\n * @description Returns an iterable iterator of the entries in the descriptor chain.\n * @abstract\n * @returns {IterableIterator<[number, D]>} \n */\n abstract entries(): IterableIterator<[number, D]>;\n\n /**\n * @description Returns the first descriptor in the chain.\n * @abstract\n * @returns {D} \n */\n abstract first(): D;\n\n /**\n * @description Returns the descriptor at the specified index.\n * @abstract\n * @param {number} index The index of the descriptor to retrieve.\n * @returns {D} The descriptor at the specified index.\n */\n abstract get(index: number): D;\n\n /**\n * @description Checks if a descriptor exists at the specified index.\n * @abstract\n * @param {number} index The index to check.\n * @returns {boolean} \n */\n abstract has(index: number): boolean;\n\n /**\n * @description Returns the last descriptor in the chain.\n * @abstract\n * @returns {D} \n */\n abstract last(): D;\n\n /**\n * @description Loads the descriptor chain.\n * @abstract\n * @returns {this} The instance of the descriptor chain for method chaining.\n */\n abstract load(): this;\n\n /**\n * @description Sets the descriptor at the specified index with a new value.\n * @abstract\n * @param {number} index The index at which to set the descriptor.\n * @param {D} value The new descriptor value to set. \n * @returns {this} The instance of the descriptor chain for method chaining.\n */\n abstract set(index: number, value: D): this;\n\n /**\n * @description Sets the current index of the descriptor chain.\n * @abstract\n * @param {number} index The index to set as the current index.\n * @returns {this} The instance of the descriptor chain for method chaining.\n */\n abstract setCurrentIndex(index: number): this;\n\n /**\n * @description The update method updates the descriptor at the specified index with a new value.\n * @abstract\n * @param {number} index The index at which to update the descriptor.\n * @param {D} value The new descriptor value to set.\n * @returns {this} The instance of the descriptor chain for method chaining.\n */\n abstract update(index: number, value: D): this;\n\n /**\n * @description Returns an iterable iterator of the values in the descriptor chain.\n * @abstract\n * @returns {IterableIterator<D>} \n */\n abstract values(): IterableIterator<D>;\n //#endregion Method\n}\n","// Abstract.\nimport { DescriptorChainCore } from './descriptor-chain-core.abstract';\n// Class.\nimport { Descriptor } from '@typescript-package/descriptor';\n// Type.\nimport { WrappedPropertyDescriptor } from '@typedly/descriptor';\n/**\n * @description The base abstraction class representing a chain of property descriptors.\n * @export\n * @abstract\n * @class DescriptorChainBase\n * @template [O=any] The type of the object that the property descriptors are associated with.\n * @template {keyof O} [K=keyof O] The type of the property name in the object.\n * @template {K extends keyof O ? O[K] : any} [V=K extends keyof O ? O[K] : any] The type of the value accessed by the property.\n * @template {boolean} [A=boolean] The type of active property.\n * @template {boolean} [N=boolean] The type of enabled property.\n * @template {boolean} [C=boolean] The type of configurable property.\n * @template {boolean} [E=boolean] The type of enumerable property.\n * @template {WrappedPropertyDescriptor<O, K, V, A, N, C, E, D>} [D=WrappedPropertyDescriptor<O, K, V, A, N, C, E, any>] The type of wrapped property descriptor.\n * @extends {DescriptorChainCore<O, K, V, A, N, C, E, D>}\n */\nexport abstract class DescriptorChainBase<\n // Object.\n O = any,\n // Key.\n K extends keyof O = keyof O,\n // Value.\n V extends K extends keyof O ? O[K] : any = K extends keyof O ? O[K] : any,\n // Active.\n A extends boolean = boolean,\n // Enabled.\n N extends boolean = boolean,\n // Configurable.\n C extends boolean = boolean,\n // Enumerable.\n E extends boolean = boolean,\n // Descriptor\n D extends WrappedPropertyDescriptor<O, K, V, A, N, C, E, D> = WrappedPropertyDescriptor<O, K, V, A, N, C, E, any>,\n> extends DescriptorChainCore<O, K, V, A, N, C, E, D> {\n /**\n * @inheritdoc\n */\n get active(): A {\n return this.#active;\n }\n\n /**\n * @inheritdoc\n */\n get current(): D {\n return this.#data[this.currentIndex];\n }\n\n /**\n * @inheritdoc\n */\n get currentIndex(): number {\n return this.#currentIndex;\n }\n\n /**\n * @inheritdoc\n */\n protected get data(): D[] {\n return this.#data;\n }\n\n /**\n * @inheritdoc\n */\n protected get descriptor() {\n return this.#descriptor;\n }\n\n /**\n * @inheritdoc\n */\n get enabled(): N {\n return this.#enabled;\n }\n\n /**\n * @inheritdoc\n */\n get key(): K {\n return this.#key;\n }\n\n /**\n * @inheritdoc\n */\n get lastIndex(): number {\n return this.#data.length - 1;\n }\n\n /**\n * @inheritdoc\n */\n get nextIndex(): number | undefined {\n return typeof this.currentIndex === 'number' ? this.currentIndex + 1 : undefined;\n }\n\n /**\n * @inheritdoc\n */\n get object(): O {\n return this.#object;\n }\n\n /**\n * @inheritdoc\n */\n get next(): D | undefined {\n return typeof this.nextIndex === 'number' ? this.#data[this.nextIndex] : undefined;\n }\n\n /**\n * @inheritdoc\n */\n get previous(): D | undefined {\n return typeof this.previousIndex === 'number' ? this.#data[this.previousIndex] : undefined;\n }\n\n /**\n * @inheritdoc\n */\n get previousIndex(): number | undefined {\n return typeof this.currentIndex === 'number' ? this.currentIndex - 1 : undefined;\n }\n\n /**\n * @inheritdoc\n */\n get size(): number {\n return this.#data.length;\n }\n\n /**\n * @description Privately stored active state.\n * @type {A}\n */\n #active: A = true as A;\n\n /**\n * @description \n * @type {new (\n * object: O,\n * key: K,\n * attributes: WrappedPropertyDescriptor<O, K, V, A, N, C, E, D>,\n * ) => D}\n */\n #descriptor: new (\n object: O,\n key: K,\n attributes: WrappedPropertyDescriptor<O, K, V, A, N, C, E, D>,\n ) => D;\n\n /**\n * @description Privately stored enabled state.\n * @type {N}\n */\n #enabled: N = true as N;\n\n /**\n * @description Privately stored current index.\n * @type {number}\n */\n #currentIndex: number = 0;\n\n /**\n * @description Privately stored data array.\n * @type {D[]}\n */\n #data: D[] = new Array<D>();\n\n /**\n * @description Privately stored key.\n * @type {K}\n */\n #key: K;\n\n /**\n * @description Privately stored object.\n * @type {O}\n */\n #object: O;\n \n /**\n * Creates an instance of `DescriptorChainBase` child class.\n * @constructor\n * @param {O} object The object containing the property.\n * @param {K} key The key of the property.\n * @param {new (\n * object: O,\n * key: K,\n * attributes: WrappedPropertyDescriptor<O, K, V, A, N, C, E, D>,\n * ) => D} descriptor \n */\n constructor(\n object: O,\n key: K,\n descriptor: new (\n object: O,\n key: K,\n attributes: WrappedPropertyDescriptor<O, K, V, A, N, C, E, D>,\n ) => D\n ) {\n super();\n this.#descriptor = descriptor;\n this.#key = key;\n this.#object = object;\n }\n\n /**\n * @inheritdoc\n */\n public activate(): this {\n this.#active = true as A;\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public clear(): this {\n this.#data.length = 0;\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public delete(index: number): this {\n this.#data.splice(index, 1);\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public deactivate(): this {\n this.#active = false as A;\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public disable(): this {\n this.#enabled = false as N;\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public enable(): this {\n this.#enabled = true as N;\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public entries(): IterableIterator<[number, D]> {\n return this.#data.entries();\n }\n\n /**\n * @inheritdoc\n */\n public first(): D {\n return this.#data[0];\n }\n\n /**\n * @inheritdoc\n */\n public get(index: number): D {\n return this.#data[index];\n }\n\n /**\n * @inheritdoc\n */\n public has(index: number): boolean {\n return index >= 0 && index < this.#data.length;\n }\n\n /**\n * @inheritdoc\n */\n public last(): D {\n return this.#data[this.lastIndex] as D;\n }\n\n /**\n * @inheritdoc\n */\n public load(): this {\n const descriptor = Descriptor.fromProperty(\n this.#object,\n this.#key\n ) as D;\n if (descriptor) {\n this.add(descriptor);\n } else {\n throw new Error(`Descriptor not found for key: ${String(this.#key)}`);\n }\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public set(index: number, value: D): this {\n this.#data[index] = value;\n return this;\n }\n \n /**\n * @inheritdoc\n */\n public setCurrentIndex(index: number): this {\n this.#currentIndex = index;\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public update(index: number, value: D): this {\n this.#data[index] = {\n ...this.#data[index],\n ...value\n };\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public values(): IterableIterator<D> {\n return this.#data.values();\n }\n}\n","// Abstract.\nimport { DescriptorChainBase } from './descriptor-chain-base.abstract';\n// Interface.\nimport { WrappedPropertyDescriptor } from '@typedly/descriptor';\n/**\n * @description The concrete class representing a chain of property descriptors.\n * @export\n * @abstract\n * @class DescriptorChain\n * @template [O=any] The type of the object that the property descriptors are associated with.\n * @template {keyof O} [K=keyof O] The type of the property name in the object.\n * @template {K extends keyof O ? O[K] : any} [V=K extends keyof O ? O[K] : any] The type of the value accessed by the property.\n * @template {boolean} [A=boolean] The type of active property.\n * @template {boolean} [N=boolean] The type of enabled property.\n * @template {boolean} [C=boolean] The type of configurable property.\n * @template {boolean} [E=boolean] The type of enumerable property.\n * @template {WrappedPropertyDescriptor<O, K, V, A, N, C, E, D>} [D=WrappedPropertyDescriptor<O, K, V, A, N, C, E, any>] The type of wrapped property descriptor.\n * @extends {DescriptorChainBase<O, K, V, A, N, C, E, D>}\n */\nexport class DescriptorChain<\n // Object.\n O = any,\n // Key.\n K extends keyof O = keyof O,\n // Value.\n V extends K extends keyof O ? O[K] : any = K extends keyof O ? O[K] : any,\n // Active.\n A extends boolean = boolean,\n // Enabled.\n N extends boolean = boolean,\n // Configurable.\n C extends boolean = boolean,\n // Enumerable.\n E extends boolean = boolean,\n // Descriptor\n D extends WrappedPropertyDescriptor<O, K, V, A, N, C, E, D> = WrappedPropertyDescriptor<O, K, V, A, N, C, E, any>,\n> extends DescriptorChainBase<O, K, V, A, N, C, E, D> {\n /**\n * @inheritdoc\n */\n public add(descriptor: D, current: boolean = true): this {\n // Adds the new descriptor to the chain.\n super.data.push(new super.descriptor(super.object, super.key, descriptor));\n // Sets the current index.\n current && super.setCurrentIndex(super.lastIndex);\n // Returns the instance.\n return this;\n }\n}\n","/*\n * Public API Surface of descriptor-chain\n */\n\nexport {\n // Abstract.\n DescriptorChainCore,\n DescriptorChainBase,\n // Class.\n DescriptorChain\n} from './lib';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;AAcG;MACmB,mBAAmB,CAAA;AAuQxC;;ACxRD;AAMA;;;;;;;;;;;;;;AAcG;AACG,MAAgB,mBAiBpB,SAAQ,mBAA2C,CAAA;AACnD;;AAEG;AACH,IAAA,IAAI,MAAM,GAAA;QACR,OAAO,IAAI,CAAC,OAAO;;AAGrB;;AAEG;AACH,IAAA,IAAI,OAAO,GAAA;QACT,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC;;AAGtC;;AAEG;AACH,IAAA,IAAI,YAAY,GAAA;QACd,OAAO,IAAI,CAAC,aAAa;;AAG3B;;AAEG;AACH,IAAA,IAAc,IAAI,GAAA;QAChB,OAAO,IAAI,CAAC,KAAK;;AAGnB;;AAEG;AACH,IAAA,IAAc,UAAU,GAAA;QACtB,OAAO,IAAI,CAAC,WAAW;;AAGzB;;AAEG;AACH,IAAA,IAAI,OAAO,GAAA;QACT,OAAO,IAAI,CAAC,QAAQ;;AAGtB;;AAEG;AACH,IAAA,IAAI,GAAG,GAAA;QACL,OAAO,IAAI,CAAC,IAAI;;AAGlB;;AAEG;AACH,IAAA,IAAI,SAAS,GAAA;AACX,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;;AAG9B;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