Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

abstract-presets

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abstract-presets - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

14

dist/abstract-presets.js

@@ -15,5 +15,3 @@ /**

*/ const omit = (obj, props)=>filter(obj, includesKey(props, true));
/**
* @private
*/ const includesKey = (props, invert = false)=>([key])=>invert ^ props.includes(key);
const includesKey = (props, invert = false)=>([key])=>invert ^ props.includes(key);

@@ -70,11 +68,5 @@ const bool = Symbol.for('to-fluent-bool');

},
construct (_, args) {
const ctor = cb.call(self, {
apply: (_, self, args)=>cb.call(self, {
...settings
});
return new ctor(...args);
},
apply: (_, self1, args)=>cb.call(self1, {
...settings
}).apply(self1, args)
}).apply(self, args)
});

@@ -81,0 +73,0 @@ return bind(settings);

@@ -1,2 +0,2 @@

const e=Symbol.for("to-fluent-bool");class t{static onceSymbol=Symbol("once");listeners={};emit(e,...t){if(this.listeners[e])try{this.listeners[e].forEach(s=>{"function"==typeof s.callback&&s.callback(...t),!0===s.once&&this.off(e,s.callback)})}catch(e){}return this}on(e,t,s){return this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].some(e=>e.callback===t)||this.listeners[e].push({...s,callback:t}),()=>{this.off(e,t)}}off(e,t){if(!this.listeners[e])return;const s=this.listeners[e].findIndex(e=>e.callback===t);return s>=0&&this.listeners[e].splice(s,1),0===this.listeners[e].length&&delete this.listeners[e],this}once(e,t){return this.on(e,t,{once:!0}),this}}function s(e,t){return e.map(t).filter(e=>null!=e&&!1!==e)}((t,s)=>{const r=Object.entries(new t).filter(([,t])=>t===e||"boolean"==typeof t),n=r.map(([e])=>e),i=r.filter(([,t])=>t===e).map(([e])=>e),a=(l=new t,c=((e,t=!1)=>([s])=>t^e.includes(s))(i,!0),Object.fromEntries(Object.entries(l).filter(c)));var l,c;let o=!1;const u=e=>new Proxy(s,{get(t,s,r){if("not"===s)return o=!0,r;if(n.includes(s)){const t=!o;return o=!1,u({...e,[s]:t})}return t=>u({...e,[s]:t})},construct:(t,r)=>new(s.call(self,{...e}))(...r),apply:(t,r,n)=>s.call(r,{...e}).apply(r,n)});u(a)})(class{configurable=!1;enumerable=!1;writable=e},e=>(t,s,r)=>Object.defineProperty(t,s,null==r?e:{...e,value:r}));const r=(e,t)=>null!=e&&null!=t&&"object"==typeof e&&"equals"in e?e.equals(t,e):Object.is(t,e);class n extends t{constructor(e){super(),Object.assign(this,e)}toJSON(){return{...this}}}function i(e,t,s,r){const n=t[s];if(n===r)return t;if(i=n,a=r,Array.isArray(i)&&Array.isArray(a)&&i.length===a.length&&i.every((e,t)=>e===a[t]))return t;var i,a;const l=t.toJSON();return Object.assign(new e,l,{[s]:r})}class a extends n{items=[];constructor(e={}){super(e),Object.assign(this,e),this.ctor=new.target}equals(e){return this===e||this.items.length===e.items.length&&this.items.every(function(t,s){return r(t,e.items[s])})}add(e){return Object.assign(new this.ctor,this.toJSON(),{items:[...this.items,e]})}getById(e){return c(this.items,e)}setById(e,t){return i(this.ctor,this,"items",function(e,t,s){const r=c(e,t);return r===s?e:e.map(function(e){return e===r?s:e})}(this.items,e,t))}hasId(e){return this.items.some(function(t){return t.id===e})}updateById(e,t){return i(this.ctor,this,"items",function(e,t,s){let r=!1,n=!1;const i=e.map(function(e){if(e.id===t){const t=l(e,s);return r=!0,t===e&&(n=!0),t}return e});if(!r)throw new Error("Item not found with id: "+t);return n?e:i}(this.items,e,t))}mergeEach(e){return i(this.ctor,this,"items",this.items.map(function(t){return l(t,e)}))}removeById(e){return Object.assign(new this.ctor,this.toJSON(),{items:o(this.items,e)})}insertAt(e,t){return Object.assign(new this.ctor,this.toJSON(),{items:u(this.items,e,t)})}insertAfterIndex(e,t){return this.insertAt(e+1,t)}}function l(e,t){return(s=t,Object.entries(s)).every(function([t,s]){return t in e&&r(e[t],s)})?e:Object.assign(new e.constructor,e,t);var s}function c(e,t){const s=e.find(function(e){return e.id===t});if(!s)throw new Error(`Item not found in list with id: "${t}"`);return s}function o(e,t){return c(e,t),e.filter(function(e){return e.id!==t})}function u(e,t,s){if(t>e.length)throw new Error(`Insert index ${t} out of bounds in list with length ${e.length}`);const r=[...e];return t===r.length?r.push(s):t>0?r.splice(t,0,s):r.unshift(s),r}class d{id=function(){return`${String.fromCharCode(97+25*Math.random())}${(1e8*Math.random()|0).toString(36)}`}();detail;isIntent=!1;isDraft=!0;isRemoved=!1;constructor(e){Object.assign(this,e)}equals(e){return this===e||!e||this.id===e.id&&this.isIntent===e.isIntent&&this.isDraft===e.isDraft&&this.isRemoved===e.isRemoved&&this.detail.equals(e.detail)}}class h{data;constructor(e){this.data=e instanceof h?e.data:e}toJSON(){return this.data}copy(){return new this.constructor(this.toJSON())}}class f extends a{Preset;Detail;spare=null;selectedPresetId=!1;constructor(e={},t=d,r=class extends h{equals(e,t){return!0}satisfies(e){return!0}merge(e){return this}}){super(e),this.Preset=t,this.Detail=r,Object.assign(this,e),this.ctor=new.target,function(e,t=[],r,n="anonymous"){if(!globalThis.DEBUG)return e;const i=globalThis.DEBUG.includes(n);let a=class e extends Error{constructor(){super(),Error.captureStackTrace&&Error.captureStackTrace(this,e),this.name="StackError"}};Object.assign(e,Object.fromEntries(Object.entries(e).concat(s(Object.getOwnPropertyNames(Object.getPrototypeOf(e.__proto__)??{}),t=>"function"==typeof e[t]&&!e[t].toString().startsWith("class")&&[t,e[t]])).filter(([e,s])=>!t.includes(e)&&"function"==typeof s&&!s.toString().startsWith("class")).map(([e,t])=>{const s=function(...s){i&&r?.before?.(e,s,new a);const n=t.apply(this,s);return i&&r?.after?.(e,s,n),n};return Object.defineProperty(s,"name",{value:`${e} (wrap)`}),Object.defineProperty(t,"name",{value:e}),Object.assign(t,{key:e}),[e,s]})))}(this,["valueOf","toJSON"],{before:(e,t,s)=>{console.groupCollapsed(e),console.groupCollapsed("ARGS:",t),console.log(s),console.groupEnd()},after:(e,t,s)=>{console.log("RESULT:",s),console.groupEnd()}},"abstract-presets")}toJSON(){return{items:this.items,spare:this.spare,selectedPresetId:this.selectedPresetId,listeners:this.listeners}}equals(e){return this===e||this.items.length===e.items.length&&this.selectedPresetId===e.selectedPresetId&&(!this.selectedPresetId||this.selectedPreset.equals(e.selectedPreset))&&this.items.every(t=>e.items.some(e=>t.equals(e)))}get selectedPreset(){try{return this.selectedPresetId?this.getById(this.selectedPresetId):null}catch(e){return console.warn(e),null}}createWithDetail(e,t={}){return new this.Preset({...t,detail:e})}createWithDetailData(e,t){return this.createWithDetail(new this.Detail(e),t)}restoreSpare(e,t){let s=this;const r=this.spare;if(r&&!r.preset.isIntent&&r.preset.isDraft)return s.hasId(r.preset.id)||(s=s.insertAt(s.items.length,r.preset)),s=s.selectPreset(r.preset.id,!1,e),s}getByDetail(e){const t=this.items.filter(t=>t.detail?.satisfies(e));return t.find(e=>!e.isDraft)??t[0]}insertAt(e,t){e=Math.max(-1,Math.min(this.items.length,e));const s=super.insertAt(e,t);return s.spare={index:e,preset:t},s}removeById(e,t){let s=super.removeById(e);const r=s.selectedPresetId===e?!(!t||!this.hasId(t))&&t:s.selectedPresetId;return r!==e&&(s=s.selectPreset(r,!1)),s}setDetailData(e,t=!1,s=!1,r=!1){let n=this;const i=new this.Detail(e);if(!n.selectedPresetId){const e=n.restoreSpare(i);if(e)return e;const t=new this.Preset({detail:i,isIntent:s});return n.insertAt(n.items.length,t).selectPreset(t.id)}const a=n.selectedPreset,l=a?.detail.merge({...a.detail.data,...i.data}),c=n.getByDetail(l);if(c&&(l.equals(c.detail)||(n=n.updateById(c.id,{detail:l}))),c&&a&&(a===c||!(a.isDraft&&a.isIntent&&c.isDraft))){if(t||n.selectedPresetId!==c.id){if(n=n.selectPreset(c.id,t),s||t)n=n.mergeEach({isIntent:!0});else for(const[,e]of n.items.entries())e!==c&&e.isDraft&&!e.isIntent&&(n=n.removeById(e.id));return n}return c.isDraft,n}if(a?.isDraft)return n.selectPreset(a.id,!1,i,r);const o=n.restoreSpare(i,t);if(o)return o;const u=new this.Preset({detail:l,isIntent:s});return n.insertAt(n.items.length,u).selectPreset(u.id)}selectPreset(e,t,s,r){let n=this;t&&(n.spare=null);const a=e&&n.selectedPresetId?n.selectedPreset:null;let l=e?n.getById(e):null;const c=l&&s&&l.detail.merge({...l.detail.data,...s.data});return t&&(n=n.mergeEach({isIntent:!0})),e&&c&&(n=n.updateById(e,{detail:c}),l=n.getById(e)),n=i(this.ctor,n,"selectedPresetId",e),queueMicrotask(function(){n.emit("select",l,a,l?.detail??null,a?.detail??null,t,r)}),n}renamePresetRandom(e,t){}savePreset(e){const t=this.updateById(e,{isDraft:!1});return t.spare?.preset?.id===e&&(t.spare=null),t}}class m extends h{constructor(e){super(e)}toJSON(){return{details:this.data.details}}collectData(e){return new this.constructor({sources:new Map(e),details:s([...e],([e,t])=>!!t.selectedPresetId&&!!t.selectedPreset?.detail&&[e,t.selectedPreset.detail.copy()])})}applyData(e){return e.sources?new Map(s(e.details,([t,s])=>{let r=e.sources.get(t);return r.selectedPreset&&r.selectedPreset.detail.equals(s)||(r=r.setDetailData(s,!1,!1,!0)),[t,r]})):new Map}equals(e){if(e===this)return!0;const t=e&&("data"in e?e.data:e);return!!t&&this.data.details.length===t.details.length&&!!this.data.details.every(function(e){return t.details.some(function(t){return e[0]===t[0]&&e[1].equals(t[1])})})}satisfies(e){if(e===this)return!0;const t=e&&("data"in e?e.data:e);return!!t&&!!this.data.details.every(function(e){return t.details.some(function(t){return e[1].satisfies(t[1])})})}merge(e){const t="data"in e?e.data:e;return new m({sources:new Map(t.sources),details:t.details.map(([e,t])=>[e,t.copy()])})}}export{h as AbstractDetail,d as BasePreset,f as BasePresets,m as PresetsGroupDetail};
const e=Symbol.for("to-fluent-bool");class t{static onceSymbol=Symbol("once");listeners={};emit(e,...t){if(this.listeners[e])try{this.listeners[e].forEach(s=>{"function"==typeof s.callback&&s.callback(...t),!0===s.once&&this.off(e,s.callback)})}catch(e){}return this}on(e,t,s){return this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].some(e=>e.callback===t)||this.listeners[e].push({...s,callback:t}),()=>{this.off(e,t)}}off(e,t){if(!this.listeners[e])return;const s=this.listeners[e].findIndex(e=>e.callback===t);return s>=0&&this.listeners[e].splice(s,1),0===this.listeners[e].length&&delete this.listeners[e],this}once(e,t){return this.on(e,t,{once:!0}),this}}function s(e,t){return e.map(t).filter(e=>null!=e&&!1!==e)}((t,s)=>{const r=Object.entries(new t).filter(([,t])=>t===e||"boolean"==typeof t),i=r.map(([e])=>e),n=r.filter(([,t])=>t===e).map(([e])=>e),a=(l=new t,c=((e,t=!1)=>([s])=>t^e.includes(s))(n,!0),Object.fromEntries(Object.entries(l).filter(c)));var l,c;let o=!1;const u=e=>new Proxy(s,{get(t,s,r){if("not"===s)return o=!0,r;if(i.includes(s)){const t=!o;return o=!1,u({...e,[s]:t})}return t=>u({...e,[s]:t})},apply:(t,r,i)=>s.call(r,{...e}).apply(r,i)});u(a)})(class{configurable=!1;enumerable=!1;writable=e},e=>(t,s,r)=>Object.defineProperty(t,s,null==r?e:{...e,value:r}));const r=(e,t)=>null!=e&&null!=t&&"object"==typeof e&&"equals"in e?e.equals(t,e):Object.is(t,e);class i extends t{constructor(e){super(),Object.assign(this,e)}toJSON(){return{...this}}}function n(e,t,s,r){const i=t[s];if(i===r)return t;if(n=i,a=r,Array.isArray(n)&&Array.isArray(a)&&n.length===a.length&&n.every((e,t)=>e===a[t]))return t;var n,a;const l=t.toJSON();return Object.assign(new e,l,{[s]:r})}class a extends i{items=[];constructor(e={}){super(e),Object.assign(this,e),this.ctor=new.target}equals(e){return this===e||this.items.length===e.items.length&&this.items.every(function(t,s){return r(t,e.items[s])})}add(e){return Object.assign(new this.ctor,this.toJSON(),{items:[...this.items,e]})}getById(e){return c(this.items,e)}setById(e,t){return n(this.ctor,this,"items",function(e,t,s){const r=c(e,t);return r===s?e:e.map(function(e){return e===r?s:e})}(this.items,e,t))}hasId(e){return this.items.some(function(t){return t.id===e})}updateById(e,t){return n(this.ctor,this,"items",function(e,t,s){let r=!1,i=!1;const n=e.map(function(e){if(e.id===t){const t=l(e,s);return r=!0,t===e&&(i=!0),t}return e});if(!r)throw new Error("Item not found with id: "+t);return i?e:n}(this.items,e,t))}mergeEach(e){return n(this.ctor,this,"items",this.items.map(function(t){return l(t,e)}))}removeById(e){return Object.assign(new this.ctor,this.toJSON(),{items:o(this.items,e)})}insertAt(e,t){return Object.assign(new this.ctor,this.toJSON(),{items:u(this.items,e,t)})}insertAfterIndex(e,t){return this.insertAt(e+1,t)}}function l(e,t){return(s=t,Object.entries(s)).every(function([t,s]){return t in e&&r(e[t],s)})?e:Object.assign(new e.constructor,e,t);var s}function c(e,t){const s=e.find(function(e){return e.id===t});if(!s)throw new Error(`Item not found in list with id: "${t}"`);return s}function o(e,t){return c(e,t),e.filter(function(e){return e.id!==t})}function u(e,t,s){if(t>e.length)throw new Error(`Insert index ${t} out of bounds in list with length ${e.length}`);const r=[...e];return t===r.length?r.push(s):t>0?r.splice(t,0,s):r.unshift(s),r}class d{id=function(){return`${String.fromCharCode(97+25*Math.random())}${(1e8*Math.random()|0).toString(36)}`}();detail;isIntent=!1;isDraft=!0;isRemoved=!1;constructor(e){Object.assign(this,e)}equals(e){return this===e||!e||this.id===e.id&&this.isIntent===e.isIntent&&this.isDraft===e.isDraft&&this.isRemoved===e.isRemoved&&this.detail.equals(e.detail)}}class h{data;constructor(e){this.data=e instanceof h?e.data:e}toJSON(){return this.data}copy(){return new this.constructor(this.toJSON())}}class f extends a{Preset;Detail;spare=null;selectedPresetId=!1;constructor(e={},t=d,r=class extends h{equals(e,t){return!0}satisfies(e){return!0}merge(e){return this}}){super(e),this.Preset=t,this.Detail=r,Object.assign(this,e),this.ctor=new.target,function(e,t=[],r,i="anonymous"){if(!globalThis.DEBUG)return e;const n=globalThis.DEBUG.includes(i);let a=class e extends Error{constructor(){super(),Error.captureStackTrace&&Error.captureStackTrace(this,e),this.name="StackError"}};Object.assign(e,Object.fromEntries(Object.entries(e).concat(s(Object.getOwnPropertyNames(Object.getPrototypeOf(e.__proto__)??{}),t=>"function"==typeof e[t]&&!e[t].toString().startsWith("class")&&[t,e[t]])).filter(([e,s])=>!t.includes(e)&&"function"==typeof s&&!s.toString().startsWith("class")).map(([e,t])=>{const s=function(...s){n&&r?.before?.(e,s,new a);const i=t.apply(this,s);return n&&r?.after?.(e,s,i),i};return Object.defineProperty(s,"name",{value:`${e} (wrap)`}),Object.defineProperty(t,"name",{value:e}),Object.assign(t,{key:e}),[e,s]})))}(this,["valueOf","toJSON"],{before:(e,t,s)=>{console.groupCollapsed(e),console.groupCollapsed("ARGS:",t),console.log(s),console.groupEnd()},after:(e,t,s)=>{console.log("RESULT:",s),console.groupEnd()}},"abstract-presets")}toJSON(){return{items:this.items,spare:this.spare,selectedPresetId:this.selectedPresetId,listeners:this.listeners}}equals(e){return this===e||this.items.length===e.items.length&&this.selectedPresetId===e.selectedPresetId&&(!this.selectedPresetId||this.selectedPreset.equals(e.selectedPreset))&&this.items.every(t=>e.items.some(e=>t.equals(e)))}get selectedPreset(){try{return this.selectedPresetId?this.getById(this.selectedPresetId):null}catch(e){return console.warn(e),null}}createWithDetail(e,t={}){return new this.Preset({...t,detail:e})}createWithDetailData(e,t){return this.createWithDetail(new this.Detail(e),t)}restoreSpare(e,t){let s=this;const r=this.spare;if(r&&!r.preset.isIntent&&r.preset.isDraft)return s.hasId(r.preset.id)||(s=s.insertAt(s.items.length,r.preset)),s=s.selectPreset(r.preset.id,!1,e),s}getByDetail(e){const t=this.items.filter(t=>t.detail?.satisfies(e));return t.find(e=>!e.isDraft)??t[0]}insertAt(e,t){e=Math.max(-1,Math.min(this.items.length,e));const s=super.insertAt(e,t);return s.spare={index:e,preset:t},s}removeById(e,t){let s=super.removeById(e);const r=s.selectedPresetId===e?!(!t||!this.hasId(t))&&t:s.selectedPresetId;return r!==e&&(s=s.selectPreset(r,!1)),s}setDetailData(e,t=!1,s=!1,r=!1){let i=this;const n=new this.Detail(e);if(!i.selectedPresetId){const e=i.restoreSpare(n);if(e)return e;const t=new this.Preset({detail:n,isIntent:s});return i.insertAt(i.items.length,t).selectPreset(t.id)}const a=i.selectedPreset,l=a?.detail.merge({...a.detail.data,...n.data}),c=i.getByDetail(l);if(c&&(l.equals(c.detail)||(i=i.updateById(c.id,{detail:l}))),c&&a&&(a===c||!(a.isDraft&&a.isIntent&&c.isDraft))){if(t||i.selectedPresetId!==c.id){if(i=i.selectPreset(c.id,t),s||t)i=i.mergeEach({isIntent:!0});else for(const[,e]of i.items.entries())e!==c&&e.isDraft&&!e.isIntent&&(i=i.removeById(e.id));return i}return c.isDraft,i}if(a?.isDraft)return i.selectPreset(a.id,!1,n,r);const o=i.restoreSpare(n,t);if(o)return o;const u=new this.Preset({detail:l,isIntent:s});return i.insertAt(i.items.length,u).selectPreset(u.id)}selectPreset(e,t,s,r){let i=this;t&&(i.spare=null);const a=e&&i.selectedPresetId?i.selectedPreset:null;let l=e?i.getById(e):null;const c=l&&s&&l.detail.merge({...l.detail.data,...s.data});return t&&(i=i.mergeEach({isIntent:!0})),e&&c&&(i=i.updateById(e,{detail:c}),l=i.getById(e)),i=n(this.ctor,i,"selectedPresetId",e),queueMicrotask(function(){i.emit("select",l,a,l?.detail??null,a?.detail??null,t,r)}),i}renamePresetRandom(e,t){}savePreset(e){const t=this.updateById(e,{isDraft:!1});return t.spare?.preset?.id===e&&(t.spare=null),t}}class m extends h{constructor(e){super(e)}toJSON(){return{details:this.data.details}}collectData(e){return new this.constructor({sources:new Map(e),details:s([...e],([e,t])=>!!t.selectedPresetId&&!!t.selectedPreset?.detail&&[e,t.selectedPreset.detail.copy()])})}applyData(e){return e.sources?new Map(s(e.details,([t,s])=>{let r=e.sources.get(t);return r.selectedPreset&&r.selectedPreset.detail.equals(s)||(r=r.setDetailData(s,!1,!1,!0)),[t,r]})):new Map}equals(e){if(e===this)return!0;const t=e&&("data"in e?e.data:e);return!!t&&this.data.details.length===t.details.length&&!!this.data.details.every(function(e){return t.details.some(function(t){return e[0]===t[0]&&e[1].equals(t[1])})})}satisfies(e){if(e===this)return!0;const t=e&&("data"in e?e.data:e);return!!t&&!!this.data.details.every(function(e){return t.details.some(function(t){return e[1].satisfies(t[1])})})}merge(e){const t="data"in e?e.data:e;return new m({sources:new Map(t.sources),details:t.details.map(([e,t])=>[e,t.copy()])})}}export{h as AbstractDetail,d as BasePreset,f as BasePresets,m as PresetsGroupDetail};
//# sourceMappingURL=abstract-presets.min.js.map

