Changeset 3831645
- Timestamp:
- 11/28/2026 02:59:13 PM (less than one hour ago)
- Location:
- fflmonkey-data-feed-for-woocommerce/trunk
- Files:
-
- 4 added
- 3 deleted
- 15 edited
-
assets/dist/.vite/manifest.json (modified) (3 diffs)
-
assets/dist/build.json (modified) (1 diff)
-
assets/dist/chunks/index-B5YqL-GB.js (added)
-
assets/dist/chunks/index-t0SUyXi6.js (deleted)
-
assets/dist/chunks/page-D2jIM2Pk.js (added)
-
assets/dist/chunks/page-YUlGlIbV.js (deleted)
-
assets/dist/portal-BTi-avaI.js (added)
-
assets/dist/portal-BaNVFem5.js (deleted)
-
fflmonkey-data-feed-for-woocommerce.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
source/portal-sdk/README.txt (modified) (1 diff)
-
source/portal-sdk/packages/core/src/version.ts (modified) (1 diff)
-
source/portal-sdk/packages/react/src/i18n/es/distributors.ts (modified) (2 diffs)
-
source/portal-sdk/packages/react/src/i18n/es/fastbound.ts (modified) (1 diff)
-
source/portal-sdk/packages/react/src/pages/distributors/api.ts (modified) (1 diff)
-
source/portal-sdk/packages/react/src/pages/distributors/connection-status.tsx (modified) (1 diff)
-
source/portal-sdk/packages/react/src/pages/distributors/distributors-board-view.tsx (modified) (2 diffs)
-
source/portal-sdk/packages/react/src/pages/distributors/distributors-model.ts (modified) (2 diffs)
-
source/portal-sdk/packages/react/src/pages/distributors/row-actions.tsx (modified) (2 diffs)
-
source/portal-sdk/packages/react/src/pages/distributors/use-distributor-switch.ts (added)
-
source/portal-sdk/packages/react/src/pages/distributors/use-distributors-board.ts (modified) (8 diffs)
-
vendor/composer/installed.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fflmonkey-data-feed-for-woocommerce/trunk/assets/dist/.vite/manifest.json
r3821524 r3831645 1 1 { 2 2 "../../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", 4 4 "name": "index", 5 5 "src": "../../node_modules/@fflmonkey/portal-sdk/packages/react/src/i18n/es/index.ts", … … 13 13 }, 14 14 "../../node_modules/@fflmonkey/portal-sdk/packages/react/src/pages/inventory/page.tsx": { 15 "file": "chunks/page- YUlGlIbV.js",15 "file": "chunks/page-D2jIM2Pk.js", 16 16 "name": "page", 17 17 "src": "../../node_modules/@fflmonkey/portal-sdk/packages/react/src/pages/inventory/page.tsx", … … 37 37 }, 38 38 "portal.ts": { 39 "file": "portal-B aNVFem5.js",39 "file": "portal-BTi-avaI.js", 40 40 "name": "portal", 41 41 "src": "portal.ts", -
fflmonkey-data-feed-for-woocommerce/trunk/assets/dist/build.json
r3821524 r3831645 2 2 "mode": "registry", 3 3 "path": null, 4 "portal": "0.2 0.0"4 "portal": "0.21.0" 5 5 } -
fflmonkey-data-feed-for-woocommerce/trunk/fflmonkey-data-feed-for-woocommerce.php
r3831436 r3831645 5 5 * Plugin URI: https://fflmonkey.com/products/data-feed 6 6 * 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.2 1.07 * Version: 0.22.0 8 8 * Requires at least: 6.8 9 9 * Requires PHP: 7.2 … … 36 36 } 37 37 38 const VERSION = '0.2 1.0';38 const VERSION = '0.22.0'; 39 39 const PLUGIN_FILE = __FILE__; 40 40 -
fflmonkey-data-feed-for-woocommerce/trunk/readme.txt
r3831436 r3831645 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.2 7 Stable tag: 0.2 1.07 Stable tag: 0.22.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 230 230 231 231 == 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. 232 235 233 236 = 0.21.0 = -
fflmonkey-data-feed-for-woocommerce/trunk/source/portal-sdk/README.txt
r3821524 r3831645 1 1 Source of the merchant's screens, assets/dist/portal-<hash>.js and its chunks 2 2 3 This is the TypeScript source of @fflmonkey/portal-sdk 0.2 0.0, the version3 This is the TypeScript source of @fflmonkey/portal-sdk 0.21.0, the version 4 4 this release was compiled from. It is distributed as part of this plugin under 5 5 the 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 22 22 23 23 /** 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.2 0.0';24 export 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 29 29 "Connected to {name}": "Conectado a {name}", 30 30 "Connecting": "Conectando", 31 "Connecting…": "Conectando…", 31 32 "Could not connect.": "No se pudo conectar.", 32 33 "Disconnect {name}": "Desconectar {name}", … … 52 53 "Not verified": "Sin verificar", 53 54 "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.", 54 56 "Replace the {name} login we hold for your store.": "Sustituye el acceso de {name} que guardamos para tu tienda.", 55 57 "Saved for {name}": "Guardado para {name}", -
fflmonkey-data-feed-for-woocommerce/trunk/source/portal-sdk/packages/react/src/i18n/es/fastbound.ts
r3821524 r3831645 43 43 "Connect your FastBound account": "Conecta tu cuenta de FastBound", 44 44 "Connected.": "Conectado.", 45 "Connecting…": "Conectando…",46 45 "Counted by UPC": "Contadas por UPC", 47 46 "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 36 36 /** What this distributor calls its credentials, declared by its adapter; empty when it declares none. */ 37 37 credential_fields: CredentialFieldDto[]; 38 /** False for a distributor connected with nothing to type; an older backend does not send it. */ 39 needs_credentials?: boolean; 38 40 /** The last hourly probe of the distributor with our own credentials; null if never probed. */ 39 41 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 25 25 26 26 /** The pill's props. */ 27 type ConnectionStatusPillProps = { isSelected: boolean; account: DistributorAccountRow | null };27 type ConnectionStatusPillProps = { isSelected: boolean; account: DistributorAccountRow | null; needsCredentials?: boolean }; 28 28 29 29 /** 30 30 * A row's connection status: a coloured dot and words. 31 31 * 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. 35 36 * @returns The status. 36 37 */ 37 export function ConnectionStatusPill({ isSelected, account }: ConnectionStatusPillProps) {38 const status = connectionStatusOf(isSelected, account );38 export function ConnectionStatusPill({ isSelected, account, needsCredentials = true }: ConnectionStatusPillProps) { 39 const status = connectionStatusOf(isSelected, account, needsCredentials); 39 40 40 41 return ( -
fflmonkey-data-feed-for-woocommerce/trunk/source/portal-sdk/packages/react/src/pages/distributors/distributors-board-view.tsx
r3764814 r3831645 100 100 </td> 101 101 <td> 102 <ConnectionStatusPill isSelected={row.isSelected} account={row.account} />102 <ConnectionStatusPill isSelected={row.isSelected} account={row.account} needsCredentials={row.needsCredentials} /> 103 103 </td> 104 104 <td className="actions-col"> … … 108 108 hasAccount={row.account !== null} 109 109 isBusy={row.isBusy} 110 needsCredentials={row.needsCredentials} 111 isConnecting={row.isConnecting} 110 112 onConnect={() => board.onConnect(row.distributor.slug)} 111 113 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 104 104 * The confirmation shown before a distributor is disconnected. 105 105 * 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. 107 108 * @returns The question. 108 109 */ 109 export function disconnectQuestion(name: string ): DisconnectQuestion {110 export function disconnectQuestion(name: string, needsCredentials = true): DisconnectQuestion { 110 111 return { 111 112 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 }), 113 116 confirmLabel: t('Disconnect'), 114 117 destructive: true, … … 117 120 118 121 /** 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 */ 127 export function distributorNeedsCredentials(distributor: DistributorRow): boolean { 128 return distributor.needs_credentials !== false; 129 } 130 131 /** 119 132 * A row's connection status. 120 133 * 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. 123 137 * @returns The pill's tone and text. 124 138 */ 125 export function connectionStatusOf(isSelected: boolean, account: DistributorAccountRow | null ): ConnectionStatus {139 export function connectionStatusOf(isSelected: boolean, account: DistributorAccountRow | null, needsCredentials = true): ConnectionStatus { 126 140 if (!isSelected) { 127 141 return { tone: 'off', text: t('Not connected') }; 142 } 143 144 if (!needsCredentials) { 145 return { tone: 'ok', text: t('Connected') }; 128 146 } 129 147 -
fflmonkey-data-feed-for-woocommerce/trunk/source/portal-sdk/packages/react/src/pages/distributors/row-actions.tsx
r3764814 r3831645 30 30 hasAccount: boolean; 31 31 isBusy: boolean; 32 needsCredentials?: boolean; 33 isConnecting?: boolean; 32 34 onConnect: () => void; 33 35 onDisconnect: () => void; … … 35 37 36 38 /** 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. 38 40 * 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. 46 50 * @returns The buttons. 47 51 */ 48 export function RowActions({ name, isSelected, hasAccount, isBusy, onConnect, onDisconnect }: RowActionsProps) {52 export function RowActions({ name, isSelected, hasAccount, isBusy, needsCredentials = true, isConnecting = false, onConnect, onDisconnect }: RowActionsProps) { 49 53 const isUpdating = isSelected && hasAccount; 54 const showsConnect = needsCredentials || !isSelected; 50 55 51 56 return ( 52 57 <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 )} 63 70 {isSelected && ( 64 71 <button -
fflmonkey-data-feed-for-woocommerce/trunk/source/portal-sdk/packages/react/src/pages/distributors/use-distributors-board.ts
r3784373 r3831645 38 38 disconnectedMessage, 39 39 disconnectQuestion, 40 distributorNeedsCredentials, 40 41 failureMessage, 41 42 visibleDistributors, 42 43 type ConnectPhase, 43 44 } from './distributors-model'; 45 import { useDistributorSwitch } from './use-distributor-switch'; 44 46 import { t } from '../../i18n/index'; 45 47 import { explainFailure } from '../../lib/request-failure'; … … 54 56 account: DistributorAccountRow | null; 55 57 isBusy: boolean; 58 needsCredentials: boolean; 59 isConnecting: boolean; 56 60 }; 57 61 … … 84 88 85 89 /** 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. 87 91 * 88 92 * @returns The board's state and handlers. … … 92 96 const accounts = useGetDistributorAccountsQuery(); 93 97 const confirm = useConfirm(); 98 const distributorSwitch = useDistributorSwitch(); 94 99 95 100 const [upsert, upsertState] = useUpsertDistributorAccountMutation(); … … 148 153 const disconnectRow = async (slug: string) => { 149 154 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)); 151 157 if (!isConfirmed) return; 152 158 … … 161 167 setDisconnectingSlug(null); 162 168 } 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); 163 180 }; 164 181 … … 178 195 account: accountBySlug.get(distributor.slug) ?? null, 179 196 isBusy: disconnectingSlug === distributor.slug, 197 needsCredentials: distributorNeedsCredentials(distributor), 198 isConnecting: distributorSwitch.connectingSlug === distributor.slug, 180 199 })), 181 200 dialog: { … … 188 207 onSubmit: input => void submitCredentials(input), 189 208 }, 190 onConnect: slug => openDialog(slug),209 onConnect: slug => connectRow(slug), 191 210 onDisconnect: slug => void disconnectRow(slug), 192 211 }; -
fflmonkey-data-feed-for-woocommerce/trunk/vendor/composer/installed.php
r3831436 r3831645 2 2 'root' => array( 3 3 'name' => 'fflmonkey/wordpress-data-feed', 4 'pretty_version' => 'v0.2 1.0',5 'version' => '0.2 1.0.0',6 'reference' => ' 99b4bab66505bae11f6f56391d5f4c263efd7484',4 'pretty_version' => 'v0.22.0', 5 'version' => '0.22.0.0', 6 'reference' => '3047c90834ae8f51dab18b612f9353c28cc80ddd', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 12 12 'versions' => array( 13 13 'fflmonkey/wordpress-data-feed' => array( 14 'pretty_version' => 'v0.2 1.0',15 'version' => '0.2 1.0.0',16 'reference' => ' 99b4bab66505bae11f6f56391d5f4c263efd7484',14 'pretty_version' => 'v0.22.0', 15 'version' => '0.22.0.0', 16 'reference' => '3047c90834ae8f51dab18b612f9353c28cc80ddd', 17 17 'type' => 'wordpress-plugin', 18 18 'install_path' => __DIR__ . '/../../',
Note:
See TracChangeset
for help on using the changeset viewer.