[TikiWiki-commits] [Git][tikiwiki/tiki][master] [REF] Move FieldsLinker to the new build system.

Benoit Grégoire (@benoitg) via TikiWiki-cvs <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <68b71a11dfdab_2cdcdfc4435e@gitlab-sidekiq-low-urgency-cpu-bound-v2-6c8b87f786-r7w9k.mail>

Benoit Grégoire pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
40ee6cbb by Yves Ngalamulume at 2025-09-02T16:15:31+00:00
[REF] Move FieldsLinker to the new build system.
---
* [FIX] Resolve conflict in composer.lock

* [FIX] Resolve conflict in composer.lock

* [FIX] Resolve conflict in composer.lock

* [FIX] Simplified tracker selection logic in replace_account template

* [FIX] Updated dependencies and fixed references in composer.lock

* [FIX] Removed package verification and updated references in MailIn controller

* [FIX] Updated dependencies and fixed references in composer.lock

* [FIX] Updated dependencies and fixed references in composer.lock

* [FIX, ENH] api: Fix the "Content Authentication" form on Admin Content Sources
---
* [FIX] api: Fix the "Content Authentication" form on Admin Content Sources (tiki-admin_dsn.php) so it shows what's being saved properly - note you need to not set a user here for tiki-admin_sync.php to work.

* [FIX] wikiplugin_tracker: Allow not having a preview button

See merge request tikiwiki/tiki!8451

See merge request tikiwiki/tiki!8188

- - - - -


10 changed files:

- lib/core/Services/MailIn/Controller.php
- lib/mailin/mailinlib.php
- package-lock.json
- path_js_importmap_generator.php
- src/js/common-externals/package.json
- src/js/vite.config.mjs
- templates/mailin/replace_account.tpl
- tiki-admin_mailin.php
- vendor_bundled/composer.json
- vendor_bundled/composer.lock


Changes:

=====================================
lib/core/Services/MailIn/Controller.php
=====================================
@@ -93,7 +93,6 @@ class Services_MailIn_Controller
                 'trackers' => $trackers,
                 'accountId' => $accountId,
                 'mailinTypes' => $mailinlib->list_available_types(),
-                'checkPackage' => $mailinlib->checkPackage(),
                 'info' => $info ?: [
                     'account' => '',
                     'username' => '',


=====================================
lib/mailin/mailinlib.php
=====================================
@@ -256,18 +256,4 @@ class MailinLib extends TikiDb_Bridge
         $plaintext = base64_decode($encoded);
         return $plaintext;
     }
-
-    /**
-     * checkPackage
-     *
-     * @return string
-     */
-    public function checkPackage()
-    {
-        $status = "n";
-        if (file_exists('vendor_bundled/vendor/philippemarcmeyer/fieldslinker/')) {
-            $status = "y";
-        }
-        return $status;
-    }
 }


=====================================
package-lock.json
=====================================
@@ -8113,6 +8113,13 @@
       "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==",
       "license": "MIT"
     },