@@ -17,3 +17,3 @@ "use strict";

const _everydayUtils = require("everyday-utils");
const _immutableList = require("immutable-list");
const _immutableList = require("@stagas/immutable-list");
let BasePreset = class BasePreset {

@@ -20,0 +20,0 @@ id = (0, _everydayUtils.cheapRandomId)();

import { cheapRandomId, debugObjectMethods } from 'everyday-utils';
import { createOrReturn, List } from 'immutable-list';
import { createOrReturn, List } from '@stagas/immutable-list';
// export type ItemDetail = Record<string, unknown>

@@ -4,0 +4,0 @@ export class BasePreset {

import { Class } from 'everyday-types';
import { List } from 'immutable-list';
import { List } from '@stagas/immutable-list';
export declare class BasePreset<T extends AbstractDetail<any> = any> {

@@ -4,0 +4,0 @@ id: string;

@@ -6,3 +6,3 @@ {

"description": "Abstract preset manager.",
"version": "1.0.0",
"version": "1.0.1",
"license": "MIT",

@@ -79,6 +79,6 @@ "repository": {

"dependencies": {
"@stagas/immutable-list": "1.1.0",
"everyday-types": "^1.1.0",
"everyday-utils": "^1.3.0",
"immutable-list": "^1.1.0"
"everyday-utils": "^1.3.0"
}
}
<h1>
abstract-presets <a href="https://npmjs.org/package/abstract-presets"><img src="https://img.shields.io/badge/npm-v1.0.0-F00.svg?colorA=000"/></a> <a href="src"><img src="https://img.shields.io/badge/loc-357-FFF.svg?colorA=000"/></a> <a href="https://cdn.jsdelivr.net/npm/abstract-presets@1.0.0/dist/abstract-presets.min.js"><img src="https://img.shields.io/badge/brotli-2.8K-333.svg?colorA=000"/></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-F0B.svg?colorA=000"/></a>
abstract-presets <a href="https://npmjs.org/package/abstract-presets"><img src="https://img.shields.io/badge/npm-v1.0.1-F00.svg?colorA=000"/></a> <a href="src"><img src="https://img.shields.io/badge/loc-357-FFF.svg?colorA=000"/></a> <a href="https://cdn.jsdelivr.net/npm/abstract-presets@1.0.1/dist/abstract-presets.min.js"><img src="https://img.shields.io/badge/brotli-2.8K-333.svg?colorA=000"/></a> <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-F0B.svg?colorA=000"/></a>
</h1>

@@ -67,8 +67,8 @@

<p> <details id="AbstractDetail$15" title="Class" ><summary><span><a href="#AbstractDetail$15">#</a></span> <code><strong>AbstractDetail</strong></code> </summary> <a href=""></a> <ul> <p> <details id="constructor$16" title="Constructor" ><summary><span><a href="#constructor$16">#</a></span> <code><strong>constructor</strong></code><em>(data)</em> </summary> <a href=""></a> <ul> <p> <details id="new AbstractDetail$17" title="ConstructorSignature" ><summary><span><a href="#new AbstractDetail$17">#</a></span> <code><strong>new AbstractDetail</strong></code><em>()</em> </summary> <ul><p><a href="#AbstractDetail$15">AbstractDetail</a>&lt;<a href="#T$18">T</a>&gt;</p> <p> <details id="data$19" title="Parameter" ><summary><span><a href="#data$19">#</a></span> <code><strong>data</strong></code> </summary> <ul><p><a href="#AbstractDetail$15">AbstractDetail</a>&lt;<a href="#T$18">T</a>&gt; | <a href="#T$18">T</a></p> </ul></details></p> </ul></details></p> </ul></details><details id="data$20" title="Property" ><summary><span><a href="#data$20">#</a></span> <code><strong>data</strong></code> </summary> <a href=""></a> <ul><p><a href="#T$18">T</a></p> </ul></details><details id="copy$32" title="Method" ><summary><span><a href="#copy$32">#</a></span> <code><strong>copy</strong></code><em>()</em> </summary> <a href=""></a> <ul> <p> <p><strong>copy</strong><em>()</em> &nbsp;=&gt; <ul><a href="#T$18">T</a></ul></p></p> </ul></details><details id="equals$24" title="Method" ><summary><span><a href="#equals$24">#</a></span> <code><strong>equals</strong></code><em>(other)</em> </summary> <a href=""></a> <ul> <p> <details id="other$26" title="Parameter" ><summary><span><a href="#other$26">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#AbstractDetail$15">AbstractDetail</a>&lt;<a href="#T$18">T</a>&gt; | <a href="#T$18">T</a></p> </ul></details> <p><strong>equals</strong><em>(other)</em> &nbsp;=&gt; <ul>boolean</ul></p></p> </ul></details><details id="merge$21" title="Method" ><summary><span><a href="#merge$21">#</a></span> <code><strong>merge</strong></code><em>(other)</em> </summary> <a href=""></a> <ul> <p> <details id="other$23" title="Parameter" ><summary><span><a href="#other$23">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#AbstractDetail$15">AbstractDetail</a>&lt;<a href="#T$18">T</a>&gt; | <a href="#T$18">T</a></p> </ul></details> <p><strong>merge</strong><em>(other)</em> &nbsp;=&gt; <ul>any</ul></p></p> </ul></details><details id="satisfies$27" title="Method" ><summary><span><a href="#satisfies$27">#</a></span> <code><strong>satisfies</strong></code><em>(other)</em> </summary> <a href=""></a> <ul> <p> <details id="other$29" title="Parameter" ><summary><span><a href="#other$29">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#AbstractDetail$15">AbstractDetail</a>&lt;<a href="#T$18">T</a>&gt; | <a href="#T$18">T</a></p> </ul></details> <p><strong>satisfies</strong><em>(other)</em> &nbsp;=&gt; <ul>boolean</ul></p></p> </ul></details><details id="toJSON$30" title="Method" ><summary><span><a href="#toJSON$30">#</a></span> <code><strong>toJSON</strong></code><em>()</em> </summary> <a href=""></a> <ul> <p> <p><strong>toJSON</strong><em>()</em> &nbsp;=&gt; <ul><a href="#T$18">T</a></ul></p></p> </ul></details></p></ul></details><details id="BasePreset$1" title="Class" ><summary><span><a href="#BasePreset$1">#</a></span> <code><strong>BasePreset</strong></code> </summary> <a href=""></a> <ul> <p> <details id="constructor$2" title="Constructor" ><summary><span><a href="#constructor$2">#</a></span> <code><strong>constructor</strong></code><em>(data)</em> </summary> <a href=""></a> <ul> <p> <details id="new BasePreset$3" title="ConstructorSignature" ><summary><span><a href="#new BasePreset$3">#</a></span> <code><strong>new BasePreset</strong></code><em>()</em> </summary> <ul><p><a href="#BasePreset$1">BasePreset</a>&lt;<a href="#T$4">T</a>&gt;</p> <p> <details id="data$5" title="Parameter" ><summary><span><a href="#data$5">#</a></span> <code><strong>data</strong></code> </summary> <ul><p><span>Partial</span>&lt;<a href="#BasePreset$1">BasePreset</a>&lt;<a href="#T$4">T</a>&gt;&gt;</p> </ul></details></p> </ul></details></p> </ul></details><details id="detail$7" title="Property" ><summary><span><a href="#detail$7">#</a></span> <code><strong>detail</strong></code> </summary> <a href=""></a> <ul><p><a href="#T$4">T</a></p> </ul></details><details id="id$6" title="Property" ><summary><span><a href="#id$6">#</a></span> <code><strong>id</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>...</code></span> </summary> <a href=""></a> <ul><p>string</p> </ul></details><details id="isDraft$9" title="Property" ><summary><span><a href="#isDraft$9">#</a></span> <code><strong>isDraft</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>true</code></span> </summary> <a href=""></a> <ul><p>boolean</p> </ul></details><details id="isIntent$8" title="Property" ><summary><span><a href="#isIntent$8">#</a></span> <code><strong>isIntent</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>false</code></span> </summary> <a href=""></a> <ul><p>boolean</p> </ul></details><details id="isRemoved$10" title="Property" ><summary><span><a href="#isRemoved$10">#</a></span> <code><strong>isRemoved</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>false</code></span> </summary> <a href=""></a> <ul><p>boolean</p> </ul></details><details id="equals$11" title="Method" ><summary><span><a href="#equals$11">#</a></span> <code><strong>equals</strong></code><em>(other)</em> </summary> <a href=""></a> <ul> <p> <details id="other$13" title="Parameter" ><summary><span><a href="#other$13">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#BasePreset$1">BasePreset</a>&lt;any&gt;</p> </ul></details> <p><strong>equals</strong><em>(other)</em> &nbsp;=&gt; <ul>boolean</ul></p></p> </ul></details></p></ul></details><details id="BasePresets$47" title="Class" ><summary><span><a href="#BasePresets$47">#</a></span> <code><strong>BasePresets</strong></code> </summary> <a href=""></a> <ul> <p> <details id="constructor$49" title="Constructor" ><summary><span><a href="#constructor$49">#</a></span> <code><strong>constructor</strong></code><em>(data, Preset, Detail)</em> </summary> <a href=""></a> <ul> <p> <details id="new BasePresets$50" title="ConstructorSignature" ><summary><span><a href="#new BasePresets$50">#</a></span> <code><strong>new BasePresets</strong></code><em>()</em> </summary> <ul><p><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</p> <p> <details id="data$54" title="Parameter" ><summary><span><a href="#data$54">#</a></span> <code><strong>data</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>{}</code></span> </summary> <ul><p><span>Partial</span>&lt;<a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;&gt;</p> </ul></details><details id="Preset$55" title="Parameter" ><summary><span><a href="#Preset$55">#</a></span> <code><strong>Preset</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>...</code></span> </summary> <ul><p><a href="#PresetClass$53">PresetClass</a></p> </ul></details><details id="Detail$56" title="Parameter" ><summary><span><a href="#Detail$56">#</a></span> <code><strong>Detail</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>...</code></span> </summary> <ul><p><span>Class</span>&lt;<a href="#Detail$51">Detail</a>&gt;</p> </ul></details></p> </ul></details></p> </ul></details><details id="Detail$57" title="Property" ><summary><span><a href="#Detail$57">#</a></span> <code><strong>Detail</strong></code> </summary> <a href=""></a> <ul><p><span>Class</span>&lt;<a href="#Detail$51">Detail</a>&gt;</p> </ul></details><details id="Preset$58" title="Property" ><summary><span><a href="#Preset$58">#</a></span> <code><strong>Preset</strong></code> </summary> <a href=""></a> <ul><p><a href="#PresetClass$53">PresetClass</a></p> </ul></details><details id="ctor$118" title="Property" ><summary><span><a href="#ctor$118">#</a></span> <code><strong>ctor</strong></code> </summary> <a href=""></a> <ul><p><span>Class</span>&lt;<a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;&gt;</p> </ul></details><details id="items$117" title="Property" ><summary><span><a href="#items$117">#</a></span> <code><strong>items</strong></code> </summary> <a href=""></a> <ul><p><a href="#Preset$52">Preset</a> []</p> </ul></details><details id="selectedPresetId$63" title="Property" ><summary><span><a href="#selectedPresetId$63">#</a></span> <code><strong>selectedPresetId</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>false</code></span> </summary> <a href=""></a> <ul><p>string | <code>false</code></p> </ul></details><details id="spare$59" title="Property" ><summary><span><a href="#spare$59">#</a></span> <code><strong>spare</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>null</code></span> </summary> <a href=""></a> <ul><p><code>null</code> | {<p> <details id="index$61" title="Property" ><summary><span><a href="#index$61">#</a></span> <code><strong>index</strong></code> </summary> <a href=""></a> <ul><p>number</p> </ul></details><details id="preset$62" title="Property" ><summary><span><a href="#preset$62">#</a></span> <code><strong>preset</strong></code> </summary> <a href=""></a> <ul><p><a href="#Preset$52">Preset</a></p> </ul></details></p>}</p> </ul></details><details id="onceSymbol$48" title="Property" ><summary><span><a href="#onceSymbol$48">#</a></span> <code><strong>onceSymbol</strong></code> </summary> <a href=""></a> <ul><p>symbol</p> </ul></details><details id="selectedPreset$69" title="Accessor" ><summary><span><a href="#selectedPreset$69">#</a></span> <code><strong>selectedPreset</strong></code> </summary> <a href=""></a> <ul> </ul></details><details id="add$119" title="Method" ><summary><span><a href="#add$119">#</a></span> <code><strong>add</strong></code><em>(item)</em> </summary> <a href=""></a> <ul> <p> <details id="item$121" title="Parameter" ><summary><span><a href="#item$121">#</a></span> <code><strong>item</strong></code> </summary> <ul><p><a href="#Preset$52">Preset</a></p> </ul></details> <p><strong>add</strong><em>(item)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt; &amp; <span>Partial</span>&lt;<a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;&gt; &amp; {<p> <details id="items$123" title="Property" ><summary><span><a href="#items$123">#</a></span> <code><strong>items</strong></code> </summary> <a href=""></a> <ul><p><a href="#Preset$52">Preset</a> []</p> </ul></details></p>}</ul></p></p> </ul></details><details id="createWithDetail$71" title="Method" ><summary><span><a href="#createWithDetail$71">#</a></span> <code><strong>createWithDetail</strong></code><em>(detail, presetData)</em> </summary> <a href=""></a> <ul> <p> <details id="detail$73" title="Parameter" ><summary><span><a href="#detail$73">#</a></span> <code><strong>detail</strong></code> </summary> <ul><p><a href="#Detail$51">Detail</a> [<code>"data"</code>]</p> </ul></details><details id="presetData$74" title="Parameter" ><summary><span><a href="#presetData$74">#</a></span> <code><strong>presetData</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>{}</code></span> </summary> <ul><p><span>Partial</span>&lt;<a href="#Preset$52">Preset</a>&gt;</p> </ul></details> <p><strong>createWithDetail</strong><em>(detail, presetData)</em> &nbsp;=&gt; <ul><a href="#Preset$52">Preset</a></ul></p></p> </ul></details><details id="createWithDetailData$75" title="Method" ><summary><span><a href="#createWithDetailData$75">#</a></span> <code><strong>createWithDetailData</strong></code><em>(data, presetData)</em> </summary> <a href=""></a> <ul> <p> <details id="data$77" title="Parameter" ><summary><span><a href="#data$77">#</a></span> <code><strong>data</strong></code> </summary> <ul><p><a href="#Detail$51">Detail</a> [<code>"data"</code>]</p> </ul></details><details id="presetData$78" title="Parameter" ><summary><span><a href="#presetData$78">#</a></span> <code><strong>presetData</strong></code> </summary> <ul><p><span>Partial</span>&lt;<a href="#Preset$52">Preset</a>&gt;</p> </ul></details> <p><strong>createWithDetailData</strong><em>(data, presetData)</em> &nbsp;=&gt; <ul><a href="#Preset$52">Preset</a></ul></p></p> </ul></details><details id="emit$150" title="Method" ><summary><span><a href="#emit$150">#</a></span> <code><strong>emit</strong></code><em>(eventName, args)</em> </summary> <a href=""></a> <ul> <p> <details id="eventName$153" title="Parameter" ><summary><span><a href="#eventName$153">#</a></span> <code><strong>eventName</strong></code> </summary> <ul><p><a href="#K$152">K</a></p> </ul></details><details id="args$154" title="Parameter" ><summary><span><a href="#args$154">#</a></span> <code><strong>args</strong></code> </summary> <ul><p><span>Parameters</span>&lt;<a href="#BasePresetsEvents$35">BasePresetsEvents</a>&lt;<a href="#Preset$52">Preset</a>, <a href="#Detail$51">Detail</a>&gt; [<a href="#K$152">K</a>]&gt;</p> </ul></details> <p><strong>emit</strong>&lt;<span>K</span>&gt;<em>(eventName, args)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="equals$66" title="Method" ><summary><span><a href="#equals$66">#</a></span> <code><strong>equals</strong></code><em>(other)</em> </summary> <a href=""></a> <ul> <p> <details id="other$68" title="Parameter" ><summary><span><a href="#other$68">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</p> </ul></details> <p><strong>equals</strong><em>(other)</em> &nbsp;=&gt; <ul>boolean</ul></p></p> </ul></details><details id="getByDetail$83" title="Method" ><summary><span><a href="#getByDetail$83">#</a></span> <code><strong>getByDetail</strong></code><em>(detail)</em> </summary> <a href=""></a> <ul> <p> <details id="detail$85" title="Parameter" ><summary><span><a href="#detail$85">#</a></span> <code><strong>detail</strong></code> </summary> <ul><p><a href="#Detail$51">Detail</a></p> </ul></details> <p><strong>getByDetail</strong><em>(detail)</em> &nbsp;=&gt; <ul>undefined | <a href="#Preset$52">Preset</a></ul></p></p> </ul></details><details id="getById$124" title="Method" ><summary><span><a href="#getById$124">#</a></span> <code><strong>getById</strong></code><em>(itemId)</em> </summary> <a href=""></a> <ul> <p> <details id="itemId$127" title="Parameter" ><summary><span><a href="#itemId$127">#</a></span> <code><strong>itemId</strong></code> </summary> <ul><p>string | <code>false</code></p> </ul></details> <p><strong>getById</strong>&lt;<span>U</span><span>&nbsp;extends&nbsp;</span> <a href="#BasePreset$1">BasePreset</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#U$126">U</a>&gt;&gt;<em>(itemId)</em> &nbsp;=&gt; <ul><a href="#U$126">U</a></ul></p></p> </ul></details><details id="hasId$133" title="Method" ><summary><span><a href="#hasId$133">#</a></span> <code><strong>hasId</strong></code><em>(itemId)</em> </summary> <a href=""></a> <ul> <p> <details id="itemId$135" title="Parameter" ><summary><span><a href="#itemId$135">#</a></span> <code><strong>itemId</strong></code> </summary> <ul><p>string</p> </ul></details> <p><strong>hasId</strong><em>(itemId)</em> &nbsp;=&gt; <ul>boolean</ul></p></p> </ul></details><details id="insertAfterIndex$144" title="Method" ><summary><span><a href="#insertAfterIndex$144">#</a></span> <code><strong>insertAfterIndex</strong></code><em>(index, newItem)</em> </summary> <a href=""></a> <ul> <p> <details id="index$146" title="Parameter" ><summary><span><a href="#index$146">#</a></span> <code><strong>index</strong></code> </summary> <ul><p>number</p> </ul></details><details id="newItem$147" title="Parameter" ><summary><span><a href="#newItem$147">#</a></span> <code><strong>newItem</strong></code> </summary> <ul><p><a href="#Preset$52">Preset</a></p> </ul></details> <p><strong>insertAfterIndex</strong><em>(index, newItem)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt; &amp; <span>Partial</span>&lt;<a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;&gt; &amp; {<p> <details id="items$149" title="Property" ><summary><span><a href="#items$149">#</a></span> <code><strong>items</strong></code> </summary> <a href=""></a> <ul><p><a href="#Preset$52">Preset</a> []</p> </ul></details></p>}</ul></p></p> </ul></details><details id="insertAt$86" title="Method" ><summary><span><a href="#insertAt$86">#</a></span> <code><strong>insertAt</strong></code><em>(index, newPreset)</em> </summary> <a href=""></a> <ul> <p> <details id="index$88" title="Parameter" ><summary><span><a href="#index$88">#</a></span> <code><strong>index</strong></code> </summary> <ul><p>number</p> </ul></details><details id="newPreset$89" title="Parameter" ><summary><span><a href="#newPreset$89">#</a></span> <code><strong>newPreset</strong></code> </summary> <ul><p><a href="#Preset$52">Preset</a></p> </ul></details> <p><strong>insertAt</strong><em>(index, newPreset)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt; &amp; <span>Partial</span>&lt;<a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;&gt; &amp; {<p> <details id="items$91" title="Property" ><summary><span><a href="#items$91">#</a></span> <code><strong>items</strong></code> </summary> <a href=""></a> <ul><p><a href="#Preset$52">Preset</a> []</p> </ul></details></p>}</ul></p></p> </ul></details><details id="mergeEach$141" title="Method" ><summary><span><a href="#mergeEach$141">#</a></span> <code><strong>mergeEach</strong></code><em>(data)</em> </summary> <a href=""></a> <ul> <p> <details id="data$143" title="Parameter" ><summary><span><a href="#data$143">#</a></span> <code><strong>data</strong></code> </summary> <ul><p><span>Partial</span>&lt;<a href="#Preset$52">Preset</a>&gt;</p> </ul></details> <p><strong>mergeEach</strong><em>(data)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="off$161" title="Method" ><summary><span><a href="#off$161">#</a></span> <code><strong>off</strong></code><em>(eventName, callback)</em> </summary> <a href=""></a> <ul> <p> <details id="eventName$164" title="Parameter" ><summary><span><a href="#eventName$164">#</a></span> <code><strong>eventName</strong></code> </summary> <ul><p><a href="#K$163">K</a></p> </ul></details><details id="callback$165" title="Parameter" ><summary><span><a href="#callback$165">#</a></span> <code><strong>callback</strong></code> </summary> <ul><p><a href="#BasePresetsEvents$35">BasePresetsEvents</a>&lt;<a href="#Preset$52">Preset</a>, <a href="#Detail$51">Detail</a>&gt; [<a href="#K$163">K</a>]</p> </ul></details> <p><strong>off</strong>&lt;<span>K</span>&gt;<em>(eventName, callback)</em> &nbsp;=&gt; <ul>undefined | <a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="on$155" title="Method" ><summary><span><a href="#on$155">#</a></span> <code><strong>on</strong></code><em>(eventName, callback, options)</em> </summary> <a href=""></a> <ul> <p> <details id="eventName$158" title="Parameter" ><summary><span><a href="#eventName$158">#</a></span> <code><strong>eventName</strong></code> </summary> <ul><p><a href="#K$157">K</a></p> </ul></details><details id="callback$159" title="Parameter" ><summary><span><a href="#callback$159">#</a></span> <code><strong>callback</strong></code> </summary> <ul><p><a href="#BasePresetsEvents$35">BasePresetsEvents</a>&lt;<a href="#Preset$52">Preset</a>, <a href="#Detail$51">Detail</a>&gt; [<a href="#K$157">K</a>]</p> </ul></details><details id="options$160" title="Parameter" ><summary><span><a href="#options$160">#</a></span> <code><strong>options</strong></code> </summary> <ul><p><span>EventEmitterOptions</span></p> </ul></details> <p><strong>on</strong>&lt;<span>K</span>&gt;<em>(eventName, callback, options)</em> &nbsp;=&gt; <ul><span>Off</span></ul></p></p> </ul></details><details id="once$166" title="Method" ><summary><span><a href="#once$166">#</a></span> <code><strong>once</strong></code><em>(eventName, callback)</em> </summary> <a href=""></a> <ul> <p> <details id="eventName$169" title="Parameter" ><summary><span><a href="#eventName$169">#</a></span> <code><strong>eventName</strong></code> </summary> <ul><p><a href="#K$168">K</a></p> </ul></details><details id="callback$170" title="Parameter" ><summary><span><a href="#callback$170">#</a></span> <code><strong>callback</strong></code> </summary> <ul><p><a href="#BasePresetsEvents$35">BasePresetsEvents</a>&lt;<a href="#Preset$52">Preset</a>, <a href="#Detail$51">Detail</a>&gt; [<a href="#K$168">K</a>]</p> </ul></details> <p><strong>once</strong>&lt;<span>K</span>&gt;<em>(eventName, callback)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="removeById$92" title="Method" ><summary><span><a href="#removeById$92">#</a></span> <code><strong>removeById</strong></code><em>(presetId, fallbackPresetId)</em> </summary> <a href=""></a> <ul> <p> <details id="presetId$94" title="Parameter" ><summary><span><a href="#presetId$94">#</a></span> <code><strong>presetId</strong></code> </summary> <ul><p>string</p> </ul></details><details id="fallbackPresetId$95" title="Parameter" ><summary><span><a href="#fallbackPresetId$95">#</a></span> <code><strong>fallbackPresetId</strong></code> </summary> <ul><p>string</p> </ul></details> <p><strong>removeById</strong><em>(presetId, fallbackPresetId)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt; &amp; <span>Partial</span>&lt;<a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;&gt; &amp; {<p> <details id="items$97" title="Property" ><summary><span><a href="#items$97">#</a></span> <code><strong>items</strong></code> </summary> <a href=""></a> <ul><p><a href="#Preset$52">Preset</a> []</p> </ul></details></p>}</ul></p></p> </ul></details><details id="renamePresetRandom$110" title="Method" ><summary><span><a href="#renamePresetRandom$110">#</a></span> <code><strong>renamePresetRandom</strong></code><em>(presetId, useEmoji)</em> </summary> <a href=""></a> <ul> <p> <details id="presetId$112" title="Parameter" ><summary><span><a href="#presetId$112">#</a></span> <code><strong>presetId</strong></code> </summary> <ul><p>string</p> </ul></details><details id="useEmoji$113" title="Parameter" ><summary><span><a href="#useEmoji$113">#</a></span> <code><strong>useEmoji</strong></code> </summary> <ul><p>boolean</p> </ul></details> <p><strong>renamePresetRandom</strong><em>(presetId, useEmoji)</em> &nbsp;=&gt; <ul>void</ul></p></p> </ul></details><details id="restoreSpare$79" title="Method" ><summary><span><a href="#restoreSpare$79">#</a></span> <code><strong>restoreSpare</strong></code><em>(newDetail, bySelect)</em> </summary> <a href=""></a> <ul> <p> <details id="newDetail$81" title="Parameter" ><summary><span><a href="#newDetail$81">#</a></span> <code><strong>newDetail</strong></code> </summary> <ul><p><a href="#Detail$51">Detail</a></p> </ul></details><details id="bySelect$82" title="Parameter" ><summary><span><a href="#bySelect$82">#</a></span> <code><strong>bySelect</strong></code> </summary> <ul><p>boolean</p> </ul></details> <p><strong>restoreSpare</strong><em>(newDetail, bySelect)</em> &nbsp;=&gt; <ul>undefined | <a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="savePreset$114" title="Method" ><summary><span><a href="#savePreset$114">#</a></span> <code><strong>savePreset</strong></code><em>(presetId)</em> </summary> <a href=""></a> <ul> <p> <details id="presetId$116" title="Parameter" ><summary><span><a href="#presetId$116">#</a></span> <code><strong>presetId</strong></code> </summary> <ul><p>string</p> </ul></details> <p><strong>savePreset</strong><em>(presetId)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="selectPreset$104" title="Method" ><summary><span><a href="#selectPreset$104">#</a></span> <code><strong>selectPreset</strong></code><em>(nextPresetId, byClick, newDetail, byGroup)</em> </summary> <a href=""></a> <ul> <p> <details id="nextPresetId$106" title="Parameter" ><summary><span><a href="#nextPresetId$106">#</a></span> <code><strong>nextPresetId</strong></code> </summary> <ul><p>string | <code>false</code></p> </ul></details><details id="byClick$107" title="Parameter" ><summary><span><a href="#byClick$107">#</a></span> <code><strong>byClick</strong></code> </summary> <ul><p>boolean</p> </ul></details><details id="newDetail$108" title="Parameter" ><summary><span><a href="#newDetail$108">#</a></span> <code><strong>newDetail</strong></code> </summary> <ul><p><a href="#Detail$51">Detail</a></p> </ul></details><details id="byGroup$109" title="Parameter" ><summary><span><a href="#byGroup$109">#</a></span> <code><strong>byGroup</strong></code> </summary> <ul><p>boolean</p> </ul></details> <p><strong>selectPreset</strong><em>(nextPresetId, byClick, newDetail, byGroup)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="setById$128" title="Method" ><summary><span><a href="#setById$128">#</a></span> <code><strong>setById</strong></code><em>(itemId, newItem)</em> </summary> <a href=""></a> <ul> <p> <details id="itemId$131" title="Parameter" ><summary><span><a href="#itemId$131">#</a></span> <code><strong>itemId</strong></code> </summary> <ul><p>string</p> </ul></details><details id="newItem$132" title="Parameter" ><summary><span><a href="#newItem$132">#</a></span> <code><strong>newItem</strong></code> </summary> <ul><p><a href="#U$130">U</a></p> </ul></details> <p><strong>setById</strong>&lt;<span>U</span><span>&nbsp;extends&nbsp;</span> <a href="#BasePreset$1">BasePreset</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#U$130">U</a>&gt;&gt;<em>(itemId, newItem)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="setDetailData$98" title="Method" ><summary><span><a href="#setDetailData$98">#</a></span> <code><strong>setDetailData</strong></code><em>(newDetailData, bySelect, byIntent, byGroup)</em> </summary> <a href=""></a> <ul> <p> <details id="newDetailData$100" title="Parameter" ><summary><span><a href="#newDetailData$100">#</a></span> <code><strong>newDetailData</strong></code> </summary> <ul><p><a href="#Detail$51">Detail</a> [<code>"data"</code>]</p> </ul></details><details id="bySelect$101" title="Parameter" ><summary><span><a href="#bySelect$101">#</a></span> <code><strong>bySelect</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>false</code></span> </summary> <ul><p>boolean</p> </ul></details><details id="byIntent$102" title="Parameter" ><summary><span><a href="#byIntent$102">#</a></span> <code><strong>byIntent</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>false</code></span> </summary> <ul><p>boolean</p> </ul></details><details id="byGroup$103" title="Parameter" ><summary><span><a href="#byGroup$103">#</a></span> <code><strong>byGroup</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>false</code></span> </summary> <ul><p>boolean</p> </ul></details> <p><strong>setDetailData</strong><em>(newDetailData, bySelect, byIntent, byGroup)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="toJSON$64" title="Method" ><summary><span><a href="#toJSON$64">#</a></span> <code><strong>toJSON</strong></code><em>()</em> </summary> <a href=""></a> <ul> <p> <p><strong>toJSON</strong><em>()</em> &nbsp;=&gt; <ul>any</ul></p></p> </ul></details><details id="updateById$136" title="Method" ><summary><span><a href="#updateById$136">#</a></span> <code><strong>updateById</strong></code><em>(itemId, updateData)</em> </summary> <a href=""></a> <ul> <p> <details id="itemId$139" title="Parameter" ><summary><span><a href="#itemId$139">#</a></span> <code><strong>itemId</strong></code> </summary> <ul><p>string</p> </ul></details><details id="updateData$140" title="Parameter" ><summary><span><a href="#updateData$140">#</a></span> <code><strong>updateData</strong></code> </summary> <ul><p><span>Partial</span>&lt;<a href="#U$138">U</a>&gt;</p> </ul></details> <p><strong>updateById</strong>&lt;<span>U</span><span>&nbsp;extends&nbsp;</span> <a href="#BasePreset$1">BasePreset</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#U$138">U</a>&gt;&gt;<em>(itemId, updateData)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details></p></ul></details><details id="PresetsGroupDetail$177" title="Class" ><summary><span><a href="#PresetsGroupDetail$177">#</a></span> <code><strong>PresetsGroupDetail</strong></code> </summary> <a href=""></a> <ul> <p> <details id="constructor$178" title="Constructor" ><summary><span><a href="#constructor$178">#</a></span> <code><strong>constructor</strong></code><em>(data)</em> </summary> <a href=""></a> <ul> <p> <details id="new PresetsGroupDetail$179" title="ConstructorSignature" ><summary><span><a href="#new PresetsGroupDetail$179">#</a></span> <code><strong>new PresetsGroupDetail</strong></code><em>()</em> </summary> <ul><p><a href="#PresetsGroupDetail$177">PresetsGroupDetail</a></p> <p> <details id="data$180" title="Parameter" ><summary><span><a href="#data$180">#</a></span> <code><strong>data</strong></code> </summary> <ul><p>any</p> </ul></details></p> </ul></details></p> </ul></details><details id="data$198" title="Property" ><summary><span><a href="#data$198">#</a></span> <code><strong>data</strong></code> </summary> <a href=""></a> <ul><p><a href="#PresetsGroupData$174">PresetsGroupData</a></p> </ul></details><details id="applyData$186" title="Method" ><summary><span><a href="#applyData$186">#</a></span> <code><strong>applyData</strong></code><em>(data)</em> </summary> <a href=""></a> <ul> <p> <details id="data$188" title="Parameter" ><summary><span><a href="#data$188">#</a></span> <code><strong>data</strong></code> </summary> <ul><p><a href="#PresetsGroupData$174">PresetsGroupData</a></p> </ul></details> <p><strong>applyData</strong><em>(data)</em> &nbsp;=&gt; <ul>undefined | <span>Map</span>&lt;string, <a href="#BasePresets$47">BasePresets</a>&lt;any, <a href="#BasePreset$1">BasePreset</a>&lt;any&gt;, <span>Class</span>&lt;<a href="#BasePreset$1">BasePreset</a>&lt;any&gt;&gt;&gt;&gt;</ul></p></p> </ul></details><details id="collectData$183" title="Method" ><summary><span><a href="#collectData$183">#</a></span> <code><strong>collectData</strong></code><em>(sources)</em> </summary> <a href=""></a> <ul> <p> <details id="sources$185" title="Parameter" ><summary><span><a href="#sources$185">#</a></span> <code><strong>sources</strong></code> </summary> <ul><p><span>Map</span>&lt;string, <a href="#BasePresets$47">BasePresets</a>&lt;any, <a href="#BasePreset$1">BasePreset</a>&lt;any&gt;, <span>Class</span>&lt;<a href="#BasePreset$1">BasePreset</a>&lt;any&gt;&gt;&gt;&gt;</p> </ul></details> <p><strong>collectData</strong><em>(sources)</em> &nbsp;=&gt; <ul>any</ul></p></p> </ul></details><details id="copy$199" title="Method" ><summary><span><a href="#copy$199">#</a></span> <code><strong>copy</strong></code><em>()</em> </summary> <a href=""></a> <ul> <p> <p><strong>copy</strong><em>()</em> &nbsp;=&gt; <ul><a href="#PresetsGroupData$174">PresetsGroupData</a></ul></p></p> </ul></details><details id="equals$189" title="Method" ><summary><span><a href="#equals$189">#</a></span> <code><strong>equals</strong></code><em>(other)</em> </summary> <a href=""></a> <ul> <p> <details id="other$191" title="Parameter" ><summary><span><a href="#other$191">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#PresetsGroupData$174">PresetsGroupData</a> | <a href="#PresetsGroupDetail$177">PresetsGroupDetail</a></p> </ul></details> <p><strong>equals</strong><em>(other)</em> &nbsp;=&gt; <ul>boolean</ul></p></p> </ul></details><details id="merge$195" title="Method" ><summary><span><a href="#merge$195">#</a></span> <code><strong>merge</strong></code><em>(other)</em> </summary> <a href=""></a> <ul> <p> <details id="other$197" title="Parameter" ><summary><span><a href="#other$197">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#PresetsGroupData$174">PresetsGroupData</a> | <a href="#PresetsGroupDetail$177">PresetsGroupDetail</a></p> </ul></details> <p><strong>merge</strong><em>(other)</em> &nbsp;=&gt; <ul><a href="#PresetsGroupDetail$177">PresetsGroupDetail</a></ul></p></p> </ul></details><details id="satisfies$192" title="Method" ><summary><span><a href="#satisfies$192">#</a></span> <code><strong>satisfies</strong></code><em>(other)</em> </summary> <a href=""></a> <ul> <p> <details id="other$194" title="Parameter" ><summary><span><a href="#other$194">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#PresetsGroupData$174">PresetsGroupData</a> | <a href="#PresetsGroupDetail$177">PresetsGroupDetail</a></p> </ul></details> <p><strong>satisfies</strong><em>(other)</em> &nbsp;=&gt; <ul>boolean</ul></p></p> </ul></details><details id="toJSON$181" title="Method" ><summary><span><a href="#toJSON$181">#</a></span> <code><strong>toJSON</strong></code><em>()</em> </summary> <a href=""></a> <ul> <p> <p><strong>toJSON</strong><em>()</em> &nbsp;=&gt; <ul>any</ul></p></p> </ul></details></p></ul></details><details id="BasePresetsEvents$35" title="Interface" ><summary><span><a href="#BasePresetsEvents$35">#</a></span> <code><strong>BasePresetsEvents</strong></code> </summary> <a href=""></a> <ul> <p> <details id="select$36" title="Property" ><summary><span><a href="#select$36">#</a></span> <code><strong>select</strong></code> </summary> <a href=""></a> <ul><p><details id="__type$37" title="Function" ><summary><span><a href="#__type$37">#</a></span> <em>(next, prev, nextDetail, prevDetail, byClick, byGroup)</em> </summary> <ul> <p> <details id="next$39" title="Parameter" ><summary><span><a href="#next$39">#</a></span> <code><strong>next</strong></code> </summary> <ul><p><code>null</code> | <a href="#Preset$45">Preset</a></p> </ul></details><details id="prev$40" title="Parameter" ><summary><span><a href="#prev$40">#</a></span> <code><strong>prev</strong></code> </summary> <ul><p><code>null</code> | <a href="#Preset$45">Preset</a></p> </ul></details><details id="nextDetail$41" title="Parameter" ><summary><span><a href="#nextDetail$41">#</a></span> <code><strong>nextDetail</strong></code> </summary> <ul><p>undefined | <code>null</code> | <a href="#Detail$46">Detail</a></p> </ul></details><details id="prevDetail$42" title="Parameter" ><summary><span><a href="#prevDetail$42">#</a></span> <code><strong>prevDetail</strong></code> </summary> <ul><p><code>null</code> | <a href="#Detail$46">Detail</a></p> </ul></details><details id="byClick$43" title="Parameter" ><summary><span><a href="#byClick$43">#</a></span> <code><strong>byClick</strong></code> </summary> <ul><p>undefined | boolean</p> </ul></details><details id="byGroup$44" title="Parameter" ><summary><span><a href="#byGroup$44">#</a></span> <code><strong>byGroup</strong></code> </summary> <ul><p>undefined | boolean</p> </ul></details> <p><strong></strong><em>(next, prev, nextDetail, prevDetail, byClick, byGroup)</em> &nbsp;=&gt; <ul>void</ul></p></p> </ul></details></p> </ul></details></p></ul></details><details id="PresetsGroupData$174" title="Interface" ><summary><span><a href="#PresetsGroupData$174">#</a></span> <code><strong>PresetsGroupData</strong></code> </summary> <a href=""></a> <ul> <p> <details id="details$175" title="Property" ><summary><span><a href="#details$175">#</a></span> <code><strong>details</strong></code> </summary> <a href=""></a> <ul><p>[ string, <a href="#AbstractDetail$15">AbstractDetail</a>&lt;any&gt; ] []</p> </ul></details><details id="sources$176" title="Property" ><summary><span><a href="#sources$176">#</a></span> <code><strong>sources</strong></code> </summary> <a href=""></a> <ul><p><span>Map</span>&lt;string, <a href="#BasePresets$47">BasePresets</a>&lt;any, <a href="#BasePreset$1">BasePreset</a>&lt;any&gt;, <span>Class</span>&lt;<a href="#BasePreset$1">BasePreset</a>&lt;any&gt;&gt;&gt;&gt;</p> </ul></details></p></ul></details></p>
<p> <details id="AbstractDetail$15" title="Class" ><summary><span><a href="#AbstractDetail$15">#</a></span> <code><strong>AbstractDetail</strong></code> </summary> <a href="src/abstract-presets.ts#L31">src/abstract-presets.ts#L31</a> <ul> <p> <details id="constructor$16" title="Constructor" ><summary><span><a href="#constructor$16">#</a></span> <code><strong>constructor</strong></code><em>(data)</em> </summary> <a href="src/abstract-presets.ts#L34">src/abstract-presets.ts#L34</a> <ul> <p> <details id="new AbstractDetail$17" title="ConstructorSignature" ><summary><span><a href="#new AbstractDetail$17">#</a></span> <code><strong>new AbstractDetail</strong></code><em>()</em> </summary> <ul><p><a href="#AbstractDetail$15">AbstractDetail</a>&lt;<a href="#T$18">T</a>&gt;</p> <p> <details id="data$19" title="Parameter" ><summary><span><a href="#data$19">#</a></span> <code><strong>data</strong></code> </summary> <ul><p><a href="#AbstractDetail$15">AbstractDetail</a>&lt;<a href="#T$18">T</a>&gt; | <a href="#T$18">T</a></p> </ul></details></p> </ul></details></p> </ul></details><details id="data$20" title="Property" ><summary><span><a href="#data$20">#</a></span> <code><strong>data</strong></code> </summary> <a href="src/abstract-presets.ts#L32">src/abstract-presets.ts#L32</a> <ul><p><a href="#T$18">T</a></p> </ul></details><details id="copy$32" title="Method" ><summary><span><a href="#copy$32">#</a></span> <code><strong>copy</strong></code><em>()</em> </summary> <a href="src/abstract-presets.ts#L50">src/abstract-presets.ts#L50</a> <ul> <p> <p><strong>copy</strong><em>()</em> &nbsp;=&gt; <ul><a href="#T$18">T</a></ul></p></p> </ul></details><details id="equals$24" title="Method" ><summary><span><a href="#equals$24">#</a></span> <code><strong>equals</strong></code><em>(other)</em> </summary> <a href="src/abstract-presets.ts#L43">src/abstract-presets.ts#L43</a> <ul> <p> <details id="other$26" title="Parameter" ><summary><span><a href="#other$26">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#AbstractDetail$15">AbstractDetail</a>&lt;<a href="#T$18">T</a>&gt; | <a href="#T$18">T</a></p> </ul></details> <p><strong>equals</strong><em>(other)</em> &nbsp;=&gt; <ul>boolean</ul></p></p> </ul></details><details id="merge$21" title="Method" ><summary><span><a href="#merge$21">#</a></span> <code><strong>merge</strong></code><em>(other)</em> </summary> <a href="src/abstract-presets.ts#L42">src/abstract-presets.ts#L42</a> <ul> <p> <details id="other$23" title="Parameter" ><summary><span><a href="#other$23">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#AbstractDetail$15">AbstractDetail</a>&lt;<a href="#T$18">T</a>&gt; | <a href="#T$18">T</a></p> </ul></details> <p><strong>merge</strong><em>(other)</em> &nbsp;=&gt; <ul>any</ul></p></p> </ul></details><details id="satisfies$27" title="Method" ><summary><span><a href="#satisfies$27">#</a></span> <code><strong>satisfies</strong></code><em>(other)</em> </summary> <a href="src/abstract-presets.ts#L44">src/abstract-presets.ts#L44</a> <ul> <p> <details id="other$29" title="Parameter" ><summary><span><a href="#other$29">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#AbstractDetail$15">AbstractDetail</a>&lt;<a href="#T$18">T</a>&gt; | <a href="#T$18">T</a></p> </ul></details> <p><strong>satisfies</strong><em>(other)</em> &nbsp;=&gt; <ul>boolean</ul></p></p> </ul></details><details id="toJSON$30" title="Method" ><summary><span><a href="#toJSON$30">#</a></span> <code><strong>toJSON</strong></code><em>()</em> </summary> <a href="src/abstract-presets.ts#L46">src/abstract-presets.ts#L46</a> <ul> <p> <p><strong>toJSON</strong><em>()</em> &nbsp;=&gt; <ul><a href="#T$18">T</a></ul></p></p> </ul></details></p></ul></details><details id="BasePreset$1" title="Class" ><summary><span><a href="#BasePreset$1">#</a></span> <code><strong>BasePreset</strong></code> </summary> <a href="src/abstract-presets.ts#L7">src/abstract-presets.ts#L7</a> <ul> <p> <details id="constructor$2" title="Constructor" ><summary><span><a href="#constructor$2">#</a></span> <code><strong>constructor</strong></code><em>(data)</em> </summary> <a href="src/abstract-presets.ts#L15">src/abstract-presets.ts#L15</a> <ul> <p> <details id="new BasePreset$3" title="ConstructorSignature" ><summary><span><a href="#new BasePreset$3">#</a></span> <code><strong>new BasePreset</strong></code><em>()</em> </summary> <ul><p><a href="#BasePreset$1">BasePreset</a>&lt;<a href="#T$4">T</a>&gt;</p> <p> <details id="data$5" title="Parameter" ><summary><span><a href="#data$5">#</a></span> <code><strong>data</strong></code> </summary> <ul><p><span>Partial</span>&lt;<a href="#BasePreset$1">BasePreset</a>&lt;<a href="#T$4">T</a>&gt;&gt;</p> </ul></details></p> </ul></details></p> </ul></details><details id="detail$7" title="Property" ><summary><span><a href="#detail$7">#</a></span> <code><strong>detail</strong></code> </summary> <a href="src/abstract-presets.ts#L9">src/abstract-presets.ts#L9</a> <ul><p><a href="#T$4">T</a></p> </ul></details><details id="id$6" title="Property" ><summary><span><a href="#id$6">#</a></span> <code><strong>id</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>...</code></span> </summary> <a href="src/abstract-presets.ts#L8">src/abstract-presets.ts#L8</a> <ul><p>string</p> </ul></details><details id="isDraft$9" title="Property" ><summary><span><a href="#isDraft$9">#</a></span> <code><strong>isDraft</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>true</code></span> </summary> <a href="src/abstract-presets.ts#L12">src/abstract-presets.ts#L12</a> <ul><p>boolean</p> </ul></details><details id="isIntent$8" title="Property" ><summary><span><a href="#isIntent$8">#</a></span> <code><strong>isIntent</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>false</code></span> </summary> <a href="src/abstract-presets.ts#L11">src/abstract-presets.ts#L11</a> <ul><p>boolean</p> </ul></details><details id="isRemoved$10" title="Property" ><summary><span><a href="#isRemoved$10">#</a></span> <code><strong>isRemoved</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>false</code></span> </summary> <a href="src/abstract-presets.ts#L13">src/abstract-presets.ts#L13</a> <ul><p>boolean</p> </ul></details><details id="equals$11" title="Method" ><summary><span><a href="#equals$11">#</a></span> <code><strong>equals</strong></code><em>(other)</em> </summary> <a href="src/abstract-presets.ts#L19">src/abstract-presets.ts#L19</a> <ul> <p> <details id="other$13" title="Parameter" ><summary><span><a href="#other$13">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#BasePreset$1">BasePreset</a>&lt;any&gt;</p> </ul></details> <p><strong>equals</strong><em>(other)</em> &nbsp;=&gt; <ul>boolean</ul></p></p> </ul></details></p></ul></details><details id="BasePresets$47" title="Class" ><summary><span><a href="#BasePresets$47">#</a></span> <code><strong>BasePresets</strong></code> </summary> <a href="src/abstract-presets.ts#L67">src/abstract-presets.ts#L67</a> <ul> <p> <details id="constructor$49" title="Constructor" ><summary><span><a href="#constructor$49">#</a></span> <code><strong>constructor</strong></code><em>(data, Preset, Detail)</em> </summary> <a href="src/abstract-presets.ts#L75">src/abstract-presets.ts#L75</a> <ul> <p> <details id="new BasePresets$50" title="ConstructorSignature" ><summary><span><a href="#new BasePresets$50">#</a></span> <code><strong>new BasePresets</strong></code><em>()</em> </summary> <ul><p><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</p> <p> <details id="data$54" title="Parameter" ><summary><span><a href="#data$54">#</a></span> <code><strong>data</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>{}</code></span> </summary> <ul><p><span>Partial</span>&lt;<a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;&gt;</p> </ul></details><details id="Preset$55" title="Parameter" ><summary><span><a href="#Preset$55">#</a></span> <code><strong>Preset</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>...</code></span> </summary> <ul><p><a href="#PresetClass$53">PresetClass</a></p> </ul></details><details id="Detail$56" title="Parameter" ><summary><span><a href="#Detail$56">#</a></span> <code><strong>Detail</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>...</code></span> </summary> <ul><p><span>Class</span>&lt;<a href="#Detail$51">Detail</a>&gt;</p> </ul></details></p> </ul></details></p> </ul></details><details id="Detail$57" title="Property" ><summary><span><a href="#Detail$57">#</a></span> <code><strong>Detail</strong></code> </summary> <a href="src/abstract-presets.ts#L68">src/abstract-presets.ts#L68</a> <ul><p><span>Class</span>&lt;<a href="#Detail$51">Detail</a>&gt;</p> </ul></details><details id="Preset$58" title="Property" ><summary><span><a href="#Preset$58">#</a></span> <code><strong>Preset</strong></code> </summary> <a href="src/abstract-presets.ts#L69">src/abstract-presets.ts#L69</a> <ul><p><a href="#PresetClass$53">PresetClass</a></p> </ul></details><details id="ctor$118" title="Property" ><summary><span><a href="#ctor$118">#</a></span> <code><strong>ctor</strong></code> </summary> <a href=""></a> <ul><p><span>Class</span>&lt;<a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;&gt;</p> </ul></details><details id="items$117" title="Property" ><summary><span><a href="#items$117">#</a></span> <code><strong>items</strong></code> </summary> <a href=""></a> <ul><p><a href="#Preset$52">Preset</a> []</p> </ul></details><details id="selectedPresetId$63" title="Property" ><summary><span><a href="#selectedPresetId$63">#</a></span> <code><strong>selectedPresetId</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>false</code></span> </summary> <a href="src/abstract-presets.ts#L73">src/abstract-presets.ts#L73</a> <ul><p>string | <code>false</code></p> </ul></details><details id="spare$59" title="Property" ><summary><span><a href="#spare$59">#</a></span> <code><strong>spare</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>null</code></span> </summary> <a href="src/abstract-presets.ts#L72">src/abstract-presets.ts#L72</a> <ul><p><code>null</code> | {<p> <details id="index$61" title="Property" ><summary><span><a href="#index$61">#</a></span> <code><strong>index</strong></code> </summary> <a href="src/abstract-presets.ts#L72">src/abstract-presets.ts#L72</a> <ul><p>number</p> </ul></details><details id="preset$62" title="Property" ><summary><span><a href="#preset$62">#</a></span> <code><strong>preset</strong></code> </summary> <a href="src/abstract-presets.ts#L72">src/abstract-presets.ts#L72</a> <ul><p><a href="#Preset$52">Preset</a></p> </ul></details></p>}</p> </ul></details><details id="onceSymbol$48" title="Property" ><summary><span><a href="#onceSymbol$48">#</a></span> <code><strong>onceSymbol</strong></code> </summary> <a href=""></a> <ul><p>symbol</p> </ul></details><details id="selectedPreset$69" title="Accessor" ><summary><span><a href="#selectedPreset$69">#</a></span> <code><strong>selectedPreset</strong></code> </summary> <a href="src/abstract-presets.ts#L124">src/abstract-presets.ts#L124</a> <ul> </ul></details><details id="add$119" title="Method" ><summary><span><a href="#add$119">#</a></span> <code><strong>add</strong></code><em>(item)</em> </summary> <a href=""></a> <ul> <p> <details id="item$121" title="Parameter" ><summary><span><a href="#item$121">#</a></span> <code><strong>item</strong></code> </summary> <ul><p><a href="#Preset$52">Preset</a></p> </ul></details> <p><strong>add</strong><em>(item)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt; &amp; <span>Partial</span>&lt;<a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;&gt; &amp; {<p> <details id="items$123" title="Property" ><summary><span><a href="#items$123">#</a></span> <code><strong>items</strong></code> </summary> <a href=""></a> <ul><p><a href="#Preset$52">Preset</a> []</p> </ul></details></p>}</ul></p></p> </ul></details><details id="createWithDetail$71" title="Method" ><summary><span><a href="#createWithDetail$71">#</a></span> <code><strong>createWithDetail</strong></code><em>(detail, presetData)</em> </summary> <a href="src/abstract-presets.ts#L133">src/abstract-presets.ts#L133</a> <ul> <p> <details id="detail$73" title="Parameter" ><summary><span><a href="#detail$73">#</a></span> <code><strong>detail</strong></code> </summary> <ul><p><a href="#Detail$51">Detail</a> [<code>"data"</code>]</p> </ul></details><details id="presetData$74" title="Parameter" ><summary><span><a href="#presetData$74">#</a></span> <code><strong>presetData</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>{}</code></span> </summary> <ul><p><span>Partial</span>&lt;<a href="#Preset$52">Preset</a>&gt;</p> </ul></details> <p><strong>createWithDetail</strong><em>(detail, presetData)</em> &nbsp;=&gt; <ul><a href="#Preset$52">Preset</a></ul></p></p> </ul></details><details id="createWithDetailData$75" title="Method" ><summary><span><a href="#createWithDetailData$75">#</a></span> <code><strong>createWithDetailData</strong></code><em>(data, presetData)</em> </summary> <a href="src/abstract-presets.ts#L137">src/abstract-presets.ts#L137</a> <ul> <p> <details id="data$77" title="Parameter" ><summary><span><a href="#data$77">#</a></span> <code><strong>data</strong></code> </summary> <ul><p><a href="#Detail$51">Detail</a> [<code>"data"</code>]</p> </ul></details><details id="presetData$78" title="Parameter" ><summary><span><a href="#presetData$78">#</a></span> <code><strong>presetData</strong></code> </summary> <ul><p><span>Partial</span>&lt;<a href="#Preset$52">Preset</a>&gt;</p> </ul></details> <p><strong>createWithDetailData</strong><em>(data, presetData)</em> &nbsp;=&gt; <ul><a href="#Preset$52">Preset</a></ul></p></p> </ul></details><details id="emit$150" title="Method" ><summary><span><a href="#emit$150">#</a></span> <code><strong>emit</strong></code><em>(eventName, args)</em> </summary> <a href=""></a> <ul> <p> <details id="eventName$153" title="Parameter" ><summary><span><a href="#eventName$153">#</a></span> <code><strong>eventName</strong></code> </summary> <ul><p><a href="#K$152">K</a></p> </ul></details><details id="args$154" title="Parameter" ><summary><span><a href="#args$154">#</a></span> <code><strong>args</strong></code> </summary> <ul><p><span>Parameters</span>&lt;<a href="#BasePresetsEvents$35">BasePresetsEvents</a>&lt;<a href="#Preset$52">Preset</a>, <a href="#Detail$51">Detail</a>&gt; [<a href="#K$152">K</a>]&gt;</p> </ul></details> <p><strong>emit</strong>&lt;<span>K</span>&gt;<em>(eventName, args)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="equals$66" title="Method" ><summary><span><a href="#equals$66">#</a></span> <code><strong>equals</strong></code><em>(other)</em> </summary> <a href="src/abstract-presets.ts#L111">src/abstract-presets.ts#L111</a> <ul> <p> <details id="other$68" title="Parameter" ><summary><span><a href="#other$68">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</p> </ul></details> <p><strong>equals</strong><em>(other)</em> &nbsp;=&gt; <ul>boolean</ul></p></p> </ul></details><details id="getByDetail$83" title="Method" ><summary><span><a href="#getByDetail$83">#</a></span> <code><strong>getByDetail</strong></code><em>(detail)</em> </summary> <a href="src/abstract-presets.ts#L163">src/abstract-presets.ts#L163</a> <ul> <p> <details id="detail$85" title="Parameter" ><summary><span><a href="#detail$85">#</a></span> <code><strong>detail</strong></code> </summary> <ul><p><a href="#Detail$51">Detail</a></p> </ul></details> <p><strong>getByDetail</strong><em>(detail)</em> &nbsp;=&gt; <ul>undefined | <a href="#Preset$52">Preset</a></ul></p></p> </ul></details><details id="getById$124" title="Method" ><summary><span><a href="#getById$124">#</a></span> <code><strong>getById</strong></code><em>(itemId)</em> </summary> <a href=""></a> <ul> <p> <details id="itemId$127" title="Parameter" ><summary><span><a href="#itemId$127">#</a></span> <code><strong>itemId</strong></code> </summary> <ul><p>string | <code>false</code></p> </ul></details> <p><strong>getById</strong>&lt;<span>U</span><span>&nbsp;extends&nbsp;</span> <a href="#BasePreset$1">BasePreset</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#U$126">U</a>&gt;&gt;<em>(itemId)</em> &nbsp;=&gt; <ul><a href="#U$126">U</a></ul></p></p> </ul></details><details id="hasId$133" title="Method" ><summary><span><a href="#hasId$133">#</a></span> <code><strong>hasId</strong></code><em>(itemId)</em> </summary> <a href=""></a> <ul> <p> <details id="itemId$135" title="Parameter" ><summary><span><a href="#itemId$135">#</a></span> <code><strong>itemId</strong></code> </summary> <ul><p>string</p> </ul></details> <p><strong>hasId</strong><em>(itemId)</em> &nbsp;=&gt; <ul>boolean</ul></p></p> </ul></details><details id="insertAfterIndex$144" title="Method" ><summary><span><a href="#insertAfterIndex$144">#</a></span> <code><strong>insertAfterIndex</strong></code><em>(index, newItem)</em> </summary> <a href=""></a> <ul> <p> <details id="index$146" title="Parameter" ><summary><span><a href="#index$146">#</a></span> <code><strong>index</strong></code> </summary> <ul><p>number</p> </ul></details><details id="newItem$147" title="Parameter" ><summary><span><a href="#newItem$147">#</a></span> <code><strong>newItem</strong></code> </summary> <ul><p><a href="#Preset$52">Preset</a></p> </ul></details> <p><strong>insertAfterIndex</strong><em>(index, newItem)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt; &amp; <span>Partial</span>&lt;<a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;&gt; &amp; {<p> <details id="items$149" title="Property" ><summary><span><a href="#items$149">#</a></span> <code><strong>items</strong></code> </summary> <a href=""></a> <ul><p><a href="#Preset$52">Preset</a> []</p> </ul></details></p>}</ul></p></p> </ul></details><details id="insertAt$86" title="Method" ><summary><span><a href="#insertAt$86">#</a></span> <code><strong>insertAt</strong></code><em>(index, newPreset)</em> </summary> <a href="src/abstract-presets.ts#L175">src/abstract-presets.ts#L175</a> <ul> <p> <details id="index$88" title="Parameter" ><summary><span><a href="#index$88">#</a></span> <code><strong>index</strong></code> </summary> <ul><p>number</p> </ul></details><details id="newPreset$89" title="Parameter" ><summary><span><a href="#newPreset$89">#</a></span> <code><strong>newPreset</strong></code> </summary> <ul><p><a href="#Preset$52">Preset</a></p> </ul></details> <p><strong>insertAt</strong><em>(index, newPreset)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt; &amp; <span>Partial</span>&lt;<a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;&gt; &amp; {<p> <details id="items$91" title="Property" ><summary><span><a href="#items$91">#</a></span> <code><strong>items</strong></code> </summary> <a href=""></a> <ul><p><a href="#Preset$52">Preset</a> []</p> </ul></details></p>}</ul></p></p> </ul></details><details id="mergeEach$141" title="Method" ><summary><span><a href="#mergeEach$141">#</a></span> <code><strong>mergeEach</strong></code><em>(data)</em> </summary> <a href=""></a> <ul> <p> <details id="data$143" title="Parameter" ><summary><span><a href="#data$143">#</a></span> <code><strong>data</strong></code> </summary> <ul><p><span>Partial</span>&lt;<a href="#Preset$52">Preset</a>&gt;</p> </ul></details> <p><strong>mergeEach</strong><em>(data)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="off$161" title="Method" ><summary><span><a href="#off$161">#</a></span> <code><strong>off</strong></code><em>(eventName, callback)</em> </summary> <a href=""></a> <ul> <p> <details id="eventName$164" title="Parameter" ><summary><span><a href="#eventName$164">#</a></span> <code><strong>eventName</strong></code> </summary> <ul><p><a href="#K$163">K</a></p> </ul></details><details id="callback$165" title="Parameter" ><summary><span><a href="#callback$165">#</a></span> <code><strong>callback</strong></code> </summary> <ul><p><a href="#BasePresetsEvents$35">BasePresetsEvents</a>&lt;<a href="#Preset$52">Preset</a>, <a href="#Detail$51">Detail</a>&gt; [<a href="#K$163">K</a>]</p> </ul></details> <p><strong>off</strong>&lt;<span>K</span>&gt;<em>(eventName, callback)</em> &nbsp;=&gt; <ul>undefined | <a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="on$155" title="Method" ><summary><span><a href="#on$155">#</a></span> <code><strong>on</strong></code><em>(eventName, callback, options)</em> </summary> <a href=""></a> <ul> <p> <details id="eventName$158" title="Parameter" ><summary><span><a href="#eventName$158">#</a></span> <code><strong>eventName</strong></code> </summary> <ul><p><a href="#K$157">K</a></p> </ul></details><details id="callback$159" title="Parameter" ><summary><span><a href="#callback$159">#</a></span> <code><strong>callback</strong></code> </summary> <ul><p><a href="#BasePresetsEvents$35">BasePresetsEvents</a>&lt;<a href="#Preset$52">Preset</a>, <a href="#Detail$51">Detail</a>&gt; [<a href="#K$157">K</a>]</p> </ul></details><details id="options$160" title="Parameter" ><summary><span><a href="#options$160">#</a></span> <code><strong>options</strong></code> </summary> <ul><p><span>EventEmitterOptions</span></p> </ul></details> <p><strong>on</strong>&lt;<span>K</span>&gt;<em>(eventName, callback, options)</em> &nbsp;=&gt; <ul><span>Off</span></ul></p></p> </ul></details><details id="once$166" title="Method" ><summary><span><a href="#once$166">#</a></span> <code><strong>once</strong></code><em>(eventName, callback)</em> </summary> <a href=""></a> <ul> <p> <details id="eventName$169" title="Parameter" ><summary><span><a href="#eventName$169">#</a></span> <code><strong>eventName</strong></code> </summary> <ul><p><a href="#K$168">K</a></p> </ul></details><details id="callback$170" title="Parameter" ><summary><span><a href="#callback$170">#</a></span> <code><strong>callback</strong></code> </summary> <ul><p><a href="#BasePresetsEvents$35">BasePresetsEvents</a>&lt;<a href="#Preset$52">Preset</a>, <a href="#Detail$51">Detail</a>&gt; [<a href="#K$168">K</a>]</p> </ul></details> <p><strong>once</strong>&lt;<span>K</span>&gt;<em>(eventName, callback)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="removeById$92" title="Method" ><summary><span><a href="#removeById$92">#</a></span> <code><strong>removeById</strong></code><em>(presetId, fallbackPresetId)</em> </summary> <a href="src/abstract-presets.ts#L182">src/abstract-presets.ts#L182</a> <ul> <p> <details id="presetId$94" title="Parameter" ><summary><span><a href="#presetId$94">#</a></span> <code><strong>presetId</strong></code> </summary> <ul><p>string</p> </ul></details><details id="fallbackPresetId$95" title="Parameter" ><summary><span><a href="#fallbackPresetId$95">#</a></span> <code><strong>fallbackPresetId</strong></code> </summary> <ul><p>string</p> </ul></details> <p><strong>removeById</strong><em>(presetId, fallbackPresetId)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt; &amp; <span>Partial</span>&lt;<a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;&gt; &amp; {<p> <details id="items$97" title="Property" ><summary><span><a href="#items$97">#</a></span> <code><strong>items</strong></code> </summary> <a href=""></a> <ul><p><a href="#Preset$52">Preset</a> []</p> </ul></details></p>}</ul></p></p> </ul></details><details id="renamePresetRandom$110" title="Method" ><summary><span><a href="#renamePresetRandom$110">#</a></span> <code><strong>renamePresetRandom</strong></code><em>(presetId, useEmoji)</em> </summary> <a href="src/abstract-presets.ts#L342">src/abstract-presets.ts#L342</a> <ul> <p> <details id="presetId$112" title="Parameter" ><summary><span><a href="#presetId$112">#</a></span> <code><strong>presetId</strong></code> </summary> <ul><p>string</p> </ul></details><details id="useEmoji$113" title="Parameter" ><summary><span><a href="#useEmoji$113">#</a></span> <code><strong>useEmoji</strong></code> </summary> <ul><p>boolean</p> </ul></details> <p><strong>renamePresetRandom</strong><em>(presetId, useEmoji)</em> &nbsp;=&gt; <ul>void</ul></p></p> </ul></details><details id="restoreSpare$79" title="Method" ><summary><span><a href="#restoreSpare$79">#</a></span> <code><strong>restoreSpare</strong></code><em>(newDetail, bySelect)</em> </summary> <a href="src/abstract-presets.ts#L141">src/abstract-presets.ts#L141</a> <ul> <p> <details id="newDetail$81" title="Parameter" ><summary><span><a href="#newDetail$81">#</a></span> <code><strong>newDetail</strong></code> </summary> <ul><p><a href="#Detail$51">Detail</a></p> </ul></details><details id="bySelect$82" title="Parameter" ><summary><span><a href="#bySelect$82">#</a></span> <code><strong>bySelect</strong></code> </summary> <ul><p>boolean</p> </ul></details> <p><strong>restoreSpare</strong><em>(newDetail, bySelect)</em> &nbsp;=&gt; <ul>undefined | <a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="savePreset$114" title="Method" ><summary><span><a href="#savePreset$114">#</a></span> <code><strong>savePreset</strong></code><em>(presetId)</em> </summary> <a href="src/abstract-presets.ts#L344">src/abstract-presets.ts#L344</a> <ul> <p> <details id="presetId$116" title="Parameter" ><summary><span><a href="#presetId$116">#</a></span> <code><strong>presetId</strong></code> </summary> <ul><p>string</p> </ul></details> <p><strong>savePreset</strong><em>(presetId)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="selectPreset$104" title="Method" ><summary><span><a href="#selectPreset$104">#</a></span> <code><strong>selectPreset</strong></code><em>(nextPresetId, byClick, newDetail, byGroup)</em> </summary> <a href="src/abstract-presets.ts#L302">src/abstract-presets.ts#L302</a> <ul> <p> <details id="nextPresetId$106" title="Parameter" ><summary><span><a href="#nextPresetId$106">#</a></span> <code><strong>nextPresetId</strong></code> </summary> <ul><p>string | <code>false</code></p> </ul></details><details id="byClick$107" title="Parameter" ><summary><span><a href="#byClick$107">#</a></span> <code><strong>byClick</strong></code> </summary> <ul><p>boolean</p> </ul></details><details id="newDetail$108" title="Parameter" ><summary><span><a href="#newDetail$108">#</a></span> <code><strong>newDetail</strong></code> </summary> <ul><p><a href="#Detail$51">Detail</a></p> </ul></details><details id="byGroup$109" title="Parameter" ><summary><span><a href="#byGroup$109">#</a></span> <code><strong>byGroup</strong></code> </summary> <ul><p>boolean</p> </ul></details> <p><strong>selectPreset</strong><em>(nextPresetId, byClick, newDetail, byGroup)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="setById$128" title="Method" ><summary><span><a href="#setById$128">#</a></span> <code><strong>setById</strong></code><em>(itemId, newItem)</em> </summary> <a href=""></a> <ul> <p> <details id="itemId$131" title="Parameter" ><summary><span><a href="#itemId$131">#</a></span> <code><strong>itemId</strong></code> </summary> <ul><p>string</p> </ul></details><details id="newItem$132" title="Parameter" ><summary><span><a href="#newItem$132">#</a></span> <code><strong>newItem</strong></code> </summary> <ul><p><a href="#U$130">U</a></p> </ul></details> <p><strong>setById</strong>&lt;<span>U</span><span>&nbsp;extends&nbsp;</span> <a href="#BasePreset$1">BasePreset</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#U$130">U</a>&gt;&gt;<em>(itemId, newItem)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="setDetailData$98" title="Method" ><summary><span><a href="#setDetailData$98">#</a></span> <code><strong>setDetailData</strong></code><em>(newDetailData, bySelect, byIntent, byGroup)</em> </summary> <a href="src/abstract-presets.ts#L215">src/abstract-presets.ts#L215</a> <ul> <p> <details id="newDetailData$100" title="Parameter" ><summary><span><a href="#newDetailData$100">#</a></span> <code><strong>newDetailData</strong></code> </summary> <ul><p><a href="#Detail$51">Detail</a> [<code>"data"</code>]</p> </ul></details><details id="bySelect$101" title="Parameter" ><summary><span><a href="#bySelect$101">#</a></span> <code><strong>bySelect</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>false</code></span> </summary> <ul><p>boolean</p> </ul></details><details id="byIntent$102" title="Parameter" ><summary><span><a href="#byIntent$102">#</a></span> <code><strong>byIntent</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>false</code></span> </summary> <ul><p>boolean</p> </ul></details><details id="byGroup$103" title="Parameter" ><summary><span><a href="#byGroup$103">#</a></span> <code><strong>byGroup</strong></code> <span><span>&nbsp;=&nbsp;</span> <code>false</code></span> </summary> <ul><p>boolean</p> </ul></details> <p><strong>setDetailData</strong><em>(newDetailData, bySelect, byIntent, byGroup)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details><details id="toJSON$64" title="Method" ><summary><span><a href="#toJSON$64">#</a></span> <code><strong>toJSON</strong></code><em>()</em> </summary> <a href="src/abstract-presets.ts#L101">src/abstract-presets.ts#L101</a> <ul> <p> <p><strong>toJSON</strong><em>()</em> &nbsp;=&gt; <ul>any</ul></p></p> </ul></details><details id="updateById$136" title="Method" ><summary><span><a href="#updateById$136">#</a></span> <code><strong>updateById</strong></code><em>(itemId, updateData)</em> </summary> <a href=""></a> <ul> <p> <details id="itemId$139" title="Parameter" ><summary><span><a href="#itemId$139">#</a></span> <code><strong>itemId</strong></code> </summary> <ul><p>string</p> </ul></details><details id="updateData$140" title="Parameter" ><summary><span><a href="#updateData$140">#</a></span> <code><strong>updateData</strong></code> </summary> <ul><p><span>Partial</span>&lt;<a href="#U$138">U</a>&gt;</p> </ul></details> <p><strong>updateById</strong>&lt;<span>U</span><span>&nbsp;extends&nbsp;</span> <a href="#BasePreset$1">BasePreset</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#U$138">U</a>&gt;&gt;<em>(itemId, updateData)</em> &nbsp;=&gt; <ul><a href="#BasePresets$47">BasePresets</a>&lt;<a href="#Detail$51">Detail</a>, <a href="#Preset$52">Preset</a>, <a href="#PresetClass$53">PresetClass</a>&gt;</ul></p></p> </ul></details></p></ul></details><details id="PresetsGroupDetail$177" title="Class" ><summary><span><a href="#PresetsGroupDetail$177">#</a></span> <code><strong>PresetsGroupDetail</strong></code> </summary> <a href="src/presets-group-detail.ts#L8">src/presets-group-detail.ts#L8</a> <ul> <p> <details id="constructor$178" title="Constructor" ><summary><span><a href="#constructor$178">#</a></span> <code><strong>constructor</strong></code><em>(data)</em> </summary> <a href="src/presets-group-detail.ts#L9">src/presets-group-detail.ts#L9</a> <ul> <p> <details id="new PresetsGroupDetail$179" title="ConstructorSignature" ><summary><span><a href="#new PresetsGroupDetail$179">#</a></span> <code><strong>new PresetsGroupDetail</strong></code><em>()</em> </summary> <ul><p><a href="#PresetsGroupDetail$177">PresetsGroupDetail</a></p> <p> <details id="data$180" title="Parameter" ><summary><span><a href="#data$180">#</a></span> <code><strong>data</strong></code> </summary> <ul><p>any</p> </ul></details></p> </ul></details></p> </ul></details><details id="data$198" title="Property" ><summary><span><a href="#data$198">#</a></span> <code><strong>data</strong></code> </summary> <a href="src/abstract-presets.ts#L32">src/abstract-presets.ts#L32</a> <ul><p><a href="#PresetsGroupData$174">PresetsGroupData</a></p> </ul></details><details id="applyData$186" title="Method" ><summary><span><a href="#applyData$186">#</a></span> <code><strong>applyData</strong></code><em>(data)</em> </summary> <a href="src/presets-group-detail.ts#L34">src/presets-group-detail.ts#L34</a> <ul> <p> <details id="data$188" title="Parameter" ><summary><span><a href="#data$188">#</a></span> <code><strong>data</strong></code> </summary> <ul><p><a href="#PresetsGroupData$174">PresetsGroupData</a></p> </ul></details> <p><strong>applyData</strong><em>(data)</em> &nbsp;=&gt; <ul>undefined | <span>Map</span>&lt;string, <a href="#BasePresets$47">BasePresets</a>&lt;any, <a href="#BasePreset$1">BasePreset</a>&lt;any&gt;, <span>Class</span>&lt;<a href="#BasePreset$1">BasePreset</a>&lt;any&gt;&gt;&gt;&gt;</ul></p></p> </ul></details><details id="collectData$183" title="Method" ><summary><span><a href="#collectData$183">#</a></span> <code><strong>collectData</strong></code><em>(sources)</em> </summary> <a href="src/presets-group-detail.ts#L19">src/presets-group-detail.ts#L19</a> <ul> <p> <details id="sources$185" title="Parameter" ><summary><span><a href="#sources$185">#</a></span> <code><strong>sources</strong></code> </summary> <ul><p><span>Map</span>&lt;string, <a href="#BasePresets$47">BasePresets</a>&lt;any, <a href="#BasePreset$1">BasePreset</a>&lt;any&gt;, <span>Class</span>&lt;<a href="#BasePreset$1">BasePreset</a>&lt;any&gt;&gt;&gt;&gt;</p> </ul></details> <p><strong>collectData</strong><em>(sources)</em> &nbsp;=&gt; <ul>any</ul></p></p> </ul></details><details id="copy$199" title="Method" ><summary><span><a href="#copy$199">#</a></span> <code><strong>copy</strong></code><em>()</em> </summary> <a href="src/abstract-presets.ts#L50">src/abstract-presets.ts#L50</a> <ul> <p> <p><strong>copy</strong><em>()</em> &nbsp;=&gt; <ul><a href="#PresetsGroupData$174">PresetsGroupData</a></ul></p></p> </ul></details><details id="equals$189" title="Method" ><summary><span><a href="#equals$189">#</a></span> <code><strong>equals</strong></code><em>(other)</em> </summary> <a href="src/presets-group-detail.ts#L54">src/presets-group-detail.ts#L54</a> <ul> <p> <details id="other$191" title="Parameter" ><summary><span><a href="#other$191">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#PresetsGroupData$174">PresetsGroupData</a> | <a href="#PresetsGroupDetail$177">PresetsGroupDetail</a></p> </ul></details> <p><strong>equals</strong><em>(other)</em> &nbsp;=&gt; <ul>boolean</ul></p></p> </ul></details><details id="merge$195" title="Method" ><summary><span><a href="#merge$195">#</a></span> <code><strong>merge</strong></code><em>(other)</em> </summary> <a href="src/presets-group-detail.ts#L115">src/presets-group-detail.ts#L115</a> <ul> <p> <details id="other$197" title="Parameter" ><summary><span><a href="#other$197">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#PresetsGroupData$174">PresetsGroupData</a> | <a href="#PresetsGroupDetail$177">PresetsGroupDetail</a></p> </ul></details> <p><strong>merge</strong><em>(other)</em> &nbsp;=&gt; <ul><a href="#PresetsGroupDetail$177">PresetsGroupDetail</a></ul></p></p> </ul></details><details id="satisfies$192" title="Method" ><summary><span><a href="#satisfies$192">#</a></span> <code><strong>satisfies</strong></code><em>(other)</em> </summary> <a href="src/presets-group-detail.ts#L90">src/presets-group-detail.ts#L90</a> <ul> <p> <details id="other$194" title="Parameter" ><summary><span><a href="#other$194">#</a></span> <code><strong>other</strong></code> </summary> <ul><p><a href="#PresetsGroupData$174">PresetsGroupData</a> | <a href="#PresetsGroupDetail$177">PresetsGroupDetail</a></p> </ul></details> <p><strong>satisfies</strong><em>(other)</em> &nbsp;=&gt; <ul>boolean</ul></p></p> </ul></details><details id="toJSON$181" title="Method" ><summary><span><a href="#toJSON$181">#</a></span> <code><strong>toJSON</strong></code><em>()</em> </summary> <a href="src/presets-group-detail.ts#L13">src/presets-group-detail.ts#L13</a> <ul> <p> <p><strong>toJSON</strong><em>()</em> &nbsp;=&gt; <ul>any</ul></p></p> </ul></details></p></ul></details><details id="BasePresetsEvents$35" title="Interface" ><summary><span><a href="#BasePresetsEvents$35">#</a></span> <code><strong>BasePresetsEvents</strong></code> </summary> <a href="src/abstract-presets.ts#L56">src/abstract-presets.ts#L56</a> <ul> <p> <details id="select$36" title="Property" ><summary><span><a href="#select$36">#</a></span> <code><strong>select</strong></code> </summary> <a href="src/abstract-presets.ts#L57">src/abstract-presets.ts#L57</a> <ul><p><details id="__type$37" title="Function" ><summary><span><a href="#__type$37">#</a></span> <em>(next, prev, nextDetail, prevDetail, byClick, byGroup)</em> </summary> <ul> <p> <details id="next$39" title="Parameter" ><summary><span><a href="#next$39">#</a></span> <code><strong>next</strong></code> </summary> <ul><p><code>null</code> | <a href="#Preset$45">Preset</a></p> </ul></details><details id="prev$40" title="Parameter" ><summary><span><a href="#prev$40">#</a></span> <code><strong>prev</strong></code> </summary> <ul><p><code>null</code> | <a href="#Preset$45">Preset</a></p> </ul></details><details id="nextDetail$41" title="Parameter" ><summary><span><a href="#nextDetail$41">#</a></span> <code><strong>nextDetail</strong></code> </summary> <ul><p>undefined | <code>null</code> | <a href="#Detail$46">Detail</a></p> </ul></details><details id="prevDetail$42" title="Parameter" ><summary><span><a href="#prevDetail$42">#</a></span> <code><strong>prevDetail</strong></code> </summary> <ul><p><code>null</code> | <a href="#Detail$46">Detail</a></p> </ul></details><details id="byClick$43" title="Parameter" ><summary><span><a href="#byClick$43">#</a></span> <code><strong>byClick</strong></code> </summary> <ul><p>undefined | boolean</p> </ul></details><details id="byGroup$44" title="Parameter" ><summary><span><a href="#byGroup$44">#</a></span> <code><strong>byGroup</strong></code> </summary> <ul><p>undefined | boolean</p> </ul></details> <p><strong></strong><em>(next, prev, nextDetail, prevDetail, byClick, byGroup)</em> &nbsp;=&gt; <ul>void</ul></p></p> </ul></details></p> </ul></details></p></ul></details><details id="PresetsGroupData$174" title="Interface" ><summary><span><a href="#PresetsGroupData$174">#</a></span> <code><strong>PresetsGroupData</strong></code> </summary> <a href="src/presets-group-detail.ts#L4">src/presets-group-detail.ts#L4</a> <ul> <p> <details id="details$175" title="Property" ><summary><span><a href="#details$175">#</a></span> <code><strong>details</strong></code> </summary> <a href="src/presets-group-detail.ts#L5">src/presets-group-detail.ts#L5</a> <ul><p>[ string, <a href="#AbstractDetail$15">AbstractDetail</a>&lt;any&gt; ] []</p> </ul></details><details id="sources$176" title="Property" ><summary><span><a href="#sources$176">#</a></span> <code><strong>sources</strong></code> </summary> <a href="src/presets-group-detail.ts#L6">src/presets-group-detail.ts#L6</a> <ul><p><span>Map</span>&lt;string, <a href="#BasePresets$47">BasePresets</a>&lt;any, <a href="#BasePreset$1">BasePreset</a>&lt;any&gt;, <span>Class</span>&lt;<a href="#BasePreset$1">BasePreset</a>&lt;any&gt;&gt;&gt;&gt;</p> </ul></details></p></ul></details></p>
## Credits
- [@stagas/immutable-list](https://npmjs.org/package/@stagas/immutable-list) by [stagas](https://github.com/stagas) &ndash; Immutable list.
- [everyday-types](https://npmjs.org/package/everyday-types) by [stagas](https://github.com/stagas) &ndash; Everyday utility types
- [everyday-utils](https://npmjs.org/package/everyday-utils) by [stagas](https://github.com/stagas) &ndash; Everyday utilities
- [@stagas/immutable-list](https://npmjs.org/package/@stagas/immutable-list) by [stagas](https://github.com/stagas) &ndash; Immutable list.

@@ -75,0 +75,0 @@ ## Contributing

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc