@memberjunction/ng-find-record 2.48.0 → 2.50.0
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.
|
@@ -25,33 +25,13 @@ function FindRecordDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1)
|
|
|
25
25
|
i0.ɵɵproperty("EntityName", ctx_r1.EntityName)("DisplayFields", ctx_r1.DisplayFields);
|
|
26
26
|
} }
|
|
27
27
|
export class FindRecordDialogComponent {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
this.SelectedRecord = null;
|
|
36
|
-
this._dialogVisible = false;
|
|
37
|
-
/**
|
|
38
|
-
* Emits when the dialog is closed, the parameter is true if the dialog was closed with the OK button, false if it was closed with the Cancel button
|
|
39
|
-
*/
|
|
40
|
-
this.DialogClosed = new EventEmitter();
|
|
41
|
-
///// REST OF THE BELOW JUST GET MAPPED TO THE CONTAINED RecordSelectorComponent
|
|
42
|
-
/**
|
|
43
|
-
* The name of the entity to show records for.
|
|
44
|
-
*/
|
|
45
|
-
this.EntityName = '';
|
|
46
|
-
/**
|
|
47
|
-
* Optional, list of fields to be displayed in the grid of search results, if not specified, the default fields will be displayed
|
|
48
|
-
*/
|
|
49
|
-
this.DisplayFields = []; // Fields to display in the grid
|
|
50
|
-
/**
|
|
51
|
-
* When a record is selected, this event is emitted with the selected record
|
|
52
|
-
*/
|
|
53
|
-
this.OnRecordSelected = new EventEmitter();
|
|
54
|
-
}
|
|
28
|
+
DialogTitle = 'Find Record';
|
|
29
|
+
DialogWidth = '700px';
|
|
30
|
+
DialogHeight = '450px';
|
|
31
|
+
/**
|
|
32
|
+
* Optional, set this to the currently selected record to start the dialog with that record selected, if desired. This property will be updated as the user selects records in the dialog.
|
|
33
|
+
*/
|
|
34
|
+
SelectedRecord = null;
|
|
55
35
|
get DialogVisible() {
|
|
56
36
|
return this._dialogVisible;
|
|
57
37
|
}
|
|
@@ -61,6 +41,24 @@ export class FindRecordDialogComponent {
|
|
|
61
41
|
}
|
|
62
42
|
this._dialogVisible = value;
|
|
63
43
|
}
|
|
44
|
+
_dialogVisible = false;
|
|
45
|
+
/**
|
|
46
|
+
* Emits when the dialog is closed, the parameter is true if the dialog was closed with the OK button, false if it was closed with the Cancel button
|
|
47
|
+
*/
|
|
48
|
+
DialogClosed = new EventEmitter();
|
|
49
|
+
///// REST OF THE BELOW JUST GET MAPPED TO THE CONTAINED RecordSelectorComponent
|
|
50
|
+
/**
|
|
51
|
+
* The name of the entity to show records for.
|
|
52
|
+
*/
|
|
53
|
+
EntityName = '';
|
|
54
|
+
/**
|
|
55
|
+
* Optional, list of fields to be displayed in the grid of search results, if not specified, the default fields will be displayed
|
|
56
|
+
*/
|
|
57
|
+
DisplayFields = []; // Fields to display in the grid
|
|
58
|
+
/**
|
|
59
|
+
* When a record is selected, this event is emitted with the selected record
|
|
60
|
+
*/
|
|
61
|
+
OnRecordSelected = new EventEmitter();
|
|
64
62
|
OnCancel() {
|
|
65
63
|
this.DialogVisible = false;
|
|
66
64
|
this.DialogClosed.emit(false);
|
|
@@ -73,13 +71,13 @@ export class FindRecordDialogComponent {
|
|
|
73
71
|
this.DialogVisible = false;
|
|
74
72
|
this.DialogClosed.emit(true);
|
|
75
73
|
}
|
|
74
|
+
static ɵfac = function FindRecordDialogComponent_Factory(t) { return new (t || FindRecordDialogComponent)(); };
|
|
75
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FindRecordDialogComponent, selectors: [["mj-find-record-dialog"]], inputs: { DialogTitle: "DialogTitle", DialogWidth: "DialogWidth", DialogHeight: "DialogHeight", SelectedRecord: "SelectedRecord", DialogVisible: "DialogVisible", EntityName: "EntityName", DisplayFields: "DisplayFields" }, outputs: { DialogClosed: "DialogClosed", OnRecordSelected: "OnRecordSelected" }, decls: 1, vars: 1, consts: [[3, "width", "height", "title"], [3, "close", "width", "height", "title"], [3, "OnRecordSelected", "EntityName", "DisplayFields"], ["kendoButton", "", "themeColor", "primary", 3, "click"], ["kendoButton", "", 3, "click"]], template: function FindRecordDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
76
|
+
i0.ɵɵtemplate(0, FindRecordDialogComponent_Conditional_0_Template, 7, 5, "kendo-dialog", 0);
|
|
77
|
+
} if (rf & 2) {
|
|
78
|
+
i0.ɵɵconditional(ctx.DialogVisible ? 0 : -1);
|
|
79
|
+
} }, dependencies: [i1.DialogComponent, i1.DialogActionsComponent, i2.ButtonComponent, i3.FindRecordComponent] });
|
|
76
80
|
}
|
|
77
|
-
FindRecordDialogComponent.ɵfac = function FindRecordDialogComponent_Factory(t) { return new (t || FindRecordDialogComponent)(); };
|
|
78
|
-
FindRecordDialogComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FindRecordDialogComponent, selectors: [["mj-find-record-dialog"]], inputs: { DialogTitle: "DialogTitle", DialogWidth: "DialogWidth", DialogHeight: "DialogHeight", SelectedRecord: "SelectedRecord", DialogVisible: "DialogVisible", EntityName: "EntityName", DisplayFields: "DisplayFields" }, outputs: { DialogClosed: "DialogClosed", OnRecordSelected: "OnRecordSelected" }, decls: 1, vars: 1, consts: [[3, "width", "height", "title"], [3, "close", "width", "height", "title"], [3, "OnRecordSelected", "EntityName", "DisplayFields"], ["kendoButton", "", "themeColor", "primary", 3, "click"], ["kendoButton", "", 3, "click"]], template: function FindRecordDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
79
|
-
i0.ɵɵtemplate(0, FindRecordDialogComponent_Conditional_0_Template, 7, 5, "kendo-dialog", 0);
|
|
80
|
-
} if (rf & 2) {
|
|
81
|
-
i0.ɵɵconditional(ctx.DialogVisible ? 0 : -1);
|
|
82
|
-
} }, dependencies: [i1.DialogComponent, i1.DialogActionsComponent, i2.ButtonComponent, i3.FindRecordComponent] });
|
|
83
81
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FindRecordDialogComponent, [{
|
|
84
82
|
type: Component,
|
|
85
83
|
args: [{ selector: 'mj-find-record-dialog', template: "@if (DialogVisible) {\n <kendo-dialog\n [width]=\"DialogWidth\"\n [height]=\"DialogHeight\"\n [title]=\"DialogTitle\" \n (close)=\"OnCancel()\"\n >\n <mj-find-record\n [EntityName]=\"EntityName\"\n [DisplayFields]=\"DisplayFields\"\n (OnRecordSelected)=\"BubbleOnRecordSelected($event)\"\n >\n </mj-find-record>\n <kendo-dialog-actions>\n <button kendoButton (click)=\"OnOK()\" themeColor=\"primary\">OK</button>\n <button kendoButton (click)=\"OnCancel()\">Cancel</button>\n </kendo-dialog-actions> \n </kendo-dialog> \n}" }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.component.js","sourceRoot":"","sources":["../../src/lib/dialog.component.ts","../../src/lib/dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAG,MAAM,eAAe,CAAC;;;;;;;ICCpE,uCAKC;IADG,mMAAS,iBAAU,KAAC;IAEpB,yCAIC;IADG,iOAAoB,qCAA8B,KAAC;IAEvD,iBAAiB;IAEb,AADJ,4CAAsB,gBACwC;IAAtC,6LAAS,aAAM,KAAC;IAAsB,kBAAE;IAAA,iBAAS;IACrE,iCAAyC;IAArB,6LAAS,iBAAU,KAAC;IAAC,sBAAM;IAEvD,AADI,AADmD,iBAAS,EACrC,EACZ;;;IAbX,AADA,AADA,0CAAqB,+BACE,6BACF;IAIjB,cAAyB;IACzB,AADA,8CAAyB,uCACM;;ADC3C,MAAM,OAAO,yBAAyB;
|
|
1
|
+
{"version":3,"file":"dialog.component.js","sourceRoot":"","sources":["../../src/lib/dialog.component.ts","../../src/lib/dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,EAAG,MAAM,eAAe,CAAC;;;;;;;ICCpE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,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;IAEM,IAAI;QACT,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;mFAxDU,yBAAyB;6DAAzB,yBAAyB;YCVtC,2FAAqB;;YAArB,4CAkBC;;;iFDRY,yBAAyB;cALrC,SAAS;2BACE,uBAAuB;gBAKxB,WAAW;kBAAnB,KAAK;YACG,WAAW;kBAAnB,KAAK;YACG,YAAY;kBAApB,KAAK;YAKG,cAAc;kBAAtB,KAAK;YAEO,aAAa;kBAAzB,KAAK;YAaI,YAAY;kBAArB,MAAM;YAME,UAAU;kBAAlB,KAAK;YAKG,aAAa;kBAArB,KAAK;YAOI,gBAAgB;kBAAzB,MAAM;;kFAzCI,yBAAyB"}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
11
2
|
import { LogError, Metadata, RunView } from '@memberjunction/core';
|
|
12
3
|
import { Subject } from 'rxjs';
|
|
@@ -48,29 +39,29 @@ function FindRecordComponent_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
48
39
|
i0.ɵɵelementEnd();
|
|
49
40
|
} }
|
|
50
41
|
export class FindRecordComponent {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
42
|
+
/**
|
|
43
|
+
* The name of the entity to show records for.
|
|
44
|
+
*/
|
|
45
|
+
EntityName = '';
|
|
46
|
+
/**
|
|
47
|
+
* Optional, list of fields to be displayed in the grid of search results, if not specified, the default fields will be displayed
|
|
48
|
+
*/
|
|
49
|
+
DisplayFields = []; // Fields to display in the grid
|
|
50
|
+
/**
|
|
51
|
+
* Optional, the number of milliseconds to wait after the last keypress before triggering a search. Default is 300ms
|
|
52
|
+
*/
|
|
53
|
+
SearchDebounceTime = 300; // Debounce time for search
|
|
54
|
+
/**
|
|
55
|
+
* When a record is selected, this event is emitted with the selected record
|
|
56
|
+
*/
|
|
57
|
+
OnRecordSelected = new EventEmitter();
|
|
58
|
+
searchTerm = ''; // User search term
|
|
59
|
+
records = []; // Store search results
|
|
60
|
+
loading = false; // Loading state for search
|
|
61
|
+
searchHasRun = false; // has a search been run
|
|
62
|
+
entityInfo; // Entity metadata
|
|
63
|
+
searchSubject = new Subject(); // Subject to emit search term changes
|
|
64
|
+
searchSubscription;
|
|
74
65
|
ngOnInit() {
|
|
75
66
|
// Fetch the entity metadata based on EntityName
|
|
76
67
|
const md = new Metadata();
|
|
@@ -120,48 +111,46 @@ export class FindRecordComponent {
|
|
|
120
111
|
this.OnRecordSelected.emit(event.selectedRows[0].dataItem);
|
|
121
112
|
}
|
|
122
113
|
// Stub function for simulating a database search (replace with actual search logic)
|
|
123
|
-
doSearch(searchTerm) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
ResultType: 'entity_object'
|
|
130
|
-
});
|
|
131
|
-
if (result && result.Success) {
|
|
132
|
-
return result.Results;
|
|
133
|
-
this.searchHasRun = true;
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
const errorMessage = `Error searching for ${this.EntityName}: ${result.ErrorMessage}`;
|
|
137
|
-
LogError(errorMessage);
|
|
138
|
-
throw new Error(errorMessage);
|
|
139
|
-
}
|
|
114
|
+
async doSearch(searchTerm) {
|
|
115
|
+
const rv = new RunView();
|
|
116
|
+
const result = await rv.RunView({
|
|
117
|
+
EntityName: this.EntityName,
|
|
118
|
+
UserSearchString: searchTerm,
|
|
119
|
+
ResultType: 'entity_object'
|
|
140
120
|
});
|
|
121
|
+
if (result && result.Success) {
|
|
122
|
+
return result.Results;
|
|
123
|
+
this.searchHasRun = true;
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
const errorMessage = `Error searching for ${this.EntityName}: ${result.ErrorMessage}`;
|
|
127
|
+
LogError(errorMessage);
|
|
128
|
+
throw new Error(errorMessage);
|
|
129
|
+
}
|
|
141
130
|
}
|
|
131
|
+
static ɵfac = function FindRecordComponent_Factory(t) { return new (t || FindRecordComponent)(); };
|
|
132
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FindRecordComponent, selectors: [["mj-find-record"]], inputs: { EntityName: "EntityName", DisplayFields: "DisplayFields", SearchDebounceTime: "SearchDebounceTime" }, outputs: { OnRecordSelected: "OnRecordSelected" }, decls: 7, vars: 4, consts: [["type", "text", "placeholder", "Start typing to search...", 1, "find-textbox", 3, "ngModelChange", "ngModel"], ["kendoButton", "", 1, "find-button", 3, "click"], [4, "ngIf"], [3, "selectionChange", "data", "height", "selectable"], [3, "field", "title", 4, "ngFor", "ngForOf"], [3, "field", "title"]], template: function FindRecordComponent_Template(rf, ctx) { if (rf & 1) {
|
|
133
|
+
i0.ɵɵelementStart(0, "div")(1, "kendo-textbox", 0);
|
|
134
|
+
i0.ɵɵtwoWayListener("ngModelChange", function FindRecordComponent_Template_kendo_textbox_ngModelChange_1_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.searchTerm, $event) || (ctx.searchTerm = $event); return $event; });
|
|
135
|
+
i0.ɵɵlistener("ngModelChange", function FindRecordComponent_Template_kendo_textbox_ngModelChange_1_listener($event) { return ctx.onSearchTermChange($event); });
|
|
136
|
+
i0.ɵɵelementEnd();
|
|
137
|
+
i0.ɵɵelementStart(2, "button", 1);
|
|
138
|
+
i0.ɵɵlistener("click", function FindRecordComponent_Template_button_click_2_listener() { return ctx.onFind(); });
|
|
139
|
+
i0.ɵɵtext(3, "Find");
|
|
140
|
+
i0.ɵɵelementEnd();
|
|
141
|
+
i0.ɵɵtemplate(4, FindRecordComponent_div_4_Template, 2, 0, "div", 2)(5, FindRecordComponent_div_5_Template, 3, 5, "div", 2)(6, FindRecordComponent_div_6_Template, 2, 0, "div", 2);
|
|
142
|
+
i0.ɵɵelementEnd();
|
|
143
|
+
} if (rf & 2) {
|
|
144
|
+
i0.ɵɵadvance();
|
|
145
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx.searchTerm);
|
|
146
|
+
i0.ɵɵadvance(3);
|
|
147
|
+
i0.ɵɵproperty("ngIf", ctx.loading);
|
|
148
|
+
i0.ɵɵadvance();
|
|
149
|
+
i0.ɵɵproperty("ngIf", !ctx.loading && ctx.records.length > 0);
|
|
150
|
+
i0.ɵɵadvance();
|
|
151
|
+
i0.ɵɵproperty("ngIf", !ctx.loading && ctx.records.length === 0 && ctx.searchHasRun);
|
|
152
|
+
} }, dependencies: [i1.NgForOf, i1.NgIf, i2.NgControlStatus, i2.NgModel, i3.GridComponent, i3.ColumnComponent, i4.ButtonComponent, i5.TextBoxComponent], styles: [".list-box[_ngcontent-%COMP%] {\n width: 320px;\n height: 300px;\n}\n\n.k-listbox-actions-right[_ngcontent-%COMP%] {\n margin-left: 10px;\n}\n\n.item-icon[_ngcontent-%COMP%] {\n font-size: 16px;\n width: 25px;\n margin-right: 5px;\n}\n\n.find-textbox[_ngcontent-%COMP%] {\n width: 500px;\n margin-right: 10px;\n margin-bottom: 10px;\n}\n\n.find-button[_ngcontent-%COMP%] {\n width: 75px;\n margin-bottom: 10px;\n}"] });
|
|
142
153
|
}
|
|
143
|
-
FindRecordComponent.ɵfac = function FindRecordComponent_Factory(t) { return new (t || FindRecordComponent)(); };
|
|
144
|
-
FindRecordComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FindRecordComponent, selectors: [["mj-find-record"]], inputs: { EntityName: "EntityName", DisplayFields: "DisplayFields", SearchDebounceTime: "SearchDebounceTime" }, outputs: { OnRecordSelected: "OnRecordSelected" }, decls: 7, vars: 4, consts: [["type", "text", "placeholder", "Start typing to search...", 1, "find-textbox", 3, "ngModelChange", "ngModel"], ["kendoButton", "", 1, "find-button", 3, "click"], [4, "ngIf"], [3, "selectionChange", "data", "height", "selectable"], [3, "field", "title", 4, "ngFor", "ngForOf"], [3, "field", "title"]], template: function FindRecordComponent_Template(rf, ctx) { if (rf & 1) {
|
|
145
|
-
i0.ɵɵelementStart(0, "div")(1, "kendo-textbox", 0);
|
|
146
|
-
i0.ɵɵtwoWayListener("ngModelChange", function FindRecordComponent_Template_kendo_textbox_ngModelChange_1_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.searchTerm, $event) || (ctx.searchTerm = $event); return $event; });
|
|
147
|
-
i0.ɵɵlistener("ngModelChange", function FindRecordComponent_Template_kendo_textbox_ngModelChange_1_listener($event) { return ctx.onSearchTermChange($event); });
|
|
148
|
-
i0.ɵɵelementEnd();
|
|
149
|
-
i0.ɵɵelementStart(2, "button", 1);
|
|
150
|
-
i0.ɵɵlistener("click", function FindRecordComponent_Template_button_click_2_listener() { return ctx.onFind(); });
|
|
151
|
-
i0.ɵɵtext(3, "Find");
|
|
152
|
-
i0.ɵɵelementEnd();
|
|
153
|
-
i0.ɵɵtemplate(4, FindRecordComponent_div_4_Template, 2, 0, "div", 2)(5, FindRecordComponent_div_5_Template, 3, 5, "div", 2)(6, FindRecordComponent_div_6_Template, 2, 0, "div", 2);
|
|
154
|
-
i0.ɵɵelementEnd();
|
|
155
|
-
} if (rf & 2) {
|
|
156
|
-
i0.ɵɵadvance();
|
|
157
|
-
i0.ɵɵtwoWayProperty("ngModel", ctx.searchTerm);
|
|
158
|
-
i0.ɵɵadvance(3);
|
|
159
|
-
i0.ɵɵproperty("ngIf", ctx.loading);
|
|
160
|
-
i0.ɵɵadvance();
|
|
161
|
-
i0.ɵɵproperty("ngIf", !ctx.loading && ctx.records.length > 0);
|
|
162
|
-
i0.ɵɵadvance();
|
|
163
|
-
i0.ɵɵproperty("ngIf", !ctx.loading && ctx.records.length === 0 && ctx.searchHasRun);
|
|
164
|
-
} }, dependencies: [i1.NgForOf, i1.NgIf, i2.NgControlStatus, i2.NgModel, i3.GridComponent, i3.ColumnComponent, i4.ButtonComponent, i5.TextBoxComponent], styles: [".list-box[_ngcontent-%COMP%] {\n width: 320px;\n height: 300px;\n}\n\n.k-listbox-actions-right[_ngcontent-%COMP%] {\n margin-left: 10px;\n}\n\n.item-icon[_ngcontent-%COMP%] {\n font-size: 16px;\n width: 25px;\n margin-right: 5px;\n}\n\n.find-textbox[_ngcontent-%COMP%] {\n width: 500px;\n margin-right: 10px;\n margin-bottom: 10px;\n}\n\n.find-button[_ngcontent-%COMP%] {\n width: 75px;\n margin-bottom: 10px;\n}"] });
|
|
165
154
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FindRecordComponent, [{
|
|
166
155
|
type: Component,
|
|
167
156
|
args: [{ selector: 'mj-find-record', template: "<div>\n <kendo-textbox\n class=\"find-textbox\"\n type=\"text\"\n placeholder=\"Start typing to search...\"\n [(ngModel)]=\"searchTerm\"\n (ngModelChange)=\"onSearchTermChange($event)\"\n >\n </kendo-textbox>\n <button class=\"find-button\" kendoButton (click)=\"onFind()\">Find</button>\n \n <div *ngIf=\"loading\">Searching...</div>\n <div *ngIf=\"!loading && records.length > 0\">\n <kendo-grid \n [data]=\"records\" \n [height]=\"280\" \n [selectable]=\"{ mode: 'single' }\"\n (selectionChange)=\"onSelectionChange($event)\"\n >\n <kendo-grid-column *ngFor=\"let field of DisplayFields\" [field]=\"field.Name\" [title]=\"field.DisplayNameOrName\"></kendo-grid-column>\n </kendo-grid>\n </div>\n <div *ngIf=\"!loading && records.length === 0 && searchHasRun\">No records found.</div>\n</div>\n ", styles: [".list-box {\n width: 320px;\n height: 300px;\n}\n\n.k-listbox-actions-right {\n margin-left: 10px;\n}\n\n.item-icon {\n font-size: 16px;\n width: 25px;\n margin-right: 5px;\n}\n\n.find-textbox {\n width: 500px;\n margin-right: 10px;\n margin-bottom: 10px;\n}\n\n.find-button {\n width: 75px;\n margin-bottom: 10px;\n}"] }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-record.component.js","sourceRoot":"","sources":["../../src/lib/find-record.component.ts","../../src/lib/find-record.component.html"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"find-record.component.js","sourceRoot":"","sources":["../../src/lib/find-record.component.ts","../../src/lib/find-record.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAG,YAAY,EAAG,KAAK,EAAqB,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAA2C,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC5G,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;;;;;;;;;ICQ3E,2BAAqB;IAAA,4BAAY;IAAA,iBAAM;;;IAQnC,uCAAkI;;;IAAtD,AAArB,qCAAoB,qCAAkC;;;;IAN/G,AADF,2BAA4C,oBAMzC;IADC,6MAAmB,gCAAyB,KAAC;IAE7C,sGAA8G;IAElH,AADE,iBAAa,EACT;;;IAPF,cAA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BAAgB;kBAAzB,MAAM;;kFApBI,mBAAmB"}
|
package/dist/module.js
CHANGED
|
@@ -12,17 +12,17 @@ import { FormsModule } from '@angular/forms';
|
|
|
12
12
|
import { GridModule } from '@progress/kendo-angular-grid';
|
|
13
13
|
import * as i0 from "@angular/core";
|
|
14
14
|
export class FindRecordModule {
|
|
15
|
+
static ɵfac = function FindRecordModule_Factory(t) { return new (t || FindRecordModule)(); };
|
|
16
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: FindRecordModule });
|
|
17
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
18
|
+
DialogsModule,
|
|
19
|
+
FormsModule,
|
|
20
|
+
GridModule,
|
|
21
|
+
ContainerDirectivesModule,
|
|
22
|
+
ButtonsModule,
|
|
23
|
+
ListBoxModule,
|
|
24
|
+
InputsModule] });
|
|
15
25
|
}
|
|
16
|
-
FindRecordModule.ɵfac = function FindRecordModule_Factory(t) { return new (t || FindRecordModule)(); };
|
|
17
|
-
FindRecordModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: FindRecordModule });
|
|
18
|
-
FindRecordModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
19
|
-
DialogsModule,
|
|
20
|
-
FormsModule,
|
|
21
|
-
GridModule,
|
|
22
|
-
ContainerDirectivesModule,
|
|
23
|
-
ButtonsModule,
|
|
24
|
-
ListBoxModule,
|
|
25
|
-
InputsModule] });
|
|
26
26
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FindRecordModule, [{
|
|
27
27
|
type: NgModule,
|
|
28
28
|
args: [{
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sourceRoot":"","sources":["../src/module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO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;0EAAhB,gBAAgB;4DAAhB,gBAAgB;gEAdzB,YAAY;YACZ,aAAa;YACb,WAAW;YACX,UAAU;YACV,yBAAyB;YACzB,aAAa;YACb,aAAa;YACb,YAAY;;iFAOH,gBAAgB;cApB5B,QAAQ;eAAC;gBACR,YAAY,EAAE;oBACZ,mBAAmB;oBACnB,yBAAyB;iBAC1B;gBACD,OAAO,EAAE;oBACP,YAAY;oBACZ,aAAa;oBACb,WAAW;oBACX,UAAU;oBACV,yBAAyB;oBACzB,aAAa;oBACb,aAAa;oBACb,YAAY;iBACb;gBACD,OAAO,EAAE;oBACP,mBAAmB;oBACnB,yBAAyB;iBAC1B;aACF;;wFACY,gBAAgB,mBAlBzB,mBAAmB;QACnB,yBAAyB,aAGzB,YAAY;QACZ,aAAa;QACb,WAAW;QACX,UAAU;QACV,yBAAyB;QACzB,aAAa;QACb,aAAa;QACb,YAAY,aAGZ,mBAAmB;QACnB,yBAAyB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-find-record",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.50.0",
|
|
4
4
|
"description": "MemberJunction: Angular Component to allow a user to find a single record in any entity",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"@progress/kendo-angular-listbox": "16.2.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@memberjunction/core-entities": "2.
|
|
34
|
-
"@memberjunction/global": "2.
|
|
35
|
-
"@memberjunction/core": "2.
|
|
36
|
-
"@memberjunction/ng-container-directives": "2.
|
|
37
|
-
"@memberjunction/ng-shared": "2.
|
|
33
|
+
"@memberjunction/core-entities": "2.50.0",
|
|
34
|
+
"@memberjunction/global": "2.50.0",
|
|
35
|
+
"@memberjunction/core": "2.50.0",
|
|
36
|
+
"@memberjunction/ng-container-directives": "2.50.0",
|
|
37
|
+
"@memberjunction/ng-shared": "2.50.0",
|
|
38
38
|
"rxjs": "^7.8.1",
|
|
39
39
|
"tslib": "^2.3.0"
|
|
40
40
|
},
|