@inspark/inspark-components 19.0.5 → 19.0.7

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.
@@ -8,7 +8,8 @@ export declare class DropdownComponent implements ControlValueAccessor {
8
8
  options: any[];
9
9
  placeholder: string;
10
10
  optionLabel: string;
11
- optionValue: string;
11
+ optionValue: string | undefined;
12
+ dataKey: string | undefined;
12
13
  filter: boolean;
13
14
  showClear: boolean;
14
15
  disabled: boolean;
@@ -20,7 +21,7 @@ export declare class DropdownComponent implements ControlValueAccessor {
20
21
  autoDisplayFirst: boolean;
21
22
  filterBy: string | undefined;
22
23
  get effectiveFilterBy(): string;
23
- filterMatchMode: 'equals' | 'endsWith' | 'startsWith' | 'contains' | 'in' | 'notEquals' | 'lt' | 'lte' | 'gt' | 'gte' | undefined;
24
+ filterMatchMode: 'equals' | 'endsWith' | 'startsWith' | 'contains' | 'in' | 'notEquals' | 'lt' | 'lte' | 'gt' | 'gte';
24
25
  emptyMessage: string;
25
26
  onChange: EventEmitter<any>;
26
27
  onFilter: EventEmitter<any>;
@@ -43,6 +44,6 @@ export declare class DropdownComponent implements ControlValueAccessor {
43
44
  hide(): void;
44
45
  clear(): void;
45
46
  static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent, never>;
46
- static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "in-dropdown", never, { "options": { "alias": "options"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; "optionValue": { "alias": "optionValue"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; }; "virtualScrollItemSize": { "alias": "virtualScrollItemSize"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "autoDisplayFirst": { "alias": "autoDisplayFirst"; "required": false; }; "filterBy": { "alias": "filterBy"; "required": false; }; "filterMatchMode": { "alias": "filterMatchMode"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; }, { "onChange": "onChange"; "onFilter": "onFilter"; "onShow": "onShow"; "onHide": "onHide"; "onFocus": "onFocus"; "onBlur": "onBlur"; }, never, ["[selectedItemTemplate]", "[itemTemplate]"], false, never>;
47
+ static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "in-dropdown", never, { "options": { "alias": "options"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "optionLabel": { "alias": "optionLabel"; "required": false; }; "optionValue": { "alias": "optionValue"; "required": false; }; "dataKey": { "alias": "dataKey"; "required": false; }; "filter": { "alias": "filter"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; }; "virtualScrollItemSize": { "alias": "virtualScrollItemSize"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "autoDisplayFirst": { "alias": "autoDisplayFirst"; "required": false; }; "filterBy": { "alias": "filterBy"; "required": false; }; "filterMatchMode": { "alias": "filterMatchMode"; "required": false; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; }; }, { "onChange": "onChange"; "onFilter": "onFilter"; "onShow": "onShow"; "onHide": "onHide"; "onFocus": "onFocus"; "onBlur": "onBlur"; }, never, ["[selectedItemTemplate]", "[itemTemplate]"], false, never>;
47
48
  }
48
49
  //# sourceMappingURL=dropdown.component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.component.d.ts","sourceRoot":"","sources":["../../../../../projects/inspark-components/src/components/dropdown/dropdown.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAKb,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,oBAAoB,EAErB,MAAM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AAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAI5C,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;IAM5B,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI;IAIZ,IAAI,IAAI,IAAI;IAIZ,KAAK,IAAI,IAAI;yCAhIF,iBAAiB;2CAAjB,iBAAiB;CAqI7B"}
1
+ {"version":3,"file":"dropdown.component.d.ts","sourceRoot":"","sources":["../../../../../projects/inspark-components/src/components/dropdown/dropdown.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EAKb,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,oBAAoB,EAErB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;;AAExB,qBAaa,iBAAkB,YAAW,oBAAoB;IAG5D,QAAQ,EAAG,MAAM,CAAC;IAClB,YAAY,EAAE,GAAG,CAAQ;IAGzB,OAAO,EAAE,GAAG,EAAE,CAAM;IAGpB,WAAW,SAAM;IAGjB,WAAW,SAAW;IAGtB,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAGhC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAG5B,MAAM,UAAS;IAGf,SAAS,UAAS;IAGlB,QAAQ,UAAS;IAGjB,QAAQ,EAAE,GAAG,CAAU;IAGvB,QAAQ,UAAS;IAGjB,aAAa,UAAS;IAGtB,qBAAqB,SAAM;IAG3B,OAAO,UAAS;IAGhB,gBAAgB,UAAS;IAGzB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAa;IAEzC,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAGD,eAAe,EAAE,QAAQ,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,GAAG,IAAI,GAAG,WAAW,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,CAAc;IAGnI,YAAY,SAAsB;IAGlC,QAAQ,oBAA2B;IAGnC,QAAQ,oBAA2B;IAGnC,MAAM,qBAA4B;IAGlC,MAAM,qBAA4B;IAGlC,OAAO,oBAA2B;IAGlC,MAAM,oBAA2B;IAEjC,KAAK,EAAE,GAAG,CAAQ;IAElB,OAAO,CAAC,aAAa,CAAuB;IAE5C,OAAO,CAAC,cAAc,CAAY;IAElC,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;IAI5B,gBAAgB,CAAC,EAAE,EAAE,GAAG,GAAG,IAAI;IAI/B,iBAAiB,CAAC,EAAE,EAAE,GAAG,GAAG,IAAI;IAIhC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAIzC,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAQ5C,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAI5C,UAAU,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI;IAM5B,KAAK,IAAI,IAAI;IAIb,IAAI,IAAI,IAAI;IAIZ,IAAI,IAAI,IAAI;IAIZ,KAAK,IAAI,IAAI;yCAnIF,iBAAiB;2CAAjB,iBAAiB;CAwI7B"}
@@ -5908,7 +5908,6 @@ class DropdownComponent {
5908
5908
  this.options = [];
5909
5909
  this.placeholder = '';
5910
5910
  this.optionLabel = 'label';
5911
- this.optionValue = 'value';
5912
5911
  this.filter = false;
5913
5912
  this.showClear = false;
5914
5913
  this.disabled = false;
@@ -5919,6 +5918,7 @@ class DropdownComponent {
5919
5918
  this.loading = false;
5920
5919
  this.autoDisplayFirst = false;
5921
5920
  this.filterBy = undefined;
5921
+ this.filterMatchMode = 'contains';
5922
5922
  this.emptyMessage = 'No results found';
5923
5923
  this.onChange = new EventEmitter();
5924
5924
  this.onFilter = new EventEmitter();
@@ -5976,21 +5976,23 @@ class DropdownComponent {
5976
5976
  } if (rf & 2) {
5977
5977
  let _t;
5978
5978
  i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.dropdown = _t.first);
5979
- } }, inputs: { options: "options", placeholder: "placeholder", optionLabel: "optionLabel", optionValue: "optionValue", filter: "filter", showClear: "showClear", disabled: "disabled", appendTo: "appendTo", editable: "editable", virtualScroll: "virtualScroll", virtualScrollItemSize: "virtualScrollItemSize", loading: "loading", autoDisplayFirst: "autoDisplayFirst", filterBy: "filterBy", filterMatchMode: "filterMatchMode", emptyMessage: "emptyMessage" }, outputs: { onChange: "onChange", onFilter: "onFilter", onShow: "onShow", onHide: "onHide", onFocus: "onFocus", onBlur: "onBlur" }, standalone: false, features: [i0.ɵɵProvidersFeature([
5979
+ } }, inputs: { options: "options", placeholder: "placeholder", optionLabel: "optionLabel", optionValue: "optionValue", dataKey: "dataKey", filter: "filter", showClear: "showClear", disabled: "disabled", appendTo: "appendTo", editable: "editable", virtualScroll: "virtualScroll", virtualScrollItemSize: "virtualScrollItemSize", loading: "loading", autoDisplayFirst: "autoDisplayFirst", filterBy: "filterBy", filterMatchMode: "filterMatchMode", emptyMessage: "emptyMessage" }, outputs: { onChange: "onChange", onFilter: "onFilter", onShow: "onShow", onHide: "onHide", onFocus: "onFocus", onBlur: "onBlur" }, standalone: false, features: [i0.ɵɵProvidersFeature([
5980
5980
  {
5981
5981
  provide: NG_VALUE_ACCESSOR,
5982
5982
  useExisting: forwardRef(() => DropdownComponent),
5983
5983
  multi: true
5984
5984
  }
5985
- ])], ngContentSelectors: _c2, decls: 4, vars: 17, consts: [["dropdown", ""], [3, "onChange", "onFilter", "onShow", "onHide", "onFocus", "onBlur", "options", "placeholder", "optionLabel", "optionValue", "filter", "filterBy", "filterMatchMode", "showClear", "disabled", "appendTo", "editable", "virtualScroll", "virtualScrollItemSize", "loading", "autoDisplayFirst", "emptyMessage", "ngModel"], ["pTemplate", "selectedItem"], ["pTemplate", "item"], [4, "ngIf"]], template: function DropdownComponent_Template(rf, ctx) { if (rf & 1) {
5985
+ ])], ngContentSelectors: _c2, decls: 4, vars: 18, consts: [["dropdown", ""], [3, "ngModelChange", "onChange", "onFilter", "onShow", "onHide", "onFocus", "onBlur", "options", "placeholder", "optionLabel", "optionValue", "dataKey", "filter", "filterBy", "filterMatchMode", "showClear", "disabled", "appendTo", "editable", "virtualScroll", "virtualScrollItemSize", "loading", "autoDisplayFirst", "emptyMessage", "ngModel"], ["pTemplate", "selectedItem"], ["pTemplate", "item"], [4, "ngIf"]], template: function DropdownComponent_Template(rf, ctx) { if (rf & 1) {
5986
5986
  const _r1 = i0.ɵɵgetCurrentView();
5987
5987
  i0.ɵɵprojectionDef(_c1);
5988
5988
  i0.ɵɵelementStart(0, "p-select", 1, 0);
5989
+ i0.ɵɵtwoWayListener("ngModelChange", function DropdownComponent_Template_p_select_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.value, $event) || (ctx.value = $event); return i0.ɵɵresetView($event); });
5989
5990
  i0.ɵɵlistener("onChange", function DropdownComponent_Template_p_select_onChange_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleChange($event)); })("onFilter", function DropdownComponent_Template_p_select_onFilter_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleFilter($event)); })("onShow", function DropdownComponent_Template_p_select_onShow_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onShow.emit()); })("onHide", function DropdownComponent_Template_p_select_onHide_0_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onHide.emit()); })("onFocus", function DropdownComponent_Template_p_select_onFocus_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onFocus.emit($event)); })("onBlur", function DropdownComponent_Template_p_select_onBlur_0_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleBlur($event)); });
