Plugin Directory

Changeset 3831645


Ignore:
Timestamp:
11/28/2026 02:59:13 PM (less than one hour ago)
Author:
fflmonkey
Message:

Release 0.22.0

Location:
fflmonkey-data-feed-for-woocommerce/trunk
Files:
4 added
3 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • fflmonkey-data-feed-for-woocommerce/trunk/assets/dist/.vite/manifest.json

    r3821524 r3831645  
    11{
    22  "../../node_modules/@fflmonkey/portal-sdk/packages/react/src/i18n/es/index.ts": {
    3     "file": "chunks/index-t0SUyXi6.js",
     3    "file": "chunks/index-B5YqL-GB.js",
    44    "name": "index",
    55    "src": "../../node_modules/@fflmonkey/portal-sdk/packages/react/src/i18n/es/index.ts",
    … …  
    1313  },
    1414  "../../node_modules/@fflmonkey/portal-sdk/packages/react/src/pages/inventory/page.tsx": {
    15     "file": "chunks/page-YUlGlIbV.js",
     15    "file": "chunks/page-D2jIM2Pk.js",
    1616    "name": "page",
    1717    "src": "../../node_modules/@fflmonkey/portal-sdk/packages/react/src/pages/inventory/page.tsx",
    … …  
    3737  },
    3838  "portal.ts": {
    39     "file": "portal-BaNVFem5.js",
     39    "file": "portal-BTi-avaI.js",
    4040    "name": "portal",
    4141    "src": "portal.ts",
  • fflmonkey-data-feed-for-woocommerce/trunk/assets/dist/build.json

    r3821524 r3831645  
    22  "mode": "registry",
    33  "path": null,
    4   "portal": "0.20.0"
     4  "portal": "0.21.0"
    55}
  • fflmonkey-data-feed-for-woocommerce/trunk/fflmonkey-data-feed-for-woocommerce.php

    r3831436 r3831645  
    55 * Plugin URI:        https://fflmonkey.com/products/data-feed
    66 * Description:       Sell RSR Group, Lipsey's, Sports South, Davidson's, Chattanooga, Zanders and more from your store, at your prices, with live stock and images, through your own dealer accounts.
    7  * Version:           0.21.0
     7 * Version:           0.22.0
    88 * Requires at least: 6.8
    99 * Requires PHP:      7.2
    … …  
    3636}
    3737
    38 const VERSION     = '0.21.0';
     38const VERSION     = '0.22.0';
    3939const PLUGIN_FILE = __FILE__;
    4040
  • fflmonkey-data-feed-for-woocommerce/trunk/readme.txt

    r3831436 r3831645  
    55Tested up to: 7.1
    66Requires PHP: 7.2
    7 Stable tag: 0.21.0
     7Stable tag: 0.22.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    230230
    231231== Changelog ==
     232
     233= 0.22.0 =
     234* On the Distributors screen, a distributor that needs no login of your own, such as Countrywide Sports and CWS Guns, connects with its Connect button alone, with nothing to type.
    232235
    233236= 0.21.0 =
  • fflmonkey-data-feed-for-woocommerce/trunk/source/portal-sdk/README.txt

    r3821524 r3831645  
    11Source of the merchant's screens, assets/dist/portal-<hash>.js and its chunks
    22
    3 This is the TypeScript source of @fflmonkey/portal-sdk 0.20.0, the version
     3This is the TypeScript source of @fflmonkey/portal-sdk 0.21.0, the version
    44this release was compiled from. It is distributed as part of this plugin under
    55the plugin's licence, GPLv2 or later (see LICENSE at the plugin root).
  • fflmonkey-data-feed-for-woocommerce/trunk/source/portal-sdk/packages/core/src/version.ts

    r3821524 r3831645  
    2222
    2323/** The package's version, sent on every request as `X-FFL-Portal-Client`. A test holds it equal to package.json's. */
    24 export const PORTAL_SDK_VERSION = '0.20.0';
     24export const PORTAL_SDK_VERSION = '0.21.0';
  • fflmonkey-data-feed-for-woocommerce/trunk/source/portal-sdk/packages/react/src/i18n/es/distributors.ts

    r3784373 r3831645  
    2929    "Connected to {name}": "Conectado a {name}",
    3030    "Connecting": "Conectando",
     31    "Connecting…": "Conectando…",
    3132    "Could not connect.": "No se pudo conectar.",
    3233    "Disconnect {name}": "Desconectar {name}",
    … …  
    5253    "Not verified": "Sin verificar",
    5354    "Products only {name} carries are set to draft in your store, not deleted, and come back if you connect it again. The account details you saved for {name} are deleted.": "Los productos que solo ofrece {name} pasan a borrador en tu tienda, no se eliminan, y vuelven si lo conectas de nuevo. Los datos de cuenta que guardaste para {name} se eliminan.",
     55    "Products only {name} carries are set to draft on your website, not deleted, and come back if you connect it again.": "Los productos que solo ofrece {name} pasan a borrador en tu sitio web, no se eliminan, y vuelven si lo conectas de nuevo.",
    5456    "Replace the {name} login we hold for your store.": "Sustituye el acceso de {name} que guardamos para tu tienda.",
    5557    "Saved for {name}": "Guardado para {name}",
  • fflmonkey-data-feed-for-woocommerce/trunk/source/portal-sdk/packages/react/src/i18n/es/fastbound.ts

    r3821524 r3831645  
    4343    "Connect your FastBound account": "Conecta tu cuenta de FastBound",
    4444    "Connected.": "Conectado.",
    45     "Connecting…": "Conectando…",
    4645    "Counted by UPC": "Contadas por UPC",
    4746    "Data Feed active on this website.": "Data Feed activo en este sitio web.",
  • fflmonkey-data-feed-for-woocommerce/trunk/source/portal-sdk/packages/react/src/pages/distributors/api.ts

    r3764814 r3831645  
    3636    /** What this distributor calls its credentials, declared by its adapter; empty when it declares none. */
    3737    credential_fields: CredentialFieldDto[];
     38    /** False for a distributor connected with nothing to type; an older backend does not send it. */
     39    needs_credentials?: boolean;
    3840    /** The last hourly probe of the distributor with our own credentials; null if never probed. */
    3941    health: { ok: boolean; status: string; checked_at: string } | null;
  • fflmonkey-data-feed-for-woocommerce/trunk/source/portal-sdk/packages/react/src/pages/distributors/connection-status.tsx

    r3774028 r3831645  
    2525
    2626/** The pill's props. */
    27 type ConnectionStatusPillProps = { isSelected: boolean; account: DistributorAccountRow | null };
     27type ConnectionStatusPillProps = { isSelected: boolean; account: DistributorAccountRow | null; needsCredentials?: boolean };
    2828
    2929/**
    3030 * A row's connection status: a coloured dot and words.
    3131 *
    32  * @param props            The pill's props.
    33  * @param props.isSelected Whether the licence has the distributor selected.
    34  * @param props.account    The stored account, or null.
     32 * @param props                  The pill's props.
     33 * @param props.isSelected       Whether the licence has the distributor selected.
     34 * @param props.account          The stored account, or null.
     35 * @param props.needsCredentials Whether the distributor is connected with credentials.
    3536 * @returns The status.
    3637 */
    37 export function ConnectionStatusPill({ isSelected, account }: ConnectionStatusPillProps) {
    38     const status = connectionStatusOf(isSelected, account);
     38export function ConnectionStatusPill({ isSelected, account, needsCredentials = true }: ConnectionStatusPillProps) {
     39    const status = connectionStatusOf(isSelected, account, needsCredentials);
    3940
    4041    return (
  • fflmonkey-data-feed-for-woocommerce/trunk/source/portal-sdk/packages/react/src/pages/distributors/distributors-board-view.tsx

    r3764814 r3831645  
    100100                                </td>
    101101                                <td>
    102                                     <ConnectionStatusPill isSelected={row.isSelected} account={row.account} />
     102                                    <ConnectionStatusPill isSelected={row.isSelected} account={row.account} needsCredentials={row.needsCredentials} />
    103103                                </td>
    104104                                <td className="actions-col">
    … …  
    108108                                        hasAccount={row.account !== null}
    109109                                        isBusy={row.isBusy}
     110                                        needsCredentials={row.needsCredentials}
     111                                        isConnecting={row.isConnecting}
    110112                                        onConnect={() => board.onConnect(row.distributor.slug)}
    111113                                        onDisconnect={() => board.onDisconnect(row.distributor.slug)}
  • fflmonkey-data-feed-for-woocommerce/trunk/source/portal-sdk/packages/react/src/pages/distributors/distributors-model.ts

    r3764814 r3831645  
    104104 * The confirmation shown before a distributor is disconnected.
    105105 *
    106  * @param name The distributor's name.
     106 * @param name             The distributor's name.
     107 * @param needsCredentials Whether account details were saved to connect it.
    107108 * @returns The question.
    108109 */
    109 export function disconnectQuestion(name: string): DisconnectQuestion {
     110export function disconnectQuestion(name: string, needsCredentials = true): DisconnectQuestion {
    110111    return {
    111112        title: t('Disconnect {name}?', { name }),
    112         body: t('Products only {name} carries are set to draft in your store, not deleted, and come back if you connect it again. The account details you saved for {name} are deleted.', { name }),
     113        body: needsCredentials
     114            ? t('Products only {name} carries are set to draft in your store, not deleted, and come back if you connect it again. The account details you saved for {name} are deleted.', { name })
     115            : t('Products only {name} carries are set to draft on your website, not deleted, and come back if you connect it again.', { name }),
    113116        confirmLabel: t('Disconnect'),
    114117        destructive: true,
    … …  
    117120
    118121/**
     122 * Whether a merchant types anything to connect a distributor.
     123 *
     124 * @param distributor The distributor.
     125 * @returns False only when the backend says it needs no credentials.
     126 */
     127export function distributorNeedsCredentials(distributor: DistributorRow): boolean {
     128    return distributor.needs_credentials !== false;
     129}
     130
     131/**
    119132 * A row's connection status.
    120133 *
    121  * @param isSelected Whether the licence has the distributor selected.
    122  * @param account    The stored account, or null.
     134 * @param isSelected       Whether the licence has the distributor selected.
     135 * @param account          The stored account, or null.
     136 * @param needsCredentials Whether the distributor is connected with credentials.
    123137 * @returns The pill's tone and text.
    124138 */
    125 export function connectionStatusOf(isSelected: boolean, account: DistributorAccountRow | null): ConnectionStatus {
     139export function connectionStatusOf(isSelected: boolean, account: DistributorAccountRow | null, needsCredentials = true): ConnectionStatus {
    126140    if (!isSelected) {
    127141        return { tone: 'off', text: t('Not connected') };
     142    }
     143
     144    if (!needsCredentials) {
     145        return { tone: 'ok', text: t('Connected') };
    128146    }
    129147
  • fflmonkey-data-feed-for-woocommerce/trunk/source/portal-sdk/packages/react/src/pages/distributors/row-actions.tsx

    r3764814 r3831645  
    3030    hasAccount: boolean;
    3131    isBusy: boolean;
     32    needsCredentials?: boolean;
     33    isConnecting?: boolean;
    3234    onConnect: () => void;
    3335    onDisconnect: () => void;
    … …  
    3537
    3638/**
    37  * A row's controls: Connect or Update, and Disconnect once selected.
     39 * A row's controls: Connect or Update, and Disconnect once selected. A distributor that needs no credentials has nothing to update: Connect until it is on, then Disconnect.
    3840 *
    39  * @param props              The actions' props.
    40  * @param props.name         The distributor's name, for the accessible labels.
    41  * @param props.isSelected   Whether the licence has the distributor selected.
    42  * @param props.hasAccount   Whether a login is stored.
    43  * @param props.isBusy       Whether a disconnect is running.
    44  * @param props.onConnect    Opens the credentials dialog.
    45  * @param props.onDisconnect Asks to disconnect.
     41 * @param props                  The actions' props.
     42 * @param props.name             The distributor's name, for the accessible labels.
     43 * @param props.isSelected       Whether the licence has the distributor selected.
     44 * @param props.hasAccount       Whether a login is stored.
     45 * @param props.isBusy           Whether a disconnect is running.
     46 * @param props.needsCredentials Whether the distributor is connected with credentials.
     47 * @param props.isConnecting     Whether a connect without credentials is running.
     48 * @param props.onConnect        Opens the credentials dialog, or connects one that needs none.
     49 * @param props.onDisconnect     Asks to disconnect.
    4650 * @returns The buttons.
    4751 */
    48 export function RowActions({ name, isSelected, hasAccount, isBusy, onConnect, onDisconnect }: RowActionsProps) {
     52export function RowActions({ name, isSelected, hasAccount, isBusy, needsCredentials = true, isConnecting = false, onConnect, onDisconnect }: RowActionsProps) {
    4953    const isUpdating = isSelected && hasAccount;
     54    const showsConnect = needsCredentials || !isSelected;
    5055
    5156    return (
    5257        <div className="dist-actions">
    53             <button
    54                 type="button"
    55                 className={isUpdating ? 'dist-btn' : 'dist-btn dist-btn-connect'}
    56                 onClick={onConnect}
    57                 disabled={isBusy}
    58                 aria-label={`${isUpdating ? t('Update') : t('Connect')} ${name}`}
    59             >
    60                 <Icon name={isUpdating ? 'edit' : 'plug'} />
    61                 {isUpdating ? t('Update') : t('Connect')}
    62             </button>
     58            {showsConnect && (
     59                <button
     60                    type="button"
     61                    className={isUpdating && needsCredentials ? 'dist-btn' : 'dist-btn dist-btn-connect'}
     62                    onClick={onConnect}
     63                    disabled={isBusy || isConnecting}
     64                    aria-label={`${isUpdating && needsCredentials ? t('Update') : t('Connect')} ${name}`}
     65                >
     66                    {isConnecting ? <span className="dist-spinner" aria-hidden="true" /> : <Icon name={isUpdating && needsCredentials ? 'edit' : 'plug'} />}
     67                    {isConnecting ? t('Connecting…') : isUpdating && needsCredentials ? t('Update') : t('Connect')}
     68                </button>
     69            )}
    6370            {isSelected && (
    6471                <button
  • fflmonkey-data-feed-for-woocommerce/trunk/source/portal-sdk/packages/react/src/pages/distributors/use-distributors-board.ts

    r3784373 r3831645  
    3838    disconnectedMessage,
    3939    disconnectQuestion,
     40    distributorNeedsCredentials,
    4041    failureMessage,
    4142    visibleDistributors,
    4243    type ConnectPhase,
    4344} from './distributors-model';
     45import { useDistributorSwitch } from './use-distributor-switch';
    4446import { t } from '../../i18n/index';
    4547import { explainFailure } from '../../lib/request-failure';
    … …  
    5456    account: DistributorAccountRow | null;
    5557    isBusy: boolean;
     58    needsCredentials: boolean;
     59    isConnecting: boolean;
    5660};
    5761
    … …  
    8488
    8589/**
    86  * The Distributors board: the lists, the search, the credentials dialog and the two row actions. A connect clears the search it was submitted under.
     90 * The Distributors board: the lists, the search, the credentials dialog and the two row actions. A connect clears the search it was submitted under; a distributor that needs no credentials connects without the dialog.
    8791 *
    8892 * @returns The board's state and handlers.
    … …  
    9296    const accounts = useGetDistributorAccountsQuery();
    9397    const confirm = useConfirm();
     98    const distributorSwitch = useDistributorSwitch();
    9499
    95100    const [upsert, upsertState] = useUpsertDistributorAccountMutation();
    … …  
    148153    const disconnectRow = async (slug: string) => {
    149154        const name = nameOf(slug);
    150         const isConfirmed = await confirm(disconnectQuestion(name));
     155        const distributor = bySlug.get(slug);
     156        const isConfirmed = await confirm(disconnectQuestion(name, distributor ? distributorNeedsCredentials(distributor) : true));
    151157        if (!isConfirmed) return;
    152158
    … …  
    161167            setDisconnectingSlug(null);
    162168        }
     169    };
     170
     171    const connectRow = (slug: string) => {
     172        const distributor = bySlug.get(slug);
     173
     174        if (distributor && !distributorNeedsCredentials(distributor)) {
     175            distributorSwitch.switchOn(slug, distributor.name);
     176            return;
     177        }
     178
     179        openDialog(slug);
    163180    };
    164181
    … …  
    178195            account: accountBySlug.get(distributor.slug) ?? null,
    179196            isBusy: disconnectingSlug === distributor.slug,
     197            needsCredentials: distributorNeedsCredentials(distributor),
     198            isConnecting: distributorSwitch.connectingSlug === distributor.slug,
    180199        })),
    181200        dialog: {
    … …  
    188207            onSubmit: input => void submitCredentials(input),
    189208        },
    190         onConnect: slug => openDialog(slug),
     209        onConnect: slug => connectRow(slug),
    191210        onDisconnect: slug => void disconnectRow(slug),
    192211    };
  • fflmonkey-data-feed-for-woocommerce/trunk/vendor/composer/installed.php

    r3831436 r3831645  
    22    'root' => array(
    33        'name' => 'fflmonkey/wordpress-data-feed',
    4         'pretty_version' => 'v0.21.0',
    5         'version' => '0.21.0.0',
    6         'reference' => '99b4bab66505bae11f6f56391d5f4c263efd7484',
     4        'pretty_version' => 'v0.22.0',
     5        'version' => '0.22.0.0',
     6        'reference' => '3047c90834ae8f51dab18b612f9353c28cc80ddd',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
    … …  
    1212    'versions' => array(
    1313        'fflmonkey/wordpress-data-feed' => array(
    14             'pretty_version' => 'v0.21.0',
    15             'version' => '0.21.0.0',
    16             'reference' => '99b4bab66505bae11f6f56391d5f4c263efd7484',
     14            'pretty_version' => 'v0.22.0',
     15            'version' => '0.22.0.0',
     16            'reference' => '3047c90834ae8f51dab18b612f9353c28cc80ddd',
    1717            'type' => 'wordpress-plugin',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.