@anglr/select 16.0.0-beta.20260413121129 → 16.0.0-beta.20260415112147

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## Version 16.0.0 (2026-04-10)
3
+ ## Version 16.0.0 (2026-04-15)
4
4
 
5
5
  ### Features
6
6
 
@@ -63,6 +63,7 @@
63
63
  - new `OptionsHandlerOptions` interface, that represents options for options handler plugin
64
64
  - **properties**
65
65
  - `newOptionGetter` allows adding new option to select when defined
66
+ - `newOptionOnlyWhenNoOptions` indication that add new option only when there are no options available
66
67
  - new `SimpleOptionsHandlerOptions` interface, that represents options for simple options handler plugin
67
68
  - **properties**
68
69
  - `listSelected` indication whether display selected option in list of available options
@@ -1 +1 @@
1
- {"version":3,"file":"optionsHandler.interface.js","sourceRoot":"","sources":["../../../../../src/interfaces/plugins/optionsHandler/optionsHandler.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Signal} from '@angular/core';\n\nimport {PluginOptions} from '../../pluginOptions/pluginOptions.interface';\nimport {SelectPlugin} from '../../selectPlugin/selectPlugin.interface';\nimport {SelectOptionState} from '../../selectOptionState/selectOptionState.interface';\nimport {NewOptionGetterFunc} from '../../../misc/types';\n\n/**\n * Options for options handler plugin\n */\nexport interface OptionsHandlerOptions<TValue = unknown> extends PluginOptions\n{\n //######################### properties #########################\n\n /**\n * Allows adding new option to select when defined\n */\n newOptionGetter: NewOptionGetterFunc<TValue>|undefined|null;\n}\n\n/**\n * Options handler plugin interface\n */\nexport interface OptionsHandler<TValue = unknown, TPublicValue = TValue, TOptions extends OptionsHandlerOptions<TValue> = OptionsHandlerOptions<TValue>> extends SelectPlugin<TOptions, TValue, TPublicValue>\n{\n //######################### properties #########################\n\n /**\n * Array of options that are available for processing\n */\n readonly availableOptions: Signal<readonly SelectOptionState<TValue>[]|undefined|null>;\n\n /**\n * Array of options that are available for listing/displaying\n */\n readonly listOptions: Signal<readonly SelectOptionState<TValue>[]|undefined|null>;\n}\n"]}
1
+ {"version":3,"file":"optionsHandler.interface.js","sourceRoot":"","sources":["../../../../../src/interfaces/plugins/optionsHandler/optionsHandler.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Signal} from '@angular/core';\n\nimport {PluginOptions} from '../../pluginOptions/pluginOptions.interface';\nimport {SelectPlugin} from '../../selectPlugin/selectPlugin.interface';\nimport {SelectOptionState} from '../../selectOptionState/selectOptionState.interface';\nimport {NewOptionGetterFunc} from '../../../misc/types';\n\n/**\n * Options for options handler plugin\n */\nexport interface OptionsHandlerOptions<TValue = unknown> extends PluginOptions\n{\n //######################### properties #########################\n\n /**\n * Allows adding new option to select when defined\n */\n newOptionGetter: NewOptionGetterFunc<TValue>|undefined|null;\n\n /**\n * Indication that add new option only when there are no options available\n */\n newOptionOnlyWhenNoOptions: boolean;\n}\n\n/**\n * Options handler plugin interface\n */\nexport interface OptionsHandler<TValue = unknown, TPublicValue = TValue, TOptions extends OptionsHandlerOptions<TValue> = OptionsHandlerOptions<TValue>> extends SelectPlugin<TOptions, TValue, TPublicValue>\n{\n //######################### properties #########################\n\n /**\n * Array of options that are available for processing\n */\n readonly availableOptions: Signal<readonly SelectOptionState<TValue>[]|undefined|null>;\n\n /**\n * Array of options that are available for listing/displaying\n */\n readonly listOptions: Signal<readonly SelectOptionState<TValue>[]|undefined|null>;\n}\n"]}
@@ -7,6 +7,7 @@ import { OptionsHandlerBase } from '../optionsHandlerBase';
7
7
  import * as i0 from "@angular/core";