5990
5991
  i0.ɵɵtemplate(2, DropdownComponent_ng_template_2_Template, 2, 1, "ng-template", 2)(3, DropdownComponent_ng_template_3_Template, 2, 1, "ng-template", 3);
5991
5992
  i0.ɵɵelementEnd();
5992
5993
  } if (rf & 2) {
5993
- i0.ɵɵproperty("options", ctx.options)("placeholder", ctx.placeholder)("optionLabel", ctx.optionLabel)("optionValue", ctx.optionValue)("filter", ctx.filter)("filterBy", ctx.effectiveFilterBy)("filterMatchMode", ctx.filterMatchMode)("showClear", ctx.showClear)("disabled", ctx.disabled)("appendTo", ctx.appendTo)("editable", ctx.editable)("virtualScroll", ctx.virtualScroll)("virtualScrollItemSize", ctx.virtualScrollItemSize)("loading", ctx.loading)("autoDisplayFirst", ctx.autoDisplayFirst)("emptyMessage", ctx.emptyMessage)("ngModel", ctx.value);
5994
+ i0.ɵɵproperty("options", ctx.options)("placeholder", ctx.placeholder)("optionLabel", ctx.optionLabel)("optionValue", ctx.optionValue)("dataKey", ctx.dataKey)("filter", ctx.filter)("filterBy", ctx.effectiveFilterBy)("filterMatchMode", ctx.filterMatchMode)("showClear", ctx.showClear)("disabled", ctx.disabled)("appendTo", ctx.appendTo)("editable", ctx.editable)("virtualScroll", ctx.virtualScroll)("virtualScrollItemSize", ctx.virtualScrollItemSize)("loading", ctx.loading)("autoDisplayFirst", ctx.autoDisplayFirst)("emptyMessage", ctx.emptyMessage);
5995
+ i0.ɵɵtwoWayProperty("ngModel", ctx.value);
5994
5996
  } }, dependencies: [i1$2.NgIf, i2$1.NgControlStatus, i2$1.NgModel, i3$2.Select, i2.PrimeTemplate], styles: [".in-dropdown[_ngcontent-%COMP%]{width:100%;margin-bottom:0}"] }); }
