@adins/ucviewgeneric 3.4.18-canary.0 → 4.0.0-research.1

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.
Files changed (29) hide show
  1. package/README.md +493 -493
  2. package/{esm2020 → esm2022}/adins-ucviewgeneric.mjs +4 -4
  3. package/esm2022/lib/model/grid-view-obj.model.mjs +15 -0
  4. package/esm2022/lib/model/input-grid-obj.model.mjs +43 -0
  5. package/esm2022/lib/model/uc-view-generic-obj.model.mjs +49 -0
  6. package/esm2022/lib/ucviewgeneric.component.mjs +768 -0
  7. package/esm2022/lib/ucviewgeneric.module.mjs +30 -0
  8. package/{esm2020 → esm2022}/lib/ucviewgeneric.service.mjs +14 -14
  9. package/{esm2020 → esm2022}/public-api.mjs +7 -7
  10. package/fesm2022/adins-ucviewgeneric.mjs +918 -0
  11. package/fesm2022/adins-ucviewgeneric.mjs.map +1 -0
  12. package/{adins-ucviewgeneric.d.ts → index.d.ts} +5 -5
  13. package/lib/model/grid-view-obj.model.d.ts +21 -21
  14. package/lib/model/input-grid-obj.model.d.ts +29 -29
  15. package/lib/model/uc-view-generic-obj.model.d.ts +29 -29
  16. package/lib/ucviewgeneric.component.d.ts +55 -55
  17. package/lib/ucviewgeneric.module.d.ts +2 -15
  18. package/lib/ucviewgeneric.service.d.ts +6 -6
  19. package/package.json +8 -14
  20. package/public-api.d.ts +3 -3
  21. package/esm2020/lib/model/grid-view-obj.model.mjs +0 -8
  22. package/esm2020/lib/model/input-grid-obj.model.mjs +0 -24
  23. package/esm2020/lib/model/uc-view-generic-obj.model.mjs +0 -34
  24. package/esm2020/lib/ucviewgeneric.component.mjs +0 -762
  25. package/esm2020/lib/ucviewgeneric.module.mjs +0 -50
  26. package/fesm2015/adins-ucviewgeneric.mjs +0 -891
  27. package/fesm2015/adins-ucviewgeneric.mjs.map +0 -1
  28. package/fesm2020/adins-ucviewgeneric.mjs +0 -889
  29. package/fesm2020/adins-ucviewgeneric.mjs.map +0 -1
