@adins/ucviewgeneric 4.0.0-research.5 → 4.0.0-research.6

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