5995
5997
  }
5996
5998
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DropdownComponent, [{
@@ -6001,7 +6003,7 @@ class DropdownComponent {
6001
6003
  useExisting: forwardRef(() => DropdownComponent),
6002
6004
  multi: true
6003
6005
  }
6004
- ], template: "<p-select\n #dropdown\n\n [options]=\"options\"\n [placeholder]=\"placeholder\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [filter]=\"filter\"\n [filterBy]=\"effectiveFilterBy\"\n [filterMatchMode]=\"filterMatchMode\"\n [showClear]=\"showClear\"\n [disabled]=\"disabled\"\n [appendTo]=\"appendTo\"\n [editable]=\"editable\"\n [virtualScroll]=\"virtualScroll\"\n [virtualScrollItemSize]=\"virtualScrollItemSize\"\n [loading]=\"loading\"\n [autoDisplayFirst]=\"autoDisplayFirst\"\n [emptyMessage]=\"emptyMessage\"\n\n [ngModel]=\"value\"\n\n (onChange)=\"handleChange($event)\"\n (onFilter)=\"handleFilter($event)\"\n (onShow)=\"onShow.emit()\"\n (onHide)=\"onHide.emit()\"\n (onFocus)=\"onFocus.emit($event)\"\n (onBlur)=\"handleBlur($event)\"\n>\n\n <ng-template\n pTemplate=\"selectedItem\"\n let-selected\n >\n\n <ng-content\n select=\"[selectedItemTemplate]\"\n ></ng-content>\n\n <span *ngIf=\"!selected\">\n {{ placeholder }}\n </span>\n\n </ng-template>\n\n <ng-template\n pTemplate=\"item\"\n let-item\n >\n\n <ng-content\n select=\"[itemTemplate]\"\n ></ng-content>\n\n <span *ngIf=\"!itemTemplate\">\n {{ item?.[optionLabel] }}\n </span>\n\n </ng-template>\n\n</p-select>\n", styles: [".in-dropdown{width:100%;margin-bottom:0}\n"] }]
6006
+ ], template: "<p-select\n #dropdown\n\n [options]=\"options\"\n [placeholder]=\"placeholder\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [dataKey]=\"dataKey\"\n [filter]=\"filter\"\n [filterBy]=\"effectiveFilterBy\"\n [filterMatchMode]=\"filterMatchMode\"\n [showClear]=\"showClear\"\n [disabled]=\"disabled\"\n [appendTo]=\"appendTo\"\n [editable]=\"editable\"\n [virtualScroll]=\"virtualScroll\"\n [virtualScrollItemSize]=\"virtualScrollItemSize\"\n [loading]=\"loading\"\n [autoDisplayFirst]=\"autoDisplayFirst\"\n [emptyMessage]=\"emptyMessage\"\n\n [(ngModel)]=\"value\"\n\n (onChange)=\"handleChange($event)\"\n (onFilter)=\"handleFilter($event)\"\n (onShow)=\"onShow.emit()\"\n (onHide)=\"onHide.emit()\"\n (onFocus)=\"onFocus.emit($event)\"\n (onBlur)=\"handleBlur($event)\"\n>\n\n <ng-template\n pTemplate=\"selectedItem\"\n let-selected\n >\n\n <ng-content\n select=\"[selectedItemTemplate]\"\n ></ng-content>\n\n <span *ngIf=\"!selected\">\n {{ placeholder }}\n </span>\n\n </ng-template>\n\n <ng-template\n pTemplate=\"item\"\n let-item\n >\n\n <ng-content\n select=\"[itemTemplate]\"\n ></ng-content>\n\n <span *ngIf=\"!itemTemplate\">\n {{ item?.[optionLabel] }}\n </span>\n\n </ng-template>\n\n</p-select>\n", styles: [".in-dropdown{width:100%;margin-bottom:0}\n"] }]
6005
6007
  }], null, { dropdown: [{
6006
6008
  type: ViewChild,
6007
6009
  args: ['dropdown']
@@ -6013,6 +6015,8 @@ class DropdownComponent {
6013
6015
  type: Input
6014
6016
  }], optionValue: [{
6015
6017
  type: Input
6018
+ }], dataKey: [{
6019
+ type: Input
6016
6020
  }], filter: [{
6017
6021
  type: Input
6018
6022
  }], showClear: [{