From e8739255388c1a06f2ab7aae96ac21dd5f4dbceb Mon Sep 17 00:00:00 2001 From: Xon <635541+Xon@users.noreply.github.com> Date: Tue, 6 Aug 2024 10:06:01 +0800 Subject: [PATCH] Split Templates into interface and implementation & resolve dependency cycles. --- package-lock.json | 4 +- public/assets/scripts/choices.js | 2 +- .../assets/scripts/choices.min.js.LICENSE.txt | 2 +- public/types/src/scripts/choices.d.ts | 6 +- public/types/src/scripts/choices.d.ts.map | 2 +- .../components/wrapped-element.d.ts.map | 2 +- .../scripts/components/wrapped-input.d.ts.map | 2 +- .../scripts/interfaces/choice-full.d.ts.map | 2 +- .../types/src/scripts/interfaces/choices.d.ts | 4 +- .../src/scripts/interfaces/choices.d.ts.map | 2 +- .../types/src/scripts/interfaces/options.d.ts | 3 +- .../src/scripts/interfaces/options.d.ts.map | 2 +- .../src/scripts/interfaces/templates.d.ts | 23 ++++ .../src/scripts/interfaces/templates.d.ts.map | 1 + .../types/src/scripts/interfaces/types.d.ts | 4 + .../src/scripts/interfaces/types.d.ts.map | 2 +- .../src/scripts/lib/choice-input.d.ts.map | 2 +- .../src/scripts/lib/htmlElementGuards.d.ts | 3 - .../scripts/lib/htmlElementGuards.d.ts.map | 1 - public/types/src/scripts/lib/utils.d.ts | 7 +- public/types/src/scripts/lib/utils.d.ts.map | 2 +- .../src/scripts/reducers/loading.d.ts.map | 2 +- public/types/src/scripts/store/store.d.ts.map | 2 +- public/types/src/scripts/templates.d.ts | 21 +--- public/types/src/scripts/templates.d.ts.map | 2 +- src/scripts/choices.ts | 9 +- src/scripts/interfaces/choices.ts | 8 +- src/scripts/interfaces/options.ts | 12 +- src/scripts/interfaces/templates.ts | 117 ++++++++++++++++++ src/scripts/interfaces/types.ts | 5 + src/scripts/lib/utils.ts | 10 +- src/scripts/templates.test.ts | 2 +- src/scripts/templates.ts | 16 ++- 33 files changed, 202 insertions(+), 82 deletions(-) create mode 100644 public/types/src/scripts/interfaces/templates.d.ts create mode 100644 public/types/src/scripts/interfaces/templates.d.ts.map delete mode 100644 public/types/src/scripts/lib/htmlElementGuards.d.ts delete mode 100644 public/types/src/scripts/lib/htmlElementGuards.d.ts.map create mode 100644 src/scripts/interfaces/templates.ts diff --git a/package-lock.json b/package-lock.json index d8abd0144..7657dd42e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "choices.js", - "version": "10.2.0", + "version": "11.0.0RC3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "choices.js", - "version": "10.2.0", + "version": "11.0.0RC3", "license": "MIT", "dependencies": { "fuse.js": "^6.6.2", diff --git a/public/assets/scripts/choices.js b/public/assets/scripts/choices.js index d856f6b9e..0b976ee19 100644 --- a/public/assets/scripts/choices.js +++ b/public/assets/scripts/choices.js @@ -1,4 +1,4 @@ -/*! choices.js v11.0.0 RC3 | © 2024 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ +/*! choices.js v11.0.0RC3 | © 2024 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); diff --git a/public/assets/scripts/choices.min.js.LICENSE.txt b/public/assets/scripts/choices.min.js.LICENSE.txt index 726b48a27..5a9382002 100644 --- a/public/assets/scripts/choices.min.js.LICENSE.txt +++ b/public/assets/scripts/choices.min.js.LICENSE.txt @@ -1 +1 @@ -/*! choices.js v11.0.0 RC3 | © 2024 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ +/*! choices.js v11.0.0RC3 | © 2024 Josh Johnson | https://github.com/jshjohnson/Choices#readme */ diff --git a/public/types/src/scripts/choices.d.ts b/public/types/src/scripts/choices.d.ts index f926dfd85..028e8c23c 100644 --- a/public/types/src/scripts/choices.d.ts +++ b/public/types/src/scripts/choices.d.ts @@ -5,12 +5,12 @@ import { Notice } from './interfaces/notice'; import { Options } from './interfaces/options'; import { State } from './interfaces/state'; import Store from './store/store'; -import templates from './templates'; import { ChoiceFull } from './interfaces/choice-full'; import { GroupFull } from './interfaces/group-full'; import { PassedElementType } from './interfaces'; import { Choices as ChoicesInterface } from './interfaces/choices'; import { EventChoice } from './interfaces/event-choice'; +import { Templates } from './interfaces/templates'; /** * Choices * @author Josh Johnson @@ -19,7 +19,7 @@ declare class Choices implements ChoicesInterface { static get defaults(): { options: Partial; allOptions: Options; - templates: typeof templates; + templates: Templates; }; initialised: boolean; config: Options; @@ -38,7 +38,7 @@ declare class Choices implements ChoicesInterface { _hasNonChoicePlaceholder: boolean; _canAddUserChoices: boolean; _store: Store; - _templates: typeof templates; + _templates: Templates; _initialState: State; _currentState: State; _prevState: State; diff --git a/public/types/src/scripts/choices.d.ts.map b/public/types/src/scripts/choices.d.ts.map index 9f1d8ed8f..f586b2227 100644 --- a/public/types/src/scripts/choices.d.ts.map +++ b/public/types/src/scripts/choices.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"choices.d.ts","sourceRoot":"","sources":["../../../../src/scripts/choices.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,YAAY,EACZ,aAAa,EACd,MAAM,cAAc,CAAC;AAOtB,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAmB,MAAM,sBAAsB,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAa3C,OAAO,KAAK,MAAM,eAAe,CAAC;AAClC,OAAO,SAAgC,MAAM,aAAa,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAyB,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,gBAA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AI;CAiB3C;AAED,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/public/types/src/scripts/components/wrapped-element.d.ts.map b/public/types/src/scripts/components/wrapped-element.d.ts.map index 0a826aebf..02477cbef 100644 --- a/public/types/src/scripts/components/wrapped-element.d.ts.map +++ b/public/types/src/scripts/components/wrapped-element.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"wrapped-element.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/components/wrapped-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGrD,MAAM,CAAC,OAAO,OAAO,cAAc,CAAC,CAAC,SAAS,gBAAgB,GAAG,iBAAiB;IAChF,OAAO,EAAE,CAAC,CAAC;IAEX,UAAU,EAAE,UAAU,CAAC;IAEvB,UAAU,EAAE,OAAO,CAAC;gBAER,EAAE,OAAO,EAAE,UAAU,EAAE;;;KAAA;IAMnC,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,GAAG,IAAI,MAAM,CAEhB;IAED,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAGtB;IAED,OAAO,IAAI,IAAI;IAkBf,MAAM,IAAI,IAAI;IAsBd,MAAM,IAAI,IAAI;IAMd,OAAO,IAAI,IAAI;IAMf,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;CAGxD"} \ No newline at end of file +{"version":3,"file":"wrapped-element.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/components/wrapped-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGrD,MAAM,CAAC,OAAO,OAAO,cAAc,CACjC,CAAC,SAAS,gBAAgB,GAAG,iBAAiB;IAE9C,OAAO,EAAE,CAAC,CAAC;IAEX,UAAU,EAAE,UAAU,CAAC;IAEvB,UAAU,EAAE,OAAO,CAAC;gBAER,EAAE,OAAO,EAAE,UAAU,EAAE;;;KAAA;IAMnC,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,GAAG,IAAI,MAAM,CAEhB;IAED,IAAI,KAAK,IAAI,MAAM,CAElB;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAGtB;IAED,OAAO,IAAI,IAAI;IAkBf,MAAM,IAAI,IAAI;IAsBd,MAAM,IAAI,IAAI;IAMd,OAAO,IAAI,IAAI;IAMf,YAAY,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;CAGxD"} \ No newline at end of file diff --git a/public/types/src/scripts/components/wrapped-input.d.ts.map b/public/types/src/scripts/components/wrapped-input.d.ts.map index 58111b81a..d44383e35 100644 --- a/public/types/src/scripts/components/wrapped-input.d.ts.map +++ b/public/types/src/scripts/components/wrapped-input.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"wrapped-input.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/components/wrapped-input.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAE/C,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,cAAc,CAAC,gBAAgB,CAAC;CAEzE"} \ No newline at end of file +{"version":3,"file":"wrapped-input.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/components/wrapped-input.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAE/C,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,cAAc,CAAC,gBAAgB,CAAC;CAAG"} \ No newline at end of file diff --git a/public/types/src/scripts/interfaces/choice-full.d.ts.map b/public/types/src/scripts/interfaces/choice-full.d.ts.map index 117ad866f..361bd74ab 100644 --- a/public/types/src/scripts/interfaces/choice-full.d.ts.map +++ b/public/types/src/scripts/interfaces/choice-full.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"choice-full.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/interfaces/choice-full.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC;AAE5D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,iBAAiB,GAAG,mBAAmB,CAAC;IAClD,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,eAAe,GAAG,MAAM,CAAC;IAChC,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf"} \ No newline at end of file +{"version":3,"file":"choice-full.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/interfaces/choice-full.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC;AAE5D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,iBAAiB,GAAG,mBAAmB,CAAC;IAClD,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,eAAe,GAAG,MAAM,CAAC;IAChC,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf"} \ No newline at end of file diff --git a/public/types/src/scripts/interfaces/choices.d.ts b/public/types/src/scripts/interfaces/choices.d.ts index b5e2e2798..f824ce744 100644 --- a/public/types/src/scripts/interfaces/choices.d.ts +++ b/public/types/src/scripts/interfaces/choices.d.ts @@ -2,7 +2,7 @@ import { WrappedInput, WrappedSelect, Container, List, Input, Dropdown } from '. import { Store } from './store'; import { InputChoice } from './input-choice'; import { State } from './state'; -import templates from '../templates'; +import { Templates } from './templates'; import { Options } from './options'; import { ChoiceFull } from './choice-full'; import { GroupFull } from './group-full'; @@ -21,7 +21,7 @@ export interface Choices { _isSelectMultipleElement: boolean; _isSelectElement: boolean; _store: Store; - _templates: typeof templates; + _templates: Templates; _initialState: State; _currentState: State; _prevState: State; diff --git a/public/types/src/scripts/interfaces/choices.d.ts.map b/public/types/src/scripts/interfaces/choices.d.ts.map index 3a4fa8b9c..cde4ddded 100644 --- a/public/types/src/scripts/interfaces/choices.d.ts.map +++ b/public/types/src/scripts/interfaces/choices.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"choices.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/interfaces/choices.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,SAAS,EACT,IAAI,EACJ,KAAK,EACL,QAAQ,EACT,MAAM,eAAe,CAAC;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I,CAAC;IAEjC,OAAO,EAAE,MAAM,CAAC;IAEhB,UAAU,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAE/B,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF,cAAc,EAAE,CAAC,UAAU,GAAG,SAAS,CAAC,EAAE,CAAC;IAE3C,YAAY,EAAE,CAAC,WAAW,GAAG,MAAM,CAAC,EAAE,CAAC;IAEvC,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB"} \ No newline at end of file +{"version":3,"file":"choices.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/interfaces/choices.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,SAAS,EACT,IAAI,EACJ,KAAK,EACL,QAAQ,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,WAAW,OAAO;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAEhB,aAAa,EAAE,YAAY,GAAG,aAAa,CAAC;IAE5C,cAAc,EAAE,SAAS,CAAC;IAE1B,cAAc,EAAE,SAAS,CAAC;IAE1B,UAAU,EAAE,IAAI,CAAC;IAEjB,QAAQ,EAAE,IAAI,CAAC;IAEf,KAAK,EAAE,KAAK,CAAC;IAEb,QAAQ,EAAE,QAAQ,CAAC;IAEnB,cAAc,EAAE,OAAO,CAAC;IAExB,mBAAmB,EAAE,OAAO,CAAC;IAE7B,wBAAwB,EAAE,OAAO,CAAC;IAElC,gBAAgB,EAAE,OAAO,CAAC;IAE1B,MAAM,EAAE,KAAK,CAAC;IAEd,UAAU,EAAE,SAAS,CAAC;IAEtB,aAAa,EAAE,KAAK,CAAC;IAErB,aAAa,EAAE,KAAK,CAAC;IAErB,UAAU,EAAE,KAAK,CAAC;IAElB,kBAAkB,EAAE,MAAM,CAAC;IAE3B,iBAAiB,EAAE,MAAM,CAAC;IAE1B,aAAa,EAAE,MAAM,CAAC;IAEtB,UAAU,EAAE,OAAO,CAAC;IAEpB,gBAAgB,EAAE,OAAO,CAAC;IAE1B,kBAAkB,EAAE,MAAM,CAAC;IAE3B,OAAO,EAAE,OAAO,CAAC;IAEjB,YAAY,EAAE,OAAO,CAAC;IAEtB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC,OAAO,EAAE,MAAM,CAAC;IAEhB,UAAU,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAE/B,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF,cAAc,EAAE,CAAC,UAAU,GAAG,SAAS,CAAC,EAAE,CAAC;IAE3C,YAAY,EAAE,CAAC,WAAW,GAAG,MAAM,CAAC,EAAE,CAAC;IAEvC,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB"} \ No newline at end of file diff --git a/public/types/src/scripts/interfaces/options.d.ts b/public/types/src/scripts/interfaces/options.d.ts index f2424d550..db2a1434c 100644 --- a/public/types/src/scripts/interfaces/options.d.ts +++ b/public/types/src/scripts/interfaces/options.d.ts @@ -4,7 +4,6 @@ import { InputChoice } from './input-choice'; import { ClassNames } from './class-names'; import { PositionOptionsType } from './position-options-type'; import { Types } from './types'; -import { RecordToCompare } from '../lib/utils'; export declare const ObjectsInConfig: string[]; /** * Choices options interface @@ -363,7 +362,7 @@ export interface Options { * * @default sortByAlpha */ - sorter: (current: RecordToCompare, next: RecordToCompare) => number; + sorter: (current: Types.RecordToCompare, next: Types.RecordToCompare) => number; /** * Whether the input should show a placeholder. Used in conjunction with `placeholderValue`. If `placeholder` is set to true and no value is passed to `placeholderValue`, the passed input's placeholder attribute will be used as the placeholder value. * diff --git a/public/types/src/scripts/interfaces/options.d.ts.map b/public/types/src/scripts/interfaces/options.d.ts.map index 572741078..fb594c8f2 100644 --- a/public/types/src/scripts/interfaces/options.d.ts.map +++ b/public/types/src/scripts/interfaces/options.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/interfaces/options.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,eAAO,MAAM,eAAe,UAAgC,CAAC;AAE7D;;;;;;;;GAQG;AACH,MAAM,WAAW,OAAO;IACtB;;;;;;OAMG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,KAAK,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,OAAO,EAAE,WAAW,EAAE,CAAC;IAEvB;;;;;;OAMG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;;;;OAQG;IACH,wBAAwB,EAAE,OAAO,CAAC;IAElC;;;;;;OAMG;IACH,UAAU,EAAE,OAAO,CAA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OAAO,CAAC,CAAC;IAExC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;;;OAQG;IACH,cAAc,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,yBAAyB,EACrB,CAAC,CACC,QAAQ,EAAE,KAAK,CAAC,OAAO,EACvB,iBAAiB,EAAE,KAAK,CAAC,mBAAmB,KACzC,IAAI,CAAC,GACV,IAAI,CAAC;IAET,mBAAmB,EAAE,KAAK,CAAC;CAC5B"} \ No newline at end of file +{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/interfaces/options.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,eAAO,MAAM,eAAe,UAAgC,CAAC;AAE7D;;;;;;;;GAQG;AACH,MAAM,WAAW,OAAO;IACtB;;;;;;OAMG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,KAAK,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAEhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8CG;IACH,OAAO,EAAE,WAAW,EAAE,CAAC;IAEvB;;;;;;OAMG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;;;;;OAMG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;;;;OAQG;IACH,wBA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;OAIG;IACH,UAAU,EAAE,UAAU,CAAC;IAEvB;;OAEG;IACH,WAAW,EAAE,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IAExC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;;;OAQG;IACH,cAAc,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;IAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,yBAAyB,EACrB,CAAC,CACC,QAAQ,EAAE,KAAK,CAAC,OAAO,EACvB,iBAAiB,EAAE,KAAK,CAAC,mBAAmB,KACzC,IAAI,CAAC,GACV,IAAI,CAAC;IAET,mBAAmB,EAAE,KAAK,CAAC;CAC5B"} \ No newline at end of file diff --git a/public/types/src/scripts/interfaces/templates.d.ts b/public/types/src/scripts/interfaces/templates.d.ts new file mode 100644 index 000000000..ee937b8ca --- /dev/null +++ b/public/types/src/scripts/interfaces/templates.d.ts @@ -0,0 +1,23 @@ +import { PassedElementType } from './passed-element-type'; +import { StringPreEscaped } from './string-pre-escaped'; +import { ChoiceFull } from './choice-full'; +import { GroupFull } from './group-full'; +import { StringUntrusted } from './string-untrusted'; +import { Options } from './options'; +export type TemplateOptions = Pick; +export type NoticeType = 'no-choices' | 'no-results' | 'add-choice' | ''; +export interface Templates { + containerOuter({ classNames: { containerOuter }, }: TemplateOptions, dir: HTMLElement['dir'], isSelectElement: boolean, isSelectOneElement: boolean, searchEnabled: boolean, passedElementType: PassedElementType, labelId: string): HTMLDivElement; + containerInner({ classNames: { containerInner }, }: TemplateOptions): HTMLDivElement; + itemList({ classNames: { list, listSingle, listItems }, }: TemplateOptions, isSelectOneElement: boolean): HTMLDivElement; + placeholder({ allowHTML, classNames: { placeholder }, }: TemplateOptions, value: StringPreEscaped | string): HTMLDivElement; + item({ allowHTML, removeItemButtonAlignLeft, classNames: { item, button, highlightedState, itemSelectable, placeholder, }, }: TemplateOptions, choice: ChoiceFull, removeItemButton: boolean): HTMLDivElement; + choiceList({ classNames: { list }, }: TemplateOptions, isSelectOneElement: boolean): HTMLDivElement; + choiceGroup({ allowHTML, classNames: { group, groupHeading, itemDisabled }, }: TemplateOptions, { id, label, disabled }: GroupFull): HTMLDivElement; + choice({ allowHTML, classNames: { item, itemChoice, itemSelectable, selectedState, itemDisabled, description, placeholder, }, }: TemplateOptions, choice: ChoiceFull, selectText: string): HTMLDivElement; + input({ classNames: { input, inputCloned }, }: TemplateOptions, placeholderValue: string | null): HTMLInputElement; + dropdown({ classNames: { list, listDropdown }, }: TemplateOptions): HTMLDivElement; + notice({ allowHTML, classNames: { item, itemChoice, addChoice, noResults, noChoices }, }: TemplateOptions, innerText: StringUntrusted | StringPreEscaped | string, type: NoticeType): HTMLDivElement; + option(choice: ChoiceFull): HTMLOptionElement; +} +//# sourceMappingURL=templates.d.ts.map \ No newline at end of file diff --git a/public/types/src/scripts/interfaces/templates.d.ts.map b/public/types/src/scripts/interfaces/templates.d.ts.map new file mode 100644 index 000000000..6a34a1ce8 --- /dev/null +++ b/public/types/src/scripts/interfaces/templates.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/interfaces/templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,OAAO,EACP,YAAY,GAAG,WAAW,GAAG,2BAA2B,CACzD,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,Y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EACE,SAAS,EACT,UAAU,EAAE,EACV,IAAI,EACJ,UAAU,EACV,cAAc,EACd,aAAa,EACb,YAAY,EACZ,WAAW,EACX,WAAW,GACZ,GACF,EAAE,eAAe,EAClB,MAAM,EAAE,UAAU,EAClB,UAAU,EAAE,MAAM,GACjB,cAAc,CAAC;IAElB,KAAK,CACH,EACE,UAAU,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,GACnC,EAAE,eAAe,EAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAC9B,gBAAgB,CAAC;IAEpB,QAAQ,CAAC,EACP,UAAU,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,GACnC,EAAE,eAAe,GAAG,cAAc,CAAC;IAEpC,MAAM,CACJ,EACE,SAAS,EACT,UAAU,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,GAClE,EAAE,eAAe,EAClB,SAAS,EAAE,eAAe,GAAG,gBAAgB,GAAG,MAAM,EACtD,IAAI,EAAE,UAAU,GACf,cAAc,CAAC;IAElB,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,iBAAiB,CAAC;CAC/C"} \ No newline at end of file diff --git a/public/types/src/scripts/interfaces/types.d.ts b/public/types/src/scripts/interfaces/types.d.ts index d9f42813f..3d4919dca 100644 --- a/public/types/src/scripts/interfaces/types.d.ts +++ b/public/types/src/scripts/interfaces/types.d.ts @@ -8,5 +8,9 @@ export declare namespace Types { type NoticeLimitFunction = (maxItemCount: number) => string; type FilterFunction = (value: string) => boolean; type ValueCompareFunction = (value1: string, value2: string) => boolean; + interface RecordToCompare { + value?: StringUntrusted | string; + label?: StringUntrusted | string; + } } //# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/public/types/src/scripts/interfaces/types.d.ts.map b/public/types/src/scripts/interfaces/types.d.ts.map index 891ceaecd..42b309139 100644 --- a/public/types/src/scripts/interfaces/types.d.ts.map +++ b/public/types/src/scripts/interfaces/types.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/interfaces/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,yBAAiB,KAAK,CAAC;IACrB,KAAY,OAAO,GAAG,CACpB,GAAG,EAAE,MAAM,KACR,WAAW,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;IACxD,KAAY,mBAAmB,GAAG,CAChC,SAAS,EAAE,OAAO,EAClB,CAAC,EAAE,eAAe,GAAG,gBAAgB,GAAG,MAAM,KAC3C,MAAM,CAAC;IACZ,KAAY,cAAc,GAAG,MAAM,MAAM,CAAC;IAC1C,KAAY,oBAAoB,GAAG,CACjC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,KACb,MAAM,CAAC;IACZ,KAAY,mBAAmB,GAAG,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC;IACnE,KAAY,cAAc,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACxD,KAAY,oBAAoB,GAAG,CACjC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,KACX,OAAO,CAAC;CACd"} \ No newline at end of file +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/interfaces/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,yBAAiB,KAAK,CAAC;IACrB,KAAY,OAAO,GAAG,CACpB,GAAG,EAAE,MAAM,KACR,WAAW,GAAG,gBAAgB,GAAG,iBAAiB,CAAC;IACxD,KAAY,mBAAmB,GAAG,CAChC,SAAS,EAAE,OAAO,EAClB,CAAC,EAAE,eAAe,GAAG,gBAAgB,GAAG,MAAM,KAC3C,MAAM,CAAC;IACZ,KAAY,cAAc,GAAG,MAAM,MAAM,CAAC;IAC1C,KAAY,oBAAoB,GAAG,CACjC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,KACb,MAAM,CAAC;IACZ,KAAY,mBAAmB,GAAG,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAC;IACnE,KAAY,cAAc,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACxD,KAAY,oBAAoB,GAAG,CACjC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,KACX,OAAO,CAAC;IAEb,UAAiB,eAAe;QAC9B,KAAK,CAAC,EAAE,eAAe,GAAG,MAAM,CAAC;QACjC,KAAK,CAAC,EAAE,eAAe,GAAG,MAAM,CAAC;KAClC;CACF"} \ No newline at end of file diff --git a/public/types/src/scripts/lib/choice-input.d.ts.map b/public/types/src/scripts/lib/choice-input.d.ts.map index 90a399c88..33b41aff5 100644 --- a/public/types/src/scripts/lib/choice-input.d.ts.map +++ b/public/types/src/scripts/lib/choice-input.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"choice-input.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/lib/choice-input.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,KAAK,2BAA2B,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,GAAG,UAAU,IAC1E,CAAC,SAAS,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;AAKhD,eAAO,MAAM,iBAAiB,kBAAY,MAAM,EAAE,GAAG,SAWpD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,MAAM,GAAG,WAAW,GAAG,UAAU,SACnE,CAAC,cACI,OAAO,KAClB,2BAA2B,CAAC,CAAC,CAoD/B,CAAC"} \ No newline at end of file +{"version":3,"file":"choice-input.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/lib/choice-input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAGvD,KAAK,2BAA2B,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,GAAG,UAAU,IAC1E,CAAC,SAAS,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;AAKhD,eAAO,MAAM,iBAAiB,kBAAY,MAAM,EAAE,GAAG,SAWpD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,MAAM,GAAG,WAAW,GAAG,UAAU,SACnE,CAAC,cACI,OAAO,KAClB,2BAA2B,CAAC,CAAC,CAoD/B,CAAC"} \ No newline at end of file diff --git a/public/types/src/scripts/lib/htmlElementGuards.d.ts b/public/types/src/scripts/lib/htmlElementGuards.d.ts deleted file mode 100644 index a5e372953..000000000 --- a/public/types/src/scripts/lib/htmlElementGuards.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export declare const isHTMLOption: (e: Element) => e is HTMLOptionElement; -export declare const isHTMLOptgroup: (e: Element) => e is HTMLOptGroupElement; -//# sourceMappingURL=htmlElementGuards.d.ts.map \ No newline at end of file diff --git a/public/types/src/scripts/lib/htmlElementGuards.d.ts.map b/public/types/src/scripts/lib/htmlElementGuards.d.ts.map deleted file mode 100644 index af5049a7a..000000000 --- a/public/types/src/scripts/lib/htmlElementGuards.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"htmlElementGuards.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/lib/htmlElementGuards.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,MAAO,OAAO,KAAG,CAAC,IAAI,iBACvB,CAAC;AAEzB,eAAO,MAAM,cAAc,MAAO,OAAO,KAAG,CAAC,IAAI,mBACvB,CAAC"} \ No newline at end of file diff --git a/public/types/src/scripts/lib/utils.d.ts b/public/types/src/scripts/lib/utils.d.ts index d9f90aa83..a92cbfa41 100644 --- a/public/types/src/scripts/lib/utils.d.ts +++ b/public/types/src/scripts/lib/utils.d.ts @@ -2,18 +2,15 @@ import { EventType } from '../interfaces/event-type'; import { StringUntrusted } from '../interfaces/string-untrusted'; import { StringPreEscaped } from '../interfaces/string-pre-escaped'; import { ChoiceFull } from '../interfaces/choice-full'; +import { Types } from '../interfaces'; export declare const generateId: (element: HTMLInputElement | HTMLSelectElement, prefix: string) => string; export declare const getAdjacentEl: (startEl: Element, selector: string, direction?: number) => Element; export declare const isScrolledIntoView: (element: HTMLElement, parent: HTMLElement, direction?: number) => boolean; export declare const sanitise: (value: T | StringUntrusted | StringPreEscaped | string) => T | string; export declare const strToEl: (str: string) => Element; -export interface RecordToCompare { - value?: StringUntrusted | string; - label?: StringUntrusted | string; -} export declare const unwrapStringForRaw: (s?: StringUntrusted | StringPreEscaped | string) => string; export declare const unwrapStringForEscaped: (s?: StringUntrusted | StringPreEscaped | string) => string; -export declare const sortByAlpha: ({ value, label }: RecordToCompare, { value: value2, label: label2 }: RecordToCompare) => number; +export declare const sortByAlpha: ({ value, label }: Types.RecordToCompare, { value: value2, label: label2 }: Types.RecordToCompare) => number; export declare const sortByScore: (a: Pick, b: Pick) => number; export declare const dispatchEvent: (element: HTMLElement, type: EventType, customArgs?: object | null) => boolean; export declare const cloneObject: (obj: T) => T; diff --git a/public/types/src/scripts/lib/utils.d.ts.map b/public/types/src/scripts/lib/utils.d.ts.map index 952e225fa..69acbcc48 100644 --- a/public/types/src/scripts/lib/utils.d.ts.map +++ b/public/types/src/scripts/lib/utils.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"utils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AM,kBAAkB,OACzB,eAAe,GAAG,gBAAgB,GAAG,MAAM,KAC9C,MAeF,CAAC;AAEF,eAAO,MAAM,sBAAsB,OAC7B,eAAe,GAAG,gBAAgB,GAAG,MAAM,KAC9C,MAeF,CAAC;AAEF,eAAO,MAAM,WAAW,qBACI,KAAK,CAAC,eAAe,oCACJ,KAAK,CAAC,eAAe,KAC/D,MAKC,CAAC;AAEL,eAAO,MAAM,WAAW,MACnB,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,KACzB,IAAI,CAAC,UAAU,EAAE,OAAO,CAAC,KAC3B,MAEF,CAAC;AAEF,eAAO,MAAM,aAAa,YACf,WAAW,QACd,SAAS,eACH,MAAM,GAAG,IAAI,KACxB,OAQF,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,CAAC,OAAO,CAAC,KAAG,CAAoC,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,IAAI,MACZ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KACnB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KACrB,MAAM,EAKR,CAAC;AAEF,eAAO,MAAM,aAAa,eACZ,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,KACjC,KAAK,CAAC,MAAM,CAEd,CAAC;AAEF,eAAO,MAAM,qBAAqB,WACxB,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,WAWtC,CAAC;AAEF,eAAO,MAAM,qBAAqB,sBACb,MAAM,KACxB,MAAM,GAAG,MAUX,CAAC"} \ No newline at end of file diff --git a/public/types/src/scripts/reducers/loading.d.ts.map b/public/types/src/scripts/reducers/loading.d.ts.map index 3471e669f..4fa015955 100644 --- a/public/types/src/scripts/reducers/loading.d.ts.map +++ b/public/types/src/scripts/reducers/loading.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/reducers/loading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5C,KAAK,WAAW,GAAG,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAE9D,QAAA,MAAM,OAAO,WACL,MAAM,WACJ,WAAW,KAClB,KAAK,CAAC,SAAS,CAcjB,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file +{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/reducers/loading.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5C,KAAK,WAAW,GAAG,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAE9D,QAAA,MAAM,OAAO,WACJ,MAAM,WACL,WAAW,KAClB,KAAK,CAAC,SAAS,CAcjB,CAAC;AAEF,eAAe,OAAO,CAAC"} \ No newline at end of file diff --git a/public/types/src/scripts/store/store.d.ts.map b/public/types/src/scripts/store/store.d.ts.map index ed0cd102d..1693a7484 100644 --- a/public/types/src/scripts/store/store.d.ts.map +++ b/public/types/src/scripts/store/store.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/store/store.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,KAAK,IAAI,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,CAAC,OAAO,OAAO,KAAM,YAAW,MAAM;IAC1C,MAAM,EAAE,UAAU,CAAC;;IAUnB;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAIrC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI;IAIjC,mBAAmB,IAAI,IAAI;IAI3B,kBAAkB,IAAI,IAAI;IAI1B,kBAAkB,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG,IAAI;IAS1C;;OAEG;IACH,IAAI,KAAK,IAAI,KAAK,CAEjB;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,UAAU,EAAE,CAExB;IAED;;OAEG;IACH,IAAI,sBAAsB,IAAI,UAAU,EAAE,CAEzC;IAED;;OAEG;IACH,IAAI,OAAO,IAAI,UAAU,EAAE,CAE1B;IAED;;OAEG;IACH,IAAI,aAAa,IAAI,UAAU,EAAE,CAEhC;IAED;;OAEG;IACH,IAAI,iBAAiB,IAAI,UAAU,EAAE,CAEpC;IAED;;OAEG;IACH,IAAI,iBAAiB,IAAI,UAAU,GAAG,SAAS,CAE9C;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,SAAS,EAAE,CAExB;IAED;;OAEG;IACH,IAAI,YAAY,IAAI,SAAS,EAAE,CAW9B;IAED;;OAEG;IACH,SAAS,IAAI,OAAO;IAIpB;;OAEG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAIjD;;OAEG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;CAGhD"} \ No newline at end of file +{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../../src/scripts/store/store.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,KAAK,IAAI,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,MAAM,CAAC,OAAO,OAAO,KAAM,YAAW,MAAM;IAC1C,MAAM,EAAE,UAAU,CAAC;;IAUnB;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAIrC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI;IAIjC,mBAAmB,IAAI,IAAI;IAI3B,kBAAkB,IAAI,IAAI;IAI1B,kBAAkB,CAAC,IAAI,EAAE,MAAM,IAAI,GAAG,IAAI;IAS1C;;OAEG;IACH,IAAI,KAAK,IAAI,KAAK,CAEjB;IAED;;OAEG;IACH,IAAI,KAAK,IAAI,UAAU,EAAE,CAExB;IAED;;OAEG;IACH,IAAI,sBAAsB,IAAI,UAAU,EAAE,CAIzC;IAED;;OAEG;IACH,IAAI,OAAO,IAAI,UAAU,EAAE,CAE1B;IAED;;OAEG;IACH,IAAI,aAAa,IAAI,UAAU,EAAE,CAEhC;IAED;;OAEG;IACH,IAAI,iBAAiB,IAAI,UAAU,EAAE,CAIpC;IAED;;OAEG;IACH,IAAI,iBAAiB,IAAI,UAAU,GAAG,SAAS,CAI9C;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,SAAS,EAAE,CAExB;IAED;;OAEG;IACH,IAAI,YAAY,IAAI,SAAS,EAAE,CAW9B;IAED;;OAEG;IACH,SAAS,IAAI,OAAO;IAIpB;;OAEG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS;IAIjD;;OAEG;IACH,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;CAGhD"} \ No newline at end of file diff --git a/public/types/src/scripts/templates.d.ts b/public/types/src/scripts/templates.d.ts index 87bcb2538..7ee586d2e 100644 --- a/public/types/src/scripts/templates.d.ts +++ b/public/types/src/scripts/templates.d.ts @@ -3,27 +3,10 @@ * Can be overridden by providing `callbackOnCreateTemplates` option. * `Choices.defaults.templates` allows access to the default template methods from `callbackOnCreateTemplates` */ -import { ChoiceFull } from './interfaces/choice-full'; -import { GroupFull } from './interfaces/group-full'; -import { PassedElementType } from './interfaces/passed-element-type'; import { StringPreEscaped } from './interfaces/string-pre-escaped'; import { StringUntrusted } from './interfaces/string-untrusted'; -import { Options } from './interfaces/options'; -type TemplateOptions = Pick; +import { Templates as TemplatesInterface } from './interfaces/templates'; export declare const escapeForTemplate: (allowHTML: boolean, s: StringUntrusted | StringPreEscaped | string) => string; -declare const templates: { - containerOuter({ classNames: { containerOuter } }: TemplateOptions, dir: HTMLElement["dir"], isSelectElement: boolean, isSelectOneElement: boolean, searchEnabled: boolean, passedElementType: PassedElementType, labelId: string): HTMLDivElement; - containerInner({ classNames: { containerInner }, }: TemplateOptions): HTMLDivElement; - itemList({ classNames: { list, listSingle, listItems } }: TemplateOptions, isSelectOneElement: boolean): HTMLDivElement; - placeholder({ allowHTML, classNames: { placeholder } }: TemplateOptions, value: StringPreEscaped | string): HTMLDivElement; - item({ allowHTML, removeItemButtonAlignLeft, classNames: { item, button, highlightedState, itemSelectable, placeholder, }, }: TemplateOptions, { id, value, label, labelClass, labelDescription, customProperties, active, disabled, highlighted, placeholder: isPlaceholder, }: ChoiceFull, removeItemButton: boolean): HTMLDivElement; - choiceList({ classNames: { list } }: TemplateOptions, isSelectOneElement: boolean): HTMLDivElement; - choiceGroup({ allowHTML, classNames: { group, groupHeading, itemDisabled }, }: TemplateOptions, { id, label, disabled }: GroupFull): HTMLDivElement; - choice({ allowHTML, classNames: { item, itemChoice, itemSelectable, selectedState, itemDisabled, description, placeholder, }, }: TemplateOptions, { id, value, label, groupId, elementId, labelClass, labelDescription, disabled: isDisabled, selected: isSelected, placeholder: isPlaceholder, }: ChoiceFull, selectText: string): HTMLDivElement; - input({ classNames: { input, inputCloned } }: TemplateOptions, placeholderValue: string | null): HTMLInputElement; - dropdown({ classNames: { list, listDropdown }, }: TemplateOptions): HTMLDivElement; - notice({ allowHTML, classNames: { item, itemChoice, addChoice, noResults, noChoices }, }: TemplateOptions, innerText: StringUntrusted | StringPreEscaped | string, type?: "no-choices" | "no-results" | "add-choice" | ""): HTMLDivElement; - option({ label, value, labelClass, labelDescription, customProperties, active, disabled, }: ChoiceFull): HTMLOptionElement; -}; +declare const templates: TemplatesInterface; export default templates; //# sourceMappingURL=templates.d.ts.map \ No newline at end of file diff --git a/public/types/src/scripts/templates.d.ts.map b/public/types/src/scripts/templates.d.ts.map index 1d7efaa49..7171eb1fa 100644 --- a/public/types/src/scripts/templates.d.ts.map +++ b/public/types/src/scripts/templates.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../../src/scripts/templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAoB,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAQhE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,KAAK,eAAe,GAAG,IAAI,CACzB,OAAO,EACP,YAAY,GAAG,WAAW,GAAG,2BAA2B,CACzD,CAAC;AAEF,eAAO,MAAM,iBAAiB,cACjB,OAAO,KACf,eAAe,GAAG,gBAAgB,GAAG,MAAM,KAC7C,MAA2E,CAAC;AAyB/E,QAAA,MAAM,SAAS;uDAEyB,eAAe,OAC9C,WAAW,CAAC,KAAK,CAAC,mBACN,OAAO,sBACJ,OAAO,iBACZ,OAAO,qBACH,iBAAiB,WAC3B,MAAM,GACd,cAAc;wDAiCd,eAAe,GAAG,cAAc;8DAOgB,eAAe,sBAC5C,OAAO,GAC1B,cAAc;4DAW6B,eAAe,SACpD,gBAAgB,GAAG,MAAM,GAC/B,cAAc;kIAkBZ,eAAe,oIAYf,UAAU,oBACK,OAAO,GACxB,cAAc;yCAgFW,eAAe,sBACrB,OAAO,GAC1B,cAAc;mFAiBZ,eAAe,2BACO,SAAS,GACjC,cAAc;qIAyCZ,eAAe,mJAYf,UAAU,cACD,MAAM,GACjB,cAAc;kDAmEyB,eAAe,oBACrC,MAAM,GAAG,IAAI,GAC9B,gBAAgB;sDAsBhB,eAAe,GAAG,cAAc;8FAc9B,eAAe,aACP,eAAe,GAAG,gBAAgB,GAAG,MAAM,SAChD,YAAY,GAAG,YAAY,GAAG,YAAY,GAAG,EAAE,GACpD,cAAc;gGAqCd,UAAU,GAAG,iBAAiB;CAkBlC,CAAC;AAEF,eAAe,SAAS,CAAC"} \ No newline at end of file +{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../../src/scripts/templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAOhE,OAAO,EAGL,SAAS,IAAI,kBAAkB,EAChC,MAAM,wBAAwB,CAAC;AAEhC,eAAO,MAAM,iBAAiB,cACjB,OAAO,KACf,eAAe,GAAG,gBAAgB,GAAG,MAAM,KAC7C,MAA2E,CAAC;AAgC/E,QAAA,MAAM,SAAS,EAAE,kBA+ZhB,CAAC;AAEF,eAAe,SAAS,CAAC"} \ No newline at end of file diff --git a/src/scripts/choices.ts b/src/scripts/choices.ts index 117cef452..3ae47cd7f 100644 --- a/src/scripts/choices.ts +++ b/src/scripts/choices.ts @@ -52,6 +52,7 @@ import { GroupFull } from './interfaces/group-full'; import { EventType, KeyCodeMap, PassedElementType } from './interfaces'; import { Choices as ChoicesInterface } from './interfaces/choices'; import { EventChoice } from './interfaces/event-choice'; +import { Templates } from './interfaces/templates'; /** @see {@link http://browserhacks.com/#hack-acea075d0ac6954f275a70023906050c} */ const IS_IE11 = @@ -77,7 +78,7 @@ class Choices implements ChoicesInterface { static get defaults(): { options: Partial; allOptions: Options; - templates: typeof templates; + templates: Templates; } { return Object.preventExtensions({ get options(): Partial { @@ -86,7 +87,7 @@ class Choices implements ChoicesInterface { get allOptions(): Options { return DEFAULT_CONFIG; }, - get templates(): typeof templates { + get templates(): Templates { return templates; }, }); @@ -126,7 +127,7 @@ class Choices implements ChoicesInterface { _store: Store; - _templates: typeof templates; + _templates: Templates; _initialState: State; @@ -2464,7 +2465,7 @@ class Choices implements ChoicesInterface { } }); - this._templates = templating as typeof templates; + this._templates = templating as Templates; } _createElements(): void { diff --git a/src/scripts/interfaces/choices.ts b/src/scripts/interfaces/choices.ts index 7c7f9d59a..1249a7efe 100644 --- a/src/scripts/interfaces/choices.ts +++ b/src/scripts/interfaces/choices.ts @@ -9,14 +9,14 @@ import { import { Store } from './store'; import { InputChoice } from './input-choice'; import { State } from './state'; -import templates from '../templates'; -// eslint-disable-next-line import/no-cycle -import { Options } from './options'; +import { Templates } from './templates'; import { ChoiceFull } from './choice-full'; import { GroupFull } from './group-full'; +import { Options } from './options'; export interface Choices { initialised: boolean; + config: Options; passedElement: WrappedInput | WrappedSelect; @@ -43,7 +43,7 @@ export interface Choices { _store: Store; - _templates: typeof templates; + _templates: Templates; _initialState: State; diff --git a/src/scripts/interfaces/options.ts b/src/scripts/interfaces/options.ts index 28012449b..17696e58f 100644 --- a/src/scripts/interfaces/options.ts +++ b/src/scripts/interfaces/options.ts @@ -1,11 +1,8 @@ import Fuse from 'fuse.js'; -// eslint-disable-next-line import/no-cycle -import { Choices } from './choices'; import { InputChoice } from './input-choice'; import { ClassNames } from './class-names'; import { PositionOptionsType } from './position-options-type'; import { Types } from './types'; -import { RecordToCompare } from '../lib/utils'; export const ObjectsInConfig = ['fuseOptions', 'classNames']; @@ -395,7 +392,10 @@ export interface Options { * * @default sortByAlpha */ - sorter: (current: RecordToCompare, next: RecordToCompare) => number; + sorter: ( + current: Types.RecordToCompare, + next: Types.RecordToCompare, + ) => number; /** * Whether the input should show a placeholder. Used in conjunction with `placeholderValue`. If `placeholder` is set to true and no value is passed to `placeholderValue`, the passed input's placeholder attribute will be used as the placeholder value. @@ -551,7 +551,7 @@ export interface Options { /** * Choices uses the great Fuse library for searching. You can find more options here: https://fusejs.io/api/options.html */ - fuseOptions: Fuse.IFuseOptions; + fuseOptions: Fuse.IFuseOptions; // Fuse.IFuseOptions; /** * ID of the connected label to improve a11y. If set, aria-labelledby will be added. @@ -567,7 +567,7 @@ export interface Options { * * @default null */ - callbackOnInit: ((this: Choices) => void) | null; + callbackOnInit: (() => void) | null; /** * Function to run on template creation. Through this callback it is possible to provide custom templates for the various components of Choices (see terminology). For Choices to work with custom templates, it is important you maintain the various data attributes defined here [https://github.com/jshjohnson/Choices/blob/67f29c286aa21d88847adfcd6304dc7d068dc01f/assets/scripts/src/choices.js#L1993-L2067]. diff --git a/src/scripts/interfaces/templates.ts b/src/scripts/interfaces/templates.ts new file mode 100644 index 000000000..ff20b8d91 --- /dev/null +++ b/src/scripts/interfaces/templates.ts @@ -0,0 +1,117 @@ +import { PassedElementType } from './passed-element-type'; +import { StringPreEscaped } from './string-pre-escaped'; +import { ChoiceFull } from './choice-full'; +import { GroupFull } from './group-full'; +import { StringUntrusted } from './string-untrusted'; +// eslint-disable-next-line import/no-cycle +import { Options } from './options'; + +export type TemplateOptions = Pick< + Options, + 'classNames' | 'allowHTML' | 'removeItemButtonAlignLeft' +>; + +export type NoticeType = 'no-choices' | 'no-results' | 'add-choice' | ''; + +export interface Templates { + containerOuter( + { + classNames: { containerOuter }, + }: TemplateOptions, + dir: HTMLElement['dir'], + isSelectElement: boolean, + isSelectOneElement: boolean, + searchEnabled: boolean, + passedElementType: PassedElementType, + labelId: string, + ): HTMLDivElement; + + containerInner({ + classNames: { containerInner }, + }: TemplateOptions): HTMLDivElement; + + itemList( + { + classNames: { list, listSingle, listItems }, + }: TemplateOptions, + isSelectOneElement: boolean, + ): HTMLDivElement; + + placeholder( + { + allowHTML, + classNames: { placeholder }, + }: TemplateOptions, + value: StringPreEscaped | string, + ): HTMLDivElement; + + item( + { + allowHTML, + removeItemButtonAlignLeft, + classNames: { + item, + button, + highlightedState, + itemSelectable, + placeholder, + }, + }: TemplateOptions, + choice: ChoiceFull, + removeItemButton: boolean, + ): HTMLDivElement; + + choiceList( + { + classNames: { list }, + }: TemplateOptions, + isSelectOneElement: boolean, + ): HTMLDivElement; + + choiceGroup( + { + allowHTML, + classNames: { group, groupHeading, itemDisabled }, + }: TemplateOptions, + { id, label, disabled }: GroupFull, + ): HTMLDivElement; + + choice( + { + allowHTML, + classNames: { + item, + itemChoice, + itemSelectable, + selectedState, + itemDisabled, + description, + placeholder, + }, + }: TemplateOptions, + choice: ChoiceFull, + selectText: string, + ): HTMLDivElement; + + input( + { + classNames: { input, inputCloned }, + }: TemplateOptions, + placeholderValue: string | null, + ): HTMLInputElement; + + dropdown({ + classNames: { list, listDropdown }, + }: TemplateOptions): HTMLDivElement; + + notice( + { + allowHTML, + classNames: { item, itemChoice, addChoice, noResults, noChoices }, + }: TemplateOptions, + innerText: StringUntrusted | StringPreEscaped | string, + type: NoticeType, + ): HTMLDivElement; + + option(choice: ChoiceFull): HTMLOptionElement; +} diff --git a/src/scripts/interfaces/types.ts b/src/scripts/interfaces/types.ts index 8097798ae..291ceca1a 100644 --- a/src/scripts/interfaces/types.ts +++ b/src/scripts/interfaces/types.ts @@ -20,4 +20,9 @@ export namespace Types { value1: string, value2: string, ) => boolean; + + export interface RecordToCompare { + value?: StringUntrusted | string; + label?: StringUntrusted | string; + } } diff --git a/src/scripts/lib/utils.ts b/src/scripts/lib/utils.ts index 53c07b6e3..65077e8d5 100644 --- a/src/scripts/lib/utils.ts +++ b/src/scripts/lib/utils.ts @@ -4,6 +4,7 @@ import { EventType } from '../interfaces/event-type'; import { StringUntrusted } from '../interfaces/string-untrusted'; import { StringPreEscaped } from '../interfaces/string-pre-escaped'; import { ChoiceFull } from '../interfaces/choice-full'; +import { Types } from '../interfaces/types'; const getRandomNumber = (min: number, max: number): number => Math.floor(Math.random() * (max - min) + min); @@ -111,11 +112,6 @@ export const strToEl = ((): ((str: string) => Element) => { }; })(); -export interface RecordToCompare { - value?: StringUntrusted | string; - label?: StringUntrusted | string; -} - export const unwrapStringForRaw = ( s?: StringUntrusted | StringPreEscaped | string, ): string => { @@ -155,8 +151,8 @@ export const unwrapStringForEscaped = ( }; export const sortByAlpha = ( - { value, label = value }: RecordToCompare, - { value: value2, label: label2 = value2 }: RecordToCompare, + { value, label = value }: Types.RecordToCompare, + { value: value2, label: label2 = value2 }: Types.RecordToCompare, ): number => unwrapStringForRaw(label).localeCompare(unwrapStringForRaw(label2), [], { sensitivity: 'base', diff --git a/src/scripts/templates.test.ts b/src/scripts/templates.test.ts index f3921c51f..16b95aeec 100644 --- a/src/scripts/templates.test.ts +++ b/src/scripts/templates.test.ts @@ -681,7 +681,7 @@ describe('templates', () => { ${label} `); - const actualOutput = templates.notice(noticeOptions, label); + const actualOutput = templates.notice(noticeOptions, label, ''); expectEqualElements(actualOutput, expectedOutput); }); diff --git a/src/scripts/templates.ts b/src/scripts/templates.ts index 1a0070494..9fe707c90 100644 --- a/src/scripts/templates.ts +++ b/src/scripts/templates.ts @@ -15,13 +15,11 @@ import { unwrapStringForRaw, unwrapStringForEscaped, } from './lib/utils'; -// eslint-disable-next-line import/no-cycle -import { Options } from './interfaces/options'; - -type TemplateOptions = Pick< - Options, - 'classNames' | 'allowHTML' | 'removeItemButtonAlignLeft' ->; +import { + NoticeType, + TemplateOptions, + Templates as TemplatesInterface, +} from './interfaces/templates'; export const escapeForTemplate = ( allowHTML: boolean, @@ -58,7 +56,7 @@ const assignCustomProperties = ( } }; -const templates = { +const templates: TemplatesInterface = { containerOuter( { classNames: { containerOuter } }: TemplateOptions, dir: HTMLElement['dir'], @@ -417,7 +415,7 @@ const templates = { classNames: { item, itemChoice, addChoice, noResults, noChoices }, }: TemplateOptions, innerText: StringUntrusted | StringPreEscaped | string, - type: 'no-choices' | 'no-results' | 'add-choice' | '' = '', + type: NoticeType = '', ): HTMLDivElement { const classes = [...getClassNames(item), ...getClassNames(itemChoice)];