@balkangraph/orgchart.js 8.14.122 → 8.14.124

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/orgchart.d.ts CHANGED
@@ -155,12 +155,14 @@ declare class OrgChart {
155
155
 
156
156
  /**
157
157
  * Removes an event listener previously registered. The event listener to be removed is identified using a combination of the event type and the event listener function itself. Returns true if success and false if fail.
158
+ * ```typescript
158
159
  * let chart = new OrgChart('#tree', {});
159
160
  * let listener = function(sender, args){
160
161
  * console.log(sender.removeListener('update', listener));
161
162
  * };
162
163
  * chart.on('update', listener);
163
164
  * chart.load(nodes)
165
+ * ```
164
166
  };
165
167
 
166
168
  family.on('update', listener);
@@ -2373,34 +2375,233 @@ declare namespace OrgChart {
2373
2375
 
2374
2376
  interface template
2375
2377
  {
2378
+ /**
2379
+ * SVG <defs?> of the template
2380
+ * ```typescript
2381
+ * OrgChart.templates.rony.defs =
2382
+ * `<filter id="{randId}" x="0" y="0" width="200%" height="200%">
2383
+ * <feOffset result="offOut" in="SourceAlpha" dx="5" dy="5"></feOffset>
2384
+ * <feGaussianBlur result="blurOut" in="offOut" stdDeviation="5"></feGaussianBlur>
2385
+ * <feBlend in="SourceGraphic" in2="blurOut" mode="normal"></feBlend>
2386
+ * </filter>`;
2387
+ * ```
2388
+ */
2376
2389
  defs?: string,
2390
+
2391
+ /**
2392
+ * Size of the template
2393
+ * ```typescript
2394
+ * OrgChart.templates.myTemplate.size = [200, 100];
2395
+ * ```
2396
+ */
2377
2397
  size?: Array<number>,
2398
+
2399
+ /**
2400
+ * Size of the expandCollapse button
2401
+ * ```typescript
2402
+ * OrgChart.templates.myTemplate.expandCollapseSize = 30;
2403
+ * ```
2404
+ */
2378
2405
  expandCollapseSize?: number,
2406
+
2407
+ /**
2408
+ * Adjust link positions
2409
+ * ```typescript
2410
+ * OrgChart.templates.myTemplate.linkAdjuster = {
2411
+ * fromX: 0,
2412
+ * fromY: -10,
2413
+ * toX: 0,
2414
+ * toY: 0
2415
+ * }
2416
+ * ```
2417
+ */
2379
2418
  linkAdjuster?: {
2380
2419
  fromX?: number,
2381
2420
  fromY?: number,
2382
2421
  toX?: number,
2383
2422
  toY?: number
2384
2423
  },
2424
+
2425
+ /**
2426
+ * Ripple
2427
+ * ```typescript
2428
+ * OrgChart.templates.myTemplate.ripple =
2429
+ * radius: 100,
2430
+ * color: "#e6e6e6",
2431
+ * rect: null
2432
+ * }
2433
+ * ```
2434
+ */
2385
2435
  ripple?: {
2386
2436
  radius?: number,
2387
2437
  color?: string,
2388
2438
  rect?: Array<number>
2389
2439
  },
2440
+
2441
+ /**
2442
+ * Assistance link
2443
+ * ```typescript
2444
+ * OrgChart.templates.ana.assistanseLink =
2445
+ * `<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="2px" fill="none"
2446
+ * d="M{xa},{ya} {xb},{yb} {xc},{yc} {xd},{yd} L{xe},{ye}" />`;
2447
+ * }
2448
+ * ```
2449
+ */
2390
2450
  assistanseLink?: string,
2451
+
2452
+ /**
2453
+ * Assistance link
2454
+ * ```typescript
2455
+ * OrgChart.templates.ana.svg =
2456
+ * `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
2457
+ * style="display:block;" width="{w}" height="{h}" viewBox="{viewBox}">{content}
2458
+ * </svg>`;
2459
+ * ```
2460
+ */
2391
2461
  svg?: string,
2462
+
2463
+ /**
2464
+ * Link
2465
+ * ```typescript
2466
+ * OrgChart.templates.ana.link =
2467
+ * `<path stroke-linejoin="round" stroke="#aeaeae" stroke-width="1px" fill="none" d="{rounded}" />`;
2468
+ * ```
2469
+ */
2392
2470
  link?: string,
2471
+
2472
+ /**
2473
+ * Pointer
2474
+ * ```typescript
2475
+ * OrgChart.templates.ana.pointer =
2476
+ * `<g data-pointer="pointer" transform="matrix(0,0,0,0,100,100)">
2477
+ * <radialGradient id="pointerGradient">
2478
+ * <stop stop-color="#ffffff" offset="0" />
2479
+ * <stop stop-color="#C1C1C1" offset="1" />
2480
+ * </radialGradient>
2481
+ * <circle cx="16" cy="16" r="16" stroke-width="1" stroke="#acacac" fill="url(#pointerGradient)"></circle>
2482
+ * </g>`;
2483
+ * ```
2484
+ */
2393
2485
  pointer?: string,
2486
+
2487
+ /**
2488
+ * Node
2489
+ * ```typescript
2490
+ * OrgChart.templates.ana.node =
2491
+ * `<rect x="0" y="0" height="{h}" width="{w}" fill="#039BE5" stroke-width="1" stroke="#aeaeae" rx="7" ry="7"></rect>`;
2492
+ * ```
2493
+ */
2394
2494
  node?: string,
2495
+
2496
+ /**
2497
+ * Plus/expand button
2498
+ * ```typescript
2499
+ * OrgChart.templates.ana.plus =
2500
+ * `<circle cx="15" cy="15" r="15" fill="#ffffff" stroke="#aeaeae" stroke-width="1"></circle>
2501
+ * <line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#aeaeae"></line>
2502
+ * <line x1="15" y1="4" x2="15" y2="26" stroke-width="1" stroke="#aeaeae"></line>`;
2503
+ * ```
2504
+ */
2395
2505
  plus?: string,
2506
+
2507
+ /**
2508
+ * Minus/collapse button
2509
+ * ```typescript
2510
+ * OrgChart.templates.ana.minus =
2511
+ * `<circle cx="15" cy="15" r="15" fill="#ffffff" stroke="#aeaeae" stroke-width="1"></circle>
2512
+ * <line x1="4" y1="15" x2="26" y2="15" stroke-width="1" stroke="#aeaeae"></line>`;
2513
+ * ```
2514
+ */
2396
2515
  minus?: string,
2516
+
2517
+ /**
2518
+ * Node menu button
2519
+ * ```typescript
2520
+ * OrgChart.templates.ana.nodeMenuButton =
2521
+ * `<g style="cursor:pointer;" transform="matrix(1,0,0,1,225,105)" data-ctrl-n-menu-id="{id}">
2522
+ * <rect x="-4" y="-10" fill="#000000" fill-opacity="0" width="22" height="22"></rect>
2523
+ * <circle cx="0" cy="0" r="2" fill="#ffffff"></circle>
2524
+ * <circle cx="7" cy="0" r="2" fill="#ffffff"></circle><circle cx="14" cy="0" r="2" fill="#ffffff"></circle>
2525
+ * </g>`;
2526
+ * ```
2527
+ */
2397
2528
  nodeMenuButton?: string,
2529
+
2530
+ /**
2531
+ * Menu button
2532
+ * ```typescript
2533
+ * OrgChart.templates.ana.menuButton =
2534
+ * `<div style="position:absolute;right:{p}px;top:{p}px; width:40px;height:50px;cursor:pointer;" data-ctrl-menu="">
2535
+ * <hr style="background-color: #7A7A7A; height: 3px; border: none;">
2536
+ * <hr style="background-color: #7A7A7A; height: 3px; border: none;">
2537
+ * <hr style="background-color: #7A7A7A; height: 3px; border: none;">
2538
+ * </div>`;
2539
+ * ```
2540
+ */
2398
2541
  menuButton?: string,
2542
+
2543
+ /**
2544
+ * Node image
2545
+ * ```typescript
2546
+ * OrgChart.templates.ana.img_0 =
2547
+ * `<clipPath id="{randId}"><circle cx="50" cy="30" r="40"></circle></clipPath>
2548
+ * <image preserveAspectRatio="xMidYMid slice" clip-path="url(#{randId})" xlink:href="{val}" x="10" y="-10" width="80" height="80">
2549
+ * </image>`;
2550
+ * ```
2551
+ */
2399
2552
  img_0?: string,
2553
+
2554
+ /**
2555
+ * Link label
2556
+ * ```typescript
2557
+ * OrgChart.templates.ana.link_field_0 =
2558
+ * `<text text-anchor="middle" fill="#aeaeae" data-width="290" x="0" y="0" style="font-size:10px;">{val}</text>`;
2559
+ * ```
2560
+ */
2400
2561
  link_field_0?: string,
2562
+
2563
+ /**
2564
+ * Edit form header color
2565
+ * ```typescript
2566
+ * OrgChart.templates.ana.editFormHeaderColor = '#039BE5'
2567
+ * ```
2568
+ */
2401
2569
  editFormHeaderColor?: string,
2570
+
2571
+ /**
2572
+ * EMode circle menu button
2573
+ * ```typescript
2574
+ * OrgChart.templates.ana.nodeCircleMenuButton = {
2575
+ * radius: 18,
2576
+ * x: 250,
2577
+ * y: 60,
2578
+ * color: '#fff',
2579
+ * stroke: '#aeaeae'
2580
+ * }
2581
+ * ```
2582
+ */
2402
2583
  nodeCircleMenuButton?: object,
2584
+
2585
+ /**
2586
+ * Minimized template
2587
+ * ```typescript
2588
+ * OrgChart.templates.ana.min = Object.assign({}, OrgChart.templates.ana);
2589
+ * OrgChart.templates.ana.min.size = [250, 60];
2590
+ * OrgChart.templates.ana.min.img_0 = "";
2591
+ * OrgChart.templates.ana.min.field_0 =
2592
+ * `<text data-width="230" style="font-size: 18px;" fill="#ffffff" x="125" y="40" text-anchor="middle">{val}</text>`;
2593
+ * OrgChart.templates.ana.min.field_1 = "";
2594
+ * ```
2595
+ */
2403
2596
  min?: template,
2597
+
2598
+ /**
2599
+ * A field
2600
+ * ```typescript
2601
+ * OrgChart.templates.orgTemplate.number =
2602
+ * `<text width="230" style="font-size: 11px;" fill="#64696b" x="150" y="53" text-anchor="start">{val}</text>`;
2603
+ * ```
2604
+ */
2404
2605
  [name: string]: any
2405
2606
  }
2406
2607
 
@@ -3773,6 +3974,9 @@ declare namespace OrgChart {
3773
3974
  }
3774
3975
  }
3775
3976
 
3977
+ /**
3978
+ * @ignore
3979
+ */
3776
3980
  var ui: {
3777
3981
  defs(fromrender: string): string;
3778
3982
  lonely(config: Object): string;
@@ -3786,5 +3990,8 @@ declare namespace OrgChart {
3786
3990
 
3787
3991
  };
3788
3992
 
3993
+ /**
3994
+ * @ignore
3995
+ */
3789
3996
  var t: any;
3790
3997
  }export default OrgChart