@nys-cui/cui-formpill 0.2.10 → 0.2.20
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/component-base/README.md +43 -0
- package/component-base/cui.jsonc +6 -0
- package/component-base/package.json +42 -0
- package/component-base/src/assets/scss/_button-menu.scss +270 -0
- package/component-base/src/assets/scss/_buttons.scss +200 -0
- package/component-base/src/assets/scss/_cui-asof.scss +86 -0
- package/component-base/src/assets/scss/_cui-formpill.scss +284 -0
- package/component-base/src/assets/scss/_cui-general.scss +19 -0
- package/component-base/src/assets/scss/_cui-message.scss +119 -0
- package/component-base/src/assets/scss/_cui-spinner.scss +27 -0
- package/component-base/src/assets/scss/_cui-tree.scss +136 -0
- package/component-base/src/assets/scss/_cui-widget.scss +128 -0
- package/component-base/src/assets/scss/_field-check-group.scss +296 -0
- package/component-base/src/assets/scss/_field-radio-group.scss +236 -0
- package/component-base/src/assets/scss/_fonts.scss +20 -0
- package/component-base/src/assets/scss/_globalNotes.scss +419 -0
- package/component-base/src/assets/scss/_grid.scss +489 -0
- package/component-base/src/assets/scss/_help.scss +46 -0
- package/component-base/src/assets/scss/_inputs.scss +1145 -0
- package/component-base/src/assets/scss/_modal.scss +56 -0
- package/component-base/src/assets/scss/_normalize.scss +3 -0
- package/component-base/src/assets/scss/_popovers.scss +119 -0
- package/component-base/src/assets/scss/_quick_lookup.scss +87 -0
- package/component-base/src/assets/scss/_sidebar-context.scss +896 -0
- package/component-base/src/assets/scss/_table.scss +702 -0
- package/component-base/src/assets/scss/_toast.scss +219 -0
- package/component-base/src/assets/scss/_utility.scss +64 -0
- package/component-base/src/assets/scss/_variables.scss +58 -0
- package/component-base/src/assets/scss/main.scss +451 -0
- package/component-base/src/assets/scss/normalize/_import-now.scss +11 -0
- package/component-base/src/assets/scss/normalize/_normalize-mixin.scss +570 -0
- package/component-base/src/assets/scss/normalize/_variables.scss +37 -0
- package/component-base/src/assets/scss/normalize/_vertical-rhythm.scss +63 -0
- package/component-base/src/assets/scss/readme.md +1 -0
- package/component-base/src/modules/dom.js +21 -0
- package/component-base/src/screens/index/cui.jsonc +3 -0
- package/component-base/src/screens/index/index.js +228 -0
- package/component-base/src/screens/index/index.tpl.html +32 -0
- package/component-base/src/spa.js +117 -0
- package/package.json +1 -1
- package/src/cui-formpill.js +452 -1000
@@ -0,0 +1,228 @@
|
|
1
|
+
import SCREEN_TEMPLATE from './index.tpl.html';
|
2
|
+
|
3
|
+
export default class INDEX extends SCREEN {
|
4
|
+
constructor(oProps) {
|
5
|
+
super(oProps);
|
6
|
+
|
7
|
+
this.sTitle = "Index";
|
8
|
+
|
9
|
+
this.oScreenCriteria = {
|
10
|
+
"resourceId": "index",
|
11
|
+
"renderModes": {
|
12
|
+
"default": {
|
13
|
+
"layouts": []
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|
17
|
+
|
18
|
+
this.sScreenTemplate = SCREEN_TEMPLATE;
|
19
|
+
|
20
|
+
this.config = {
|
21
|
+
"templates": {
|
22
|
+
"default": {
|
23
|
+
"controls": [
|
24
|
+
{
|
25
|
+
"renderAs": "cui-listbox",
|
26
|
+
"attributes": {
|
27
|
+
"label": "Method",
|
28
|
+
"componentKey": "operator",
|
29
|
+
"required": "",
|
30
|
+
},
|
31
|
+
"children": [{
|
32
|
+
"renderAs": "cui-item",
|
33
|
+
"attributes": {
|
34
|
+
"label": "Tax Map ID Includes",
|
35
|
+
"value": "includes",
|
36
|
+
"pillValue": true
|
37
|
+
}
|
38
|
+
}, {
|
39
|
+
"renderAs": "cui-item",
|
40
|
+
"attributes": {
|
41
|
+
"label": "Tax Map ID Begins With",
|
42
|
+
"value": "begins",
|
43
|
+
"pillValue": true
|
44
|
+
}
|
45
|
+
}]
|
46
|
+
},
|
47
|
+
{
|
48
|
+
"renderAs": "cui-text",
|
49
|
+
"attributes": {
|
50
|
+
"label": "Value",
|
51
|
+
"componentKey": "value",
|
52
|
+
"required": "",
|
53
|
+
"validation": "checkMaxLength(30), isNumeric",
|
54
|
+
'pillValue': true
|
55
|
+
}
|
56
|
+
}
|
57
|
+
]
|
58
|
+
}
|
59
|
+
},
|
60
|
+
"items": [
|
61
|
+
{
|
62
|
+
"label": "Street Suffix",
|
63
|
+
"value": "DE007",
|
64
|
+
"controls": [
|
65
|
+
{
|
66
|
+
"renderAs": "cui-listbox",
|
67
|
+
"attributes": {
|
68
|
+
"label": "value",
|
69
|
+
"componentKey": "value",
|
70
|
+
"multiple": true,
|
71
|
+
"search": true,
|
72
|
+
"codedesc": true,
|
73
|
+
'pillValue': true
|
74
|
+
},
|
75
|
+
"children": [
|
76
|
+
{
|
77
|
+
"renderAs": "cui-item",
|
78
|
+
"attributes": {
|
79
|
+
"label": "Tax Map ID Includes",
|
80
|
+
"value": "includes"
|
81
|
+
}
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"renderAs": "cui-item",
|
85
|
+
"attributes": {
|
86
|
+
"label": "Tax Map ID Begins With",
|
87
|
+
"value": "begins"
|
88
|
+
}
|
89
|
+
}
|
90
|
+
]
|
91
|
+
}
|
92
|
+
]
|
93
|
+
},
|
94
|
+
{
|
95
|
+
"label": "Owner Last Name",
|
96
|
+
"value": "DE002",
|
97
|
+
"template": "default"
|
98
|
+
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"label": "Neighborhood Code",
|
102
|
+
"value": "DE018",
|
103
|
+
"controls": [
|
104
|
+
{
|
105
|
+
"renderAs": "cui-listbox",
|
106
|
+
"attributes": {
|
107
|
+
"label": "Value",
|
108
|
+
"componentKey": "value",
|
109
|
+
"multiple": true,
|
110
|
+
"search": true,
|
111
|
+
"codedesc": true,
|
112
|
+
"pillValue": true
|
113
|
+
},
|
114
|
+
"children": [{
|
115
|
+
"renderAs": "cui-item",
|
116
|
+
"attributes": {
|
117
|
+
"label": "Tax Map ID Includes",
|
118
|
+
"value": "includes"
|
119
|
+
}
|
120
|
+
}, {
|
121
|
+
"renderAs": "cui-item",
|
122
|
+
"attributes": {
|
123
|
+
"label": "Tax Map ID Begins With",
|
124
|
+
"value": "begins"
|
125
|
+
}
|
126
|
+
}],
|
127
|
+
"relayEvents": ['change']
|
128
|
+
}
|
129
|
+
]
|
130
|
+
},
|
131
|
+
{
|
132
|
+
"label": "Total AV",
|
133
|
+
"value": "DE014",
|
134
|
+
"controls": [
|
135
|
+
{
|
136
|
+
"renderAs": "cui-text",
|
137
|
+
"attributes": {
|
138
|
+
"label": "Min",
|
139
|
+
"componentKey": "first",
|
140
|
+
"required": true,
|
141
|
+
"validation": "checkMaxLength(12), isNumeric",
|
142
|
+
"pillValue": true
|
143
|
+
}
|
144
|
+
},
|
145
|
+
{
|
146
|
+
"renderAs": "cui-text",
|
147
|
+
"attributes": {
|
148
|
+
"label": "Max",
|
149
|
+
"componentKey": "last",
|
150
|
+
"required": true,
|
151
|
+
"validation": "checkMaxLength(12), isNumeric",
|
152
|
+
"pillValue": true
|
153
|
+
}
|
154
|
+
}
|
155
|
+
]
|
156
|
+
},
|
157
|
+
{
|
158
|
+
"label": "GIS",
|
159
|
+
"value": "DE000",
|
160
|
+
"controls": [
|
161
|
+
{
|
162
|
+
"renderAs": "cui-button",
|
163
|
+
"attributes": {
|
164
|
+
"text": "Launch GIS",
|
165
|
+
"componentKey": "gis",
|
166
|
+
"action": "launchGIS"
|
167
|
+
}
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"renderAs": "cui-text",
|
171
|
+
"attributes": {
|
172
|
+
"readOnly": true,
|
173
|
+
"label": "Parcels",
|
174
|
+
"componentKey": "selected",
|
175
|
+
"action": "launchGIS",
|
176
|
+
"pillValue": true
|
177
|
+
}
|
178
|
+
},
|
179
|
+
{
|
180
|
+
"renderAs": "cui-hidden",
|
181
|
+
"attributes": {
|
182
|
+
"componentKey": "hidden"
|
183
|
+
}
|
184
|
+
}
|
185
|
+
]
|
186
|
+
}
|
187
|
+
],
|
188
|
+
"relayEvents": ['change']
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
async init(oNavState) {
|
193
|
+
|
194
|
+
}
|
195
|
+
|
196
|
+
async preRender(oNavState, oScreenServiceResponse) {
|
197
|
+
|
198
|
+
}
|
199
|
+
|
200
|
+
async render(oNavState, oScreenServiceResponse, dScreenTemplate) {
|
201
|
+
|
202
|
+
}
|
203
|
+
|
204
|
+
async postRender(oNavState, oScreenServiceResponse, dScreen) {
|
205
|
+
|
206
|
+
let filter = dScreen.querySelector('cui-formpill');
|
207
|
+
filter.setState({ 'config': this.config }, true);
|
208
|
+
filter.setState({
|
209
|
+
"pills": [{
|
210
|
+
"value": "DE007", //Criteria value
|
211
|
+
"fields": { "value": "includes" },
|
212
|
+
"label": "Street Suffix",
|
213
|
+
"valueLabel": "Tax Map ID Includes"
|
214
|
+
}]
|
215
|
+
});
|
216
|
+
}
|
217
|
+
|
218
|
+
async search(evt) {
|
219
|
+
console.log(evt.detail.form.createFormData());
|
220
|
+
|
221
|
+
}
|
222
|
+
|
223
|
+
async launchGIS(evt) {
|
224
|
+
console.log(evt);
|
225
|
+
|
226
|
+
evt.detail.target.assignValueToFieldInPopover({ "selected": "10 Parcels", "hidden":"wskjfhgwuetgyfwkauyefkuaw" }, evt.detail.targetPopover);
|
227
|
+
}
|
228
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<div class="page">
|
2
|
+
<h2>Index page</h2>
|
3
|
+
|
4
|
+
<cui-section>
|
5
|
+
<div slot="section-contents">
|
6
|
+
<cui-form>
|
7
|
+
<div slot="form-contents">
|
8
|
+
<div class="grid">
|
9
|
+
<div class="row">
|
10
|
+
<div class="col">
|
11
|
+
<cui-formpill label="Add Criteria" addTitle="Add Criteria" updateTitle="Update Criteria" componentKEy="searchCriteria"></cui-formpill>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
</div>
|
15
|
+
|
16
|
+
<div class="grid button-row">
|
17
|
+
<div class="row">
|
18
|
+
<div class="col">
|
19
|
+
<cui-button action="parcelSaveOption" text="Save Option"></cui-button>
|
20
|
+
</div>
|
21
|
+
<div class="col align-end">
|
22
|
+
<cui-button action="search" text="Search" primary="true"></cui-button>
|
23
|
+
<cui-button text="Reset" reset></cui-button>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</cui-form>
|
29
|
+
|
30
|
+
</div>
|
31
|
+
</cui-section>
|
32
|
+
</div>
|
@@ -0,0 +1,117 @@
|
|
1
|
+
import CUI_APP from '@nys-cui/cui-spa-app-class';
|
2
|
+
|
3
|
+
import * as DOM from './modules/dom.js';
|
4
|
+
|
5
|
+
//import component here
|
6
|
+
//import [COMPONENT] from '../../dist/js/[component].js';
|
7
|
+
import { CUI_FORMPILL, POPOVER_FORMPILL } from '../../src/cui-formpill.js';
|
8
|
+
import CUI_POPOVER from '@nys-cui/cui-popover';
|
9
|
+
import SECTION from '@nys-cui/cui-section';
|
10
|
+
|
11
|
+
|
12
|
+
// First Party Web Components
|
13
|
+
import ASOF from '@nys-cui/cui-asof';
|
14
|
+
import BUTTON from '@nys-cui/cui-button';
|
15
|
+
import CHECKBOX from '@nys-cui/cui-field-checkbox';
|
16
|
+
import TEXT from '@nys-cui/cui-field-text';
|
17
|
+
import DATE from '@nys-cui/cui-field-text-date';
|
18
|
+
import DYNAMIC_BLOCK from '@nys-cui/cui-dynamic-block';
|
19
|
+
import FORM from '@nys-cui/cui-form';
|
20
|
+
import ICON from '@nys-cui/cui-icon';
|
21
|
+
import INPUT_GROUP from '@nys-cui/cui-input-group';
|
22
|
+
import { HELP, HELP_POPOVER } from '@nys-cui/cui-help';
|
23
|
+
import HIDDEN from '@nys-cui/cui-hidden';
|
24
|
+
import LINK from '@nys-cui/cui-link';
|
25
|
+
import LISTBOX from '@nys-cui/cui-field-listbox';
|
26
|
+
import { TABLE, TABLE_COL, TABLE_FOOT } from '@nys-cui/cui-table';
|
27
|
+
import MODAL from '@nys-cui/cui-modal';
|
28
|
+
import TEXTAREA from '@nys-cui/cui-field-textarea';
|
29
|
+
import { TOAST, TOASTER } from '@nys-cui/cui-toast';
|
30
|
+
import { BUTTON_MENU, POPOVER } from '@nys-cui/cui-button-menu';
|
31
|
+
import CUI_MESSAGE from '@nys-cui/cui-message'
|
32
|
+
import CUI_MESSAGE_LIST from '@nys-cui/cui-message-list';
|
33
|
+
import { TREE, TREE_BRANCH, TREE_LEAF, TREE_FILTER } from '@nys-cui/cui-tree';
|
34
|
+
import { CUI_TABS } from '@nys-cui/cui-tabs';
|
35
|
+
|
36
|
+
class APP extends CUI_APP {
|
37
|
+
constructor() {
|
38
|
+
super('script#spa');
|
39
|
+
|
40
|
+
customElements.define('cui-formpill-popover', POPOVER_FORMPILL);
|
41
|
+
customElements.define('cui-formpill', CUI_FORMPILL);
|
42
|
+
|
43
|
+
// Define global components used by the project as a whole
|
44
|
+
customElements.define("cui-asof", ASOF);
|
45
|
+
customElements.define("cui-button", BUTTON);
|
46
|
+
customElements.define("cui-checkbox", CHECKBOX);
|
47
|
+
customElements.define("cui-dynamic-block", DYNAMIC_BLOCK)
|
48
|
+
customElements.define("cui-form", FORM);
|
49
|
+
customElements.define("cui-icon", ICON);
|
50
|
+
customElements.define('cui-help', HELP);
|
51
|
+
customElements.define('help-popover', HELP_POPOVER);
|
52
|
+
customElements.define('cui-hidden', HIDDEN);
|
53
|
+
customElements.define('cui-link', LINK);
|
54
|
+
customElements.define('cui-listbox', LISTBOX);
|
55
|
+
customElements.define('cui-section', SECTION);
|
56
|
+
customElements.define('cui-table', TABLE);
|
57
|
+
customElements.define('cui-table-col', TABLE_COL);
|
58
|
+
customElements.define('cui-table-foot', TABLE_FOOT);
|
59
|
+
customElements.define("cui-text", TEXT);
|
60
|
+
customElements.define("cui-date", DATE);
|
61
|
+
customElements.define("cui-textarea", TEXTAREA);
|
62
|
+
|
63
|
+
customElements.define("cui-tabs", CUI_TABS);
|
64
|
+
customElements.define("cui-tree", TREE);
|
65
|
+
customElements.define("cui-tree-branch", TREE_BRANCH);
|
66
|
+
customElements.define("cui-tree-leaf", TREE_LEAF);
|
67
|
+
customElements.define("cui-tree-filter", TREE_FILTER);
|
68
|
+
|
69
|
+
customElements.define('cui-button-menu', BUTTON_MENU);
|
70
|
+
customElements.define('button-menu-popover', POPOVER);
|
71
|
+
customElements.define("cui-message", CUI_MESSAGE);
|
72
|
+
customElements.define("cui-message-list", CUI_MESSAGE_LIST);
|
73
|
+
customElements.define("cui-modal", MODAL);
|
74
|
+
customElements.define('cui-toast', TOAST);
|
75
|
+
customElements.define('cui-toaster', TOASTER);
|
76
|
+
customElements.define("cui-input-group", INPUT_GROUP);
|
77
|
+
customElements.define('cui-popover', CUI_POPOVER);
|
78
|
+
}
|
79
|
+
|
80
|
+
async init() {
|
81
|
+
if (!this.__bInit) {
|
82
|
+
let oGlobalContextAppLevel = {
|
83
|
+
"globals": "value"
|
84
|
+
}
|
85
|
+
|
86
|
+
await super._init(this.oGlobalTemplates, oGlobalContextAppLevel);
|
87
|
+
|
88
|
+
DOM.clearElements(document.body);
|
89
|
+
|
90
|
+
this.dAppBody = DOM.createElement('div', { "id": "app-root" });
|
91
|
+
|
92
|
+
document.body.appendChild(this.dAppBody);
|
93
|
+
|
94
|
+
this._init_AppWrapper();
|
95
|
+
|
96
|
+
let sCurrentLocation = this.sLaunchPath.replace(this.sOrigin, '');
|
97
|
+
|
98
|
+
if (sCurrentLocation && sCurrentLocation.length && sCurrentLocation !== "/") {
|
99
|
+
await this.cRouter.navTo(sCurrentLocation);
|
100
|
+
}
|
101
|
+
else {
|
102
|
+
await this.cRouter.navTo("/");
|
103
|
+
}
|
104
|
+
|
105
|
+
this.__bInit = true;
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
_init_AppWrapper() {
|
110
|
+
this._dAppRoot = document.body;
|
111
|
+
}
|
112
|
+
}
|
113
|
+
|
114
|
+
(async function () {
|
115
|
+
const COMP_TEST_APP = new APP();
|
116
|
+
COMP_TEST_APP.init();
|
117
|
+
})();
|