8
8
  const defaultOptions = {
9
9
  newOptionGetter: undefined,
10
+ newOptionOnlyWhenNoOptions: false,
10
11
  };
11
12
  /**
12
13
  * Options handler that does nothing to obtained options, use them as they are
@@ -20,7 +21,7 @@ export class NoOptionsHandler extends OptionsHandlerBase {
20
21
  this.listOptions = computed(() => {
21
22
  const firstOption = this.firstOption();
22
23
  const availableOptions = this.availableOptions();
23
- if (firstOption && availableOptions) {
24
+ if (firstOption && availableOptions && (!this.options.newOptionOnlyWhenNoOptions || !availableOptions.length)) {
24
25
  availableOptions.unshift(firstOption);
25
26
  }
26
27
  return availableOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"noOptionsHandler.component.js","sourceRoot":"","sources":["../../../../../src/plugins/optionsHandler/noOptionsHandler/noOptionsHandler.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,uBAAuB,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAS,MAAM,eAAe,CAAC;AAErG,OAAO,EAAC,yBAAyB,EAAC,MAAM,uBAAuB,CAAC;AAGhE,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;;AAEzD,MAAM,cAAc,GACpB;IACI,eAAe,EAAE,SAAS;CAC7B,CAAC;AAEF;;GAEG;AAOH,MAAM,OAAO,gBAA0D,SAAQ,kBAAuE;IAsBlJ,iEAAiE;IACjE,YAAyD,OAA8D;QAEnH,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,OAAO,GAAG,yBAAyB,CAAC,cAA+C,EAC/C,OAAO,CAAC,CAAC;QAElD,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,eAAe,CAAC,gBAAgB,EAAE,4DAAC,CAAC;QAC1G,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,GAAG,EAAE;YAE7B,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;YACvC,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,EAAoD,CAAC;YAEnG,IAAG,WAAW,IAAI,gBAAgB,EAClC,CAAC;gBACG,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YAC1C,CAAC;YAED,OAAO,gBAAgB,CAAC;QAC5B,CAAC,uDAAC,CAAC;IACP,CAAC;8GA3CQ,gBAAgB,kBAuBL,uBAAuB;kGAvBlC,gBAAgB,qGAHf,EAAE;;AAWL;IADN,mBAAmB,EAAE;;iDACwB;2FARrC,gBAAgB;kBAN5B,SAAS;mBACV;oBACI,QAAQ,EAAE,oBAAoB;oBAC9B,QAAQ,EAAE,EAAE;oBACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAClD;;0BAwBgB,MAAM;2BAAC,uBAAuB;;0BAAG,QAAQ","sourcesContent":["import {ChangeDetectionStrategy, Component, computed, Inject, Optional, Signal} from '@angular/core';\nimport {RecursivePartial} from '@jscrpt/common';\nimport {deepCopyWithArrayOverride} from '@jscrpt/common/lodash';\n\nimport {OptionsHandler, SelectOptionState, OptionsHandlerOptions} from '../../../interfaces';\nimport {CopyOptionsAsSignal} from '../../../decorators';\nimport {OPTIONS_HANDLER_OPTIONS} from '../../../misc/tokens';\nimport {OptionsHandlerBase} from '../optionsHandlerBase';\n\nconst defaultOptions: OptionsHandlerOptions<unknown> =\n{\n newOptionGetter: undefined,\n};\n\n/**\n * Options handler that does nothing to obtained options, use them as they are\n */\n@Component(\n{\n selector: 'no-options-handler',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NoOptionsHandler<TValue = unknown, TPublicValue = TValue> extends OptionsHandlerBase<TValue, TPublicValue, OptionsHandlerOptions<TValue>> implements OptionsHandler<TValue, TPublicValue, OptionsHandlerOptions<TValue>>\n{\n //######################### public properties - implementation of SelectPlugin #########################\n\n /**\n * @inheritdoc\n */\n @CopyOptionsAsSignal()\n public options: OptionsHandlerOptions<TValue>;\n\n //######################### public properties - implementation of OptionsHandler #########################\n\n /**\n * @inheritdoc\n */\n public readonly availableOptions: Signal<readonly SelectOptionState<TValue>[]|undefined|null>;\n\n /**\n * @inheritdoc\n */\n public readonly listOptions: Signal<readonly SelectOptionState<TValue>[]|undefined|null>;\n\n //######################### constructor #########################\n constructor(@Inject(OPTIONS_HANDLER_OPTIONS) @Optional() options?: RecursivePartial<OptionsHandlerOptions<TValue>>|null,)\n {\n super();\n\n this.options = deepCopyWithArrayOverride(defaultOptions as OptionsHandlerOptions<TValue>,\n options);\n\n this.availableOptions = computed(() => this.selectBus.selectOptions().optionsGatherer.availableOptions());\n this.listOptions = computed(() =>\n {\n const firstOption = this.firstOption();\n const availableOptions = this.availableOptions() as SelectOptionState<TValue>[] | null | undefined;\n\n if(firstOption && availableOptions)\n {\n availableOptions.unshift(firstOption);\n }\n\n return availableOptions;\n });\n }\n}\n"]}
1
+ {"version":3,"file":"noOptionsHandler.component.js","sourceRoot":"","sources":["../../../../../src/plugins/optionsHandler/noOptionsHandler/noOptionsHandler.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,uBAAuB,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAS,MAAM,eAAe,CAAC;AAErG,OAAO,EAAC,yBAAyB,EAAC,MAAM,uBAAuB,CAAC;AAGhE,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;;AAEzD,MAAM,cAAc,GACpB;IACI,eAAe,EAAE,SAAS;IAC1B,0BAA0B,EAAE,KAAK;CACpC,CAAC;AAEF;;GAEG;AAOH,MAAM,OAAO,gBAA0D,SAAQ,kBAAuE;IAsBlJ,iEAAiE;IACjE,YAAyD,OAA8D;QAEnH,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,OAAO,GAAG,yBAAyB,CAAC,cAA+C,EAC/C,OAAO,CAAC,CAAC;QAElD,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,eAAe,CAAC,gBAAgB,EAAE,4DAAC,CAAC;QAC1G,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,GAAG,EAAE;YAE7B,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;YACvC,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,EAAoD,CAAC;YAEnG,IAAG,WAAW,IAAI,gBAAgB,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,0BAA0B,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAC5G,CAAC;gBACG,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YAC1C,CAAC;YAED,OAAO,gBAAgB,CAAC;QAC5B,CAAC,uDAAC,CAAC;IACP,CAAC;8GA3CQ,gBAAgB,kBAuBL,uBAAuB;kGAvBlC,gBAAgB,qGAHf,EAAE;;AAWL;IADN,mBAAmB,EAAE;;iDACwB;2FARrC,gBAAgB;kBAN5B,SAAS;mBACV;oBACI,QAAQ,EAAE,oBAAoB;oBAC9B,QAAQ,EAAE,EAAE;oBACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAClD;;0BAwBgB,MAAM;2BAAC,uBAAuB;;0BAAG,QAAQ","sourcesContent":["import {ChangeDetectionStrategy, Component, computed, Inject, Optional, Signal} from '@angular/core';\nimport {RecursivePartial} from '@jscrpt/common';\nimport {deepCopyWithArrayOverride} from '@jscrpt/common/lodash';\n\nimport {OptionsHandler, SelectOptionState, OptionsHandlerOptions} from '../../../interfaces';\nimport {CopyOptionsAsSignal} from '../../../decorators';\nimport {OPTIONS_HANDLER_OPTIONS} from '../../../misc/tokens';\nimport {OptionsHandlerBase} from '../optionsHandlerBase';\n\nconst defaultOptions: OptionsHandlerOptions<unknown> =\n{\n newOptionGetter: undefined,\n newOptionOnlyWhenNoOptions: false,\n};\n\n/**\n * Options handler that does nothing to obtained options, use them as they are\n */\n@Component(\n{\n selector: 'no-options-handler',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NoOptionsHandler<TValue = unknown, TPublicValue = TValue> extends OptionsHandlerBase<TValue, TPublicValue, OptionsHandlerOptions<TValue>> implements OptionsHandler<TValue, TPublicValue, OptionsHandlerOptions<TValue>>\n{\n //######################### public properties - implementation of SelectPlugin #########################\n\n /**\n * @inheritdoc\n */\n @CopyOptionsAsSignal()\n public options: OptionsHandlerOptions<TValue>;\n\n //######################### public properties - implementation of OptionsHandler #########################\n\n /**\n * @inheritdoc\n */\n public readonly availableOptions: Signal<readonly SelectOptionState<TValue>[]|undefined|null>;\n\n /**\n * @inheritdoc\n */\n public readonly listOptions: Signal<readonly SelectOptionState<TValue>[]|undefined|null>;\n\n //######################### constructor #########################\n constructor(@Inject(OPTIONS_HANDLER_OPTIONS) @Optional() options?: RecursivePartial<OptionsHandlerOptions<TValue>>|null,)\n {\n super();\n\n this.options = deepCopyWithArrayOverride(defaultOptions as OptionsHandlerOptions<TValue>,\n options);\n\n this.availableOptions = computed(() => this.selectBus.selectOptions().optionsGatherer.availableOptions());\n this.listOptions = computed(() =>\n {\n const firstOption = this.firstOption();\n const availableOptions = this.availableOptions() as SelectOptionState<TValue>[] | null | undefined;\n\n if(firstOption && availableOptions && (!this.options.newOptionOnlyWhenNoOptions || !availableOptions.length))\n {\n availableOptions.unshift(firstOption);\n }\n\n return availableOptions;\n });\n }\n}\n"]}
@@ -9,6 +9,7 @@ import * as i0 from "@angular/core";
9
9
  const defaultOptions = {
10
10
  listSelected: true,
11
11
  newOptionGetter: undefined,
12
+ newOptionOnlyWhenNoOptions: false,
12
13
  };
13
14
  /**
14
15
  * Options handler that does apply live search and allows to remove selected option(s) from options list
@@ -31,7 +32,7 @@ export class SimpleOptionsHandler extends OptionsHandlerBase {
31
32
  });
32
33
  }
33
34
  if (!text) {
34
- if (firstOption && availableOptions) {
35
+ if (firstOption && availableOptions && (!this.options.newOptionOnlyWhenNoOptions || !availableOptions.length)) {
35
36
  availableOptions.unshift(firstOption);
36
37
  }
37
38
  return availableOptions;
@@ -42,7 +43,7 @@ export class SimpleOptionsHandler extends OptionsHandlerBase {
42
43
  const textCompare = options.textCompare;
43
44
  availableOptions = availableOptions
44
45
  ?.filter(itm => textCompare(normalize(textExtractor(itm)), normalize(text)));
45
- if (firstOption && availableOptions) {
46
+ if (firstOption && availableOptions && (!this.options.newOptionOnlyWhenNoOptions || !availableOptions.length)) {
46
47
  availableOptions.unshift(firstOption);
47
48
  }
48
49
  return availableOptions;
@@ -1 +1 @@
1
- {"version":3,"file":"simpleOptionsHandler.component.js","sourceRoot":"","sources":["../../../../../src/plugins/optionsHandler/simpleOptionsHandler/simpleOptionsHandler.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,uBAAuB,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAS,MAAM,eAAe,CAAC;AAErG,OAAO,EAAC,yBAAyB,EAAC,MAAM,uBAAuB,CAAC;AAGhE,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAC,oBAAoB,EAAC,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;;AAEzD,MAAM,cAAc,GACpB;IACI,YAAY,EAAE,IAAI;IAClB,eAAe,EAAE,SAAS;CAC7B,CAAC;AAEF;;GAEG;AAOH,MAAM,OAAO,oBAA8D,SAAQ,kBAA6E;IAsB5J,iEAAiE;IACjE,YAAyD,OAAoE;QAEzH,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,OAAO,GAAG,yBAAyB,CAAC,cAAqD,EACrD,OAAO,CAAC,CAAC;QAElD,IAAI,CAAC,gBAAgB,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,eAAe,CAAC,gBAAgB,EAAE,4DAAC,CAAC;QAC1G,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,GA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,CAAC,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAEjF,IAAG,WAAW,IAAI,gBAAgB,EAClC,CAAC;gBACG,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;YAC1C,CAAC;YAED,OAAO,gBAAgB,CAAC;QAC5B,CAAC,uDAAC,CAAC;IACP,CAAC;8GAxEQ,oBAAoB,kBAuBT,uBAAuB;kGAvBlC,oBAAoB,yGAHnB,EAAE;;AAWL;IADN,mBAAmB,EAAE;;qDAC8B;2FAR3C,oBAAoB;kBANhC,SAAS;mBACV;oBACI,QAAQ,EAAE,wBAAwB;oBAClC,QAAQ,EAAE,EAAE;oBACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAClD;;0BAwBgB,MAAM;2BAAC,uBAAuB;;0BAAG,QAAQ","sourcesContent":["import {ChangeDetectionStrategy, Component, computed, Inject, Optional, Signal} from '@angular/core';\nimport {RecursivePartial} from '@jscrpt/common';\nimport {deepCopyWithArrayOverride} from '@jscrpt/common/lodash';\n\nimport {OptionsHandler, SelectOptionState, SimpleOptionsHandlerOptions} from '../../../interfaces';\nimport {CopyOptionsAsSignal} from '../../../decorators';\nimport {OPTIONS_HANDLER_OPTIONS} from '../../../misc/tokens';\nimport {compareSelectOptions} from '../../../misc/utils';\nimport {OptionsHandlerBase} from '../optionsHandlerBase';\n\nconst defaultOptions: SimpleOptionsHandlerOptions<unknown> =\n{\n listSelected: true,\n newOptionGetter: undefined,\n};\n\n/**\n * Options handler that does apply live search and allows to remove selected option(s) from options list\n */\n@Component(\n{\n selector: 'simple-options-handler',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SimpleOptionsHandler<TValue = unknown, TPublicValue = TValue> extends OptionsHandlerBase<TValue, TPublicValue, SimpleOptionsHandlerOptions<TValue>> implements OptionsHandler<TValue, TPublicValue, SimpleOptionsHandlerOptions<TValue>>\n{\n //######################### public properties - implementation of SelectPlugin #########################\n\n /**\n * @inheritdoc\n */\n @CopyOptionsAsSignal()\n public options: SimpleOptionsHandlerOptions<TValue>;\n\n //######################### public properties - implementation of OptionsHandler #########################\n\n /**\n * @inheritdoc\n */\n public readonly availableOptions: Signal<readonly SelectOptionState<TValue>[]|undefined|null>;\n\n /**\n * @inheritdoc\n */\n public readonly listOptions: Signal<readonly SelectOptionState<TValue>[]|undefined|null>;\n\n //######################### constructor #########################\n constructor(@Inject(OPTIONS_HANDLER_OPTIONS) @Optional() options?: RecursivePartial<SimpleOptionsHandlerOptions<TValue>>|null,)\n {\n super();\n\n this.options = deepCopyWithArrayOverride(defaultOptions as SimpleOptionsHandlerOptions<TValue>,\n options);\n\n this.availableOptions = computed(() => this.selectBus.selectOptions().optionsGatherer.availableOptions());\n this.listOptions = computed(() =>\n {\n const text = this.selectPlugins.LiveSearch.search();\n const selectedOptions = this.selectBus.selectedOptions() ?? [];\n const opts = Array.isArray(selectedOptions) ? selectedOptions : [selectedOptions];\n const firstOption = this.firstOption();\n let availableOptions = this.availableOptions() as SelectOptionState<TValue>[] | null | undefined;\n\n if(!this.options.listSelected)\n {\n availableOptions = availableOptions?.filter(itm =>\n {\n return !opts.some(it => compareSelectOptions(it, itm, this.selectBus));\n });\n }\n\n if(!text)\n {\n if(firstOption && availableOptions)\n {\n availableOptions.unshift(firstOption);\n }\n\n return availableOptions;\n }\n\n const options = this.selectBus.selectOptions();\n const textExtractor = options.textExtractor;\n const normalize = options.normalize;\n const textCompare = options.textCompare;\n\n availableOptions = availableOptions\n ?.filter(itm => textCompare(normalize(textExtractor(itm)), normalize(text)));\n\n if(firstOption && availableOptions)\n {\n availableOptions.unshift(firstOption);\n }\n\n return availableOptions;\n });\n }\n}\n"]}
1
+ {"version":3,"file":"simpleOptionsHandler.component.js","sourceRoot":"","sources":["../../../../../src/plugins/optionsHandler/simpleOptionsHandler/simpleOptionsHandler.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,uBAAuB,EAAE,SAAS,EAAE,QAAQ,EA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Q,oBAAoB,kBAuBT,uBAAuB;kGAvBlC,oBAAoB,yGAHnB,EAAE;;AAWL;IADN,mBAAmB,EAAE;;qDAC8B;2FAR3C,oBAAoB;kBANhC,SAAS;mBACV;oBACI,QAAQ,EAAE,wBAAwB;oBAClC,QAAQ,EAAE,EAAE;oBACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAClD;;0BAwBgB,MAAM;2BAAC,uBAAuB;;0BAAG,QAAQ","sourcesContent":["import {ChangeDetectionStrategy, Component, computed, Inject, Optional, Signal} from '@angular/core';\nimport {RecursivePartial} from '@jscrpt/common';\nimport {deepCopyWithArrayOverride} from '@jscrpt/common/lodash';\n\nimport {OptionsHandler, SelectOptionState, SimpleOptionsHandlerOptions} from '../../../interfaces';\nimport {CopyOptionsAsSignal} from '../../../decorators';\nimport {OPTIONS_HANDLER_OPTIONS} from '../../../misc/tokens';\nimport {compareSelectOptions} from '../../../misc/utils';\nimport {OptionsHandlerBase} from '../optionsHandlerBase';\n\nconst defaultOptions: SimpleOptionsHandlerOptions<unknown> =\n{\n listSelected: true,\n newOptionGetter: undefined,\n newOptionOnlyWhenNoOptions: false,\n};\n\n/**\n * Options handler that does apply live search and allows to remove selected option(s) from options list\n */\n@Component(\n{\n selector: 'simple-options-handler',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SimpleOptionsHandler<TValue = unknown, TPublicValue = TValue> extends OptionsHandlerBase<TValue, TPublicValue, SimpleOptionsHandlerOptions<TValue>> implements OptionsHandler<TValue, TPublicValue, SimpleOptionsHandlerOptions<TValue>>\n{\n //######################### public properties - implementation of SelectPlugin #########################\n\n /**\n * @inheritdoc\n */\n @CopyOptionsAsSignal()\n public options: SimpleOptionsHandlerOptions<TValue>;\n\n //######################### public properties - implementation of OptionsHandler #########################\n\n /**\n * @inheritdoc\n */\n public readonly availableOptions: Signal<readonly SelectOptionState<TValue>[]|undefined|null>;\n\n /**\n * @inheritdoc\n */\n public readonly listOptions: Signal<readonly SelectOptionState<TValue>[]|undefined|null>;\n\n //######################### constructor #########################\n constructor(@Inject(OPTIONS_HANDLER_OPTIONS) @Optional() options?: RecursivePartial<SimpleOptionsHandlerOptions<TValue>>|null,)\n {\n super();\n\n this.options = deepCopyWithArrayOverride(defaultOptions as SimpleOptionsHandlerOptions<TValue>,\n options);\n\n this.availableOptions = computed(() => this.selectBus.selectOptions().optionsGatherer.availableOptions());\n this.listOptions = computed(() =>\n {\n const text = this.selectPlugins.LiveSearch.search();\n const selectedOptions = this.selectBus.selectedOptions() ?? [];\n const opts = Array.isArray(selectedOptions) ? selectedOptions : [selectedOptions];\n const firstOption = this.firstOption();\n let availableOptions = this.availableOptions() as SelectOptionState<TValue>[] | null | undefined;\n\n if(!this.options.listSelected)\n {\n availableOptions = availableOptions?.filter(itm =>\n {\n return !opts.some(it => compareSelectOptions(it, itm, this.selectBus));\n });\n }\n\n if(!text)\n {\n if(firstOption && availableOptions && (!this.options.newOptionOnlyWhenNoOptions || !availableOptions.length))\n {\n availableOptions.unshift(firstOption);\n }\n\n return availableOptions;\n }\n\n const options = this.selectBus.selectOptions();\n const textExtractor = options.textExtractor;\n const normalize = options.normalize;\n const textCompare = options.textCompare;\n\n availableOptions = availableOptions\n ?.filter(itm => textCompare(normalize(textExtractor(itm)), normalize(text)));\n\n if(firstOption && availableOptions && (!this.options.newOptionOnlyWhenNoOptions || !availableOptions.length))\n {\n availableOptions.unshift(firstOption);\n }\n\n return availableOptions;\n });\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anglr/select",
3
- "version": "16.0.0-beta.20260413121129",
3
+ "version": "16.0.0-beta.20260415112147",
4
4
  "description": "Angular component representing html select",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -11,6 +11,10 @@ export interface OptionsHandlerOptions<TValue = unknown> extends PluginOptions {
11
11
  * Allows adding new option to select when defined
12
12
  */
13
13
  newOptionGetter: NewOptionGetterFunc<TValue> | undefined | null;
14
+ /**
15
+ * Indication that add new option only when there are no options available
16
+ */
17
+ newOptionOnlyWhenNoOptions: boolean;
14
18
  }
15
19
  /**
16
20
  * Options handler plugin interface
@@ -1 +1 @@
1
- {"version":3,"file":"optionsHandler.interface.d.ts","sourceRoot":"","sources":["optionsHandler.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAErC,OAAO,EAAC,aAAa,EAAC,MAAM,6CAA6C,CAAC;AAC1E,OAAO,EAAC,YAAY,EAAC,MAAM,2CAA2C,CAAC;AACvE,OAAO,EAAC,iBAAiB,EAAC,MAAM,qDAAqD,CAAC;AACtF,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,qBAAqB,CAAC,MAAM,GAAG,OAAO,CAAE,SAAQ,aAAa;IAI1E;;OAEG;IACH,eAAe,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAC,SAAS,GAAC,IAAI,CAAC;CAC/D;AAED;;GAEG;AACH,MAAM,WAAW,cAAc,CAAC,MAAM,GAAG,OAAO,EAAE,YAAY,GAAG,MAAM,EAAE,QAAQ,SAAS,qBAAqB,CAAC,MAAM,CAAC,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAE,SAAQ,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,CAAC;IAIzM;;OAEG;IACH,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC,SAAS,iBAAiB,CAAC,MAAM,CAAC,EAAE,GAAC,SAAS,GAAC,IAAI,CAAC,CAAC;IAEvF;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,SAAS,iBAAiB,CAAC,MAAM,CAAC,EAAE,GAAC,SAAS,GAAC,IAAI,CAAC,CAAC;CACrF"}
1
+ {"version":3,"file":"optionsHandler.interface.d.ts","sourceRoot":"","sources":["optionsHandler.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAA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BAAgB,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC,GAAC,IAAI;yCAvBpH,oBAAoB;2CAApB,oBAAoB;CAyEhC"}
@@ -21,6 +21,11 @@
21
21
  background-color: transparent;
22
22
  border: none;
23
23
  outline: none;
24
+
25
+ *::placeholder
26
+ {
27
+ color: var(--select-liveSearch-placeholder);
28
+ }
24
29
  }
25
30
  }
26
31
  }
@@ -73,6 +73,7 @@
73
73
  background-color: transparent;
74
74
  border: none;
75
75
  cursor: pointer;
76
+ color: inherit;
76
77
  }
77
78
 
78
79
  .normal-state-cancel
@@ -38,6 +38,7 @@
38
38
  {
39
39
  padding: var(--select-popup-container-padding);
40
40
  background-color: var(--select-popup-container-background);
41
+ color: var(--select-popup-container-foreground);
41
42
  border-radius: var(--select-popup-container-borderRadius);
42
43
  }
43
44
 
@@ -10,16 +10,23 @@
10
10
  (
11
11
  normalState:
12
12
  (
13
+ borderColor: unset,
14
+ background: unset,
15
+ foreground: unset,
13
16
  borderWidth: var(--size-2px-fixed),
14
17
  padding: var(--size-1px) var(--size-2px),
15
18
  borderRadius: var(--size-4px-fixed),
16
19
  gap: var(--size-xs),
17
20
  focus:
18
21
  (
22
+ borderColor: unset,
23
+ outlineColor: unset,
19
24
  outlineWidth: var(--size-1px-fixed),
20
25
  ),
21
26
  tag:
22
27
  (
28
+ background: unset,
29
+ foreground: unset,
23
30
  gap: var(--size-xs),
24
31
  padding: var(--size-none) var(--size-xs),
25
32
  borderRadius: var(--size-4px),
@@ -30,6 +37,8 @@
30
37
  (
31
38
  container:
32
39
  (
40
+ background: unset,
41
+ foreground: unset,
33
42
  padding: mixins.getSize($fontSize, 4),
34
43
  borderRadius: mixins.getSize($fontSize, 4),
35
44
  ),
@@ -57,6 +66,10 @@
57
66
  fontWeight: 500,
58
67
  ),
59
68
  ),
69
+ liveSearch:
70
+ (
71
+ placeholder: unset,
72
+ ),
60
73
  ),
61
74
  );
62
75
 
@@ -3,6 +3,7 @@
3
3
  @use '../core/mixins';
4
4
 
5
5
  $_blue: #0066ff;
6
+ $_white: #f0f0f0;
6
7
 
7
8
  @function defineTheme($fontSize: 14px, $theme: (), $customization: ())
8
9
  {
@@ -14,7 +15,7 @@ $_blue: #0066ff;
14
15
  (
15
16
  borderColor: #bbb,
16
17
  background: #4a4a4a,
17
- foreground: #f0f0f0,
18
+ foreground: $_white,
18
19
  focus:
19
20
  (
20
21
  borderColor: $_blue,
@@ -23,7 +24,7 @@ $_blue: #0066ff;
23
24
  tag:
24
25
  (
25
26
  background: #666,
26
- foreground: #f0f0f0,
27
+ foreground: $_white,
27
28
  ),
28
29
  ),
29
30
  popup:
@@ -31,8 +32,13 @@ $_blue: #0066ff;
31
32
  container:
32
33
  (
33
34
  background: #3A3A3A,
35
+ foreground: $_white,
34
36
  ),
35
37
  ),
38
+ liveSearch:
39
+ (
40
+ placeholder: $_white,
41
+ ),
36
42
  ),
37
43
  );
38
44
 
@@ -3,6 +3,7 @@
3
3
  @use '../core/mixins';
4
4
 
5
5
  $_blue: #0066ff;
6
+ $_black: #000;
6
7
 
7
8
  @function defineTheme($fontSize: 14px, $theme: (), $customization: ())
8
9
  {
@@ -14,7 +15,7 @@ $_blue: #0066ff;
14
15
  (
15
16
  borderColor: #666,
16
17
  background: #eee,
17
- foreground: #000,
18
+ foreground: $_black,
18
19
  focus:
19
20
  (
20
21
  borderColor: $_blue,
@@ -23,7 +24,7 @@ $_blue: #0066ff;
23
24
  tag:
24
25
  (
25
26
  background: #ccc,
26
- foreground: #000,
27
+ foreground: $_black,
27
28
  ),
28
29
  ),
29
30
  popup:
@@ -31,8 +32,13 @@ $_blue: #0066ff;
31
32
  container:
32
33
  (
33
34
  background: #F0F0F0,
35
+ foreground: $_black,
34
36
  ),
35
37
  ),
38
+ liveSearch:
39
+ (
40
+ placeholder: $_black,
41
+ ),
36
42
  ),
37
43
  );
38
44
 
package/version.bak CHANGED
@@ -1 +1 @@
1
- 16.0.0-beta.20260413121129
1
+ 16.0.0-beta.20260415112147