package/README.md CHANGED
@@ -1,493 +1,493 @@
1
- # Ucviewgeneric
2
-
3
- This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.0.0.
4
-
5
- ## Version
6
- notes: new ui under canary.x tags
7
-
8
- Version 3.4.18
9
- 1. handle masking date pipe with ucdatepipe
10
-
11
- Version 3.4.17
12
- 1. add truncate text for type link
13
-
14
- Version 3.4.16
15
- 1. support show item conditionally using data from the view itself
16
-
17
- Version 3.4.15
18
- 1. support show item conditionally using `conditions`
19
-
20
- Version 3.4.14
21
- 1. fix parameter when calling getQueryParams (ngx-router)
22
-
23
- Version 3.4.13
24
- 1. on/off safe url with useSafeUrl property
25
-
26
- Version 3.4.11
27
- 1. fix link style on type switch callback
28
-
29
- Version 3.4.10
30
- 1. fix text cannot be highlighted for copy
31
-
32
- Version 3.4.9
33
- 1. fix link style on type switch
34
-
35
- Version 3.4.8
36
- 1. add isSubsection option for table inside view
37
- 2. add usePagination option for table inside view
38
-
39
- Version 3.4.7
40
- 1. Add notify update / refresh view handler
41
-
42
- Version 3.4.6
43
- 1. new update uc-subsection module
44
-
45
- Version 3.4.5
46
- 1. change ui font
47
-
48
- Version 3.4.4
49
- 1. add EXPERIMENTAL flag for BaseView API
50
-
51
- Version 3.4.3
52
- 1. add option if fullpath empty, will generate from config environment and path
53
-
54
- Version 3.4.2
55
- 1. fix padding
56
-
57
- Version 3.4.1
58
- 1. fix margin for type boolean
59
-
60
- Version 3.4.0
61
- 1. fix margin padding for type switch
62
- 2. Fix columns
63
- 3. add classpadding 0
64
- 4. fix html tag
65
- 5. support hardcode value
66
- 6. separate old ui in legacy
67
-
68
- Version 3.3.3
69
- 1. Fix Table indent
70
-
71
- Version 3.3.2
72
- 1. Change gridview component to table component
73
-
74
- Version 3.3.1
75
- 1. Add support type blank
76
-
77
- Version 3.3.0
78
- 1. Add support data dictionary
79
-
80
- Version 3.2.2
81
- 1. bug fix initialize gridViews input
82
- 2. bug fix grid view move into one group section with ucview
83
-
84
- Version 3.2.1
85
- 1. bug fix initialize gridview
86
-
87
- Version 3.2.0
88
- 1. support grid table below view
89
-
90
- Version 3.1.3
91
- 1. fix get data by API
92
-
93
- Version 3.1.1
94
- 1. remove useCustomRes option setting
95
-
96
- Version 3.1.0
97
- 1. add reqObj option setting
98
- 2. add enviroment setting for get data by listEnvironment
99
- 3. add useCustomRes option setting
100
- 4. add resObjName option setting
101
-
102
- Version 3.0.2
103
- 1. fix dataInput undefined
104
-
105
- Version 3.0.1
106
- 1. fix dataInput
107
-
108
- Version 3.0.0
109
- 1. fix versioning
110
- 2. support dataInput
111
-
112
- Version 2.4.0
113
- 1. Update Angular 13 + IsCard
114
-
115
- Version 2.3.2
116
- 1. type date dateFormat
117
-
118
- Version 2.3.1
119
- 1. type callback-isText
120
-
121
- Version 2.2.1
122
- 1. update folder/file name to lower-case
123
-
124
- Version 2.2.0
125
- 1. Add logic hide (label and value) for switch case
126
-
127
- Version 2.1.0
128
- 1. Add logic hide (label and value) for switch case
129
-
130
- Version 2.0.81
131
- 1. Add logic concat for switch case.
132
-
133
- Version 2.0.77
134
- 1. Bug fixing.
135
-
136
- Version 2.0.76
137
- 1. tambah precision di type decimal.
138
-
139
- Version 2.0.75
140
- 1. localStorage => Cookie
141
- 2. switchCase restriction IN And NIN (Not In)
142
-
143
- Version 2.0.74
144
- 1. Add word-break
145
-
146
- Version 2.0.72
147
- 1. read localstorage lang
148
-
149
- Version 2.0.70
150
- 1. translate module
151
-
152
- Version 2.0.69
153
- 1. tambah view link isCurrency
154
-
155
- Version 2.0.68
156
- 1. concat tidak muncul karena emptyLabel bug
157
-
158
- Version 2.0.66
159
- 1. fix viewgeneric bug boolean != '' => false
160
-
161
- Version 2.0.65
162
- 1. fix viewgeneric undefined
163
-
164
- Version 2.0.64
165
- 1. tambah property customClassLabel
166
- 1. tambah property customClassProperty
167
-
168
- Version 2.0.63
169
- 1. Menambahkan Navigation Constant untuk link
170
-
171
- Version 2.0.61
172
- 1. tambah property customclass
173
-
174
- Version 2.0.60
175
- 1. tambah type switchcase
176
-
177
- Version 2.0.39
178
- 1. tambah delimiter untuk currency
179
-
180
- Version 2.0.36
181
- 1. kurang penjagaan null dan string kosong
182
-
183
- Version 2.0.35
184
- 1. bug label isHide
185
-
186
- Version 2.0.33
187
- 1. bug label div
188
-
189
- Version 2.0.32
190
- 1. fix position
191
-
192
- Version 2.0.31
193
- 1. tambah property isHide
194
- 2. fix jika empty jadi " - "
195
-
196
- Version 2.0.27
197
- 1. Fix css title
198
-
199
- Version 2.0.27
200
- 1. Ubah input object
201
- 2. tambah link envi
202
-
203
- Version 2.0.22
204
- 1. tambah input ddlEnvironments
205
-
206
- Version 2.0.21
207
- 1. tambah input ddlEnvironments
208
-
209
- Version 2.0.20
210
- 1. fix logic type concat
211
-
212
- Version 2.0.15
213
- 1. tambah type concat
214
-
215
- Version 2.0.14
216
- 1. ubah Input jdi string
217
-
218
- Version 2.0.13
219
- 1. Tambah Input ddlEnvironments
220
-
221
- Version 2.0.12
222
- 1. fix data kosong
223
-
224
- Version 2.0.11
225
- 1. fix data kosong
226
-
227
- Version 2.0.10
228
- 1. fix boolean false agar tidak tampil '-'
229
- 2. string kosong akan menampilkan '-'
230
-
231
- Version 2.0.9
232
- 1. fix jika data kosong
233
-
234
- Version 2.0.8
235
- 1. where value from input
236
-
237
- Version 2.0.5
238
- 1. if no title fix
239
-
240
- Version 2.0.4
241
- 1. add type boolean
242
-
243
- Version 2.0.3
244
- 1. get returnObject querystring TOP 1
245
-
246
- Version 2.0.2
247
- 1. get data from queryString
248
-
249
- Version 2.0.1
250
- 1. label position viewGeneric, textarea input disable, loop subsection
251
-
252
- Version 2.0.0
253
- 1. Update ReadMe
254
-
255
- Version 1.0.3
256
- 1. Update ReadMe
257
-
258
- Version 1.0.2
259
- 1. fix subsection not working
260
-
261
- Version 1.0.1
262
- 1. Added ReadMe
263
-
264
- ## Dependency Module
265
- import this module :
266
- - RouterModule
267
- - UcSubsectionModule ` npm i @adins/uc-subsection `
268
-
269
- ## Selector
270
- lib-ucviewgeneric
271
-
272
- ## Input
273
- 1. viewGenericObj : UcViewGenericObj (object) *mandatory
274
-
275
- ## Output
276
- 1. callback : return view object
277
-
278
- ## Object property & JSON property
279
- viewGenericObj :
280
- - viewInput : view.json
281
- - viewEnvironment : environment path (foundation, setting, vendor)
282
- - navigationConst : navigation constant
283
- - listEnvironments : list EnvisObj (object)
284
- - whereValue : []
285
- - IsCard : Is use class card
286
- - dataInput : alternative data supply; use ESModule import to load json data, then pass the value into here. will override http.get
287
-
288
-
289
- ## Callback
290
- - Callback return object:
291
- {
292
- ViewObj: item, // return view object
293
- Key: key // Key name
294
- }
295
-
296
- ## JSON property
297
- view.json :
298
- ``` javascript
299
- {
300
- "title": "title", // title view paging
301
- "subsection": [ // subsection list
302
- {
303
- "subSectionId": "id", // uniqueId
304
- "subSectionTitle": "Main Information", // sub-section title
305
- "mainInfoUrl": "", // full path API get data
306
- "mainInfoPath": "", // only path API get data
307
- "environment": "", // refer to listEnvironment
308
- "reqObj": {}, // request object for hit API, default take from queryParamfalse will take from response[resObjName]
309
- "resObjName": "", // response object name to get data
310
- "mainInfo": [ // view information list
311
- {
312
- "type": "blank"
313
- },
314
- {
315
- "type": "link", // text with link button
316
- "label": "View Name", // label information name
317
- "customClassLabel": "font-weight-bold", // *optional, additional class to change css in label
318
- "customClassProperty": "font-weight-bold", // *optional, additional class to change css in property
319
- "property": "viewName", // property to view
320
- "position": "left", // label position (left, center, right | default left) *optional
321
- "path": "/test/paging", // router path
322
- "target" : "_self", // *optional _blank: Opens the linked document in a new window or tab
323
- "param": [ // passing optional parameters
324
- {
325
- "type" : "vendorId", // key parameter
326
- "property": "vendorId", // property to pass
327
- }
328
- ],
329
- "name": "name" // set name for ddlEnvironments *optional,
330
- "isHide": true // jika value kosong, label dihide juga
331
- "isCurrency": true // if true, currency separator formatter
332
- },
333
- {
334
- "type": "text", // text only
335
- "label": "View Code",
336
- "property": "viewCode"
337
- },
338
- {
339
- "type": "currency", // currency separator formatter
340
- "label": "View Code",
341
- "property": "viewCode",
342
- "precision" : "0.2" //Precision (0.2, 0.4, 0.6, ... | default 0.2) *optional
343
- "IsPrcnt": false, // if true, ' %'
344
- },
345
- {
346
- "type": "date", // date formatter
347
- "label": "View Code",
348
- "property": "viewCode",
349
- "dateFormat": "dd-MMM-yyyy" //Default format dd-MMM-yyyy *optional
350
- },
351
- {
352
- "type": "textarea", // textarea input type, read only
353
- "label": "View Code",
354
- "property": "viewCode"
355
- },
356
- {
357
- "type": "boolean", // boolean 0|1 (no|yes)
358
- "label": "View Code",
359
- "property": "viewCode"
360
- },
361
- {
362
- "type" : "callback", // return selected row object
363
- "label": "View Code",
364
- "property" : "bodyId",
365
- "key" : "download/upload/trigger" // Key name for specific action
366
- },
367
- {
368
- "type": "concat",
369
- "label": "View Code",
370
- "propertyList": [
371
- {
372
- "property": "viewCode",
373
- "prefix": "",
374
- "suffix": " + "
375
- },
376
- {
377
- "property": "viewCode",
378
- "prefix": "RT: ",
379
- "suffix": ""
380
- }
381
- ]
382
- },
383
- {
384
- "type" : "switch", // switch case condition
385
- "case" : [ // list of case
386
- {
387
- "conditions" : [ // list of conditions
388
- {
389
- "isUser": true,
390
- "property" : "isActive", // property for condition checking
391
- "value" : "0", // value to check (IN or NIN list/[])
392
- "restriction" : "EQ" // condition restrictions (EQ, NEQ, GT, GTE, LT, LTE, IN, NIN | default EQ) *optional
393
- },
394
- {
395
- "property" : "type",
396
- "value" : "EXE",
397
- "restriction" : "EQ"
398
- }
399
- ],
400
- "result" : { // result of this case
401
- "type": "url", // redirect path action
402
- "label": "View Code",
403
- "path" : "/test/paging",
404
- "icon" : "ft-edit-2", // set class icon from feather icon
405
- "param" : [
406
- {
407
- "type" : "refBodyId",
408
- "property" : "refBodyId"
409
- }
410
- ],
411
- "hideIfEmpty" : true // if one property yield empty value, label will also hide *optional, boolean
412
- },
413
- "result" : { // result of this case
414
- "type": "callback", // return selected row object"label": "View Code",
415
- "label": "View Code",
416
- "icon" : "ft-edit-2"
417
- },
418
- "result" : { // result of this case
419
- "type": "text", // type like bodyList : text,decimal,date,link,boolean
420
- "label": "View Code",
421
- "property" : "bodyId"
422
- },
423
- "result" : {
424
- "type": "concat",
425
- "label": "View Code",
426
- "propertyList": [
427
- {
428
- "property": "viewCode",
429
- "prefix": "",
430
- "suffix": " + "
431
- },
432
- {
433
- "property": "viewCode",
434
- "prefix": "RT: ",
435
- "suffix": ""
436
- }
437
- ]
438
- },
439
- "isHide" : true // hide icon if condition true, MUST *boolean
440
- }
441
- ]
442
- }
443
- ],
444
- "gridViews": [
445
- {
446
- "getData": {
447
- "environment": "", // refer to listEnvironment
448
- "apiPath": "", // only path API get data
449
- "customObjName": "ReturnObject", // / CustomObjName variable *Default: "ReturnObject"
450
- "reqObj": [
451
- {
452
- "propName": "", // Property name for request payload
453
- "propValue": "" // Property value for request payload
454
- }
455
- ]
456
- },
457
- "tableInput": { // same as ucgridview setting
458
- "isSeq": false, // show numbering on the left side of table
459
- "headerList": {}, // same as ucgridview setting
460
- "bodyList": {} // same as ucgridview setting
461
- }
462
- }
463
- ]
464
- }
465
- ],
466
- "querystring": {
467
- "select": "", // ex: "SELECT OFFICE_NAME AS OfficeName,IS_ACTIVE AS IsActive" *must use alias
468
- "from": "", // ex: "FROM REF_OFFICE WITH(NOLOCK)"
469
- "where": "" // ex: "WHERE REF_OFFICE_ID = {0} OR OFFICE_CODE = N'{1}'" *where condition sequence, with value from queryParam sequence
470
- }
471
- }
472
- ```
473
-
474
- ## Code scaffolding
475
-
476
- Run `ng generate component component-name --project ucviewgeneric` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ucviewgeneric`.
477
- > Note: Don't forget to add `--project ucviewgeneric` or else it will be added to the default project in your `angular.json` file.
478
-
479
- ## Build
480
-
481
- Run `ng build ucviewgeneric` to build the project. The build artifacts will be stored in the `dist/` directory.
482
-
483
- ## Publishing
484
-
485
- After building your library with `ng build ucviewgeneric`, go to the dist folder `cd dist/ucviewgeneric` and run `npm publish`.
486
-
487
- ## Running unit tests
488
-
489
- Run `ng test ucviewgeneric` to execute the unit tests via [Karma](https://karma-runner.github.io).
490
-
491
- ## Further help
492
-
493
- To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
1
+ # Ucviewgeneric
2
+
3
+ This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.0.0.
4
+
5
+ ## Version
6
+ notes: new ui under canary.x tags
7
+
8
+ Version 3.4.18
9
+ 1. handle masking date pipe with ucdatepipe
10
+
11
+ Version 3.4.17
12
+ 1. add truncate text for type link
13
+
14
+ Version 3.4.16
15
+ 1. support show item conditionally using data from the view itself
16
+
17
+ Version 3.4.15
18
+ 1. support show item conditionally using `conditions`
19
+
20
+ Version 3.4.14
21
+ 1. fix parameter when calling getQueryParams (ngx-router)
22
+
23
+ Version 3.4.13
24
+ 1. on/off safe url with useSafeUrl property
25
+
26
+ Version 3.4.11
27
+ 1. fix link style on type switch callback
28
+
29
+ Version 3.4.10
30
+ 1. fix text cannot be highlighted for copy
31
+
32
+ Version 3.4.9
33
+ 1. fix link style on type switch
34
+
35
+ Version 3.4.8
36
+ 1. add isSubsection option for table inside view
37
+ 2. add usePagination option for table inside view
38
+
39
+ Version 3.4.7
40
+ 1. Add notify update / refresh view handler
41
+
42
+ Version 3.4.6
43
+ 1. new update uc-subsection module
44
+
45
+ Version 3.4.5
46
+ 1. change ui font
47
+
48
+ Version 3.4.4
49
+ 1. add EXPERIMENTAL flag for BaseView API
50
+
51
+ Version 3.4.3
52
+ 1. add option if fullpath empty, will generate from config environment and path
53
+
54
+ Version 3.4.2
55
+ 1. fix padding
56
+
57
+ Version 3.4.1
58
+ 1. fix margin for type boolean
59
+
60
+ Version 3.4.0
61
+ 1. fix margin padding for type switch
62
+ 2. Fix columns
63
+ 3. add classpadding 0
64
+ 4. fix html tag
65
+ 5. support hardcode value
66
+ 6. separate old ui in legacy
67
+
68
+ Version 3.3.3
69
+ 1. Fix Table indent
70
+
71
+ Version 3.3.2
72
+ 1. Change gridview component to table component
73
+
74
+ Version 3.3.1
75
+ 1. Add support type blank
76
+
77
+ Version 3.3.0
78
+ 1. Add support data dictionary
79
+
80
+ Version 3.2.2
81
+ 1. bug fix initialize gridViews input
82
+ 2. bug fix grid view move into one group section with ucview
83
+
84
+ Version 3.2.1
85
+ 1. bug fix initialize gridview
86
+
87
+ Version 3.2.0
88
+ 1. support grid table below view
89
+
90
+ Version 3.1.3
91
+ 1. fix get data by API
92
+
93
+ Version 3.1.1
94
+ 1. remove useCustomRes option setting
95
+
96
+ Version 3.1.0
97
+ 1. add reqObj option setting
98
+ 2. add enviroment setting for get data by listEnvironment
99
+ 3. add useCustomRes option setting
100
+ 4. add resObjName option setting
101
+
102
+ Version 3.0.2
103
+ 1. fix dataInput undefined
104
+
105
+ Version 3.0.1
106
+ 1. fix dataInput
107
+
108
+ Version 3.0.0
109
+ 1. fix versioning
110
+ 2. support dataInput
111
+
112
+ Version 2.4.0
113
+ 1. Update Angular 13 + IsCard
114
+
115
+ Version 2.3.2
116
+ 1. type date dateFormat
117
+
118
+ Version 2.3.1
119
+ 1. type callback-isText
120
+
121
+ Version 2.2.1
122
+ 1. update folder/file name to lower-case
123
+
124
+ Version 2.2.0
125
+ 1. Add logic hide (label and value) for switch case
126
+
127
+ Version 2.1.0
128
+ 1. Add logic hide (label and value) for switch case
129
+
130
+ Version 2.0.81
131
+ 1. Add logic concat for switch case.
132
+
133
+ Version 2.0.77
134
+ 1. Bug fixing.
135
+
136
+ Version 2.0.76
137
+ 1. tambah precision di type decimal.
138
+
139
+ Version 2.0.75
140
+ 1. localStorage => Cookie
141
+ 2. switchCase restriction IN And NIN (Not In)
142
+
143
+ Version 2.0.74
144
+ 1. Add word-break
145
+
146
+ Version 2.0.72
147
+ 1. read localstorage lang
148
+
149
+ Version 2.0.70
150
+ 1. translate module
151
+
152
+ Version 2.0.69
153
+ 1. tambah view link isCurrency
154
+
155
+ Version 2.0.68
156
+ 1. concat tidak muncul karena emptyLabel bug
157
+
158
+ Version 2.0.66
159
+ 1. fix viewgeneric bug boolean != '' => false
160
+
161
+ Version 2.0.65
162
+ 1. fix viewgeneric undefined
163
+
164
+ Version 2.0.64
165
+ 1. tambah property customClassLabel
166
+ 1. tambah property customClassProperty
167
+
168
+ Version 2.0.63
169
+ 1. Menambahkan Navigation Constant untuk link
170
+
171
+ Version 2.0.61
172
+ 1. tambah property customclass
173
+
174
+ Version 2.0.60
175
+ 1. tambah type switchcase
176
+
177
+ Version 2.0.39
178
+ 1. tambah delimiter untuk currency
179
+
180
+ Version 2.0.36
181
+ 1. kurang penjagaan null dan string kosong
182
+
183
+ Version 2.0.35
184
+ 1. bug label isHide
185
+
186
+ Version 2.0.33
187
+ 1. bug label div
188
+
189
+ Version 2.0.32
190
+ 1. fix position
191
+
192
+ Version 2.0.31
193
+ 1. tambah property isHide
194
+ 2. fix jika empty jadi " - "
195
+
196
+ Version 2.0.27
197
+ 1. Fix css title
198
+
199
+ Version 2.0.27
200
+ 1. Ubah input object
201
+ 2. tambah link envi
202
+
203
+ Version 2.0.22
204
+ 1. tambah input ddlEnvironments
205
+
206
+ Version 2.0.21
207
+ 1. tambah input ddlEnvironments
208
+
209
+ Version 2.0.20
210
+ 1. fix logic type concat
211
+
212
+ Version 2.0.15
213
+ 1. tambah type concat
214
+
215
+ Version 2.0.14
216
+ 1. ubah Input jdi string
217
+
218
+ Version 2.0.13
219
+ 1. Tambah Input ddlEnvironments
220
+
221
+ Version 2.0.12
222
+ 1. fix data kosong
223
+
224
+ Version 2.0.11
225
+ 1. fix data kosong
226
+
227
+ Version 2.0.10
228
+ 1. fix boolean false agar tidak tampil '-'
229
+ 2. string kosong akan menampilkan '-'
230
+
231
+ Version 2.0.9
232
+ 1. fix jika data kosong
233
+
234
+ Version 2.0.8
235
+ 1. where value from input
236
+
237
+ Version 2.0.5
238
+ 1. if no title fix
239
+
240
+ Version 2.0.4
241
+ 1. add type boolean
242
+
243
+ Version 2.0.3
244
+ 1. get returnObject querystring TOP 1
245
+
246
+ Version 2.0.2
247
+ 1. get data from queryString
248
+
249
+ Version 2.0.1
250
+ 1. label position viewGeneric, textarea input disable, loop subsection
251
+
252
+ Version 2.0.0
253
+ 1. Update ReadMe
254
+
255
+ Version 1.0.3
256
+ 1. Update ReadMe
257
+
258
+ Version 1.0.2
259
+ 1. fix subsection not working
260
+
261
+ Version 1.0.1
262
+ 1. Added ReadMe
263
+
264
+ ## Dependency Module
265
+ import this module :
266
+ - RouterModule
267
+ - UcSubsectionModule ` npm i @adins/uc-subsection `
268
+
269
+ ## Selector
270
+ lib-ucviewgeneric
271
+
272
+ ## Input
273
+ 1. viewGenericObj : UcViewGenericObj (object) *mandatory
274
+
275
+ ## Output
276
+ 1. callback : return view object
277
+
278
+ ## Object property & JSON property
279
+ viewGenericObj :
280
+ - viewInput : view.json
281
+ - viewEnvironment : environment path (foundation, setting, vendor)
282
+ - navigationConst : navigation constant
283
+ - listEnvironments : list EnvisObj (object)
284
+ - whereValue : []
285
+ - IsCard : Is use class card
286
+ - dataInput : alternative data supply; use ESModule import to load json data, then pass the value into here. will override http.get
287
+
288
+
289
+ ## Callback
290
+ - Callback return object:
291
+ {
292
+ ViewObj: item, // return view object
293
+ Key: key // Key name
294
+ }
295
+
296
+ ## JSON property
297
+ view.json :
298
+ ``` javascript
299
+ {
300
+ "title": "title", // title view paging
301
+ "subsection": [ // subsection list
302
+ {
303
+ "subSectionId": "id", // uniqueId
304
+ "subSectionTitle": "Main Information", // sub-section title
305
+ "mainInfoUrl": "", // full path API get data
306
+ "mainInfoPath": "", // only path API get data
307
+ "environment": "", // refer to listEnvironment
308
+ "reqObj": {}, // request object for hit API, default take from queryParamfalse will take from response[resObjName]
309
+ "resObjName": "", // response object name to get data
310
+ "mainInfo": [ // view information list
311
+ {
312
+ "type": "blank"
313
+ },
314
+ {
315
+ "type": "link", // text with link button
316
+ "label": "View Name", // label information name
317
+ "customClassLabel": "font-weight-bold", // *optional, additional class to change css in label
318
+ "customClassProperty": "font-weight-bold", // *optional, additional class to change css in property
319
+ "property": "viewName", // property to view
320
+ "position": "left", // label position (left, center, right | default left) *optional
321
+ "path": "/test/paging", // router path
322
+ "target" : "_self", // *optional _blank: Opens the linked document in a new window or tab
323
+ "param": [ // passing optional parameters
324
+ {
325
+ "type" : "vendorId", // key parameter
326
+ "property": "vendorId", // property to pass
327
+ }
328
+ ],
329
+ "name": "name" // set name for ddlEnvironments *optional,
330
+ "isHide": true // jika value kosong, label dihide juga
331
+ "isCurrency": true // if true, currency separator formatter
332
+ },
333
+ {
334
+ "type": "text", // text only
335
+ "label": "View Code",
336
+ "property": "viewCode"
337
+ },
338
+ {
339
+ "type": "currency", // currency separator formatter
340
+ "label": "View Code",
341
+ "property": "viewCode",
342
+ "precision" : "0.2" //Precision (0.2, 0.4, 0.6, ... | default 0.2) *optional
343
+ "IsPrcnt": false, // if true, ' %'
344
+ },
345
+ {
346
+ "type": "date", // date formatter
347
+ "label": "View Code",
348
+ "property": "viewCode",
349
+ "dateFormat": "dd-MMM-yyyy" //Default format dd-MMM-yyyy *optional
350
+ },
351
+ {
352
+ "type": "textarea", // textarea input type, read only
353
+ "label": "View Code",
354
+ "property": "viewCode"
355
+ },
356
+ {
357
+ "type": "boolean", // boolean 0|1 (no|yes)
358
+ "label": "View Code",
359
+ "property": "viewCode"
360
+ },
361
+ {
362
+ "type" : "callback", // return selected row object
363
+ "label": "View Code",
364
+ "property" : "bodyId",
365
+ "key" : "download/upload/trigger" // Key name for specific action
366
+ },
367
+ {
368
+ "type": "concat",
369
+ "label": "View Code",
370
+ "propertyList": [
371
+ {
372
+ "property": "viewCode",
373
+ "prefix": "",
374
+ "suffix": " + "
375
+ },
376
+ {
377
+ "property": "viewCode",
378
+ "prefix": "RT: ",
379
+ "suffix": ""
380
+ }
381
+ ]
382
+ },
383
+ {
384
+ "type" : "switch", // switch case condition
385
+ "case" : [ // list of case
386
+ {
387
+ "conditions" : [ // list of conditions
388
+ {
389
+ "isUser": true,
390
+ "property" : "isActive", // property for condition checking
391
+ "value" : "0", // value to check (IN or NIN list/[])
392
+ "restriction" : "EQ" // condition restrictions (EQ, NEQ, GT, GTE, LT, LTE, IN, NIN | default EQ) *optional
393
+ },
394
+ {
395
+ "property" : "type",
396
+ "value" : "EXE",
397
+ "restriction" : "EQ"
398
+ }
399
+ ],
400
+ "result" : { // result of this case
401
+ "type": "url", // redirect path action
402
+ "label": "View Code",
403
+ "path" : "/test/paging",
404
+ "icon" : "ft-edit-2", // set class icon from feather icon
405
+ "param" : [
406
+ {
407
+ "type" : "refBodyId",
408
+ "property" : "refBodyId"
409
+ }
410
+ ],
411
+ "hideIfEmpty" : true // if one property yield empty value, label will also hide *optional, boolean
412
+ },
413
+ "result" : { // result of this case
414
+ "type": "callback", // return selected row object"label": "View Code",
415
+ "label": "View Code",
416
+ "icon" : "ft-edit-2"
417
+ },
418
+ "result" : { // result of this case
419
+ "type": "text", // type like bodyList : text,decimal,date,link,boolean
420
+ "label": "View Code",
421
+ "property" : "bodyId"
422
+ },
423
+ "result" : {
424
+ "type": "concat",
425
+ "label": "View Code",
426
+ "propertyList": [
427
+ {
428
+ "property": "viewCode",
429
+ "prefix": "",
430
+ "suffix": " + "
431
+ },
432
+ {
433
+ "property": "viewCode",
434
+ "prefix": "RT: ",
435
+ "suffix": ""
436
+ }
437
+ ]
438
+ },
439
+ "isHide" : true // hide icon if condition true, MUST *boolean
440
+ }
441
+ ]
442
+ }
443
+ ],
444
+ "gridViews": [
445
+ {
446
+ "getData": {
447
+ "environment": "", // refer to listEnvironment
448
+ "apiPath": "", // only path API get data
449
+ "customObjName": "ReturnObject", // / CustomObjName variable *Default: "ReturnObject"
450
+ "reqObj": [
451
+ {
452
+ "propName": "", // Property name for request payload
453
+ "propValue": "" // Property value for request payload
454
+ }
455
+ ]
456
+ },
457
+ "tableInput": { // same as ucgridview setting
458
+ "isSeq": false, // show numbering on the left side of table
459
+ "headerList": {}, // same as ucgridview setting
460
+ "bodyList": {} // same as ucgridview setting
461
+ }
462
+ }
463
+ ]
464
+ }
465
+ ],
466
+ "querystring": {
467
+ "select": "", // ex: "SELECT OFFICE_NAME AS OfficeName,IS_ACTIVE AS IsActive" *must use alias
468
+ "from": "", // ex: "FROM REF_OFFICE WITH(NOLOCK)"
469
+ "where": "" // ex: "WHERE REF_OFFICE_ID = {0} OR OFFICE_CODE = N'{1}'" *where condition sequence, with value from queryParam sequence
470
+ }
471
+ }
472
+ ```
473
+
474
+ ## Code scaffolding
475
+
476
+ Run `ng generate component component-name --project ucviewgeneric` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ucviewgeneric`.
477
+ > Note: Don't forget to add `--project ucviewgeneric` or else it will be added to the default project in your `angular.json` file.
478
+
479
+ ## Build
480
+
481
+ Run `ng build ucviewgeneric` to build the project. The build artifacts will be stored in the `dist/` directory.
482
+
483
+ ## Publishing
484
+
485
+ After building your library with `ng build ucviewgeneric`, go to the dist folder `cd dist/ucviewgeneric` and run `npm publish`.
486
+
487
+ ## Running unit tests
488
+
489
+ Run `ng test ucviewgeneric` to execute the unit tests via [Karma](https://karma-runner.github.io).
490
+
491
+ ## Further help
492
+
493
+ To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).