+    "node_modules/fieldslinker": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/fieldslinker/-/fieldslinker-1.0.4.tgz",
+      "integrity": "sha512-wqY2dNK41OsRBI5o0SmTA5vNsS1EGJLl2n6/Hf3nDeHVP/dVSSp7/R8ceQ6RtyiC+phpXxMcyhYdN/TjuDrIHA==",
+      "dev": true,
+      "license": "MIT"
+    },
     "node_modules/figlet": {
       "version": "1.8.2",
       "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.8.2.tgz",
@@ -15997,6 +16004,7 @@
         "d3-milestones": "^1.5.0",
         "dompurify": "^2.3.3",
         "driver.js": "^1.3.1",
+        "fieldslinker": "^1.0.4",
         "fitvids": "^2.1.1",
         "html2canvas-pro": "^1.5.8",
         "interactjs": "^1.10",


=====================================
path_js_importmap_generator.php
=====================================
@@ -34,6 +34,7 @@ function generateJsImportmapScripts(bool $useBaseUrl = false)
                 "clipboard" => $tikiUrl . NODE_PUBLIC_DIST_PATH . "/clipboard/dist/clipboard.min.js",
                 "dompurify" => $tikiUrl . NODE_PUBLIC_DIST_PATH . "/dompurify/dist/purify.es.js",
                 "driver.js" => $tikiUrl . NODE_PUBLIC_DIST_PATH . "/driver.js/dist/driver.js.mjs",
+                "fieldslinker" => $tikiUrl . NODE_PUBLIC_DIST_PATH . "/fieldslinker/dist/fieldsLinker.js",
                 "jquery" => $tikiUrl . NODE_PUBLIC_DIST_PATH . "/jquery/dist/jquery.js",
                 // We can't add jquery-validation because it's not available as ESM
                 "moment" => $tikiUrl . NODE_PUBLIC_DIST_PATH . "/moment/dist/moment.js",


=====================================
src/js/common-externals/package.json
=====================================
@@ -23,6 +23,7 @@
     "d3-milestones": "^1.5.0",
     "dompurify": "^2.3.3",
     "driver.js": "^1.3.1",
+    "fieldslinker": "^1.0.4",
     "fitvids": "^2.1.1",
     "html2canvas-pro": "^1.5.8",
     "interactjs": "^1.10",


=====================================
src/js/vite.config.mjs
=====================================
@@ -444,6 +444,10 @@ export default defineConfig(({ command, mode }) => {
                         src: "node_modules/fitvids/dist/fitvids.js",
                         dest: "vendor_dist/fitvids/dist",
                     },
+                    {
+                        src: ["node_modules/fieldslinker/fieldsLinker.css", "node_modules/fieldslinker/fieldsLinker.js"],
+                        dest: "vendor_dist/fieldslinker",
+                    },
                     {
                         src: ["node_modules/glightbox/dist/css/glightbox.min.css"],
                         dest: "vendor_dist/glightbox/dist",


=====================================
templates/mailin/replace_account.tpl
=====================================
@@ -9,7 +9,6 @@
         {ticket mode=confirm}
         <input type="hidden" name="accountId" value="{$accountId|escape}">
         <input type="hidden" name="preferences" value="{$info.preferences|escape}">
-        <input type="hidden" id="checkPackage" value="{$checkPackage|escape}">
         <input type="hidden" name="trackerAcc" id="trackerAcc" value="{$info.trackerId|escape}">
         <div class="mb-3 row">
             <div class="offset-md-3 col-md-9">
@@ -119,17 +118,9 @@
                 <div class="col-md-9">
                     <select name="trackerId" id="trackerId" class="form-select">
                         <option value="">{tr}None{/tr}</option>
-                        {if $checkPackage eq 'y'}
-                            {foreach $trackers as $key => $tracker}
-                                <option value="{$key}" {if $key eq $info.trackerId}selected="selected"{/if}>{$tracker}</option>
-                            {/foreach}
-                        {else}
-                            {foreach $trackers as $key => $tracker}
-                                {if $key eq $info.trackerId}
-                                    <option value="{$key}" selected="selected">{$tracker}</option>
-                                {/if}
-                            {/foreach}
-                        {/if}
+                        {foreach $trackers as $key => $tracker}
+                            <option value="{$key}" {if $key eq $info.trackerId}selected="selected"{/if}>{$tracker}</option>
+                        {/foreach}
                     </select>
                     <div class="form-text">
                         <a href="tiki-list_trackers.php" target="_blank" class="link">{tr}View trackers{/tr}</a>
@@ -333,7 +324,6 @@
         $("#zone_fields").hide();
         var trackerId = document.getElementById("trackerId");
         var trackerAcc = document.getElementById("trackerAcc").value;
-        var checkPackage = document.getElementById("checkPackage").value;
         if (trackerId.value != trackerAcc) {
             $('input[name=preferences]').val('');
         }
@@ -341,7 +331,7 @@
             links = $('input[name=preferences]').val();
         }
         trackerId.addEventListener("change", function() {
-            if (trackerId.value != '' && checkPackage == 'y') {
+            if (trackerId.value != '') {
                 if (trackerId.value == trackerAcc) {
                     $('input[name=preferences]').val(links);
                 }
@@ -356,7 +346,7 @@
             }
         });
 
-        if (trackerId.value != '' && checkPackage == 'y') {
+        if (trackerId.value != '') {
             getFields(trackerId.value);
         }
 


=====================================
tiki-admin_mailin.php
=====================================
@@ -53,19 +53,12 @@ $trklib = TikiLib::lib('trk');
 
 $smarty->assign('mailin_types', $mailinlib->list_available_types());
 // check package availability
-$checkPackage = $mailinlib->checkPackage();
-if ($checkPackage == 'y') {
-    $headerlib->add_cssfile('vendor_bundled/vendor/philippemarcmeyer/fieldslinker/fieldsLinker.css');
-    $headerlib->add_jsfile('vendor_bundled/vendor/philippemarcmeyer/fieldslinker/fieldsLinker.js', true);
-    $headerlib->add_css('#original {width: 100%;}');
-} else {
-    $message = $errorMessageToAppend;
-    $message .= tr('To use Fieldslinker Tiki needs the philippemarcmeyer/fieldslinker package. If you do not have permission to install this package, ask the site administrator.');
-    Feedback::warning(tra($message));
-}
+
+$headerlib->add_cssfile(NODE_PUBLIC_DIST_PATH . '/fieldslinker/dist/fieldsLinker.css');
+$headerlib->add_jsfile(NODE_PUBLIC_DIST_PATH . '/fieldslinker/dist/fieldsLinker.js', true);
+$headerlib->add_css('#original {width: 100%;}');
 
 $smarty->assign('mailin_types', $mailinlib->list_available_types());
-$smarty->assign('checkPackage', $checkPackage);
 
 // disallow robots to index page:
 $smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW');


=====================================
vendor_bundled/composer.json
=====================================
@@ -164,9 +164,6 @@
         "     - nicolaskruchten/pivottable",
         "       - Reasons: Unmaintained and we have patches, by the time we need to move all js out of documentroot, the situation is likely to have changes - benoitg - 2025-08-28 ",   
         "",
-        "     - 'philippemarcmeyer/fieldslinker': '~1.0'",
-        "        - Reasons: Waiting for https://gitlab.com/tikiwiki/tiki/-/merge_requests/8188/",
-        "",
         "     - 'robicch/jquery-gantt': '~6.3'",
         "        - Reasons: Not available on NPM: https://github.com/robicch/jQueryGantt/issues/115",
         "",
@@ -250,7 +247,6 @@
         "pear/pear": "~1.10",
         "pear/text_wiki_mediawiki": "0.2.0",
         "pear/xml_parser": "~1.3",
-        "philippemarcmeyer/fieldslinker": "~1.0",
         "phpseclib/phpseclib": "~3.0",
         "phpxmlrpc/phpxmlrpc": "~4.11",
         "pragmarx/google2fa": "~8.0",


=====================================
vendor_bundled/composer.lock
=====================================
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "52e7003a30ba3fafd32504a5daf75c87",
+    "content-hash": "b82f3cb47cf759c8510f174c6dc01c67",
     "packages": [
         {
             "name": "amphp/amp",
@@ -2867,12 +2867,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/cypht-org/cypht.git",
-                "reference": "ba3508604626b7c244e6de556ad924ee426b5d73"
+                "reference": "1d8aa908f68d477b61cb3350aad93bc8873d0e65"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/cypht-org/cypht/zipball/ba3508604626b7c244e6de556ad924ee426b5d73",
-                "reference": "ba3508604626b7c244e6de556ad924ee426b5d73",
+                "url": "https://api.github.com/repos/cypht-org/cypht/zipball/1d8aa908f68d477b61cb3350aad93bc8873d0e65",
+                "reference": "1d8aa908f68d477b61cb3350aad93bc8873d0e65",
                 "shasum": ""
             },
             "require": {
@@ -2948,7 +2948,7 @@
                 "source": "https://github.com/cypht-org/cypht/",
                 "wiki": "https://github.com/cypht-org/cypht/wiki"
             },
-            "time": "2025-09-01T08:08:16+00:00"
+            "time": "2025-08-29T14:45:09+00:00"
         },
         {
             "name": "jean85/pretty-package-versions",
@@ -7537,49 +7537,6 @@
             },
             "time": "2020-04-19T15:08:27+00:00"
         },
-        {
-            "name": "philippemarcmeyer/fieldslinker",
-            "version": "v1.0.3",
-            "source": {
-                "type": "git",
-                "url": "https://github.com/PhilippeMarcMeyer/FieldsLinker.git",
-                "reference": "e9371bb0dc5658c6c5640e3b62c66af8eb562900"
-            },
-            "dist": {
-                "type": "zip",
-                "url": "https://api.github.com/repos/PhilippeMarcMeyer/FieldsLinker/zipball/e9371bb0dc5658c6c5640e3b62c66af8eb562900",
-                "reference": "e9371bb0dc5658c6c5640e3b62c66af8eb562900",
-                "shasum": ""
-            },
-            "type": "library",
-            "notification-url": "https://packagist.org/downloads/",
-            "license": [
-                "MIT"
-            ],
-            "authors": [
-                {
-                    "name": "Phillipe Marc Mayer",
-                    "email": "[email protected]",
-                    "homepage": "https://philippemarcmeyer.github.io",
-                    "role": "Maintainer"
-                }
-            ],
-            "description": "Designed for matching files headers to database fields during the process importing. Allows drawing links between elements of 2 lists.",
-            "keywords": [
-                "canvas",
-                "jquery",
-                "jquery-plugin",
-                "lines",
-                "list",
-                "plugins"
-            ],
-            "support": {
-                "docs": "https://github.com/PhilippeMarcMeyer/FieldsLinker",
-                "issues": "https://github.com/PhilippeMarcMeyer/FieldsLinker/issues",
-                "source": "https://github.com/PhilippeMarcMeyer/FieldsLinker"
-            },
-            "time": "2021-08-16T12:58:49+00:00"
-        },
         {
             "name": "php-di/invoker",
             "version": "2.3.7",



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/40ee6cbb432b2b8003b1d0fdee15939bd0ac2d16

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/40ee6cbb432b2b8003b1d0fdee15939bd0ac2d16
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.